diff -r 241b192bfcc8 -r d4a341248500 VirtualMailManager/cli/subcommands.py --- a/VirtualMailManager/cli/subcommands.py Thu Feb 24 22:15:10 2011 +0000 +++ b/VirtualMailManager/cli/subcommands.py Sun Feb 27 14:35:04 2011 +0000 @@ -36,6 +36,7 @@ _ = lambda msg: msg txt_wrpr = TextWrapper(width=get_winsize()[1] - 1) +cmd_map = {} class Command(object): @@ -626,15 +627,18 @@ __copyright__, prog, _(u'is free software and comes with ABSOLUTELY NO WARRANTY.'))) -cmd = Command -cmd_map = { # {{{ + +def update_cmd_map(): + """Update the cmd_map, after gettext's _ was installed.""" + cmd = Command + cmd_map.update({ # Account commands 'getuser': cmd('getuser', 'gu', get_user, _(u'uid'), _(u'get the address of the user with the given UID')), 'useradd': cmd('useradd', 'ua', user_add, _(u'address [password]'), _(u'create a new e-mail user with the given address')), 'userdelete': cmd('userdelete', 'ud', user_delete, - _(u'address') + ' [force]', + _(u'address') + ' [force]', _(u'delete the specified user')), 'userdisable': cmd('userdisable', 'u0', user_disable, _(u'address [service ...]'), @@ -714,7 +718,7 @@ _(u'show a help overview or help for the given subcommand')), 'version': cmd('version', 'v', version, '', _(u'show version and copyright information')), -} # }}} + }) def _get_order(ctx):