perf: 完善 yaml 加载

This commit is contained in:
Eric
2023-12-05 17:14:35 +08:00
committed by Eric_Lee
parent d2429f7883
commit e193d7a942
2 changed files with 2 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ def translate(key, i18n, lang):
return lang_data.get(lang, key)
def yaml_load_with_i18n(stream, lang):
def yaml_load_with_i18n(stream, lang=None):
ori_text = stream.read()
stream = io.StringIO(ori_text)
yaml_data = yaml.safe_load(stream)