From 0ac5b92f3f25d5f3d5c4a09f465848c6aa1f4e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Fri, 1 Nov 2024 18:53:42 +0800 Subject: [PATCH] fix --- src/LunaTranslator/translator/basetranslator.py | 2 +- src/LunaTranslator/translator/rengong.py | 5 ++--- src/plugins/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/LunaTranslator/translator/basetranslator.py b/src/LunaTranslator/translator/basetranslator.py index fa78fe1b..69202002 100644 --- a/src/LunaTranslator/translator/basetranslator.py +++ b/src/LunaTranslator/translator/basetranslator.py @@ -407,7 +407,7 @@ class basetrans(commonbase): self.maybeneedreinit() - if self.using_gpt_dict: + if self.using_gpt_dict or self.transtype == "pre": contentsolved = self.__parse_gpt_dict( contentsolved, optimization_params ) diff --git a/src/LunaTranslator/translator/rengong.py b/src/LunaTranslator/translator/rengong.py index 85084963..f91a9b42 100644 --- a/src/LunaTranslator/translator/rengong.py +++ b/src/LunaTranslator/translator/rengong.py @@ -111,9 +111,8 @@ class TS(basetrans): collect.append(line) return "\n".join(collect) - def translate(self, content: str): - query = json.loads(content) - content = query["contentraw"] + def translate(self, content: dict): + content = content["contentraw"] self.checkfilechanged( self.unsafegetcurrentgameconfig(), tuple(self.config["jsonfile"]) ) diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 7c80b698..d41622ce 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 53) -set(VERSION_PATCH 5) +set(VERSION_PATCH 6) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)