Lupdate with qml files

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Created: krix (20 Jun 2011)
Last edited: hamishwillee (13 Jun 2012)

To run the lupdate tool on .qml files right from the Qt-Creator, .qml files need to be added to the .pro file under the SOURCES section. Adding .qml to this section is however unwanted for the non-cpp files. Therefore, the following trick should be used:

(by the courtesy of @snowpong) simply create a conditional which never kicks in, list your QML files in SOURCES += http://pastebin.com/ygZPczS1

   evil_hack_to_fool_lupdate {
   SOURCES += \
   qml/Splash.qml \
   qml/Login.qml \

Now you can use the script from Tools > External > Linguist > Update translations (lupdate) and files for languages marked in the TRANSLATIONS section of the .pro file will be generated

This page was last modified on 13 June 2012, at 13:55.
101 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.