Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-119051

With Linguist it seems only the last segment from the XLIFF is used as translated string.

    XMLWordPrintable

Details

    • e96c9e98b (dev), 1081b84a1 (6.7), e6e5d36bd (6.6)

    Description

      User reported following:
      "
      We are facing XLIFF to TS conversion issue for below scenario:

      A long <source> string that has three segments in an XLIFF file

      <trans-unit id="_msg2394">
      <source xml:space="preserve">A standout centrepiece for any occasion. Use the temperature sensor for best results.
      
      Serve with roast tomatoes and hasselback potatoes.</source><seg-source><mrk mtype="seg" mid="605">A standout centrepiece for any occasion.</mrk> <mrk mtype="seg" mid="606">Use the temperature sensor for best results.</mrk>
      
      <mrk mtype="seg" mid="607">Serve with roast tomatoes and hasselback potatoes.</mrk></seg-source>
      <target state="signed-off" xml:space="preserve"><mrk mtype="seg" mid="605">Un centro de mesa destacado para cualquier ocasión.</mrk> <mrk mtype="seg" mid="606">Utilice el sensor de temperatura para obtener mejores resultados.</mrk>
      
      <mrk mtype="seg" mid="607">Acompañe con tomates asados y papas horneadas tipo hassleback.</mrk></target>
      <context-group purpose="location"><context context-type="linenumber">137</context></context-group>
      </trans-unit>
      

      Corresponding TS file has data loss:

      <message>
      <location filename="../ItemTranslationsRecipes.qml" line="137"/>
      <source>A standout centrepiece for any occasion. Use the temperature sensor for best results.
      
      Serve with roast tomatoes and hasselback potatoes.</source>
      <translation type="unfinished">Acompañe con tomates asados y papas horneadas tipo hassleback.</translation>
      </message>
      

      It seems only the last segment from the XLIFF is used as translated string.
      "

      Attached example xlf reproduces the issue.

      Attachments

        1. example.xlf
          2 kB
        2. xliff.zip
          2 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-119051
          # Subject Branch Project Status CR V

          Activity

            People

              lugerard Lucie Gerard
              tero.pelkonen Tero Pelkonen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes