mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-26 07:49:50 -05:00
Display country in language list.
But only if the translation specifies one.
This commit is contained in:
parent
6327eaf587
commit
607007f94f
@ -67,8 +67,15 @@ QList<QPair<QString, QString> > Translator::availableLanguages()
|
|||||||
langcode = "en";
|
langcode = "en";
|
||||||
}
|
}
|
||||||
|
|
||||||
languages.append(QPair<QString, QString>(langcode,
|
QLocale locale(langcode);
|
||||||
QLocale::languageToString(QLocale(langcode).language())));
|
QString languageStr = QLocale::languageToString(locale.language());
|
||||||
|
QString countryStr;
|
||||||
|
if (langcode.contains("_")) {
|
||||||
|
countryStr = QString(" (%1)").arg(QLocale::countryToString(locale.country()));
|
||||||
|
}
|
||||||
|
|
||||||
|
QPair<QString, QString> language(langcode, languageStr + countryStr);
|
||||||
|
languages.append(language);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user