Resolve bugs (#40)

* updated language error message

* bugs begin & end dates

* update and resolution of bugs on the translation
pull/41/head
Rémi BOIDET 4 years ago committed by GitHub
parent cfff1e94b5
commit 48d024b370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)

@ -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)

@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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

@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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:"

@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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

@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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

@ -72,7 +72,7 @@
<!-- HIDDEN PREHEADER TEXT -->
<div style="display: none; font-size: 1px; color: #fefefe; line-height: 1px; font-family: 'Lato', Helvetica, Arial, sans-serif; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden;">
{% 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." %}
</div>
<table border="0" style="margin: 0px auto 0px auto; width: 100%;" aria-describedby="Email">
<!-- LOGO -->
@ -95,7 +95,7 @@
<table border="0" style="margin: 0px auto 0px auto; width: 100%; max-width: 600px;" aria-describedby="email title">
<tr>
<th scope="col" style="vertical-align: top; background-color: #ffffff; padding: 40px 20px 20px 20px; border-radius: 4px 4px 0px 0px; color: #111111; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 48px; font-weight: 400; letter-spacing: 4px; line-height: 48px;">
<h1 style="font-size: 48px; font-weight: 400; margin: 0;">{% trans "Hello!" %}</h1>
<h1 style="font-size: 48px; font-weight: 400; margin: 0;">{% translate "Hello!" %}</h1>
</th>
</tr>
</table>
@ -109,7 +109,7 @@
<tr>
<th scope="col" style="background-color: #ffffff; padding: 20px 30px 40px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">
{% 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." %}
</p>
</th>
</tr>
@ -117,7 +117,7 @@
<tr>
<th scope="col" style="background-color: #ffffff; padding: 20px 30px 40px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">
{% 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:" %}
&nbsp;
<strong>{{title}}</strong>
</p>
@ -131,7 +131,7 @@
<th scope="col" style="background-color: #ffffff; padding: 20px 30px 60px 30px;">
<table border="0" style="margin: 0px auto 0px auto; border-collapse: collapse;" aria-describedby="invitation url">
<tr>
<th scope="col" style="border-radius: 3px; background-color: #2a43a0;"><a href="{{invitation_url}}" target="_blank" style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #2a43a0; display: inline-block;">{% trans "Vote!" %}</a></th>
<th scope="col" style="border-radius: 3px; background-color: #2a43a0;"><a href="{{invitation_url}}" target="_blank" style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #2a43a0; display: inline-block;">{% translate "Vote!" %}</a></th>
</tr>
</table>
</th>
@ -143,7 +143,7 @@
<tr>
<th scope="col" style="background-color: #ffffff; padding: 20px 30px 40px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">
{% 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:" %}
&nbsp;
<a target="_blank" style="color: #2a43a0;">{{invitation_url}}</a>
</p>
@ -153,7 +153,7 @@
<tr>
<th scope="col" style="background-color: #ffffff; padding: 20px 30px 20px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">
{% 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:" %}
&nbsp;
<a target="_blank" style="color: #2a43a0;">{{result_url}}</a>
</p>
@ -162,7 +162,7 @@
<!-- BLOCK THANKS -->
<tr>
<th scope="col" style="background-color: #ffffff; padding: 0px 30px 40px 30px; border-radius: 0px 0px 4px 4px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">{% trans "Good vote" %},<br>{% trans "Mieux Voter" %}</p>
<p style="margin: 0; text-align: left;">{% translate "Good vote" %},<br>{% translate "Mieux Voter" %}</p>
</th>
</tr>
</table>
@ -177,12 +177,12 @@
<th scope="col" style="background-color: #7d8ecf; padding: 30px 30px 30px 30px; border-radius: 4px 4px 4px 4px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0;"><strong>
<a href="https://mieuxvoter.fr/index.php/decouvrir/" target="_blank" style="color: #FFFFFF;" rel="noopener noreferrer">
{% trans "Need more information?" %}
{% translate "Need more information?" %}
</a></strong>
</p>
<p style="margin: 0;"> <strong>
<a href="https://mieuxvoter.fr/index.php/decouvrir/" target="_blank" style="color: #111111;" rel="noopener noreferrer">
{% trans "Do you want to help us?" %}
{% translate "Do you want to help us?" %}
</a></strong>
</p>
</th>
@ -199,14 +199,14 @@
<tr>
<th scope="col" style="background-color: #f4f4f4; padding: 0px 30px 30px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 18px;" >
<p style="margin: 0;">
{% trans "You received this email because someone invited you to vote." %}
{% translate "You received this email because someone invited you to vote." %}
</p>
</th>
</tr>
<!-- ADDRESS -->
<tr>
<th scope="col" style="background-color: #f4f4f4; padding: 0px 30px 30px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 18px;" >
<p style="margin: 0;">{% trans "Mieux Voter" %} - contact@mieuxvoter.fr</p>
<p style="margin: 0;">{% translate "Mieux Voter" %} - contact@mieuxvoter.fr</p>
</th>
</tr>
</table>

@ -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 }}

@ -72,7 +72,7 @@
<!-- HIDDEN PREHEADER TEXT -->
<div style="display: none; font-size: 1px; color: #fefefe; line-height: 1px; font-family: 'Lato', Helvetica, Arial, sans-serif; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden;">
{% 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." %}
</div>
<table border="0" style="margin: 0px auto 0px auto; width: 100%;" aria-describedby="Email">
<!-- LOGO -->
@ -95,7 +95,7 @@
<table border="0" style="margin: 0px auto 0px auto; width: 100%; max-width: 600px;" aria-describedby="email title">
<tr>
<th scope="col" style="vertical-align: top; background-color: #ffffff; padding: 40px 20px 20px 20px; border-radius: 4px 4px 0px 0px; color: #111111; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 48px; font-weight: 400; letter-spacing: 4px; line-height: 48px;">
<h1 style="font-size: 48px; font-weight: 400; margin: 0;">{% trans "Hello!" %}</h1>
<h1 style="font-size: 48px; font-weight: 400; margin: 0;">{% translate "Hello!" %}</h1>
</th>
</tr>
</table>
@ -109,7 +109,7 @@
<tr>
<th scope="col" style="background-color: #ffffff; padding: 20px 30px 40px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">
{% 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." %}
</p>
</th>
</tr>
@ -117,7 +117,7 @@
<tr>
<th scope="col" style="background-color: #ffffff; padding: 20px 30px 40px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">
{% 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:" %}
&nbsp;
<strong>{{title}}</strong>
</p>
@ -127,7 +127,7 @@
<tr>
<th scope="col" style="background-color: #ffffff; padding: 20px 30px 40px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">
{% trans "The link to view the results, when they are available, is:" %}
{% translate "The link to view the results, when they are available, is:" %}
&nbsp;
<a target="_blank" style="color: #2a43a0;">{{result_url}}</a>
</p>
@ -136,7 +136,7 @@
<!-- BLOCK THANKS -->
<tr>
<th scope="col" style="background-color: #ffffff; padding: 0px 30px 40px 30px; border-radius: 0px 0px 4px 4px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">{% trans "Good vote" %},<br>{% trans "Mieux Voter" %}</p>
<p style="margin: 0; text-align: left;">{% translate "Good vote" %},<br>{% translate "Mieux Voter" %}</p>
</th>
</tr>
</table>
@ -151,12 +151,12 @@
<th scope="col" style="background-color: #7d8ecf; padding: 30px 30px 30px 30px; border-radius: 4px 4px 4px 4px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0;"><strong>
<a href="https://mieuxvoter.fr/index.php/decouvrir/" target="_blank" style="color: #FFFFFF;" rel="noopener noreferrer">
{% trans "Need more information?" %}
{% translate "Need more information?" %}
</a></strong>
</p>
<p style="margin: 0;"> <strong>
<a href="https://mieuxvoter.fr/index.php/decouvrir/" target="_blank" style="color: #111111;" rel="noopener noreferrer">
{% trans "Do you want to help us?" %}
{% translate "Do you want to help us?" %}
</a></strong>
</p>
</th>
@ -173,14 +173,14 @@
<tr>
<th scope="col" style="background-color: #f4f4f4; padding: 0px 30px 30px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 18px;" >
<p style="margin: 0;">
{% trans "You received this email because someone invited you to vote." %}
{% translate "You received this email because someone invited you to vote." %}
</p>
</th>
</tr>
<!-- ADDRESS -->
<tr>
<th scope="col" style="background-color: #f4f4f4; padding: 0px 30px 30px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 18px;" >
<p style="margin: 0;">{% trans "Mieux Voter" %} - contact@mieuxvoter.fr</p>
<p style="margin: 0;">{% translate "Mieux Voter" %} - contact@mieuxvoter.fr</p>
</th>
</tr>
</table>

@ -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 }}

@ -72,7 +72,7 @@
<!-- HIDDEN PREHEADER TEXT -->
<div style="display: none; font-size: 1px; color: #fefefe; line-height: 1px; font-family: 'Lato', Helvetica, Arial, sans-serif; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden;">
{% 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." %}
</div>
<table border="0" style="margin: 0px auto 0px auto; width: 100%;" aria-describedby="Email">
<!-- LOGO -->
@ -95,7 +95,7 @@
<table border="0" style="margin: 0px auto 0px auto; width: 100%; max-width: 600px;" aria-describedby="email title">
<tr>
<th scope="col" style="vertical-align: top; background-color: #ffffff; padding: 40px 20px 20px 20px; border-radius: 4px 4px 0px 0px; color: #111111; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 48px; font-weight: 400; letter-spacing: 4px; line-height: 48px;">
<h1 style="font-size: 48px; font-weight: 400; margin: 0;">{% trans "Hello!" %}</h1>
<h1 style="font-size: 48px; font-weight: 400; margin: 0;">{% translate "Hello!" %}</h1>
</th>
</tr>
</table>
@ -109,7 +109,7 @@
<tr>
<th scope="col" style="background-color: #ffffff; padding: 20px 30px 40px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">
{% 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." %}
</p>
</th>
</tr>
@ -117,7 +117,7 @@
<tr>
<th scope="col" style="background-color: #ffffff; padding: 20px 30px 40px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">
{% 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:" %}
&nbsp;
<strong>{{title}}</strong>
</p>
@ -127,7 +127,7 @@
<tr>
<th scope="col" style="background-color: #ffffff; padding: 20px 30px 40px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">
{% trans "The link that allows you to participate to the vote is:" %}
{% translate "The link that allows you to participate to the vote is:" %}
&nbsp;
<a target="_blank" style="color: #2a43a0;">{{vote_url}}</a>
</p>
@ -137,7 +137,7 @@
<tr>
<th scope="col" style="background-color: #ffffff; padding: 20px 30px 40px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">
{% trans "The link to view the results, when they are available, is:" %}
{% translate "The link to view the results, when they are available, is:" %}
&nbsp;
<a target="_blank" style="color: #2a43a0;">{{result_url}}</a>
</p>
@ -146,7 +146,7 @@
<!-- BLOCK THANKS -->
<tr>
<th scope="col" style="background-color: #ffffff; padding: 0px 30px 40px 30px; border-radius: 0px 0px 4px 4px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0; text-align: left;">{% trans "Good vote" %},<br>{% trans "Mieux Voter" %}</p>
<p style="margin: 0; text-align: left;">{% translate "Good vote" %},<br>{% translate "Mieux Voter" %}</p>
</th>
</tr>
</table>
@ -161,12 +161,12 @@
<th scope="col" style="background-color: #7d8ecf; padding: 30px 30px 30px 30px; border-radius: 4px 4px 4px 4px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
<p style="margin: 0;"><strong>
<a href="https://mieuxvoter.fr/index.php/decouvrir/" target="_blank" style="color: #FFFFFF;" rel="noopener noreferrer">
{% trans "Need more information?" %}
{% translate "Need more information?" %}
</a></strong>
</p>
<p style="margin: 0;"> <strong>
<a href="https://mieuxvoter.fr/index.php/decouvrir/" target="_blank" style="color: #111111;" rel="noopener noreferrer">
{% trans "Do you want to help us?" %}
{% translate "Do you want to help us?" %}
</a></strong>
</p>
</th>
@ -183,14 +183,14 @@
<tr>
<th scope="col" style="background-color: #f4f4f4; padding: 0px 30px 30px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 18px;" >
<p style="margin: 0;">
{% trans "You received this email because someone invited you to vote." %}
{% translate "You received this email because someone invited you to vote." %}
</p>
</th>
</tr>
<!-- ADDRESS -->
<tr>
<th scope="col" style="background-color: #f4f4f4; padding: 0px 30px 30px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 18px;" >
<p style="margin: 0;">{% trans "Mieux Voter" %} - contact@mieuxvoter.fr</p>
<p style="margin: 0;">{% translate "Mieux Voter" %} - contact@mieuxvoter.fr</p>
</th>
</tr>
</table>

@ -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 }}

Loading…
Cancel
Save