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

Qt lingust, Translation file broken when qsTrId contain <

    XMLWordPrintable

Details

    • All
    • 5859c5b4a (dev), 52f1dd37d (6.5), a576b5a01 (6.6)

    Description

      For conveniance, i add arrow "<==" translation to later use unicode in .ts file. I add this text in a qml file using 

      qsTrId(...) 

      But after updating the ts file to add this text, the file can no longer be open with QtLingust displaying an error

      sans_titre_fr_FR.ts:6:18: Unexpected '<'. 
      4:<context>
      5:    <name></name>
      6:    <message id="<==">
      7:        <location filename="main.qml" line="8"/>
      8:        <source></source>
      9:        <translation type="unfinished"></translation>
      10:    </message>
      11:</context> 

      I forgot to add that it also break lupdate and lrelease forcing to manually correct the file.

       

      Attachments

        1. main.cpp
          0.6 kB
        2. main.qml
          0.1 kB
        3. qml.qrc
          0.1 kB
        4. sans_titre_fr_FR.ts
          0.5 kB
        5. sans_titre.pro
          0.6 kB
        For Gerrit Dashboard: QTBUG-112677
        # Subject Branch Project Status CR V

        Activity

          People

            lugerard Lucie Gerard
            dalverny Sébastien Dalverny
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes