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

lupdate truncates JavaScript template literal strings

    XMLWordPrintable

Details

    • 9d323c976 (dev), d011e3c51 (dev)

    Description

      Code

      import QtQuick
      
      Window {
          id: root
          width: 640
          height: 480
          visible: true
      
          Column {
              Text {
                  text: qsTr("Width: %1 Height: %2").arg(root.width).arg(root.height)
              }
              Text {
                  text: qsTr(`Width: ${root.width} Height: ${root.height}`)
              }
          }
      }
      

       

      lupdate output

      • The first line is processed as <source>Width: %1 Height: %2</source> (Expected)
      • The second line is processed as <source>Width: </source> (Not Expected)
      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE TS>
      <TS version="2.1">
      <context>
          <name>Main</name>
          <message>
              <location filename="Main.qml" line="11"/>
              <source>Width: %1 Height: %2</source>
              <translation type="unfinished"></translation>
          </message>
          <message>
              <location filename="Main.qml" line="14"/>
              <source>Width: </source>
              <translation type="unfinished"></translation>
          </message>
      </context>
      </TS>
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-127527
          # Subject Branch Project Status CR V

          Activity

            People

              masoud.jami Masoud Jami
              skoh-qt Sze Howe Koh
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes