pythonqtpyqttranslationtransifex

QT translations and subset HTML


I want to use subset HTML inside of my QT widgets that also contain text. I'm using translations for my project, so I also have a source .ts which I later upload to transifex so a translation team can translate it.

However, when I use subset HTML my strings in my .ts file can have the following.

<message>
    <location filename="layoutstest.py" line="1007"/>
    <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Hello ...Much More code here...</source>
    <translation type="unfinished"></translation>
</message>

This shows up for the translators as well, although not escaped, but still there. It's going to make it very hard for them, or anyone that matter, to translate these strings, so is there anyway around this, or anyway to remove the html from the strings, but still keep it in the code.

I really would like to use it, but I can't if it's going to live in the translation strings as well.


Solution

  • Turns out that they actually use syntax highlighting for the subset HTML now. This is a solution for my problem.