Details
-
Suggestion
-
Resolution: Fixed
-
P2: Important
-
6.5.2
-
None
-
-
ababa6b40 (dev), ff6eca008 (dev), 17680273b (dev), ffe105e1a (dev)
Description
It's common for the source language to be English. In such cases you typically want to specify -pluralonly when generating/updating the .ts file for English, to only leave plural forms for "translation" to English. You don't want to give this flag when generating the .ts files for other languages.
But the new target-based qt_add_lupdate and qt_add_translations, which are now the recommended helpers to use in favour of the deprecated file/folder based qt_create_translation, only allows specification of one set of lupdate options for all given output .ts files.
It's also not possible to work around this limitation by calling qt_add_lupdate twice, once for your English .ts file and once for the .ts files for other languages, unless you (a) give up on the convenience of having sources deduced from the target and specify all source files manually and (b) create a dummy empty target just to have something to pass to the second call, since otherwise it will try to create a ${target}_lupdate target that already exists.
It would be good if there was a better way to handle this use case.