aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Mailman/Bouncer.py3
-rw-r--r--Mailman/Cgi/admin.py8
-rw-r--r--Mailman/Cgi/options.py3
-rwxr-xr-xMailman/ListAdmin.py4
-rwxr-xr-xMailman/MailList.py4
-rw-r--r--Mailman/i18n.py5
-rw-r--r--messages/Makefile.in2
7 files changed, 19 insertions, 10 deletions
diff --git a/Mailman/Bouncer.py b/Mailman/Bouncer.py
index 2a1cb539..21a4df38 100644
--- a/Mailman/Bouncer.py
+++ b/Mailman/Bouncer.py
@@ -49,6 +49,7 @@ REASONS = {MemberAdaptor.BYBOUNCE: _('due to excessive bounces'),
}
_ = i18n._
+D_ = i18n.D_
@@ -265,7 +266,7 @@ class Bouncer:
if info.noticesleft <= 0:
# BAW: Remove them now, with a notification message
self.ApprovedDeleteMember(
- member, 'disabled address',
+ member, D_('disabled address'),
admin_notif=self.bounce_notify_owner_on_removal,
userack=1)
# Expunge the pending cookie for the user. We throw away the
diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py
index 174cf34f..984904a7 100644
--- a/Mailman/Cgi/admin.py
+++ b/Mailman/Cgi/admin.py
@@ -47,6 +47,7 @@ from Mailman.CSRFcheck import csrf_check
# Set up i18n
_ = i18n._
i18n.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE)
+D_ = i18n.D_
NL = '\n'
OPTCOLUMNS = 11
@@ -1484,7 +1485,7 @@ def change_options(mlist, category, subcat, cgidata, doc):
else:
mlist.ApprovedAddMember(userdesc, send_welcome_msg,
send_admin_notif, invitation,
- whence='admin mass sub')
+ whence=D_('admin mass sub'))
except Errors.MMAlreadyAMember:
subscribe_errors.append((safeentry, _('Already a member')))
except Errors.MMBadEmailError:
@@ -1538,7 +1539,7 @@ def change_options(mlist, category, subcat, cgidata, doc):
for addr in names:
try:
mlist.ApprovedDeleteMember(
- addr, whence='admin mass unsub',
+ addr, whence=D_('admin mass unsub'),
admin_notif=send_unsub_notifications,
userack=userack)
unsubscribe_success.append(Utils.websafe(addr))
@@ -1645,7 +1646,8 @@ def change_options(mlist, category, subcat, cgidata, doc):
quser = urllib.quote(user)
if cgidata.has_key('%s_unsub' % quser):
try:
- mlist.ApprovedDeleteMember(user, whence='member mgt page')
+ mlist.ApprovedDeleteMember(user,
+ whence=D_('member mgt page'))
removes.append(user)
except Errors.NotAMemberError:
errors.append((user, _('Not subscribed')))
diff --git a/Mailman/Cgi/options.py b/Mailman/Cgi/options.py
index 4f128baf..d563d253 100644
--- a/Mailman/Cgi/options.py
+++ b/Mailman/Cgi/options.py
@@ -45,6 +45,7 @@ DIGRE = re.compile(
# Set up i18n
_ = i18n._
i18n.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE)
+D_ = i18n.D_
try:
True, False
@@ -583,7 +584,7 @@ address. Upon confirmation, any other mailing list containing the address
try:
try:
mlist.DeleteMember(
- user, 'via the member options page', userack=1)
+ user, D_('via the member options page'), userack=1)
except Errors.MMNeedApproval:
needapproval = True
except Errors.NotAMemberError:
diff --git a/Mailman/ListAdmin.py b/Mailman/ListAdmin.py
index 877aa5c4..d083a521 100755
--- a/Mailman/ListAdmin.py
+++ b/Mailman/ListAdmin.py
@@ -45,6 +45,7 @@ from Mailman.Logging.Syslog import syslog
from Mailman import i18n
_ = i18n._
+D_ = i18n.D_
# Request types requiring admin approval
IGN = 0
@@ -436,7 +437,8 @@ class ListAdmin:
assert value == mm_cfg.SUBSCRIBE
try:
userdesc = UserDesc(addr, fullname, password, digest, lang)
- self.ApprovedAddMember(userdesc, whence='via admin approval')
+ self.ApprovedAddMember(userdesc,
+ whence=D_('via admin approval'))
except Errors.MMAlreadyAMember:
# User has already been subscribed, after sending the request
pass
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index cc1be3b5..72b50a11 100755
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -1075,7 +1075,7 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
"adminsubscribeack.txt",
{"listname" : realname,
"member" : formataddr((name, email)),
- "whence" : "" if whence is None else "(" + whence + ")"
+ "whence" : "" if whence is None else "(" + _(whence) + ")"
}, mlist=self)
msg = Message.OwnerNotification(self, subject, text)
msg.send(self)
@@ -1112,7 +1112,7 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
'adminunsubscribeack.txt',
{'member' : name,
'listname': self.real_name,
- "whence" : "" if whence is None else "(" + whence + ")"
+ "whence" : "" if whence is None else "(" + _(whence) + ")"
}, mlist=self)
msg = Message.OwnerNotification(self, subject, text)
msg.send(self)
diff --git a/Mailman/i18n.py b/Mailman/i18n.py
index 605d4e76..f39b1004 100644
--- a/Mailman/i18n.py
+++ b/Mailman/i18n.py
@@ -123,7 +123,10 @@ else:
def C_(s):
return tolocale(_(s, 2))
-
+# marking for pygettext
+def D_(s):
+ return s
+
def ctime(date):
# Don't make these module globals since we have to do runtime translation
diff --git a/messages/Makefile.in b/messages/Makefile.in
index 486f4eea..dcc87146 100644
--- a/messages/Makefile.in
+++ b/messages/Makefile.in
@@ -139,7 +139,7 @@ docstring.files:
potfile: marked.files docstring.files
@echo "Running pygettext on $@; this make take a while."
- (cd ..; $(PROG) -k C_ -p messages -d mailman -D -X messages/marked.files `cat messages/marked.files messages/docstring.files`)
+ (cd ..; $(PROG) -k C_ -k D_ -p messages -d mailman -D -X messages/marked.files `cat messages/marked.files messages/docstring.files`)
# Update the individual mailman.po files with the new changes to the
# .pot file