--- a/eric7/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/IbmWatsonEngine.py Sat May 22 17:01:51 2021 +0200 +++ b/eric7/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/IbmWatsonEngine.py Sat May 22 18:51:46 2021 +0200 @@ -14,7 +14,7 @@ QNetworkAccessManager, QNetworkRequest, QNetworkReply ) -from E5Gui import E5MessageBox +from E5Gui import EricMessageBox from EricNetwork.EricNetworkProxyFactory import proxyAuthenticationRequired @@ -179,7 +179,7 @@ """ apiKey = self.plugin.getPreferences("IbmKey") if not apiKey: - E5MessageBox.critical( + EricMessageBox.critical( self.__ui, self.tr("Error Getting Available Translations"), self.tr("IBM Watson: A valid Language Translator key is" @@ -188,7 +188,7 @@ return translatorUrl = self.plugin.getPreferences("IbmUrl") if not translatorUrl: - E5MessageBox.critical( + EricMessageBox.critical( self.__ui, self.tr("Error Getting Available Translations"), self.tr("IBM Watson: A valid Language Translator URL is" @@ -229,7 +229,7 @@ if reply.error() != QNetworkReply.NetworkError.NoError: errorStr = reply.errorString() - E5MessageBox.critical( + EricMessageBox.critical( self.__ui, self.tr("Error Getting Available Translations"), self.tr("IBM Watson: The server sent an error indication." @@ -241,7 +241,7 @@ try: responseDict = json.loads(response) except ValueError: - E5MessageBox.critical( + EricMessageBox.critical( self.__ui, self.tr("Error Getting Available Translations"), self.tr("IBM Watson: Invalid response received") @@ -249,7 +249,7 @@ return if "models" not in responseDict: - E5MessageBox.critical( + EricMessageBox.critical( self.__ui, self.tr("Error Getting Available Translations"), self.tr("IBM Watson: No translation available.")