PDA

View Full Version : Extracting QT translations from sources



mcosta
7th February 2010, 11:18
Hi all,

up to a few versions ago of the Qt sources there was a file called qt_untranslated.ts that I used to translate the latest Qt version in Italian.

In the 4.5.x and above, this file doesn't exists.

How can I generate this file (or qt_it.ts) from sources?

Thanks.

bender86
9th February 2010, 19:39
I, too, had the very same problem (even same language). Try adding "it" to QT_TS variabile in %QTSOURCEDIR%/translations/translations.pri, then run make ts-qt from %QTSOURCEDIR% (maybe you will have to run qmake before). If you put your older qt_it.ts in that directory it will be updated.
You can also look at others targets inside the file for building translations for other components (make ts-designer, make ts-assistant, ...). Anyway, I never managed to translate designer.

mcosta
12th February 2010, 09:47
hello,

I had some problems in the compilation of tools with MinGW but now is OK.

thank you

billatthemovies
26th April 2010, 17:28
This is one of the few times where searching for an answer to one of Qt's quirks actually paid off. I did not use this solution as written because I would have had to run qmake but I did see the command string used to create/update the existing .ts files. I copied it to the clipboard, modified it with the names of my existing qt_*.xlf files and executed it. My older XLIFF files were updated.

We do not use .ts files but .xlf files. Qt supports XLIFF and a variant of this solution worked with them.