QTfrontend/model/MapModel.cpp
changeset 13279 e381f5260b45
parent 12691 d5e09024d722
--- a/QTfrontend/model/MapModel.cpp	Fri Mar 23 03:37:07 2018 +0100
+++ b/QTfrontend/model/MapModel.cpp	Sat Mar 24 00:26:39 2018 +0100
@@ -129,18 +129,19 @@
             {
                 // get locale
                 QSettings settings(datamgr.settingsFileName(), QSettings::IniFormat);
-                QString locale = settings.value("misc/locale", "").toString();
-                if (locale.isEmpty())
-                    locale = QLocale::system().name();
+                QString locale = QLocale().name();
 
                 QSettings descSettings(QString("physfs://Maps/%1/desc.txt").arg(map), QSettings::IniFormat);
                 descSettings.setIniCodec("UTF-8");
                 desc = descSettings.value(locale, QString()).toString();
-                // If not found, try with lanague-only code
+                // If not found, try with language-only code
                 if (desc.isEmpty())
                 {
                     QString localeSimple = locale.remove(QRegExp("_.*$"));
                     desc = descSettings.value(localeSimple, QString()).toString();
+                    // If still not found, use English
+                    if (desc.isEmpty())
+                        desc = descSettings.value("en", QString()).toString();
                 }
                 desc = desc.replace("_n", "\n").replace("_c", ",").replace("__", "_");
             }