1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Preferences: Fixed showing current language in languages menu.

This commit is contained in:
nowrep 2013-02-24 13:20:54 +01:00
parent d46d5c6786
commit 021e6315e0

View File

@ -373,14 +373,14 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
//OTHER //OTHER
//Languages //Languages
QString activeLanguage; QString activeLanguage = mApp->currentLanguage();
if (!mApp->currentLanguageFile().isEmpty()) { if (!activeLanguage.isEmpty() && activeLanguage != QLatin1String("en_US")) {
activeLanguage = mApp->currentLanguageFile();
QLocale locale(activeLanguage); QLocale locale(activeLanguage);
QString country = QLocale::countryToString(locale.country()); QString country = QLocale::countryToString(locale.country());
QString language = QLocale::languageToString(locale.language()); QString language = QLocale::languageToString(locale.language());
ui->languages->addItem(language + ", " + country + " (" + activeLanguage + ")", activeLanguage); ui->languages->addItem(language + ", " + country + " (" + activeLanguage + ")", activeLanguage);
} }
ui->languages->addItem("English (en_US)"); ui->languages->addItem("English (en_US)");
QDir lanDir(mApp->TRANSLATIONSDIR); QDir lanDir(mApp->TRANSLATIONSDIR);