forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user