Plugins/UiExtensionPlugins/Translator/TranslatorEngines/DeepLEngine.py

changeset 6412
d71b094845e7
parent 6227
fc0869cd16dc
child 6539
0de153b92d53
equal deleted inserted replaced
6411:7fd9b7ecbcfe 6412:d71b094845e7
14 pass 14 pass
15 15
16 import json 16 import json
17 import re 17 import re
18 18
19 from PyQt5.QtCore import QUrl, QByteArray 19 from PyQt5.QtCore import QUrl, QByteArray, QTimer
20 20
21 from .TranslationEngine import TranslationEngine 21 from .TranslationEngine import TranslationEngine
22 22
23 23
24 class DeepLEngine(TranslationEngine): 24 class DeepLEngine(TranslationEngine):
39 @type QObject 39 @type QObject
40 """ 40 """
41 super(DeepLEngine, self).__init__(plugin, parent) 41 super(DeepLEngine, self).__init__(plugin, parent)
42 42
43 self.__splitPattern = re.compile(r"([^\.!\?;]+[\.!\?;]*)") 43 self.__splitPattern = re.compile(r"([^\.!\?;]+[\.!\?;]*)")
44
45 QTimer.singleShot(0, self.availableTranslationsLoaded.emit)
44 46
45 def engineName(self): 47 def engineName(self):
46 """ 48 """
47 Public method to return the name of the engine. 49 Public method to return the name of the engine.
48 50

eric ide

mercurial