QTfrontend/main.cpp
branchqt5transition
changeset 13182 d2f8dafdb080
parent 13180 3961f9d0c7e4
child 13188 16b375b21af1
--- a/QTfrontend/main.cpp	Tue Mar 13 16:57:20 2018 +0100
+++ b/QTfrontend/main.cpp	Tue Mar 13 18:25:37 2018 +0100
@@ -355,11 +355,12 @@
             if(cc == "C")
                 cc = HWApplication::inputMethod()->locale().name();
         }
+        qDebug("Frontend uses locale: %s", qPrintable(cc));
 
         // Load locale files into translators
-        if (!TranslatorHedgewars.load(QString("physfs://Locale/hedgewars_%1").arg(cc)))
+        if (!TranslatorHedgewars.load(QString("hedgewars_%1").arg(cc), QString("physfs://Locale")))
             qWarning("Failed to install Hedgewars translation (%s)", qPrintable(cc));
-        if (!TranslatorQt.load(QString("%1/qt_%2").arg(QLibraryInfo::location(QLibraryInfo::TranslationsPath), cc)))
+        if (!TranslatorQt.load(QString("qt_%1").arg(cc), QString(QLibraryInfo::location(QLibraryInfo::TranslationsPath))))
             qWarning("Failed to install Qt translation (%s)", qPrintable(cc));
         app.installTranslator(&TranslatorHedgewars);
         app.installTranslator(&TranslatorQt);