Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-114528

Support setting the translation context for a QML file

    XMLWordPrintable

Details

    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lugerard Lucie Gerard
            con Eike Ziller
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: