From 49bd81cf5ce79b3e5e46062bf6c4c8dbb20f59a6 Mon Sep 17 00:00:00 2001 From: Y_RyuZU Date: Mon, 23 Oct 2023 05:52:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=81=AA=E3=82=93=E3=81=8Bja=5Fjp.json?= =?UTF-8?q?=E3=81=AB=E3=81=82=E3=82=8Bkey=E3=81=AE=E6=95=B0=E3=81=8Cen=5Fu?= =?UTF-8?q?s.json=E3=81=AB=E3=81=82=E3=82=8Bkey=E3=81=AE=E6=95=B0=E3=82=88?= =?UTF-8?q?=E3=82=8A=E5=B0=91=E3=81=AA=E3=81=84mod=E3=81=8C=E5=A4=9A?= =?UTF-8?q?=E3=80=85=E3=81=82=E3=82=8B=E3=81=AE=E3=81=A7en=5Fus.json?= =?UTF-8?q?=E3=82=92=E3=83=99=E3=83=BC=E3=82=B9=E3=81=AB=E3=81=97=E3=80=81?= =?UTF-8?q?ja=5Fjp.json=E3=81=ABkey=E3=81=8C=E3=81=82=E3=82=8B=E5=A0=B4?= =?UTF-8?q?=E5=90=88=E3=81=AF=E3=81=9D=E3=81=A1=E3=82=89=E3=81=AE=E5=80=A4?= =?UTF-8?q?=E3=82=92=E4=BD=BF=E3=81=86=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.py b/src/main.py index ca63377..7e9d035 100644 --- a/src/main.py +++ b/src/main.py @@ -249,13 +249,14 @@ def process_jar_file(log_directory, jar_path, collected_map): logging.info(f"Extract en_us.json or ja_jp.json in {jar_path / lang_path_in_jar}") with zipfile.ZipFile(jar_path, 'r') as zip_ref: + if en_us_path_in_jar_str in zip_ref.namelist(): + extract_specific_file(jar_path, en_us_path_in_jar_str, log_directory) if ja_jp_path_in_jar_str in zip_ref.namelist(): extract_specific_file(jar_path, ja_jp_path_in_jar_str, log_directory) - elif en_us_path_in_jar_str in zip_ref.namelist(): - extract_specific_file(jar_path, en_us_path_in_jar_str, log_directory) - os.rename(os.path.join(log_directory, en_us_path_in_jar), os.path.join(log_directory, ja_jp_path_in_jar)) + en_us_path = os.path.join(log_directory, en_us_path_in_jar) ja_jp_path = os.path.join(log_directory, ja_jp_path_in_jar) + extract_map_from_json(en_us_path, collected_map) extract_map_from_json(ja_jp_path, collected_map) def translate_from_jar(log_directory):