diff options
author | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2018-06-18 06:44:53 +0900 |
---|---|---|
committer | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2018-06-18 06:44:53 +0900 |
commit | 5800a4e0bbe034297cfe85a28965cf7f6af3e304 (patch) | |
tree | 4c05525b107dcdce08aee5f9a2d345f3b926edf1 /Mailman/Cgi | |
parent | 444648032c9ff3d852874896b5d44f4c5f1eda53 (diff) | |
parent | 6a069d6f6648a8a4736fdf5b8141af9368cf3456 (diff) | |
download | mailman2-5800a4e0bbe034297cfe85a28965cf7f6af3e304.tar.gz mailman2-5800a4e0bbe034297cfe85a28965cf7f6af3e304.tar.xz mailman2-5800a4e0bbe034297cfe85a28965cf7f6af3e304.zip |
merge lp:mailman/2.1 up to 1777
Diffstat (limited to 'Mailman/Cgi')
-rw-r--r-- | Mailman/Cgi/admin.py | 17 | ||||
-rw-r--r-- | Mailman/Cgi/options.py | 6 |
2 files changed, 19 insertions, 4 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'))) diff --git a/Mailman/Cgi/options.py b/Mailman/Cgi/options.py index 4f128baf..c2a84ecb 100644 --- a/Mailman/Cgi/options.py +++ b/Mailman/Cgi/options.py @@ -45,6 +45,8 @@ DIGRE = re.compile( # Set up i18n _ = i18n._ i18n.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE) +def D_(s): + return s try: True, False @@ -581,9 +583,10 @@ address. Upon confirmation, any other mailing list containing the address mlist.Lock() needapproval = False try: + _ = D_ try: mlist.DeleteMember( - user, 'via the member options page', userack=1) + user, _('via the member options page'), userack=1) except Errors.MMNeedApproval: needapproval = True except Errors.NotAMemberError: @@ -595,6 +598,7 @@ address. Upon confirmation, any other mailing list containing the address pass mlist.Save() finally: + _ = i18n._ mlist.Unlock() # Now throw up some results page, with appropriate links. We can't # drop them back into their options page, because that's gone now! |