From 2627b3a9b89ac4d7d8144a1cb145214505189276 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Thu, 13 Jun 2024 10:57:51 +0200 Subject: [PATCH] Add migrations for ETEAM Signed-off-by: Emmy D'Anello --- ...number_alter_teamdraw_accepted_and_more.py | 69 ++++ draw/models.py | 2 +- locale/fr/LC_MESSAGES/django.po | 311 +++++++++--------- ...lution_number_alter_pool_round_and_more.py | 77 +++++ participation/models.py | 10 +- 5 files changed, 306 insertions(+), 163 deletions(-) create mode 100644 draw/migrations/0005_alter_round_number_alter_teamdraw_accepted_and_more.py create mode 100644 participation/migrations/0017_alter_passage_solution_number_alter_pool_round_and_more.py diff --git a/draw/migrations/0005_alter_round_number_alter_teamdraw_accepted_and_more.py b/draw/migrations/0005_alter_round_number_alter_teamdraw_accepted_and_more.py new file mode 100644 index 0000000..d044feb --- /dev/null +++ b/draw/migrations/0005_alter_round_number_alter_teamdraw_accepted_and_more.py @@ -0,0 +1,69 @@ +# Generated by Django 5.0.6 on 2024-06-13 08:53 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("draw", "0004_alter_round_number"), + ] + + operations = [ + migrations.AlterField( + model_name="round", + name="number", + field=models.PositiveSmallIntegerField( + choices=[(1, "Round 1"), (2, "Round 2"), (3, "Round 3")], + help_text="The number of the round, 1 or 2 (or 3 for ETEAM)", + validators=[ + django.core.validators.MinValueValidator(1), + django.core.validators.MaxValueValidator(3), + ], + verbose_name="number", + ), + ), + migrations.AlterField( + model_name="teamdraw", + name="accepted", + field=models.PositiveSmallIntegerField( + choices=[ + (1, "Problem #1"), + (2, "Problem #2"), + (3, "Problem #3"), + (4, "Problem #4"), + (5, "Problem #5"), + (6, "Problem #6"), + (7, "Problem #7"), + (8, "Problem #8"), + (9, "Problem #9"), + (10, "Problem #10"), + ], + default=None, + null=True, + verbose_name="accepted problem", + ), + ), + migrations.AlterField( + model_name="teamdraw", + name="purposed", + field=models.PositiveSmallIntegerField( + choices=[ + (1, "Problem #1"), + (2, "Problem #2"), + (3, "Problem #3"), + (4, "Problem #4"), + (5, "Problem #5"), + (6, "Problem #6"), + (7, "Problem #7"), + (8, "Problem #8"), + (9, "Problem #9"), + (10, "Problem #10"), + ], + default=None, + null=True, + verbose_name="purposed problem", + ), + ), + ] diff --git a/draw/models.py b/draw/models.py index deb38c2..0e9ec0e 100644 --- a/draw/models.py +++ b/draw/models.py @@ -193,7 +193,7 @@ class Round(models.Model): choices=[ (1, _('Round 1')), (2, _('Round 2')), - ] + ([] if settings.NB_ROUNDS == 2 else [(3, _('Round 3'))]), + (3, _('Round 3'))], verbose_name=_('number'), help_text=_("The number of the round, 1 or 2 (or 3 for ETEAM)"), validators=[MinValueValidator(1), MaxValueValidator(settings.NB_ROUNDS)], diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index ce470f3..c55d813 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-06-08 00:37+0200\n" +"POT-Creation-Date: 2024-06-13 10:56+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Emmy D'Anello \n" "Language-Team: LANGUAGE \n" @@ -37,7 +37,7 @@ msgstr "Canaux d'équipes" msgid "Private channels" msgstr "Messages privés" -#: chat/models.py:29 participation/models.py:36 participation/models.py:266 +#: chat/models.py:29 participation/models.py:36 participation/models.py:272 #: participation/tables.py:18 participation/tables.py:34 msgid "name" msgstr "nom" @@ -78,8 +78,8 @@ msgstr "Type de permission nécessaire pour écrire un message dans un canal." #: chat/models.py:62 draw/admin.py:53 draw/admin.py:71 draw/admin.py:88 #: draw/models.py:26 participation/admin.py:79 participation/admin.py:140 -#: participation/admin.py:171 participation/models.py:721 -#: participation/models.py:745 participation/models.py:1006 +#: participation/admin.py:171 participation/models.py:727 +#: participation/models.py:751 participation/models.py:1012 #: registration/models.py:763 #: registration/templates/registration/payment_form.html:53 msgid "tournament" @@ -95,7 +95,7 @@ msgstr "" #: chat/models.py:73 draw/models.py:429 draw/models.py:456 #: participation/admin.py:136 participation/admin.py:155 -#: participation/models.py:1509 participation/models.py:1518 +#: participation/models.py:1515 participation/models.py:1524 #: participation/tables.py:84 msgid "pool" msgstr "poule" @@ -108,8 +108,8 @@ msgstr "" "concernée." #: chat/models.py:84 draw/templates/draw/tournament_content.html:277 -#: participation/admin.py:167 participation/models.py:255 -#: participation/models.py:736 +#: participation/admin.py:167 participation/models.py:261 +#: participation/models.py:742 #: participation/templates/participation/tournament_harmonize.html:15 #: registration/models.py:158 registration/models.py:754 #: registration/tables.py:39 @@ -259,13 +259,13 @@ msgid "Log in" msgstr "Connexion" #: draw/admin.py:39 draw/admin.py:57 draw/admin.py:75 -#: participation/admin.py:109 participation/models.py:256 +#: participation/admin.py:109 participation/models.py:262 #: participation/tables.py:88 msgid "teams" msgstr "équipes" #: draw/admin.py:92 draw/models.py:234 draw/models.py:448 -#: participation/models.py:1010 +#: participation/models.py:1016 msgid "round" msgstr "tour" @@ -407,7 +407,7 @@ msgstr "La poule en cours, où les équipes choisissent leurs problèmes" msgid "rounds" msgstr "tours" -#: draw/models.py:257 participation/models.py:1018 +#: draw/models.py:257 participation/models.py:1024 msgid "letter" msgstr "lettre" @@ -445,12 +445,12 @@ msgstr "L'instance complète de la poule." msgid "Pool {letter}{number}" msgstr "Poule {letter}{number}" -#: draw/models.py:430 participation/models.py:1510 +#: draw/models.py:430 participation/models.py:1516 msgid "pools" msgstr "poules" -#: draw/models.py:442 participation/models.py:996 participation/models.py:1659 -#: participation/models.py:1689 participation/models.py:1731 +#: draw/models.py:442 participation/models.py:1002 participation/models.py:1665 +#: participation/models.py:1695 participation/models.py:1737 msgid "participation" msgstr "participation" @@ -474,8 +474,8 @@ msgid "" msgstr "" "L'ordre de choix dans la poule, entre 0 et la taille de la poule moins 1." -#: draw/models.py:479 draw/models.py:502 participation/models.py:1532 -#: participation/models.py:1696 +#: draw/models.py:479 draw/models.py:502 participation/models.py:1538 +#: participation/models.py:1702 #, python-brace-format msgid "Problem #{problem}" msgstr "Problème n°{problem}" @@ -686,26 +686,26 @@ msgstr "Changelog de type \"{action}\" pour le modèle {model} le {timestamp}" msgid "valid" msgstr "valide" -#: participation/admin.py:87 participation/models.py:757 +#: participation/admin.py:87 participation/models.py:763 msgid "selected for final" msgstr "sélectionnée pour la finale" #: participation/admin.py:124 participation/admin.py:183 -#: participation/models.py:1539 participation/tables.py:112 +#: participation/models.py:1545 participation/tables.py:112 msgid "defender" msgstr "défenseur⋅se" -#: participation/admin.py:128 participation/models.py:1546 -#: participation/models.py:1743 +#: participation/admin.py:128 participation/models.py:1552 +#: participation/models.py:1749 msgid "opponent" msgstr "opposant⋅e" -#: participation/admin.py:132 participation/models.py:1553 -#: participation/models.py:1744 +#: participation/admin.py:132 participation/models.py:1559 +#: participation/models.py:1750 msgid "reporter" msgstr "rapporteur⋅rice" -#: participation/admin.py:187 participation/models.py:1694 +#: participation/admin.py:187 participation/models.py:1700 msgid "problem" msgstr "numéro de problème" @@ -952,134 +952,139 @@ msgstr "" msgid "Pending validation" msgstr "Validation en attente" -#: participation/models.py:252 +#: participation/models.py:241 +#, python-brace-format +msgid "The team code must be composed of {nb_letters} uppercase letters." +msgstr "Le code d'équipe doit être composé de {nb_letters} lettres majuscules." + +#: participation/models.py:258 #, python-brace-format msgid "Team {name} ({trigram})" msgstr "Équipe {name} ({trigram})" -#: participation/models.py:271 +#: participation/models.py:277 msgid "start" msgstr "début" -#: participation/models.py:276 +#: participation/models.py:282 msgid "end" msgstr "fin" -#: participation/models.py:282 +#: participation/models.py:288 #: participation/templates/participation/tournament_detail.html:18 msgid "place" msgstr "lieu" -#: participation/models.py:286 +#: participation/models.py:292 msgid "max team count" msgstr "nombre maximal d'équipes" -#: participation/models.py:291 +#: participation/models.py:297 #: participation/templates/participation/tournament_detail.html:22 msgid "price" msgstr "prix" -#: participation/models.py:296 +#: participation/models.py:302 #: participation/templates/participation/tournament_detail.html:26 msgid "remote" msgstr "à distance" -#: participation/models.py:301 +#: participation/models.py:307 msgid "limit date for registrations" msgstr "date limite d'inscription" -#: participation/models.py:306 +#: participation/models.py:312 msgid "limit date to upload solutions" msgstr "date limite pour envoyer les solutions" -#: participation/models.py:311 +#: participation/models.py:317 msgid "random draw for solutions" msgstr "tirage au sort des solutions" -#: participation/models.py:316 +#: participation/models.py:322 msgid "first phase date" msgstr "date du premier tour" -#: participation/models.py:321 +#: participation/models.py:327 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:326 +#: participation/models.py:332 msgid "first second date" msgstr "date du second tour" -#: participation/models.py:331 +#: participation/models.py:337 msgid "check this case when solutions for the second round become available" msgstr "" "cocher la case lorsque les solutions pour le second tour sont accessibles" -#: participation/models.py:336 +#: participation/models.py:342 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:341 +#: participation/models.py:347 msgid "third phase date" msgstr "date du troisième tour" -#: participation/models.py:346 +#: participation/models.py:352 msgid "check this case when solutions for the third round become available" msgstr "" "cocher la case lorsque les solutions pour le second tour sont accessibles" -#: participation/models.py:351 +#: participation/models.py:357 msgid "limit date to upload the syntheses for the third phase" msgstr "" "date limite pour envoyer les notes de synthèses pour la troisième phase" -#: participation/models.py:356 +#: participation/models.py:362 #: participation/templates/participation/tournament_detail.html:52 msgid "description" msgstr "description" -#: participation/models.py:362 +#: participation/models.py:368 #: participation/templates/participation/tournament_detail.html:12 msgid "organizers" msgstr "organisateur⋅rices" -#: participation/models.py:367 +#: participation/models.py:373 #: participation/templates/participation/team_detail.html:167 msgid "final" msgstr "finale" -#: participation/models.py:375 +#: participation/models.py:381 msgid "Google Sheet ID" msgstr "ID de la feuille Google Sheets" -#: participation/models.py:722 registration/admin.py:125 +#: participation/models.py:728 registration/admin.py:125 msgid "tournaments" msgstr "tournois" -#: participation/models.py:751 +#: participation/models.py:757 msgid "valid team" msgstr "équipe valide" -#: participation/models.py:752 +#: participation/models.py:758 msgid "The participation got the validation of the organizers." msgstr "La participation a été validée par les organisateur⋅rices." -#: participation/models.py:758 +#: participation/models.py:764 msgid "The team is selected for the final tournament." msgstr "L'équipe est sélectionnée pour la finale." -#: participation/models.py:762 +#: participation/models.py:768 msgid "mention" msgstr "mention" -#: participation/models.py:769 +#: participation/models.py:775 msgid "mention (final)" msgstr "Mention (pour la finale) :" -#: participation/models.py:779 +#: participation/models.py:785 #, python-brace-format msgid "Participation of the team {name} ({trigram})" msgstr "Participation de l'équipe {name} ({trigram})" -#: participation/models.py:786 +#: participation/models.py:792 #, python-brace-format msgid "" "

The team {trigram} has {nb_missing_payments} missing payments. Each " @@ -1092,11 +1097,11 @@ msgstr "" "notification de bourse) pour participer au tournoi.

Les participant⋅es " "qui n'ont pas encore payé sont : {participants}.

" -#: participation/models.py:794 +#: participation/models.py:800 msgid "Missing payments" msgstr "Paiements manquants" -#: participation/models.py:811 +#: participation/models.py:817 msgid "" "

The solutions for the tournament of {tournament} are due on the {date:%Y-" "%m-%d %H:%M}.

You have currently sent {nb_solutions} " @@ -1111,11 +1116,11 @@ msgstr "" "pouvez envoyer vos solutions sur votre page de " "participation.

" -#: participation/models.py:821 participation/models.py:835 +#: participation/models.py:827 participation/models.py:841 msgid "Solutions due" msgstr "Rendu des solutions" -#: participation/models.py:827 +#: participation/models.py:833 msgid "" "

The solutions for the tournament of {tournament} are due on the {date:%Y-" "%m-%d %H:%M}.

Remember that you can only fix minor changes to your " @@ -1128,7 +1133,7 @@ msgstr "" "parties.

Vous pouvez envoyer vos solutions sur votre " "page de participation.

" -#: participation/models.py:841 registration/models.py:607 +#: participation/models.py:847 registration/models.py:607 msgid "" "

The draw of the solutions for the tournament {tournament} is planned on " "the {date:%Y-%m-%d %H:%M}. You can join it on this link." @@ -1138,11 +1143,11 @@ msgstr "" "{date:%d/%m/%Y %H:%M}. Vous pouvez y participer sur ce lien.

" -#: participation/models.py:847 registration/models.py:614 +#: participation/models.py:853 registration/models.py:614 msgid "Draw of solutions" msgstr "Tirage au sort des solutions" -#: participation/models.py:857 +#: participation/models.py:863 #, python-brace-format msgid "" "

The solutions draw is ended. You can check the result on votre solution du problème " "{problem}.

" -#: participation/models.py:866 participation/models.py:908 -#: participation/models.py:951 +#: participation/models.py:872 participation/models.py:914 +#: participation/models.py:957 #, python-brace-format msgid "" "

You will oppose the solution of the team {opponent} on the problème {problem}. Vous pouvez envoyer votre note " "de synthèse sur cette page.

" -#: participation/models.py:875 participation/models.py:917 -#: participation/models.py:960 +#: participation/models.py:881 participation/models.py:923 +#: participation/models.py:966 #, python-brace-format msgid "" "

You will report the solution of the team {reporter} on the problème {problem}. Vous pouvez envoyer votre note " "de synthèse sur cette page.

" -#: participation/models.py:891 registration/models.py:629 +#: participation/models.py:897 registration/models.py:629 msgid "First round" msgstr "Premier tour" -#: participation/models.py:901 +#: participation/models.py:907 #, python-brace-format msgid "" "

For the second round, you will defend your " @@ -1191,12 +1196,12 @@ msgstr "" "

Pour le second tour, vous défendrez votre " "solution du problème {problem}.

" -#: participation/models.py:933 participation/models.py:976 +#: participation/models.py:939 participation/models.py:982 #: registration/models.py:640 msgid "Second round" msgstr "Second tour" -#: participation/models.py:944 +#: participation/models.py:950 #, python-brace-format msgid "" "

For the third round, you will defend your " @@ -1205,7 +1210,7 @@ msgstr "" "

Pour le troisième tour, vous défendrez votre " "solution du problème {problem}.

" -#: participation/models.py:982 +#: participation/models.py:988 #, python-brace-format msgid "" "

The tournament {tournament} is ended. You can check the results on the Le tournoi {tournament} est terminé. Vous pouvez consulter les résultats " "sur la page du tournoi.

" -#: participation/models.py:987 +#: participation/models.py:993 msgid "Tournament ended" msgstr "Tournoi terminé" -#: participation/models.py:997 participation/models.py:1040 +#: participation/models.py:1003 participation/models.py:1046 msgid "participations" msgstr "participations" -#: participation/models.py:1012 participation/models.py:1013 -#: participation/models.py:1014 +#: participation/models.py:1018 participation/models.py:1019 +#: participation/models.py:1020 #, python-brace-format msgid "Round {round}" msgstr "Tour {round}" -#: participation/models.py:1028 +#: participation/models.py:1034 msgid "room" msgstr "salle" -#: participation/models.py:1030 +#: participation/models.py:1036 msgid "Room 1" msgstr "Salle 1" -#: participation/models.py:1031 +#: participation/models.py:1037 msgid "Room 2" msgstr "Salle 2" -#: participation/models.py:1034 +#: participation/models.py:1040 msgid "For 5-teams pools only" msgstr "Pour les poules de 5 équipe uniquement" -#: participation/models.py:1046 +#: participation/models.py:1052 msgid "juries" msgstr "jurys" -#: participation/models.py:1055 +#: participation/models.py:1061 msgid "president of the jury" msgstr "président⋅e du jury" -#: participation/models.py:1062 +#: participation/models.py:1068 msgid "BigBlueButton URL" msgstr "Lien BigBlueButton" -#: participation/models.py:1063 +#: participation/models.py:1069 msgid "The link of the BBB visio for this pool." msgstr "Le lien du salon BBB pour cette poule." -#: participation/models.py:1068 +#: participation/models.py:1074 msgid "results available" msgstr "résultats disponibles" -#: participation/models.py:1069 +#: participation/models.py:1075 msgid "" "Check this case when results become accessible to teams. They stay " "accessible to you. Only averages are given." @@ -1273,33 +1278,33 @@ msgstr "" "Ils restent toujours accessibles pour vous. Seules les moyennes sont " "communiquées." -#: participation/models.py:1101 +#: participation/models.py:1107 msgid "The president of the jury must be part of the jury." msgstr "Læ président⋅e du jury doit faire partie du jury." -#: participation/models.py:1490 +#: participation/models.py:1496 #, python-brace-format msgid "The jury {jury} is not part of the jury for this pool." msgstr "{jury} ne fait pas partie du jury pour cette poule." -#: participation/models.py:1503 +#: participation/models.py:1509 #, python-brace-format msgid "Pool {code} for tournament {tournament} with teams {teams}" msgstr "Poule {code} du tournoi {tournament} avec les équipes {teams}" -#: participation/models.py:1523 +#: participation/models.py:1529 msgid "position" msgstr "position" -#: participation/models.py:1530 +#: participation/models.py:1536 msgid "defended solution" msgstr "solution défendue" -#: participation/models.py:1558 +#: participation/models.py:1564 msgid "penalties" msgstr "pénalités" -#: participation/models.py:1560 +#: participation/models.py:1566 msgid "" "Number of penalties for the defender. The defender will loose a 0.5 " "coefficient per penalty." @@ -1307,120 +1312,120 @@ 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:1629 participation/models.py:1632 -#: participation/models.py:1635 +#: participation/models.py:1635 participation/models.py:1638 +#: participation/models.py:1641 #, 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:1640 +#: participation/models.py:1646 #, python-brace-format msgid "Passage of {defender} for problem {problem}" msgstr "Passage de {defender} pour le problème {problem}" -#: participation/models.py:1644 participation/models.py:1653 -#: participation/models.py:1738 participation/models.py:1780 +#: participation/models.py:1650 participation/models.py:1659 +#: participation/models.py:1744 participation/models.py:1786 msgid "passage" msgstr "passage" -#: participation/models.py:1645 +#: participation/models.py:1651 msgid "passages" msgstr "passages" -#: participation/models.py:1664 +#: participation/models.py:1670 msgid "difference" msgstr "différence" -#: participation/models.py:1665 +#: participation/models.py:1671 msgid "Score to add/remove on the final score" msgstr "Score à ajouter/retrancher au score final" -#: participation/models.py:1672 +#: participation/models.py:1678 msgid "tweak" msgstr "harmonisation" -#: participation/models.py:1673 +#: participation/models.py:1679 msgid "tweaks" msgstr "harmonisations" -#: participation/models.py:1701 +#: participation/models.py:1707 msgid "solution for the final tournament" msgstr "solution pour la finale" -#: participation/models.py:1706 participation/models.py:1749 +#: participation/models.py:1712 participation/models.py:1755 msgid "file" msgstr "fichier" -#: participation/models.py:1716 +#: participation/models.py:1722 #, 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:1718 +#: participation/models.py:1724 msgid "for final" msgstr "pour la finale" -#: participation/models.py:1721 +#: participation/models.py:1727 msgid "solution" msgstr "solution" -#: participation/models.py:1722 +#: participation/models.py:1728 msgid "solutions" msgstr "solutions" -#: participation/models.py:1755 +#: participation/models.py:1761 #, 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:1763 +#: participation/models.py:1769 msgid "synthesis" msgstr "note de synthèse" -#: participation/models.py:1764 +#: participation/models.py:1770 msgid "syntheses" msgstr "notes de synthèse" -#: participation/models.py:1773 +#: participation/models.py:1779 msgid "jury" msgstr "jury" -#: participation/models.py:1785 +#: participation/models.py:1791 msgid "defender writing note" msgstr "note d'écrit défenseur⋅se" -#: participation/models.py:1791 +#: participation/models.py:1797 msgid "defender oral note" msgstr "note d'oral défenseur⋅se" -#: participation/models.py:1797 +#: participation/models.py:1803 msgid "opponent writing note" msgstr "note d'écrit opposant⋅e" -#: participation/models.py:1803 +#: participation/models.py:1809 msgid "opponent oral note" msgstr "note d'oral opposant⋅e" -#: participation/models.py:1809 +#: participation/models.py:1815 msgid "reporter writing note" msgstr "note d'écrit rapporteur⋅rice" -#: participation/models.py:1815 +#: participation/models.py:1821 msgid "reporter oral note" msgstr "note d'oral du rapporteur⋅rice" -#: participation/models.py:1875 +#: participation/models.py:1881 #, python-brace-format msgid "Notes of {jury} for {passage}" msgstr "Notes de {jury} pour le {passage}" -#: participation/models.py:1878 +#: participation/models.py:1884 msgid "note" msgstr "note" -#: participation/models.py:1879 +#: participation/models.py:1885 msgid "notes" msgstr "notes" @@ -2981,8 +2986,8 @@ msgid "" "You recently registered on the ETEAM platform. Please click on the link " "below to confirm your registration." msgstr "" -"Vous vous êtes inscrit⋅e sur la plateforme de l'ETEAM. Merci de cliquer sur le " -"lien ci-dessous pour confirmer votre inscription." +"Vous vous êtes inscrit⋅e sur la plateforme de l'ETEAM. Merci de cliquer sur " +"le lien ci-dessous pour confirmer votre inscription." #: registration/templates/registration/mails/email_validation_email.html:26 #: registration/templates/registration/mails/email_validation_email.txt:9 @@ -3067,13 +3072,12 @@ msgstr "L'équipe de l'ETEAM" #: registration/templates/registration/mails/payment_reminder.txt:4 #, python-format msgid "" -"You are registered for the ETEAM. Your team %(team)s has " -"been successfully validated. To end your inscription, you must pay the " -"amount of %(amount)s €." +"You are registered for the ETEAM. Your team %(team)s has been successfully " +"validated. To end your inscription, you must pay the amount of %(amount)s €." msgstr "" -"Vous êtes inscrit⋅e pour l'ETEAM. Votre équipe %(team)s a " -"été validée avec succès. Pour finaliser votre inscription, vous devez payer " -"le montant de %(amount)s €." +"Vous êtes inscrit⋅e pour l'ETEAM. Votre équipe %(team)s a été validée avec " +"succès. Pour finaliser votre inscription, vous devez payer le montant de " +"%(amount)s €." #: registration/templates/registration/mails/payment_reminder.html:24 #: registration/templates/registration/mails/payment_reminder.txt:9 @@ -3841,31 +3845,31 @@ msgstr "Nous contacter" msgid "About" msgstr "À propos" -#: tfjm/templates/index_eteam.html:9 tfjm/templates/index_tfjm.html:9 +#: tfjm/templates/index_eteam.html:11 tfjm/templates/index_tfjm.html:11 msgid "Welcome onto the registration site of the" msgstr " Bienvenue sur le site d'inscription au" -#: tfjm/templates/index_eteam.html:18 +#: tfjm/templates/index_eteam.html:20 msgid "You want to participate to the ETEAM ?" msgstr " Tu souhaites participer à l'ETEAM ?" -#: tfjm/templates/index_eteam.html:20 +#: tfjm/templates/index_eteam.html:22 msgid "Your team is selected and already complete?" msgstr "Ton équipe est sélectionnée et déjà formée ?" -#: tfjm/templates/index_eteam.html:25 tfjm/templates/index_tfjm.html:25 +#: tfjm/templates/index_eteam.html:27 tfjm/templates/index_tfjm.html:27 msgid "Register now!" msgstr "Inscris-toi maintenant !" -#: tfjm/templates/index_eteam.html:26 tfjm/templates/index_tfjm.html:26 +#: tfjm/templates/index_eteam.html:28 tfjm/templates/index_tfjm.html:28 msgid "I already have an account" msgstr "J'ai déjà un compte" -#: tfjm/templates/index_eteam.html:32 tfjm/templates/index_tfjm.html:32 +#: tfjm/templates/index_eteam.html:34 tfjm/templates/index_tfjm.html:34 msgid "How does it work?" msgstr "Comment ça marche ?" -#: tfjm/templates/index_eteam.html:35 +#: tfjm/templates/index_eteam.html:37 #, python-format msgid "" "To participate to the ETEAM, you must be selected by your national " @@ -3878,7 +3882,7 @@ msgstr "" "créer un compte sur la page " "d'inscription. Vous devrez ensuite confirmer votre adresse mail." -#: tfjm/templates/index_eteam.html:44 +#: tfjm/templates/index_eteam.html:46 #, python-format msgid "" "You can access your account via the Logindocumentation of the site, to check if the answer is " "not already there. Also refer of course to the 𝕋𝔽𝕁𝕄² rules. For any other question, do " +"org/rules/\" target=\"_blank\">ETEAM rules. For any other question, do " "not hesitate to contact us by email at the address eteam_moc@proton.me ." msgstr "" @@ -3920,15 +3924,15 @@ msgstr "" "autre question, n'hésitez pas à nous contacter par mail à l'adresse eteam_moc@proton.me ." -#: tfjm/templates/index_tfjm.html:18 +#: tfjm/templates/index_tfjm.html:20 msgid "You want to participate to the 𝕋𝔽𝕁𝕄² ?" msgstr " Tu souhaites participer au 𝕋𝔽𝕁𝕄² ?" -#: tfjm/templates/index_tfjm.html:20 +#: tfjm/templates/index_tfjm.html:22 msgid "Your team is already complete?" msgstr "Ton équipe est déjà formée ?" -#: tfjm/templates/index_tfjm.html:35 +#: tfjm/templates/index_tfjm.html:37 #, python-format msgid "" "To participate to the 𝕋𝔽𝕁𝕄², you just need to create an account on the " @@ -3939,7 +3943,7 @@ msgstr "" "page d'inscription. Vous " "devrez ensuite confirmer votre adresse mail." -#: tfjm/templates/index_tfjm.html:43 +#: tfjm/templates/index_tfjm.html:45 #, python-format msgid "" "You can access your account via the Logincontact@tfjm.org so that we can help you get in touch with other " @@ -3975,7 +3979,7 @@ msgstr "" "org\">contact@tfjm.org pour que nous puissions vous mettre en relation " "avec d'autres participant⋅es qui cherchent également une équipe." -#: tfjm/templates/index_tfjm.html:65 +#: tfjm/templates/index_tfjm.html:67 msgid "" "Do not hesitate to consult the documentation of the site, to check if the answer is " @@ -3995,11 +3999,11 @@ msgstr "" "m.org\"> contact@" "tfjm.org ." -#: tfjm/templates/index_tfjm.html:77 +#: tfjm/templates/index_tfjm.html:79 msgid "Save the dates!" msgstr "Attention aux dates !" -#: tfjm/templates/index_tfjm.html:78 +#: tfjm/templates/index_tfjm.html:80 msgid "" "If you don't end your registration by the indicated deadline, you will " "unfortunately not be able to participate in the 𝕋𝔽𝕁𝕄²." @@ -4007,7 +4011,7 @@ msgstr "" "Si vous ne finalisez pas votre inscription avant la date limite indiquée, " "vous ne pourrez malheureusement pas participer au 𝕋𝔽𝕁𝕄²." -#: tfjm/templates/navbar.html:19 tfjm/urls.py:33 +#: tfjm/templates/navbar.html:19 tfjm/urls.py:34 msgid "Home" msgstr "Accueil" @@ -4091,16 +4095,3 @@ msgstr "Aucun résultat." #: tfjm/templates/sidebar.html:10 tfjm/templates/sidebar.html:21 msgid "Informations" msgstr "Informations" - -#~ msgid "" -#~ "Please note that these dates may be subject to change. If your local " -#~ "organizers gave you different dates, trust them." -#~ msgstr "" -#~ "Veuillez noter que ces dates peuvent être sujettes à changement. Si vos " -#~ "organisateur⋅rices locaux⋅ales vous ont donné des dates différentes, " -#~ "faites-leur confiance." - -#~ msgid "date when solutions of round 2 are available" -#~ msgstr "" -#~ "date à partir de laquelle les solutions pour le second tour sont " -#~ "disponibles" diff --git a/participation/migrations/0017_alter_passage_solution_number_alter_pool_round_and_more.py b/participation/migrations/0017_alter_passage_solution_number_alter_pool_round_and_more.py new file mode 100644 index 0000000..124c9f6 --- /dev/null +++ b/participation/migrations/0017_alter_passage_solution_number_alter_pool_round_and_more.py @@ -0,0 +1,77 @@ +# Generated by Django 5.0.6 on 2024-06-13 08:53 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("participation", "0016_tournament_date_first_phase_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="passage", + name="solution_number", + field=models.PositiveSmallIntegerField( + choices=[ + (1, "Problem #1"), + (2, "Problem #2"), + (3, "Problem #3"), + (4, "Problem #4"), + (5, "Problem #5"), + (6, "Problem #6"), + (7, "Problem #7"), + (8, "Problem #8"), + (9, "Problem #9"), + (10, "Problem #10"), + ], + verbose_name="defended solution", + ), + ), + migrations.AlterField( + model_name="pool", + name="round", + field=models.PositiveSmallIntegerField( + choices=[(1, "Round 1"), (2, "Round 2"), (3, "Round 3")], + verbose_name="round", + ), + ), + migrations.AlterField( + model_name="solution", + name="problem", + field=models.PositiveSmallIntegerField( + choices=[ + (1, "Problem #1"), + (2, "Problem #2"), + (3, "Problem #3"), + (4, "Problem #4"), + (5, "Problem #5"), + (6, "Problem #6"), + (7, "Problem #7"), + (8, "Problem #8"), + (9, "Problem #9"), + (10, "Problem #10"), + ], + verbose_name="problem", + ), + ), + migrations.AlterField( + model_name="team", + name="trigram", + field=models.CharField( + help_text="The code must be composed of 4 uppercase letters.", + max_length=4, + unique=True, + validators=[ + django.core.validators.RegexValidator("^[A-Z]{3}[A-Z]*$"), + django.core.validators.RegexValidator( + "^(?!BIT$|CNO$|CRO$|CUL$|FTG$|FCK$|FUC$|FUK$|FYS$|HIV$|IST$|MST$|KKK$|KYS$|SEX$)", + message="This team code is forbidden.", + ), + ], + verbose_name="code", + ), + ), + ] diff --git a/participation/models.py b/participation/models.py index 66022de..f6ece2d 100644 --- a/participation/models.py +++ b/participation/models.py @@ -38,13 +38,13 @@ class Team(models.Model): ) trigram = models.CharField( - max_length=settings.TEAM_CODE_LENGTH, + max_length=4, verbose_name=_("code"), help_text=format_lazy(_("The code must be composed of {nb_letters} uppercase letters."), nb_letters=settings.TEAM_CODE_LENGTH), unique=True, validators=[ - RegexValidator("^[A-Z]{" + str(settings.TEAM_CODE_LENGTH) + "}$"), + RegexValidator("^[A-Z]{3}[A-Z]*$"), RegexValidator(fr"^(?!{'|'.join(f'{t}$' for t in settings.FORBIDDEN_TRIGRAMS)})", message=_("This team code is forbidden.")), ], @@ -236,6 +236,12 @@ class Team(models.Model): get_sympa_client().unsubscribe(self.email, "equipes-non-valides", False) get_sympa_client().delete_list(f"equipe-{self.trigram}") + def clean(self): + if len(self.trigram) != settings.TEAM_CODE_LENGTH: + raise ValidationError({'trigram': _("The team code must be composed of {nb_letters} uppercase letters.")}, + params={'nb_letters': settings.TEAM_CODE_LENGTH}) + return super().clean() + def save(self, *args, **kwargs): if not self.access_code: # if the team got created, generate the access code, create the contact mailing list