From: Jan Szejko Date: Fri, 6 Apr 2018 09:21:28 +0000 (+0200) Subject: newsletter by mailchimp X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/3f07d81cce72585a8ec7d4a4e062dc15d53fd931 newsletter by mailchimp --- diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 72169806a..ad81ea7a3 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -60,4 +60,6 @@ httplib2 Texml django-ssify>=0.2.1,<0.3 -raven \ No newline at end of file +raven + +mailchimp3 \ No newline at end of file diff --git a/src/contact/mailing.py b/src/contact/mailing.py new file mode 100644 index 000000000..bfd42093a --- /dev/null +++ b/src/contact/mailing.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- + +from hashlib import md5 + +import requests +from django.conf import settings +from mailchimp3 import MailChimp +from mailchimp3.mailchimpclient import MailChimpError + +INTERESTS = {settings.MAILCHIMP_GROUP_ID: True} + + +def get_client(): + headers = requests.utils.default_headers() + headers['User-Agent'] = '%s (%s)' % settings.MANAGERS[0] + + +def subscriber_hash(email): + return md5(email).hexdigest() + + +def remove_from_groups(email, client): + group_ids = [] + categories = client.lists.interest_categories.all(list_id=settings.MAILCHIMP_LIST_ID)['categories'] + for category in categories: + groups = client.lists.interest_categories.interests.all( + list_id=settings.MAILCHIMP_LIST_ID, category_id=category['id'])['interests'] + group_ids += [group['id'] for group in groups] + interests = {group_id: False for group_id in group_ids} + client.lists.members.update( + settings.MAILCHIMP_LIST_ID, subscriber_hash(email), + data={'interests': interests}) + + +def subscribe(email): + client = MailChimp(mc_api=settings.MAILCHIMP_API_KEY, timeout=10.0) + try: + member = client.lists.members.get(settings.MAILCHIMP_LIST_ID, subscriber_hash(email)) + except MailChimpError: + pass + else: + if member['status'] != 'subscribed': + remove_from_groups(email, client) + client.lists.members.create_or_update( + settings.MAILCHIMP_LIST_ID, subscriber_hash(email), + data={ + 'email_address': email, + 'status_if_new': 'subscribed', + 'status': 'subscribed', + 'interests': INTERESTS, + } + ) diff --git a/src/newsletter/forms.py b/src/newsletter/forms.py index 5eb71e898..e8d99f7f9 100644 --- a/src/newsletter/forms.py +++ b/src/newsletter/forms.py @@ -6,6 +6,7 @@ from django.forms.fields import EmailField from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _, ugettext +from contact import mailing from newsletter.models import Subscription from wolnelektury.utils import send_noreply_mail @@ -13,7 +14,7 @@ from wolnelektury.utils import send_noreply_mail class NewsletterForm(Form): email_field = 'email' agree_newsletter = BooleanField( - required=False, initial=True, label=_(u'I want to receive Wolne Lektury\'s newsletter.'), help_text='''\ + required=False, initial=False, label=_(u'I want to receive Wolne Lektury\'s newsletter.'), help_text='''\ Oświadczam, że wyrażam zgodę na przetwarzanie moich danych osobowych zawartych \ w niniejszym formularzu zgłoszeniowym przez Fundację Nowoczesna Polska (administratora danych) z siedzibą \ w Warszawie (00-514) przy ul. Marszałkowskiej 84/92 lok. 125 w celu otrzymywania newslettera Wolnych Lektur. \ @@ -34,10 +35,11 @@ możliwość ich poprawiania oraz że ich podanie jest dobrowolne, ale niezbędn except ValidationError: pass else: - subscription, created = Subscription.objects.get_or_create(email=email, defaults={'active': False}) - send_noreply_mail( - ugettext(u'Confirm your subscription to Wolne Lektury newsletter'), - render_to_string('newsletter/subscribe_email.html', {'subscription': subscription}), [email]) + # subscription, created = Subscription.objects.get_or_create(email=email, defaults={'active': False}) + # send_noreply_mail( + # ugettext(u'Confirm your subscription to Wolne Lektury newsletter'), + # render_to_string('newsletter/subscribe_email.html', {'subscription': subscription}), [email]) + mailing.subscribe(email) class SubscribeForm(NewsletterForm): diff --git a/src/newsletter/locale/de/LC_MESSAGES/django.po b/src/newsletter/locale/de/LC_MESSAGES/django.po index f009e28cf..482fe19d0 100644 --- a/src/newsletter/locale/de/LC_MESSAGES/django.po +++ b/src/newsletter/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-15 13:32+0200\n" +"POT-Creation-Date: 2018-04-04 17:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,23 +18,19 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: forms.py:16 +#: forms.py:17 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:39 -msgid "Confirm your subscription to Wolne Lektury newsletter" -msgstr "" - -#: forms.py:44 forms.py:52 models.py:10 +#: forms.py:46 forms.py:54 models.py:10 msgid "email address" msgstr "" -#: forms.py:59 +#: forms.py:61 msgid "Email address not found." msgstr "" -#: forms.py:70 +#: forms.py:72 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -63,9 +59,7 @@ msgid "Subscribe" msgstr "" #: templates/newsletter/subscribed.html:7 -msgid "" -"You have requested subscription to Wolne Lektury newsletter. You'll receive " -"a confirmation link by email." +msgid "You have subscribed to Wolne Lektury newsletter." msgstr "" #: templates/newsletter/unsubscribe_form.html:13 views.py:56 @@ -83,7 +77,7 @@ msgid "Subscribe To Newsletter" msgstr "" #: views.py:28 -msgid "Confirmation link sent" +msgid "Subscribed" msgstr "" #: views.py:43 diff --git a/src/newsletter/locale/en/LC_MESSAGES/django.po b/src/newsletter/locale/en/LC_MESSAGES/django.po index 9c8110918..d9a4b2deb 100644 --- a/src/newsletter/locale/en/LC_MESSAGES/django.po +++ b/src/newsletter/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-15 13:32+0200\n" +"POT-Creation-Date: 2018-04-04 17:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,23 +17,19 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: forms.py:16 +#: forms.py:17 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:39 -msgid "Confirm your subscription to Wolne Lektury newsletter" -msgstr "" - -#: forms.py:44 forms.py:52 models.py:10 +#: forms.py:46 forms.py:54 models.py:10 msgid "email address" msgstr "" -#: forms.py:59 +#: forms.py:61 msgid "Email address not found." msgstr "" -#: forms.py:70 +#: forms.py:72 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -62,9 +58,7 @@ msgid "Subscribe" msgstr "" #: templates/newsletter/subscribed.html:7 -msgid "" -"You have requested subscription to Wolne Lektury newsletter. You'll receive " -"a confirmation link by email." +msgid "You have subscribed to Wolne Lektury newsletter." msgstr "" #: templates/newsletter/unsubscribe_form.html:13 views.py:56 @@ -82,7 +76,7 @@ msgid "Subscribe To Newsletter" msgstr "" #: views.py:28 -msgid "Confirmation link sent" +msgid "Subscribed" msgstr "" #: views.py:43 diff --git a/src/newsletter/locale/es/LC_MESSAGES/django.po b/src/newsletter/locale/es/LC_MESSAGES/django.po index f009e28cf..482fe19d0 100644 --- a/src/newsletter/locale/es/LC_MESSAGES/django.po +++ b/src/newsletter/locale/es/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-15 13:32+0200\n" +"POT-Creation-Date: 2018-04-04 17:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,23 +18,19 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: forms.py:16 +#: forms.py:17 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:39 -msgid "Confirm your subscription to Wolne Lektury newsletter" -msgstr "" - -#: forms.py:44 forms.py:52 models.py:10 +#: forms.py:46 forms.py:54 models.py:10 msgid "email address" msgstr "" -#: forms.py:59 +#: forms.py:61 msgid "Email address not found." msgstr "" -#: forms.py:70 +#: forms.py:72 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -63,9 +59,7 @@ msgid "Subscribe" msgstr "" #: templates/newsletter/subscribed.html:7 -msgid "" -"You have requested subscription to Wolne Lektury newsletter. You'll receive " -"a confirmation link by email." +msgid "You have subscribed to Wolne Lektury newsletter." msgstr "" #: templates/newsletter/unsubscribe_form.html:13 views.py:56 @@ -83,7 +77,7 @@ msgid "Subscribe To Newsletter" msgstr "" #: views.py:28 -msgid "Confirmation link sent" +msgid "Subscribed" msgstr "" #: views.py:43 diff --git a/src/newsletter/locale/fr/LC_MESSAGES/django.po b/src/newsletter/locale/fr/LC_MESSAGES/django.po index 491ea7438..271e7a997 100644 --- a/src/newsletter/locale/fr/LC_MESSAGES/django.po +++ b/src/newsletter/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-15 13:32+0200\n" +"POT-Creation-Date: 2018-04-04 17:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,23 +18,19 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: forms.py:16 +#: forms.py:17 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:39 -msgid "Confirm your subscription to Wolne Lektury newsletter" -msgstr "" - -#: forms.py:44 forms.py:52 models.py:10 +#: forms.py:46 forms.py:54 models.py:10 msgid "email address" msgstr "" -#: forms.py:59 +#: forms.py:61 msgid "Email address not found." msgstr "" -#: forms.py:70 +#: forms.py:72 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -63,9 +59,7 @@ msgid "Subscribe" msgstr "" #: templates/newsletter/subscribed.html:7 -msgid "" -"You have requested subscription to Wolne Lektury newsletter. You'll receive " -"a confirmation link by email." +msgid "You have subscribed to Wolne Lektury newsletter." msgstr "" #: templates/newsletter/unsubscribe_form.html:13 views.py:56 @@ -83,7 +77,7 @@ msgid "Subscribe To Newsletter" msgstr "" #: views.py:28 -msgid "Confirmation link sent" +msgid "Subscribed" msgstr "" #: views.py:43 diff --git a/src/newsletter/locale/it/LC_MESSAGES/django.po b/src/newsletter/locale/it/LC_MESSAGES/django.po index f009e28cf..482fe19d0 100644 --- a/src/newsletter/locale/it/LC_MESSAGES/django.po +++ b/src/newsletter/locale/it/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-15 13:32+0200\n" +"POT-Creation-Date: 2018-04-04 17:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,23 +18,19 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: forms.py:16 +#: forms.py:17 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:39 -msgid "Confirm your subscription to Wolne Lektury newsletter" -msgstr "" - -#: forms.py:44 forms.py:52 models.py:10 +#: forms.py:46 forms.py:54 models.py:10 msgid "email address" msgstr "" -#: forms.py:59 +#: forms.py:61 msgid "Email address not found." msgstr "" -#: forms.py:70 +#: forms.py:72 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -63,9 +59,7 @@ msgid "Subscribe" msgstr "" #: templates/newsletter/subscribed.html:7 -msgid "" -"You have requested subscription to Wolne Lektury newsletter. You'll receive " -"a confirmation link by email." +msgid "You have subscribed to Wolne Lektury newsletter." msgstr "" #: templates/newsletter/unsubscribe_form.html:13 views.py:56 @@ -83,7 +77,7 @@ msgid "Subscribe To Newsletter" msgstr "" #: views.py:28 -msgid "Confirmation link sent" +msgid "Subscribed" msgstr "" #: views.py:43 diff --git a/src/newsletter/locale/lt/LC_MESSAGES/django.po b/src/newsletter/locale/lt/LC_MESSAGES/django.po index aa2985af3..478defff8 100644 --- a/src/newsletter/locale/lt/LC_MESSAGES/django.po +++ b/src/newsletter/locale/lt/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-15 13:32+0200\n" +"POT-Creation-Date: 2018-04-04 17:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,23 +19,19 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" "%100<10 || n%100>=20) ? 1 : 2);\n" -#: forms.py:16 +#: forms.py:17 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:39 -msgid "Confirm your subscription to Wolne Lektury newsletter" -msgstr "" - -#: forms.py:44 forms.py:52 models.py:10 +#: forms.py:46 forms.py:54 models.py:10 msgid "email address" msgstr "" -#: forms.py:59 +#: forms.py:61 msgid "Email address not found." msgstr "" -#: forms.py:70 +#: forms.py:72 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -64,9 +60,7 @@ msgid "Subscribe" msgstr "" #: templates/newsletter/subscribed.html:7 -msgid "" -"You have requested subscription to Wolne Lektury newsletter. You'll receive " -"a confirmation link by email." +msgid "You have subscribed to Wolne Lektury newsletter." msgstr "" #: templates/newsletter/unsubscribe_form.html:13 views.py:56 @@ -84,7 +78,7 @@ msgid "Subscribe To Newsletter" msgstr "" #: views.py:28 -msgid "Confirmation link sent" +msgid "Subscribed" msgstr "" #: views.py:43 diff --git a/src/newsletter/locale/pl/LC_MESSAGES/django.po b/src/newsletter/locale/pl/LC_MESSAGES/django.po index 9531362b8..95ea219b7 100644 --- a/src/newsletter/locale/pl/LC_MESSAGES/django.po +++ b/src/newsletter/locale/pl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-15 13:32+0200\n" +"POT-Creation-Date: 2018-04-04 17:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Jan Szejko \n" "Language-Team: LANGUAGE \n" @@ -18,23 +18,19 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" -#: forms.py:16 +#: forms.py:17 msgid "I want to receive Wolne Lektury's newsletter." msgstr "Chcę otrzymywać newsletter Wolnych Lektur" -#: forms.py:39 -msgid "Confirm your subscription to Wolne Lektury newsletter" -msgstr "Potwierdź subskrypcję newslettera Wolnych Lektur" - -#: forms.py:44 forms.py:52 models.py:10 +#: forms.py:46 forms.py:54 models.py:10 msgid "email address" msgstr "adres email" -#: forms.py:59 +#: forms.py:61 msgid "Email address not found." msgstr "Nie znaleziono adresu email." -#: forms.py:70 +#: forms.py:72 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "Wypisuję się z newslettera Wolnych Lektur" @@ -63,12 +59,8 @@ msgid "Subscribe" msgstr "Zapisz się" #: templates/newsletter/subscribed.html:7 -msgid "" -"You have requested subscription to Wolne Lektury newsletter. You'll receive " -"a confirmation link by email." -msgstr "" -"Przyjęto zgłoszenie do subskrypcji newslettera Wolnych Lektur. Otrzymasz " -"wiadomość z linkiem potwierdzającym na adres email." +msgid "You have subscribed to Wolne Lektury newsletter." +msgstr "Zapisałaś/eś się do newslettera Wolnych Lektur." #: templates/newsletter/unsubscribe_form.html:13 views.py:56 msgid "Unsubscribe" @@ -87,8 +79,9 @@ msgid "Subscribe To Newsletter" msgstr "Zapisz się na newsletter" #: views.py:28 -msgid "Confirmation link sent" -msgstr "Wysłano link potwierdzający" +#| msgid "Subscribe" +msgid "Subscribed" +msgstr "Zapisano do newslettera" #: views.py:43 msgid "Subscription confirmed" @@ -97,3 +90,16 @@ msgstr "Potwierdzono subskrypcję" #: views.py:63 msgid "Unsubscribed" msgstr "Usunięto subskrypcję" + +#~ msgid "Confirm your subscription to Wolne Lektury newsletter" +#~ msgstr "Potwierdź subskrypcję newslettera Wolnych Lektur" + +#~ msgid "" +#~ "You have requested subscription to Wolne Lektury newsletter. You'll " +#~ "receive a confirmation link by email." +#~ msgstr "" +#~ "Przyjęto zgłoszenie do subskrypcji newslettera Wolnych Lektur. Otrzymasz " +#~ "wiadomość z linkiem potwierdzającym na adres email." + +#~ msgid "Confirmation link sent" +#~ msgstr "Wysłano link potwierdzający" diff --git a/src/newsletter/locale/ru/LC_MESSAGES/django.po b/src/newsletter/locale/ru/LC_MESSAGES/django.po index 3c5a99784..bbd427fc2 100644 --- a/src/newsletter/locale/ru/LC_MESSAGES/django.po +++ b/src/newsletter/locale/ru/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-15 13:32+0200\n" +"POT-Creation-Date: 2018-04-04 17:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,23 +19,19 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: forms.py:16 +#: forms.py:17 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:39 -msgid "Confirm your subscription to Wolne Lektury newsletter" -msgstr "" - -#: forms.py:44 forms.py:52 models.py:10 +#: forms.py:46 forms.py:54 models.py:10 msgid "email address" msgstr "" -#: forms.py:59 +#: forms.py:61 msgid "Email address not found." msgstr "" -#: forms.py:70 +#: forms.py:72 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -64,9 +60,7 @@ msgid "Subscribe" msgstr "" #: templates/newsletter/subscribed.html:7 -msgid "" -"You have requested subscription to Wolne Lektury newsletter. You'll receive " -"a confirmation link by email." +msgid "You have subscribed to Wolne Lektury newsletter." msgstr "" #: templates/newsletter/unsubscribe_form.html:13 views.py:56 @@ -84,7 +78,7 @@ msgid "Subscribe To Newsletter" msgstr "" #: views.py:28 -msgid "Confirmation link sent" +msgid "Subscribed" msgstr "" #: views.py:43 diff --git a/src/newsletter/locale/uk/LC_MESSAGES/django.po b/src/newsletter/locale/uk/LC_MESSAGES/django.po index 3c5a99784..bbd427fc2 100644 --- a/src/newsletter/locale/uk/LC_MESSAGES/django.po +++ b/src/newsletter/locale/uk/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-15 13:32+0200\n" +"POT-Creation-Date: 2018-04-04 17:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,23 +19,19 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: forms.py:16 +#: forms.py:17 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:39 -msgid "Confirm your subscription to Wolne Lektury newsletter" -msgstr "" - -#: forms.py:44 forms.py:52 models.py:10 +#: forms.py:46 forms.py:54 models.py:10 msgid "email address" msgstr "" -#: forms.py:59 +#: forms.py:61 msgid "Email address not found." msgstr "" -#: forms.py:70 +#: forms.py:72 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -64,9 +60,7 @@ msgid "Subscribe" msgstr "" #: templates/newsletter/subscribed.html:7 -msgid "" -"You have requested subscription to Wolne Lektury newsletter. You'll receive " -"a confirmation link by email." +msgid "You have subscribed to Wolne Lektury newsletter." msgstr "" #: templates/newsletter/unsubscribe_form.html:13 views.py:56 @@ -84,7 +78,7 @@ msgid "Subscribe To Newsletter" msgstr "" #: views.py:28 -msgid "Confirmation link sent" +msgid "Subscribed" msgstr "" #: views.py:43 diff --git a/src/newsletter/templates/newsletter/subscribed.html b/src/newsletter/templates/newsletter/subscribed.html index a703092e0..a053f62cc 100644 --- a/src/newsletter/templates/newsletter/subscribed.html +++ b/src/newsletter/templates/newsletter/subscribed.html @@ -4,6 +4,6 @@ {% block body %}

{{ page_title }}

- {% trans "You have requested subscription to Wolne Lektury newsletter. You'll receive a confirmation link by email." %} + {% trans "You have subscribed to Wolne Lektury newsletter." %}

{% endblock %} \ No newline at end of file diff --git a/src/newsletter/views.py b/src/newsletter/views.py index 78d64717e..342fc5067 100644 --- a/src/newsletter/views.py +++ b/src/newsletter/views.py @@ -25,7 +25,7 @@ def subscribe_form(request): def subscribed(request): return render(request, 'newsletter/subscribed.html', { - 'page_title': _(u'Confirmation link sent'), + 'page_title': _(u'Subscribed'), })