chore(format): run black on dev (#2098)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2024-06-03 15:19:25 +09:00 committed by GitHub
parent 2369f01b1a
commit ae04d4f9cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -1 +1 @@
from .config import singleton_variable, Config from .config import singleton_variable, Config

View File

@ -9,12 +9,13 @@ def load_language_list(language):
language_list = json.load(f) language_list = json.load(f)
return language_list return language_list
@singleton_variable @singleton_variable
class I18nAuto: class I18nAuto:
def __init__(self, language=None): def __init__(self, language=None):
if language in ["Auto", None]: if language in ["Auto", None]:
language = locale.getdefaultlocale( language = locale.getdefaultlocale(
envvars=('LANG', 'LC_ALL', 'LC_CTYPE', 'LANGUAGE') envvars=("LANG", "LC_ALL", "LC_CTYPE", "LANGUAGE")
)[0] )[0]
if not os.path.exists(f"./i18n/locale/{language}.json"): if not os.path.exists(f"./i18n/locale/{language}.json"):
language = "en_US" language = "en_US"