From e81500796eb5163e07ac6b02109666747fb0c206 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Fri, 28 Sep 2018 11:27:53 +0200 Subject: [PATCH 1/1] add mailing list choice --- src/contact/mailing.py | 18 ++++++------- src/newsletter/forms.py | 17 +++++++++--- .../locale/de/LC_MESSAGES/django.mo | Bin 421 -> 380 bytes .../locale/de/LC_MESSAGES/django.po | 24 ++++++++++++----- .../locale/en/LC_MESSAGES/django.mo | Bin 378 -> 337 bytes .../locale/en/LC_MESSAGES/django.po | 24 ++++++++++++----- .../locale/es/LC_MESSAGES/django.mo | Bin 421 -> 380 bytes .../locale/es/LC_MESSAGES/django.po | 24 ++++++++++++----- .../locale/fr/LC_MESSAGES/django.mo | Bin 420 -> 379 bytes .../locale/fr/LC_MESSAGES/django.po | 24 ++++++++++++----- .../locale/it/LC_MESSAGES/django.mo | Bin 421 -> 380 bytes .../locale/it/LC_MESSAGES/django.po | 24 ++++++++++++----- .../locale/lt/LC_MESSAGES/django.mo | Bin 484 -> 443 bytes .../locale/lt/LC_MESSAGES/django.po | 24 ++++++++++++----- .../locale/pl/LC_MESSAGES/django.mo | Bin 1865 -> 1978 bytes .../locale/pl/LC_MESSAGES/django.po | 25 +++++++++++++----- .../locale/ru/LC_MESSAGES/django.mo | Bin 495 -> 454 bytes .../locale/ru/LC_MESSAGES/django.po | 24 ++++++++++++----- .../locale/uk/LC_MESSAGES/django.mo | Bin 495 -> 454 bytes .../locale/uk/LC_MESSAGES/django.po | 24 ++++++++++++----- .../templates/newsletter/subscribe_form.html | 2 +- 21 files changed, 184 insertions(+), 70 deletions(-) diff --git a/src/contact/mailing.py b/src/contact/mailing.py index bfd42093a..2034766cd 100644 --- a/src/contact/mailing.py +++ b/src/contact/mailing.py @@ -2,18 +2,10 @@ 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() @@ -32,7 +24,7 @@ def remove_from_groups(email, client): data={'interests': interests}) -def subscribe(email): +def subscribe(email, mailing_lists=None): client = MailChimp(mc_api=settings.MAILCHIMP_API_KEY, timeout=10.0) try: member = client.lists.members.get(settings.MAILCHIMP_LIST_ID, subscriber_hash(email)) @@ -41,12 +33,18 @@ def subscribe(email): else: if member['status'] != 'subscribed': remove_from_groups(email, client) + mailing_lists = mailing_lists or [settings.MAILCHIMP_DEFAULT_GROUP] + interests = { + settings.MAILCHIMP_GROUP_IDS[mailing_list]: True + for mailing_list in mailing_lists + if mailing_list in settings.MAILCHIMP_GROUP_IDS + } 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, + 'interests': interests, } ) diff --git a/src/newsletter/forms.py b/src/newsletter/forms.py index eb7afa5a8..8cb19ee19 100644 --- a/src/newsletter/forms.py +++ b/src/newsletter/forms.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- from django.core.exceptions import ValidationError from django.core.validators import validate_email -from django.forms import Form, BooleanField +from django.forms import Form, BooleanField, MultipleChoiceField from django.forms.fields import EmailField +from django.forms.widgets import CheckboxSelectMultiple from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _, ugettext @@ -16,6 +17,8 @@ class NewsletterForm(Form): email_field = 'email' agree_newsletter = BooleanField( required=False, initial=False, label=_(u'I want to receive Wolne Lektury\'s newsletter.')) + mailing = False + mailing_field = 'agree_newsletter' data_processing_part1 = u'''\ Administratorem danych osobowych jest Fundacja Nowoczesna Polska (ul. Marszałkowska 84/92 lok. 125, 00-514 Warszawa). @@ -35,7 +38,7 @@ Więcej informacji w polityce prywatności.''' super(NewsletterForm, self).save(*args, **kwargs) except AttributeError: pass - if not self.cleaned_data.get('agree_newsletter'): + if not (self.mailing or self.cleaned_data.get(self.mailing_field)): return email = self.cleaned_data[self.email_field] try: @@ -47,15 +50,21 @@ Więcej informacji w polityce prywatności.''' # 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) + mailing.subscribe(email, mailing_lists=self.cleaned_data.get('mailing_lists')) class SubscribeForm(NewsletterForm): + mailing = True + agree_newsletter = None + email = EmailField(label=_('email address')) + mailing_lists = MultipleChoiceField( + widget=CheckboxSelectMultiple, + choices=(('general', _(u'general newsletter')), ('contest', _(u'about the contest'))), + label=_(u'mailing list')) def __init__(self, *args, **kwargs): super(SubscribeForm, self).__init__(*args, **kwargs) - self.fields['agree_newsletter'].required = True class UnsubscribeForm(Form): diff --git a/src/newsletter/locale/de/LC_MESSAGES/django.mo b/src/newsletter/locale/de/LC_MESSAGES/django.mo index 06f3fb728217c4c2b3cb0c085cebbe22fdf43566..71cbdf3e9d8d54be31066ec4ad8628bc2c1f2845 100644 GIT binary patch delta 15 WcmZ3={D*0R3Zv6R)xeGO*%$#Ukp%nz delta 54 zcmeyvw3K;*3S;&})j+inUFV|I#FEVXJYAQ>l2j`NBLhPVT>}#!QZO{PGBnaQFfuUM ISj@=?0LUN?+yDRo diff --git a/src/newsletter/locale/de/LC_MESSAGES/django.po b/src/newsletter/locale/de/LC_MESSAGES/django.po index 482fe19d0..9b804bf0f 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: 2018-04-04 17:12+0200\n" +"POT-Creation-Date: 2018-09-28 11:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,19 +18,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: forms.py:17 +#: forms.py:19 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:46 forms.py:54 models.py:10 +#: forms.py:60 forms.py:71 models.py:10 msgid "email address" msgstr "" -#: forms.py:61 +#: forms.py:63 +msgid "general newsletter" +msgstr "" + +#: forms.py:63 +msgid "about the contest" +msgstr "" + +#: forms.py:64 +msgid "mailing list" +msgstr "" + +#: forms.py:78 msgid "Email address not found." msgstr "" -#: forms.py:72 +#: forms.py:89 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -54,7 +66,7 @@ msgstr "" msgid "Your subscription to Wolne Lektury newsletter is confirmed. Thank you!" msgstr "" -#: templates/newsletter/subscribe_form.html:15 +#: templates/newsletter/subscribe_form.html:16 msgid "Subscribe" msgstr "" diff --git a/src/newsletter/locale/en/LC_MESSAGES/django.mo b/src/newsletter/locale/en/LC_MESSAGES/django.mo index f364c6015f2e47837b5a4b9c9a31905b37a99ada..6c5906d1cd061dff54de8b533942893de34efc9e 100644 GIT binary patch delta 14 WcmeyxbdhO-3ZwW$)xe4KZvy}*as{pc delta 53 zcmcb}^owbN3ZuhB)j+inUFV|I#FEVXJYAQ>l2j`NBLhPVT>}#!QZO{PGBnaQFfuTh HSbPrvxz!Jj diff --git a/src/newsletter/locale/en/LC_MESSAGES/django.po b/src/newsletter/locale/en/LC_MESSAGES/django.po index d9a4b2deb..8d23cffa5 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: 2018-04-04 17:12+0200\n" +"POT-Creation-Date: 2018-09-28 11:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,19 +17,31 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: forms.py:17 +#: forms.py:19 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:46 forms.py:54 models.py:10 +#: forms.py:60 forms.py:71 models.py:10 msgid "email address" msgstr "" -#: forms.py:61 +#: forms.py:63 +msgid "general newsletter" +msgstr "" + +#: forms.py:63 +msgid "about the contest" +msgstr "" + +#: forms.py:64 +msgid "mailing list" +msgstr "" + +#: forms.py:78 msgid "Email address not found." msgstr "" -#: forms.py:72 +#: forms.py:89 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -53,7 +65,7 @@ msgstr "" msgid "Your subscription to Wolne Lektury newsletter is confirmed. Thank you!" msgstr "" -#: templates/newsletter/subscribe_form.html:15 +#: templates/newsletter/subscribe_form.html:16 msgid "Subscribe" msgstr "" diff --git a/src/newsletter/locale/es/LC_MESSAGES/django.mo b/src/newsletter/locale/es/LC_MESSAGES/django.mo index 06f3fb728217c4c2b3cb0c085cebbe22fdf43566..71cbdf3e9d8d54be31066ec4ad8628bc2c1f2845 100644 GIT binary patch delta 15 WcmZ3={D*0R3Zv6R)xeGO*%$#Ukp%nz delta 54 zcmeyvw3K;*3S;&})j+inUFV|I#FEVXJYAQ>l2j`NBLhPVT>}#!QZO{PGBnaQFfuUM ISj@=?0LUN?+yDRo diff --git a/src/newsletter/locale/es/LC_MESSAGES/django.po b/src/newsletter/locale/es/LC_MESSAGES/django.po index 482fe19d0..9b804bf0f 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: 2018-04-04 17:12+0200\n" +"POT-Creation-Date: 2018-09-28 11:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,19 +18,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: forms.py:17 +#: forms.py:19 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:46 forms.py:54 models.py:10 +#: forms.py:60 forms.py:71 models.py:10 msgid "email address" msgstr "" -#: forms.py:61 +#: forms.py:63 +msgid "general newsletter" +msgstr "" + +#: forms.py:63 +msgid "about the contest" +msgstr "" + +#: forms.py:64 +msgid "mailing list" +msgstr "" + +#: forms.py:78 msgid "Email address not found." msgstr "" -#: forms.py:72 +#: forms.py:89 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -54,7 +66,7 @@ msgstr "" msgid "Your subscription to Wolne Lektury newsletter is confirmed. Thank you!" msgstr "" -#: templates/newsletter/subscribe_form.html:15 +#: templates/newsletter/subscribe_form.html:16 msgid "Subscribe" msgstr "" diff --git a/src/newsletter/locale/fr/LC_MESSAGES/django.mo b/src/newsletter/locale/fr/LC_MESSAGES/django.mo index 1090d01b5a150bd48475817abf9b4debeb06c80c..2c90dd0c81aca562856271a6885816b565885734 100644 GIT binary patch delta 15 WcmZ3&{F`Zl3Zvsh)xeGOSs4Kl2j`NBLhPVT>}#!QZO{PGBnaQFfuUM ISj@o)0LO(6*Z=?k diff --git a/src/newsletter/locale/fr/LC_MESSAGES/django.po b/src/newsletter/locale/fr/LC_MESSAGES/django.po index 271e7a997..26887f349 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: 2018-04-04 17:12+0200\n" +"POT-Creation-Date: 2018-09-28 11:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,19 +18,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: forms.py:17 +#: forms.py:19 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:46 forms.py:54 models.py:10 +#: forms.py:60 forms.py:71 models.py:10 msgid "email address" msgstr "" -#: forms.py:61 +#: forms.py:63 +msgid "general newsletter" +msgstr "" + +#: forms.py:63 +msgid "about the contest" +msgstr "" + +#: forms.py:64 +msgid "mailing list" +msgstr "" + +#: forms.py:78 msgid "Email address not found." msgstr "" -#: forms.py:72 +#: forms.py:89 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -54,7 +66,7 @@ msgstr "" msgid "Your subscription to Wolne Lektury newsletter is confirmed. Thank you!" msgstr "" -#: templates/newsletter/subscribe_form.html:15 +#: templates/newsletter/subscribe_form.html:16 msgid "Subscribe" msgstr "" diff --git a/src/newsletter/locale/it/LC_MESSAGES/django.mo b/src/newsletter/locale/it/LC_MESSAGES/django.mo index 06f3fb728217c4c2b3cb0c085cebbe22fdf43566..71cbdf3e9d8d54be31066ec4ad8628bc2c1f2845 100644 GIT binary patch delta 15 WcmZ3={D*0R3Zv6R)xeGO*%$#Ukp%nz delta 54 zcmeyvw3K;*3S;&})j+inUFV|I#FEVXJYAQ>l2j`NBLhPVT>}#!QZO{PGBnaQFfuUM ISj@=?0LUN?+yDRo diff --git a/src/newsletter/locale/it/LC_MESSAGES/django.po b/src/newsletter/locale/it/LC_MESSAGES/django.po index 482fe19d0..9b804bf0f 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: 2018-04-04 17:12+0200\n" +"POT-Creation-Date: 2018-09-28 11:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,19 +18,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: forms.py:17 +#: forms.py:19 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:46 forms.py:54 models.py:10 +#: forms.py:60 forms.py:71 models.py:10 msgid "email address" msgstr "" -#: forms.py:61 +#: forms.py:63 +msgid "general newsletter" +msgstr "" + +#: forms.py:63 +msgid "about the contest" +msgstr "" + +#: forms.py:64 +msgid "mailing list" +msgstr "" + +#: forms.py:78 msgid "Email address not found." msgstr "" -#: forms.py:72 +#: forms.py:89 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -54,7 +66,7 @@ msgstr "" msgid "Your subscription to Wolne Lektury newsletter is confirmed. Thank you!" msgstr "" -#: templates/newsletter/subscribe_form.html:15 +#: templates/newsletter/subscribe_form.html:16 msgid "Subscribe" msgstr "" diff --git a/src/newsletter/locale/lt/LC_MESSAGES/django.mo b/src/newsletter/locale/lt/LC_MESSAGES/django.mo index 914b4b583f28f0cb1e509b55db4f4769cb03dd90..50c618427c93952b4b4aeec2a4c751f5e416151a 100644 GIT binary patch delta 15 WcmaFDyqkG~3S;9$)xeGOT^Ru`cLjL> delta 54 zcmdnZ{DgUe3gfDYs)1@Dy3R$Zi6xo&dAcr%C8<^lMh1o!x&|gdq+n=nWoV>rU}Rvh IvDkwV0MmL8SpWb4 diff --git a/src/newsletter/locale/lt/LC_MESSAGES/django.po b/src/newsletter/locale/lt/LC_MESSAGES/django.po index 478defff8..b34be27f6 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: 2018-04-04 17:12+0200\n" +"POT-Creation-Date: 2018-09-28 11:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,19 +19,31 @@ 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:17 +#: forms.py:19 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:46 forms.py:54 models.py:10 +#: forms.py:60 forms.py:71 models.py:10 msgid "email address" msgstr "" -#: forms.py:61 +#: forms.py:63 +msgid "general newsletter" +msgstr "" + +#: forms.py:63 +msgid "about the contest" +msgstr "" + +#: forms.py:64 +msgid "mailing list" +msgstr "" + +#: forms.py:78 msgid "Email address not found." msgstr "" -#: forms.py:72 +#: forms.py:89 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -55,7 +67,7 @@ msgstr "" msgid "Your subscription to Wolne Lektury newsletter is confirmed. Thank you!" msgstr "" -#: templates/newsletter/subscribe_form.html:15 +#: templates/newsletter/subscribe_form.html:16 msgid "Subscribe" msgstr "" diff --git a/src/newsletter/locale/pl/LC_MESSAGES/django.mo b/src/newsletter/locale/pl/LC_MESSAGES/django.mo index c5f0322bd8b9ca78a9190e79fb5b1f2b676d688d..0abba0a197e6749b1e3e3e62ef1863ebf13fb01d 100644 GIT binary patch delta 609 zcmYk&OKTHR6u|K_9W`xQo0^v`Rh*^ZgMhp4EGU9><3g}hVXW6UW*#teL+C0B*$bxq z0O?AEbTc55ZQbMxWGQNwUAb^0F8rSu#RF%4H*+)R+15RxQP|Up!*L|Clc|{25rT^9VWT^pfns^s6O)98^+f8C?GTVRR)~_^8Y*Ih; zV$;b&W35Rg@`Esln_d|3pUi!f|8TFm_k;L(l1BdSOXDS8D~Vg}Gz*OQExXr=ees{A cCi9GbD@pS>597W6Yicdu)7_-w_Zx+^-@sa2QUCw| delta 483 zcmZY5ze~eF6u|KpQ*Et3s#R(W7J{G-F_6@PQgpG^rHg}uh#&zYmTILnAP!PoT^xd= zgKmO@lFg1zIyyKg`d_&Fy_(HO?mq91fq@}Cvq97M@E9CHoHpF{U3DmFH+GC2X;f1twOaq+Rgr^boix(T5zk62k-jk%!XBN zd9GhOYFHK5_ew^=b`~wW$YVGQC8uE81=|kIn5mDsb^r9F;flN4@{SGf(5)Q=H}Tvr Dx7{@L diff --git a/src/newsletter/locale/pl/LC_MESSAGES/django.po b/src/newsletter/locale/pl/LC_MESSAGES/django.po index 95ea219b7..87bf45bd6 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: 2018-04-04 17:12+0200\n" +"POT-Creation-Date: 2018-09-28 11:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Jan Szejko \n" "Language-Team: LANGUAGE \n" @@ -18,19 +18,31 @@ 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:17 +#: forms.py:19 msgid "I want to receive Wolne Lektury's newsletter." msgstr "Chcę otrzymywać newsletter Wolnych Lektur" -#: forms.py:46 forms.py:54 models.py:10 +#: forms.py:60 forms.py:71 models.py:10 msgid "email address" msgstr "adres email" -#: forms.py:61 +#: forms.py:63 +msgid "general newsletter" +msgstr "ogólny newsletter" + +#: forms.py:63 +msgid "about the contest" +msgstr "informacje o konkursie" + +#: forms.py:64 +msgid "mailing list" +msgstr "lista mailowa" + +#: forms.py:78 msgid "Email address not found." msgstr "Nie znaleziono adresu email." -#: forms.py:72 +#: forms.py:89 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "Wypisuję się z newslettera Wolnych Lektur" @@ -54,7 +66,7 @@ msgstr "Ekstrakt" msgid "Your subscription to Wolne Lektury newsletter is confirmed. Thank you!" msgstr "Potwierdzono subskrypcję newslettera Wolnych Lektur. Dziękujemy!" -#: templates/newsletter/subscribe_form.html:15 +#: templates/newsletter/subscribe_form.html:16 msgid "Subscribe" msgstr "Zapisz się" @@ -79,7 +91,6 @@ msgid "Subscribe To Newsletter" msgstr "Zapisz się na newsletter" #: views.py:28 -#| msgid "Subscribe" msgid "Subscribed" msgstr "Zapisano do newslettera" diff --git a/src/newsletter/locale/ru/LC_MESSAGES/django.mo b/src/newsletter/locale/ru/LC_MESSAGES/django.mo index a609786d6740d64a799db0f78947ec8f813cbee3..d2d31a4fd72f68dc53c29f8a8b14d56d933f3e63 100644 GIT binary patch delta 15 WcmaFQe2jU53S-Yi)xeGO0~i4?83m;P delta 54 zcmX@c{GNG&3ggy^s)1@Dy3R$Zi6xo&dAcr%C8<^lMh1o!x&|gdq+n=nWoV>rU}Rvh Iu{f9!0NNuDg#Z8m diff --git a/src/newsletter/locale/ru/LC_MESSAGES/django.po b/src/newsletter/locale/ru/LC_MESSAGES/django.po index bbd427fc2..8c408ebe1 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: 2018-04-04 17:12+0200\n" +"POT-Creation-Date: 2018-09-28 11:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,19 +19,31 @@ 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:17 +#: forms.py:19 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:46 forms.py:54 models.py:10 +#: forms.py:60 forms.py:71 models.py:10 msgid "email address" msgstr "" -#: forms.py:61 +#: forms.py:63 +msgid "general newsletter" +msgstr "" + +#: forms.py:63 +msgid "about the contest" +msgstr "" + +#: forms.py:64 +msgid "mailing list" +msgstr "" + +#: forms.py:78 msgid "Email address not found." msgstr "" -#: forms.py:72 +#: forms.py:89 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -55,7 +67,7 @@ msgstr "" msgid "Your subscription to Wolne Lektury newsletter is confirmed. Thank you!" msgstr "" -#: templates/newsletter/subscribe_form.html:15 +#: templates/newsletter/subscribe_form.html:16 msgid "Subscribe" msgstr "" diff --git a/src/newsletter/locale/uk/LC_MESSAGES/django.mo b/src/newsletter/locale/uk/LC_MESSAGES/django.mo index a609786d6740d64a799db0f78947ec8f813cbee3..d2d31a4fd72f68dc53c29f8a8b14d56d933f3e63 100644 GIT binary patch delta 15 WcmaFQe2jU53S-Yi)xeGO0~i4?83m;P delta 54 zcmX@c{GNG&3ggy^s)1@Dy3R$Zi6xo&dAcr%C8<^lMh1o!x&|gdq+n=nWoV>rU}Rvh Iu{f9!0NNuDg#Z8m diff --git a/src/newsletter/locale/uk/LC_MESSAGES/django.po b/src/newsletter/locale/uk/LC_MESSAGES/django.po index bbd427fc2..8c408ebe1 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: 2018-04-04 17:12+0200\n" +"POT-Creation-Date: 2018-09-28 11:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,19 +19,31 @@ 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:17 +#: forms.py:19 msgid "I want to receive Wolne Lektury's newsletter." msgstr "" -#: forms.py:46 forms.py:54 models.py:10 +#: forms.py:60 forms.py:71 models.py:10 msgid "email address" msgstr "" -#: forms.py:61 +#: forms.py:63 +msgid "general newsletter" +msgstr "" + +#: forms.py:63 +msgid "about the contest" +msgstr "" + +#: forms.py:64 +msgid "mailing list" +msgstr "" + +#: forms.py:78 msgid "Email address not found." msgstr "" -#: forms.py:72 +#: forms.py:89 msgid "Unsubscribe from Wolne Lektury's newsletter." msgstr "" @@ -55,7 +67,7 @@ msgstr "" msgid "Your subscription to Wolne Lektury newsletter is confirmed. Thank you!" msgstr "" -#: templates/newsletter/subscribe_form.html:15 +#: templates/newsletter/subscribe_form.html:16 msgid "Subscribe" msgstr "" diff --git a/src/newsletter/templates/newsletter/subscribe_form.html b/src/newsletter/templates/newsletter/subscribe_form.html index 203e54c04..c0379f014 100644 --- a/src/newsletter/templates/newsletter/subscribe_form.html +++ b/src/newsletter/templates/newsletter/subscribe_form.html @@ -11,7 +11,7 @@ {% render_honeypot_field %}
  1. {{ form.email|pretty_field }}
  2. -
  3. {{ form.agree_newsletter|pretty_checkbox }}
  4. +
  5. {{ form.mailing_lists|pretty_field }}
  6. {{ form.data_processing }}
-- 2.20.1