From a9b7cb71e743c62dbe3fdd3dcc9d1236672f3929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B1=BC=E9=A6=99ROS?= <87068644+fishros@users.noreply.github.com> Date: Wed, 4 Sep 2024 23:02:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=9B=BD=E5=AE=B6=E8=87=AA=E5=8A=A8=E5=88=87=E6=8D=A2=E6=BA=90?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.py | 1 + tools/translation/translator.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/install.py b/install.py index fb54d55..4e40482 100644 --- a/install.py +++ b/install.py @@ -55,6 +55,7 @@ def main(): # download base + url_prefix = os.environ.get('FISHROS_URL','http://mirror.fishros.com/install') os.system("wget {} -O /tmp/fishinstall/{} --no-check-certificate".format(base_url,base_url.replace(url_prefix,''))) from tools.base import CmdTask,FileUtils,PrintUtils,ChooseTask,ChooseWithCategoriesTask diff --git a/tools/translation/translator.py b/tools/translation/translator.py index ca01ce9..4c1416a 100644 --- a/tools/translation/translator.py +++ b/tools/translation/translator.py @@ -24,11 +24,11 @@ class Linguist: def __init__(self): # Initialize the current locale. + self.country = 'CN' self._currentLocale = self.getLocalFromIP() if self._currentLocale is None: self._currentLocale = locale.getdefaultlocale()[0] # Load the translation file. - self.country = 'CN' self.lang = self._currentLocale for lang in _suported_languages: CmdTask("wget {} -O /tmp/fishinstall/{} --no-check-certificate".format(lang_url.format(lang),lang_url.format(lang).replace(url_prefix,''))).run()