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. Template "subdirs" and translations
Forum Updated to NodeBB v4.3 + New Features

Template "subdirs" and translations

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 4.9k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    torsten
    wrote on last edited by
    #1

    Hello,

    I have splitted a larger project with the template "subdirs" into several projects. Now, i want to translate the complete application with generating one big translation file. Is this possible?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      torsten
      wrote on last edited by
      #2

      I've found a more or less practicable solution:

      First, add the translations you want to have in the related .pri or .pro file:

      @NAME = "dialog"
      TRANSLATIONS += $$PWD/../$$NAME/de.ts
      $$PWD/../$$NAME/en.ts@

      Then, i've created a new directory called translations in the base directory.
      Finally i've wrote a cmd line script (for windows) with this content:

      @lupdate dialog\dialog.pri
      lupdate main\main.pri
      lupdate -recursive dialog main -source-language de_DE -target-language de_DE -ts translations\de_DE.ts
      lupdate -recursive dialog main -source-language de_DE -target-language en_US -ts translations\en_EN.ts
      del dialog*.ts
      del main*.ts@

      This Script first calls lupdate for every subproject (line 1-2).
      Than, call a recursive lupdate scan for every language you want to have (line 3-4)
      In the last lines delete the ts files in the subdirs... they are now unneeded.
      You can safely call this script, the files in the translation dir are upated.

      Hope that will help....

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JulienMaille
        wrote on last edited by
        #3

        Someone could confirm that it's not possible to use lupdate on a TEMPLATE = subdirs?
        I am facing the same problem and would like to avoid the batch solution

        1 Reply Last reply
        0

        • Login

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