Reduce localization manager review noise #5791
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Status
Ready for review
Description of Changes
Adjust
i18n_tool.py
to reduce translation review noise:- Stop including the locations of source strings in the
.po
files.- Stop wrapping source strings in both
.pot
and.po
files.- Sort the translated names in the admin workstation desktop icon files.
I asked the translators whether they found source code locations useful. Some have tried to understand the context of a source string by looking at the code, but they didn't get the locations from Weblate. They would all prefer context be provided via screenshots or other means: rummaging through our source code is a last resort.
Fixes #5769.
Fixes #5426
Testing
It would be best to compare the result of these changes if #5790 were merged to
develop
first. Once themessages.pot
file ondevelop
has been brought up to date, you can follow the test plan for #5790, but checking out this branch (reduce-lm-review
) instead ofupdate-translation-messages
. You should only ever see the same 13 untranslated alt text strings in Hindi: the output on this branch (which has dropped source code locations and line wrapping) should match the output ondevelop
.Once the web messages have been checked, verify that the desktop icon templates contain the same names, just sorted. Take a look to confirm the sorting, then run this to confirm that the same translated names are present on both
develop
and this branch:git checkout reduce-lm-review
for i in source journalist; do diff -u <(sort install_files/ansible-base/roles/tails-config/templates/desktop-${i}-icon.j2) <(git show develop:install_files/ansible-base/roles/tails-config/templates/desktop-${i}-icon.j2|sort) && echo "names are the same in the ${i} template"; done
You should see:
Deployment
The actual translated strings should not change at all. This just makes visual review of the
.po(t)
files easier.Checklist
If you made non-trivial code changes:
Choose one of the following: