summaryrefslogtreecommitdiffstats
path: root/tools/linguist/lrelease
diff options
context:
space:
mode:
authorVictor Ostashevsky <ostash@ostash.kiev.ua>2010-09-01 08:47:54 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-09-01 09:35:44 (GMT)
commit6f143533666ff88c359cb7ad929e35b4decb556f (patch)
treee6fc6af621e74865695f6c24b1e9248954348dde /tools/linguist/lrelease
parent1f5d88dd327be635966ed9e3811c8803a163b2a4 (diff)
downloadQt-6f143533666ff88c359cb7ad929e35b4decb556f.zip
Qt-6f143533666ff88c359cb7ad929e35b4decb556f.tar.gz
Qt-6f143533666ff88c359cb7ad929e35b4decb556f.tar.bz2
Enable loading/generating translations by assistant and linguist tools
QTranslator is installed in tools (qcollectiongenerator, qhelpconverter, qhelpgenerator, lconvert, lrelease, lupdate). Build targets that updates .ts files are changed to include strings from this tools. Merge-request: 2456 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'tools/linguist/lrelease')
-rw-r--r--tools/linguist/lrelease/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/linguist/lrelease/main.cpp b/tools/linguist/lrelease/main.cpp
index b5cff90..003d379 100644
--- a/tools/linguist/lrelease/main.cpp
+++ b/tools/linguist/lrelease/main.cpp
@@ -181,8 +181,14 @@ int main(int argc, char **argv)
#else
QCoreApplication app(argc, argv);
QTranslator translator;
- if (translator.load(QLatin1String("lrelease_") + QLocale::system().name()))
+ QTranslator qtTranslator;
+ QString sysLocale = QLocale::system().name();
+ QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ if (translator.load(QLatin1String("linguist_") + sysLocale, resourceDir)
+ && qtTranslator.load(QLatin1String("qt_") + sysLocale, resourceDir)) {
app.installTranslator(&translator);
+ app.installTranslator(&qtTranslator);
+ }
#endif
ConversionData cd;