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

branch
eric7
changeset 9148
b31f0d894b55
parent 9145
520a70c5437f
equal deleted inserted replaced
9147:bbf3af40c223 9148:b31f0d894b55
64 translationLanguage): 64 translationLanguage):
65 """ 65 """
66 Public method to translate the given text. 66 Public method to translate the given text.
67 67
68 @param requestObject reference to the request object 68 @param requestObject reference to the request object
69 (TranslatorRequest) 69 @type TranslatorRequest
70 @param text text to be translated (string) 70 @param text text to be translated
71 @param originalLanguage language code of the original (string) 71 @type str
72 @param translationLanguage language code of the translation (string) 72 @param originalLanguage language code of the original
73 @return tuple of translated text (string) and flag indicating 73 @type str
74 success (boolean) 74 @param translationLanguage language code of the translation
75 @type str
76 @return tuple of translated text and flag indicating success
77 @rtype tuple of (str, bool)
75 """ 78 """
76 if len(text) > self.MaxTranslationTextLen: 79 if len(text) > self.MaxTranslationTextLen:
77 return ( 80 return (
78 self.tr("DeepL: Text to be translated exceeds the translation" 81 self.tr("DeepL: Text to be translated exceeds the translation"
79 " limit of {0} characters.") 82 " limit of {0} characters.")

eric ide

mercurial