From 3e3819ce7fa318f5e60b2f04ae94b48698ab73a5 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sat, 16 Jun 2018 09:39:45 -0700 Subject: Preserve translation accross a call to SendSubscribeAck(). --- Mailman/MailList.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Mailman') 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() -- cgit v1.2.3