[update] Upgrade deepl package version to 1.22.0 and refactor translation code to use DeepLClient
This commit is contained in:
@@ -5,7 +5,7 @@ transformers==4.40.2
|
|||||||
pillow == 10.0.0
|
pillow == 10.0.0
|
||||||
PyAudioWPatch == 0.2.12.6
|
PyAudioWPatch == 0.2.12.6
|
||||||
python-osc == 1.9.0
|
python-osc == 1.9.0
|
||||||
deepl == 1.15.0
|
deepl == 1.22.0
|
||||||
flashtext ==2.7
|
flashtext ==2.7
|
||||||
pyinstaller==6.10.0
|
pyinstaller==6.10.0
|
||||||
numpy==1.26.4
|
numpy==1.26.4
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ transformers==4.40.2
|
|||||||
pillow == 10.0.0
|
pillow == 10.0.0
|
||||||
PyAudioWPatch == 0.2.12.6
|
PyAudioWPatch == 0.2.12.6
|
||||||
python-osc == 1.9.0
|
python-osc == 1.9.0
|
||||||
deepl == 1.15.0
|
deepl == 1.22.0
|
||||||
flashtext ==2.7
|
flashtext ==2.7
|
||||||
pyinstaller==6.10.0
|
pyinstaller==6.10.0
|
||||||
numpy==1.26.4
|
numpy==1.26.4
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from os import path as os_path
|
from os import path as os_path
|
||||||
from deepl import Translator as deepl_Translator
|
from deepl import DeepLClient
|
||||||
try:
|
try:
|
||||||
from translators import translate_text as other_web_Translator
|
from translators import translate_text as other_web_Translator
|
||||||
ENABLE_TRANSLATORS = True
|
ENABLE_TRANSLATORS = True
|
||||||
@@ -28,7 +28,7 @@ class Translator():
|
|||||||
def authenticationDeepLAuthKey(self, authkey):
|
def authenticationDeepLAuthKey(self, authkey):
|
||||||
result = True
|
result = True
|
||||||
try:
|
try:
|
||||||
self.deepl_client = deepl_Translator(authkey)
|
self.deepl_client = DeepLClient(authkey)
|
||||||
self.deepl_client.translate_text(" ", target_lang="EN-US")
|
self.deepl_client.translate_text(" ", target_lang="EN-US")
|
||||||
except Exception:
|
except Exception:
|
||||||
errorLogging()
|
errorLogging()
|
||||||
|
|||||||
Reference in New Issue
Block a user