-
Notifications
You must be signed in to change notification settings - Fork 42
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
enforces translation of GUI strings #1272
Conversation
f51fc31
to
cc1e640
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. We could go down a regex rabbit hole trying to catch cases like setText(stringvar + "...")
but I think that effort would be better spent on developer guidelines.
I requested a couple of small changes on the very last commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, test plan checks out
Catches Q{Action,Label,PushButton} constructors plus common Qt and custom methods whose string arguments should be translated for rendering in the GUI.
In these cases, the formatting arguments are string constants that are already marked for gettext.
8f4e1bc
to
465f330
Compare
Catches strings of the form--- _("{foo} is a bar".format(foo=bar)) ---that should take the form--- _("{foo} is a bar").format(foo=bar) ---unless foo itself is expected to be translated.
|
looks like the only ci failure is due to a known safety issue:
forcing merge based on @rmol's approval |
Ready for review
Description
Closes #1265 by:
untranslated-gui-string
to catch common cases of GUI strings not marked with gettext's_()
wrapper; andTest Plan
Checklist
If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:
I do not have an appropriate Qubes OS workstation set up (the reviewer will need to test these changes)These changes should not need testing in QubesIf these changes add or remove files other than client code, the AppArmor profile may need to be updated. Please check as applicable:
I have updated the AppArmor profileI don't know and would appreciate guidanceIf these changes modify the database schema, you should include a database migration. Please check as applicable:
I have written a migration and upgraded a test database based onmain
and confirmed that the migration applies cleanlyI have written a migration but have not upgraded a test database based onmain
and would like the reviewer to do soI need help writing a database migration