Avoid invalid locales in language picker (fixes #7950)
We should probably prune the translations though. (cherry picked from commit 877ae041a419be60d2f094130cf58096dc7f0120)
This commit is contained in:
parent
42a4d154cc
commit
bffecf3833
1 changed files with 4 additions and 1 deletions
|
|
@ -61,7 +61,10 @@ class SettingsGeneralController : SettingsController() {
|
|||
for (i in 0 until parser.attributeCount) {
|
||||
if (parser.getAttributeName(i) == "name") {
|
||||
val langTag = parser.getAttributeValue(i)
|
||||
langs.add(Pair(langTag, LocaleHelper.getDisplayName(langTag)))
|
||||
val displayName = LocaleHelper.getDisplayName(langTag)
|
||||
if (displayName.isNotEmpty()) {
|
||||
langs.add(Pair(langTag, displayName))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue