move prompt translation to async_worker

This commit is contained in:
Manuel Schmid
2023-11-25 23:26:29 +01:00
parent eeb1013638
commit 25c3184ddc
3 changed files with 9 additions and 14 deletions
+2 -2
View File
@@ -8,8 +8,8 @@ def translate2en(text, element):
try:
result = translators.translate_text(text,to_language='en')
print(f'Translated {element}: {result}')
print(f'[Parameters] Translated {element}: {result}')
return result
except Exception as e:
print(f'Error during translation of {element}: {e}')
print(f'[Parameters] Error during translation of {element}: {e}')
return text