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

Self closing target in alt-trans matchrate crashes the import

Details

    • Critical
    • Fix for crashing import when importing match-rate from alt-trans element.

    Description

      Problem

      The import will crash if in the imported xlf file (or xlf based file) there is alt-trans element containing self closing target element.

      The reason for the error is, the code trys to compare the source content of the segment with the source content of the alt-trans source, in that case since the alt-trans source is self closing tag with no content, the check goes out of index when trying to the the content.

      Example of reduced trans-unit with invalid alt-trans element:

      <trans-unit ... >
      <source>“{1}” on page {2}</source>
      <target>„{1}“ auf Seite {2}</target>
      <alt-trans match-quality="0.0" origin="machine-trans">
      <target/>
      </alt-trans>
      ...

      Attachments

        Activity

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

          Self closing target in alt-trans matchrate crashes the import

          Details

            • Critical
            • Fix for crashing import when importing match-rate from alt-trans element.

            Description

              Problem

              The import will crash if in the imported xlf file (or xlf based file) there is alt-trans element containing self closing target element.

              The reason for the error is, the code trys to compare the source content of the segment with the source content of the alt-trans source, in that case since the alt-trans source is self closing tag with no content, the check goes out of index when trying to the the content.

              Example of reduced trans-unit with invalid alt-trans element:

              <trans-unit ... >
              <source>“{1}” on page {2}</source>
              <target>„{1}“ auf Seite {2}</target>
              <alt-trans match-quality="0.0" origin="machine-trans">
              <target/>
              </alt-trans>
              ...

              Attachments

                Activity

                  People

                    aleksandar Aleksandar Mitrev
                    aleksandar Aleksandar Mitrev
                    Thomas Lauria
                    Votes:
                    0 Vote for this issue
                    Watchers:
                    1 Start watching this issue

                    Dates

                      Created:
                      Updated:
                      Resolved:

                      People

                        aleksandar Aleksandar Mitrev
                        aleksandar Aleksandar Mitrev
                        Thomas Lauria
                        Votes:
                        0 Vote for this issue
                        Watchers:
                        1 Start watching this issue

                        Dates

                          Created:
                          Updated:
                          Resolved: