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

lupdate does not find calls to qsTr() with non-literal plural argument

    XMLWordPrintable

Details

    • e53cd1a6c32e2de719e82a1e0f25b104a0fee995

    Description

      Given the code below

      Item {
        property int number: 10
      
        Text {
          id: literal
          text: qsTr("literal number is %n", "", 10)
        }
        Text {
          text: qsTr("non-literal number is %n", "", number)
          anchors.top: literal.bottom
        }
      }
      

      lupdate will only find the first message as plural, the other one singular. The relevant code is http://qt.gitorious.org/qt/qt/blobs/4.7/tools/linguist/lupdate/qdeclarative.cpp#line106 and http://qt.gitorious.org/qt/qt/blobs/4.7/tools/linguist/lupdate/qdeclarative.cpp#line139 where lupdate casts the expression to a NumericLiteral, which obviously fails.

      Attachments

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

        Activity

          People

            brasser Michael Brasser (closed Nokia identity) (Inactive)
            saviq MichaƂ Sawicz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes