Public bug reported:

In Bouncer.Bouncer.__sendAdminBounceNotice(), default value of "did"
argment is evaluated only once on method definition and not evaluated at
runtime. This causes that the translation of 'disabled' is never used
other than default one.

A fix will be like a patch below (but not checked).

--- a/Mailman/Bouncer.py
+++ b/Mailman/Bouncer.py
@@ -226,12 +226,14 @@ class Bouncer:
         if self.bounce_notify_owner_on_disable:
             self.__sendAdminBounceNotice(member, msg)
 
-    def __sendAdminBounceNotice(self, member, msg, did=_('disabled')):
+    def __sendAdminBounceNotice(self, member, msg, did=None):
         # BAW: This is a bit kludgey, but we're not providing as much
         # information in the new admin bounce notices as we used to (some of
         # it was of dubious value).  However, we'll provide empty, strange, or
         # meaningless strings for the unused %()s fields so that the language
         # translators don't have to provide new templates.
+        if did = None:
+            did = _('disabled')
         siteowner = Utils.get_site_email(self.host_name)
         text = Utils.maketext(
             'bounce.txt',

** Affects: mailman
     Importance: Undecided
         Status: New

** Branch linked: lp:mailman/2.1

-- 
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.
https://bugs.launchpad.net/bugs/1922843

Title:
  bounce action notice message never use the translation for 'disabled'

To manage notifications about this bug go to:
https://bugs.launchpad.net/mailman/+bug/1922843/+subscriptions
_______________________________________________
Mailman-coders mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/mailman-coders.python.org/
Member address: [email protected]

Reply via email to