mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
issues/1120
This commit is contained in:
parent
f2aef8a375
commit
e8842fcd99
@ -379,7 +379,15 @@ class MAINUI:
|
|||||||
|
|
||||||
if "premt" in self.translators:
|
if "premt" in self.translators:
|
||||||
try:
|
try:
|
||||||
maybehaspremt = self.translators["premt"].translate(text_solved)
|
contentraw = text_solved
|
||||||
|
for _ in optimization_params:
|
||||||
|
if isinstance(_, dict):
|
||||||
|
_gpt_dict = _.get("gpt_dict", None)
|
||||||
|
if _gpt_dict is None:
|
||||||
|
continue
|
||||||
|
contentraw = _.get("gpt_dict_origin")
|
||||||
|
|
||||||
|
maybehaspremt = self.translators["premt"].translate(contentraw)
|
||||||
except:
|
except:
|
||||||
print_exc()
|
print_exc()
|
||||||
other = list(set(maybehaspremt.keys()) - set(fix_rank))
|
other = list(set(maybehaspremt.keys()) - set(fix_rank))
|
||||||
|
@ -36,9 +36,6 @@ class TS(basetrans):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def translate(self, content):
|
def translate(self, content):
|
||||||
query = json.loads(content)
|
|
||||||
content = query["contentraw"]
|
|
||||||
|
|
||||||
self.checkfilechanged(
|
self.checkfilechanged(
|
||||||
self.unsafegetcurrentgameconfig(), self.config["sqlitefile"]
|
self.unsafegetcurrentgameconfig(), self.config["sqlitefile"]
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user