eric7/Plugins/UiExtensionPlugins/Translator/TranslatorWidget.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
--- a/eric7/Plugins/UiExtensionPlugins/Translator/TranslatorWidget.py	Sat May 22 17:01:51 2021 +0200
+++ b/eric7/Plugins/UiExtensionPlugins/Translator/TranslatorWidget.py	Sat May 22 18:51:46 2021 +0200
@@ -15,8 +15,8 @@
 except ImportError:
     MULTIMEDIA_AVAILABLE = False
 
-from E5Gui import E5MessageBox
-from E5Gui.E5Application import e5App
+from E5Gui import EricMessageBox
+from E5Gui.EricApplication import ericApp
 
 from .Ui_TranslatorWidget import Ui_TranslatorWidget
 
@@ -162,7 +162,7 @@
         if ok:
             self.transEdit.setHtml(result)
         else:
-            E5MessageBox.critical(
+            EricMessageBox.critical(
                 self,
                 self.tr("Translation Error"),
                 result)
@@ -413,7 +413,7 @@
         self.__ensureTranslationEngineReady()
         if self.__translationEngine is not None:
             if not self.__translationEngine.hasTTS():
-                E5MessageBox.critical(
+                EricMessageBox.critical(
                     self,
                     self.tr("Translation Error"),
                     self.tr("The selected translation service does not"
@@ -431,7 +431,7 @@
                 self.__mediaPlayer.setMedia(QMediaContent(), self.__mediaFile)
                 self.__mediaPlayer.play()
             else:
-                E5MessageBox.critical(
+                EricMessageBox.critical(
                     self,
                     self.tr("Translation Error"),
                     data)
@@ -452,4 +452,4 @@
         """
         Private slot to open the Translator configuration page.
         """
-        e5App().getObject("UserInterface").showPreferences("translatorPage")
+        ericApp().getObject("UserInterface").showPreferences("translatorPage")

eric ide

mercurial