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

qsTr not work with conditional operator

XMLWordPrintable

    • All

      If I use qsTr with conditional operator, it doesn't translate the string

      Text{

      property bool checked: true

      text: checked? qsTr("Deselect all") : qsTr("Select all")

      This is the workaround

       Text{

      property bool checked: true

      property string deselectAllString: qsTr("Deselect all")

      property string selectAllString: qsTr("Select all")

      text: checked? deselectAllString : selectAllString

      }

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

            qtqmlteam Qt Qml Team User
            alessandromiorelli alessandro miorelli
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes