Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.5
-
None
-
Linux/x86
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?