summaryrefslogtreecommitdiffstats
path: root/qt-models/models.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/models.cpp')
-rw-r--r--qt-models/models.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-models/models.cpp b/qt-models/models.cpp
index 655213e62..5b2f7f779 100644
--- a/qt-models/models.cpp
+++ b/qt-models/models.cpp
@@ -82,11 +82,11 @@ QVariant LanguageModel::data(const QModelIndex &index, int role) const
return QVariant();
switch (role) {
case Qt::DisplayRole: {
- QLocale l(currentString.remove("subsurface_"));
+ QLocale l(currentString.remove("subsurface_").remove(".qm"));
return currentString == "English" ? currentString : QString("%1 (%2)").arg(l.languageToString(l.language())).arg(l.countryToString(l.country()));
}
case Qt::UserRole:
- return currentString == "English" ? "en_US" : currentString.remove("subsurface_");
+ return currentString == "English" ? "en_US" : currentString.remove("subsurface_").remove(".qm");
}
return QVariant();
}