Plugins/UiExtensionPlugins/Translator/TranslatorEngines/__init__.py

changeset 6524
e5a7bd60b287
parent 6411
7fd9b7ecbcfe
child 6539
0de153b92d53
--- a/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/__init__.py	Tue Oct 02 19:22:56 2018 +0200
+++ b/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/__init__.py	Tue Oct 02 19:46:55 2018 +0200
@@ -23,8 +23,11 @@
     
     @return names of supported engines (list of string)
     """
+    # TODO: port deepl to use the commercial API
+##    return ["googlev1", "mymemory", "glosbe", "promt", "yandex", "googlev2",
+##            "microsoft", "deepl", "ibm_watson"]
     return ["googlev1", "mymemory", "glosbe", "promt", "yandex", "googlev2",
-            "microsoft", "deepl", "ibm_watson"]
+            "microsoft", "ibm_watson"]
 
 
 def engineDisplayName(name):
@@ -48,8 +51,8 @@
         return QCoreApplication.translate("TranslatorEngines", "Google V.2")
     elif name == "microsoft":
         return QCoreApplication.translate("TranslatorEngines", "Microsoft")
-    elif name == "deepl":
-        return QCoreApplication.translate("TranslatorEngines", "DeepL")
+##    elif name == "deepl":
+##        return QCoreApplication.translate("TranslatorEngines", "DeepL")
     elif name == "ibm_watson":
         return QCoreApplication.translate("TranslatorEngines", "IBM Watson")
     else:
@@ -88,9 +91,9 @@
     elif name == "microsoft":
         from .MicrosoftEngine import MicrosoftEngine
         engine = MicrosoftEngine(plugin, parent)
-    elif name == "deepl":
-        from .DeepLEngine import DeepLEngine
-        engine = DeepLEngine(plugin, parent)
+##    elif name == "deepl":
+##        from .DeepLEngine import DeepLEngine
+##        engine = DeepLEngine(plugin, parent)
     elif name == "ibm_watson":
         from .IbmWatsonEngine import IbmWatsonEngine
         engine = IbmWatsonEngine(plugin, parent)
@@ -123,6 +126,7 @@
     @param name name of the online translation service (string)
     @return key request URL (string)
     """
+    # TODO: get URL for deepl
     if name == "mymemory":
         return "http://mymemory.translated.net/doc/keygen.php"
     elif name == "yandex":

eric ide

mercurial