# HG changeset patch # User Wuzzy # Date 1520961937 -3600 # Node ID d2f8dafdb0809457ca80217297954692272622de # Parent 2148b493836ec92d903b7947227fefa1d3a004d1 Frontend: Fix built-in Qt translations not loaded properly diff -r 2148b493836e -r d2f8dafdb080 QTfrontend/main.cpp --- 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);