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:

shapes.hu

I found the errors in the corresponding po file:

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?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information