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

qsTr not work with conditional operator

    XMLWordPrintable

Details

    • All

    Description

      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

      }

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes