Sync branch 'mashb1t_main' with develop_upstream

This commit is contained in:
Manuel Schmid
2024-07-14 20:28:38 +02:00
40 changed files with 2815 additions and 904 deletions
+15
View File
@@ -0,0 +1,15 @@
import translators
from functools import lru_cache
@lru_cache(maxsize=32, typed=False)
def translate2en(text, element):
if not text:
return text
try:
result = translators.translate_text(text,to_language='en')
print(f'[Parameters] Translated {element}: {result}')
return result
except Exception as e:
print(f'[Parameters] Error during translation of {element}: {e}')
return text