From 0058817b761185bc2d03d148e16996257cb18030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Aime?= Date: Mon, 8 Feb 2021 18:59:54 +0100 Subject: [PATCH] Debug report.py lang to locales folder --- analysis/classes/report.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/analysis/classes/report.py b/analysis/classes/report.py index d38d26e..9146bb2 100644 --- a/analysis/classes/report.py +++ b/analysis/classes/report.py @@ -34,9 +34,9 @@ class Report(object): self.userlang = get_config(("frontend", "user_lang")) # Load template language - if not re.match("^[a-z]{2}$", self.userlang): + if not re.match("^[a-z]{2,3}$", self.userlang): self.userlang = "en" - with open(os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "lang/{}.json".format(self.userlang)))as f: + with open(os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "locales/{}.json".format(self.userlang))) as f: self.template = json.load(f)["report"] def read_json(self, json_path):