Skip to content
Snippets Groups Projects
Commit da6bafb8 authored by Dicson's avatar Dicson
Browse files

translate all modules in the plugin dir(whiteboard plugin for example....

translate all modules in the plugin dir(whiteboard plugin for example. translate plugin.py and whiteboard_widget.py)
parent 1ef09118
No related branches found
No related tags found
No related merge requests found
......@@ -120,11 +120,12 @@ def update_button_state(self, control):
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):
......
......@@ -461,12 +461,10 @@ def scan_dir_for_plugins(path, scan_dirs=True):
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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment