From dd98aa44a5084f0590645f5ee9565ab962e6c844 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 10 May 2015 10:37:00 +0200 Subject: =?UTF-8?q?Remove=20gettext=20support,=20as=20we=20don=E2=80=99t?= =?UTF-8?q?=20want=20to=20translate=20poezio,=20and=20it=20takes=20more=20?= =?UTF-8?q?than=201ms=20per=20call.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugin_manager.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/plugin_manager.py') diff --git a/src/plugin_manager.py b/src/plugin_manager.py index 7e3659e4..549753a9 100644 --- a/src/plugin_manager.py +++ b/src/plugin_manager.py @@ -8,7 +8,6 @@ plugin env. import os from os import path import logging -from gettext import gettext as _ import core import tabs @@ -93,8 +92,8 @@ class PluginManager(object): except Exception as e: log.error('Error while loading the plugin %s', name, exc_info=True) if notify: - self.core.information(_('Unable to load the plugin %s: %s') % - (name, e), + self.core.information('Unable to load the plugin %s: %s' % + (name, e), 'Error') self.unload(name, notify=False) else: @@ -131,8 +130,8 @@ class PluginManager(object): self.core.information('Plugin %s unloaded' % name, 'Info') except Exception as e: log.debug("Could not unload plugin %s", name, exc_info=True) - self.core.information(_("Could not unload plugin %s: %s") % - (name, e), + self.core.information("Could not unload plugin %s: %s" % + (name, e), 'Error') def add_command(self, module_name, name, handler, help, @@ -141,7 +140,7 @@ class PluginManager(object): Add a global command. """ if name in self.core.commands: - raise Exception(_("Command '%s' already exists") % (name,)) + raise Exception("Command '%s' already exists" % (name,)) commands = self.commands[module_name] commands[name] = core.Command(handler, help, completion, short, usage) @@ -228,7 +227,7 @@ class PluginManager(object): already exists. """ if key in self.core.key_func: - raise Exception(_("Key '%s' already exists") % (key,)) + raise Exception("Key '%s' already exists" % (key,)) keys = self.keys[module_name] keys[key] = handler self.core.key_func[key] = handler @@ -279,7 +278,7 @@ class PluginManager(object): except: pass except OSError as e: - self.core.information(_('Completion failed: %s' % e), 'Error') + self.core.information('Completion failed: %s' % e, 'Error') return plugins_files = [name[:-3] for name in names if name.endswith('.py') and name != '__init__.py' and not name.startswith('.')] -- cgit v1.2.3