forked from qt-creator/qt-creator
Fix default ui language on Linux.
On systems where uiLanguages returns something containing "-" (e.g. "de-DE", see QTBUG-25973) Change-Id: Ibe2db6a7a6ed893795e3f3110b33c39225bed751 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
committed by
Oswald Buddenhagen
parent
23fcc1a823
commit
6026a4a51c
@@ -283,7 +283,8 @@ int main(int argc, char **argv)
|
||||
uiLanguages.prepend(overrideLanguage);
|
||||
const QString &creatorTrPath = QCoreApplication::applicationDirPath()
|
||||
+ QLatin1String(SHARE_PATH "/translations");
|
||||
foreach (const QString &locale, uiLanguages) {
|
||||
foreach (QString locale, uiLanguages) {
|
||||
locale.replace(QLatin1Char('-'), QLatin1Char('_')); // work around QTBUG-25973
|
||||
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