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

Bug #1922843 reported by Yasuhito FUTATSUKI at POEM
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Medium
Mark Sapiro

Bug Description

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',

Related branches

Revision history for this message
Mark Sapiro (msapiro) wrote :

Thanks for the report.

Changed in mailman:
assignee: nobody → Mark Sapiro (msapiro)
importance: Undecided → Medium
milestone: none → 2.1.35
status: New → Confirmed
Mark Sapiro (msapiro)
Changed in mailman:
status: Confirmed → Fix Committed
Revision history for this message
Suchai Wannakijwalkun (wonsuchai) wrote :

ขอยคุณครับ.

Mark Sapiro (msapiro)
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.