From fafd0c26051c4e616cbaab1066135a57256f2d52 Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Tue, 9 Jun 2020 14:22:16 -0700 Subject: [PATCH] Don't try to load Qt en_Us loc --- src/QGCApplication.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc index 1ba846868..43ed421cd 100644 --- a/src/QGCApplication.cc +++ b/src/QGCApplication.cc @@ -462,13 +462,13 @@ void QGCApplication::setLanguage() _app->removeTranslator(&_qgcTranslatorJSON); _app->removeTranslator(&_qgcTranslatorSourceCode); _app->removeTranslator(&_qgcTranslatorQtLibs); - if(_qgcTranslatorQtLibs.load("qt_" + _locale.name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { - _app->installTranslator(&_qgcTranslatorQtLibs); - } else { - qCWarning(LocalizationLog) << "Qt lib localization for" << _locale.name() << "is not present"; - } if (_locale.name() != "en_US") { QLocale::setDefault(_locale); + if(_qgcTranslatorQtLibs.load("qt_" + _locale.name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { + _app->installTranslator(&_qgcTranslatorQtLibs); + } else { + qCWarning(LocalizationLog) << "Qt lib localization for" << _locale.name() << "is not present"; + } if(_qgcTranslatorSourceCode.load(_locale, QLatin1String("qgc_source_"), "", ":/i18n")) { _app->installTranslator(&_qgcTranslatorSourceCode); } else { -- 2.22.0