[Merge] lp:~futatuki/mailman/enhance-i18n-list-overview into lp:mailman/2.1

Yasuhito FUTATSUKI at POEM futatuki at poem.co.jp
Thu Jun 21 18:07:25 EDT 2018


Yasuhito FUTATSUKI at POEM has proposed merging lp:~futatuki/mailman/enhance-i18n-list-overview into lp:mailman/2.1.

Commit message:
enhance i18n of listinfo/admin overview page

Requested reviews:
  Mailman Coders (mailman-coders)

For more details, see:
https://code.launchpad.net/~futatuki/mailman/enhance-i18n-list-overview/+merge/348365

On listinfo/admin overview page, lists' description may be stored in different charset/encoding from what the page uses. However current implementation of listinfo/admin overview page uses those regardlessly of the difference, so those cannot be displayed correctly. 

To avoid this, (1) I've implemented a new function to get description as string of specified charset  (with XML character reference) in MailList class, MailList.GetDescription(), and use it instead of accessing .description attribute directly in overview functions.

This function uses a precondition that .description attribute is stored in charset of list's preferred_language. This is fundamentally true, but in case list's preferred_language has been changed and of the description hasn't, it is not true(Suppose changing preferred_language temporary to edit template files via Web UI, for example). To help to ensure the precondition, (2) I've added hook to change charset of list's description when preferred_language is changed via Web UI. (This is not always preserve identity of description string when preferred_languages is changed one of other charset/encoding and then changed back, because of multiple mapping of character between charset, and intentional use of XML character reference)
-- 
Your team Mailman Coders is requested to review the proposed merge of lp:~futatuki/mailman/enhance-i18n-list-overview into lp:mailman/2.1.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 3318 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/mailman-coders/attachments/20180621/00fdf7bd/attachment.diff>


More information about the Mailman-coders mailing list