From 2ea364c93df5d813c24d898bdbb48d39eff7d677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Fri, 26 Jul 2024 14:37:59 +0800 Subject: [PATCH] fix --- .../LunaTranslator/gui/setting_textinput.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/LunaTranslator/LunaTranslator/gui/setting_textinput.py b/LunaTranslator/LunaTranslator/gui/setting_textinput.py index 3594b4ef..f55ba82c 100644 --- a/LunaTranslator/LunaTranslator/gui/setting_textinput.py +++ b/LunaTranslator/LunaTranslator/gui/setting_textinput.py @@ -1,7 +1,7 @@ from qtsymbols import * import functools, os, json import windows, gobject -from myutils.utils import getfilemd5, dynamiclink +from myutils.utils import getfilemd5, translate_exits from myutils.config import ( globalconfig, _TR, @@ -280,6 +280,13 @@ def creategamefont_comboBox(): def gethookembedgrid(self): + alltransvis = [] + alltrans = [] + for x in globalconfig["fanyi"]: + if not translate_exits(x): + continue + alltransvis.append(globalconfig["fanyi"][x]["name"]) + alltrans.append(x) grids = [ [ "导出翻译补丁", @@ -320,10 +327,10 @@ def gethookembedgrid(self): "内嵌的翻译器", "", D_getsimplecombobox( - [globalconfig["fanyi"][x]["name"] for x in globalconfig["fanyi"]], + alltransvis, globalconfig["embedded"], "translator_2", - internallist=list(globalconfig["fanyi"]), + internallist=alltrans, ), ], [