Details
-
Suggestion
-
Resolution: Fixed
-
P2: Important
-
6.5.0
-
None
-
704cb9e29 (dev), d6e0d5630 (dev), d7745594b (dev), 8469be276 (dev), a1f82b34b (dev), 6599fd644 (dev), faa49d960 (dev)
Description
By default qsTr uses the qml file name as the context. When a different context is desired, it needs to be spelled out for each translatable string with qsTranslate, which is cumbersome if all translatable strings in a qml files should use the same, different context.
It would be good if there was an easier way to specify the translation context for the whole file, so one could specify it once, and then just use qsTr("mystring") throughout the file.
This must be both understood by linguist/lupdate and at runtime by qsTr. It probably could be a pragma or specific attribute/property of the item.