From 16575f7aef840b6aae0dc767468ab713fbcfd7a6 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 9 Nov 2010 16:39:20 +0200 Subject: Localize .loc and .pkg content based on TRANSLATIONS If developer specifies "CONFIG += localize_deployment" in .pro file, the generated .loc and .pkg will now use translatable strings from .ts files defined in TRANSLATIONS. The .ts files must have an underscore and Qt language code at the end of the filename body to be compatible with deployment localization. E.g. myapp_en.ts. Running lupdate will generate these entries into .ts files: - Application short caption - Application long caption - Package name - Smart installer package name Task-number: QTBUG-13917 Reviewed-by: Oswald Buddenhagen Reviewed-by: Janne Anttila Reviewed-by: axis --- tools/linguist/lupdate/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/linguist/lupdate/main.cpp') diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index 49906e0356..76a875631b 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -350,6 +350,10 @@ static void processProjects( ProFileEvaluator visitor; visitor.setVerbose(options & Verbose); + QHash lupdateConfig; + lupdateConfig.insert(QLatin1String("CONFIG"), QStringList(QLatin1String("lupdate_run"))); + visitor.addVariables(lupdateConfig); + QFileInfo pfi(proFile); ProFile pro(pfi.absoluteFilePath()); if (!visitor.queryProFile(&pro) || !visitor.accept(&pro)) { -- cgit v1.2.1