diff options
author | Mark Sapiro <mark@msapiro.net> | 2018-06-17 12:26:36 -0700 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2018-06-17 12:26:36 -0700 |
commit | 08d25ccc7e594f16fbbfebe486b2d5a62f3ec855 (patch) | |
tree | ec4decaa3bd513129277013a7f5c194735c306ad /Mailman/Cgi/admin.py | |
parent | 3e3819ce7fa318f5e60b2f04ae94b48698ab73a5 (diff) | |
parent | 9b2169e95b5ec2fb8cbc0c745a92da37c70841f2 (diff) | |
download | mailman2-08d25ccc7e594f16fbbfebe486b2d5a62f3ec855.tar.gz mailman2-08d25ccc7e594f16fbbfebe486b2d5a62f3ec855.tar.xz mailman2-08d25ccc7e594f16fbbfebe486b2d5a62f3ec855.zip |
I18n for new whence reasons in admin (un)subscribe notices.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Cgi/admin.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py index 174cf34f..f44e01db 100644 --- a/Mailman/Cgi/admin.py +++ b/Mailman/Cgi/admin.py @@ -47,6 +47,8 @@ from Mailman.CSRFcheck import csrf_check # Set up i18n _ = i18n._ i18n.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE) +def D_(s): + return s NL = '\n' OPTCOLUMNS = 11 @@ -1482,9 +1484,12 @@ def change_options(mlist, category, subcat, cgidata, doc): else: mlist.InviteNewMember(userdesc, invitation) else: + _ = D_ + whence = _('admin mass sub') + _ = i18n._ mlist.ApprovedAddMember(userdesc, send_welcome_msg, send_admin_notif, invitation, - whence='admin mass sub') + whence=whence) except Errors.MMAlreadyAMember: subscribe_errors.append((safeentry, _('Already a member'))) except Errors.MMBadEmailError: @@ -1537,8 +1542,11 @@ def change_options(mlist, category, subcat, cgidata, doc): unsubscribe_success = [] for addr in names: try: + _ = D_ + whence = _('admin mass unsub') + _ = i18n._ mlist.ApprovedDeleteMember( - addr, whence='admin mass unsub', + addr, whence=whence, admin_notif=send_unsub_notifications, userack=userack) unsubscribe_success.append(Utils.websafe(addr)) @@ -1645,7 +1653,10 @@ def change_options(mlist, category, subcat, cgidata, doc): quser = urllib.quote(user) if cgidata.has_key('%s_unsub' % quser): try: - mlist.ApprovedDeleteMember(user, whence='member mgt page') + _ = D_ + whence=_('member mgt page') + _ = i18n._ + mlist.ApprovedDeleteMember(user, whence=whence) removes.append(user) except Errors.NotAMemberError: errors.append((user, _('Not subscribed'))) |