mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 08:14:16 +02:00
[fix][ui][settings] not matching the default system locale with the available options
This commit is contained in:
@@ -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
|
- some installed apps were not being displayed as installed in the search results
|
||||||
- UI
|
- UI
|
||||||
- categories filter being displayed during ongoing actions
|
- categories filter being displayed during ongoing actions
|
||||||
|
- settings: not matching the default system locale with the available options
|
||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
- AUR
|
- AUR
|
||||||
|
|||||||
@@ -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,
|
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,
|
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,
|
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,
|
super(AppImage, self).__init__(id=name, name=name, version=version, latest_version=version,
|
||||||
icon_url=url_icon, license=license, description=description,
|
icon_url=url_icon, license=license, description=description,
|
||||||
installed=installed)
|
installed=installed)
|
||||||
|
|||||||
@@ -203,7 +203,11 @@ class GenericSettingsManager:
|
|||||||
if core_config['locale']:
|
if core_config['locale']:
|
||||||
current_locale = [l for l in locale_opts if l.value == 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:
|
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 = [l for l in locale_opts if l.value == self.i18n.default_key]
|
||||||
|
|
||||||
current_locale = current_locale[0] if current_locale else None
|
current_locale = current_locale[0] if current_locale else None
|
||||||
|
|||||||
Reference in New Issue
Block a user