This commit is contained in:
恍兮惚兮 2024-10-20 19:07:29 +08:00
parent 64d113ca8e
commit b714917862
2 changed files with 2 additions and 5 deletions

View File

@ -307,12 +307,12 @@ class MAINUI:
return
if is_auto_run and text == self.currenttext:
return
origin = text
currentsignature = uuid.uuid4()
if not waitforresultcallback:
self.currentsignature = currentsignature
# 内嵌&文件翻译不要进行文本预处理
try:
origin = text
text = POSTSOLVE(text)
self.settin_ui.showandsolvesig.emit(origin, text)
if not text:

View File

@ -118,10 +118,7 @@ class basetext:
"SELECT machineTrans FROM artificialtrans WHERE source = ?",
(src,),
).fetchone()
try:
ret = json.loads((ret[0]))
except:
ret = {}
ret = json.loads((ret[0]))
ret[clsname] = trans
ret = json.dumps(ret, ensure_ascii=False)
self.sqlwrite2.execute(