diff options
author | Mark Sapiro <mark@msapiro.net> | 2018-06-16 09:39:45 -0700 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2018-06-16 09:39:45 -0700 |
commit | 3e3819ce7fa318f5e60b2f04ae94b48698ab73a5 (patch) | |
tree | af21f7876eaf02596a2b1a1559334abef96e10cc /Mailman | |
parent | dd09906adb9316b494cdef6a6ed22daf29a2eeb5 (diff) | |
download | mailman2-3e3819ce7fa318f5e60b2f04ae94b48698ab73a5.tar.gz mailman2-3e3819ce7fa318f5e60b2f04ae94b48698ab73a5.tar.xz mailman2-3e3819ce7fa318f5e60b2f04ae94b48698ab73a5.zip |
Preserve translation accross a call to SendSubscribeAck().
Diffstat (limited to 'Mailman')
-rwxr-xr-x | Mailman/MailList.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index cc1be3b5..abc46abd 100755 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -1058,8 +1058,14 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin, syslog('subscribe', '%s: new%s %s, %s', self.internal_name(), kind, formataddr((name, email)), whence) if ack: - self.SendSubscribeAck(email, self.getMemberPassword(email), - digest, text) + lang = self.preferred_language + otrans = i18n.get_translation() + i18n.set_language(lang) + try: + self.SendSubscribeAck(email, self.getMemberPassword(email), + digest, text) + finally: + i18n.set_translation(otrans) if admin_notif: lang = self.preferred_language otrans = i18n.get_translation() |