This commit is contained in:
恍兮惚兮 2024-03-27 16:48:57 +08:00
parent fab92eebe6
commit a3ee1e482d
2 changed files with 5 additions and 6 deletions

View File

@ -253,13 +253,14 @@ class MAINUI() :
self.usefultranslators.remove(classname)
if embedcallback is None and currentsignature!=self.currentsignature:return
returnandembedcallback = lambda x: embedcallback(x) if embedcallback else ''
if type(res)==str:
if res.startswith('<msg_translator>'):
if currentsignature==self.currentsignature:
self.translation_ui.displaystatus.emit(globalconfig['fanyi'][classname]['name']+' '+res[len('<msg_translator>'):],'red',onlytrans,False)
if len(self.usefultranslators)==0:
embedcallback('')
return
return returnandembedcallback('')
res=self.solveaftertrans(res,optimization_params)
@ -286,9 +287,7 @@ class MAINUI() :
pass
if globalconfig['embedded']['as_fast_as_posible'] or classname==list(globalconfig['fanyi'])[globalconfig['embedded']['translator']]:
embedcallback(kanjitrans(zhconv.convert(res,'zh-tw')) if globalconfig['embedded']['trans_kanji'] else res)
return
return returnandembedcallback(kanjitrans(zhconv.convert(res,'zh-tw')) if globalconfig['embedded']['trans_kanji'] else res)
@threader

View File

@ -1,5 +1,5 @@
{
"version":"v2.40.2",
"version":"v2.40.3",
"language_list_show":["简体中文","日本語","English","Русский язык","Español","한국어","Français","繁體中文","Tiếng Việt","Türkçe","Polski","Українська Мова","Italiano","اللغة العربية","ภาษาไทย","བོད་སྐད།"] ,
"language_list_translator":["简体中文","日文","英文","俄语","西班牙语","韩语","法语","繁体中文","越南语","土耳其语","波兰语","乌克兰语","意大利语","阿拉伯语","泰语","藏语"],
"language_list_translator_inner":["zh", "ja", "en","ru","es","ko","fr","cht","vi","tr","pl","uk","it","ar","th","bo"],