Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. .ts files not getting updated.
Forum Updated to NodeBB v4.3 + New Features

.ts files not getting updated.

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 364 Views
  • 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.
  • U Offline
    U Offline
    unzu
    wrote on last edited by unzu
    #1

    Hello everyone,

    I am trying to write a simple sample program to test the QTranslator and the corresponding tools.
    I have uploaded my progress to github.

    The program compiles and cmake seems call the proper translation tools and finds my .ts files: The console output mentions something about generating the .qm files.

    Generating Translation_de_DE.qm
    [build]   Updating '***/Translation/.build/src/Translation_de_DE.qm'...
    [build]       Generated 0 translation(s) (0 finished and 0 unfinished)
    [build]   Generating Translation_en_150.qm
    [build]   Updating '***/Translation/.build/src/Translation_en_150.qm'...
    [build]       Generated 0 translation(s) (0 finished and 0 unfinished)
    

    The code contains two occurrences of of the tr() function.
    If I understand the documentation correctly, the translation tool should add two corresponding entries to both .ts files automatically so that I can edit and translate them manually.

    I guess that I need to add something to my CMakeLists.txt that I am not aware of.

    Thanks for your time and support!
    Unzu

    Christian EhrlicherC 1 Reply Last reply
    0
    • U unzu

      Hello everyone,

      I am trying to write a simple sample program to test the QTranslator and the corresponding tools.
      I have uploaded my progress to github.

      The program compiles and cmake seems call the proper translation tools and finds my .ts files: The console output mentions something about generating the .qm files.

      Generating Translation_de_DE.qm
      [build]   Updating '***/Translation/.build/src/Translation_de_DE.qm'...
      [build]       Generated 0 translation(s) (0 finished and 0 unfinished)
      [build]   Generating Translation_en_150.qm
      [build]   Updating '***/Translation/.build/src/Translation_en_150.qm'...
      [build]       Generated 0 translation(s) (0 finished and 0 unfinished)
      

      The code contains two occurrences of of the tr() function.
      If I understand the documentation correctly, the translation tool should add two corresponding entries to both .ts files automatically so that I can edit and translate them manually.

      I guess that I need to add something to my CMakeLists.txt that I am not aware of.

      Thanks for your time and support!
      Unzu

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      So did yo actually built e.g. the target 'Translations_lupdate_' as written in the documentation?

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      U 1 Reply Last reply
      2
      • Christian EhrlicherC Christian Ehrlicher

        So did yo actually built e.g. the target 'Translations_lupdate_' as written in the documentation?

        U Offline
        U Offline
        unzu
        wrote on last edited by
        #3

        @Christian-Ehrlicher said in .ts files not getting updated.:

        built e.g. the target 'Translations_lupdate_'

        Oh noes. I never did that.
        I just checked the build directory, there are indeed those targets. I opened the generated solution with visual studio and manually built the targets and indeed - the missing translations now appear in the .ts files.

        When building in VS Code, 'CMake Tools' builds the ALL_BUILD target. I wonder why it does not build the translation targets..?

        Christian EhrlicherC 1 Reply Last reply
        0
        • U unzu

          @Christian-Ehrlicher said in .ts files not getting updated.:

          built e.g. the target 'Translations_lupdate_'

          Oh noes. I never did that.
          I just checked the build directory, there are indeed those targets. I opened the generated solution with visual studio and manually built the targets and indeed - the missing translations now appear in the .ts files.

          When building in VS Code, 'CMake Tools' builds the ALL_BUILD target. I wonder why it does not build the translation targets..?

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Because those target are not meant to be run every time so they're excluded from build all.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          U 1 Reply Last reply
          2
          • Christian EhrlicherC Christian Ehrlicher

            Because those target are not meant to be run every time so they're excluded from build all.

            U Offline
            U Offline
            unzu
            wrote on last edited by
            #5

            Ah I understand.
            I even managed to add them manually via add_dependency in my CMakeLists to the main target and now they are build every single time.

            Thanks for your support!

            1 Reply Last reply
            2
            • U unzu has marked this topic as solved on
            • U unzu has marked this topic as unsolved on
            • U unzu has marked this topic as solved on

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved