diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 2eec686..269f5d1 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: TFJM\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-11 19:20+0100\n" +"POT-Creation-Date: 2024-02-11 20:13+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Emmy D'Anello \n" "Language-Team: LANGUAGE \n" @@ -22,19 +22,19 @@ msgid "API" msgstr "API" #: draw/admin.py:16 draw/admin.py:28 draw/admin.py:44 participation/admin.py:44 -#: participation/models.py:116 participation/tables.py:87 +#: participation/models.py:198 participation/tables.py:87 msgid "teams" msgstr "équipes" #: draw/admin.py:40 draw/admin.py:56 draw/models.py:24 #: participation/admin.py:16 participation/admin.py:73 -#: participation/admin.py:104 participation/models.py:285 -#: participation/models.py:309 participation/models.py:342 +#: participation/admin.py:104 participation/models.py:367 +#: participation/models.py:391 participation/models.py:424 msgid "tournament" msgstr "tournoi" #: draw/admin.py:60 draw/models.py:231 draw/models.py:426 -#: participation/models.py:346 +#: participation/models.py:428 msgid "round" msgstr "tour" @@ -168,7 +168,7 @@ msgstr "La poule en cours, où les équipes choisissent leurs problèmes" msgid "rounds" msgstr "tours" -#: draw/models.py:254 participation/models.py:360 +#: draw/models.py:254 participation/models.py:442 msgid "letter" msgstr "lettre" @@ -207,17 +207,17 @@ msgid "Pool {letter}{number}" msgstr "Poule {letter}{number}" #: draw/models.py:407 draw/models.py:434 participation/admin.py:69 -#: participation/admin.py:88 participation/models.py:412 -#: participation/models.py:421 participation/tables.py:83 +#: participation/admin.py:88 participation/models.py:494 +#: participation/models.py:503 participation/tables.py:83 msgid "pool" msgstr "poule" -#: draw/models.py:408 participation/models.py:413 +#: draw/models.py:408 participation/models.py:495 msgid "pools" msgstr "poules" -#: draw/models.py:420 participation/models.py:332 participation/models.py:582 -#: participation/models.py:612 participation/models.py:650 +#: draw/models.py:420 participation/models.py:414 participation/models.py:664 +#: participation/models.py:694 participation/models.py:732 msgid "participation" msgstr "participation" @@ -241,8 +241,8 @@ msgid "" msgstr "" "L'ordre de choix dans la poule, entre 0 et la taille de la poule moins 1." -#: draw/models.py:457 draw/models.py:480 participation/models.py:435 -#: participation/models.py:619 +#: draw/models.py:457 draw/models.py:480 participation/models.py:517 +#: participation/models.py:701 #, python-brace-format msgid "Problem #{problem}" msgstr "Problème n°{problem}" @@ -325,7 +325,7 @@ msgid "Continue draw" msgstr "Continuer le tirage" #: draw/templates/draw/tournament_content.html:216 participation/admin.py:100 -#: participation/models.py:115 participation/models.py:300 +#: participation/models.py:197 participation/models.py:382 #: registration/models.py:146 msgid "team" msgstr "équipe" @@ -368,8 +368,8 @@ msgstr "Êtes-vous sûr·e de vouloir annuler le tirage au sort ?" msgid "Close" msgstr "Fermer" -#: draw/views.py:31 participation/views.py:151 participation/views.py:448 -#: participation/views.py:479 +#: draw/views.py:31 participation/views.py:151 participation/views.py:440 +#: participation/views.py:471 msgid "You are not in a team." msgstr "Vous n'êtes pas dans une équipe." @@ -442,26 +442,26 @@ msgstr "Changelog de type \"{action}\" pour le modèle {model} le {timestamp}" msgid "valid" msgstr "valide" -#: participation/admin.py:24 participation/models.py:321 +#: participation/admin.py:24 participation/models.py:403 msgid "selected for final" msgstr "sélectionnée pour la finale" #: participation/admin.py:57 participation/admin.py:116 -#: participation/models.py:442 participation/tables.py:111 +#: participation/models.py:524 participation/tables.py:111 msgid "defender" msgstr "défenseur⋅se" -#: participation/admin.py:61 participation/models.py:449 -#: participation/models.py:662 +#: participation/admin.py:61 participation/models.py:531 +#: participation/models.py:744 msgid "opponent" msgstr "opposant⋅e" -#: participation/admin.py:65 participation/models.py:456 -#: participation/models.py:663 +#: participation/admin.py:65 participation/models.py:538 +#: participation/models.py:745 msgid "reporter" msgstr "rapporteur⋅e" -#: participation/admin.py:120 participation/models.py:617 +#: participation/admin.py:120 participation/models.py:699 msgid "problem" msgstr "numéro de problème" @@ -568,7 +568,7 @@ msgstr "Ce⋅tte défenseur⋅se ne travaille pas sur ce problème." msgid "The PDF file must not have more than 2 pages." msgstr "Le fichier PDF ne doit pas avoir plus de 2 pages." -#: participation/models.py:32 participation/models.py:126 +#: participation/models.py:32 participation/models.py:208 #: participation/tables.py:17 participation/tables.py:33 msgid "name" msgstr "nom" @@ -593,123 +593,191 @@ msgstr "Le code d'accès permet aux autres participants de rejoindre l'équipe." msgid "motivation letter" msgstr "lettre de motivation" -#: participation/models.py:112 +#: participation/models.py:94 +#, python-brace-format +msgid "" +"The team is not registered to any tournament. You can register the team to a " +"tournament using this link." +msgstr "" +"L'équipe n'est inscrite à aucun tournoi. Vous pouvez inscrire l'équipe à un " +"tournoi en cliquant sur ce lien." + +#: participation/models.py:99 +msgid "No tournament" +msgstr "Pas de tournoi" + +#: participation/models.py:105 +#, python-brace-format +msgid "" +"The team has not uploaded a motivation letter. You can upload your " +"motivation letter using this link." +msgstr "" +"L'équipe n'a pas envoyé de lettre de motivation. Vous pouvez envoyer votre " +"lettre de motivation en cliquant sur ce lien." + +#: participation/models.py:110 +msgid "No motivation letter" +msgstr "Pas de lettre de motivation" + +#: participation/models.py:117 +#, python-brace-format +msgid "" +"The team has less than 4 students ({nb_students}).You can invite more " +"students to join the team using the invite code {code}." +msgstr "" +"L'équipe a moins de 4 élèves ({nb_students}). Vous pouvez inviter plus " +"d'élèves à rejoindre l'équipe en utilisant le code d'invitation " +"{code}." + +#: participation/models.py:121 +msgid "Not enough students" +msgstr "Pas assez d'élèves" + +#: participation/models.py:128 +#, python-brace-format +msgid "" +"The team has no coach.You can invite a coach to join the team using " +"the invite code {code}." +msgstr "" +"L'équipe n'a pas d'encadrant⋅e. Vous pouvez invite un⋅e encadrant⋅e à rejoindre " +"l'équipe en utilisant le code d'invitation {code}." + +#: participation/models.py:132 +msgid "No coach" +msgstr "Pas d'encadrant⋅e" + +#: participation/models.py:139 +#, python-brace-format +msgid "" +"The team has more than 6 students ({nb_students}) or more than 2 coaches " +"({nb_coaches}).You have to restrict the number of students and coaches to 6 " +"and 2, respectively." +msgstr "" +"L'équipe a plus de 6 élèves ({nb_students}) ou plus de 2 encadrant⋅es " +"({nb_coaches}). Vous devez restreindre le nombre d'élèves et d'encadrant⋅es " +"à 6 et 2, respectivement." + +#: participation/models.py:143 +msgid "Too many members" +msgstr "Trop de membres" + +#: participation/models.py:194 #, python-brace-format msgid "Team {name} ({trigram})" msgstr "Équipe {name} ({trigram})" -#: participation/models.py:131 +#: participation/models.py:213 msgid "start" msgstr "début" -#: participation/models.py:136 +#: participation/models.py:218 msgid "end" msgstr "fin" -#: participation/models.py:142 +#: participation/models.py:224 #: participation/templates/participation/tournament_detail.html:18 msgid "place" msgstr "lieu" -#: participation/models.py:146 +#: participation/models.py:228 msgid "max team count" msgstr "nombre maximal d'équipes" -#: participation/models.py:151 +#: participation/models.py:233 #: participation/templates/participation/tournament_detail.html:21 msgid "price" msgstr "prix" -#: participation/models.py:156 +#: participation/models.py:238 #: participation/templates/participation/tournament_detail.html:24 msgid "remote" msgstr "à distance" -#: participation/models.py:161 +#: participation/models.py:243 msgid "limit date for registrations" msgstr "date limite d'inscription" -#: participation/models.py:166 +#: participation/models.py:248 msgid "limit date to upload solutions" msgstr "date limite pour envoyer les solutions" -#: participation/models.py:171 +#: participation/models.py:253 msgid "random draw for solutions" msgstr "tirage au sort des solutions" -#: participation/models.py:176 +#: participation/models.py:258 msgid "limit date to upload the syntheses for the first phase" msgstr "date limite pour envoyer les notes de synthèses pour la première phase" -#: participation/models.py:181 +#: participation/models.py:263 msgid "date when the solutions for the second round become available" msgstr "date à laquelle les solutions pour le second tour sont accessibles" -#: participation/models.py:186 +#: participation/models.py:268 msgid "limit date to upload the syntheses for the second phase" msgstr "date limite d'envoi des notes de synthèse pour la seconde phase" -#: participation/models.py:191 +#: participation/models.py:273 #: participation/templates/participation/tournament_detail.html:48 msgid "description" msgstr "description" -#: participation/models.py:197 +#: participation/models.py:279 #: participation/templates/participation/tournament_detail.html:12 msgid "organizers" msgstr "organisateur⋅rices" -#: participation/models.py:202 +#: participation/models.py:284 msgid "final" msgstr "finale" -#: participation/models.py:286 registration/admin.py:93 +#: participation/models.py:368 registration/admin.py:93 msgid "tournaments" msgstr "tournois" -#: participation/models.py:315 +#: participation/models.py:397 msgid "valid team" msgstr "équipe valide" -#: participation/models.py:316 +#: participation/models.py:398 msgid "The participation got the validation of the organizers." msgstr "La participation a été validée par les organisateur⋅rices." -#: participation/models.py:322 +#: participation/models.py:404 msgid "The team is selected for the final tournament." msgstr "L'équipe est sélectionnée pour la finale." -#: participation/models.py:329 +#: participation/models.py:411 #, python-brace-format msgid "Participation of the team {name} ({trigram})" msgstr "Participation de l'équipe {name} ({trigram})" -#: participation/models.py:333 participation/models.py:366 +#: participation/models.py:415 participation/models.py:448 msgid "participations" msgstr "participations" -#: participation/models.py:348 participation/models.py:349 +#: participation/models.py:430 participation/models.py:431 #, python-brace-format msgid "Round {round}" msgstr "Tour {round}" -#: participation/models.py:372 +#: participation/models.py:454 msgid "juries" msgstr "jurys" -#: participation/models.py:379 +#: participation/models.py:461 msgid "BigBlueButton URL" msgstr "Lien BigBlueButton" -#: participation/models.py:380 +#: participation/models.py:462 msgid "The link of the BBB visio for this pool." msgstr "Le lien du salon BBB pour cette poule." -#: participation/models.py:385 +#: participation/models.py:467 msgid "results available" msgstr "résultats disponibles" -#: participation/models.py:386 +#: participation/models.py:468 msgid "" "Check this case when results become accessible to teams. They stay " "accessible to you. Only averages are given." @@ -718,28 +786,28 @@ msgstr "" "Ils restent toujours accessibles pour vous. Seules les moyennes sont " "communiquées." -#: participation/models.py:406 +#: participation/models.py:488 #, python-brace-format msgid "Pool of day {round} for tournament {tournament} with teams {teams}" msgstr "Poule du jour {round} du tournoi {tournament} avec les équipes {teams}" -#: participation/models.py:426 +#: participation/models.py:508 msgid "position" msgstr "position" -#: participation/models.py:433 +#: participation/models.py:515 msgid "defended solution" msgstr "solution défendue" -#: participation/models.py:466 +#: participation/models.py:548 msgid "observer" msgstr "observateur⋅rice" -#: participation/models.py:471 +#: participation/models.py:553 msgid "penalties" msgstr "pénalités" -#: participation/models.py:473 +#: participation/models.py:555 msgid "" "Number of penalties for the defender. The defender will loose a 0.5 " "coefficient per penalty." @@ -747,124 +815,124 @@ msgstr "" "Nombre de pénalités pour l'équipe défenseuse. Elle perd un coefficient 0.5 " "sur sa présentation orale par pénalité." -#: participation/models.py:549 participation/models.py:552 -#: participation/models.py:555 participation/models.py:558 +#: participation/models.py:631 participation/models.py:634 +#: participation/models.py:637 participation/models.py:640 #, python-brace-format msgid "Team {trigram} is not registered in the pool." msgstr "L'équipe {trigram} n'est pas inscrite dans la poule." -#: participation/models.py:563 +#: participation/models.py:645 #, python-brace-format msgid "Passage of {defender} for problem {problem}" msgstr "Passage de {defender} pour le problème {problem}" -#: participation/models.py:567 participation/models.py:576 -#: participation/models.py:657 participation/models.py:699 +#: participation/models.py:649 participation/models.py:658 +#: participation/models.py:739 participation/models.py:781 msgid "passage" msgstr "passage" -#: participation/models.py:568 +#: participation/models.py:650 msgid "passages" msgstr "passages" -#: participation/models.py:587 +#: participation/models.py:669 msgid "difference" msgstr "différence" -#: participation/models.py:588 +#: participation/models.py:670 msgid "Score to add/remove on the final score" msgstr "Score à ajouter/retrancher au score final" -#: participation/models.py:595 +#: participation/models.py:677 msgid "tweak" msgstr "harmonisation" -#: participation/models.py:596 +#: participation/models.py:678 msgid "tweaks" msgstr "harmonisations" -#: participation/models.py:624 +#: participation/models.py:706 msgid "solution for the final tournament" msgstr "solution pour la finale" -#: participation/models.py:629 participation/models.py:668 +#: participation/models.py:711 participation/models.py:750 msgid "file" msgstr "fichier" -#: participation/models.py:635 +#: participation/models.py:717 #, python-brace-format msgid "Solution of team {team} for problem {problem}" msgstr "Solution de l'équipe {team} pour le problème {problem}" -#: participation/models.py:637 +#: participation/models.py:719 msgid "for final" msgstr "pour la finale" -#: participation/models.py:640 +#: participation/models.py:722 msgid "solution" msgstr "solution" -#: participation/models.py:641 +#: participation/models.py:723 msgid "solutions" msgstr "solutions" -#: participation/models.py:674 +#: participation/models.py:756 #, python-brace-format msgid "Synthesis of {team} as {type} for problem {problem} of {defender}" msgstr "" "Note de synthèse de l'équipe {team} en tant que {type} pour le problème " "{problem} de {defender}" -#: participation/models.py:682 +#: participation/models.py:764 msgid "synthesis" msgstr "note de synthèse" -#: participation/models.py:683 +#: participation/models.py:765 msgid "syntheses" msgstr "notes de synthèse" -#: participation/models.py:692 +#: participation/models.py:774 msgid "jury" msgstr "jury" -#: participation/models.py:704 +#: participation/models.py:786 msgid "defender writing note" msgstr "note d'écrit de la défense" -#: participation/models.py:710 +#: participation/models.py:792 msgid "defender oral note" msgstr "note d'oral de la défense" -#: participation/models.py:716 +#: participation/models.py:798 msgid "opponent writing note" msgstr "note d'écrit de l'opposition" -#: participation/models.py:722 +#: participation/models.py:804 msgid "opponent oral note" msgstr "note d'oral de l'opposition" -#: participation/models.py:728 +#: participation/models.py:810 msgid "reporter writing note" msgstr "note d'écrit du rapportage" -#: participation/models.py:734 +#: participation/models.py:816 msgid "reporter oral note" msgstr "note d'oral du rapportage" -#: participation/models.py:740 +#: participation/models.py:822 msgid "observer note" msgstr "note de l'observation" -#: participation/models.py:769 +#: participation/models.py:851 #, python-brace-format msgid "Notes of {jury} for {passage}" msgstr "Notes de {jury} pour le {passage}" -#: participation/models.py:776 +#: participation/models.py:858 msgid "note" msgstr "note" -#: participation/models.py:777 +#: participation/models.py:859 msgid "notes" msgstr "notes" @@ -1342,7 +1410,7 @@ msgid "Invalidate" msgstr "Invalider" #: participation/templates/participation/team_detail.html:186 -#: participation/views.py:333 +#: participation/views.py:325 msgid "Upload motivation letter" msgstr "Envoyer la lettre de motivation" @@ -1351,7 +1419,7 @@ msgid "Update team" msgstr "Modifier l'équipe" #: participation/templates/participation/team_detail.html:196 -#: participation/views.py:442 +#: participation/views.py:434 msgid "Leave team" msgstr "Quitter l'équipe" @@ -1485,7 +1553,7 @@ msgstr "Vous êtes déjà dans une équipe." msgid "Join team" msgstr "Rejoindre une équipe" -#: participation/views.py:152 participation/views.py:480 +#: participation/views.py:152 participation/views.py:472 msgid "You don't participate, so you don't have any team." msgstr "Vous ne participez pas, vous n'avez donc pas d'équipe." @@ -1494,17 +1562,17 @@ msgstr "Vous ne participez pas, vous n'avez donc pas d'équipe." msgid "Detail of team {trigram}" msgstr "Détails de l'équipe {trigram}" -#: participation/views.py:215 +#: participation/views.py:207 msgid "You don't participate, so you can't request the validation of the team." msgstr "" "Vous ne participez pas, vous ne pouvez pas demander la validation de " "l'équipe." -#: participation/views.py:218 +#: participation/views.py:210 msgid "The validation of the team is already done or pending." msgstr "La validation de l'équipe est déjà faite ou en cours." -#: participation/views.py:221 +#: participation/views.py:213 msgid "" "The team can't be validated: missing email address confirmations, " "authorizations, people, motivation letter or the tournament is not set." @@ -1513,103 +1581,103 @@ msgstr "" "d'adresse e-mail, soit une autorisation, soit des personnes, soit la lettre " "de motivation, soit le tournoi n'a pas été choisi." -#: participation/views.py:243 +#: participation/views.py:235 msgid "You are not an organizer of the tournament." msgstr "Vous n'êtes pas un⋅e organisateur⋅rice du tournoi." -#: participation/views.py:246 +#: participation/views.py:238 msgid "This team has no pending validation." msgstr "L'équipe n'a pas de validation en attente." -#: participation/views.py:276 +#: participation/views.py:268 msgid "You must specify if you validate the registration or not." msgstr "Vous devez spécifier si vous validez l'inscription ou non." -#: participation/views.py:311 +#: participation/views.py:303 #, python-brace-format msgid "Update team {trigram}" msgstr "Mise à jour de l'équipe {trigram}" -#: participation/views.py:372 participation/views.py:428 +#: participation/views.py:364 participation/views.py:420 #, python-brace-format msgid "Motivation letter of {team}.{ext}" msgstr "Lettre de motivation de {team}.{ext}" -#: participation/views.py:403 +#: participation/views.py:395 #, python-brace-format msgid "Photo authorization of {participant}.{ext}" msgstr "Autorisation de droit à l'image de {participant}.{ext}" -#: participation/views.py:409 +#: participation/views.py:401 #, python-brace-format msgid "Parental authorization of {participant}.{ext}" msgstr "Autorisation parentale de {participant}.{ext}" -#: participation/views.py:416 +#: participation/views.py:408 #, python-brace-format msgid "Health sheet of {participant}.{ext}" msgstr "Fiche sanitaire de {participant}.{ext}" -#: participation/views.py:422 +#: participation/views.py:414 #, python-brace-format msgid "Vaccine sheet of {participant}.{ext}" msgstr "Carnet de vaccination de {participant}.{ext}" -#: participation/views.py:432 +#: participation/views.py:424 #, python-brace-format msgid "Photo authorizations of team {trigram}.zip" msgstr "Autorisations de droit à l'image de l'équipe {trigram}.zip" -#: participation/views.py:450 +#: participation/views.py:442 msgid "The team is already validated or the validation is pending." msgstr "La validation de l'équipe est déjà faite ou en cours." -#: participation/views.py:494 +#: participation/views.py:486 msgid "The team is not validated yet." msgstr "L'équipe n'est pas encore validée." -#: participation/views.py:508 +#: participation/views.py:500 #, python-brace-format msgid "Participation of team {trigram}" msgstr "Participation de l'équipe {trigram}" -#: participation/views.py:644 +#: participation/views.py:636 msgid "You can't upload a solution after the deadline." msgstr "Vous ne pouvez pas envoyer de solution après la date limite." -#: participation/views.py:752 +#: participation/views.py:744 #, python-brace-format msgid "Solutions for pool {pool} of tournament {tournament}.zip" msgstr "Solutions pour la poule {pool} du tournoi {tournament}.zip" -#: participation/views.py:753 +#: participation/views.py:745 #, python-brace-format msgid "Syntheses for pool {pool} of tournament {tournament}.zip" msgstr "Notes de synthèses pour la poule {pool} du tournoi {tournament}.zip" -#: participation/views.py:771 +#: participation/views.py:763 #, python-brace-format msgid "Jurys of {pool}" msgstr "Juré⋅es de la {pool}" -#: participation/views.py:798 +#: participation/views.py:790 msgid "New TFJM² jury account" msgstr "Nouveau compte de juré⋅e pour le TFJM²" -#: participation/views.py:811 +#: participation/views.py:803 #, python-brace-format msgid "The jury {name} has been successfully added!" msgstr "{name} a été ajouté⋅e avec succès en tant que juré⋅e !" -#: participation/views.py:848 +#: participation/views.py:840 msgid "The following user is not registered as a jury:" msgstr "L'utilisateur⋅rice suivant n'est pas inscrit⋅e en tant que juré⋅e :" -#: participation/views.py:862 +#: participation/views.py:854 msgid "Notes were successfully uploaded." msgstr "Les notes ont bien été envoyées." -#: participation/views.py:1526 +#: participation/views.py:1518 msgid "You can't upload a synthesis after the deadline." msgstr "Vous ne pouvez pas envoyer de note de synthèse après la date limite." @@ -1635,7 +1703,7 @@ msgstr "rôle" msgid "participant" msgstr "participant⋅e" -#: registration/forms.py:25 registration/models.py:321 +#: registration/forms.py:25 registration/models.py:392 msgid "coach" msgstr "encadrant⋅e" @@ -1671,7 +1739,7 @@ msgstr "" "avez reçu par mail. Vous pouvez renvoyer un mail en cliquant sur ce lien." -#: registration/models.py:118 registration/models.py:374 +#: registration/models.py:118 registration/models.py:445 msgid "registration" msgstr "inscription" @@ -1744,79 +1812,145 @@ msgstr "" msgid "photo authorization" msgstr "autorisation de droit à l'image" -#: registration/models.py:223 +#: registration/models.py:225 +#, python-brace-format +msgid "" +"You are not in a team. You can create one or join an existing one to participate." +msgstr "" +"Vous n'avez pas d'équipe. Vous pouvez en créer une ou rejoindre une équipe existante pour " +"participer." + +#: registration/models.py:231 +msgid "No team" +msgstr "Pas d'équipe" + +#: registration/models.py:239 +#, python-brace-format +msgid "" +"You have not uploaded your photo authorization. You can do it by clicking on " +"this link." +msgstr "" +"Vous n'avez pas envoyé votre autorisation de droit à l'image. Vous pouvez le " +"faire en cliquant sur ce lien." + +#: registration/models.py:244 +msgid "Photo authorization" +msgstr "Autorisation de droit à l'image" + +#: registration/models.py:255 msgid "participant registration" msgstr "inscription de participant⋅e" -#: registration/models.py:224 +#: registration/models.py:256 msgid "participant registrations" msgstr "inscriptions de participant⋅es" -#: registration/models.py:233 +#: registration/models.py:265 msgid "birth date" msgstr "date de naissance" -#: registration/models.py:239 +#: registration/models.py:271 msgid "12th grade" msgstr "Terminale" -#: registration/models.py:240 +#: registration/models.py:272 msgid "11th grade" msgstr "Première" -#: registration/models.py:241 +#: registration/models.py:273 msgid "10th grade or lower" msgstr "Seconde ou inférieur" -#: registration/models.py:243 +#: registration/models.py:275 msgid "student class" msgstr "classe" -#: registration/models.py:248 +#: registration/models.py:280 msgid "school" msgstr "école" -#: registration/models.py:253 +#: registration/models.py:285 msgid "responsible name" msgstr "nom d'un⋅e responsable légal⋅e" -#: registration/models.py:258 +#: registration/models.py:290 msgid "responsible phone number" msgstr "numéro de téléphone d'un⋅e responsable légal⋅e" -#: registration/models.py:263 +#: registration/models.py:295 msgid "responsible email address" msgstr "adresse e-mail d'un⋅e responsable légal⋅e" -#: registration/models.py:268 +#: registration/models.py:300 msgid "parental authorization" msgstr "autorisation parentale" -#: registration/models.py:275 +#: registration/models.py:307 msgid "health sheet" msgstr "fiche sanitaire" -#: registration/models.py:282 +#: registration/models.py:314 msgid "vaccine sheet" msgstr "carnet de vaccination" -#: registration/models.py:290 +#: registration/models.py:322 msgid "student" -msgstr "étudiant⋅e" +msgstr "élève" -#: registration/models.py:298 +#: registration/models.py:333 +#, python-brace-format +msgid "" +"You have not uploaded your parental authorization. You can do it by clicking " +"on this link." +msgstr "" +"Vous n'avez pas envoyé votre autorisation parentale. Vous pouvez le faire en " +"cliquant sur ce lien." + +#: registration/models.py:338 +msgid "Parental authorization" +msgstr "Autorisation parentale" + +#: registration/models.py:344 +#, python-brace-format +msgid "" +"You have not uploaded your health sheet. You can do it by clicking on this link." +msgstr "" +"Vous n'avez pas envoyé votre fiche sanitaire. Vous pouvez le faire en " +"cliquant sur ce lien." + +#: registration/models.py:349 +msgid "Health sheet" +msgstr "Fiche sanitaire" + +#: registration/models.py:355 +#, python-brace-format +msgid "" +"You have not uploaded your vaccine sheet. You can do it by clicking on this link." +msgstr "" +"Vous n'avez pas envoyé votre carnet de vaccination. Vous pouvez le faire en " +"cliquant sur ce lien." + +#: registration/models.py:360 +msgid "Vaccine sheet" +msgstr "Carnet de vaccination" + +#: registration/models.py:369 msgid "student registration" msgstr "inscription d'élève" -#: registration/models.py:299 +#: registration/models.py:370 msgid "student registrations" msgstr "inscriptions d'élève" -#: registration/models.py:310 +#: registration/models.py:381 msgid "most recent degree in mathematics, computer science or physics" msgstr "Dernier diplôme obtenu en mathématiques, informatique ou physique" -#: registration/models.py:311 +#: registration/models.py:382 msgid "" "Your most recent degree in maths, computer science or physics, or your last " "entrance exam (CAPES, Agrégation,…)" @@ -1824,23 +1958,23 @@ msgstr "" "Votre dernier diplôme en mathématiques, informatique ou physique, ou votre " "dernier concours obtenu (CAPES, Agrégation, …)" -#: registration/models.py:316 registration/models.py:338 +#: registration/models.py:387 registration/models.py:409 msgid "professional activity" msgstr "activité professionnelle" -#: registration/models.py:329 +#: registration/models.py:400 msgid "coach registration" msgstr "inscription d'encadrant⋅e" -#: registration/models.py:330 +#: registration/models.py:401 msgid "coach registrations" msgstr "inscriptions d'encadrant⋅es" -#: registration/models.py:342 +#: registration/models.py:413 msgid "administrator" msgstr "administrateur⋅rice" -#: registration/models.py:343 +#: registration/models.py:414 msgid "" "An administrator has all rights. Please don't give this right to all juries " "and volunteers." @@ -1848,76 +1982,76 @@ msgstr "" "Un⋅e administrateur⋅rice a tous les droits. Merci de ne pas donner ce droit " "à toustes les juré⋅es et bénévoles." -#: registration/models.py:353 +#: registration/models.py:424 msgid "admin" msgstr "admin" -#: registration/models.py:353 +#: registration/models.py:424 msgid "volunteer" msgstr "bénévole" -#: registration/models.py:361 +#: registration/models.py:432 msgid "volunteer registration" msgstr "inscription de bénévole" -#: registration/models.py:362 +#: registration/models.py:433 msgid "volunteer registrations" msgstr "inscriptions de bénévoles" -#: registration/models.py:378 +#: registration/models.py:449 msgid "type" msgstr "type" -#: registration/models.py:381 +#: registration/models.py:452 msgid "No payment" msgstr "Pas de paiement" -#: registration/models.py:383 +#: registration/models.py:454 msgid "Scholarship" msgstr "Notification de bourse" -#: registration/models.py:384 +#: registration/models.py:455 msgid "Bank transfer" msgstr "Virement bancaire" -#: registration/models.py:385 +#: registration/models.py:456 msgid "Other (please indicate)" msgstr "Autre (veuillez spécifier)" -#: registration/models.py:386 +#: registration/models.py:457 msgid "The tournament is free" msgstr "Le tournoi est gratuit" -#: registration/models.py:393 +#: registration/models.py:464 msgid "scholarship file" msgstr "Notification de bourse" -#: registration/models.py:394 +#: registration/models.py:465 msgid "only if you have a scholarship." msgstr "Nécessaire seulement si vous déclarez être boursier." -#: registration/models.py:401 +#: registration/models.py:472 msgid "additional information" msgstr "informations additionnelles" -#: registration/models.py:402 +#: registration/models.py:473 msgid "To help us to find your payment." msgstr "Pour nous aider à retrouver votre paiement, si nécessaire." -#: registration/models.py:408 +#: registration/models.py:479 msgid "payment valid" msgstr "paiement valide" -#: registration/models.py:417 +#: registration/models.py:488 #, python-brace-format msgid "Payment of {registration}" msgstr "Paiement de {registration}" -#: registration/models.py:420 +#: registration/models.py:491 msgid "payment" msgstr "paiement" -#: registration/models.py:421 +#: registration/models.py:492 msgid "payments" msgstr "paiements" @@ -2090,7 +2224,7 @@ msgid "" "your scholarship attestation." msgstr "" "Le prix du tournoi est de %(price)s €. Les frais de participation sont " -"offerts pour les encadrant⋅es et les étudiant⋅es boursièr⋅es. Si c'est le " +"offerts pour les encadrant⋅es et les élèves boursièr⋅es. Si c'est le " "cas, merci de nous transmettre votre notification de bourse." #: registration/templates/registration/payment_form.html:17 @@ -2215,7 +2349,7 @@ msgstr "Contraintes de logement :" #: registration/templates/registration/user_detail.html:66 msgid "Photo authorization:" -msgstr "Autorisation de droit à l'image" +msgstr "Autorisation de droit à l'image :" #: registration/templates/registration/user_detail.html:79 msgid "Health sheet:" diff --git a/participation/models.py b/participation/models.py index a3fad87..cf066fa 100644 --- a/participation/models.py +++ b/participation/models.py @@ -66,6 +66,88 @@ class Team(models.Model): def coaches(self): return self.participants.filter(coachregistration__isnull=False) + def can_validate(self): + if self.students.count() < 4: + return False + if not self.coaches.exists(): + return False + if not self.participation.tournament: + return False + if any(not r.photo_authorization for r in self.participants.all()): + return False + if not self.motivation_letter: + return False + if not self.participation.tournament.remote: + if any(r.under_18 and not r.health_sheet for r in self.students.all()): + return False + if any(r.under_18 and not r.vaccine_sheet for r in self.students.all()): + return False + if any(r.under_18 and not r.parental_authorization for r in self.students.all()): + return False + return True + + def important_informations(self): + informations = [] + + if self.participation.valid is None: + if not self.participation.tournament: + text = _("The team is not registered to any tournament. " + "You can register the team to a tournament using this link.") + url = reverse_lazy("participation:update_team", args=(self.pk,)) + content = format_lazy(text, url=url) + informations.append({ + 'title': _("No tournament"), + 'type': "danger", + 'priority': 4, + 'content': content, + }) + elif not self.motivation_letter: + text = _("The team has not uploaded a motivation letter. " + "You can upload your motivation letter using this link.") + url = reverse_lazy("participation:upload_team_motivation_letter", args=(self.pk,)) + content = format_lazy(text, url=url) + informations.append({ + 'title': _("No motivation letter"), + 'type': "danger", + 'priority': 10, + 'content': content, + }) + + if (nb_students := self.students.count()) < 4: + text = _("The team has less than 4 students ({nb_students})." + "You can invite more students to join the team using the invite code {code}.") + content = format_lazy(text, nb_students=nb_students, code=self.access_code) + informations.append({ + 'title': _("Not enough students"), + 'type': "warning", + 'priority': 7, + 'content': content, + }) + + if not self.coaches.exists(): + text = _("The team has no coach." + "You can invite a coach to join the team using the invite code {code}.") + content = format_lazy(text, nb_students=nb_students, code=self.access_code) + informations.append({ + 'title': _("No coach"), + 'type': "warning", + 'priority': 8, + 'content': content, + }) + + if (nb_students := self.students.count()) > 6 or self.coaches.count() > 2: + text = _("The team has more than 6 students ({nb_students}) or more than 2 coaches ({nb_coaches})." + "You have to restrict the number of students and coaches to 6 and 2, respectively.") + content = format_lazy(text, nb_students=nb_students, nb_coaches=self.coaches.count()) + informations.append({ + 'title': _("Too many members"), + 'type': "warning", + 'priority': 7, + 'content': content, + }) + + return informations + @property def email(self): """ diff --git a/participation/views.py b/participation/views.py index b0432a6..98961e8 100644 --- a/participation/views.py +++ b/participation/views.py @@ -180,15 +180,7 @@ class TeamDetailView(LoginRequiredMixin, FormMixin, ProcessFormView, DetailView) context["validation_form"] = ValidateParticipationForm(self.request.POST or None) # A team is complete when there are at least 4 members plus a coache that have sent their authorizations, # their health sheet, they confirmed their email address and under-18 people sent their parental authorization. - # TODO: Add vaccine sheets - context["can_validate"] = team.students.count() >= 4 and team.coaches.exists() and \ - team.participation.tournament and \ - all(r.photo_authorization for r in team.participants.all()) and \ - (team.participation.tournament.remote - or all(r.health_sheet for r in team.students.all() if r.under_18)) and \ - (team.participation.tournament.remote - or all(r.parental_authorization for r in team.students.all() if r.under_18)) and \ - team.motivation_letter + context["can_validate"] = team.can_validate() return context diff --git a/registration/models.py b/registration/models.py index 36d9cda..4df878d 100644 --- a/registration/models.py +++ b/registration/models.py @@ -219,6 +219,38 @@ class ParticipantRegistration(Registration): def form_class(self): # pragma: no cover raise NotImplementedError + def registration_informations(self): + informations = [] + if not self.team: + text = _("You are not in a team. You can create one " + "or join an existing one to participate.") + create_url = reverse_lazy("participation:create_team") + join_url = reverse_lazy("participation:join_team") + content = format_lazy(text, create_url=create_url, join_url=join_url) + informations.append({ + 'title': _("No team"), + 'type': "danger", + 'priority': 1, + 'content': content, + }) + else: + if self.team.participation.tournament: + if not self.photo_authorization: + text = _("You have not uploaded your photo authorization. " + "You can do it by clicking on this link.") + photo_url = reverse_lazy("registration:upload_user_photo_authorization", args=(self.id,)) + content = format_lazy(text, photo_url=photo_url) + informations.append({ + 'title': _("Photo authorization"), + 'type': "danger", + 'priority': 5, + 'content': content, + }) + + informations.extend(self.team.important_informations()) + + return informations + class Meta: verbose_name = _("participant registration") verbose_name_plural = _("participant registrations") @@ -294,6 +326,45 @@ class StudentRegistration(ParticipantRegistration): from registration.forms import StudentRegistrationForm return StudentRegistrationForm + def registration_informations(self): + informations = super().registration_informations() + if self.team and self.team.participation.tournament and self.under_18: + if not self.parental_authorization: + text = _("You have not uploaded your parental authorization. " + "You can do it by clicking on this link.") + parental_url = reverse_lazy("registration:upload_user_parental_authorization", args=(self.id,)) + content = format_lazy(text, parental_url=parental_url) + informations.append({ + 'title': _("Parental authorization"), + 'type': "danger", + 'priority': 5, + 'content': content, + }) + if not self.health_sheet: + text = _("You have not uploaded your health sheet. " + "You can do it by clicking on this link.") + health_url = reverse_lazy("registration:upload_user_health_sheet", args=(self.id,)) + content = format_lazy(text, health_url=health_url) + informations.append({ + 'title': _("Health sheet"), + 'type': "danger", + 'priority': 5, + 'content': content, + }) + if not self.vaccine_sheet: + text = _("You have not uploaded your vaccine sheet. " + "You can do it by clicking on this link.") + vaccine_url = reverse_lazy("registration:upload_user_vaccine_sheet", args=(self.id,)) + content = format_lazy(text, vaccine_url=vaccine_url) + informations.append({ + 'title': _("Vaccine sheet"), + 'type': "danger", + 'priority': 5, + 'content': content, + }) + + return informations + class Meta: verbose_name = _("student registration") verbose_name_plural = _("student registrations") diff --git a/tfjm/templates/sidebar.html b/tfjm/templates/sidebar.html index dd1ab0a..7811b99 100644 --- a/tfjm/templates/sidebar.html +++ b/tfjm/templates/sidebar.html @@ -7,11 +7,11 @@
{% for information in user.registration.important_informations %} -
+
-

{{ information.title }}

+
{{ information.title }}
-
+
{{ information.content|safe }}