eric6/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/DeepLEngine.py

changeset 7748
23e98236a4c4
parent 7360
9190402e4505
child 7780
41420f82c0ac
--- a/eric6/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/DeepLEngine.py	Sat Oct 03 18:10:49 2020 +0200
+++ b/eric6/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/DeepLEngine.py	Sat Oct 03 18:11:45 2020 +0200
@@ -70,9 +70,12 @@
             success (boolean)
         """
         if len(text) > self.MaxTranslationTextLen:
-            return self.tr(
-                "Text to be translated exceeds the translation limit of {0}"
-                " characters.").format(self.MaxTranslationTextLen), False
+            return (
+                self.tr("DeepL: Text to be translated exceeds the translation"
+                        " limit of {0} characters.")
+                .format(self.MaxTranslationTextLen),
+                False
+            )
         
         apiKey = self.plugin.getPreferences("DeeplKey")
         if not apiKey:
@@ -99,7 +102,7 @@
             
             translations = responseDict["translations"]
             if len(translations) == 0:
-                return self.tr("<p>No translation found</p>"), True
+                return self.tr("<p>DeepL: No translation found</p>"), True
             
             # show sentence by sentence separated by a line
             result = (

eric ide

mercurial