mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
bugfix
This commit is contained in:
parent
fab92eebe6
commit
a3ee1e482d
@ -253,13 +253,14 @@ class MAINUI() :
|
|||||||
self.usefultranslators.remove(classname)
|
self.usefultranslators.remove(classname)
|
||||||
if embedcallback is None and currentsignature!=self.currentsignature:return
|
if embedcallback is None and currentsignature!=self.currentsignature:return
|
||||||
|
|
||||||
|
returnandembedcallback = lambda x: embedcallback(x) if embedcallback else ''
|
||||||
|
|
||||||
if type(res)==str:
|
if type(res)==str:
|
||||||
if res.startswith('<msg_translator>'):
|
if res.startswith('<msg_translator>'):
|
||||||
if currentsignature==self.currentsignature:
|
if currentsignature==self.currentsignature:
|
||||||
self.translation_ui.displaystatus.emit(globalconfig['fanyi'][classname]['name']+' '+res[len('<msg_translator>'):],'red',onlytrans,False)
|
self.translation_ui.displaystatus.emit(globalconfig['fanyi'][classname]['name']+' '+res[len('<msg_translator>'):],'red',onlytrans,False)
|
||||||
if len(self.usefultranslators)==0:
|
if len(self.usefultranslators)==0:
|
||||||
embedcallback('')
|
return returnandembedcallback('')
|
||||||
return
|
|
||||||
|
|
||||||
res=self.solveaftertrans(res,optimization_params)
|
res=self.solveaftertrans(res,optimization_params)
|
||||||
|
|
||||||
@ -286,9 +287,7 @@ class MAINUI() :
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if globalconfig['embedded']['as_fast_as_posible'] or classname==list(globalconfig['fanyi'])[globalconfig['embedded']['translator']]:
|
if globalconfig['embedded']['as_fast_as_posible'] or classname==list(globalconfig['fanyi'])[globalconfig['embedded']['translator']]:
|
||||||
|
return returnandembedcallback(kanjitrans(zhconv.convert(res,'zh-tw')) if globalconfig['embedded']['trans_kanji'] else res)
|
||||||
embedcallback(kanjitrans(zhconv.convert(res,'zh-tw')) if globalconfig['embedded']['trans_kanji'] else res)
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
@threader
|
@threader
|
||||||
|
@ -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_show":["简体中文","日本語","English","Русский язык","Español","한국어","Français","繁體中文","Tiếng Việt","Türkçe","Polski","Українська Мова","Italiano","اللغة العربية","ภาษาไทย","བོད་སྐད།"] ,
|
||||||
"language_list_translator":["简体中文","日文","英文","俄语","西班牙语","韩语","法语","繁体中文","越南语","土耳其语","波兰语","乌克兰语","意大利语","阿拉伯语","泰语","藏语"],
|
"language_list_translator":["简体中文","日文","英文","俄语","西班牙语","韩语","法语","繁体中文","越南语","土耳其语","波兰语","乌克兰语","意大利语","阿拉伯语","泰语","藏语"],
|
||||||
"language_list_translator_inner":["zh", "ja", "en","ru","es","ko","fr","cht","vi","tr","pl","uk","it","ar","th","bo"],
|
"language_list_translator_inner":["zh", "ja", "en","ru","es","ko","fr","cht","vi","tr","pl","uk","it","ar","th","bo"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user