From f8837179265ee6899e1c6a1f035beeac0843db3a Mon Sep 17 00:00:00 2001 From: wangyi <1521966572@qq.com> Date: Sat, 13 Jul 2024 10:52:41 +0800 Subject: [PATCH] =?UTF-8?q?windows=E4=B8=8B=E4=BD=BF=E7=94=A8vscode?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5linux=E6=9C=8D=E5=8A=A1=E5=99=A8=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=9C=A8=E9=A1=B9=E7=9B=AE=E7=9B=AE=E5=BD=95=E4=B8=8B?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=BF=90=E8=A1=8C=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8C=BA=E4=BD=8D=E7=BD=AE=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=89=BE=E4=B8=8D=E5=88=B0=20=E2=80=98./i18n/locale/en=5FUS.js?= =?UTF-8?q?on=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/i18n/i18n.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/i18n/i18n.py b/tools/i18n/i18n.py index 00e91bf3..8eeb0c8a 100644 --- a/tools/i18n/i18n.py +++ b/tools/i18n/i18n.py @@ -2,6 +2,10 @@ import json import locale import os +# Get the directory where the script file is located +script_dir = os.path.dirname(os.path.abspath(__file__)) +# Change the current working directory to the directory where the script is located +os.chdir(os.path.join(script_dir,'../../')) def load_language_list(language): with open(f"./i18n/locale/{language}.json", "r", encoding="utf-8") as f: