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

qsTr not work with conditional operator

    XMLWordPrintable

    Details

    • Platform/s:
      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

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            alessandromiorelli alessandro miorelli
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes