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

lupdate behaves weird on different OS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.2.3, 6.2
    • Tools: Linguist
    • None
    • Android, Linux/Other display system, macOS, Windows

    Description

      Hello folks,

      I found this weird behavior of lupdate tool during creating my strict CI automation: the sources have to be completely prepared for build, so I do not expect any updates and make the src directory read only. After that I run `qt-cmake src -B build` and `cmake --build build` commands (in general) and expect it to be done successfully if everything is fine and fail if some translation is incorrect or not updated.

      The issue is:

      • On windows lupdate tries to write ts files even if they are no need in modification of ts files. If they are not requiring modification - lupdate should not try to write them.
      • On the other systems (macos, linux) it looks like lupdate doesn't try to update the ts files at all - even if there is missed messages (and this is a bug too, because developer have to update them if the sources was updated with new messages).

      I tested it on 3 sample applications (console, widgets, quick) that is available if you create the new project in QtCreator (6.0.2). They contain just empty ts files like that by default:

      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE TS>
      <TS version="2.1" language="ru_RU"></TS>
      
      • During build widgets on windows lupdate tries to make it like that:
        <?xml version="1.0" encoding="utf-8"?>
        <!DOCTYPE TS>
        <TS version="2.1" language="ru_RU">
        <context>
            <name>MainWindow</name>
            <message>
                <location filename="mainwindow.ui" line="14"/>
                <source>MainWindow</source>
                <translation type="unfinished"></translation>
            </message>
        </context>
        </TS>
        
      • For console app build on windows - no changes on windows, but still tries to write the file.
      • For quick app build on windows it surprisingly do not try to modify anything. I checked the differences in CMakeFile.txt and seems it's not setting the translation files so they just skipped (another bug, but in qtcreator I suppose)

      So folks, could you please check and make it more clear for me?

      Thank you

      Attachments

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

        Activity

          People

            kkohne Kai Köhne
            rabits Rabit
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes