[CI] weblate.push.translations does not sync new languages #4117
Description
SearXNG’s PR workflow to be in sync with Weblate [1] is not able to sync a newly added language / and I assume its the same when removing an unmaintained language.
Here is what I expected:
To add a new language e.g tt
(Tatar):
$ ./manage pyenv.cmd bash
$ pybabel init -i searx/translations/messages.pot -d searx/translations -l tt
creating catalog searx/translations/tt/LC_MESSAGES/messages.po based on searx/translations/messages.pot
$ ./searxng_extra/update/update_locales.py
Create a PR [2] and merge the PR .. Then the CI starts weblate.push.translations
searxng/.github/workflows/integration.yml
Line 158 in 1604a00
but this command just monitors modification off the messages.pot
file
searxng/utils/lib_sxng_weblate.sh
Lines 149 to 155 in 1604a00
Here is what I tried first to sync:
Since a new language does not modify the message.pot
the commands stops here without syncing the new language to weblate.
Then I tried to trigger by adding a dummy string in 899edee .. and the CI (weblate.push.translations
) synced the modification of the messages.pot
file to the translation
branch in f75ddb0 .. but did not synced the new language (tt
).
[1] https://docs.searxng.org/dev/translation.html#searxng-weblate-workflow
[2] #4106
My final workaround
To add new language the following steps are needed:
- create and merge a PR for the new language (as described above)
- manually commit the folder of the new language to the translations branch (like I added
tt
in 67abcc1) - To trigger CI (
weblate.push.translations
) a modification of themessages.pot
file is needed / I just reverted 899edee from above in 1604a00