diff options
Diffstat (limited to '')
-rw-r--r-- | Mailman/Cgi/listinfo.py | 9 | ||||
-rwxr-xr-x | Mailman/Cgi/subscribe.py | 2 | ||||
-rwxr-xr-x | Mailman/Defaults.py.in | 4 | ||||
-rw-r--r-- | NEWS | 9 | ||||
-rw-r--r-- | templates/es/listinfo.html | 2 | ||||
-rw-r--r-- | templates/et/listinfo.html | 2 | ||||
-rw-r--r-- | templates/fi/listinfo.html | 2 | ||||
-rw-r--r-- | templates/gl/listinfo.html | 2 | ||||
-rw-r--r-- | templates/ko/listinfo.html | 2 | ||||
-rw-r--r-- | templates/lt/listinfo.html | 2 | ||||
-rw-r--r-- | templates/nl/listinfo.html | 2 | ||||
-rw-r--r-- | templates/pt_BR/listinfo.html | 2 | ||||
-rw-r--r-- | templates/zh_TW/listinfo.html | 2 |
13 files changed, 35 insertions, 7 deletions
diff --git a/Mailman/Cgi/listinfo.py b/Mailman/Cgi/listinfo.py index 91f5b6bb..bab460b6 100644 --- a/Mailman/Cgi/listinfo.py +++ b/Mailman/Cgi/listinfo.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2017 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2018 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -21,6 +21,7 @@ # No lock needed in this script, because we don't change data. import os +import re import cgi import time @@ -245,12 +246,14 @@ def list_listinfo(mlist, lang): replacements['<mm-fullname-box>'] = mlist.FormatBox('fullname', size=30) # If reCAPTCHA is enabled, display its user interface if mm_cfg.RECAPTCHA_SITE_KEY: + rlang = re.sub('_', '-', lang) replacements['<mm-recaptcha-ui>'] = ( """<tr><td> </td><td> - <script src="https://www.google.com/recaptcha/api.js"></script> + <script src="https://www.google.com/recaptcha/api.js?hl=%s"> + </script> <div class="g-recaptcha" data-sitekey="%s"></div> </td></tr>""" - % mm_cfg.RECAPTCHA_SITE_KEY) + % (rlang, mm_cfg.RECAPTCHA_SITE_KEY)) else: replacements['<mm-recaptcha-ui>'] = '' diff --git a/Mailman/Cgi/subscribe.py b/Mailman/Cgi/subscribe.py index a53efefd..301d1733 100755 --- a/Mailman/Cgi/subscribe.py +++ b/Mailman/Cgi/subscribe.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2017 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2018 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in index 3446aa8d..4406a1f3 100755 --- a/Mailman/Defaults.py.in +++ b/Mailman/Defaults.py.in @@ -1,6 +1,6 @@ # -*- python -*- -# Copyright (C) 1998-2017 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2018 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -133,7 +133,7 @@ SUBSCRIBE_FORM_MIN_TIME = seconds(5) # Use Google reCAPTCHA to protect the subscription form from spam bots. The # following must be set to a pair of keys issued by the reCAPTCHA service at -# https://www.google.com/recaptcha/ +# https://www.google.com/recaptcha/admin RECAPTCHA_SITE_KEY = None RECAPTCHA_SECRET_KEY = None @@ -1,6 +1,6 @@ -*- coding: iso-8859-1 -*- Mailman - The GNU Mailing List Management System -Copyright (C) 1998-2017 by the Free Software Foundation, Inc. +Copyright (C) 1998-2018 by the Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Here is a history of user visible changes to Mailman. @@ -9,6 +9,13 @@ Here is a history of user visible changes to Mailman. New Features + - Thanks to David Siebrger who adapted an existing patch by Andrea + Veri to use Google reCAPTCHA v2 there is now the ability to add + reCAPTCHA to the listinfo subscribe form. There are two new mm_cfg.py + settings for RECAPTCHA_SITE_KEY and RECAPTCHA_SECRET_KEY, the values + for which you obtain for your domain(s) from Google at + <https://www.google.com/recaptcha/admin>. + - Thanks to Lindsay Haisley, there is a new bin/mailman-config command to display various information about this Mailman version and how it was configured. diff --git a/templates/es/listinfo.html b/templates/es/listinfo.html index 98380d90..c73d9d0e 100644 --- a/templates/es/listinfo.html +++ b/templates/es/listinfo.html @@ -107,6 +107,7 @@ <TD BGCOLOR="#dddddd">¿En qué idioma desea visualizar sus mensajes?</TD> <TD> <MM-list-langs></TD> <TD> </TD></TR> + <mm-digest-question-start> <tr> <td>¿Desea recibir los mensaje de cada día reunidos en un único mensaje (digest)? @@ -115,6 +116,7 @@ <MM-Digest-Radio-Button> Sí </TD> </tr> + <mm-digest-question-end> <mm-recaptcha-ui> <tr> <td colspan="3"> diff --git a/templates/et/listinfo.html b/templates/et/listinfo.html index a5735dc9..b6967d9e 100644 --- a/templates/et/listinfo.html +++ b/templates/et/listinfo.html @@ -98,6 +98,7 @@ <TD BGCOLOR="#dddddd">Kasutajaliidese keel?</TD> <TD> <MM-list-langs></TD> <TD> </TD></TR> + <mm-digest-question-start> <tr> <td>Kirju saadetakse kokkuvõtetena </td> @@ -105,6 +106,7 @@ <MM-Digest-Radio-Button> Jah </TD> </tr> + <mm-digest-question-end> <mm-recaptcha-ui> <tr> <td colspan="3"> diff --git a/templates/fi/listinfo.html b/templates/fi/listinfo.html index b7de2343..a52da14c 100644 --- a/templates/fi/listinfo.html +++ b/templates/fi/listinfo.html @@ -110,6 +110,7 @@ <TD BGCOLOR="#dddddd">Millä kielellä haluat ohjeet ja lomakkeet?</TD> <TD> <MM-list-langs></TD> <TD> </TD></TR> + <mm-digest-question-start> <tr> <td>Haluatko vastaanottaa listan viestit päivittäisenä kokoelmana yksittäisten viestien sijaan? @@ -118,6 +119,7 @@ <MM-Digest-Radio-Button> Kyllä </TD> </tr> + <mm-digest-question-end> <mm-recaptcha-ui> <tr> <td colspan="3"> diff --git a/templates/gl/listinfo.html b/templates/gl/listinfo.html index e61a5a0a..7f65048b 100644 --- a/templates/gl/listinfo.html +++ b/templates/gl/listinfo.html @@ -106,6 +106,7 @@ <TD BGCOLOR="#dddddd">En que idioma desexa ver as mensaxes?</TD> <TD> <MM-list-langs></TD> <TD> </TD></TR> + <mm-digest-question-start> <tr> <td>Desexa recibir as mensaxes diarias compiladas nunha única mensaxe? @@ -114,6 +115,7 @@ <MM-Digest-Radio-Button> Si </TD> </tr> + <mm-digest-question-end> <mm-recaptcha-ui> <tr> <td colspan="3"> diff --git a/templates/ko/listinfo.html b/templates/ko/listinfo.html index 240ef3b8..13805662 100644 --- a/templates/ko/listinfo.html +++ b/templates/ko/listinfo.html @@ -103,6 +103,7 @@ <TD BGCOLOR="#dddddd"> ϼ?</TD> <TD> <MM-list-langs></TD> <TD> </TD></TR> + <mm-digest-question-start> <tr> <td> Ϸ翡 ƺ Ͻðڽϱ? </td> @@ -110,6 +111,7 @@ <MM-Digest-Radio-Button> </TD> </tr> + <mm-digest-question-end> <mm-recaptcha-ui> <tr> <td colspan="3"> diff --git a/templates/lt/listinfo.html b/templates/lt/listinfo.html index 2e467d8a..fb95229f 100644 --- a/templates/lt/listinfo.html +++ b/templates/lt/listinfo.html @@ -104,6 +104,7 @@ <TD BGCOLOR="#dddddd">Pasirinkite kalb?</TD> <TD> <MM-list-langs></TD> <TD> </TD></TR> + <mm-digest-question-start> <tr> <td>Ar norite gauti dienos laišk rinkinius? </td> @@ -111,6 +112,7 @@ <MM-Digest-Radio-Button> Taip </TD> </tr> + <mm-digest-question-end> <mm-recaptcha-ui> <tr> <td colspan="3"> diff --git a/templates/nl/listinfo.html b/templates/nl/listinfo.html index 5bd63f05..65eb4f7d 100644 --- a/templates/nl/listinfo.html +++ b/templates/nl/listinfo.html @@ -99,6 +99,7 @@ <TD BGCOLOR="#dddddd">Wat is uw voorkeurstaal voor de berichten?</TD> <TD> <MM-list-langs></TD> <TD> </TD></TR> + <mm-digest-question-start> <tr> <td>Wilt u de berichten gebundeld ontvangen in een dagelijkse verzamelmail? </td> @@ -106,6 +107,7 @@ <MM-Digest-Radio-Button> Ja </TD> </tr> + <mm-digest-question-end> <mm-recaptcha-ui> <tr> <td colspan="3"> diff --git a/templates/pt_BR/listinfo.html b/templates/pt_BR/listinfo.html index 3ece747e..026f29fd 100644 --- a/templates/pt_BR/listinfo.html +++ b/templates/pt_BR/listinfo.html @@ -105,6 +105,7 @@ <TD BGCOLOR="#dddddd">Em que idioma prefere exibir suas mensagens?</TD> <TD> <MM-list-langs></TD> <TD> </TD></TR> + <mm-digest-question-start> <tr> <td>Deseja receber e-mails da lista enviados uma vez por dia em um único email (digest)? @@ -113,6 +114,7 @@ <MM-Digest-Radio-Button> Sim </TD> </tr> + <mm-digest-question-end> <mm-recaptcha-ui> <tr> <td colspan="3"> diff --git a/templates/zh_TW/listinfo.html b/templates/zh_TW/listinfo.html index 966b6d44..dd066425 100644 --- a/templates/zh_TW/listinfo.html +++ b/templates/zh_TW/listinfo.html @@ -91,6 +91,7 @@ HREF="mailto:<MM-Posting-Addr>"><MM-Posting-Addr></A>。 <TD BGCOLOR="#dddddd"> 您適用的語言?</TD> <TD> <MM-list-langs></TD> <TD> </TD></TR> + <mm-digest-question-start> <tr> <td>你 想 以 每 日 摘 要 的 形 式 收 信 嗎 ? </td> @@ -98,6 +99,7 @@ HREF="mailto:<MM-Posting-Addr>"><MM-Posting-Addr></A>。 <MM-Digest-Radio-Button> Yes </TD> </tr> + <mm-digest-question-end> <mm-recaptcha-ui> <tr> <td colspan="3"> |