diff --git a/LunaTranslator/LunaTranslator/myutils/config.py b/LunaTranslator/LunaTranslator/myutils/config.py index 790f2609..a02de560 100644 --- a/LunaTranslator/LunaTranslator/myutils/config.py +++ b/LunaTranslator/LunaTranslator/myutils/config.py @@ -139,13 +139,16 @@ def syncconfig(config1, default, drop=False, deep=0, skipdict=False): elif key == "name": config1[key] = default[key] - if type(default[key]) != type(config1[key]) and ( - type(default[key]) == dict or type(default[key]) == list - ): + elif key == "argstype": config1[key] = default[key] - elif type(default[key]) == dict: - if skipdict == False: - syncconfig(config1[key], default[key], drop, deep - 1) + else: + if type(default[key]) != type(config1[key]) and ( + type(default[key]) == dict or type(default[key]) == list + ): + config1[key] = default[key] + elif type(default[key]) == dict: + if skipdict == False: + syncconfig(config1[key], default[key], drop, deep - 1) if drop and deep > 0: for key in list(config1.keys()): @@ -191,12 +194,15 @@ def getlanguse(): global language, languageshow return static_data["language_list_translator_inner"][language] + def getlangsrc(): return static_data["language_list_translator_inner"][globalconfig["srclang3"]] + def getlangtgt(): return static_data["language_list_translator_inner"][globalconfig["tgtlang3"]] + def setlanguage(): global language, languageshow language = globalconfig["languageuse"] diff --git a/LunaTranslator/files/defaultconfig/config.json b/LunaTranslator/files/defaultconfig/config.json index 94fa9535..88175307 100644 --- a/LunaTranslator/files/defaultconfig/config.json +++ b/LunaTranslator/files/defaultconfig/config.json @@ -946,7 +946,7 @@ "name": "路径", "dir": false, "multi": true, - "filter": "*.mdx|*.mdd" + "filter": "*.mdx;*.mdd" }, "ambiguity": { "type": "intspin",