diff options
author | Liang Qi <liang.qi@digia.com> | 2012-11-23 11:06:46 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2012-11-27 11:04:41 +0100 |
commit | deeef5308f1b3d59581aa1a65e781d434719a40d (patch) | |
tree | 4a16ebfec8298da9768fa7d797bca878a346eb2c /src/app | |
parent | 0f0fa3c27016424b7bff6d43c0bf0ce6f721be3c (diff) | |
download | qt-creator-deeef5308f1b3d59581aa1a65e781d434719a40d.tar.gz |
Load Chinese translations correcly
Load Simplified and Traditional Chinese correctly via System
Language option.
This change is only valid with Qt 5.
Task-number: QTCREATORBUG-8253
Change-Id: I068c96d26e97ff534004ae53747dd6fc460edee2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp index 557678fafc..95c1a1e532 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -356,7 +356,11 @@ int main(int argc, char **argv) const QString &creatorTrPath = QCoreApplication::applicationDirPath() + QLatin1String(SHARE_PATH "/translations"); foreach (QString locale, uiLanguages) { +#if (QT_VERSION >= 0x050000) + locale = QLocale(locale).name(); +#else locale.replace(QLatin1Char('-'), QLatin1Char('_')); // work around QTBUG-25973 +#endif if (translator.load(QLatin1String("qtcreator_") + locale, creatorTrPath)) { const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); const QString &qtTrFile = QLatin1String("qt_") + locale; |