Namespaces
Variants
Actions
Revision as of 13:55, 13 June 2012 by hamishwillee (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Lupdate with qml files

Jump to: navigation, search
Article Metadata

Article
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

138 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved