diff --git a/plugins/whiteboard/plugin.py b/plugins/whiteboard/plugin.py index 141873cd99bd2a6f48ccfe81fd59902ea5f95f35..0ba419cd1c0caa95b817e5b25cfab312719a9691 100644 --- a/plugins/whiteboard/plugin.py +++ b/plugins/whiteboard/plugin.py @@ -120,11 +120,12 @@ class WhiteboardPlugin(GajimPlugin): if control.contact.supports(NS_JINGLE_SXE) and \ control.contact.supports(NS_SXE): base.button.set_sensitive(True) - base.button.set_tooltip_text(_('Show whiteboard')) + tooltip_text = _('Show whiteboard') else: base.button.set_sensitive(False) - base.button.set_tooltip_text(_('Client on the other side ' - 'does not support the whiteboard')) + tooltip_text = _('Client on the other side ' + 'does not support the whiteboard') + base.button.set_tooltip_text(tooltip_text) @log_calls('WhiteboardPlugin') def show_request_dialog(self, account, fjid, jid, sid, content_types): diff --git a/src/plugins/pluginmanager.py b/src/plugins/pluginmanager.py index c1112ded1b53764e33286a3b683a7df17afd17cb..a7b81287be4d1e5beeaadbd49509924de3aa63ea 100644 --- a/src/plugins/pluginmanager.py +++ b/src/plugins/pluginmanager.py @@ -461,12 +461,10 @@ class PluginManager(object): conf.remove_section('info') plugins_found.append(module_attr) - # set plugin localization - plugin_module = dir(module)[-1] - getattr(module, plugin_module)._ = _ except TypeError, type_error: - pass + # set plugin localization + module_attr._ = _ except ConfigParser.NoOptionError, type_error: # all fields are required log.debug('%s : %s' % (module_attr_name,