bug report: pylupdate corrupts ampersand symbols

Phil Thompson phil at riverbankcomputing.com
Thu Jan 27 17:31:06 GMT 2022


On 27/01/2022 16:12, Efrem Braun wrote:
> Sure.
> 
> 1. Take form.ui (which I made in Qt Creator), which has a red label 
> (which
> Qt Creator produces by using HTML formatting).
> 2. Run `pyuic5 -x form.ui -o form.py` to create form.py.
> 3. Run `pylupdate5 main.pro` to create ja_JP.ts.
> 4. Open ja_JP.ts in Qt Linguist, and provide a translation of the 
> source
> text "<html><head/><body><p><span style=" color:#ff0000;">Colored
> Label</span></p></body></html>" to "<html><head/><body><p><span style="
> color:#ff0000;">Translated Colored Label</span></p></body></html>". 
> Save
> the ja_JP.ts file in Qt Linguist.
> 5. Run `pylupdate5 main.pro` to update ja_JP.ts.
> 6. Open ja_JP.ts and you will see the ampersand symbols.
> 
> Efrem Braun

Should be fixed in the next PyQt5 snapshot.

Thanks,
Phil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.pro
Type: application/octet-stream
Size: 42 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20220127/93f8fd9b/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ja_JP.ts
Type: application/octet-stream
Size: 868 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20220127/93f8fd9b/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: form.py
Type: text/x-python-script
Size: 1823 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20220127/93f8fd9b/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: form.ui
Type: application/octet-stream
Size: 1132 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20220127/93f8fd9b/attachment-0005.obj>


More information about the PyQt mailing list