-
Notifications
You must be signed in to change notification settings - Fork 164
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
check missing translations in CI #608
Comments
I have already written a gettext script to update the .pot file: xgettext --language=Python --join-existing --no-wrap -d safeeyes --no-location --omit-header \
-o safeeyes/config/locale/safeeyes.pot -- $(find safeeyes/ -name "*.py") However, I am not entirely happy with its output yet. |
Also, ideally, this would also be a script that contributors could run before submitting a PR. |
And just after writing this, I had a PR have a conflict because of the translation files, which wasn't very fun to resolve. |
Apparently xgettext also supports Glade as a language - I wasn't aware of that. That should make it possible to translate strings in glade files directly without also setting the labels from python. |
PR #620 partially addresses this, by ensuring that translations are propagated to the |
What would this script do exactly? |
It's what I implemented in #620 with |
Yes, I did that https://github.com/slgobinath/SafeEyes/commits/master/safeeyes/config/locale/safeeyes.pot
Please document this in the README. We should also document this in the pull request template |
There was a translation commit for Italian and German 5 minutes ago, and the CI is broken again :( |
@archisman-panigrahi That was a merge issue with Weblate - I've fixed it in 3299680, it shouldn't happen anymore, presumably. |
(Elaborating on the merge issue - it was specifically failing because some placeholders had changed from |
Currently, it is easily possible to add a new translatable string in Python, without also adding it to the .pot file or without adding it to the individual languages' .po files by running
update-po.sh
.It should be possible to write a github action/extend the existing action to ensure that running
xgettext
/pygettext.py
would not add any new strings to the .pot file, and thatupdate-po.sh
would not add any new strings to the .po files.(The existing
validate_po.py
already uses polib, we could reuse that for this check too.)This would avoid issues like #569 (fixed by 603e1d7) in the future.
The text was updated successfully, but these errors were encountered: