aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/MailList.py
diff options
context:
space:
mode:
authortkikuchi <>2004-10-10 13:14:30 +0000
committertkikuchi <>2004-10-10 13:14:30 +0000
commit9892299e4618d54da33b7243568bcd3975e71c93 (patch)
treed27c6e3d59f6625bbdea92bf6b02c55d82818d5a /Mailman/MailList.py
parent8ce66b056a968d1fe7ec739173b076c8c066ffc3 (diff)
downloadmailman2-9892299e4618d54da33b7243568bcd3975e71c93.tar.gz
mailman2-9892299e4618d54da33b7243568bcd3975e71c93.tar.xz
mailman2-9892299e4618d54da33b7243568bcd3975e71c93.zip
I18N autorespondToSender()
Diffstat (limited to 'Mailman/MailList.py')
-rw-r--r--Mailman/MailList.py11
1 files changed, 8 insertions, 3 deletions
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)