mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-16 09:17:22 +08:00
Opt: Reformat codes using Black
goodbye autopep8
This commit is contained in:
@@ -3,7 +3,7 @@ from typing import Dict
|
||||
from module.config.utils import *
|
||||
from module.webui.config import WebuiConfig
|
||||
|
||||
LANG = 'zh-CN'
|
||||
LANG = "zh-CN"
|
||||
TRANSLATE_MODE = False
|
||||
|
||||
|
||||
@@ -15,13 +15,14 @@ def set_language(s: str, refresh=False):
|
||||
LANG = LANGUAGES[i]
|
||||
break
|
||||
else:
|
||||
LANG = 'en-US'
|
||||
LANG = "en-US"
|
||||
|
||||
WebuiConfig().Language = LANG
|
||||
|
||||
if refresh:
|
||||
from pywebio.session import run_js
|
||||
run_js('location.reload();')
|
||||
|
||||
run_js("location.reload();")
|
||||
|
||||
|
||||
def t(s):
|
||||
@@ -55,8 +56,8 @@ def reload():
|
||||
if lang not in dic_lang:
|
||||
dic_lang[lang] = {}
|
||||
for path, v in deep_iter(read_file(filepath_i18n(lang)), depth=3):
|
||||
dic_lang[lang]['.'.join(path)] = v
|
||||
dic_lang[lang][".".join(path)] = v
|
||||
|
||||
for key in dic_lang["ja-JP"].keys():
|
||||
if dic_lang["ja-JP"][key] == key:
|
||||
dic_lang["ja-JP"][key] = dic_lang["en-US"][key]
|
||||
dic_lang["ja-JP"][key] = dic_lang["en-US"][key]
|
||||
|
||||
Reference in New Issue
Block a user