Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    lconvert misses something when merging two *.ts files, depending on the order of the command line

    Tools
    2
    4
    1037
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Moschops last edited by

      The command line:

      /usr/lib/x86_64-linux-gnu/qt4/bin/lconvert --verbose -i gui_jp.ts common_gui_jp.ts -o qa_jp.ts

      makes me a *.ts file, named qa_jp.ts, which contains a particular line. I prove this by grepping:

      > grep "Make a copy of current %1" *.ts
      > common_gui_jp.ts:3089: <source>Make a copy of current %1.</source>
      > qa_jp.ts:4233: <source>Make a copy of current %1.</source>

      Yes, there it is, in both the original common_gui_jp.ts and the new combined qa_jp.ts

      If I repeat with the command line slightly different:

      /usr/lib/x86_64-linux-gnu/qt4/bin/lconvert --verbose -i gui_jp.ts common_gui_jp.ts -o qa_jp.ts

      and then grep again:

      > grep "Make a copy of current %1" *.ts
      > common_gui_jp.ts:3089: <source>Make a copy of current %1.</source>

      It is only in the original. However, lots and lots of lines that are in common_gui_jp.ts are found in the new qa_jp.ts file, so clearly lconvert is not outright skipping the file.

      Does anyone know of some reason lconvert might choose to skip particular lines when merging multiple *.ts files?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        What is the difference between both call to convert ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • M
          Moschops last edited by

          Oops. I got that wrong :)

          The first line is:

          /usr/lib/x86_64-linux-gnu/qt4/bin/lconvert --verbose -i gui_jp.ts common_gui_jp.ts -o qa_jp.ts

          The second line is

          /usr/lib/x86_64-linux-gnu/qt4/bin/lconvert --verbose -i common_gui_jp.ts gui_jp.ts -o qa_jp.ts

          The filenames "common_gui_jp.ts" and "gui_jp.ts" are switched around.

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Then indeed, it looks like the parsing does something fishy. Can you create two minimal ts files that shows the behavior ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • First post
              Last post