From 54033e4cf0cd2e14a5da8cafdcb6ff0b7a3d698f Mon Sep 17 00:00:00 2001 From: Zhymabek Roman <61125068+ZhymabekRoman@users.noreply.github.com> Date: Fri, 26 May 2023 07:48:40 +0600 Subject: [PATCH 1/2] fix: delete duplicates from language list of DeepL --- translatepy/translators/deepl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translatepy/translators/deepl.py b/translatepy/translators/deepl.py index abf5339..cb2e5b9 100644 --- a/translatepy/translators/deepl.py +++ b/translatepy/translators/deepl.py @@ -102,7 +102,7 @@ def send_jsonrpc(self, method, params): class DeeplTranslate(BaseTranslator): - _supported_languages = {'AUTO', 'BG', 'ZH', 'CS', 'DA', 'NL', 'NL', 'EN', 'ET', 'FI', 'FR', 'DE', 'EL', 'HU', 'IT', 'JA', 'LV', 'LT', 'PL', 'PT', 'RO', 'RO', 'RO', 'RU', 'SK', 'SL', 'ES', 'ES', 'SV'} + _supported_languages = {'AUTO', 'BG', 'ZH', 'CS', 'DA', 'NL', 'EN', 'ET', 'FI', 'FR', 'DE', 'EL', 'HU', 'IT', 'JA', 'LV', 'LT', 'PL', 'PT', 'RO', 'RU', 'SK', 'SL', 'ES', 'SV'} def __init__(self, request: Request = Request(), preferred_langs: List = ["EN", "RU"]) -> None: self.session = request From 82291ebfa866137c567454090a5c91d1e40a39d7 Mon Sep 17 00:00:00 2001 From: Zhymabek Roman <61125068+ZhymabekRoman@users.noreply.github.com> Date: Fri, 26 May 2023 07:58:53 +0600 Subject: [PATCH 2/2] add: new 4 language support to DeepL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'TR' - Turkish 'ID' - Indonesian 'NB' - Norwegian (Bokmål) 'KO' - Korean 'UK' - Ukrainian --- translatepy/translators/deepl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translatepy/translators/deepl.py b/translatepy/translators/deepl.py index cb2e5b9..cd0479b 100644 --- a/translatepy/translators/deepl.py +++ b/translatepy/translators/deepl.py @@ -102,7 +102,7 @@ def send_jsonrpc(self, method, params): class DeeplTranslate(BaseTranslator): - _supported_languages = {'AUTO', 'BG', 'ZH', 'CS', 'DA', 'NL', 'EN', 'ET', 'FI', 'FR', 'DE', 'EL', 'HU', 'IT', 'JA', 'LV', 'LT', 'PL', 'PT', 'RO', 'RU', 'SK', 'SL', 'ES', 'SV'} + _supported_languages = {'AUTO', 'BG', 'ZH', 'CS', 'DA', 'NL', 'EN', 'ET', 'FI', 'FR', 'DE', 'EL', 'HU', 'IT', 'JA', 'LV', 'LT', 'PL', 'PT', 'RO', 'RU', 'SK', 'SL', 'ES', 'SV', 'TR', 'ID', 'NB', 'KO', 'UK'} def __init__(self, request: Request = Request(), preferred_langs: List = ["EN", "RU"]) -> None: self.session = request