Dear all,
I would like to report a bug I have found while using the XML filter together with ITS filter properties.
My content has some phrases and terms in angle brackets, e.g. <foo>. These expressions are encoded as <foo> in the source XML file. I know this is probably a very bad practice, but that's what the authors do.
Basically the problem is that the closing character becomes unescaped in nodes excluded by ITS's locale filter, which breaks the application consuming the translation.
In other words, source file has:
<label key="ST801KAZ_ST801Q0104KAZ_54c6c210509bc38e7b8bea748938937e_6" its:localeFilterList="en-PH" its:localeFilterType="exclude">
<text><I don’t know></text>
</label>
<label key="ST801KAZ_ST801Q0104KAZ_54c6c210509bc38e7b8bea748938937e_6" its:localeFilterList="en-PH" its:localeFilterType="include">
<text><I don’t know></text>
</label>
Translation into en-PH produces:
<label its:localeFilterList="en-PH" its:localeFilterType="exclude" key="ST801KAZ_ST801Q0104KAZ_54c6c210509bc38e7b8bea748938937e_6">
<text><I don’t know
></text>
</label>
<label its:localeFilterList="en-PH" its:localeFilterType="include" key="ST801KAZ_ST801Q0104KAZ_54c6c210509bc38e7b8bea748938937e_6">
<text><Je ne sais pas></text>
</label>
Expected result was:
<label its:localeFilterList="en-PH" its:localeFilterType="exclude" key="ST801KAZ_ST801Q0104KAZ_54c6c210509bc38e7b8bea748938937e_6">
<text><I don’t know
></text>
</label>
<label its:localeFilterList="en-PH" its:localeFilterType="include" key="ST801KAZ_ST801Q0104KAZ_54c6c210509bc38e7b8bea748938937e_6">
<text><Je ne sais pas></text>
</label>
Notice the difference depending on whether the label is excluded or included for the target language of the project (which is en-PH).
I got this issue while using the XML filter in OmegaT via the filter plugin, but I could reproduce it if I create an XLIFF file with Rainbow (also attached).
For your convenience, I'm attaching:
- the source file (STQ.xml)
- the target file
- the filter parameters file
- the OmegaT package including all of the above
- the target XLIFF file
I could not create an OmegaT project in Rainbow 1.45
Utilities > Translation Kit Creation. I selected the OmegaT Project, but the outcome is Generic XLIFF (but this is a different bug).
I will write a ticket as soon as someone else can confirm they can reproduce the problem.
Thanks.
Cheers, Manuel