[Bug 1532399] [NEW] Rejected notice message is not use i18n in Errors.py

Public bug reported:
Rejected notice message gets code defined in Errors.py as follows --- rejection = _('Your message was rejected')
notice = _('Your message was rejected') ---
But "_" function is not used Mailman.i18n. Defined in Errors.py as follows: --- def _(s): return s ---
** Affects: mailman Importance: Undecided Status: New

There are issues in this area, but not because of the definition of _ in Errors.py. This definition is intentional because at the time the module is imported, the ultimate language context for the message is not known. Thus, the messages can't be translated as the module is imported.
I'm aware of two places where the message is ultimately not translated correctly.
If the list's preferred_language is different from the user's language on the list and a message is held, the default rejection reason in the admindb interface is in the list's preferred_language and if the post is ultimately rejected, the reason in the notice to the user is still in the list's preferred_language and not in the user's language. I do not intend to try to fix this because at the time to post is rejected, we don't know if the default reason was changed by the moderator and we have no way to translate it into the user's language.
The other place I'm aware of is in the automatic rejection of a post from a moderated user when member_moderation_action is Reject and there is no member_moderation_notice. In this case the default reason to the user is in English rather than the user's language. I will work on a fix for this one. Note that here also, if there is a member_moderation_notice, we have no way to translate that so it will always be in the language in which it was entered.
If you are aware of other contexts in which the default notice is not appropriately translated, please report what they are.
** Changed in: mailman Status: New => Incomplete

I understood, I can send the reason for the non-English (However, one language) by setting the member_moderation_notice.
Thank you.
participants (2)
-
Mark Sapiro
-
Yuichi Hatanaka