aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/MailList.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/MailList.py')
-rwxr-xr-xMailman/MailList.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index abc46abd..3e5a6232 100755
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -72,6 +72,7 @@ from Mailman import i18n
from Mailman.Logging.Syslog import syslog
_ = i18n._
+D_ = i18n.D_
EMPTYSTRING = ''
OR = '|'
@@ -1071,6 +1072,7 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
otrans = i18n.get_translation()
i18n.set_language(lang)
try:
+ whence = "" if whence is None else "(" + _(whence) + ")"
realname = self.real_name
subject = _('%(realname)s subscription notification')
finally:
@@ -1081,7 +1083,7 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
"adminsubscribeack.txt",
{"listname" : realname,
"member" : formataddr((name, email)),
- "whence" : "" if whence is None else "(" + whence + ")"
+ "whence" : whence
}, mlist=self)
msg = Message.OwnerNotification(self, subject, text)
msg.send(self)
@@ -1118,7 +1120,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)
@@ -1307,7 +1309,7 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
except ValueError:
raise Errors.MMBadConfirmation, 'op-less data %s' % (rec,)
if op == Pending.SUBSCRIPTION:
- whence = 'via email confirmation'
+ whence = D_('via email confirmation')
try:
userdesc = data[0]
# If confirmation comes from the web, context should be a
@@ -1316,7 +1318,7 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
# context is a Message and isn't relevant, so ignore it.
if isinstance(context, UserDesc):
userdesc += context
- whence = 'via web confirmation'
+ whence = D_('via web confirmation')
addr = userdesc.address
fullname = userdesc.fullname
password = userdesc.password
@@ -1348,9 +1350,9 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
addr = data[0]
# Log file messages don't need to be i18n'd
if isinstance(context, Message.Message):
- whence = 'email confirmation'
+ whence = D_('email confirmation')
else:
- whence = 'web confirmation'
+ whence = D_('web confirmation')
# Can raise NotAMemberError if they unsub'd via other means
self.ApprovedDeleteMember(addr, whence=whence)
return op, addr