mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24: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)
|
res = reg.sub(self.vnrshareddict[context[key]]["text"], res)
|
||||||
for key, value in self.sorted_vnrshareddict_post:
|
for key, value in self.sorted_vnrshareddict_post:
|
||||||
if key in res:
|
if key in res:
|
||||||
res = res.replace(key, value["text"])
|
res = re.sub(key, value["text"], res, flags=re.IGNORECASE)
|
||||||
res = res.replace(key.lower(), value["text"])
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from myutils.config import savehook_new_data, globalconfig
|
from myutils.config import savehook_new_data, globalconfig
|
||||||
import gobject
|
import gobject, re
|
||||||
from qtsymbols import *
|
from qtsymbols import *
|
||||||
from myutils.utils import postusewhich
|
from myutils.utils import postusewhich
|
||||||
from myutils.config import get_launchpath
|
from myutils.config import get_launchpath
|
||||||
@ -89,6 +89,5 @@ class Process:
|
|||||||
def process_after(self, res: str, context):
|
def process_after(self, res: str, context):
|
||||||
mp1 = context["zhanweifu"]
|
mp1 = context["zhanweifu"]
|
||||||
for key in mp1:
|
for key in mp1:
|
||||||
res = res.replace(key, mp1[key])
|
res = re.sub(key, mp1[key], res, flags=re.IGNORECASE)
|
||||||
res = res.replace(key.lower(), mp1[key])
|
|
||||||
return res
|
return res
|
||||||
|
Loading…
x
Reference in New Issue
Block a user