[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

@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- some installed apps were not being displayed as installed in the search results
- UI
- categories filter being displayed during ongoing actions
- settings: not matching the default system locale with the available options
### Improvements
- AUR

View File

@@ -11,7 +11,7 @@ class AppImage(SoftwarePackage):
def __init__(self, name: str = None, description: str = None, github: str = None, source: str = None, version: str = None,
url_download: str = None, url_icon: str = None, url_screenshot: str = None, license: str = None, author: str = None,
categories=None, icon_path: str = None, installed: bool = False,
url_download_latest_version: str = None):
url_download_latest_version: str = None, **kwargs):
super(AppImage, self).__init__(id=name, name=name, version=version, latest_version=version,
icon_url=url_icon, license=license, description=description,
installed=installed)

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