Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow for *.pot synchronization to weblate #1009

Merged
merged 6 commits into from
Nov 21, 2023
Merged

Workflow for *.pot synchronization to weblate #1009

merged 6 commits into from
Nov 21, 2023

Conversation

m-blaha
Copy link
Member

@m-blaha m-blaha commented Nov 10, 2023

This workflow runs periodically once a day, but it's also possible to
run it ad hoc from the GitHub web interface. It consists of the
following steps:

  • Clone the dnf5 repository.
  • Build fresh *.pot files using the gettext-potfiles CMake target.
  • Clone the dnf5-l10n synchronization repository.
  • Each *.pot file represents a Weblate component. For each file, a
    directory is created (if it doesn't already exist), the *.pot file is
    copied there, and a PATH file with the actual location of the component
    in the dnf5 source tree is created.
  • The new version is then directly pushed into the dnf5-l10n repository.

The dnf5-l10n repository serves the purpose of reducing commit traffic
with new translations coming from Weblate. This approach helps us
maintain a cleaner dnf5 Git history. New translations from Weblate will
be pulled automatically as part of the prepare-release GitHub workflow.

Thanks to cockpit team for inspiration!

Closes #419

@kontura kontura self-assigned this Nov 20, 2023
I've just run `make gettext-potfiles`
The pot files names are unified to dnf5-plugin-{name}.pot
The pot files names are unified to libdnf5-plugin-{name}.pot
This workflow runs periodically once a day, but it's also possible to
run it ad hoc from the GitHub web interface. It consists of the
following steps:

- Clone the dnf5 repository.
- Build fresh *.pot files using the gettext-potfiles CMake target.
- Clone the dnf5-l10n synchronization repository.
- Each *.pot file represents a Weblate component. For each file, a
  directory is created (if it doesn't already exist), the *.pot file is
  copied there, and a PATH file with the actual location of the component
  in the dnf5 source tree is created.
- The new version is then directly pushed into the dnf5-l10n repository.

The dnf5-l10n repository serves the purpose of reducing commit traffic
with new translations coming from Weblate. This approach helps us
maintain a cleaner dnf5 Git history. New translations from Weblate will
be pulled automatically as part of the prepare-release GitHub workflow.

Thanks to cockpit team for inspiration!
This action clones weblate repository, retrieves fresh translations from
it and commits the changes.
Now also new translations are added as a separate commit to release pull
request.
Copy link
Contributor

@kontura kontura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@kontura kontura added this pull request to the merge queue Nov 21, 2023
Merged via the queue into main with commit 52bdfc1 Nov 21, 2023
15 checks passed
@kontura kontura deleted the mblaha/pofiles branch November 21, 2023 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Translations infrastructure for dnf5
2 participants