# HG changeset patch
# User unc0rr
# Date 1369343561 -14400
# Node ID c58a9829e1ccb0154321d545f86c421b5a0d99a8
# Parent  8edc79df026da61df8b329a6b2c6fca020faae77
Store suffix of .qm files instead of locale name

diff -r 8edc79df026d -r c58a9829e1cc QTfrontend/ui/page/pageoptions.cpp
--- a/QTfrontend/ui/page/pageoptions.cpp	Thu May 23 09:33:36 2013 -0400
+++ b/QTfrontend/ui/page/pageoptions.cpp	Fri May 24 01:12:41 2013 +0400
@@ -587,11 +587,12 @@
             CBLanguage = new QComboBox(groupMisc);
             groupMisc->layout()->addWidget(CBLanguage, 0, 1);
             QStringList locs = DataManager::instance().entryList("Locale", QDir::Files, QStringList("hedgewars_*.qm"));
-            CBLanguage->addItem(QComboBox::tr("(System default)"), QString(""));
+            CBLanguage->addItem(QComboBox::tr("(System default)"), QString());
             for(int i = 0; i < locs.count(); i++)
             {
-                QLocale loc(locs[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1"));
-                CBLanguage->addItem(QLocale::languageToString(loc.language()) + " (" + QLocale::countryToString(loc.country()) + ")", loc.name());
+                QString lname = locs[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1");
+                QLocale loc(lname);
+                CBLanguage->addItem(QLocale::languageToString(loc.language()) + " (" + QLocale::countryToString(loc.country()) + ")", lname);
             }
 
             QLabel *restartNoticeLabel = new QLabel(groupMisc);