[Pysvnmanager-svn] SF.net SVN: pysvnmanager:[46] trunk
Status: Alpha
Brought to you by:
jiangx
From: <ji...@us...> - 2008-08-27 14:04:24
|
Revision: 46 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=46&view=rev Author: jiangx Date: 2008-08-27 14:04:28 +0000 (Wed, 27 Aug 2008) Log Message: ----------- plugins refactor; add more hook-plugins Modified Paths: -------------- trunk/config/Makefile trunk/pysvnmanager/controllers/repos.py trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py trunk/pysvnmanager/hooks/plugins/__init__.py trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/i18n/pysvnmanager.pot trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/templates/repos/hooks.mako trunk/pysvnmanager/tests/functional/test_repos.py trunk/pysvnmanager/tests/test_repos.py Added Paths: ----------- trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py trunk/pysvnmanager/hooks/plugins/EmailNotify.py trunk/pysvnmanager/hooks/plugins/MergeinfoClient.py trunk/pysvnmanager/model/rest.py Modified: trunk/config/Makefile =================================================================== --- trunk/config/Makefile 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/config/Makefile 2008-08-27 14:04:28 UTC (rev 46) @@ -8,6 +8,7 @@ @-rm $(CONFFILE) >/dev/null 2>&1 @-rm localconfig.pyc >/dev/null 2>&1 @-rm -f *,v RCS/*test,v 2>&1 + @-rm -rf ../svnroot.test %: $(SRCDIR)/%.in cp $< $@ Modified: trunk/pysvnmanager/controllers/repos.py =================================================================== --- trunk/pysvnmanager/controllers/repos.py 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/controllers/repos.py 2008-08-27 14:04:28 UTC (rev 46) @@ -66,7 +66,7 @@ return msg - def get_remove_hook_form_content(self): + def get_installed_hook_form(self): reposname = request.params.get('select') h = _hooks.Hooks(self.repos_root + '/' + reposname) msg = '' @@ -86,25 +86,28 @@ msg += '<input type="checkbox" name="pluginid_%(num)d" value="%(plugin)s">' % { 'num': num, 'plugin': name, } msg += "</td>\n" - msg += "<td>" + name + "</td>\n" + msg += "<td><a href='#' onclick=\"show_hook_config_form('%s'); return false;\">" % name + name + "</a></td>\n" msg += "<td>" + h.plugins[name].name + "</td>\n" msg += "<td>" + h.plugins[name].get_type() + "</td>\n" msg += "</tr>\n" - msg += "<tr><td></td><td colspan='3'>" + h.plugins[name].detail + "</td></tr>\n" + msg += "<tr><td></td><td colspan='3'>" + h.plugins[name].show_install_info() + "</td></tr>\n" num += 1 msg += "</table>\n" - msg += '<input type="submit" name="remove_hook" value="%s">\n' % _("Remove selected hooks") + msg += '<input type="submit" name="uninstall_hook" value="%s">\n' % _("Remove selected hooks") return msg - def get_hook_form(self): + def get_hook_setting_form(self): reposname = request.params.get('repos') pluginname = request.params.get('plugin') h = _hooks.Hooks(self.repos_root + '/' + reposname) + result = "<input type='hidden' name='_repos' value='%s'>" % reposname + result += "<input type='hidden' name='_plugin' value='%s'>" % pluginname + result += h.plugins[pluginname].show_install_config_form() - return h.plugins[pluginname].install_config_form() + return result - def apply_new_hook(self): + def setup_hook(self): try: d = request.params reposname = d.get("_repos") @@ -120,7 +123,7 @@ "plugin": pluginname, "repos":reposname} + "</div>" return result - def remove_hook(self): + def uninstall_hook(self): plugin_list=[] d = request.params reposname = d.get("_repos") Added: trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py (rev 0) +++ trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py 2008-08-27 14:04:28 UTC (rev 46) @@ -0,0 +1,84 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from pysvnmanager.hooks.plugins import * +from pysvnmanager.hooks.plugins import _ + +class MantisIntegration(PluginBase): + + # Plugin id + id = __name__.rsplit('.',1)[-1] + + # Brief name for this plugin. + name = _("Mantis bugtracking integration") + + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + + # Short description for this plugin. + description = _("Integration Subversion with Mantis bugtracking. " + "If commit-log has proper format (contains bugid), " + "it will change bug status and append commint-log " + "and code differ as comment of bug status change.") + + # Long description for this plugin. + detail = "" + + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK + type = T_POST_COMMIT + + # Plugin config option/value in config ini file. + key = "mantis_integration" + value = "yes" + + def enabled(self): + """ + Return True, if this plugin has been installed. + Simply call 'has_config()'. + """ + return self.has_config() + + def install_info(self): + """ + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html + """ + return self.description + + def install_config_form(self): + """ + This method will be called to build setup configuration form. + If this plugin needs parameters, provides form fields here. + Any html and javascript are welcome. + """ + return "" + + def uninstall(self): + """ + Uninstall hooks-plugin from repository. + Simply call 'unset_config()' and 'save()'. + """ + self.unset_config() + self.save() + + def install(self, params=None): + """ + Install hooks-plugin from repository. + Simply call 'set_config()' and 'save()'. + + Form fields in setup_config() will pass as params. + """ + self.set_config() + self.save() + +def execute(repospath=""): + """ + Generate and return a hooks plugin object + + @param request: repos full path + @rtype: Plugin + @return: Plugin object + """ + return MantisIntegration(repospath) Modified: trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py 2008-08-27 14:04:28 UTC (rev 46) @@ -6,29 +6,41 @@ class CaseInsensitive(PluginBase): + # Plugin id + id = __name__.rsplit('.',1)[-1] + # Brief name for this plugin. name = _("check case insensitive") - # Longer description for this plugin. + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + + # Short description for this plugin. description = _("A pre-commit hook to detect case-insensitive filename clashes.") + # Long description for this plugin. + detail = "" + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK type = T_PRE_COMMIT - + # Plugin config option/value in config ini file. key = "case_insensitive" value = "yes" def enabled(self): """ - Return True, if this plugin has been setup. + Return True, if this plugin has been installed. Simply call 'has_config()'. """ return self.has_config() - def get_detail(self): + def install_info(self): """ - Show detail informantion if plugin is already installed. + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html """ return self.description @@ -37,10 +49,8 @@ This method will be called to build setup configuration form. If this plugin needs parameters, provides form fields here. Any html and javascript are welcome. - - Default: just output description. """ - return super(CaseInsensitive, self).install_config_form() + return "" def uninstall(self): """ Added: trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py (rev 0) +++ trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py 2008-08-27 14:04:28 UTC (rev 46) @@ -0,0 +1,81 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from pysvnmanager.hooks.plugins import * +from pysvnmanager.hooks.plugins import _ + +class CommitLogCheck(PluginBase): + + # Plugin id + id = __name__.rsplit('.',1)[-1] + + # Brief name for this plugin. + name = _("Check commit log message") + + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + + # Short description for this plugin. + description = _("User must provide commit-log message when checkin.") + + # Long description for this plugin. + detail = "" + + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK + type = T_PRE_COMMIT + + # Plugin config option/value in config ini file. + key = "commit_log_check" + value = "yes" + + def enabled(self): + """ + Return True, if this plugin has been installed. + Simply call 'has_config()'. + """ + return self.has_config() + + def install_info(self): + """ + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html + """ + return self.description + + def install_config_form(self): + """ + This method will be called to build setup configuration form. + If this plugin needs parameters, provides form fields here. + Any html and javascript are welcome. + """ + return "" + + def uninstall(self): + """ + Uninstall hooks-plugin from repository. + Simply call 'unset_config()' and 'save()'. + """ + self.unset_config() + self.save() + + def install(self, params=None): + """ + Install hooks-plugin from repository. + Simply call 'set_config()' and 'save()'. + + Form fields in setup_config() will pass as params. + """ + self.set_config() + self.save() + +def execute(repospath=""): + """ + Generate and return a hooks plugin object + + @param request: repos full path + @rtype: Plugin + @return: Plugin object + """ + return CommitLogCheck(repospath) Added: trunk/pysvnmanager/hooks/plugins/EmailNotify.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/EmailNotify.py (rev 0) +++ trunk/pysvnmanager/hooks/plugins/EmailNotify.py 2008-08-27 14:04:28 UTC (rev 46) @@ -0,0 +1,144 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from pysvnmanager.hooks.plugins import * +from pysvnmanager.hooks.plugins import _ + +class EmailNotify(PluginBase): + + # Plugin id + id = __name__.rsplit('.',1)[-1] + + # Brief name for this plugin. + name = _("Send email notify for commit event") + + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + + # Short description for this plugin. + description = _("Send a notification email describing either a commit or " + "a revprop-change action on a Subversion repository.") + + # Long description for this plugin. + detail = _(""" +You must provide proper options to commit-email.pl using the +configuration form for this plugin. + +You can simply just provide the email_addr as the options. + + [options] email_addr [email_addr ...] + +But to be more versitile, you can setup a path-based email +notifier. + + [-m regex1] [options] [email_addr ...] + [-m regex2] [options] [email_addr ...] + ... + +Options: + +-m regex Regular expression to match committed path +--from email_address Email address for 'From:' (overrides -h) +-r email_address Email address for 'Reply-To: +-s subject_prefix Subject line prefix +--diff n Do not include diff in message (default: y) +""") + + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK + type = T_POST_COMMIT + + # Plugin config option/value in config ini file. + # email_notify_enable = yes|no + # email_notify_config = -m "." --diff y --from <from@addr> -r <reply@addr> -s "[prefix]" to@addr + key_switch = "email_notify_enable" + key_config = "email_notify_config" + + def enabled(self): + """ + Return True, if this plugin has been installed. + Simply call 'has_config()'. + """ + return self.has_config(self.key_switch) and self.has_config(self.key_config) + + def install_info(self): + """ + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html + """ + result = self.description + if self.enabled(): + result += "\n\n" + result += "**Current configuration**\n\n" + if self.get_config(self.key_switch) == "yes": + result += _("- Email notify enabled.") + else: + result += _("- Email notify disabled.") + result += "\n" + result += _("- Parameters: ``") + self.get_config(self.key_config) + '``' + + return result + + def install_config_form(self): + """ + This method will be called to build setup configuration form. + If this plugin needs parameters, provides form fields here. + Any html and javascript are welcome. + """ + if self.get_config(self.key_switch)=="yes": + enable_checked = "checked" + disable_checked = "" + else: + enable_checked = "" + disable_checked = "checked" + + result = "" + result += "<p><strong>%s</strong></p>" % _("Fill this form") + result += "<blockquote>" + result += _("Enable email notify.") + result += "<input type='radio' name='switch' value='yes' " + \ + enable_checked + ">" + _("Enable") + " " + result += "<input type='radio' name='switch' value='no' " + \ + disable_checked + ">" + _("Disable") + "<br>" + result += _("Input email notify configurations: ") + \ + "<input type='text' name='config' size='64' value='%s'>" % \ + self.get_config(self.key_config) + result += "</blockquote>" + return result + + def uninstall(self): + """ + Uninstall hooks-plugin from repository. + Simply call 'unset_config()' and 'save()'. + """ + self.unset_config(self.key_config) + self.unset_config(self.key_switch) + self.save() + + def install(self, params=None): + """ + Install hooks-plugin from repository. + Simply call 'set_config()' and 'save()'. + + Form fields in setup_config() will pass as params. + """ + switch = params.get('switch', 'yes') + if switch != 'yes': + switch = 'no' + config = params.get('config') + if not config: + raise Exception, _("Wrong configuration.") + self.set_config(self.key_switch, switch) + self.set_config(self.key_config, config) + self.save() + +def execute(repospath=""): + """ + Generate and return a hooks plugin object + + @param request: repos full path + @rtype: Plugin + @return: Plugin object + """ + return EmailNotify(repospath) Modified: trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py 2008-08-27 14:04:28 UTC (rev 46) @@ -6,12 +6,21 @@ class EolStyleCheck(PluginBase): + # Plugin id + id = __name__.rsplit('.',1)[-1] + # Brief name for this plugin. name = _("mime-type and eol-style check") - # Longer description for this plugin. + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + + # Short description for this plugin. description = _("New file must provide svn:eol-style if not binary file.") + # Long description for this plugin. + detail = "" + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK type = T_PRE_COMMIT @@ -21,14 +30,17 @@ def enabled(self): """ - Return True, if this plugin has been setup. + Return True, if this plugin has been installed. Simply call 'has_config()'. """ return self.has_config() - def get_detail(self): + def install_info(self): """ - Show detail informantion if plugin is already installed. + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html """ return self.description @@ -37,10 +49,8 @@ This method will be called to build setup configuration form. If this plugin needs parameters, provides form fields here. Any html and javascript are welcome. - - Default: just output description. """ - return super(EolStyleCheck, self).install_config_form() + return "" def uninstall(self): """ Added: trunk/pysvnmanager/hooks/plugins/MergeinfoClient.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/MergeinfoClient.py (rev 0) +++ trunk/pysvnmanager/hooks/plugins/MergeinfoClient.py 2008-08-27 14:04:28 UTC (rev 46) @@ -0,0 +1,81 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from pysvnmanager.hooks.plugins import * +from pysvnmanager.hooks.plugins import _ + +class MergeinfoClient(PluginBase): + + # Plugin id + id = __name__.rsplit('.',1)[-1] + + # Brief name for this plugin. + name = _("Subversion client mergeinfo capability check") + + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + + # Short description for this plugin. + description = _("Do not allow subversion client (<1.5) to checkin.") + + # Long description for this plugin. + detail = "" + + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK + type = T_PRE_COMMIT + + # Plugin config option/value in config ini file. + key = "client_capibility_check" + value = "yes" + + def enabled(self): + """ + Return True, if this plugin has been installed. + Simply call 'has_config()'. + """ + return self.has_config() + + def install_info(self): + """ + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html + """ + return self.description + + def install_config_form(self): + """ + This method will be called to build setup configuration form. + If this plugin needs parameters, provides form fields here. + Any html and javascript are welcome. + """ + return "" + + def uninstall(self): + """ + Uninstall hooks-plugin from repository. + Simply call 'unset_config()' and 'save()'. + """ + self.unset_config() + self.save() + + def install(self, params=None): + """ + Install hooks-plugin from repository. + Simply call 'set_config()' and 'save()'. + + Form fields in setup_config() will pass as params. + """ + self.set_config() + self.save() + +def execute(repospath=""): + """ + Generate and return a hooks plugin object + + @param request: repos full path + @rtype: Plugin + @return: Plugin object + """ + return MergeinfoClient(repospath) Modified: trunk/pysvnmanager/hooks/plugins/__init__.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/__init__.py 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/hooks/plugins/__init__.py 2008-08-27 14:04:28 UTC (rev 46) @@ -5,6 +5,8 @@ import time import logging +from pysvnmanager.model.rest import reSTify + # i18n works only as pysvnmanager (a pylons app) model. from pylons import config if config.get('package') and not config.has_key('unittest'): @@ -64,12 +66,21 @@ class PluginBase(object): """ Base class for hook plugins """ + # Plugin id (must be override!) + id = __name__.rsplit('.',1)[-1] + + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + # Brief name for this plugin. name = "" - # Longer description for this plugin. + # Short description for this plugin. description = "" + # Long description for this plugin. + detail = "" + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK type = 0 @@ -116,6 +127,14 @@ # not out-of-date if config file not exist, or timestamp not changed. return False + def __cmp__(self, obj): + assert isinstance(obj, PluginBase) + if self.type == obj.type: + return cmp(self.id, obj.id) + else: + return cmp(self.type, obj.type) + + def reload(self, force=True): """ Reload the default config ini file, if out-of-date. @@ -152,26 +171,48 @@ result = default return result - def has_config(self): + def has_config(self, key="", value=""): """ Test if self.key = self.value is in the default config ini file. """ - if not hasattr(self, "key") or not hasattr(self, "value"): - raise Exception, _("Plugin not fully implemented.") + if key == "": + if not hasattr(self, "key"): + raise Exception, _("Plugin not fully implemented.") + else: + key = self.key + + if value == "": + if hasattr(self, "value"): + value = self.value if hasattr(self, "section"): section = self.section else: section = 'main' - return self.get_config(self.key, section=section) == self.value + setting = self.get_config(key, section=section) + if value: + return setting == value + elif setting != "": + return True + else: + return False - def set_config(self): + def set_config(self, key="", value=""): """ add self.key = self.value to default config ini file. """ - if not hasattr(self, "key") or not hasattr(self, "value"): - raise Exception, _("Plugin not fully implemented.") + if key == "": + if not hasattr(self, "key"): + raise Exception, _("Plugin not fully implemented.") + else: + key = self.key + + if value == "": + if not hasattr(self, "value"): + raise Exception, _("Plugin not fully implemented.") + else: + value = self.value if hasattr(self, "section"): section = self.section @@ -180,14 +221,17 @@ if not self.cp.has_section(section): self.cp.add_section(section) - self.cp.set(section, self.key, self.value) + self.cp.set(section, key, value) - def unset_config(self): + def unset_config(self, key=""): """ Remove self.key from default config ini file. """ - if not hasattr(self, "key") or not hasattr(self, "value"): - raise Exception, _("Plugin not fully implemented.") + if key == "": + if not hasattr(self, "key"): + raise Exception, _("Plugin not fully implemented.") + else: + key = self.key if hasattr(self, "section"): section = self.section @@ -195,21 +239,22 @@ section = 'main' if self.cp.has_section(section): - self.cp.remove_option(section, self.key) + self.cp.remove_option(section, key) # test if section is blank after remove option. if not self.cp.options(section): self.cp.remove_section(section) - def get_detail(self): + def install_info(self): """ - Show detail informantion if plugin is already installed. + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html """ - if self.enabled(): - return self.description - else: - return "" + return self.description - detail = property(get_detail) + def show_install_info(self): + return reSTify(self.install_info()) def get_type(self): type = "UNDEFINED" @@ -239,13 +284,44 @@ If this plugin needs parameters, provides form fields here. Any html and javascript are welcome. - Default: just output description. + If plugin does not need further configuration, simply return null str. """ - result = "<ul><li>" + _("Plugin name") + ": " + self.name + "\n" + \ - "<li>" + _("Type") + ": " + self.get_type() + "\n" + \ - "<li>" + _("Description") + ": " + self.description + "\n" - return result + return "" + + def show_install_config_form(self): + """ + This method will be called to build setup configuration form. + If this plugin needs parameters, provides form fields here. + Any html and javascript are welcome. + + return output reSTified html. + """ + header = """ +**%(id)s** +- %(t_name)s: %(name)s +- %(t_name)s: %(type)s + +**%(t_desc)s** + +%(desc)s + +%(detail)s +""" % { + 't_name': _('Name'), + 't_type': _('Type'), + 't_desc': _('Description'), + 'id':self.id.rsplit('.',1)[-1], + 'name': self.name, + 'type': self.get_type(), + 'desc': self.description, + 'detail': self.detail, + } + + header = reSTify(header) + form = self.install_config_form() or "" + return header + form + def enabled(self): """ Return True, if this plugin has been setup. Modified: trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po =================================================================== --- trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-08-27 14:04:28 UTC (rev 46) @@ -9,7 +9,7 @@ "Project-Id-Version: pysvnmanager 0.0.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-07-03 22:14+0800\n" -"PO-Revision-Date: 2008-08-27 00:06+0800\n" +"PO-Revision-Date: 2008-08-27 21:52+0800\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: en <LL...@li...>\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" @@ -144,12 +144,11 @@ msgstr "" #: pysvnmanager/controllers/repos.py:81 -#: pysvnmanager/hooks/plugins/__init__.py:244 msgid "Plugin name" msgstr "" #: pysvnmanager/controllers/repos.py:82 -#: pysvnmanager/hooks/plugins/__init__.py:245 +#: pysvnmanager/hooks/plugins/__init__.py:312 msgid "Type" msgstr "" @@ -157,55 +156,55 @@ msgid "Remove selected hooks" msgstr "" -#: pysvnmanager/controllers/repos.py:116 +#: pysvnmanager/controllers/repos.py:119 #, python-format msgid "" "Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:119 +#: pysvnmanager/controllers/repos.py:122 #, python-format msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:140 +#: pysvnmanager/controllers/repos.py:143 #, python-format msgid "" "Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:143 +#: pysvnmanager/controllers/repos.py:146 #, python-format msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:146 +#: pysvnmanager/controllers/repos.py:149 #, python-format msgid "No plugin has been deleted for '%(repos)s'." msgstr "" -#: pysvnmanager/controllers/repos.py:155 +#: pysvnmanager/controllers/repos.py:158 #, python-format msgid "" "Create repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:158 +#: pysvnmanager/controllers/repos.py:161 #, python-format msgid "Create repository '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:171 +#: pysvnmanager/controllers/repos.py:174 #, python-format msgid "" "Delete repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:174 +#: pysvnmanager/controllers/repos.py:177 #, python-format msgid "Delete blank repository '%(repos)s' success." msgstr "" @@ -245,42 +244,146 @@ msgid "User %s logged out" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:13 +msgid "Mantis bugtracking integration" +msgstr "" + +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:19 +msgid "" +"Integration Subversion with Mantis bugtracking. If commit-log has proper " +"format (contains bugid), it will change bug status and append commint-log" +" and code differ as comment of bug status change." +msgstr "" + +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 msgid "check case insensitive" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 msgid "A pre-commit hook to detect case-insensitive filename clashes." msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:13 +msgid "Check commit log message" +msgstr "" + +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:19 +msgid "User must provide commit-log message when checkin." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:13 +msgid "Send email notify for commit event" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:19 +msgid "" +"Send a notification email describing either a commit or a revprop-change " +"action on a Subversion repository." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:23 +msgid "" +"\n" +"You must provide proper options to commit-email.pl using the\n" +"configuration form for this plugin.\n" +"\n" +"You can simply just provide the email_addr as the options.\n" +"\n" +" [options] email_addr [email_addr ...]\n" +"\n" +"But to be more versitile, you can setup a path-based email \n" +"notifier.\n" +"\n" +" [-m regex1] [options] [email_addr ...]\n" +" [-m regex2] [options] [email_addr ...] \n" +" ...\n" +"\n" +"Options:\n" +"\n" +"-m regex Regular expression to match committed path\n" +"--from email_address Email address for 'From:' (overrides -h)\n" +"-r email_address Email address for 'Reply-To:\n" +"-s subject_prefix Subject line prefix\n" +"--diff n Do not include diff in message (default: y)\n" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:75 +msgid "- Email notify enabled." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:77 +msgid "- Email notify disabled." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:79 +msgid "- Parameters: ``" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:97 +msgid "Fill this form" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:99 +msgid "Enable email notify." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:101 +msgid "Enable" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:103 +msgid "Disable" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:104 +msgid "Input email notify configurations: " +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:131 +msgid "Wrong configuration." +msgstr "" + +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 msgid "mime-type and eol-style check" msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:19 msgid "New file must provide svn:eol-style if not binary file." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:84 +#: pysvnmanager/hooks/plugins/MergeinfoClient.py:13 +msgid "Subversion client mergeinfo capability check" +msgstr "" + +#: pysvnmanager/hooks/plugins/MergeinfoClient.py:19 +msgid "Do not allow subversion client (<1.5) to checkin." +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:95 #, python-format msgid "repos '%s' not exist!" msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:133 +#: pysvnmanager/hooks/plugins/__init__.py:152 #, python-format msgid "Conflict: plugin '%s' is modified by others." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:160 -#: pysvnmanager/hooks/plugins/__init__.py:174 -#: pysvnmanager/hooks/plugins/__init__.py:190 -#: pysvnmanager/hooks/plugins/__init__.py:254 -#: pysvnmanager/hooks/plugins/__init__.py:261 -#: pysvnmanager/hooks/plugins/__init__.py:270 +#: pysvnmanager/hooks/plugins/__init__.py:180 +#: pysvnmanager/hooks/plugins/__init__.py:207 +#: pysvnmanager/hooks/plugins/__init__.py:213 +#: pysvnmanager/hooks/plugins/__init__.py:232 +#: pysvnmanager/hooks/plugins/__init__.py:330 +#: pysvnmanager/hooks/plugins/__init__.py:337 +#: pysvnmanager/hooks/plugins/__init__.py:346 msgid "Plugin not fully implemented." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:246 +#: pysvnmanager/hooks/plugins/__init__.py:311 +msgid "Name" +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:313 msgid "Description" msgstr "" @@ -421,7 +524,7 @@ #: pysvnmanager/templates/base.mako:36 #: pysvnmanager/templates/repos/hooks.mako:5 -#: pysvnmanager/templates/repos/hooks.mako:189 +#: pysvnmanager/templates/repos/hooks.mako:182 msgid "Repos management" msgstr "" @@ -502,7 +605,7 @@ msgstr "" #: pysvnmanager/templates/authz/index.mako:597 -#: pysvnmanager/templates/repos/hooks.mako:195 +#: pysvnmanager/templates/repos/hooks.mako:188 msgid "Repository:" msgstr "" @@ -661,23 +764,23 @@ msgid "Repository name:" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:198 +#: pysvnmanager/templates/repos/hooks.mako:191 msgid "Add repository" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:199 +#: pysvnmanager/templates/repos/hooks.mako:192 #: pysvnmanager/templates/repos/remove.mako:5 #: pysvnmanager/templates/repos/remove.mako:49 #: pysvnmanager/templates/repos/remove.mako:67 msgid "Remove repository" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:204 +#: pysvnmanager/templates/repos/hooks.mako:197 msgid "Uninstalled hooks:" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:226 -msgid "Enable this hook" +#: pysvnmanager/templates/repos/hooks.mako:223 +msgid "Install this plugin" msgstr "" #: pysvnmanager/templates/role/index.mako:5 @@ -761,3 +864,17 @@ msgid "User name:" msgstr "" +#~ msgid "" +#~ "\n" +#~ "**%(id)s**\n" +#~ "\n" +#~ "- %(t_name)s: %(name)s\n" +#~ "- %(t_name)s: %(type)s\n" +#~ "\n" +#~ "**%(t_desc)s**\n" +#~ "\n" +#~ "%(desc)s\n" +#~ "\n" +#~ "%(detail)s\n" +#~ msgstr "" + Modified: trunk/pysvnmanager/i18n/pysvnmanager.pot =================================================================== --- trunk/pysvnmanager/i18n/pysvnmanager.pot 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/i18n/pysvnmanager.pot 2008-08-27 14:04:28 UTC (rev 46) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: pySvnManager 0.2.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2008-08-27 00:06+0800\n" +"POT-Creation-Date: 2008-08-27 21:52+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -136,11 +136,11 @@ msgid "Id" msgstr "" -#: pysvnmanager/controllers/repos.py:81 pysvnmanager/hooks/plugins/__init__.py:244 +#: pysvnmanager/controllers/repos.py:81 msgid "Plugin name" msgstr "" -#: pysvnmanager/controllers/repos.py:82 pysvnmanager/hooks/plugins/__init__.py:245 +#: pysvnmanager/controllers/repos.py:82 pysvnmanager/hooks/plugins/__init__.py:312 msgid "Type" msgstr "" @@ -148,55 +148,55 @@ msgid "Remove selected hooks" msgstr "" -#: pysvnmanager/controllers/repos.py:116 +#: pysvnmanager/controllers/repos.py:119 #, python-format msgid "" "Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:119 +#: pysvnmanager/controllers/repos.py:122 #, python-format msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:140 +#: pysvnmanager/controllers/repos.py:143 #, python-format msgid "" "Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:143 +#: pysvnmanager/controllers/repos.py:146 #, python-format msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:146 +#: pysvnmanager/controllers/repos.py:149 #, python-format msgid "No plugin has been deleted for '%(repos)s'." msgstr "" -#: pysvnmanager/controllers/repos.py:155 +#: pysvnmanager/controllers/repos.py:158 #, python-format msgid "" "Create repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:158 +#: pysvnmanager/controllers/repos.py:161 #, python-format msgid "Create repository '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:171 +#: pysvnmanager/controllers/repos.py:174 #, python-format msgid "" "Delete repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:174 +#: pysvnmanager/controllers/repos.py:177 #, python-format msgid "Delete blank repository '%(repos)s' success." msgstr "" @@ -236,42 +236,146 @@ msgid "User %s logged out" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:13 +msgid "Mantis bugtracking integration" +msgstr "" + +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:19 +msgid "" +"Integration Subversion with Mantis bugtracking. If commit-log has proper " +"format (contains bugid), it will change bug status and append commint-log and" +" code differ as comment of bug status change." +msgstr "" + +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 msgid "check case insensitive" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 msgid "A pre-commit hook to detect case-insensitive filename clashes." msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:13 +msgid "Check commit log message" +msgstr "" + +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:19 +msgid "User must provide commit-log message when checkin." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:13 +msgid "Send email notify for commit event" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:19 +msgid "" +"Send a notification email describing either a commit or a revprop-change " +"action on a Subversion repository." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:23 +msgid "" +"\n" +"You must provide proper options to commit-email.pl using the\n" +"configuration form for this plugin.\n" +"\n" +"You can simply just provide the email_addr as the options.\n" +"\n" +" [options] email_addr [email_addr ...]\n" +"\n" +"But to be more versitile, you can setup a path-based email \n" +"notifier.\n" +"\n" +" [-m regex1] [options] [email_addr ...]\n" +" [-m regex2] [options] [email_addr ...] \n" +" ...\n" +"\n" +"Options:\n" +"\n" +"-m regex Regular expression to match committed path\n" +"--from email_address Email address for 'From:' (overrides -h)\n" +"-r email_address Email address for 'Reply-To:\n" +"-s subject_prefix Subject line prefix\n" +"--diff n Do not include diff in message (default: y)\n" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:75 +msgid "- Email notify enabled." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:77 +msgid "- Email notify disabled." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:79 +msgid "- Parameters: ``" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:97 +msgid "Fill this form" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:99 +msgid "Enable email notify." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:101 +msgid "Enable" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:103 +msgid "Disable" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:104 +msgid "Input email notify configurations: " +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:131 +msgid "Wrong configuration." +msgstr "" + +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 msgid "mime-type and eol-style check" msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:19 msgid "New file must provide svn:eol-style if not binary file." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:84 +#: pysvnmanager/hooks/plugins/MergeinfoClient.py:13 +msgid "Subversion client mergeinfo capability check" +msgstr "" + +#: pysvnmanager/hooks/plugins/MergeinfoClient.py:19 +msgid "Do not allow subversion client (<1.5) to checkin." +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:95 #, python-format msgid "repos '%s' not exist!" msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:133 +#: pysvnmanager/hooks/plugins/__init__.py:152 #, python-format msgid "Conflict: plugin '%s' is modified by others." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:160 -#: pysvnmanager/hooks/plugins/__init__.py:174 -#: pysvnmanager/hooks/plugins/__init__.py:190 -#: pysvnmanager/hooks/plugins/__init__.py:254 -#: pysvnmanager/hooks/plugins/__init__.py:261 -#: pysvnmanager/hooks/plugins/__init__.py:270 +#: pysvnmanager/hooks/plugins/__init__.py:180 +#: pysvnmanager/hooks/plugins/__init__.py:207 +#: pysvnmanager/hooks/plugins/__init__.py:213 +#: pysvnmanager/hooks/plugins/__init__.py:232 +#: pysvnmanager/hooks/plugins/__init__.py:330 +#: pysvnmanager/hooks/plugins/__init__.py:337 +#: pysvnmanager/hooks/plugins/__init__.py:346 msgid "Plugin not fully implemented." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:246 +#: pysvnmanager/hooks/plugins/__init__.py:311 +msgid "Name" +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:313 msgid "Description" msgstr "" @@ -410,7 +514,7 @@ msgstr "" #: pysvnmanager/templates/base.mako:36 pysvnmanager/templates/repos/hooks.mako:5 -#: pysvnmanager/templates/repos/hooks.mako:189 +#: pysvnmanager/templates/repos/hooks.mako:182 msgid "Repos management" msgstr "" @@ -491,7 +595,7 @@ msgstr "" #: pysvnmanager/templates/authz/index.mako:597 -#: pysvnmanager/templates/repos/hooks.mako:195 +#: pysvnmanager/templates/repos/hooks.mako:188 msgid "Repository:" msgstr "" @@ -650,23 +754,23 @@ msgid "Repository name:" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:198 +#: pysvnmanager/templates/repos/hooks.mako:191 msgid "Add repository" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:199 +#: pysvnmanager/templates/repos/hooks.mako:192 #: pysvnmanager/templates/repos/remove.mako:5 #: pysvnmanager/templates/repos/remove.mako:49 #: pysvnmanager/templates/repos/remove.mako:67 msgid "Remove repository" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:204 +#: pysvnmanager/templates/repos/hooks.mako:197 msgid "Uninstalled hooks:" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:226 -msgid "Enable this hook" +#: pysvnmanager/templates/repos/hooks.mako:223 +msgid "Install this plugin" msgstr "" #: pysvnmanager/templates/role/index.mako:5 Modified: trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po =================================================================== --- trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po 2008-08-27 14:04:28 UTC (rev 46) @@ -8,18 +8,17 @@ # Jiang Xin <wor...@gm...>, 2008. msgid "" msgstr "" -"Project-Id-Version: pysvnmanager\n" +"Project-Id-Version: pysvnmanager\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-07-03 22:14+0800\n" -"PO-Revision-Date: 2008-08-27 00:07+0800\n" +"PO-Revision-Date: 2008-08-27 21:52+0800\n" "Last-Translator: Jiang Xin <wor...@gm...>\n" -"Language-Team: <zh...@li...>\n" +"Language-Team: <zh...@li...>\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.2\n" -"X-Generator: KBabel 1.11.4\n" #: pysvnmanager/controllers/authz.py:43 #: pysvnmanager/templates/authz/index.mako:152 @@ -147,12 +146,11 @@ msgstr "Id" #: pysvnmanager/controllers/repos.py:81 -#: pysvnmanager/hooks/plugins/__init__.py:244 msgid "Plugin name" msgstr "插件名称" #: pysvnmanager/controllers/repos.py:82 -#: pysvnmanager/hooks/plugins/__init__.py:245 +#: pysvnmanager/hooks/plugins/__init__.py:312 msgid "Type" msgstr "类型" @@ -160,7 +158,7 @@ msgid "Remove selected hooks" msgstr "删除选择的插件" -#: pysvnmanager/controllers/repos.py:116 +#: pysvnmanager/controllers/repos.py:119 #, python-format msgid "" "Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" @@ -169,12 +167,12 @@ "启用版本库'%(repos)s'的插件'%(plugin)s'失败。错误信息:<br>\n" "%(msg)s" -#: pysvnmanager/controllers/repos.py:119 +#: pysvnmanager/controllers/repos.py:122 #, python-format msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." msgstr "成功启用版本库'%(repos)s'的插件'%(plugin)s'。 " -#: pysvnmanager/controllers/repos.py:140 +#: pysvnmanager/controllers/repos.py:143 #, python-format msgid "" "Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" @@ -183,17 +181,17 @@ "删除版本库'%(repos)s'的插件'%(plugin)s'失败。错误信息:<br>\n" "%(msg)s" -#: pysvnmanager/controllers/repos.py:143 +#: pysvnmanager/controllers/repos.py:146 #, python-format msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." msgstr "成功删除版本库'%(repos)s'的插件'%(plugin)s'。" -#: pysvnmanager/controllers/repos.py:146 +#: pysvnmanager/controllers/repos.py:149 #, python-format msgid "No plugin has been deleted for '%(repos)s'." msgstr "未删除版本库'%(repos)s'的插件。" -#: pysvnmanager/controllers/repos.py:155 +#: pysvnmanager/controllers/repos.py:158 #, python-format msgid "" "Create repository '%(repos)s' Failed. Error message:<br>\n" @@ -202,12 +200,12 @@ "创建版本库'%(repos)s'失败。错误信息:<br>\n" "%(msg)s" -#: pysvnmanager/controllers/repos.py:158 +#: pysvnmanager/controllers/repos.py:161 #, python-format msgid "Create repository '%(repos)s' success." msgstr "成功创建版本库'%(repos)s'。" -#: pysvnmanager/controllers/repos.py:171 +#: pysvnmanager/controllers/repos.py:174 #, python-format msgid "" "Delete repository '%(repos)s' Failed. Error message:<br>\n" @@ -216,7 +214,7 @@ "删除版本库'%(repos)s'失败。错误信息:<br>\n" "%(msg)s" -#: pysvnmanager/controllers/repos.py:174 +#: pysvnmanager/controllers/repos.py:177 #, python-format msgid "Delete blank repository '%(repos)s' success." msgstr "成功删除版本库'%(repos)s'。" @@ -256,44 +254,170 @@ msgid "User %s logged out" msgstr "用户 %s 登出" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:13 +msgid "Mantis bugtracking integration" +msgstr "整合 Mantis 缺陷跟踪系统" + +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:19 +msgid "" +"Integration Subversion with Mantis bugtracking. If commit-log has proper " +"format (contains bugid), it will change bug status and append commint-log" +" and code differ as comment of bug status change." +msgstr "" +"与 Mantis 缺陷跟踪系统整合。当提交日志符合特定的规范(包含 bugid),将会触发 Mantis 缺陷跟踪系统,将 bug " +"的状态修改为已修改,并将commit-log 以及代码变更添加到说明中。" + +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 msgid "check case insensitive" msgstr "大小写不敏感" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 msgid "A pre-commit hook to detect case-insensitive filename clashes." msgstr "在 pre-commit 钩子中执行,检查文件名大小写引起的文件名冲突。" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:13 +msgid "Check commit log message" +msgstr "检查提交说明" + +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:19 +msgid "User must provide commit-log message when checkin." +msgstr "用户在代码提交时,必须提供提交说明。" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:13 +msgid "Send email notify for commit event" +msgstr "针对代码变更发出邮件通知" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:19 +msgid "" +"Send a notification email describing either a commit or a revprop-change " +"action on a Subversion repository." +msgstr "当对 Subversion 代码库中的代码修改或者修改状态,发出邮件通知。" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:23 +msgid "" +"\n" +"You must provide proper options to commit-email.pl using the\n" +"configuration form for this plugin.\n" +"\n" +"You can simply just provide the email_addr as the options.\n" +"\n" +" [options] email_addr [email_addr ...]\n" +"\n" +"But to be more versitile, you can setup a path-based email \n" +"notifier.\n" +"\n" +" [-m regex1] [options] [email_addr ...]\n" +" [-m regex2] [options] [email_addr ...] \n" +" ...\n" +"\n" +"Options:\n" +"\n" +"-m regex Regular expression to match committed path\n" +"--from email_address Email address for 'From:' (overrides -h)\n" +"-r email_address Email address for 'Reply-To:\n" +"-s subject_prefix Subject line prefix\n" +"--diff n Do not include diff in message (default: y)\n" +msgstr "" +"\n" +"您需要为代码变更的邮件通知设置参数。\n" +"\n" +"可以简单的提供邮件地址即可:\n" +"\n" +" [options] email_addr [email_addr ...]\n" +"\n" +"或者基于正则表达式,提供一个基于路径的代码变更的邮件通知。\n" +"\n" +" [-m regex1] [options] [email_addr ...]\n" +" [-m regex2] [options] [email_addr ...] \n" +" ...\n" +"\n" +"参数:\n" +"\n" +"-m regex 和提交路径相匹配的正则表达式\n" +"--from email_address 发信人地址\n" +"-r email_address 回复邮件地址\n" +"-s subject_prefix 标题的前缀,如 [Prefix]\n" +"--diff n 不包含代码差异(缺省包含)\n" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:75 +msgid "- Email notify enabled." +msgstr "- 邮件通知启用。" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:77 +msgid "- Email notify disabled." +msgstr "- 邮件通知关闭。" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:79 +msgid "- Parameters: ``" +msgstr "- 参数: ``" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:97 +msgid "Fill this form" +msgstr "填写表单" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:99 +msgid "Enable email notify." +msgstr "启用邮件通知。" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:101 +msgid "Enable" +msgstr "启用" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:103 +msgid "Disable" +msgstr "关闭" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:104 +msgid "Input email notify configurations: " +msgstr "输入邮件通知配置参数: " + +#: pysvnmanager/hooks/plugins/EmailNotify.py:131 +msgid "Wrong configuration." +msgstr "错误的配置" + +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 msgid "mime-type and eol-style check" msgstr "文件类型和换行符设置检查" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:19 msgid "New file must provide svn:eol-style if not binary file." msgstr "新增的文本文件,必须设置换行符。" -#: pysvnmanager/hooks/plugins/__init__.py:84 +#: pysvnmanager/hooks/plugins/MergeinfoClient.py:13 +msgid "Subversion client mergeinfo capability check" +msgstr "Subversion 客户端版本检查(mergeinfo 功能)" + +#: pysvnmanager/hooks/plugins/MergeinfoClient.py:19 +msgid "Do not allow subversion client (<1.5) to checkin." +msgstr "不允许小于 1.5 的 subversion 客户端进行提交。" + +#: pysvnmanager/hooks/plugins/__init__.py:95 #, python-format msgid "repos '%s' not exist!" msgstr "版本库 %s 不存在!" -#: pysvnmanager/hooks/plugins/__init__.py:133 +#: pysvnmanager/hooks/plugins/__init__.py:152 #, python-format msgid "Conflict: plugin '%s' is modified by others." msgstr "冲突:插件'%s'被其他人修改了。" -#: pysvnmanager/hooks/plugins/__init__.py:160 -#: pysvnmanager/hooks/plugins/__init__.py:174 -#: pysvnmanager/hooks/plugins/__init__.py:190 -#: pysvnmanager/hooks/plugins/__init__.py:254 -#: pysvnmanager/hooks/plugins/__init__.py:261 -#: pysvnmanager/hooks/plugins/__init__.py:270 +#: pysvnmanager/hooks/plugins/__init__.py:180 +#: pysvnmanager/hooks/plugins/__init__.py:207 +#: pysvnmanager/hooks/plugins/__init__.py:213 +#: pysvnmanager/hooks/plugins/__init__.py:232 +#: pysvnmanager/hooks/plugins/__init__.py:330 +#: pysvnmanager/hooks/plugins/__init__.py:337 +#: pysvnmanager/hooks/plugins/__init__.py:346 msgid "Plugin not fully implemented." msgstr "插件未完全实现。" -#: pysvnmanager/hooks/plugins/__init__.py:246 +#: pysvnmanager/hooks/plugins/__init__.py:311 +msgid "Name" +msgstr "名称" + +#: pysvnmanager/hooks/plugins/__init__.py:313 msgid "Description" -msgstr "描述" +msgstr "说明" #: pysvnmanager/model/repos.py:39 #, python-format @@ -452,7 +576,7 @@ #: pysvnmanager/templates/base.mako:36 #: pysvnmanager/templates/repos/hooks.mako:5 -#: pysvnmanager/templates/repos/hooks.mako:189 +#: pysvnmanager/templates/repos/hooks.mako:182 msgid "Repos management" msgstr "版本库管理" @@ -533,7 +657,7 @@ msgstr "成功删除模组:" #: pysvnmanager/templates/authz/index.mako:597 -#: pysvnmanager/templates/repos/hooks.mako:195 +#: pysvnmanager/templates/repos/hooks.mako:188 msgid "Repository:" msgstr "版本库:" @@ -692,24 +816,24 @@ msgid "Repository name:" msgstr "版本库名称:" -#: pysvnmanager/templates/repos/hooks.mako:198 +#: pysvnmanager/templates/repos/hooks.mako:191 msgid "Add repository" msgstr "添加版本库" -#: pysvnmanager/templates/repos/hooks.mako:199 +#: pysvnmanager/templates/repos/hooks.mako:192 #: pysvnmanager/templates/repos/remove.mako:5 #: pysvnmanager/templates/repos/remove.mako:49 #: pysvnmanager/templates/repos/remove.mako:67 msgid "Remove repository" msgstr "删除版本库" -#: pysvnmanager/templates/repos/hooks.mako:204 +#: pysvnmanager/templates/repos/hooks.mako:197 msgid "Uninstalled hooks:" msgstr "尚未安装的插件:" -#: pysvnmanager/templates/repos/hooks.mako:226 -msgid "Enable this hook" -msgstr "启用此插件" +#: pysvnmanager/templates/repos/hooks.mako:223 +msgid "Install this plugin" +msgstr "安装此插件" #: pysvnmanager/templates/role/index.mako:5 #: pysvnmanager/templates/role/index.mako:625 @@ -792,3 +916,17 @@ msgid "User name:" msgstr "用户名:" +#~ msgid "" +#~ "\n" +#~ "**%(id)s**\n" +#~ "\n" +#~ "- %(t_name)s: %(name)s\n" +#~ "- %(t_name)s: %(type)s\n" +#~ "\n" +#~ "**%(t_desc)s**\n" +#~ "\n" +#~ "%(desc)s\n" +#~ "\n" +#~ "%(detail)s\n" +#~ msgstr "" + Added: trunk/pysvnmanager/model/rest.py =================================================================== --- trunk/pysvnmanager/model/rest.py (rev 0) +++ trunk/pysvnmanager/model/rest.py 2008-08-27 14:04:28 UTC (rev 46) @@ -0,0 +1,26 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from docutils import core +from docutils.writers.html4css1 import Writer,HTMLTranslator + +class NoHeaderHTMLTranslator(HTMLTranslator): + def __init__(self, document): + HTMLTranslator.__init__(self,document) + self.head_prefix = ['','','','',''] + self.body_prefix = [] + self.body_suffix = [] + self.stylesheet = [] + + def astext(self): + return ''.join(self.body) + + +_w = Writer() +_w.translator_class = NoHeaderHTMLTranslator + +def reSTify(string): + result = core.publish_string(string,writer=_w) + if isinstance(result, basestring): + result = unicode(result, 'utf-8') + return result Modified: trunk/pysvnmanager/templates/repos/hooks.mako =================================================================== --- trunk/pysvnmanager/templates/repos/hooks.mako 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/templates/repos/hooks.mako 2008-08-27 14:04:28 UTC (rev 46) @@ -15,14 +15,14 @@ document.getElementById('repos_list_box').style.visibility = 'visible'; document.getElementById('repos_list_box').style.position = 'relative'; - document.getElementById('new_hook_list_box').style.visibility = 'hidden'; - document.getElementById('new_hook_list_box').style.position = 'absolute'; + document.getElementById('uninstall_hook_box').style.visibility = 'hidden'; + document.getElementById('uninstall_hook_box').style.position = 'absolute'; - document.getElementById('new_hook_setting_box').style.visibility = 'hidden'; - document.getElementById('new_hook_setting_box').style.position = 'absolute'; + document.getElementById('hook_setting_box').style.visibility = 'hidden'; + document.getElementById('hook_setting_box').style.position = 'absolute'; - document.getElementById('remove_hook_box').style.visibility = 'visible'; - document.getElementById('remove_hook_box').style.position = 'relative'; + document.getElementById('installed_hook_box').style.visibility = 'visible'; + document.getElementById('installed_hook_box').style.position = 'relative'; } @@ -68,7 +68,7 @@ if (name=='...'||name=='') { - document.getElementById('remove_hook_form_content').innerHTML = ""; + document.getElementById('installed_hook_form_contents').innerHTML = ""; show_init_form(); } else @@ -84,8 +84,8 @@ }); new Ajax.Updater( - 'remove_hook_form_content', - '${h.url_for(controller="repos", action="get_remove_hook_form_content")}', + 'installed_hook_form_contents', + '${h.url_for(controller="repos", action="get_installed_hook_form")}', {asynchronous:true, evalScripts:true, method:'post', onComplete: function(request) @@ -108,15 +108,15 @@ eval(code); if (total==1) { - document.getElementById('new_hook_list_box').style.visibility = 'hidden'; - document.getElementById('new_hook_list_box').style.position = 'absolute'; - document.getElementById('new_hook_setting_box').style.visibility = 'hidden'; - document.getElementById('new_hook_setting_box').style.position = 'absolute'; + docum... [truncated message content] |