bug report: pylupdate corrupts ampersand symbols
Efrem Braun
efrem.braun at gmail.com
Tue Jan 25 15:06:09 GMT 2022
Since updating my PyQt5 from version 5.15.4 to PySide6 (and I've confirmed
that this issue is also present in 5.15.5, so the issue originated there),
ampersand symbols in the existing .ts files have begun being replaced by
"&", even when the ampersand symbols are being used as escape
characters. This occurs in the "translation" lines only, not the "source"
lines. This is an issue when HTML formatting is used.
For example, I used to have an entry:
```
<message>
<location
filename="../../xslide-desktop/xslide_desktop/views/Ui_MainWindow.py"
line="2655"/>
<source><html><head/><body><p>Background
File
<br>
(optional)</p></body></html></source>
<translation><html><head/><body><p>バックグラウンドファイル
<br>
(任意)</p></body></html></translation>
</message>
```
It now gets replaced by:
```
<message>
<location
filename="../../xslide-desktop/xslide_desktop/views/Ui_MainWindow.py"
line="2655"/>
<source><html><head/><body><p>Background
File
<br>
(optional)</p></body></html></source>
<translation
type="obsolete"><html><head/><body><p>バックグラウンドファイル
<br>
(任意)</p></body></html></translation>
</message>
```
After converting this to the .qm file and running the application, the
translation shows up in my application with the html code.
To workaround this, I'm using pylupdate5 from version 5.15.4 to generate my
translation files. But obviously it'd be nicer to use the latest version.
Efrem Braun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20220125/f0ed8446/attachment.htm>
More information about the PyQt
mailing list