I know this question is pretty old but I will still append my solution. This ends up with several single translation files, but this is what I actually wanted to reach.You can then run lupdate
on the main project file and it will generate/update the .ts files in every subdir.
Therefore, in every pro file you must specify a TARGET
and this project has to be in a folder with exactly this name.
In every project file I included one shared pri file:
# Including shared configurations
!include(../common/shared.pri) {
error(shared.pri not found)
}
Then, in this pri file:
# Including traslations for every language
exists($$_PRO_FILE_PWD_/translations/) {
TRANSLATIONS += $$_PRO_FILE_PWD_/translations/$${TARGET}_de_DE.ts
message(> Found Translations for $${TARGET}: $$_PRO_FILE_PWD_/translations/$${TARGET}_de_DE.ts)
}
For more translated languages you can add a little bit of logic.