From 4ce152827c484ba450ebcba884ada4ab5b651ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sun, 16 Apr 2023 17:30:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20i18n=20rename=20=E4=B8=8D=E5=85=A8=20(#7?= =?UTF-8?q?7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n.py b/i18n.py index bb9e585..d535482 100644 --- a/i18n.py +++ b/i18n.py @@ -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)