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

[Regr: 6.9.2 -> 6.10] Qt 6.10 BETA 3: lupdate does not include context names in ts files

XMLWordPrintable

    • Windows

      The lupdate tool itself as well as the CMake target remove the context name from our ts files. It is working fine with 6.9.2 - but with 6.10 BETA 3 all context values are removed.

      For example one of our ts-files:

      • With Qt 6.9.2
        <?xml version="1.0" encoding="utf-8"?>
        <!DOCTYPE TS>
        <TS version="2.1" language="de" sourcelanguage="xxa">
        <context>
            <name>ScannerDemo</name>
            <message id="SD_AI">
                <location filename="../../src/uiModel.cpp" line="303"/>
                <source>AI</source>
                <extracomment>GS1 AI (application identifier)</extracomment>
                <translation type="unfinished">AI</translation>
            </message>
        
      • With Qt 6.10 BETA 3
        <?xml version="1.0" encoding="utf-8"?>
        <!DOCTYPE TS>
        <TS version="2.1" language="de" sourcelanguage="xxa">
        <context>
            <name></name>
            <message id="SD_AI">
                <location filename="../../src/uiModel.cpp" line="303"/>
                <source>AI</source>
                <extracomment>GS1 AI (application identifier)</extracomment>
                <translation type="unfinished">AI</translation>
            </message>
        

       
      This happens due to the fact that we use a named translation context as well as an identifier. For example:

                      //= SD_BUTTON_APPLY
                      text: qsTranslate("ScannerDemo", "Apply")
      

      If we remove the identifier the generated ts file contains a new context with name ScannerDemo in Qt 6.10 BETA3.

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

            masoud.jami Masoud Jami
            n.wallmeier Nico Wallmeier
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: