From 48d024b3701a0c7a97c48a5d7975cb091c330948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20BOIDET?= Date: Fri, 11 Sep 2020 14:40:33 +0200 Subject: [PATCH] Resolve bugs (#40) * updated language error message * bugs begin & end dates * update and resolution of bugs on the translation --- election/models.py | 11 +++++++-- election/views.py | 29 +++++++++++----------- locale/de/LC_MESSAGES/django.po | 24 +++++++++---------- locale/en/LC_MESSAGES/django.po | 32 +++++++++++++------------ locale/es/LC_MESSAGES/django.po | 24 +++++++++---------- locale/fr/LC_MESSAGES/django.po | 24 +++++++++---------- templates/election/mail_invitation.html | 24 +++++++++---------- templates/election/mail_invitation.txt | 6 ++--- templates/election/mail_one_link.html | 20 ++++++++-------- templates/election/mail_one_link.txt | 4 ++-- templates/election/mail_two_links.html | 22 ++++++++--------- templates/election/mail_two_links.txt | 6 ++--- 12 files changed, 117 insertions(+), 109 deletions(-) diff --git a/election/models.py b/election/models.py index 60cff96..cab2c9f 100644 --- a/election/models.py +++ b/election/models.py @@ -39,8 +39,15 @@ class Election(RandomPrimaryIdModel): # check that the language is known if not self.select_language in settings.LANGUAGE_AVAILABLE: - string_language = ', '.join(settings.LANGUAGE_AVAILABLE) - raise IntegrityError("Election is only available in " + string_language) + raise IntegrityError("Election is only available in " + settings.LANGUAGE_AVAILABLE) + + #check if the end date is not in the past + if self.finish_at <= round(time()): + raise IntegrityError("The election cannot be over in the past") + + #check if the end date is not before the begin date + if self.start_at > self.finish_at: + raise IntegrityError("The election can't end until it has started") return super().save(*args, **kwargs) diff --git a/election/views.py b/election/views.py index 799c05b..b1dd5c9 100644 --- a/election/views.py +++ b/election/views.py @@ -41,11 +41,10 @@ def send_mail_invitation( "title": election.title, } - activate( - election.select_language - if election.select_language in os.environ.get("LANGUAGE_AVAILABLE", []) - else "en" - ) + if election.select_language not in os.environ.get("LANGUAGE_AVAILABLE", []): + activate("en") + else: + activate(election.select_language) text_body = render_to_string("election/mail_invitation.txt", merge_data) html_body = render_to_string("election/mail_invitation.html", merge_data) @@ -110,6 +109,10 @@ class ElectionDetailsAPIView(RetrieveAPIView): class VoteAPIView(CreateAPIView): + """ + View to vote in an election + """ + serializer_class = serializers.VoteSerializer def create(self, request: Request, *args, **kwargs) -> Response: @@ -166,8 +169,6 @@ class VoteAPIView(CreateAPIView): return Response(status=status.HTTP_201_CREATED, headers=headers) - - class ResultAPIView(APIView): """ View to list the result of an election using majority judgment. @@ -225,6 +226,7 @@ class ResultAPIView(APIView): serializer = serializers.CandidateSerializer(candidates, many=True) return Response(serializer.data, status=status.HTTP_200_OK) + class LinkAPIView(CreateAPIView): """ View to send the result and vote links if it is an open election @@ -244,8 +246,6 @@ class LinkAPIView(CreateAPIView): WRONG_ELECTION_ERROR, status=status.HTTP_400_BAD_REQUEST, ) - if select_language == None: - select_language = election.select_language emails = serializer.validated_data.get("emails",[]) @@ -254,12 +254,11 @@ class LinkAPIView(CreateAPIView): "title": election.title, } - activate( - select_language - if select_language in os.environ.get("LANGUAGE_AVAILABLE", []) - else "en" - ) - + if select_language == None or select_language not in os.environ.get("LANGUAGE_AVAILABLE", []): + select_language = election.select_language + + activate(select_language) + if election.on_invitation_only: text_body = render_to_string("election/mail_one_link.txt", merge_data) html_body = render_to_string("election/mail_one_link.html", merge_data) diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index 08ad8fa..df116eb 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -8,11 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-09 12:47+0000\n" +"POT-Creation-Date: 2020-09-11 10:12+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -"Language: \n" +"Language: german\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -21,7 +21,7 @@ msgstr "" #: templates/election/mail_invitation.html:75 #: templates/election/mail_invitation.html:112 #: templates/election/mail_one_link.html:75 -#: templates/election/mail_one_link.html:114 +#: templates/election/mail_one_link.html:112 #: templates/election/mail_two_links.html:75 #: templates/election/mail_two_links.html:112 msgid "" @@ -30,7 +30,7 @@ msgid "" msgstr "" #: templates/election/mail_invitation.html:98 -#: templates/election/mail_one_link.html:99 +#: templates/election/mail_one_link.html:98 #: templates/election/mail_two_links.html:98 msgid "Hello!" msgstr "" @@ -57,34 +57,34 @@ msgid "" msgstr "" #: templates/election/mail_invitation.html:165 -#: templates/election/mail_one_link.html:141 +#: templates/election/mail_one_link.html:139 #: templates/election/mail_two_links.html:149 msgid "Good vote" msgstr "" #: templates/election/mail_invitation.html:165 #: templates/election/mail_invitation.html:209 -#: templates/election/mail_one_link.html:141 -#: templates/election/mail_one_link.html:185 +#: templates/election/mail_one_link.html:139 +#: templates/election/mail_one_link.html:183 #: templates/election/mail_two_links.html:149 #: templates/election/mail_two_links.html:193 msgid "Mieux Voter" msgstr "" #: templates/election/mail_invitation.html:180 -#: templates/election/mail_one_link.html:156 +#: templates/election/mail_one_link.html:154 #: templates/election/mail_two_links.html:164 msgid "Need more information?" msgstr "" #: templates/election/mail_invitation.html:185 -#: templates/election/mail_one_link.html:161 +#: templates/election/mail_one_link.html:159 #: templates/election/mail_two_links.html:169 msgid "Do you want to help us?" msgstr "" #: templates/election/mail_invitation.html:202 -#: templates/election/mail_one_link.html:178 +#: templates/election/mail_one_link.html:176 #: templates/election/mail_two_links.html:186 msgid "You received this email because someone invited you to vote." msgstr "" @@ -105,14 +105,14 @@ msgid "" "follows:" msgstr "" -#: templates/election/mail_one_link.html:122 +#: templates/election/mail_one_link.html:120 #: templates/election/mail_one_link.txt:2 msgid "" "This email was sent to you because your email address was entered to receive " "the link to the election result about:" msgstr "" -#: templates/election/mail_one_link.html:132 +#: templates/election/mail_one_link.html:130 #: templates/election/mail_one_link.txt:5 #: templates/election/mail_two_links.html:140 #: templates/election/mail_two_links.txt:8 diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index d2b6f88..454780e 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -8,11 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-09 12:47+0000\n" +"POT-Creation-Date: 2020-09-11 10:12+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -"Language: \n" +"Language: english\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -21,7 +21,7 @@ msgstr "" #: templates/election/mail_invitation.html:75 #: templates/election/mail_invitation.html:112 #: templates/election/mail_one_link.html:75 -#: templates/election/mail_one_link.html:114 +#: templates/election/mail_one_link.html:112 #: templates/election/mail_two_links.html:75 #: templates/election/mail_two_links.html:112 msgid "" @@ -32,7 +32,7 @@ msgstr "" "judgment." #: templates/election/mail_invitation.html:98 -#: templates/election/mail_one_link.html:99 +#: templates/election/mail_one_link.html:98 #: templates/election/mail_two_links.html:98 msgid "Hello!" msgstr "Hello!" @@ -68,34 +68,34 @@ msgstr "" "finished:" #: templates/election/mail_invitation.html:165 -#: templates/election/mail_one_link.html:141 +#: templates/election/mail_one_link.html:139 #: templates/election/mail_two_links.html:149 msgid "Good vote" msgstr "Good vote" #: templates/election/mail_invitation.html:165 #: templates/election/mail_invitation.html:209 -#: templates/election/mail_one_link.html:141 -#: templates/election/mail_one_link.html:185 +#: templates/election/mail_one_link.html:139 +#: templates/election/mail_one_link.html:183 #: templates/election/mail_two_links.html:149 #: templates/election/mail_two_links.html:193 msgid "Mieux Voter" msgstr "Better Vote" #: templates/election/mail_invitation.html:180 -#: templates/election/mail_one_link.html:156 +#: templates/election/mail_one_link.html:154 #: templates/election/mail_two_links.html:164 msgid "Need more information?" msgstr "Need more information?" #: templates/election/mail_invitation.html:185 -#: templates/election/mail_one_link.html:161 +#: templates/election/mail_one_link.html:159 #: templates/election/mail_two_links.html:169 msgid "Do you want to help us?" msgstr "Do you want to help us?" #: templates/election/mail_invitation.html:202 -#: templates/election/mail_one_link.html:178 +#: templates/election/mail_one_link.html:176 #: templates/election/mail_two_links.html:186 msgid "You received this email because someone invited you to vote." msgstr "You received this email because someone invited you to vote." @@ -110,15 +110,17 @@ msgstr "" #: templates/election/mail_invitation.txt:5 msgid "The link for the vote is as follows:" -msgstr "" +msgstr "The link for the vote is as follows:" #: templates/election/mail_invitation.txt:8 msgid "" "The link that will give you the results when they are available is as " "follows:" msgstr "" +"The link that will give you the results when they are available is as " +"follows:" -#: templates/election/mail_one_link.html:122 +#: templates/election/mail_one_link.html:120 #: templates/election/mail_one_link.txt:2 #, fuzzy #| msgid "" @@ -131,12 +133,12 @@ msgstr "" "This email was sent to you because your email was filled out to participate " "in the vote on the subject:" -#: templates/election/mail_one_link.html:132 +#: templates/election/mail_one_link.html:130 #: templates/election/mail_one_link.txt:5 #: templates/election/mail_two_links.html:140 #: templates/election/mail_two_links.txt:8 msgid "The link to view the results, when they are available, is:" -msgstr "" +msgstr "The link to view the results, when they are available, is:" #: templates/election/mail_two_links.html:120 #: templates/election/mail_two_links.txt:2 @@ -154,4 +156,4 @@ msgstr "" #: templates/election/mail_two_links.html:130 #: templates/election/mail_two_links.txt:5 msgid "The link that allows you to participate to the vote is:" -msgstr "" +msgstr "The link that allows you to participate to the vote is:" diff --git a/locale/es/LC_MESSAGES/django.po b/locale/es/LC_MESSAGES/django.po index 08ad8fa..fa42107 100644 --- a/locale/es/LC_MESSAGES/django.po +++ b/locale/es/LC_MESSAGES/django.po @@ -8,11 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-09 12:47+0000\n" +"POT-Creation-Date: 2020-09-11 10:12+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -"Language: \n" +"Language: espagnol\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -21,7 +21,7 @@ msgstr "" #: templates/election/mail_invitation.html:75 #: templates/election/mail_invitation.html:112 #: templates/election/mail_one_link.html:75 -#: templates/election/mail_one_link.html:114 +#: templates/election/mail_one_link.html:112 #: templates/election/mail_two_links.html:75 #: templates/election/mail_two_links.html:112 msgid "" @@ -30,7 +30,7 @@ msgid "" msgstr "" #: templates/election/mail_invitation.html:98 -#: templates/election/mail_one_link.html:99 +#: templates/election/mail_one_link.html:98 #: templates/election/mail_two_links.html:98 msgid "Hello!" msgstr "" @@ -57,34 +57,34 @@ msgid "" msgstr "" #: templates/election/mail_invitation.html:165 -#: templates/election/mail_one_link.html:141 +#: templates/election/mail_one_link.html:139 #: templates/election/mail_two_links.html:149 msgid "Good vote" msgstr "" #: templates/election/mail_invitation.html:165 #: templates/election/mail_invitation.html:209 -#: templates/election/mail_one_link.html:141 -#: templates/election/mail_one_link.html:185 +#: templates/election/mail_one_link.html:139 +#: templates/election/mail_one_link.html:183 #: templates/election/mail_two_links.html:149 #: templates/election/mail_two_links.html:193 msgid "Mieux Voter" msgstr "" #: templates/election/mail_invitation.html:180 -#: templates/election/mail_one_link.html:156 +#: templates/election/mail_one_link.html:154 #: templates/election/mail_two_links.html:164 msgid "Need more information?" msgstr "" #: templates/election/mail_invitation.html:185 -#: templates/election/mail_one_link.html:161 +#: templates/election/mail_one_link.html:159 #: templates/election/mail_two_links.html:169 msgid "Do you want to help us?" msgstr "" #: templates/election/mail_invitation.html:202 -#: templates/election/mail_one_link.html:178 +#: templates/election/mail_one_link.html:176 #: templates/election/mail_two_links.html:186 msgid "You received this email because someone invited you to vote." msgstr "" @@ -105,14 +105,14 @@ msgid "" "follows:" msgstr "" -#: templates/election/mail_one_link.html:122 +#: templates/election/mail_one_link.html:120 #: templates/election/mail_one_link.txt:2 msgid "" "This email was sent to you because your email address was entered to receive " "the link to the election result about:" msgstr "" -#: templates/election/mail_one_link.html:132 +#: templates/election/mail_one_link.html:130 #: templates/election/mail_one_link.txt:5 #: templates/election/mail_two_links.html:140 #: templates/election/mail_two_links.txt:8 diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 773fa18..4dbc826 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -8,11 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-09 12:47+0000\n" +"POT-Creation-Date: 2020-09-11 10:12+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -"Language: \n" +"Language: french\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -21,7 +21,7 @@ msgstr "" #: templates/election/mail_invitation.html:75 #: templates/election/mail_invitation.html:112 #: templates/election/mail_one_link.html:75 -#: templates/election/mail_one_link.html:114 +#: templates/election/mail_one_link.html:112 #: templates/election/mail_two_links.html:75 #: templates/election/mail_two_links.html:112 msgid "" @@ -32,7 +32,7 @@ msgstr "" "jugementmajoritaire." #: templates/election/mail_invitation.html:98 -#: templates/election/mail_one_link.html:99 +#: templates/election/mail_one_link.html:98 #: templates/election/mail_two_links.html:98 msgid "Hello!" msgstr "Bonjour !" @@ -66,34 +66,34 @@ msgstr "" "Les résultats seront disponibles à la fin du vote depuis le lien suivant :" #: templates/election/mail_invitation.html:165 -#: templates/election/mail_one_link.html:141 +#: templates/election/mail_one_link.html:139 #: templates/election/mail_two_links.html:149 msgid "Good vote" msgstr "Bon vote" #: templates/election/mail_invitation.html:165 #: templates/election/mail_invitation.html:209 -#: templates/election/mail_one_link.html:141 -#: templates/election/mail_one_link.html:185 +#: templates/election/mail_one_link.html:139 +#: templates/election/mail_one_link.html:183 #: templates/election/mail_two_links.html:149 #: templates/election/mail_two_links.html:193 msgid "Mieux Voter" msgstr "Mieux Voter" #: templates/election/mail_invitation.html:180 -#: templates/election/mail_one_link.html:156 +#: templates/election/mail_one_link.html:154 #: templates/election/mail_two_links.html:164 msgid "Need more information?" msgstr "Besoin de plus d'informations ?" #: templates/election/mail_invitation.html:185 -#: templates/election/mail_one_link.html:161 +#: templates/election/mail_one_link.html:159 #: templates/election/mail_two_links.html:169 msgid "Do you want to help us?" msgstr "Vous souhaitez nous aider ?" #: templates/election/mail_invitation.html:202 -#: templates/election/mail_one_link.html:178 +#: templates/election/mail_one_link.html:176 #: templates/election/mail_two_links.html:186 msgid "You received this email because someone invited you to vote." msgstr "" @@ -118,7 +118,7 @@ msgid "" "follows:" msgstr "Le lien pour accéder aux résultats quand ils seront disponible est :" -#: templates/election/mail_one_link.html:122 +#: templates/election/mail_one_link.html:120 #: templates/election/mail_one_link.txt:2 msgid "" "This email was sent to you because your email address was entered to receive " @@ -127,7 +127,7 @@ msgstr "" "Ce courriel vous a été envoyé, car votre adresse email a été ajoutée par " "l'organisateur du vote :" -#: templates/election/mail_one_link.html:132 +#: templates/election/mail_one_link.html:130 #: templates/election/mail_one_link.txt:5 #: templates/election/mail_two_links.html:140 #: templates/election/mail_two_links.txt:8 diff --git a/templates/election/mail_invitation.html b/templates/election/mail_invitation.html index 1e97e1b..4653b1e 100644 --- a/templates/election/mail_invitation.html +++ b/templates/election/mail_invitation.html @@ -72,7 +72,7 @@
- {% trans "We are happy to send you this email! You will be able to vote using majority judgment." %} + {% translate "We are happy to send you this email! You will be able to vote using majority judgment." %}
@@ -95,7 +95,7 @@
-

{% trans "Hello!" %}

+

{% translate "Hello!" %}

@@ -109,7 +109,7 @@

- {% trans "We are happy to send you this email! You will be able to vote using majority judgment." %} + {% translate "We are happy to send you this email! You will be able to vote using majority judgment." %}

@@ -117,7 +117,7 @@

- {% trans "This email was sent to you because your email address was entered to participate in the vote on the subject:" %} + {% translate "This email was sent to you because your email address was entered to participate in the vote on the subject:" %}   {{title}}

@@ -131,7 +131,7 @@ - +
{% trans "Vote!" %}{% translate "Vote!" %}
@@ -143,7 +143,7 @@

- {% trans "If that doesn't work, copy and paste the following link into your browser:" %} + {% translate "If that doesn't work, copy and paste the following link into your browser:" %}   {{invitation_url}}

@@ -153,7 +153,7 @@

- {% trans "The results will be available with the following link when the vote is finished:" %} + {% translate "The results will be available with the following link when the vote is finished:" %}   {{result_url}}

@@ -162,7 +162,7 @@ -

{% trans "Good vote" %},
{% trans "Mieux Voter" %}

+

{% translate "Good vote" %},
{% translate "Mieux Voter" %}

@@ -177,12 +177,12 @@

- {% trans "Need more information?" %} + {% translate "Need more information?" %}

- {% trans "Do you want to help us?" %} + {% translate "Do you want to help us?" %}

@@ -199,14 +199,14 @@

- {% trans "You received this email because someone invited you to vote." %} + {% translate "You received this email because someone invited you to vote." %}

-

{% trans "Mieux Voter" %} - contact@mieuxvoter.fr

+

{% translate "Mieux Voter" %} - contact@mieuxvoter.fr

diff --git a/templates/election/mail_invitation.txt b/templates/election/mail_invitation.txt index e200826..6ddb380 100644 --- a/templates/election/mail_invitation.txt +++ b/templates/election/mail_invitation.txt @@ -1,9 +1,9 @@ {% load i18n %} -{% trans "This email was sent to you because your email was filled out to participate in the vote on the subject:" %} +{% translate "This email was sent to you because your email was filled out to participate in the vote on the subject:" %} {{ title }} -{% trans "The link for the vote is as follows:" %} +{% translate "The link for the vote is as follows:" %} {{ invitation_url | safe }} -{% trans "The link that will give you the results when they are available is as follows:" %} +{% translate "The link that will give you the results when they are available is as follows:" %} {{ result_url | safe }} diff --git a/templates/election/mail_one_link.html b/templates/election/mail_one_link.html index c4f163e..bd0d5fa 100644 --- a/templates/election/mail_one_link.html +++ b/templates/election/mail_one_link.html @@ -72,7 +72,7 @@
- {% trans "We are happy to send you this email! You will be able to vote using majority judgment." %} + {% translate "We are happy to send you this email! You will be able to vote using majority judgment." %}
@@ -95,7 +95,7 @@
-

{% trans "Hello!" %}

+

{% translate "Hello!" %}

@@ -109,7 +109,7 @@

- {% trans "We are happy to send you this email! You will be able to vote using majority judgment." %} + {% translate "We are happy to send you this email! You will be able to vote using majority judgment." %}

@@ -117,7 +117,7 @@

- {% trans "This email was sent to you because your email address was entered to receive the link to the election result about:" %} + {% translate "This email was sent to you because your email address was entered to receive the link to the election result about:" %}   {{title}}

@@ -127,7 +127,7 @@

- {% trans "The link to view the results, when they are available, is:" %} + {% translate "The link to view the results, when they are available, is:" %}   {{result_url}}

@@ -136,7 +136,7 @@ -

{% trans "Good vote" %},
{% trans "Mieux Voter" %}

+

{% translate "Good vote" %},
{% translate "Mieux Voter" %}

@@ -151,12 +151,12 @@

- {% trans "Need more information?" %} + {% translate "Need more information?" %}

- {% trans "Do you want to help us?" %} + {% translate "Do you want to help us?" %}

@@ -173,14 +173,14 @@

- {% trans "You received this email because someone invited you to vote." %} + {% translate "You received this email because someone invited you to vote." %}

-

{% trans "Mieux Voter" %} - contact@mieuxvoter.fr

+

{% translate "Mieux Voter" %} - contact@mieuxvoter.fr

diff --git a/templates/election/mail_one_link.txt b/templates/election/mail_one_link.txt index 8aecf0c..97bdb23 100644 --- a/templates/election/mail_one_link.txt +++ b/templates/election/mail_one_link.txt @@ -1,6 +1,6 @@ {% load i18n %} -{% trans "This email was sent to you because your email address was entered to receive the link to the election result about:" %} +{% translate "This email was sent to you because your email address was entered to receive the link to the election result about:" %} {{ title }} -{% trans "The link to view the results, when they are available, is:" %} +{% translate "The link to view the results, when they are available, is:" %} {{ result_url | safe }} diff --git a/templates/election/mail_two_links.html b/templates/election/mail_two_links.html index 2b8dd08..2fe7346 100644 --- a/templates/election/mail_two_links.html +++ b/templates/election/mail_two_links.html @@ -72,7 +72,7 @@
- {% trans "We are happy to send you this email! You will be able to vote using majority judgment." %} + {% translate "We are happy to send you this email! You will be able to vote using majority judgment." %}
@@ -95,7 +95,7 @@
-

{% trans "Hello!" %}

+

{% translate "Hello!" %}

@@ -109,7 +109,7 @@

- {% trans "We are happy to send you this email! You will be able to vote using majority judgment." %} + {% translate "We are happy to send you this email! You will be able to vote using majority judgment." %}

@@ -117,7 +117,7 @@

- {% trans "This email was sent to you because your email address was entered to receive the voting and election result links about:" %} + {% translate "This email was sent to you because your email address was entered to receive the voting and election result links about:" %}   {{title}}

@@ -127,7 +127,7 @@

- {% trans "The link that allows you to participate to the vote is:" %} + {% translate "The link that allows you to participate to the vote is:" %}   {{vote_url}}

@@ -137,7 +137,7 @@

- {% trans "The link to view the results, when they are available, is:" %} + {% translate "The link to view the results, when they are available, is:" %}   {{result_url}}

@@ -146,7 +146,7 @@ -

{% trans "Good vote" %},
{% trans "Mieux Voter" %}

+

{% translate "Good vote" %},
{% translate "Mieux Voter" %}

@@ -161,12 +161,12 @@

- {% trans "Need more information?" %} + {% translate "Need more information?" %}

- {% trans "Do you want to help us?" %} + {% translate "Do you want to help us?" %}

@@ -183,14 +183,14 @@

- {% trans "You received this email because someone invited you to vote." %} + {% translate "You received this email because someone invited you to vote." %}

-

{% trans "Mieux Voter" %} - contact@mieuxvoter.fr

+

{% translate "Mieux Voter" %} - contact@mieuxvoter.fr

diff --git a/templates/election/mail_two_links.txt b/templates/election/mail_two_links.txt index 736e54b..8831974 100644 --- a/templates/election/mail_two_links.txt +++ b/templates/election/mail_two_links.txt @@ -1,9 +1,9 @@ {% load i18n %} -{% trans "This email was sent to you because your email address was entered to receive the voting and election result links about:" %} +{% translate "This email was sent to you because your email address was entered to receive the voting and election result links about:" %} {{ title }} -{% trans "The link that allows you to participate to the vote is:" %} +{% translate "The link that allows you to participate to the vote is:" %} {{ vote_url | safe }} -{% trans "The link to view the results, when they are available, is:" %} +{% translate "The link to view the results, when they are available, is:" %} {{ result_url | safe }}