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

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

View File

@@ -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()