Unverified Commit 49e73df4 authored by Raphael's avatar Raphael Committed by GitHub
Browse files

fix deepl error with english language source language

I think this is the last PR and all the problems will be solved
parent 750ad440
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -339,6 +339,8 @@ class DeeplTranslator(TranslatorBase):
        translator = deepl.Translator(api_key)
        source = self.lang_map[self.lang_source]
        target = self.lang_map[self.lang_target]
        if source == 'EN-US':
            source = "EN"
        result = translator.translate_text(text, source_lang=source, target_lang=target)
        return result.text