translate all modules in the plugin dir(whiteboard plugin for example. translate plugin.py and whiteboard_widget.py)

This commit is contained in:
Denis Fomin 2011-09-04 23:23:38 +03:00
parent 9fecdb6a9c
commit 4dd234321e
2 changed files with 6 additions and 7 deletions

View File

@ -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):

View File

@ -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,