issues/1018

https://github.com/HIllya51/LunaTranslator/issues/1018
This commit is contained in:
恍兮惚兮 2024-08-22 16:06:37 +08:00
parent b9d0fb2165
commit ce8baf8b0e
2 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,7 @@ from myutils.proxy import getproxy
from threading import Thread from threading import Thread
from myutils.commonbase import proxysession from myutils.commonbase import proxysession
from myutils.config import globalconfig, savehook_new_data, namemapcast from myutils.config import globalconfig, savehook_new_data, namemapcast
from myutils.utils import getlangtgt
from traceback import print_exc from traceback import print_exc
from requests import RequestException from requests import RequestException
@ -180,13 +181,14 @@ class common:
for _ in savehook_new_data[gameuid]["namemap2"]: for _ in savehook_new_data[gameuid]["namemap2"]:
dedump.add(_.get("key", "")) dedump.add(_.get("key", ""))
namemap = namemapcast(namemap) namemap = namemapcast(namemap)
usenamemap = getlangtgt() == "en"
for name in namemap: for name in namemap:
if name in dedump: if name in dedump:
continue continue
savehook_new_data[gameuid]["namemap2"].append( savehook_new_data[gameuid]["namemap2"].append(
{ {
"key": name, "key": name,
"value": namemap[name], "value": namemap[name] if usenamemap else name,
"regex": False, "regex": False,
"escape": False, "escape": False,
} }

View File

@ -2003,7 +2003,7 @@
"realtime_edit_target": "realtime_edit", "realtime_edit_target": "realtime_edit",
"magpiepath": "", "magpiepath": "",
"movefollow": true, "movefollow": true,
"focusnotop": true, "focusnotop": false,
"autostarthook": true, "autostarthook": true,
"minlength": 0, "minlength": 0,
"maxlength": 1000, "maxlength": 1000,