Reputation: 6171
I'm using QUiloader to dynamically load .ui files which are not listed in the .pro project file.
So far so good. The issue is that lupdate
only translates what it see under the .pro file. I'm running it with the following command:
lupdate project.pro -ts tr_language.ts
So I'm missing all the text in the .ui file.
I managed to discover lupdate can translate the widget.ui if I push the following command:
lupdate widget.ui -ts tr_language.ts
Doing so I can get the .ui stuff translated.
What's the problem? I can do only one of the above mentioned approaches, as they overwrite each other.
Is there a smarter approach for this issue?
Upvotes: 0
Views: 107
Reputation: 6080
Is there a smarter approach for this issue?
Simple: Do not overwrite the file. Just use
lupdate widget.ui -ts tr_widget_language.ts
or any other name for your ts. This way you have two files which do not overwrite each other.
After that you can use:
lrelease [options] ts-files [-qm qm-file]
It mentions ts-files as argument. With this you should be able to compile multiple *.ts files into one *.qm File.
Otherwise you would have to load the second *.qm File in your application.
Upvotes: 1