fix: i18n rename 不全 (#77)

This commit is contained in:
源文雨 2023-04-16 17:30:50 +08:00 committed by GitHub
parent f47627c650
commit 4ce152827c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ import os
def load_language_list(language):
with open(f"./locale/{language}.json", "r", encoding="utf-8") as f:
with open(f"./i18n/{language}.json", "r", encoding="utf-8") as f:
language_list = json.load(f)
return language_list
@ -15,7 +15,7 @@ class I18nAuto:
language = "auto"
if language == "auto":
language = locale.getdefaultlocale()[0]
if not os.path.exists(f"./locale/{language}.json"):
if not os.path.exists(f"./i18n/{language}.json"):
language = "en_US"
self.language = language
print("Use Language:", language)