Wrong context detected by pylupdate
Giuseppe Corbelli
corbelligiuseppe at mesdan.it
Wed Jun 24 10:59:34 BST 2020
Hi all
I found that under rather common circumstances pylupdate uses the wrong
context while generating TS files. I did not investigate much but I
expect trouble since the Qt tr() implementation uses
QMetaObject::className which is of course different.
Please see the attached test case and TS output.
pylupdate5 v5.15.0
Python 3.5.4
Linux, if it matters.
Yes, I know that Qt6 is on its way and pylupdate will be revamped. I
already found a workaround (do not define nested class) so it's no big
deal for me right now but maybe it's worth considering.
Thanks
--
Giuseppe Corbelli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pylupdate_test.py
Type: text/x-python
Size: 158 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200624/da617d45/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pylupdate_test.ts
Type: text/vnd.qt.linguist
Size: 335 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200624/da617d45/attachment.bin>
More information about the PyQt
mailing list