aboutsummaryrefslogtreecommitdiffstats
path: root/bin/rmlist
diff options
context:
space:
mode:
authorYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2016-02-22 17:51:37 +0900
committerYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2016-02-22 17:51:37 +0900
commit6aaafb6c05840389f1dd9139da9694f3b43c57df (patch)
tree3ca127f0bd34ede1ff388fa529fffad522d424d8 /bin/rmlist
parent3c78c57cc88877f701a935ce009efd39d31925e6 (diff)
downloadmailman2-6aaafb6c05840389f1dd9139da9694f3b43c57df.tar.gz
mailman2-6aaafb6c05840389f1dd9139da9694f3b43c57df.tar.xz
mailman2-6aaafb6c05840389f1dd9139da9694f3b43c57df.zip
Importing locale patch for command line utils, from RHEL6 rpm source
(for -japan-poem, originally imported from 2.1.12-18 package for RHEL6 rpm source)
Diffstat (limited to 'bin/rmlist')
-rwxr-xr-xbin/rmlist30
1 files changed, 15 insertions, 15 deletions
diff --git a/bin/rmlist b/bin/rmlist
index b0980104..9b2cc19f 100755
--- a/bin/rmlist
+++ b/bin/rmlist
@@ -46,7 +46,7 @@ import paths
from Mailman import mm_cfg
from Mailman import Utils
from Mailman import MailList
-from Mailman.i18n import _
+from Mailman.i18n import C_
try:
True, False
@@ -61,7 +61,7 @@ def usage(code, msg=''):
fd = sys.stderr
else:
fd = sys.stdout
- print >> fd, _(__doc__)
+ print >> fd, C_(__doc__)
if msg:
print >> fd, msg
sys.exit(code)
@@ -70,15 +70,15 @@ def usage(code, msg=''):
def remove_it(listname, filename, msg):
if os.path.islink(filename):
- print _('Removing %(msg)s')
+ print C_('Removing %(msg)s')
os.unlink(filename)
elif os.path.isdir(filename):
- print _('Removing %(msg)s')
+ print C_('Removing %(msg)s')
shutil.rmtree(filename)
elif os.path.isfile(filename):
os.unlink(filename)
else:
- print _('%(listname)s %(msg)s not found as %(filename)s')
+ print C_('%(listname)s %(msg)s not found as %(filename)s')
@@ -102,13 +102,13 @@ def main():
if not Utils.list_exists(listname):
if not removeArchives:
- usage(1, _('No such list (or list already deleted): %(listname)s'))
+ usage(1, C_('No such list (or list already deleted): %(listname)s'))
else:
- print _(
+ print C_(
'No such list: %(listname)s. Removing its residual archives.')
if not removeArchives:
- print _('Not removing archives. Reinvoke with -a to remove them.')
+ print C_('Not removing archives. Reinvoke with -a to remove them.')
REMOVABLES = []
@@ -122,7 +122,7 @@ def main():
sys.modules[modname].remove(mlist)
REMOVABLES = [
- (os.path.join(mm_cfg.LIST_DATA_DIR, listname), _('list info')),
+ (os.path.join(mm_cfg.LIST_DATA_DIR, listname), C_('list info')),
]
# Remove any stale locks associated with the list
@@ -130,7 +130,7 @@ def main():
fn_listname = filename.split('.')[0]
if fn_listname == listname:
REMOVABLES.append((os.path.join(mm_cfg.LOCK_DIR, filename),
- _('stale lock file')))
+ C_('stale lock file')))
# Remove any held messages for this list
for filename in os.listdir(mm_cfg.DATA_DIR):
@@ -138,18 +138,18 @@ def main():
re.IGNORECASE)
if cre.match(filename):
REMOVABLES.append((os.path.join(mm_cfg.DATA_DIR, filename),
- _('held message file')))
+ C_('held message file')))
if removeArchives:
REMOVABLES.extend([
(os.path.join(mm_cfg.PRIVATE_ARCHIVE_FILE_DIR, listname),
- _('private archives')),
+ C_('private archives')),
(os.path.join(mm_cfg.PRIVATE_ARCHIVE_FILE_DIR, listname + '.mbox'),
- _('private archives')),
+ C_('private archives')),
(os.path.join(mm_cfg.PUBLIC_ARCHIVE_FILE_DIR, listname),
- _('public archives')),
+ C_('public archives')),
(os.path.join(mm_cfg.PUBLIC_ARCHIVE_FILE_DIR, listname + '.mbox'),
- _('public archives')),
+ C_('public archives')),
])
for dir, msg in REMOVABLES: