Functions implemented to run *Weblate* workflows should use prefix 'weblate.': - babel.setup.translations.worktree --> weblate.translations.worktree Create git worktree ${TRANSLATIONS_WORKTREE} and checkout branch 'translations' from Weblate's counterpart (weblate) of the SearXNG (origin):: remote weblate https://weblate.bubu1.eu/git/searxng/searxng/ - babel.weblate.to.translations --> weblate.to.translations Update 'translations' branch of SearXNG (origin) with last additions from Weblate. - babel.translations.to.master --> weblate.translations.commit Update 'translations' branch of SearXNG (origin) with last additions from Weblate. Copy the changes to the master branch, compile translations and create a commit in the local branch (master) - babel.master.to.translations --> weblate.push.translations Push *translation changes* from SearXNG (origin) to Weblate's counterpart (weblate). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2.9 KiB
Translation
- Weblate
- SearXNG translations branch
- SearXNG Weblate repository
- Weblate Client: wlc
- Babel Command-Line: pybabel
- weblate workflow
Translation takes place on weblate.bubu1.eu.
Translations which has been added by translators on the weblate.bubu1.eu UI are committed to Weblate's counterpart of the SearXNG origin repository which is located at https://weblate.bubu1.eu/git/searxng/searxng
.
There is no need to clone this repository, SearXNG Weblate workflow
take care of the synchronization with the origin. To avoid merging commits from the counterpart directly on the master
branch of SearXNG origin, a pull request (PR) is created by this workflow.
Weblate monitors the translations branch, not the master
branch. This branch is an orphan branch, decoupled from the master branch (we already know orphan branches from the gh-pages
). The translations branch contains only the
translation/messages.pot
and thetranslation/*/messages.po
files, nothing else.
- Sync from origin to weblate: using
make weblate.push.translations
For each commit on the
master
branch of SearXNG origin the GitHub jobbabel / Update translations branch <.github/workflows/integration.yml>
checks for updated translations.- Sync from weblate to origin: using
make weblate.translations.commit
Every Friday, the GitHub workflow
babel / create PR for additons from weblate <.github/workflows/translations-update.yml>
creates a PR with the updated translation files:translation/messages.pot
,translation/*/messages.po
andtranslation/*/messages.mo
wlc
All weblate integration is done by GitHub workflows, but if you want to use wlc, copy this content into wlc configuration in your HOME ~/.config/weblate
[keys]
https://weblate.bubu1.eu/api/ = APIKEY
Replace APIKEY
by your API key.