Use the old way of finding translations for OSX.
authorBas Pape <baspape@gmail.com>
Wed, 28 Aug 2013 18:32:21 +0000 (20:32 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 10 Oct 2013 18:11:35 +0000 (20:11 +0200)
Many OSX users reported their clients being in Japanese, rather than
English, since 0.9.0, which turned out to be due to
QSystemLocale::query for QSystemLocal::UILanguages (internally done by
Qt if a QLocale is passed to QTranslator::load) returning 'en', rather
than the proper local form (e.g. 'en-US').
As 'en' has no translation, the second language got picked up, which
happened to be 'ja', which does have a translation.

Fixes #1233 (but reintroduces #1194 on OSX)

src/common/quassel.cpp

index 62b8b3a..e081775 100644 (file)
@@ -495,7 +495,7 @@ void Quassel::loadTranslation(const QLocale &locale)
     quasselTranslator->setObjectName("QuasselTr");
     qApp->installTranslator(quasselTranslator);
 
-#if QT_VERSION >= 0x040800
+#if QT_VERSION >= 0x040800 && !defined Q_OS_MAC
     bool success = qtTranslator->load(locale, QString("qt_"), translationDirPath());
     if (!success)
         qtTranslator->load(locale, QString("qt_"), QLibraryInfo::location(QLibraryInfo::TranslationsPath));