mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
...
This commit is contained in:
parent
64d113ca8e
commit
b714917862
@ -307,12 +307,12 @@ class MAINUI:
|
|||||||
return
|
return
|
||||||
if is_auto_run and text == self.currenttext:
|
if is_auto_run and text == self.currenttext:
|
||||||
return
|
return
|
||||||
|
origin = text
|
||||||
currentsignature = uuid.uuid4()
|
currentsignature = uuid.uuid4()
|
||||||
if not waitforresultcallback:
|
if not waitforresultcallback:
|
||||||
self.currentsignature = currentsignature
|
self.currentsignature = currentsignature
|
||||||
# 内嵌&文件翻译不要进行文本预处理
|
# 内嵌&文件翻译不要进行文本预处理
|
||||||
try:
|
try:
|
||||||
origin = text
|
|
||||||
text = POSTSOLVE(text)
|
text = POSTSOLVE(text)
|
||||||
self.settin_ui.showandsolvesig.emit(origin, text)
|
self.settin_ui.showandsolvesig.emit(origin, text)
|
||||||
if not text:
|
if not text:
|
||||||
|
@ -118,10 +118,7 @@ class basetext:
|
|||||||
"SELECT machineTrans FROM artificialtrans WHERE source = ?",
|
"SELECT machineTrans FROM artificialtrans WHERE source = ?",
|
||||||
(src,),
|
(src,),
|
||||||
).fetchone()
|
).fetchone()
|
||||||
try:
|
ret = json.loads((ret[0]))
|
||||||
ret = json.loads((ret[0]))
|
|
||||||
except:
|
|
||||||
ret = {}
|
|
||||||
ret[clsname] = trans
|
ret[clsname] = trans
|
||||||
ret = json.dumps(ret, ensure_ascii=False)
|
ret = json.dumps(ret, ensure_ascii=False)
|
||||||
self.sqlwrite2.execute(
|
self.sqlwrite2.execute(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user