Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-1717

Segments containing one whitespace character can crash Okapi on export

    XMLWordPrintable

Details

    • Critical

    Description

      problem

      The okapiwhitespacebug-de-en.idml file attached to the linked issue TS-67 produces the following transunit in the generated XLF for export:

      <trans-unit id="P8DD502D-tu1" xml:space="preserve">

      <source xml:lang="de"> </source>

      <target xml:lang="en"></target>

      </trans-unit>

      This empty target leads Okapi to crash. (Probably a <target /> would not.)

      Multiple problems are to be solved here:

      1. If <target /> would be correct here for Okapi, we may not export
        <target xml:lang="en"></target> but must convert that to <target /> form
      2. The user does not see, that the source contains one space, and may not even touch the segment
      3. If the user tries to save the segment with just a whitespace, this whitespace is removed on saving, so this leads again to empty <target></target> With a non breaking space everything works, this was the workaround here.
      4. Why was this segment imported at all? This should be excluded since containing no text. (see FIXME problem mit translation task recognition)

      In translate5 it looks like:

      Attachments

        Activity

          People

            tlauria Thomas Lauria
            tlauria Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: