aboutsummaryrefslogtreecommitdiffstats
path: root/bin/export.py
diff options
context:
space:
mode:
authorYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2016-02-22 20:06:27 +0900
committerYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2016-02-22 20:06:27 +0900
commite7519290ad288df840bc86d8dcaea524407df964 (patch)
tree6fe1349a50bfb9045e75b638c8ce0374fafa6d0d /bin/export.py
parent6aaafb6c05840389f1dd9139da9694f3b43c57df (diff)
downloadmailman2-e7519290ad288df840bc86d8dcaea524407df964.tar.gz
mailman2-e7519290ad288df840bc86d8dcaea524407df964.tar.xz
mailman2-e7519290ad288df840bc86d8dcaea524407df964.zip
* add option to pick up C_() texts to make potfile
* revise command line utils _()/C_() usage (not tested at all)
Diffstat (limited to 'bin/export.py')
-rw-r--r--bin/export.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/export.py b/bin/export.py
index 63247df4..83ab1de1 100644
--- a/bin/export.py
+++ b/bin/export.py
@@ -35,7 +35,7 @@ from Mailman import MemberAdaptor
from Mailman import Utils
from Mailman import mm_cfg
from Mailman.MailList import MailList
-from Mailman.i18n import _
+from Mailman.i18n import C_
__i18n_templates__ = True
@@ -268,7 +268,7 @@ class XMLDumper(object):
try:
mlist = MailList(listname, lock=False)
except Errors.MMUnknownListError:
- print >> sys.stderr, _('No such list: %(listname)s')
+ print >> sys.stderr, C_('No such list: %(listname)s')
continue
self._dump_list(mlist, password_scheme)
self._pop_element('mailman')
@@ -316,39 +316,39 @@ else:
def parseargs():
parser = optparse.OptionParser(version=mm_cfg.VERSION,
- usage=_("""\
+ usage=C_("""\
%%prog [options]
Export the configuration and members of a mailing list in XML format."""))
parser.add_option('-o', '--outputfile',
metavar='FILENAME', default=None, type='string',
- help=_("""\
+ help=C_("""\
Output XML to FILENAME. If not given, or if FILENAME is '-', standard out is
used."""))
parser.add_option('-p', '--password-scheme',
- default='none', type='string', help=_("""\
+ default='none', type='string', help=C_("""\
Specify the RFC 2307 style hashing scheme for passwords included in the
output. Use -P to get a list of supported schemes, which are
case-insensitive."""))
parser.add_option('-P', '--list-hash-schemes',
- default=False, action='store_true', help=_("""\
+ default=False, action='store_true', help=C_("""\
List the supported password hashing schemes and exit. The scheme labels are
case-insensitive."""))
parser.add_option('-l', '--listname',
default=[], action='append', type='string',
- metavar='LISTNAME', dest='listnames', help=_("""\
+ metavar='LISTNAME', dest='listnames', help=C_("""\
The list to include in the output. If not given, then all mailing lists are
included in the XML output. Multiple -l flags may be given."""))
opts, args = parser.parse_args()
if args:
parser.print_help()
- parser.error(_('Unexpected arguments'))
+ parser.error(C_('Unexpected arguments'))
if opts.list_hash_schemes:
for label in SCHEMES:
print label.upper()
sys.exit(0)
if opts.password_scheme.lower() not in SCHEMES:
- parser.error(_('Invalid password scheme'))
+ parser.error(C_('Invalid password scheme'))
return parser, opts, args