From 67a226c00a78ca4f3c63e5818a9306e6f7257d10 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 20 Sep 2016 12:42:59 -0700 Subject: [PATCH] Language preference: search for the locale instead of the language string And make sure that you use the language / country delimiter that we use in the file system Signed-off-by: Dirk Hohndel --- desktop-widgets/preferences/preferences_language.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop-widgets/preferences/preferences_language.cpp b/desktop-widgets/preferences/preferences_language.cpp index 64e937aef..7484bbe96 100644 --- a/desktop-widgets/preferences/preferences_language.cpp +++ b/desktop-widgets/preferences/preferences_language.cpp @@ -37,7 +37,7 @@ void PreferencesLanguage::refreshSettings() ui->dateFormatEntry->setText(prefs.date_format); ui->shortDateFormatEntry->setText(prefs.date_format_short); QAbstractItemModel *m = ui->languageDropdown->model(); - QModelIndexList languages = m->match(m->index(0, 0), Qt::UserRole, prefs.locale.language); + QModelIndexList languages = m->match(m->index(0, 0), Qt::UserRole, QString(prefs.locale.lang_locale).replace("-", "_")); if (languages.count()) ui->languageDropdown->setCurrentIndex(languages.first().row()); }