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

lupdate -location relative doesn't work for XLIFF

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.12.5
    • Tools: Linguist
    • None
    • Linux/x86
    • Linux/X11

    Description

      Using the "-locations relative" command line option works properly when creating TS files, however if the project ".pro" file indicates an "xlf" file, ludpate does not create the XLIFF file with source code references using relative paths.  The command line option is ignored.

      For example:

       

      # project.pro
      TRANSLATIONS = translations/project_en_us.xlf
      

      Calling lupdate:

      $ lupdate -locations relative project.pro
      

      The resulting incorrect behavior is that the XLIFF file does not have relative paths for source code references, all paths to the source code are absolute.  Opening the project on a different system will cause Linguist to be unable to view the translation text within the source code context.

      When the TRANSLATIONS variable points to a TS file, i.e. "translations/project_en_us.ts", the paths are correctly output as relative.  As a temporary workaround, we are generating the TS file, opening in Linguist, and then "Save as..." an XLIFF file.  This can't be automated though and isn't a process that we can reliably use across many languages.

      The problem this is causing for us is that our translation team wants to use XLIFF natively, and they have requested to view the text in source code context.

      Seems like an easy fix?

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kkohne Kai Köhne
            bradley.nelson Bradley Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes