[fix][ui][settings] not matching the default system locale with the available options

This commit is contained in:
Vinícius Moreira
2020-03-11 11:01:35 -03:00
parent c212c35905
commit 574db7fda1
3 changed files with 8 additions and 3 deletions

View File

@@ -203,8 +203,12 @@ class GenericSettingsManager:
if core_config['locale']:
current_locale = [l for l in locale_opts if l.value == core_config['locale']]
if not current_locale and self.i18n.default_key:
current_locale = [l for l in locale_opts if l.value == self.i18n.default_key]
if not current_locale:
if self.i18n.current_key:
current_locale = [l for l in locale_opts if l.value == self.i18n.current_key]
if not current_locale:
current_locale = [l for l in locale_opts if l.value == self.i18n.default_key]
current_locale = current_locale[0] if current_locale else None