Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.4
-
None
-
-
685037c07 (dev), ce6ed5a73 (dev), 3d691abe7 (6.6), dfd9939ad (6.6)
Description
This is more a conceptional problem than a bug.
Qt's i18n documentation suggests to create a plural-only translation of the project's native language, see https://doc.qt.io/qt-5/i18n-source-translation.html#handling-plurals
This requires to run lupdate with the -pluralonly argument for the native language and without that argument for all other languages:
lupdate -pluralonly -ts myproject_en.ts ... lupdate -ts myproject_de.ts myproject_da.ts myproject_pl.ts ...
That means the project's sources are scanned twice, doubling the time that's needed to update the .ts files.
Possible solution:
- specify plural-only .ts files on the command line with -pluralonly-ts myproject_en.ts
- or somehow post-process an updated .ts file by removing the non-plural messages from there