Changeset 46
- Timestamp:
- 2008年08月27日 22时04分28秒 (4 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 11 modified
-
config/Makefile (modified) (1 diff)
-
pysvnmanager/controllers/repos.py (modified) (3 diffs)
-
pysvnmanager/hooks/plugins/BugtrackMantis.py (added)
-
pysvnmanager/hooks/plugins/CaseInsensitive.py (modified) (3 diffs)
-
pysvnmanager/hooks/plugins/CommitLogCheck.py (added)
-
pysvnmanager/hooks/plugins/EmailNotify.py (added)
-
pysvnmanager/hooks/plugins/EolStyleCheck.py (modified) (3 diffs)
-
pysvnmanager/hooks/plugins/MergeinfoClient.py (added)
-
pysvnmanager/hooks/plugins/__init__.py (modified) (8 diffs)
-
pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po (modified) (13 diffs)
-
pysvnmanager/i18n/pysvnmanager.pot (modified) (12 diffs)
-
pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po (modified) (13 diffs)
-
pysvnmanager/model/rest.py (added)
-
pysvnmanager/templates/repos/hooks.mako (modified) (8 diffs)
-
pysvnmanager/tests/functional/test_repos.py (modified) (7 diffs)
-
pysvnmanager/tests/test_repos.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/config/Makefile
r45 r46 9 9 @-rm localconfig.pyc >/dev/null 2>&1 10 10 @-rm -f *,v RCS/*test,v 2>&1 11 @-rm -rf ../svnroot.test 11 12 12 13 %: $(SRCDIR)/%.in -
trunk/pysvnmanager/controllers/repos.py
r45 r46 67 67 return msg 68 68 69 def get_ remove_hook_form_content(self):69 def get_installed_hook_form(self): 70 70 reposname = request.params.get('select') 71 71 h = _hooks.Hooks(self.repos_root + '/' + reposname) … … 87 87 'num': num, 'plugin': name, } 88 88 msg += "</td>\n" 89 msg += "<td> " + name + "</td>\n"89 msg += "<td><a href='#' onclick=\"show_hook_config_form('%s'); return false;\">" % name + name + "</a></td>\n" 90 90 msg += "<td>" + h.plugins[name].name + "</td>\n" 91 91 msg += "<td>" + h.plugins[name].get_type() + "</td>\n" 92 92 msg += "</tr>\n" 93 msg += "<tr><td></td><td colspan='3'>" + h.plugins[name]. detail+ "</td></tr>\n"93 msg += "<tr><td></td><td colspan='3'>" + h.plugins[name].show_install_info() + "</td></tr>\n" 94 94 num += 1 95 95 msg += "</table>\n" 96 msg += '<input type="submit" name=" remove_hook" value="%s">\n' % _("Remove selected hooks")96 msg += '<input type="submit" name="uninstall_hook" value="%s">\n' % _("Remove selected hooks") 97 97 98 98 return msg 99 99 100 def get_hook_ form(self):100 def get_hook_setting_form(self): 101 101 reposname = request.params.get('repos') 102 102 pluginname = request.params.get('plugin') 103 103 h = _hooks.Hooks(self.repos_root + '/' + reposname) 104 result = "<input type='hidden' name='_repos' value='%s'>" % reposname 105 result += "<input type='hidden' name='_plugin' value='%s'>" % pluginname 106 result += h.plugins[pluginname].show_install_config_form() 104 107 105 return h.plugins[pluginname].install_config_form()108 return result 106 109 107 def apply_new_hook(self):110 def setup_hook(self): 108 111 try: 109 112 d = request.params … … 121 124 return result 122 125 123 def remove_hook(self):126 def uninstall_hook(self): 124 127 plugin_list=[] 125 128 d = request.params -
trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py
r45 r46 7 7 class CaseInsensitive(PluginBase): 8 8 9 # Plugin id 10 id = __name__.rsplit('.',1)[-1] 11 9 12 # Brief name for this plugin. 10 13 name = _("check case insensitive") 11 14 12 # Longer description for this plugin. 15 # Both description and detail are reStructuredText format. 16 # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html 17 18 # Short description for this plugin. 13 19 description = _("A pre-commit hook to detect case-insensitive filename clashes.") 20 21 # Long description for this plugin. 22 detail = "" 14 23 15 24 # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK 16 25 type = T_PRE_COMMIT 17 26 18 27 # Plugin config option/value in config ini file. 19 28 key = "case_insensitive" … … 22 31 def enabled(self): 23 32 """ 24 Return True, if this plugin has been setup.33 Return True, if this plugin has been installed. 25 34 Simply call 'has_config()'. 26 35 """ 27 36 return self.has_config() 28 37 29 def get_detail(self):38 def install_info(self): 30 39 """ 31 Show detail informantion if plugin is already installed. 40 Show configurations if plugin is already installed. 41 42 return reStructuredText. 43 reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html 32 44 """ 33 45 return self.description … … 38 50 If this plugin needs parameters, provides form fields here. 39 51 Any html and javascript are welcome. 40 41 Default: just output description.42 52 """ 43 return super(CaseInsensitive, self).install_config_form()53 return "" 44 54 45 55 def uninstall(self): -
trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py
r45 r46 7 7 class EolStyleCheck(PluginBase): 8 8 9 # Plugin id 10 id = __name__.rsplit('.',1)[-1] 11 9 12 # Brief name for this plugin. 10 13 name = _("mime-type and eol-style check") 11 14 12 # Longer description for this plugin. 15 # Both description and detail are reStructuredText format. 16 # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html 17 18 # Short description for this plugin. 13 19 description = _("New file must provide svn:eol-style if not binary file.") 20 21 # Long description for this plugin. 22 detail = "" 14 23 15 24 # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK … … 22 31 def enabled(self): 23 32 """ 24 Return True, if this plugin has been setup.33 Return True, if this plugin has been installed. 25 34 Simply call 'has_config()'. 26 35 """ 27 36 return self.has_config() 28 37 29 def get_detail(self):38 def install_info(self): 30 39 """ 31 Show detail informantion if plugin is already installed. 40 Show configurations if plugin is already installed. 41 42 return reStructuredText. 43 reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html 32 44 """ 33 45 return self.description … … 38 50 If this plugin needs parameters, provides form fields here. 39 51 Any html and javascript are welcome. 40 41 Default: just output description.42 52 """ 43 return super(EolStyleCheck, self).install_config_form()53 return "" 44 54 45 55 def uninstall(self): -
trunk/pysvnmanager/hooks/plugins/__init__.py
r45 r46 5 5 import time 6 6 import logging 7 8 from pysvnmanager.model.rest import reSTify 7 9 8 10 # i18n works only as pysvnmanager (a pylons app) model. … … 65 67 """ Base class for hook plugins 66 68 """ 69 # Plugin id (must be override!) 70 id = __name__.rsplit('.',1)[-1] 71 72 # Both description and detail are reStructuredText format. 73 # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html 74 67 75 # Brief name for this plugin. 68 76 name = "" 69 77 70 # Longerdescription for this plugin.78 # Short description for this plugin. 71 79 description = "" 80 81 # Long description for this plugin. 82 detail = "" 72 83 73 84 # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK … … 117 128 return False 118 129 130 def __cmp__(self, obj): 131 assert isinstance(obj, PluginBase) 132 if self.type == obj.type: 133 return cmp(self.id, obj.id) 134 else: 135 return cmp(self.type, obj.type) 136 137 119 138 def reload(self, force=True): 120 139 """ … … 153 172 return result 154 173 155 def has_config(self ):174 def has_config(self, key="", value=""): 156 175 """ 157 176 Test if self.key = self.value is in the default config ini file. 158 177 """ 159 if not hasattr(self, "key") or not hasattr(self, "value"): 160 raise Exception, _("Plugin not fully implemented.") 178 if key == "": 179 if not hasattr(self, "key"): 180 raise Exception, _("Plugin not fully implemented.") 181 else: 182 key = self.key 183 184 if value == "": 185 if hasattr(self, "value"): 186 value = self.value 161 187 162 188 if hasattr(self, "section"): … … 165 191 section = 'main' 166 192 167 return self.get_config(self.key, section=section) == self.value 168 169 def set_config(self): 193 setting = self.get_config(key, section=section) 194 if value: 195 return setting == value 196 elif setting != "": 197 return True 198 else: 199 return False 200 201 def set_config(self, key="", value=""): 170 202 """ 171 203 add self.key = self.value to default config ini file. 172 204 """ 173 if not hasattr(self, "key") or not hasattr(self, "value"): 174 raise Exception, _("Plugin not fully implemented.") 205 if key == "": 206 if not hasattr(self, "key"): 207 raise Exception, _("Plugin not fully implemented.") 208 else: 209 key = self.key 210 211 if value == "": 212 if not hasattr(self, "value"): 213 raise Exception, _("Plugin not fully implemented.") 214 else: 215 value = self.value 175 216 176 217 if hasattr(self, "section"): … … 181 222 if not self.cp.has_section(section): 182 223 self.cp.add_section(section) 183 self.cp.set(section, self.key, self.value)184 185 def unset_config(self ):224 self.cp.set(section, key, value) 225 226 def unset_config(self, key=""): 186 227 """ 187 228 Remove self.key from default config ini file. 188 229 """ 189 if not hasattr(self, "key") or not hasattr(self, "value"): 190 raise Exception, _("Plugin not fully implemented.") 230 if key == "": 231 if not hasattr(self, "key"): 232 raise Exception, _("Plugin not fully implemented.") 233 else: 234 key = self.key 191 235 192 236 if hasattr(self, "section"): … … 196 240 197 241 if self.cp.has_section(section): 198 self.cp.remove_option(section, self.key)242 self.cp.remove_option(section, key) 199 243 # test if section is blank after remove option. 200 244 if not self.cp.options(section): 201 245 self.cp.remove_section(section) 202 246 203 def get_detail(self): 204 """ 205 Show detail informantion if plugin is already installed. 206 """ 207 if self.enabled(): 208 return self.description 209 else: 210 return "" 211 212 detail = property(get_detail) 247 def install_info(self): 248 """ 249 Show configurations if plugin is already installed. 250 251 return reStructuredText. 252 reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html 253 """ 254 return self.description 255 256 def show_install_info(self): 257 return reSTify(self.install_info()) 213 258 214 259 def get_type(self): … … 240 285 Any html and javascript are welcome. 241 286 242 Default: just output description. 243 """ 244 result = "<ul><li>" + _("Plugin name") + ": " + self.name + "\n" + \ 245 "<li>" + _("Type") + ": " + self.get_type() + "\n" + \ 246 "<li>" + _("Description") + ": " + self.description + "\n" 247 return result 248 287 If plugin does not need further configuration, simply return null str. 288 """ 289 return "" 290 291 def show_install_config_form(self): 292 """ 293 This method will be called to build setup configuration form. 294 If this plugin needs parameters, provides form fields here. 295 Any html and javascript are welcome. 296 297 return output reSTified html. 298 """ 299 header = """ 300 **%(id)s** 301 302 - %(t_name)s: %(name)s 303 - %(t_name)s: %(type)s 304 305 **%(t_desc)s** 306 307 %(desc)s 308 309 %(detail)s 310 """ % { 311 't_name': _('Name'), 312 't_type': _('Type'), 313 't_desc': _('Description'), 314 'id':self.id.rsplit('.',1)[-1], 315 'name': self.name, 316 'type': self.get_type(), 317 'desc': self.description, 318 'detail': self.detail, 319 } 320 321 header = reSTify(header) 322 form = self.install_config_form() or "" 323 return header + form 324 249 325 def enabled(self): 250 326 """ -
trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po
r45 r46 10 10 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" 11 11 "POT-Creation-Date: 2008-07-03 22:14+0800\n" 12 "PO-Revision-Date: 2008-08-27 00:06+0800\n"12 "PO-Revision-Date: 2008-08-27 21:52+0800\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 14 14 "Language-Team: en <LL@li.org>\n" … … 145 145 146 146 #: pysvnmanager/controllers/repos.py:81 147 #: pysvnmanager/hooks/plugins/__init__.py:244148 147 msgid "Plugin name" 149 148 msgstr "" 150 149 151 150 #: pysvnmanager/controllers/repos.py:82 152 #: pysvnmanager/hooks/plugins/__init__.py: 245151 #: pysvnmanager/hooks/plugins/__init__.py:312 153 152 msgid "Type" 154 153 msgstr "" … … 158 157 msgstr "" 159 158 160 #: pysvnmanager/controllers/repos.py:11 6159 #: pysvnmanager/controllers/repos.py:119 161 160 #, python-format 162 161 msgid "" … … 165 164 msgstr "" 166 165 167 #: pysvnmanager/controllers/repos.py:1 19166 #: pysvnmanager/controllers/repos.py:122 168 167 #, python-format 169 168 msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." 170 169 msgstr "" 171 170 172 #: pysvnmanager/controllers/repos.py:14 0171 #: pysvnmanager/controllers/repos.py:143 173 172 #, python-format 174 173 msgid "" … … 177 176 msgstr "" 178 177 179 #: pysvnmanager/controllers/repos.py:14 3178 #: pysvnmanager/controllers/repos.py:146 180 179 #, python-format 181 180 msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." 182 181 msgstr "" 183 182 184 #: pysvnmanager/controllers/repos.py:14 6183 #: pysvnmanager/controllers/repos.py:149 185 184 #, python-format 186 185 msgid "No plugin has been deleted for '%(repos)s'." 187 186 msgstr "" 188 187 189 #: pysvnmanager/controllers/repos.py:15 5188 #: pysvnmanager/controllers/repos.py:158 190 189 #, python-format 191 190 msgid "" … … 194 193 msgstr "" 195 194 196 #: pysvnmanager/controllers/repos.py:1 58195 #: pysvnmanager/controllers/repos.py:161 197 196 #, python-format 198 197 msgid "Create repository '%(repos)s' success." 199 198 msgstr "" 200 199 201 #: pysvnmanager/controllers/repos.py:17 1200 #: pysvnmanager/controllers/repos.py:174 202 201 #, python-format 203 202 msgid "" … … 206 205 msgstr "" 207 206 208 #: pysvnmanager/controllers/repos.py:17 4207 #: pysvnmanager/controllers/repos.py:177 209 208 #, python-format 210 209 msgid "Delete blank repository '%(repos)s' success." … … 246 245 msgstr "" 247 246 248 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 247 #: pysvnmanager/hooks/plugins/BugtrackMantis.py:13 248 msgid "Mantis bugtracking integration" 249 msgstr "" 250 251 #: pysvnmanager/hooks/plugins/BugtrackMantis.py:19 252 msgid "" 253 "Integration Subversion with Mantis bugtracking. If commit-log has proper " 254 "format (contains bugid), it will change bug status and append commint-log" 255 " and code differ as comment of bug status change." 256 msgstr "" 257 258 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 249 259 msgid "check case insensitive" 250 260 msgstr "" 251 261 252 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:1 3262 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 253 263 msgid "A pre-commit hook to detect case-insensitive filename clashes." 254 264 msgstr "" 255 265 256 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 266 #: pysvnmanager/hooks/plugins/CommitLogCheck.py:13 267 msgid "Check commit log message" 268 msgstr "" 269 270 #: pysvnmanager/hooks/plugins/CommitLogCheck.py:19 271 msgid "User must provide commit-log message when checkin." 272 msgstr "" 273 274 #: pysvnmanager/hooks/plugins/EmailNotify.py:13 275 msgid "Send email notify for commit event" 276 msgstr "" 277 278 #: pysvnmanager/hooks/plugins/EmailNotify.py:19 279 msgid "" 280 "Send a notification email describing either a commit or a revprop-change " 281 "action on a Subversion repository." 282 msgstr "" 283 284 #: pysvnmanager/hooks/plugins/EmailNotify.py:23 285 msgid "" 286 "\n" 287 "You must provide proper options to commit-email.pl using the\n" 288 "configuration form for this plugin.\n" 289 "\n" 290 "You can simply just provide the email_addr as the options.\n" 291 "\n" 292 " [options] email_addr [email_addr ...]\n" 293 "\n" 294 "But to be more versitile, you can setup a path-based email \n" 295 "notifier.\n" 296 "\n" 297 " [-m regex1] [options] [email_addr ...]\n" 298 " [-m regex2] [options] [email_addr ...] \n" 299 " ...\n" 300 "\n" 301 "Options:\n" 302 "\n" 303 "-m regex Regular expression to match committed path\n" 304 "--from email_address Email address for 'From:' (overrides -h)\n" 305 "-r email_address Email address for 'Reply-To:\n" 306 "-s subject_prefix Subject line prefix\n" 307 "--diff n Do not include diff in message (default: y)\n" 308 msgstr "" 309 310 #: pysvnmanager/hooks/plugins/EmailNotify.py:75 311 msgid "- Email notify enabled." 312 msgstr "" 313 314 #: pysvnmanager/hooks/plugins/EmailNotify.py:77 315 msgid "- Email notify disabled." 316 msgstr "" 317 318 #: pysvnmanager/hooks/plugins/EmailNotify.py:79 319 msgid "- Parameters: ``" 320 msgstr "" 321 322 #: pysvnmanager/hooks/plugins/EmailNotify.py:97 323 msgid "Fill this form" 324 msgstr "" 325 326 #: pysvnmanager/hooks/plugins/EmailNotify.py:99 327 msgid "Enable email notify." 328 msgstr "" 329 330 #: pysvnmanager/hooks/plugins/EmailNotify.py:101 331 msgid "Enable" 332 msgstr "" 333 334 #: pysvnmanager/hooks/plugins/EmailNotify.py:103 335 msgid "Disable" 336 msgstr "" 337 338 #: pysvnmanager/hooks/plugins/EmailNotify.py:104 339 msgid "Input email notify configurations: " 340 msgstr "" 341 342 #: pysvnmanager/hooks/plugins/EmailNotify.py:131 343 msgid "Wrong configuration." 344 msgstr "" 345 346 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 257 347 msgid "mime-type and eol-style check" 258 348 msgstr "" 259 349 260 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:1 3350 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:19 261 351 msgid "New file must provide svn:eol-style if not binary file." 262 352 msgstr "" 263 353 264 #: pysvnmanager/hooks/plugins/__init__.py:84 354 #: pysvnmanager/hooks/plugins/MergeinfoClient.py:13 355 msgid "Subversion client mergeinfo capability check" 356 msgstr "" 357 358 #: pysvnmanager/hooks/plugins/MergeinfoClient.py:19 359 msgid "Do not allow subversion client (<1.5) to checkin." 360 msgstr "" 361 362 #: pysvnmanager/hooks/plugins/__init__.py:95 265 363 #, python-format 266 364 msgid "repos '%s' not exist!" 267 365 msgstr "" 268 366 269 #: pysvnmanager/hooks/plugins/__init__.py:1 33367 #: pysvnmanager/hooks/plugins/__init__.py:152 270 368 #, python-format 271 369 msgid "Conflict: plugin '%s' is modified by others." 272 370 msgstr "" 273 371 274 #: pysvnmanager/hooks/plugins/__init__.py:160 275 #: pysvnmanager/hooks/plugins/__init__.py:174 276 #: pysvnmanager/hooks/plugins/__init__.py:190 277 #: pysvnmanager/hooks/plugins/__init__.py:254 278 #: pysvnmanager/hooks/plugins/__init__.py:261 279 #: pysvnmanager/hooks/plugins/__init__.py:270 372 #: pysvnmanager/hooks/plugins/__init__.py:180 373 #: pysvnmanager/hooks/plugins/__init__.py:207 374 #: pysvnmanager/hooks/plugins/__init__.py:213 375 #: pysvnmanager/hooks/plugins/__init__.py:232 376 #: pysvnmanager/hooks/plugins/__init__.py:330 377 #: pysvnmanager/hooks/plugins/__init__.py:337 378 #: pysvnmanager/hooks/plugins/__init__.py:346 280 379 msgid "Plugin not fully implemented." 281 380 msgstr "" 282 381 283 #: pysvnmanager/hooks/plugins/__init__.py:246 382 #: pysvnmanager/hooks/plugins/__init__.py:311 383 msgid "Name" 384 msgstr "" 385 386 #: pysvnmanager/hooks/plugins/__init__.py:313 284 387 msgid "Description" 285 388 msgstr "" … … 422 525 #: pysvnmanager/templates/base.mako:36 423 526 #: pysvnmanager/templates/repos/hooks.mako:5 424 #: pysvnmanager/templates/repos/hooks.mako:18 9527 #: pysvnmanager/templates/repos/hooks.mako:182 425 528 msgid "Repos management" 426 529 msgstr "" … … 503 606 504 607 #: pysvnmanager/templates/authz/index.mako:597 505 #: pysvnmanager/templates/repos/hooks.mako:1 95608 #: pysvnmanager/templates/repos/hooks.mako:188 506 609 msgid "Repository:" 507 610 msgstr "" … … 662 765 msgstr "" 663 766 664 #: pysvnmanager/templates/repos/hooks.mako:19 8767 #: pysvnmanager/templates/repos/hooks.mako:191 665 768 msgid "Add repository" 666 769 msgstr "" 667 770 668 #: pysvnmanager/templates/repos/hooks.mako:19 9771 #: pysvnmanager/templates/repos/hooks.mako:192 669 772 #: pysvnmanager/templates/repos/remove.mako:5 670 773 #: pysvnmanager/templates/repos/remove.mako:49 … … 673 776 msgstr "" 674 777 675 #: pysvnmanager/templates/repos/hooks.mako: 204778 #: pysvnmanager/templates/repos/hooks.mako:197 676 779 msgid "Uninstalled hooks:" 677 780 msgstr "" 678 781 679 #: pysvnmanager/templates/repos/hooks.mako:22 6680 msgid " Enable this hook"782 #: pysvnmanager/templates/repos/hooks.mako:223 783 msgid "Install this plugin" 681 784 msgstr "" 682 785 … … 762 865 msgstr "" 763 866 867 #~ msgid "" 868 #~ "\n" 869 #~ "**%(id)s**\n" 870 #~ "\n" 871 #~ "- %(t_name)s: %(name)s\n" 872 #~ "- %(t_name)s: %(type)s\n" 873 #~ "\n" 874 #~ "**%(t_desc)s**\n" 875 #~ "\n" 876 #~ "%(desc)s\n" 877 #~ "\n" 878 #~ "%(detail)s\n" 879 #~ msgstr "" 880 -
trunk/pysvnmanager/i18n/pysvnmanager.pot
r45 r46 9 9 "Project-Id-Version: pySvnManager 0.2.0\n" 10 10 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" 11 "POT-Creation-Date: 2008-08-27 00:06+0800\n"11 "POT-Creation-Date: 2008-08-27 21:52+0800\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 137 137 msgstr "" 138 138 139 #: pysvnmanager/controllers/repos.py:81 pysvnmanager/hooks/plugins/__init__.py:244139 #: pysvnmanager/controllers/repos.py:81 140 140 msgid "Plugin name" 141 141 msgstr "" 142 142 143 #: pysvnmanager/controllers/repos.py:82 pysvnmanager/hooks/plugins/__init__.py: 245143 #: pysvnmanager/controllers/repos.py:82 pysvnmanager/hooks/plugins/__init__.py:312 144 144 msgid "Type" 145 145 msgstr "" … … 149 149 msgstr "" 150 150 151 #: pysvnmanager/controllers/repos.py:11 6151 #: pysvnmanager/controllers/repos.py:119 152 152 #, python-format 153 153 msgid "" … … 156 156 msgstr "" 157 157 158 #: pysvnmanager/controllers/repos.py:1 19158 #: pysvnmanager/controllers/repos.py:122 159 159 #, python-format 160 160 msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." 161 161 msgstr "" 162 162 163 #: pysvnmanager/controllers/repos.py:14 0163 #: pysvnmanager/controllers/repos.py:143 164 164 #, python-format 165 165 msgid "" … … 168 168 msgstr "" 169 169 170 #: pysvnmanager/controllers/repos.py:14 3170 #: pysvnmanager/controllers/repos.py:146 171 171 #, python-format 172 172 msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." 173 173 msgstr "" 174 174 175 #: pysvnmanager/controllers/repos.py:14 6175 #: pysvnmanager/controllers/repos.py:149 176 176 #, python-format 177 177 msgid "No plugin has been deleted for '%(repos)s'." 178 178 msgstr "" 179 179 180 #: pysvnmanager/controllers/repos.py:15 5180 #: pysvnmanager/controllers/repos.py:158 181 181 #, python-format 182 182 msgid "" … … 185 185 msgstr "" 186 186 187 #: pysvnmanager/controllers/repos.py:1 58187 #: pysvnmanager/controllers/repos.py:161 188 188 #, python-format 189 189 msgid "Create repository '%(repos)s' success." 190 190 msgstr "" 191 191 192 #: pysvnmanager/controllers/repos.py:17 1192 #: pysvnmanager/controllers/repos.py:174 193 193 #, python-format 194 194 msgid "" … … 197 197 msgstr "" 198 198 199 #: pysvnmanager/controllers/repos.py:17 4199 #: pysvnmanager/controllers/repos.py:177 200 200 #, python-format 201 201 msgid "Delete blank repository '%(repos)s' success." … … 237 237 msgstr "" 238 238 239 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 239 #: pysvnmanager/hooks/plugins/BugtrackMantis.py:13 240 msgid "Mantis bugtracking integration" 241 msgstr "" 242 243 #: pysvnmanager/hooks/plugins/BugtrackMantis.py:19 244 msgid "" 245 "Integration Subversion with Mantis bugtracking. If commit-log has proper " 246 "format (contains bugid), it will change bug status and append commint-log and" 247 " code differ as comment of bug status change." 248 msgstr "" 249 250 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 240 251 msgid "check case insensitive" 241 252 msgstr "" 242 253 243 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:1 3254 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 244 255 msgid "A pre-commit hook to detect case-insensitive filename clashes." 245 256 msgstr "" 246 257 247 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 258 #: pysvnmanager/hooks/plugins/CommitLogCheck.py:13 259 msgid "Check commit log message" 260 msgstr "" 261 262 #: pysvnmanager/hooks/plugins/CommitLogCheck.py:19 263 msgid "User must provide commit-log message when checkin." 264 msgstr "" 265 266 #: pysvnmanager/hooks/plugins/EmailNotify.py:13 267 msgid "Send email notify for commit event" 268 msgstr "" 269 270 #: pysvnmanager/hooks/plugins/EmailNotify.py:19 271 msgid "" 272 "Send a notification email describing either a commit or a revprop-change " 273 "action on a Subversion repository." 274 msgstr "" 275 276 #: pysvnmanager/hooks/plugins/EmailNotify.py:23 277 msgid "" 278 "\n" 279 "You must provide proper options to commit-email.pl using the\n" 280 "configuration form for this plugin.\n" 281 "\n" 282 "You can simply just provide the email_addr as the options.\n" 283 "\n" 284 " [options] email_addr [email_addr ...]\n" 285 "\n" 286 "But to be more versitile, you can setup a path-based email \n" 287 "notifier.\n" 288 "\n" 289 " [-m regex1] [options] [email_addr ...]\n" 290 " [-m regex2] [options] [email_addr ...] \n" 291 " ...\n" 292 "\n" 293 "Options:\n" 294 "\n" 295 "-m regex Regular expression to match committed path\n" 296 "--from email_address Email address for 'From:' (overrides -h)\n" 297 "-r email_address Email address for 'Reply-To:\n" 298 "-s subject_prefix Subject line prefix\n" 299 "--diff n Do not include diff in message (default: y)\n" 300 msgstr "" 301 302 #: pysvnmanager/hooks/plugins/EmailNotify.py:75 303 msgid "- Email notify enabled." 304 msgstr "" 305 306 #: pysvnmanager/hooks/plugins/EmailNotify.py:77 307 msgid "- Email notify disabled." 308 msgstr "" 309 310 #: pysvnmanager/hooks/plugins/EmailNotify.py:79 311 msgid "- Parameters: ``" 312 msgstr "" 313 314 #: pysvnmanager/hooks/plugins/EmailNotify.py:97 315 msgid "Fill this form" 316 msgstr "" 317 318 #: pysvnmanager/hooks/plugins/EmailNotify.py:99 319 msgid "Enable email notify." 320 msgstr "" 321 322 #: pysvnmanager/hooks/plugins/EmailNotify.py:101 323 msgid "Enable" 324 msgstr "" 325 326 #: pysvnmanager/hooks/plugins/EmailNotify.py:103 327 msgid "Disable" 328 msgstr "" 329 330 #: pysvnmanager/hooks/plugins/EmailNotify.py:104 331 msgid "Input email notify configurations: " 332 msgstr "" 333 334 #: pysvnmanager/hooks/plugins/EmailNotify.py:131 335 msgid "Wrong configuration." 336 msgstr "" 337 338 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 248 339 msgid "mime-type and eol-style check" 249 340 msgstr "" 250 341 251 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:1 3342 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:19 252 343 msgid "New file must provide svn:eol-style if not binary file." 253 344 msgstr "" 254 345 255 #: pysvnmanager/hooks/plugins/__init__.py:84 346 #: pysvnmanager/hooks/plugins/MergeinfoClient.py:13 347 msgid "Subversion client mergeinfo capability check" 348 msgstr "" 349 350 #: pysvnmanager/hooks/plugins/MergeinfoClient.py:19 351 msgid "Do not allow subversion client (<1.5) to checkin." 352 msgstr "" 353 354 #: pysvnmanager/hooks/plugins/__init__.py:95 256 355 #, python-format 257 356 msgid "repos '%s' not exist!" 258 357 msgstr "" 259 358 260 #: pysvnmanager/hooks/plugins/__init__.py:1 33359 #: pysvnmanager/hooks/plugins/__init__.py:152 261 360 #, python-format 262 361 msgid "Conflict: plugin '%s' is modified by others." 263 362 msgstr "" 264 363 265 #: pysvnmanager/hooks/plugins/__init__.py:160 266 #: pysvnmanager/hooks/plugins/__init__.py:174 267 #: pysvnmanager/hooks/plugins/__init__.py:190 268 #: pysvnmanager/hooks/plugins/__init__.py:254 269 #: pysvnmanager/hooks/plugins/__init__.py:261 270 #: pysvnmanager/hooks/plugins/__init__.py:270 364 #: pysvnmanager/hooks/plugins/__init__.py:180 365 #: pysvnmanager/hooks/plugins/__init__.py:207 366 #: pysvnmanager/hooks/plugins/__init__.py:213 367 #: pysvnmanager/hooks/plugins/__init__.py:232 368 #: pysvnmanager/hooks/plugins/__init__.py:330 369 #: pysvnmanager/hooks/plugins/__init__.py:337 370 #: pysvnmanager/hooks/plugins/__init__.py:346 271 371 msgid "Plugin not fully implemented." 272 372 msgstr "" 273 373 274 #: pysvnmanager/hooks/plugins/__init__.py:246 374 #: pysvnmanager/hooks/plugins/__init__.py:311 375 msgid "Name" 376 msgstr "" 377 378 #: pysvnmanager/hooks/plugins/__init__.py:313 275 379 msgid "Description" 276 380 msgstr "" … … 411 515 412 516 #: pysvnmanager/templates/base.mako:36 pysvnmanager/templates/repos/hooks.mako:5 413 #: pysvnmanager/templates/repos/hooks.mako:18 9517 #: pysvnmanager/templates/repos/hooks.mako:182 414 518 msgid "Repos management" 415 519 msgstr "" … … 492 596 493 597 #: pysvnmanager/templates/authz/index.mako:597 494 #: pysvnmanager/templates/repos/hooks.mako:1 95598 #: pysvnmanager/templates/repos/hooks.mako:188 495 599 msgid "Repository:" 496 600 msgstr "" … … 651 755 msgstr "" 652 756 653 #: pysvnmanager/templates/repos/hooks.mako:19 8757 #: pysvnmanager/templates/repos/hooks.mako:191 654 758 msgid "Add repository" 655 759 msgstr "" 656 760 657 #: pysvnmanager/templates/repos/hooks.mako:19 9761 #: pysvnmanager/templates/repos/hooks.mako:192 658 762 #: pysvnmanager/templates/repos/remove.mako:5 659 763 #: pysvnmanager/templates/repos/remove.mako:49 … … 662 766 msgstr "" 663 767 664 #: pysvnmanager/templates/repos/hooks.mako: 204768 #: pysvnmanager/templates/repos/hooks.mako:197 665 769 msgid "Uninstalled hooks:" 666 770 msgstr "" 667 771 668 #: pysvnmanager/templates/repos/hooks.mako:22 6669 msgid " Enable this hook"772 #: pysvnmanager/templates/repos/hooks.mako:223 773 msgid "Install this plugin" 670 774 msgstr "" 671 775 -
trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po
r45 r46 9 9 msgid "" 10 10 msgstr "" 11 "Project-Id-Version: pysvnmanager\n"11 "Project-Id-Version: pysvnmanager\n" 12 12 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" 13 13 "POT-Creation-Date: 2008-07-03 22:14+0800\n" 14 "PO-Revision-Date: 2008-08-27 00:07+0800\n"14 "PO-Revision-Date: 2008-08-27 21:52+0800\n" 15 15 "Last-Translator: Jiang Xin <worldhello.net@gmail.com>\n" 16 "Language-Team: <zh@li.org>\n"16 "Language-Team: <zh@li.org>\n" 17 17 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n" 18 18 "MIME-Version: 1.0\n" 19 "Content-Type: text/plain; charset= UTF-8\n"19 "Content-Type: text/plain; charset=utf-8\n" 20 20 "Content-Transfer-Encoding: 8bit\n" 21 21 "Generated-By: Babel 0.9.2\n" 22 "X-Generator: KBabel 1.11.4\n"23 22 24 23 #: pysvnmanager/controllers/authz.py:43 … … 148 147 149 148 #: pysvnmanager/controllers/repos.py:81 150 #: pysvnmanager/hooks/plugins/__init__.py:244151 149 msgid "Plugin name" 152 150 msgstr "插件名称" 153 151 154 152 #: pysvnmanager/controllers/repos.py:82 155 #: pysvnmanager/hooks/plugins/__init__.py: 245153 #: pysvnmanager/hooks/plugins/__init__.py:312 156 154 msgid "Type" 157 155 msgstr "类型" … … 161 159 msgstr "删除选择的插件" 162 160 163 #: pysvnmanager/controllers/repos.py:11 6161 #: pysvnmanager/controllers/repos.py:119 164 162 #, python-format 165 163 msgid "" … … 170 168 "%(msg)s" 171 169 172 #: pysvnmanager/controllers/repos.py:1 19170 #: pysvnmanager/controllers/repos.py:122 173 171 #, python-format 174 172 msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." 175 173 msgstr "成功启用版本库'%(repos)s'的插件'%(plugin)s'。 " 176 174 177 #: pysvnmanager/controllers/repos.py:14 0175 #: pysvnmanager/controllers/repos.py:143 178 176 #, python-format 179 177 msgid "" … … 184 182 "%(msg)s" 185 183 186 #: pysvnmanager/controllers/repos.py:14 3184 #: pysvnmanager/controllers/repos.py:146 187 185 #, python-format 188 186 msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." 189 187 msgstr "成功删除版本库'%(repos)s'的插件'%(plugin)s'。" 190 188 191 #: pysvnmanager/controllers/repos.py:14 6189 #: pysvnmanager/controllers/repos.py:149 192 190 #, python-format 193 191 msgid "No plugin has been deleted for '%(repos)s'." 194 192 msgstr "未删除版本库'%(repos)s'的插件。" 195 193 196 #: pysvnmanager/controllers/repos.py:15 5194 #: pysvnmanager/controllers/repos.py:158 197 195 #, python-format 198 196 msgid "" … … 203 201 "%(msg)s" 204 202 205 #: pysvnmanager/controllers/repos.py:1 58203 #: pysvnmanager/controllers/repos.py:161 206 204 #, python-format 207 205 msgid "Create repository '%(repos)s' success." 208 206 msgstr "成功创建版本库'%(repos)s'。" 209 207 210 #: pysvnmanager/controllers/repos.py:17 1208 #: pysvnmanager/controllers/repos.py:174 211 209 #, python-format 212 210 msgid "" … … 217 215 "%(msg)s" 218 216 219 #: pysvnmanager/controllers/repos.py:17 4217 #: pysvnmanager/controllers/repos.py:177 220 218 #, python-format 221 219 msgid "Delete blank repository '%(repos)s' success." … … 257 255 msgstr "用户 %s 登出" 258 256 259 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 257 #: pysvnmanager/hooks/plugins/BugtrackMantis.py:13 258 msgid "Mantis bugtracking integration" 259 msgstr "整合 Mantis 缺陷跟踪系统" 260 261 #: pysvnmanager/hooks/plugins/BugtrackMantis.py:19 262 msgid "" 263 "Integration Subversion with Mantis bugtracking. If commit-log has proper " 264 "format (contains bugid), it will change bug status and append commint-log" 265 " and code differ as comment of bug status change." 266 msgstr "" 267 "与 Mantis 缺陷跟踪系统整合。当提交日志符合特定的规范(包含 bugid),将会触发 Mantis 缺陷跟踪系统,将 bug " 268 "的状态修改为已修改,并将commit-log 以及代码变更添加到说明中。" 269 270 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 260 271 msgid "check case insensitive" 261 272 msgstr "大小写不敏感" 262 273 263 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:1 3274 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 264 275 msgid "A pre-commit hook to detect case-insensitive filename clashes." 265 276 msgstr "在 pre-commit 钩子中执行,检查文件名大小写引起的文件名冲突。" 266 277 267 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 278 #: pysvnmanager/hooks/plugins/CommitLogCheck.py:13 279 msgid "Check commit log message" 280 msgstr "检查提交说明" 281 282 #: pysvnmanager/hooks/plugins/CommitLogCheck.py:19 283 msgid "User must provide commit-log message when checkin." 284 msgstr "用户在代码提交时,必须提供提交说明。" 285 286 #: pysvnmanager/hooks/plugins/EmailNotify.py:13 287 msgid "Send email notify for commit event" 288 msgstr "针对代码变更发出邮件通知" 289 290 #: pysvnmanager/hooks/plugins/EmailNotify.py:19 291 msgid "" 292 "Send a notification email describing either a commit or a revprop-change " 293 "action on a Subversion repository." 294 msgstr "当对 Subversion 代码库中的代码修改或者修改状态,发出邮件通知。" 295 296 #: pysvnmanager/hooks/plugins/EmailNotify.py:23 297 msgid "" 298 "\n" 299 "You must provide proper options to commit-email.pl using the\n" 300 "configuration form for this plugin.\n" 301 "\n" 302 "You can simply just provide the email_addr as the options.\n" 303 "\n" 304 " [options] email_addr [email_addr ...]\n" 305 "\n" 306 "But to be more versitile, you can setup a path-based email \n" 307 "notifier.\n" 308 "\n" 309 " [-m regex1] [options] [email_addr ...]\n" 310 " [-m regex2] [options] [email_addr ...] \n" 311 " ...\n" 312 "\n" 313 "Options:\n" 314 "\n" 315 "-m regex Regular expression to match committed path\n" 316 "--from email_address Email address for 'From:' (overrides -h)\n" 317 "-r email_address Email address for 'Reply-To:\n" 318 "-s subject_prefix Subject line prefix\n" 319 "--diff n Do not include diff in message (default: y)\n" 320 msgstr "" 321 "\n" 322 "您需要为代码变更的邮件通知设置参数。\n" 323 "\n" 324 "可以简单的提供邮件地址即可:\n" 325 "\n" 326 " [options] email_addr [email_addr ...]\n" 327 "\n" 328 "或者基于正则表达式,提供一个基于路径的代码变更的邮件通知。\n" 329 "\n" 330 " [-m regex1] [options] [email_addr ...]\n" 331 " [-m regex2] [options] [email_addr ...] \n" 332 " ...\n" 333 "\n" 334 "参数:\n" 335 "\n" 336 "-m regex 和提交路径相匹配的正则表达式\n" 337 "--from email_address 发信人地址\n" 338 "-r email_address 回复邮件地址\n" 339 "-s subject_prefix 标题的前缀,如 [Prefix]\n" 340 "--diff n 不包含代码差异(缺省包含)\n" 341 342 #: pysvnmanager/hooks/plugins/EmailNotify.py:75 343 msgid "- Email notify enabled." 344 msgstr "- 邮件通知启用。" 345 346 #: pysvnmanager/hooks/plugins/EmailNotify.py:77 347 msgid "- Email notify disabled." 348 msgstr "- 邮件通知关闭。" 349 350 #: pysvnmanager/hooks/plugins/EmailNotify.py:79 351 msgid "- Parameters: ``" 352 msgstr "- 参数: ``" 353 354 #: pysvnmanager/hooks/plugins/EmailNotify.py:97 355 msgid "Fill this form" 356 msgstr "填写表单" 357 358 #: pysvnmanager/hooks/plugins/EmailNotify.py:99 359 msgid "Enable email notify." 360 msgstr "启用邮件通知。" 361 362 #: pysvnmanager/hooks/plugins/EmailNotify.py:101 363 msgid "Enable" 364 msgstr "启用" 365 366 #: pysvnmanager/hooks/plugins/EmailNotify.py:103 367 msgid "Disable" 368 msgstr "关闭" 369 370 #: pysvnmanager/hooks/plugins/EmailNotify.py:104 371 msgid "Input email notify configurations: " 372 msgstr "输入邮件通知配置参数: " 373 374 #: pysvnmanager/hooks/plugins/EmailNotify.py:131 375 msgid "Wrong configuration." 376 msgstr "错误的配置" 377 378 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 268 379 msgid "mime-type and eol-style check" 269 380 msgstr "文件类型和换行符设置检查" 270 381 271 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:1 3382 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:19 272 383 msgid "New file must provide svn:eol-style if not binary file." 273 384 msgstr "新增的文本文件,必须设置换行符。" 274 385 275 #: pysvnmanager/hooks/plugins/__init__.py:84 386 #: pysvnmanager/hooks/plugins/MergeinfoClient.py:13 387 msgid "Subversion client mergeinfo capability check" 388 msgstr "Subversion 客户端版本检查(mergeinfo 功能)" 389 390 #: pysvnmanager/hooks/plugins/MergeinfoClient.py:19 391 msgid "Do not allow subversion client (<1.5) to checkin." 392 msgstr "不允许小于 1.5 的 subversion 客户端进行提交。" 393 394 #: pysvnmanager/hooks/plugins/__init__.py:95 276 395 #, python-format 277 396 msgid "repos '%s' not exist!" 278 397 msgstr "版本库 %s 不存在!" 279 398 280 #: pysvnmanager/hooks/plugins/__init__.py:1 33399 #: pysvnmanager/hooks/plugins/__init__.py:152 281 400 #, python-format 282 401 msgid "Conflict: plugin '%s' is modified by others." 283 402 msgstr "冲突:插件'%s'被其他人修改了。" 284 403 285 #: pysvnmanager/hooks/plugins/__init__.py:160 286 #: pysvnmanager/hooks/plugins/__init__.py:174 287 #: pysvnmanager/hooks/plugins/__init__.py:190 288 #: pysvnmanager/hooks/plugins/__init__.py:254 289 #: pysvnmanager/hooks/plugins/__init__.py:261 290 #: pysvnmanager/hooks/plugins/__init__.py:270 404 #: pysvnmanager/hooks/plugins/__init__.py:180 405 #: pysvnmanager/hooks/plugins/__init__.py:207 406 #: pysvnmanager/hooks/plugins/__init__.py:213 407 #: pysvnmanager/hooks/plugins/__init__.py:232 408 #: pysvnmanager/hooks/plugins/__init__.py:330 409 #: pysvnmanager/hooks/plugins/__init__.py:337 410 #: pysvnmanager/hooks/plugins/__init__.py:346 291 411 msgid "Plugin not fully implemented." 292 412 msgstr "插件未完全实现。" 293 413 294 #: pysvnmanager/hooks/plugins/__init__.py:246 414 #: pysvnmanager/hooks/plugins/__init__.py:311 415 msgid "Name" 416 msgstr "名称" 417 418 #: pysvnmanager/hooks/plugins/__init__.py:313 295 419 msgid "Description" 296 msgstr " 描述"420 msgstr "说明" 297 421 298 422 #: pysvnmanager/model/repos.py:39 … … 453 577 #: pysvnmanager/templates/base.mako:36 454 578 #: pysvnmanager/templates/repos/hooks.mako:5 455 #: pysvnmanager/templates/repos/hooks.mako:18 9579 #: pysvnmanager/templates/repos/hooks.mako:182 456 580 msgid "Repos management" 457 581 msgstr "版本库管理" … … 534 658 535 659 #: pysvnmanager/templates/authz/index.mako:597 536 #: pysvnmanager/templates/repos/hooks.mako:1 95660 #: pysvnmanager/templates/repos/hooks.mako:188 537 661 msgid "Repository:" 538 662 msgstr "版本库:" … … 693 817 msgstr "版本库名称:" 694 818 695 #: pysvnmanager/templates/repos/hooks.mako:19 8819 #: pysvnmanager/templates/repos/hooks.mako:191 696 820 msgid "Add repository" 697 821 msgstr "添加版本库" 698 822 699 #: pysvnmanager/templates/repos/hooks.mako:19 9823 #: pysvnmanager/templates/repos/hooks.mako:192 700 824 #: pysvnmanager/templates/repos/remove.mako:5 701 825 #: pysvnmanager/templates/repos/remove.mako:49 … … 704 828 msgstr "删除版本库" 705 829 706 #: pysvnmanager/templates/repos/hooks.mako: 204830 #: pysvnmanager/templates/repos/hooks.mako:197 707 831 msgid "Uninstalled hooks:" 708 832 msgstr "尚未安装的插件:" 709 833 710 #: pysvnmanager/templates/repos/hooks.mako:22 6711 msgid " Enable this hook"712 msgstr " 启用此插件"834 #: pysvnmanager/templates/repos/hooks.mako:223 835 msgid "Install this plugin" 836 msgstr "安装此插件" 713 837 714 838 #: pysvnmanager/templates/role/index.mako:5 … … 793 917 msgstr "用户名:" 794 918 919 #~ msgid "" 920 #~ "\n" 921 #~ "**%(id)s**\n" 922 #~ "\n" 923 #~ "- %(t_name)s: %(name)s\n" 924 #~ "- %(t_name)s: %(type)s\n" 925 #~ "\n" 926 #~ "**%(t_desc)s**\n" 927 #~ "\n" 928 #~ "%(desc)s\n" 929 #~ "\n" 930 #~ "%(detail)s\n" 931 #~ msgstr "" 932 -
trunk/pysvnmanager/templates/repos/hooks.mako
r45 r46 16 16 document.getElementById('repos_list_box').style.position = 'relative'; 17 17 18 document.getElementById(' new_hook_list_box').style.visibility = 'hidden';19 document.getElementById(' new_hook_list_box').style.position = 'absolute';20 21 document.getElementById(' new_hook_setting_box').style.visibility = 'hidden';22 document.getElementById(' new_hook_setting_box').style.position = 'absolute';18 document.getElementById('uninstall_hook_box').style.visibility = 'hidden'; 19 document.getElementById('uninstall_hook_box').style.position = 'absolute'; 20 21 document.getElementById('hook_setting_box').style.visibility = 'hidden'; 22 document.getElementById('hook_setting_box').style.position = 'absolute'; 23 23 24 document.getElementById(' remove_hook_box').style.visibility = 'visible';25 document.getElementById(' remove_hook_box').style.position = 'relative';24 document.getElementById('installed_hook_box').style.visibility = 'visible'; 25 document.getElementById('installed_hook_box').style.position = 'relative'; 26 26 } 27 27 … … 69 69 if (name=='...'||name=='') 70 70 { 71 document.getElementById(' remove_hook_form_content').innerHTML = "";71 document.getElementById('installed_hook_form_contents').innerHTML = ""; 72 72 show_init_form(); 73 73 } … … 85 85 86 86 new Ajax.Updater( 87 ' remove_hook_form_content',88 '${h.url_for(controller="repos", action="get_ remove_hook_form_content")}',87 'installed_hook_form_contents', 88 '${h.url_for(controller="repos", action="get_installed_hook_form")}', 89 89 {asynchronous:true, evalScripts:true, method:'post', 90 90 onComplete: … … 109 109 if (total==1) 110 110 { 111 document.getElementById(' new_hook_list_box').style.visibility = 'hidden';112 document.getElementById(' new_hook_list_box').style.position = 'absolute';113 document.getElementById(' new_hook_setting_box').style.visibility = 'hidden';114 document.getElementById(' new_hook_setting_box').style.position = 'absolute';111 document.getElementById('uninstall_hook_box').style.visibility = 'hidden'; 112 document.getElementById('uninstall_hook_box').style.position = 'absolute'; 113 document.getElementById('hook_setting_box').style.visibility = 'hidden'; 114 document.getElementById('hook_setting_box').style.position = 'absolute'; 115 115 } 116 116 else 117 117 { 118 document.getElementById(' new_hook_list_box').style.visibility = 'visible';119 document.getElementById(' new_hook_list_box').style.position = 'relative';118 document.getElementById('uninstall_hook_box').style.visibility = 'visible'; 119 document.getElementById('uninstall_hook_box').style.position = 'relative'; 120 120 for (var i=0; i < total; i++) 121 121 { … … 133 133 function select_unset_hook_list() 134 134 { 135 var pluginname = document.main_form.unset_plugin_list.value; 136 137 if (pluginname=='...'||pluginname=='') 138 { 139 document.getElementById('hook_setting_form_contents').innerHTML = ""; 140 document.getElementById('hook_setting_box').style.visibility = 'hidden'; 141 document.getElementById('hook_setting_box').style.position = 'absolute'; 142 } 143 else 144 { 145 show_hook_config_form(pluginname); 146 } 147 } 148 149 function show_hook_config_form(hookid) 150 { 135 151 var reposname = document.main_form.repos_list.value; 136 var pluginname = document.main_form.unset_plugin_list.value; 137 var params = {repos:reposname, plugin:pluginname}; 138 139 if (pluginname=='...'||pluginname=='') 140 { 141 document.getElementById('apply_new_hook_form_content').innerHTML = ""; 142 document.getElementById('new_hook_setting_box').style.visibility = 'hidden'; 143 document.getElementById('new_hook_setting_box').style.position = 'absolute'; 144 } 145 else 146 { 147 document.getElementById('new_hook_setting_box').style.visibility = 'visible'; 148 document.getElementById('new_hook_setting_box').style.position = 'relative'; 149 showNoticesPopup(); 150 new Ajax.Updater( 151 {success:'apply_new_hook_form_content',failure:'apply_new_hook_form_content'}, 152 '${h.url_for(controller="repos", action="get_hook_form")}', 153 {asynchronous:true, evalScripts:true, method:'post', 154 onComplete: 155 function(request) 156 {hideNoticesPopup();}, 157 parameters:params 158 }); 159 } 160 } 161 162 function apply_new_hook_form_submit(form) 163 { 164 var reposname = document.main_form.repos_list.value; 165 var pluginname = document.main_form.unset_plugin_list.value; 166 if (pluginname=='...'||pluginname==''||reposname=="..."||reposname=="") 167 { 168 alert("Bad repository or plugin name"); 169 return false; 170 } 171 form._repos.value = reposname; 172 form._plugin.value = pluginname; 173 } 174 175 function remove_hook_form_submit(form) 152 var params = {repos:reposname, plugin:hookid}; 153 154 document.getElementById('hook_setting_box').style.visibility = 'visible'; 155 document.getElementById('hook_setting_box').style.position = 'relative'; 156 showNoticesPopup(); 157 new Ajax.Updater( 158 {success:'hook_setting_form_contents',failure:'message'}, 159 '${h.url_for(controller="repos", action="get_hook_setting_form")}', 160 {asynchronous:true, evalScripts:true, method:'post', 161 onComplete: 162 function(request) 163 {hideNoticesPopup();}, 164 parameters:params 165 }); 166 } 167 168 function installed_hook_form_submit(form) 176 169 { 177 170 var reposname = document.main_form.repos_list.value; … … 200 193 </DIV> 201 194 202 <DIV id=" new_hook_list_box" class=gainlayout style="visibility:hidden;position:absolute">195 <DIV id="uninstall_hook_box" class=gainlayout style="visibility:hidden;position:absolute"> 203 196 <hr> 204 197 ${_("Uninstalled hooks:")} … … 207 200 </form> 208 201 </DIV> 209 <DIV id=" new_hook_setting_box" class=gainlayout style="visibility:hidden;position:absolute">210 ## <form name=" apply_new_hook_form" method="post" action="${h.url_for(action='apply_new_hook')}"211 ## onSubmit="apply_new_hook_form_submit(this)">202 <DIV id="hook_setting_box" class=gainlayout style="visibility:hidden;position:absolute"> 203 ## <form name="hook_setting_form" method="post" action="${h.url_for(action='setup_hook')}"> 204 <br> 212 205 <% 213 206 context.write( 214 207 h.form_remote_tag( 215 html={'id':' apply_new_hook_form'},216 url=h.url(action=' apply_new_hook'),208 html={'id':'hook_setting_form'}, 209 url=h.url(action='setup_hook'), 217 210 update="message", 218 method='post', before=' apply_new_hook_form_submit(this);showNoticesPopup()',211 method='post', before='showNoticesPopup()', 219 212 complete='hideNoticesPopup();switch_message_box();repos_changed()', 220 213 ) 221 214 ) 222 215 %> 223 <input type=hidden name="_repos" value=""> 224 <input type=hidden name="_plugin" value=""> 225 <div id="apply_new_hook_form_content"></div> 226 <input type="submit" name="apply" value="${_("Enable this hook")}"> 216 <table class='hidden' width='90%'> 217 <tr> 218 <td> 219 <div id="hook_setting_form_contents"></div> 220 </td></tr> 221 <tr> 222 <td align='center'> 223 <input type="submit" name="apply" value="${_("Install this plugin")}"> 224 </td> 225 </tr> 226 </table> 227 227 </form> 228 228 </DIV> … … 230 230 <hr size='1'> 231 231 232 <DIV id=" remove_hook_box" class=gainlayout style="visibility:visible;position:relative">233 ## <form name=" remove_hook_form" method="post" action="${h.url_for(action='remove_hook')}"234 ## onSubmit=" remove_hook_form_submit(this)">232 <DIV id="installed_hook_box" class=gainlayout style="visibility:visible;position:relative"> 233 ## <form name="installed_hook_form" method="post" action="${h.url_for(action='remove_hook')}" 234 ## onSubmit="installed_hook_form_submit(this)"> 235 235 <% 236 236 context.write( 237 237 h.form_remote_tag( 238 html={'id':' remove_hook_form'},239 url=h.url(action=' remove_hook'),238 html={'id':'installed_hook_form'}, 239 url=h.url(action='uninstall_hook'), 240 240 update="message", 241 method='post', before=' remove_hook_form_submit(this); showNoticesPopup()',241 method='post', before='installed_hook_form_submit(this); showNoticesPopup()', 242 242 complete='hideNoticesPopup();switch_message_box();repos_changed()', 243 243 ) 244 244 ) 245 245 %> 246 <input type=hidden name="_repos" value="">247 <div id=" remove_hook_form_content"></div>248 </DIV> 249 250 </DIV> 251 246 <input type='hidden' name='_repos'> 247 <div id="installed_hook_form_contents"></div> 248 </DIV> 249 250 </DIV> 251 -
trunk/pysvnmanager/tests/functional/test_repos.py
r45 r46 28 28 res = self.app.get(url_for(controller='repos')) 29 29 assert res.status == 200 30 assert """<div id=" remove_hook_form_content"></div>""" in res.body, res.body[:100]30 assert """<div id="installed_hook_form_contents"></div>""" in res.body, res.body[:100] 31 31 32 32 def test_init_repos_list(self): … … 53 53 assert "Please choose..." in res.body, res.body 54 54 55 def test_get_ remove_hook_form_content(self):55 def test_get_installed_hook_form(self): 56 56 self.login('root') 57 57 params = { 58 58 'select':'project1', 59 59 } 60 res = self.app.get(url_for(controller='repos', action="get_ remove_hook_form_content"), params)60 res = self.app.get(url_for(controller='repos', action="get_installed_hook_form"), params) 61 61 assert res.status == 200 62 62 assert "" == res.body, res.body 63 63 64 def test_get_hook_ form(self):64 def test_get_hook_setting_form(self): 65 65 self.login('root') 66 66 params = { … … 68 68 'plugin':'CaseInsensitive', 69 69 } 70 res = self.app.get(url_for(controller='repos', action="get_hook_ form"), params)70 res = self.app.get(url_for(controller='repos', action="get_hook_setting_form"), params) 71 71 assert res.status == 200 72 72 assert "A pre-commit hook to detect case-insensitive filename clashes." in res.body, res.body … … 78 78 '_plugin':'CaseInsensitiveXXX', 79 79 } 80 res = self.app.get(url_for(controller='repos', action=" apply_new_hook"), params)80 res = self.app.get(url_for(controller='repos', action="setup_hook"), params) 81 81 assert res.status == 200 82 82 assert "Apply plugin 'CaseInsensitiveXXX' on 'project1' Failed" in res.body, res.body … … 97 97 '_plugin':'CaseInsensitive', 98 98 } 99 res = self.app.get(url_for(controller='repos', action=" apply_new_hook"), params)99 res = self.app.get(url_for(controller='repos', action="setup_hook"), params) 100 100 assert res.status == 200 101 101 assert "<div class='info'>Apply plugin 'CaseInsensitive' on 'project1' success.</div>" == res.body, res.body … … 116 116 '_plugin':'EolStyleCheck', 117 117 } 118 res = self.app.get(url_for(controller='repos', action=" apply_new_hook"), params)118 res = self.app.get(url_for(controller='repos', action="setup_hook"), params) 119 119 assert res.status == 200 120 120 assert """<div class='info'>Apply plugin 'EolStyleCheck' on 'project1' success.</div>""" == res.body, res.body … … 136 136 'pluginid_1':'EolStyleCheck', 137 137 } 138 res = self.app.get(url_for(controller='repos', action=" remove_hook"), params)138 res = self.app.get(url_for(controller='repos', action="uninstall_hook"), params) 139 139 assert res.status == 200 140 140 assert """<div class='info'>Delete plugin 'CaseInsensitive, EolStyleCheck' on 'project1' success.</div>""" == res.body, res.body -
trunk/pysvnmanager/tests/test_repos.py
r45 r46 70 70 71 71 def testPluginList(self): 72 self.assert_(plugins.modules==['CaseInsensitive', 'EolStyleCheck'], plugins.modules) 72 self.assert_('CaseInsensitive' in plugins.modules, plugins.modules) 73 self.assert_('EolStyleCheck' in plugins.modules, plugins.modules) 73 74 74 75 def testPluginImport(self): … … 91 92 92 93 myhooks = hooks.Hooks(self.repos_root + '/project1') 93 self.assert_(myhooks.pluginnames==['CaseInsensitive', 'EolStyleCheck'], myhooks.pluginnames) 94 self.assert_(myhooks.unapplied_plugins.keys()==['CaseInsensitive', 'EolStyleCheck'], myhooks.unapplied_plugins.keys()) 94 self.assert_('CaseInsensitive' in myhooks.pluginnames, myhooks.pluginnames) 95 self.assert_('EolStyleCheck' in myhooks.pluginnames, myhooks.pluginnames) 96 97 self.assert_('CaseInsensitive' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 98 self.assert_('EolStyleCheck' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 95 99 96 100 m = myhooks.plugins['CaseInsensitive'] … … 103 107 m = myhooks.plugins['CaseInsensitive'] 104 108 self.assert_(m.enabled()==False) 105 self.assert_(myhooks.applied_plugins.keys()==[], myhooks.applied_plugins.keys()) 106 self.assert_(myhooks.unapplied_plugins.keys()==['CaseInsensitive', 'EolStyleCheck'], myhooks.unapplied_plugins.keys()) 109 self.assert_('CaseInsensitive' not in myhooks.applied_plugins.keys(), myhooks.applied_plugins.keys()) 110 self.assert_('EolStyleCheck' not in myhooks.applied_plugins.keys(), myhooks.applied_plugins.keys()) 111 self.assert_('CaseInsensitive' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 112 self.assert_('EolStyleCheck' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 107 113 108 114 m.install() 109 115 self.assert_(m.enabled()==True) 110 self.assert_(myhooks.applied_plugins.keys()==['CaseInsensitive'], myhooks.applied_plugins.keys()) 111 self.assert_(myhooks.unapplied_plugins.keys()==['EolStyleCheck'], myhooks.unapplied_plugins.keys()) 116 self.assert_('CaseInsensitive' in myhooks.applied_plugins.keys(), myhooks.applied_plugins.keys()) 117 self.assert_('EolStyleCheck' not in myhooks.applied_plugins.keys(), myhooks.applied_plugins.keys()) 118 self.assert_('CaseInsensitive' not in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 119 self.assert_('EolStyleCheck' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 112 120 113 121 m.uninstall() 114 122 self.assert_(m.enabled()==False) 115 self.assert_(myhooks.applied_plugins.keys()==[], myhooks.applied_plugins.keys()) 116 self.assert_(myhooks.unapplied_plugins.keys()==['CaseInsensitive', 'EolStyleCheck'], myhooks.unapplied_plugins.keys()) 123 self.assert_('CaseInsensitive' not in myhooks.applied_plugins.keys(), myhooks.applied_plugins.keys()) 124 self.assert_('EolStyleCheck' not in myhooks.applied_plugins.keys(), myhooks.applied_plugins.keys()) 125 self.assert_('CaseInsensitive' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 126 self.assert_('EolStyleCheck' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 117 127 118 128
![(please configure the [header_logo] section in trac.ini)](/trac/pysvnmanager/chrome/common/trac_banner.png)