From 138c3dc3cb7ecbf823cba2c8d0314175032c6c5e Mon Sep 17 00:00:00 2001 From: Nick Tiskov Date: Sat, 5 Oct 2013 20:28:26 +0400 Subject: [PATCH] Fix translations bundled with Qt. --- src/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 0c06d3c73..f4dfa794b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -264,8 +264,11 @@ int main(int argc, char *argv[]) { pref.setLocale(locale); } if (qtTranslator.load( - QString::fromUtf8("qt_") + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath) - )) { +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) + QString::fromUtf8("qtbase_") + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath)) || + qtTranslator.load( +#endif + QString::fromUtf8("qt_") + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { qDebug("Qt %s locale recognized, using translation.", qPrintable(locale)); }else{ qDebug("Qt %s locale unrecognized, using default (en).", qPrintable(locale));