Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
6.7.2, 6.8.0 Beta2
Description
TS files normally have the location filename attribute set to the relative path of the project source file.
For example,
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="fr" sourcelanguge="en"> <context> <name>Main</name> <message> <location filename="../Main.qml" line="7"/> <source>Hello World</source> <translation type="unfinished"></translation> </message> </context> </TS>
The qt_add_translations() command is generating TS files contain a location filename attribute set to the relative path of the project source file and an another entry set to the relative path of the source file in the build directory. For example,
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1"> <context> <name>Main</name> <message> <location filename="../Main.qml" line="7"/> <location filename="../build/Desktop_Qt_6_7_2_MinGW_64_bit-Debug/qml_translations/Main.qml" line="7"/> <source>Hello World</source> <translation type="unfinished"></translation> </message> </context> </TS>
Behavior also observed when generating a plurals-only .ts file via the qt_add_translations(PLURAL_TS_FILE file.ts) commands.
To reproduce issue, build attached project with update_translations.
Attachments
Issue Links
- duplicates
-
QTBUG-124764 qt_add_lupdate adds extra location for QML files
- Closed