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

QT_TR_NOOP() strings are not returned as translated from qsTr() called from another QML document

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7
    • Core: Locales (i18n)
    • None
    • Windows

    Description

      Example to reproduced the issue attached.

      With the code below only the qsTr() using the property defined with QT_TR_NOOP() returns the translated string

       

      import QtQuick
      import TranslationsQsTrNoOp
      Window {
          id: root
          property string tr_text: QT_TR_NOOP("Same QML doc")
          Component.onCompleted: function() { Qt.uiLanguage = "fr" }
          MyComponent { id: mycompo }
          Column {
              Text { text: qsTr(root.tr_text) }
              Text { text: qsTr(mycompo.tr_text) } // not translated
              Text { text: qsTr(Properties.tr_text) } // not translated
          }
      }
      

       

       

      Attachments

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

        Activity

          People

            kkohne Kai Köhne
            pijaouen Pierre Jaouen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes