Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upi18n causing regressions #2637
Comments
jpouellet
changed the title from
i18n regressions
to
i18n causing regressions
Feb 15, 2017
andrewdavidwong
added
bug
C: qubes-manager
P: major
labels
Feb 16, 2017
andrewdavidwong
added this to the Release 3.2 updates milestone
Feb 16, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpouellet
Feb 17, 2017
Contributor
There are also more regressions where .tr() is callable, but still missing conversion from QString to something with .format(). QubesOS/qubes-manager@d073b35 did not hit all cases, for example here.
Definitely don't release to qubes-dom0-current yet ;)
|
There are also more regressions where .tr() is callable, but still missing conversion from QString to something with .format(). QubesOS/qubes-manager@d073b35 did not hit all cases, for example here. Definitely don't release to qubes-dom0-current yet ;) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Feb 19, 2017
Member
([1], [2], [3], almost certainly others)
Any other example? Most of the code is in QObject based classes - the only exceptions I remember are:
- few classes at the beginning of
main.py(you've hit this one) block.py,clipboard.py- excluded from translation for this reasonbackup_utils.py,appmenu_select.py- nothing to translate
As for wrapping self.tr with unicode - this is rather ugly, but mostly because QString is incompatible with python builtin str/unicode... The alternative is to switch to QString completely and use QString.arg (%1, %2, etc) instead of str.format ({} or named variant). IMHO consistency with our other python modules is more important than consistency with PyQt.
Any other example? Most of the code is in QObject based classes - the only exceptions I remember are:
As for wrapping |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpouellet
Feb 19, 2017
Contributor
It seems I was wrong. All .tr()s except those three (and this) indeed do seem to operate on self in a class deriving from QSomething.
PR to correct just those 3: QubesOS/qubes-manager#26
|
It seems I was wrong. All .tr()s except those three (and this) indeed do seem to operate on self in a class deriving from QSomething. PR to correct just those 3: QubesOS/qubes-manager#26 |
jpouellet
referenced this issue
in QubesOS/qubes-manager
Feb 19, 2017
Merged
Use app instead of self for .tr() outside QObject #26
marmarek
closed this
Feb 19, 2017
added a commit
to jpouellet/qubes-manager
that referenced
this issue
Feb 20, 2017
jpouellet
referenced this issue
in QubesOS/qubes-manager
Feb 20, 2017
Merged
Add more missing unicode()s around .tr()s #27
added a commit
to jpouellet/qubes-manager
that referenced
this issue
Feb 20, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
qubesos-bot
Feb 20, 2017
Automated announcement from builder-github
The package qubes-manager-3.2.9-1.fc23 has been pushed to the r3.2 testing repository for dom0.
To test this update, please install it with the following command:
sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing
qubesos-bot
commented
Feb 20, 2017
|
Automated announcement from builder-github The package
|
jpouellet commentedFeb 15, 2017
•
edited
Edited 1 time
-
jpouellet
edited Feb 15, 2017 (most recent)
Qubes-manager notifications have been broken since QubesOS/qubes-manager@4946d7b because .tr() is attempted to be called on self in places where self is not the QApplication (or anything deriving from QObject?). ([1], [2], [3], almost certainly others)
This results in stack traces like the following:
I tried just
s/self.tr(/app.tr(/everywhere, but app isn't available everywhere either, so apparently we need to review the scopes on a call-by-call basis? I feel like there should be a cleaner way to address this, but I don't know what that would be.