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

View File

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