aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Mailman/Handlers/Hold.py2
-rw-r--r--Mailman/MailList.py11
2 files changed, 9 insertions, 4 deletions
diff --git a/Mailman/Handlers/Hold.py b/Mailman/Handlers/Hold.py
index 0a6a7d31..13b86895 100644
--- a/Mailman/Handlers/Hold.py
+++ b/Mailman/Handlers/Hold.py
@@ -232,7 +232,7 @@ def hold_for_approval(mlist, msg, msgdata, exc):
# bounce processing that might be needed.
cookie = mlist.pend_new(Pending.HELD_MESSAGE, id)
if not fromusenet and ackp(msg) and mlist.respond_to_post_requests and \
- mlist.autorespondToSender(sender):
+ mlist.autorespondToSender(sender, mlist.getMemberLanguage(sender)):
# Get a confirmation cookie
d['confirmurl'] = '%s/%s' % (mlist.GetScriptURL('confirm', absolute=1),
cookie)
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index d44350ca..2c5dfa7a 100644
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -1385,13 +1385,17 @@ bad regexp in bounce_matching_header line: %s
return line
return 0
- def autorespondToSender(self, sender):
+ def autorespondToSender(self, sender, lang=None):
"""Return true if Mailman should auto-respond to this sender.
This is only consulted for messages sent to the -request address, or
for posting hold notifications, and serves only as a safety value for
mail loops with email 'bots.
"""
+ # language setting
+ if lang == None:
+ lang = self.preferred_language
+ i18n.set_language(lang)
# No limit
if mm_cfg.MAX_AUTORESPONSES_PER_DAY == 0:
return 1
@@ -1419,11 +1423,12 @@ bad regexp in bounce_matching_header line: %s
'listname': '%s@%s' % (self.real_name, self.host_name),
'num' : count,
'owneremail': self.GetOwnerEmail(),
- })
+ },
+ lang=lang)
msg = Message.UserNotification(
sender, self.GetOwnerEmail(),
_('Last autoresponse notification for today'),
- text)
+ text, lang=lang)
msg.send(self)
return 0
self.hold_and_cmd_autoresponses[sender] = (today, count+1)