PluginManager/PluginManager.py

changeset 3190
a9a94491c4fd
parent 3171
2c37b9a37b2d
child 3200
83bde5e6f146
--- a/PluginManager/PluginManager.py	Fri Jan 10 19:30:21 2014 +0100
+++ b/PluginManager/PluginManager.py	Sat Jan 11 11:55:33 2014 +0100
@@ -184,7 +184,7 @@
                 except IOError:
                     return (
                         False,
-                        self.trUtf8("Could not create a package for {0}.")
+                        self.tr("Could not create a package for {0}.")
                             .format(self.__develPluginFile))
         
         if Preferences.getPluginManager("ActivateExternal"):
@@ -219,7 +219,7 @@
         if not os.path.exists(self.pluginDirs["eric5"]):
             return (
                 False,
-                self.trUtf8(
+                self.tr(
                     "The internal plugin directory <b>{0}</b>"
                     " does not exits.").format(self.pluginDirs["eric5"]))
         
@@ -336,7 +336,7 @@
             fname = "{0}.py".format(os.path.join(directory, name))
             module = imp.load_source(name, fname)
             if not hasattr(module, "autoactivate"):
-                module.error = self.trUtf8(
+                module.error = self.tr(
                     "Module is missing the 'autoactivate' attribute.")
                 self.__failedModules[name] = module
                 raise PluginLoadError(name)
@@ -346,8 +346,8 @@
                 if not hasattr(module, "pluginType") or \
                    not hasattr(module, "pluginTypename"):
                     module.error = \
-                        self.trUtf8("Module is missing the 'pluginType' "
-                                    "and/or 'pluginTypename' attributes.")
+                        self.tr("Module is missing the 'pluginType' "
+                                "and/or 'pluginTypename' attributes.")
                     self.__failedModules[name] = module
                     raise PluginLoadError(name)
                 else:
@@ -361,7 +361,7 @@
             print("Error loading plugin module:", name)
         except Exception as err:
             module = imp.new_module(name)
-            module.error = self.trUtf8(
+            module.error = self.tr(
                 "Module failed to load. Error: {0}").format(str(err))
             self.__failedModules[name] = module
             print("Error loading plugin module:", name)
@@ -516,7 +516,7 @@
             try:
                 obj, ok = pluginObject.activate()
             except TypeError:
-                module.error = self.trUtf8(
+                module.error = self.tr(
                     "Incompatible plugin activation method.")
                 obj = None
                 ok = True
@@ -1022,8 +1022,8 @@
                     except (OSError, IOError) as err:
                         E5MessageBox.critical(
                             self.__ui,
-                            self.trUtf8("Plugin Manager Error"),
-                            self.trUtf8(
+                            self.tr("Plugin Manager Error"),
+                            self.tr(
                                 """<p>The plugin download directory"""
                                 """ <b>{0}</b> could not be created. Please"""
                                 """ configure it via the configuration"""
@@ -1085,8 +1085,8 @@
         if reply.error() != QNetworkReply.NoError:
             E5MessageBox.warning(
                 None,
-                self.trUtf8("Error downloading file"),
-                self.trUtf8(
+                self.tr("Error downloading file"),
+                self.tr(
                     """<p>Could not download the requested file"""
                     """ from {0}.</p><p>Error: {1}</p>"""
                 ).format(Preferences.getUI("PluginRepositoryUrl5"),
@@ -1120,10 +1120,10 @@
                 if self.__updateAvailable:
                     res = E5MessageBox.information(
                         None,
-                        self.trUtf8("New plugin versions available"),
-                        self.trUtf8("<p>There are new plug-ins or plug-in"
-                                    " updates available. Use the plug-in"
-                                    " repository dialog to get them.</p>"),
+                        self.tr("New plugin versions available"),
+                        self.tr("<p>There are new plug-ins or plug-in"
+                                " updates available. Use the plug-in"
+                                " repository dialog to get them.</p>"),
                         E5MessageBox.StandardButtons(
                             E5MessageBox.Ignore |
                             E5MessageBox.Open),

eric ide

mercurial