[Qt-qml] Creating single translation file from multiple qml files

kai.koehne at nokia.com kai.koehne at nokia.com
Thu Sep 22 17:02:56 CEST 2011


> -----Original Message-----
> From: qt-qml-bounces+kai.koehne=nokia.com at qt.nokia.com [mailto:qt-
> qml-bounces+kai.koehne=nokia.com at qt.nokia.com] On Behalf Of ext Matti
> Mäki
> Sent: Tuesday, September 13, 2011 10:23 AM
> To: qt-qml at qt.nokia.com
> Subject: [Qt-qml] Creating single translation file from multiple qml files
> 
> Hi,
> 
> In a meego example of QML localisation[1] lupdate was run with *.qml
> argument. I tried this on my Qt SDK on Win XP, lupdate.exe from Qt 4.7.3
> Desktop:
> 
> C:\development\Qt\myproject>
> C:\QtSDK\Desktop\Qt\4.7.3\mingw\bin\lupdate.exe *.qml -ts qml-
> translations.en.ts qml-translations.fi.ts
> 
> which results in
> 
> "lupdate error: File '*.qml' does not exist"
> 
> Do I have to create ts-file for each qml separately (35+ files) or is there A
> Better Way(TM)? It might be quite a mess to keep all those files up to date
> during development. It is easy to setup a script for creating the ts-files but
> managing the actual translation work would be a lot easier with single file.

You can let lupdate run through all files in a directory tree, e.g.

lupdate . -ts translations.ts

to check all cpp, ui, qml ... files in current directory + subdirectories.

If you only want to get strings from .qml files:

lupdate . -extensions qml -ts translations.ts
 
Regards

Kai

> /matti
> 
> [1] http://wiki.meego.com/QML/Internationalisation
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml


More information about the Qt-qml mailing list