From ca1fdff3cb9aa73def20936a7ca16ef65a15b925 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Mon, 20 Dec 2021 17:19:49 +0100 Subject: [PATCH] Ajoute un message lorsque le vote n'est pas encore ouvert --- elections/templates/elections/election.html | 18 ++- shared/locale/en/LC_MESSAGES/django.mo | Bin 17858 -> 18189 bytes shared/locale/en/LC_MESSAGES/django.po | 160 +++++++++++--------- 3 files changed, 105 insertions(+), 73 deletions(-) diff --git a/elections/templates/elections/election.html b/elections/templates/elections/election.html index 9235fc6..fdfccd0 100644 --- a/elections/templates/elections/election.html +++ b/elections/templates/elections/election.html @@ -139,7 +139,23 @@ {% endif %} {# Indications de connexion #} -{% if election.start_date < current_time and election.end_date > current_time %} +{% if election.start_date > current_time %} +
+
+
+
+

+ + + + {% blocktrans with _date=election.start_date|date:"d/m/Y" _time=election.start_date|date:_("H:i") %}Le vote ouvrira le {{ _date }} à {{ _time }}.{% endblocktrans %} +

+

{% trans "Revenez sur cette page quand le vote sera ouvert pour vous connecter et participer." %}

+
+
+
+
+{% elif election.end_date > current_time %} {% if can_vote %}
diff --git a/shared/locale/en/LC_MESSAGES/django.mo b/shared/locale/en/LC_MESSAGES/django.mo index 94f7d504dd4217ff10819dcd6c067b572fea8ac2..230a608d492de6058d70d927cb2d2a40d2a9ca03 100644 GIT binary patch delta 4766 zcmZYCd2m(L0mtzZvLS0A!LZ7OkU)Sy!V+SDKuBb14J`_mQc`#cSMng_WqApT%VV*z zF>Hch3!#GGQbkZ7RH-$QO+{rJ+FBGS$XGfZjiu8+1TE9=@7fw%;3$8~rc?!jo>hbj0v_QXG92mA^L z;Z5v~{gb>K=3+1EQ&H_KME=YYTMywF?r$0>=)z{}d8Cu(->3%SdUzdkP&Y0>jlg{5 z6tfi7;gvWPpTPNX$8 z+>=(-@MwNCB}J%?&O*&~F?MC`+>hg^*Ktt}?!ygu4U2F&3m_Yh_hI};Quvk~t8qBp zn~D2T4cx+hn9YxRJ{w)E!a3aNV{E3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xkKG>uFt zq0dxrTH!J;;E#!yiKWC##8(KVS;QEkfY?F|A?_xWUMJ3nbNY>v#-XAx!&N+st6V-C z7c?~vOw4+cT%@c084e|u5od@=gi-0R8-m_a;1Y$RSJzC~1rmJjLY`HbjOZisPdH3mE#ufB*mh diff --git a/shared/locale/en/LC_MESSAGES/django.po b/shared/locale/en/LC_MESSAGES/django.po index e1c6d4a..dd0d733 100644 --- a/shared/locale/en/LC_MESSAGES/django.po +++ b/shared/locale/en/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-06 15:37+0200\n" -"PO-Revision-Date: 2021-09-05 17:31+0200\n" +"POT-Creation-Date: 2021-12-20 17:09+0100\n" +"PO-Revision-Date: 2021-12-20 17:18+0100\n" "Last-Translator: Test Translator \n" "Language-Team: \n" "Language: en\n" @@ -72,111 +72,111 @@ msgstr "No" msgid "Oui" msgstr "Yes" -#: elections/models.py:33 +#: elections/models.py:34 msgid "nom" msgstr "name" -#: elections/models.py:34 +#: elections/models.py:35 msgid "nom bref" msgstr "short name" -#: elections/models.py:36 faqs/models.py:15 +#: elections/models.py:37 faqs/models.py:15 msgid "description" msgstr "description" -#: elections/models.py:39 +#: elections/models.py:40 msgid "date et heure de début" msgstr "start date and time" -#: elections/models.py:40 +#: elections/models.py:41 msgid "date et heure de fin" msgstr "end date and time" -#: elections/models.py:42 +#: elections/models.py:43 msgid "visible au public" msgstr "visible to everyone" -#: elections/models.py:45 +#: elections/models.py:46 msgid "conditions de vote" msgstr "voting requirements" -#: elections/models.py:49 +#: elections/models.py:50 msgid "restreint le vote à une liste de personnes" msgstr "restricts the vote to a list of people" -#: elections/models.py:53 +#: elections/models.py:54 msgid "mail avec les identifiants envoyé" msgstr "mail with credentials sent" -#: elections/models.py:70 +#: elections/models.py:71 msgid "résultats publics" msgstr "results published" -#: elections/models.py:71 +#: elections/models.py:72 msgid "dépouillée" msgstr "counted" -#: elections/models.py:73 +#: elections/models.py:74 msgid "archivée" msgstr "archived" -#: elections/models.py:76 +#: elections/models.py:77 msgid "date du dépouillement" msgstr "date of count" -#: elections/models.py:79 +#: elections/models.py:80 msgid "date de publication" msgstr "date of publication" -#: elections/models.py:84 +#: elections/models.py:85 msgid "Peut administrer des élections" msgstr "Can manage elections" -#: elections/models.py:94 +#: elections/models.py:95 msgid "question" msgstr "question" -#: elections/models.py:97 +#: elections/models.py:98 msgid "type de question" msgstr "type of question" -#: elections/models.py:104 +#: elections/models.py:105 msgid "nombre maximal de votes reçus" msgstr "maximal number of votes received" -#: elections/models.py:161 +#: elections/models.py:164 msgid "texte" msgstr "text" -#: elections/models.py:162 +#: elections/models.py:165 msgid "abréviation" msgstr "abbreviation" -#: elections/models.py:164 +#: elections/models.py:167 msgid "option gagnante" msgstr "winning option" -#: elections/models.py:172 +#: elections/models.py:175 msgid "nombre de votes reçus" msgstr "number of votes received" -#: elections/models.py:202 +#: elections/models.py:207 msgid "rang de l'option" msgstr "option's ranking" -#: elections/models.py:218 +#: elections/models.py:223 msgid "votes supplémentaires" msgstr "extra votes" -#: elections/models.py:234 +#: elections/models.py:239 msgid "Nom et Prénom" msgstr "Name and surname" -#: elections/models.py:235 +#: elections/models.py:240 msgid "email valide" msgstr "valid e-mail" -#: elections/models.py:258 elections/tests/test_models.py:57 +#: elections/models.py:263 elections/tests/test_models.py:57 msgid "identifiants spécifiques" msgstr "dedicated credentials" @@ -226,7 +226,7 @@ msgstr "" #: elections/templates/elections/admin/option.html:12 #: elections/templates/elections/admin/question.html:29 -#: elections/templates/elections/election_admin.html:153 +#: elections/templates/elections/election_admin.html:149 #: faqs/templates/faqs/faq.html:22 msgid "Modifier" msgstr "Edit" @@ -241,7 +241,7 @@ msgstr "Change the question" #: elections/templates/elections/admin/question.html:59 #: elections/templates/elections/admin/question.html:63 -#: elections/templates/elections/election_admin.html:273 +#: elections/templates/elections/election_admin.html:269 msgid "Rajouter une option" msgstr "Add an option" @@ -289,11 +289,27 @@ msgstr "Counted on %(timestamp)s" msgid "Publié le %(timestamp)s" msgstr "Published on %(timestamp)s" -#: elections/templates/elections/election.html:152 +#: elections/templates/elections/election.html:151 +msgid "H:i" +msgstr "h:i A" + +#: elections/templates/elections/election.html:151 +#, python-format +msgid "Le vote ouvrira le %(_date)s à %(_time)s." +msgstr "The vote will open on %(_date)s at %(_time)s." + +#: elections/templates/elections/election.html:153 +msgid "" +"Revenez sur cette page quand le vote sera ouvert pour vous connecter et " +"participer." +msgstr "" +"Come back on this page when the vote is open to log in and participate." + +#: elections/templates/elections/election.html:168 msgid "Voter" msgstr "Vote" -#: elections/templates/elections/election.html:163 +#: elections/templates/elections/election.html:179 msgid "" "Pour voter lors de cette élection, vous devez vous connecter à l'aide des " "identifiants reçus par mail." @@ -301,7 +317,7 @@ msgstr "" "To vote in this election, you must log in using the login credentials you " "received by e-mail." -#: elections/templates/elections/election.html:165 +#: elections/templates/elections/election.html:181 #: elections/templates/elections/election_voters.html:93 msgid "" "Pour voter lors de cette élection, vous devez vous connecter à l'aide du CAS " @@ -312,73 +328,73 @@ msgstr "" "restrictions may apply and your vote may be deleted if you are not eligible " "to vote." -#: elections/templates/elections/election.html:181 +#: elections/templates/elections/election.html:197 msgid "Connexion par identifiants" msgstr "Login with credentials" -#: elections/templates/elections/election.html:192 +#: elections/templates/elections/election.html:208 #: shared/templates/authens/login_switch.html:20 msgid "Connexion via CAS" msgstr "Login via CAS" -#: elections/templates/elections/election.html:227 +#: elections/templates/elections/election.html:243 msgid "A voté" msgstr "Voted" -#: elections/templates/elections/election_admin.html:94 +#: elections/templates/elections/election_admin.html:90 #: elections/templates/elections/election_list.html:58 msgid "Élection invisible" msgstr "Invisible election" -#: elections/templates/elections/election_admin.html:101 +#: elections/templates/elections/election_admin.html:97 msgid "Élection visible" msgstr "Visible election" -#: elections/templates/elections/election_admin.html:124 +#: elections/templates/elections/election_admin.html:120 msgid "Vue classique" msgstr "Classic view" -#: elections/templates/elections/election_admin.html:135 +#: elections/templates/elections/election_admin.html:131 msgid "Rendre l'élection visible" msgstr "Make the election visible" -#: elections/templates/elections/election_admin.html:144 +#: elections/templates/elections/election_admin.html:140 msgid "Exporter les votant·e·s" msgstr "Export the list of voters" -#: elections/templates/elections/election_admin.html:162 +#: elections/templates/elections/election_admin.html:158 #: elections/templates/elections/election_upload_voters.html:32 msgid "Gestion de la liste de votant·e·s" msgstr "Management of the voters' list" -#: elections/templates/elections/election_admin.html:174 +#: elections/templates/elections/election_admin.html:170 #: elections/templates/elections/election_voters.html:76 msgid "Liste des votant·e·s" msgstr "Voters' list" -#: elections/templates/elections/election_admin.html:182 +#: elections/templates/elections/election_admin.html:178 msgid "Dépouiller" msgstr "Count" -#: elections/templates/elections/election_admin.html:194 +#: elections/templates/elections/election_admin.html:190 msgid "Publier" msgstr "Publish" -#: elections/templates/elections/election_admin.html:196 +#: elections/templates/elections/election_admin.html:192 msgid "Dépublier" msgstr "De-publish" -#: elections/templates/elections/election_admin.html:206 +#: elections/templates/elections/election_admin.html:202 msgid "Télécharger les résultats" msgstr "Download the results" -#: elections/templates/elections/election_admin.html:215 +#: elections/templates/elections/election_admin.html:211 msgid "Archiver" msgstr "Archive" -#: elections/templates/elections/election_admin.html:277 +#: elections/templates/elections/election_admin.html:273 +#: elections/templates/elections/election_admin.html:278 #: elections/templates/elections/election_admin.html:282 -#: elections/templates/elections/election_admin.html:286 msgid "Rajouter une question" msgstr "Add a question" @@ -559,7 +575,7 @@ msgstr "Vote for the question:" #: shared/templates/auth/permission-management.html:29 #: shared/templates/authens/pwd_login.html:25 #: shared/templates/authens/pwd_reset_confirm.html:25 -#: shared/templates/forms/modal-form.html:23 +#: shared/templates/forms/modal-form.html:24 msgid "Enregistrer" msgstr "Save" @@ -572,7 +588,7 @@ msgid "Confirmer" msgstr "Confirm" #: elections/templates/elections/vote.html:76 -#: shared/templates/forms/modal-form.html:30 +#: shared/templates/forms/modal-form.html:31 msgid "Annuler" msgstr "Cancel" @@ -623,7 +639,7 @@ msgstr "The maximum ranking is {}." msgid "Le classement minimal est 1." msgstr "The minimum ranking is 1." -#: elections/utils.py:351 +#: elections/utils.py:352 msgid "" "Format invalide. Vérifiez que le fichier est bien formé (i.e. chaque ligne " "de la forme 'login,nom,email')." @@ -631,23 +647,23 @@ msgstr "" "Invalid format. Check that the file is properly formed (i.e. each line of " "the form 'login,name,e-mail')." -#: elections/utils.py:365 +#: elections/utils.py:366 msgid "La ligne {} n'a pas le bon nombre d'éléments." msgstr "The line {} has the wrong number of elements." -#: elections/utils.py:370 +#: elections/utils.py:371 msgid "Valeur manquante dans la ligne {} : 'login'." msgstr "Missing value in line {}: 'login'." -#: elections/utils.py:375 +#: elections/utils.py:376 msgid "Doublon dans les logins : lignes {} et {}." msgstr "Duplicate logins: lines {} and {}." -#: elections/utils.py:383 +#: elections/utils.py:384 msgid "Valeur manquante dans la ligne {} : 'nom'." msgstr "Missing value in line {}: 'name'." -#: elections/utils.py:389 +#: elections/utils.py:390 msgid "Adresse mail invalide à la ligne {} : '{}'." msgstr "Invalid e-mail address in line {}: '{}'." @@ -655,51 +671,51 @@ msgstr "Invalid e-mail address in line {}: '{}'." msgid "Élection créée avec succès !" msgstr "Election successfully created!" -#: elections/views.py:98 +#: elections/views.py:115 msgid "Élection visible !" msgstr "Election now visible!" -#: elections/views.py:126 +#: elections/views.py:143 msgid "Liste de votant·e·s importée avec succès !" msgstr "Voters list successfully imported!" -#: elections/views.py:160 +#: elections/views.py:177 msgid "Mail d'annonce en cours d'envoi !" msgstr "Announcement e-mail being distributed!" -#: elections/views.py:197 +#: elections/views.py:214 msgid "Élection modifiée avec succès !" msgstr "Election successfully modified!" -#: elections/views.py:222 +#: elections/views.py:239 msgid "Vote de {} supprimé !" msgstr "{}'s vote deleted!" -#: elections/views.py:256 +#: elections/views.py:273 msgid "Élection dépouillée avec succès !" msgstr "Election successfully counted!" -#: elections/views.py:283 +#: elections/views.py:300 msgid "Élection publiée avec succès !" msgstr "Election successfully published!" -#: elections/views.py:284 +#: elections/views.py:301 msgid "Élection dépubliée avec succès !" msgstr "Election successfully de-published!" -#: elections/views.py:315 +#: elections/views.py:332 msgid "Élection archivée avec succès !" msgstr "Election successfully archived!" -#: elections/views.py:349 +#: elections/views.py:366 msgid "Question supprimée !" msgstr "Question deleted!" -#: elections/views.py:377 +#: elections/views.py:394 msgid "Option supprimée !" msgstr "Option deleted!" -#: elections/views.py:522 +#: elections/views.py:539 msgid "Votre choix a bien été enregistré !" msgstr "Your choice has been recorded!" @@ -861,7 +877,7 @@ msgstr "List of special accounts" msgid "Gestionnaires de Kadenios" msgstr "Kadenios managers" -#: shared/templates/auth/admin-accounts.html:32 +#: shared/templates/auth/admin-accounts.html:22 msgid "Gestionnaires d'élections" msgstr "Election managers"