I have a large project with one qmake project file defining all project components using a 'subdirs' template. Currently I define translation files in the qmake files of each sub-project. This results in separate translation files for each sub-project, which quickly becomes too cumbersome to maintain.
How do I get lupdate to produce a single translation file containing all translation strings for all of the sub-projects?
Qt Linguist is a tool for adding translations to Qt applications. Once you have installed Qt, you can start Qt Linguist in the same way as any other application on the development host.
First of all split all your pro files into pro and pri files. Then put all the pri files into one global pro file and generate the language file for that pro file.
Special language pro file looks like this:
TEMPLATE = app
DEPENDPATH += Proj1 Proj2 Proj3
include(Proj1/Proj1.pri)
include(Proj2/Proj2.pri)
include(Proj3/Proj3.pri)
TRANSLATIONS = en.ts fr.ts it.main.ts ja.main.ts nl.main.ts
A script can easily generate this project language file for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With