From 8a32eaf0f031aad4ac39742ed60f52aecf221425 Mon Sep 17 00:00:00 2001 From: Denis Fomin <fominde@gmail.com> Date: Fri, 2 Sep 2011 22:50:36 +0300 Subject: [PATCH] make plugins description translatable --- plugins/acronyms_expander/acronyms_expander.py | 2 ++ plugins/banner_tweaks/plugin.py | 4 ++++ plugins/dbus_plugin/plugin.py | 3 +++ plugins/events_dump/plugin.py | 1 + plugins/google_translation/plugin.py | 2 ++ plugins/length_notifier/length_notifier.py | 11 +++++++---- plugins/new_events_example/plugin.py | 2 ++ plugins/plugin_installer/plugin_installer.py | 1 + plugins/roster_buttons/plugin.py | 1 + plugins/snarl_notifications/plugin.py | 4 ++++ plugins/triggers/triggers.py | 1 + plugins/whiteboard/plugin.py | 2 ++ 12 files changed, 30 insertions(+), 4 deletions(-) diff --git a/plugins/acronyms_expander/acronyms_expander.py b/plugins/acronyms_expander/acronyms_expander.py index e325f67bf..d98e255ff 100644 --- a/plugins/acronyms_expander/acronyms_expander.py +++ b/plugins/acronyms_expander/acronyms_expander.py @@ -36,6 +36,8 @@ class AcronymsExpanderPlugin(GajimPlugin): @log_calls('AcronymsExpanderPlugin') def init(self): + self.description = _('Replaces acronyms (or other strings) ' + 'with given expansions/substitutes.') self.config_dialog = None self.gui_extension_points = { diff --git a/plugins/banner_tweaks/plugin.py b/plugins/banner_tweaks/plugin.py index b3d9dcda4..6439dd51b 100644 --- a/plugins/banner_tweaks/plugin.py +++ b/plugins/banner_tweaks/plugin.py @@ -45,6 +45,10 @@ class BannerTweaksPlugin(GajimPlugin): @log_calls('BannerTweaksPlugin') def init(self): + self.description = _('Allows user to tweak chat window banner ' + 'appearance (eg. make it compact).\n' + 'Based on patch by pb in ticket #4133:\n' + 'http://trac.gajim.org/attachment/ticket/4133.') self.config_dialog = BannerTweaksPluginConfigDialog(self) self.gui_extension_points = { diff --git a/plugins/dbus_plugin/plugin.py b/plugins/dbus_plugin/plugin.py index b7289aed0..3a583a7cf 100644 --- a/plugins/dbus_plugin/plugin.py +++ b/plugins/dbus_plugin/plugin.py @@ -688,6 +688,9 @@ class DBusPlugin(GajimPlugin): @log_calls('DBusPlugin') def init(self): + self.description = _('D-Bus support.' + ' Based on remote_control module from' + '\nGajim core but uses new events handling system.') self.config_dialog = None #self.gui_extension_points = {} #self.config_default_values = {} diff --git a/plugins/events_dump/plugin.py b/plugins/events_dump/plugin.py index 0d1026165..19c5eccfc 100644 --- a/plugins/events_dump/plugin.py +++ b/plugins/events_dump/plugin.py @@ -36,6 +36,7 @@ class EventsDumpPlugin(GajimPlugin): @log_calls('EventsDumpPlugin') def init(self): + self.description = _('Dumps info about selected events to console.') self.config_dialog = None #self.gui_extension_points = {} #self.config_default_values = {} diff --git a/plugins/google_translation/plugin.py b/plugins/google_translation/plugin.py index faa198560..227f70fda 100644 --- a/plugins/google_translation/plugin.py +++ b/plugins/google_translation/plugin.py @@ -44,6 +44,8 @@ class GoogleTranslationPlugin(GajimPlugin): @log_calls('GoogleTranslationPlugin') def init(self): + self.description = _('Translates (currently only incoming)' + 'messages using Google Translate.') self.config_dialog = None #self.gui_extension_points = {} self.config_default_values = { diff --git a/plugins/length_notifier/length_notifier.py b/plugins/length_notifier/length_notifier.py index 6c8f1ce12..3c9e9bccc 100644 --- a/plugins/length_notifier/length_notifier.py +++ b/plugins/length_notifier/length_notifier.py @@ -36,6 +36,8 @@ class LengthNotifierPlugin(GajimPlugin): @log_calls('LengthNotifierPlugin') def init(self): + self.description = _('Highlights message entry field in chat window ' + 'when given length of message is exceeded.') self.config_dialog = LengthNotifierPluginConfigDialog(self) self.gui_extension_points = { @@ -43,10 +45,11 @@ class LengthNotifierPlugin(GajimPlugin): self.disconnect_from_chat_control) } - self.config_default_values = {'MESSAGE_WARNING_LENGTH' : (140, 'Message length at which notification is invoked.'), - 'WARNING_COLOR' : ('#F0DB3E', 'Background color of text entry field in chat window when notification is invoked.'), - 'JIDS' : ([], 'JabberIDs that plugin should be used with (eg. restrict only to one microblogging bot). If empty plugin is used with every JID. [not implemented]') - } + self.config_default_values = { + 'MESSAGE_WARNING_LENGTH' : (140, 'Message length at which notification is invoked.'), + 'WARNING_COLOR' : ('#F0DB3E', 'Background color of text entry field in chat window when notification is invoked.'), + 'JIDS' : ([], 'JabberIDs that plugin should be used with (eg. restrict only to one microblogging bot). If empty plugin is used with every JID. [not implemented]') + } @log_calls('LengthNotifierPlugin') def textview_length_warning(self, tb, chat_control): diff --git a/plugins/new_events_example/plugin.py b/plugins/new_events_example/plugin.py index d113bd54d..f66c0dda2 100644 --- a/plugins/new_events_example/plugin.py +++ b/plugins/new_events_example/plugin.py @@ -41,6 +41,8 @@ class NewEventsExamplePlugin(GajimPlugin): @log_calls('NewEventsExamplePlugin') def init(self): + self.description = _('Shows how to generate new network events based ' + 'on existing one using Network Events Controller.') self.config_dialog = None #self.gui_extension_points = {} #self.config_default_values = {} diff --git a/plugins/plugin_installer/plugin_installer.py b/plugins/plugin_installer/plugin_installer.py index 72157e11f..b546157cc 100644 --- a/plugins/plugin_installer/plugin_installer.py +++ b/plugins/plugin_installer/plugin_installer.py @@ -41,6 +41,7 @@ class PluginInstaller(GajimPlugin): @log_calls('PluginInstallerPlugin') def init(self): + self.description = _('Install and upgrade plugins from ftp') self.config_dialog = PluginInstallerPluginConfigDialog(self) self.config_default_values = {'ftp_server': ('ftp.gajim.org', '')} diff --git a/plugins/roster_buttons/plugin.py b/plugins/roster_buttons/plugin.py index ce1678fe7..026658b5e 100644 --- a/plugins/roster_buttons/plugin.py +++ b/plugins/roster_buttons/plugin.py @@ -36,6 +36,7 @@ class RosterButtonsPlugin(GajimPlugin): @log_calls('RosterButtonsPlugin') def init(self): + self.description = _('Adds quick action buttons to roster window.') self.GTK_BUILDER_FILE_PATH = self.local_file_path('roster_buttons.ui') self.roster_vbox = gajim.interface.roster.xml.get_object('roster_vbox2') self.show_offline_contacts_menuitem = gajim.interface.roster.xml.get_object('show_offline_contacts_menuitem') diff --git a/plugins/snarl_notifications/plugin.py b/plugins/snarl_notifications/plugin.py index 7dfe24d26..82247c5e6 100644 --- a/plugins/snarl_notifications/plugin.py +++ b/plugins/snarl_notifications/plugin.py @@ -41,6 +41,10 @@ class SnarlNotificationsPlugin(GajimPlugin): @log_calls('SnarlNotificationsPlugin') def init(self): + self.description = _('Shows events notification using Snarl ' + '(http://www.fullphat.net/) under Windows. ' + 'Snarl needs to be installed in system.\n' + 'PySnarl bindings are used (http://code.google.com/p/pysnarl/).') self.config_dialog = None #self.gui_extension_points = {} #self.config_default_values = {} diff --git a/plugins/triggers/triggers.py b/plugins/triggers/triggers.py index bca98263c..8746df211 100644 --- a/plugins/triggers/triggers.py +++ b/plugins/triggers/triggers.py @@ -34,6 +34,7 @@ class Triggers(GajimPlugin): @log_calls('TriggersPlugin') def init(self): + self.description = _('Configure Gajim\'s behaviour for each contact') self.config_dialog = TriggersPluginConfigDialog(self) self.config_default_values = {} diff --git a/plugins/whiteboard/plugin.py b/plugins/whiteboard/plugin.py index 2716c203e..ba281d705 100644 --- a/plugins/whiteboard/plugin.py +++ b/plugins/whiteboard/plugin.py @@ -52,6 +52,8 @@ NS_SXE = 'urn:xmpp:sxe:0' class WhiteboardPlugin(GajimPlugin): @log_calls('WhiteboardPlugin') def init(self): + self.description = _('Shows a whiteboard in chat.' + ' python-pygoocanvas is required.') self.config_dialog = None self.events_handlers = { 'jingle-request-received': (ged.GUI1, self._nec_jingle_received), -- GitLab