Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.7.2, 6.8.0 Beta2
-
31e87f085 (dev), 4d4b4cdc0 (6.8), 0da163a56 (6.7)
Description
By default, the qt_add_translations command creates the .ts files in the CMAKE_CURRENT_SOURCE_DIR, i.e. the project's source directory. This location can be changed by passing a different directory to the TS_FILE_DIR argument.
When specifying the plurals-only .ts file for the source language with PLURALS_TS_FILE, if the TS_FILE_DIR argument is set, then the qt_add_translations() command ignores the specified directory and generates the plurals .ts file in the project's source directory. For example,
qt_add_translations( apptranslations_plurals TS_FILE_DIR translations PLURALS_TS_FILE # Ignores the set TS_FILE_DIR directory translations_plurals_en.ts)
In order to generate the plurals .ts file in the same directory set by TS_FILE_DIR, the directory needs to be specified explicitly in the PLURALS_TS_FILE argument. For example,
qt_add_translations( apptranslations_plurals TS_FILE_DIR translations PLURALS_TS_FILE translations/translations_plurals_en.ts)
To reproduce issue, build attached project with update_translations.
Attachments
Issue Links
- is duplicated by
-
QTBUG-132099 qt_add_translations problems with PLURAL_TS_FILES
- Closed