issues/696

This commit is contained in:
恍兮惚兮 2024-04-28 04:39:26 +08:00
parent 7e19b3fc8b
commit b97fa06d54
2 changed files with 24 additions and 13 deletions

View File

@ -530,16 +530,15 @@ def parsemayberegexreplace(dict, res):
return res
def getlanguse():
return static_data["language_list_translator_inner"][globalconfig["languageuse"]]
def checkpostlangmatch(name):
for item in static_data["transoptimi"]:
if name == item["name"]:
try:
return (
static_data["language_list_translator_inner"][
globalconfig["languageuse"]
]
== item["languageuse"]
)
return getlanguse() == item["languageuse"]
except:
return True

View File

@ -58,6 +58,18 @@ class TS(basetransdev):
)
self.currenttext = content
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:
time.sleep(0.01) # get text before violate usage policies.