71 @type QObject |
71 @type QObject |
72 @return translation engine |
72 @return translation engine |
73 @rtype TranslatorEngine |
73 @rtype TranslatorEngine |
74 """ |
74 """ |
75 if name == "deepl": |
75 if name == "deepl": |
76 from .DeepLEngine import DeepLEngine |
76 from .DeepLEngine import DeepLEngine # __IGNORE_WARNING_I101__ |
77 |
77 |
78 engine = DeepLEngine(plugin, parent) |
78 engine = DeepLEngine(plugin, parent) |
79 elif name == "googlev1": |
79 elif name == "googlev1": |
80 from .GoogleV1Engine import GoogleV1Engine |
80 from .GoogleV1Engine import GoogleV1Engine # __IGNORE_WARNING_I101__ |
81 |
81 |
82 engine = GoogleV1Engine(plugin, parent) |
82 engine = GoogleV1Engine(plugin, parent) |
83 elif name == "googlev2": |
83 elif name == "googlev2": |
84 from .GoogleV2Engine import GoogleV2Engine |
84 from .GoogleV2Engine import GoogleV2Engine # __IGNORE_WARNING_I101__ |
85 |
85 |
86 engine = GoogleV2Engine(plugin, parent) |
86 engine = GoogleV2Engine(plugin, parent) |
87 elif name == "ibm_watson": |
87 elif name == "ibm_watson": |
88 from .IbmWatsonEngine import IbmWatsonEngine |
88 from .IbmWatsonEngine import IbmWatsonEngine # __IGNORE_WARNING_I101__ |
89 |
89 |
90 engine = IbmWatsonEngine(plugin, parent) |
90 engine = IbmWatsonEngine(plugin, parent) |
91 elif name == "microsoft": |
91 elif name == "microsoft": |
92 from .MicrosoftEngine import MicrosoftEngine |
92 from .MicrosoftEngine import MicrosoftEngine # __IGNORE_WARNING_I101__ |
93 |
93 |
94 engine = MicrosoftEngine(plugin, parent) |
94 engine = MicrosoftEngine(plugin, parent) |
95 elif name == "mymemory": |
95 elif name == "mymemory": |
96 from .MyMemoryEngine import MyMemoryEngine |
96 from .MyMemoryEngine import MyMemoryEngine # __IGNORE_WARNING_I101__ |
97 |
97 |
98 engine = MyMemoryEngine(plugin, parent) |
98 engine = MyMemoryEngine(plugin, parent) |
99 elif name == "yandex": |
99 elif name == "yandex": |
100 from .YandexEngine import YandexEngine |
100 from .YandexEngine import YandexEngine # __IGNORE_WARNING_I101__ |
101 |
101 |
102 engine = YandexEngine(plugin, parent) |
102 engine = YandexEngine(plugin, parent) |
103 else: |
103 else: |
104 engine = None |
104 engine = None |
105 return engine |
105 return engine |