[update] Upgrade deepl package version to 1.22.0 and refactor translation code to use DeepLClient

This commit is contained in:
misyaguziya committed 2025-05-15 12:38:54 +09:00
1 parent bc412024da
commit a619cd6114
3 files changed
+4 -4

No files matched your search

@@ -1,5 +1,5 @@
from os import path as os_path
from deepl import Translator as deepl_Translator
from deepl import DeepLClient
try:
from translators import translate_text as other_web_Translator
ENABLE_TRANSLATORS = True
@@ -28,7 +28,7 @@ class Translator():
def authenticationDeepLAuthKey(self, authkey):
result = True
try:
self.deepl_client = deepl_Translator(authkey)
self.deepl_client = DeepLClient(authkey)
self.deepl_client.translate_text(" ", target_lang="EN-US")
except Exception:
errorLogging()