Localization issue with 'remove_members' and possible fix

Bug #1161445 reported by Thomas Baumann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Medium
Mark Sapiro

Bug Description

Hello,

I found a language issue that I was able to fix. My installation of Mailman 2.1.13
(Debian Squeeze) uses German localization, DEFAULT_SERVER_LANGUAGE
is set to 'de'.

The issue: When I remove a member from the commandline with
'remove_members <list> <address>', the mail to the user 'You have been
unsubscribed from the <list> mailing list' has an unlocalized subject line.
This does not happen using the email interface.

Obviously the user language setting for i18n has not been done when this mail
subject string gets localized. I inserted one line into Deliverer.py which fixed
the issue for me:

File: Deliverer.py - near line 84
...
def SendUnsubscribeAck(self, addr, lang):
    realname = self.real_name
+ i18n.set_language(lang)
    msg = Message.UserNotification(
        self.GetMemberAdminEmail(addr), self.GetBouncesEmail(),
        _('You have been unsubscribed from the %(realname)s mailing list'),
        Utils.wrap(self.goodbye_msg), lang)
    msg.send(self, verp=mm_cfg.VERP_PERSONALIZED_DELIVERIES)
...

Could someone knowledgeable please review this as I am not sure that it is
the proper fix for the issue?

Regards
Thomas

Related branches

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

Thank you for the report and the suggested fix which is the right one.

Changed in mailman:
assignee: nobody → Mark Sapiro (msapiro)
importance: Undecided → Medium
milestone: none → 2.1.16
status: New → Fix Committed
Mark Sapiro (msapiro)
Changed in mailman:
milestone: 2.1.16 → 2.1.16rc1
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.