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

Inability to export task with a special chars sequence in source segment

XMLWordPrintable

    • Medium
    • Fix inability to export tasks with some chars sequences in source segments

      Problem

      On import if a source segment has  ">" symbol within "equiv-text" XML element attribute like the following

      <ph id="1" ctype="x-regxph" equiv-text="&lt;SYS_SDATE>">&amp;lt;SYS_SDATE&amp;gt;</ph>

      then built-in XML parser treats it as tag closing character

          [9] => <source xml:lang="de-DE">
          [10] => Datum: 
          [11] => <ph id="1" ctype="x-regxph" equiv-text="&lt;SYS_SDATE>
          [12] => ">&amp;lt;SYS_SDATE&amp;gt;
          [13] => </ph>
          [14] => 
          [15] => </source>

      and it causes incorrect target segment markup which causes error later when trying to export translated tasks due to invalid resulting XML:

      Solution

      Find a way to reflect the original chars sequence.
      Starting point can be \editor_Models_Import_FileParser_Tag::parseSegmentGetStorageClass

        1. 1_emptyTarget.xml.xlf
          0.8 kB
          Volodymyr Kyianenko
        2. image-2025-06-11-10-44-21-256.png
          32 kB
          Volodymyr Kyianenko

            volodymyr@mittagqi.com Volodymyr Kyianenko
            volodymyr@mittagqi.com Volodymyr Kyianenko
            Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: