mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
case
This commit is contained in:
parent
5837c74b43
commit
b3a52231e2
@ -136,8 +136,7 @@ class Process:
|
||||
res = reg.sub(self.vnrshareddict[context[key]]["text"], res)
|
||||
for key, value in self.sorted_vnrshareddict_post:
|
||||
if key in res:
|
||||
res = res.replace(key, value["text"])
|
||||
res = res.replace(key.lower(), value["text"])
|
||||
res = re.sub(key, value["text"], res, flags=re.IGNORECASE)
|
||||
return res
|
||||
|
||||
@staticmethod
|
||||
|
@ -1,5 +1,5 @@
|
||||
from myutils.config import savehook_new_data, globalconfig
|
||||
import gobject
|
||||
import gobject, re
|
||||
from qtsymbols import *
|
||||
from myutils.utils import postusewhich
|
||||
from myutils.config import get_launchpath
|
||||
@ -89,6 +89,5 @@ class Process:
|
||||
def process_after(self, res: str, context):
|
||||
mp1 = context["zhanweifu"]
|
||||
for key in mp1:
|
||||
res = res.replace(key, mp1[key])
|
||||
res = res.replace(key.lower(), mp1[key])
|
||||
res = re.sub(key, mp1[key], res, flags=re.IGNORECASE)
|
||||
return res
|
||||
|
Loading…
x
Reference in New Issue
Block a user