summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2000-12-26 17:29:39 +0000
committerbwarsaw2000-12-26 17:29:39 +0000
commit932fdf89306a5435d4e2bbce3fa4cd3845057c87 (patch)
tree125c07c73477aeb9ff9a7d30803081a671a84867
parent1c8ca76cbce54a02780d481ffceaa390357aa9d9 (diff)
downloadmailman-932fdf89306a5435d4e2bbce3fa4cd3845057c87.tar.gz
mailman-932fdf89306a5435d4e2bbce3fa4cd3845057c87.tar.zst
mailman-932fdf89306a5435d4e2bbce3fa4cd3845057c87.zip
mail_passwords(): subj is marked for translation. Call maketext()
with the list's preferred language.
-rwxr-xr-xcron/mailpasswds5
1 files changed, 3 insertions, 2 deletions
diff --git a/cron/mailpasswds b/cron/mailpasswds
index bdcb15dd6..0593e0d20 100755
--- a/cron/mailpasswds
+++ b/cron/mailpasswds
@@ -45,6 +45,7 @@ from Mailman import MailList
from Mailman import Utils
from Mailman import Message
from Mailman.Handlers import HandlerAPI
+from Mailman.i18n import _
# Work around known problems with some RedHat cron daemons
import signal
@@ -60,7 +61,7 @@ def mail_passwords(mlist, hosts):
"""
mailman_owner = mm_cfg.MAILMAN_OWNER
for host, users in hosts.items():
- subj = host + ' mailing list memberships reminder'
+ subj = _(' %(host)s mailing list memberships reminder')
for addr, data in users.items():
table = []
for l, r, p, u in data:
@@ -76,7 +77,7 @@ def mail_passwords(mlist, hosts):
'useraddr': addr,
'exreq' : r,
'owner' : mailman_owner,
- })
+ }, mlist.preferred_language)
# add this to the end so it doesn't get wrapped/filled
text = text + header + '\n' + string.join(table, '\n')
msg = Message.UserNotification(addr, mailman_owner, subj, text)