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

qt_add_lupdate adds extra location for QML files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.0
    • Build System: CMake
    • None
    • All

    Description

      to reproduce, use the QML i18n example:

      $ cp -r ~/Qt/Examples/Qt-6.6.1/qml/qml-i18n .
      $ cd qml-i18n
      $ mkdir build && cd build
      $ ~/Qt/6.7.0/gcc_64/bin/qt-cmake .. && ninja && ninja update_translations && cat ../i18n/qml_fr.ts
      

      this displays at the end

      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE TS>
      <TS version="2.1" language="fr" sourcelanguage="en">
      <context>
          <name>qml-i18n</name>
          <message>
              <location filename="../qml-i18n.qml" line="+21"/>
              <location filename="../build/translated/qml-i18n.qml" line="+21"/>
              <source>Hello</source>
              <translation>Bonjour</translation>
          </message>
      </context>
      </TS>
      

      with 6.6.1 we get

      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE TS>
      <TS version="2.1" language="fr" sourcelanguage="en">
      <context>
          <name>qml-i18n</name>
          <message>
              <location filename="../qml-i18n.qml" line="+21"/>
              <location/>
              <source>Hello</source>
              <translation>Bonjour</translation>
          </message>
      </context>
      </TS>
      

      which has an extra empty location, which is also weird.

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            jbornema Joerg Bornemann
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes