Details
-
Bug
-
Resolution: Won't Do
-
P3: Somewhat important
-
None
-
5.13.2
-
None
Description
This Problem happens in the following workflow:
Qt Designer →pyside2-uic→ Python file →pyside-lupdate→ language file (.ts)
If you convert your *.ui file via pyside2-uic to a *.py file, the function 'retranslateUi()' is auto generated. In this function all the translate statements are outofilled with the default values: translate(CONTEXT, KEY, None, -1).
If you run the pyside2-lupdate command, a *.ts file is generated which context part looks like this:
<context> <name>Name</name> <message numerus="yes"> <location filename="filename.py" line="38"/> <source>English text</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> </context>
If you remove the last parameter in the translate statement (translate(CONTEXT, KEY, None)) the same part looks like this:
<context> <name>Name</name> <message> <location filename="filename.py" line="38"/> <source>English text</source> <translation type="unfinished"></translation> </message> </context>
That means the default value is not working properly, because if you leave it out, it leads to a different result in building the language file.
The problem with this output is that with the 'numerus="yes"' option you have to add a plural form in Qt Linguist, otherwise an update with a new realease won't work. You always have to set everything to unfinished and confirm it once again (I observed this behaviour when the yellow ticks are present in Qt Linguist).
So it would be nice if this problem could be fixed. I think it exists in the function 'translate' or in the parsing program 'pyside2-lupdate'
Attachments
Issue Links
- resulted in
-
PYSIDE-1252 Add Python support in lupdate
- Closed