xml2po truncates translated strings on repairing XML tags
I noticed truncated strings in Hungarian shapes tutorial. This is a simple translator error (I made it...), but there is a general error which is in contact with #7 (closed).
Find this part. There are 2 truncated sentence:
I found the errors in the corresponding po file:
-
po.hu L989: a closing
</mousebutton>is missing. -
po.hu L1033: a closing
</mousebutton>is missing.
This is the original XML:
<listitem>
<para>
<keycombo>
<keycap function="control">Ctrl</keycap>
<mousebutton role="click">click</mousebutton>
</keycombo>
to remove the skew without dragging.
</para>
</listitem>
<listitem>
<para>
<keycombo>
<keycap function="shift">Shift</keycap>
<mousebutton role="click">click</mousebutton>
</keycombo>
a handle to remove rounding.
</para>
</listitem>
And this is the improved code what xml2po produces:
<listitem>
<para>
A
<keycombo>
<keycap function="control">Ctrl</keycap>
<mousebutton role="click">kattintás h</mousebutton>
</keycombo>
</para>
</listitem>
<listitem>
<para>
a
<keycombo>
<keycap function="shift">Shift</keycap>
<mousebutton role="click">kattintás egy foganty</mousebutton>
</keycombo>
</para>
</listitem>
I realized that xml2po repairs the code and closes the tag, but truncates the string by first non ASCII character. I have a test for that. I think this is a common translation error. When I worked on #7 (closed) I hoped that we can catch this type of translation error but xml2po hides them. I expected that xml2po will produce invalid XML and we can catch them, but xml2po is smart.
I'm afraid that there is more affected strings, but we haven't a method to catch them.
@ede123, how to catch these malformed translations?
