1

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.

Joshua Strot
  • 2,343
  • 4
  • 26
  • 33
  • How do you know that this is going to be a problem for transifex? According to [this](http://support.transifex.com/customer/portal/articles/992090-html-html-xhtml-), they do have support for html/xhtml formats, so maybe you should be asking them how to proceed, first. – ekhumoro Jan 13 '14 at 05:28
  • @ekhumoro But since these are .ts files, I don't believe it parses the html data. I've tried uploading a testing .ts file to a test project, and it shows all of the html tags plain as day. – Joshua Strot Jan 13 '14 at 06:17
  • Until you have confirmation from transifex that they can't handle html in .ts files, I would say your question is off-topic. If you're on their free plan, just post a question [here](http://support.transifex.com/customer/portal/questions/new) and see what they say. – ekhumoro Jan 13 '14 at 17:11
  • @ekhumoro I wouldn't say it's exactly off topic, it even shows up if you try to translate it with QTLinguist, or any other tool. But I will ask the question there as well, thank you for pointing it out to me. – Joshua Strot Jan 13 '14 at 20:48

1 Answers1

1

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

Joshua Strot
  • 2,343
  • 4
  • 26
  • 33
  • Glad to hear you got this sorted out. As a matter of interest, did you actually get a reply from the Transifex Help Desk? They claim that "answers should be expected within the week"... – ekhumoro Feb 16 '14 at 22:01
  • @ekhumoro I did actually, I was very pleased with how they handled [the situation](http://support.transifex.com/customer/portal/questions/5193721-html-tags-inside-of-qt-translation-files-). – Joshua Strot Feb 16 '14 at 22:42