mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-01 10:04:12 +08:00
issues/696
This commit is contained in:
parent
7e19b3fc8b
commit
b97fa06d54
@ -530,16 +530,15 @@ def parsemayberegexreplace(dict, res):
|
|||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
def getlanguse():
|
||||||
|
return static_data["language_list_translator_inner"][globalconfig["languageuse"]]
|
||||||
|
|
||||||
|
|
||||||
def checkpostlangmatch(name):
|
def checkpostlangmatch(name):
|
||||||
for item in static_data["transoptimi"]:
|
for item in static_data["transoptimi"]:
|
||||||
if name == item["name"]:
|
if name == item["name"]:
|
||||||
try:
|
try:
|
||||||
return (
|
return getlanguse() == item["languageuse"]
|
||||||
static_data["language_list_translator_inner"][
|
|
||||||
globalconfig["languageuse"]
|
|
||||||
]
|
|
||||||
== item["languageuse"]
|
|
||||||
)
|
|
||||||
except:
|
except:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -58,6 +58,18 @@ class TS(basetransdev):
|
|||||||
)
|
)
|
||||||
self.currenttext = content
|
self.currenttext = content
|
||||||
currtext = ""
|
currtext = ""
|
||||||
|
if self.tgtlang == "Arabic":
|
||||||
|
|
||||||
|
while self.currenttext == content:
|
||||||
|
time.sleep(1) # get text before violate usage policies.
|
||||||
|
|
||||||
|
newcurr = self.getcurr(idx)
|
||||||
|
needbreak = newcurr == currtext and newcurr != ""
|
||||||
|
currtext = newcurr
|
||||||
|
if needbreak:
|
||||||
|
break
|
||||||
|
yield currtext
|
||||||
|
else:
|
||||||
while self.currenttext == content:
|
while self.currenttext == content:
|
||||||
time.sleep(0.01) # get text before violate usage policies.
|
time.sleep(0.01) # get text before violate usage policies.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user