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!