diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index eae1d83..db39ae5 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 22:18+0100\n" +"POT-Creation-Date: 2024-02-11 22:35+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Emmy D'Anello \n" "Language-Team: LANGUAGE \n" @@ -710,7 +710,7 @@ msgstr "" "L'équipe {trigram} n'a pas encore été validée par les organisateurices. " "Merci de patienter." -#: participation/models.py:193 +#: participation/models.py:193 registration/models.py:458 msgid "Pending validation" msgstr "Validation en attente" @@ -1792,7 +1792,7 @@ msgstr "" "avez reçu par mail. Vous pouvez renvoyer un mail en cliquant sur ce lien." -#: registration/models.py:118 registration/models.py:445 +#: registration/models.py:118 registration/models.py:480 msgid "registration" msgstr "inscription" @@ -2043,68 +2043,93 @@ msgstr "admin" msgid "volunteer" msgstr "bénévole" -#: registration/models.py:432 +#: registration/models.py:437 +msgid "" +"Registrations for tournament {tournament} are closing on {date:%Y-%m-%d %H:" +"%M}. There are for now {validated_teams} validated teams (+ {pending_teams} " +"pending) on {max_teams} expected." +msgstr "" +"Les inscriptions pour le tournoi {tournament} ferment le {date:%d/%m/%Y à %H:" +"%M}. Il y a pour l'instant {validated_teams} équipes validées (+ {pending_" +"teams} en attente) sur {max_teams} attendues." + +#: registration/models.py:445 +msgid "Registrations" +msgstr "Inscriptions" + +#: registration/models.py:452 +#, python-brace-format +msgid "" +"The team {trigram} requested to be validated for the tournament of " +"{tournament}. You can check the status of the team on the team page." +msgstr "" +"L'équipe {trigram} a demandé à être validée pour le tournoi {tournament}. " +"Vous pouvez vérifier le statut de l'équipe sur la page de " +"l'équipe." + +#: registration/models.py:467 msgid "volunteer registration" msgstr "inscription de bénévole" -#: registration/models.py:433 +#: registration/models.py:468 msgid "volunteer registrations" msgstr "inscriptions de bénévoles" -#: registration/models.py:449 +#: registration/models.py:484 msgid "type" msgstr "type" -#: registration/models.py:452 +#: registration/models.py:487 msgid "No payment" msgstr "Pas de paiement" -#: registration/models.py:454 +#: registration/models.py:489 msgid "Scholarship" msgstr "Notification de bourse" -#: registration/models.py:455 +#: registration/models.py:490 msgid "Bank transfer" msgstr "Virement bancaire" -#: registration/models.py:456 +#: registration/models.py:491 msgid "Other (please indicate)" msgstr "Autre (veuillez spécifier)" -#: registration/models.py:457 +#: registration/models.py:492 msgid "The tournament is free" msgstr "Le tournoi est gratuit" -#: registration/models.py:464 +#: registration/models.py:499 msgid "scholarship file" msgstr "Notification de bourse" -#: registration/models.py:465 +#: registration/models.py:500 msgid "only if you have a scholarship." msgstr "Nécessaire seulement si vous déclarez être boursier." -#: registration/models.py:472 +#: registration/models.py:507 msgid "additional information" msgstr "informations additionnelles" -#: registration/models.py:473 +#: registration/models.py:508 msgid "To help us to find your payment." msgstr "Pour nous aider à retrouver votre paiement, si nécessaire." -#: registration/models.py:479 +#: registration/models.py:514 msgid "payment valid" msgstr "paiement valide" -#: registration/models.py:488 +#: registration/models.py:523 #, python-brace-format msgid "Payment of {registration}" msgstr "Paiement de {registration}" -#: registration/models.py:491 +#: registration/models.py:526 msgid "payment" msgstr "paiement" -#: registration/models.py:492 +#: registration/models.py:527 msgid "payments" msgstr "paiements" diff --git a/registration/models.py b/registration/models.py index 4df878d..bf636eb 100644 --- a/registration/models.py +++ b/registration/models.py @@ -428,6 +428,41 @@ class VolunteerRegistration(Registration): from registration.forms import VolunteerRegistrationForm return VolunteerRegistrationForm + def important_informations(self): + informations = [] + + for tournament in self.organized_tournaments.all(): + if timezone.now() < tournament.inscription_limit \ + or tournament.participations.filter(valid=True).count() < tournament.max_teams: + text = _("Registrations for tournament {tournament} are closing on {date:%Y-%m-%d %H:%M}. " + "There are for now {validated_teams} validated teams (+ {pending_teams} pending) " + "on {max_teams} expected.") + content = format_lazy(text, tournament=tournament.name, date=tournament.inscription_limit, + validated_teams=tournament.participations.filter(valid=True).count(), + pending_teams=tournament.participations.filter(valid=False).count(), + max_teams=tournament.max_teams) + informations.append({ + 'title': _("Registrations"), + 'type': "info", + 'priority': 2, + 'content': content, + }) + + for pending_participation in tournament.participations.filter(valid=False).all(): + text = _("The team {trigram} requested to be validated for the tournament of {tournament}. " + "You can check the status of the team on the team page.") + url = reverse_lazy("participation:team_detail", args=(pending_participation.team.id,)) + content = format_lazy(text, trigram=pending_participation.team.trigram, + tournament=tournament.name, url=url) + informations.append({ + 'title': _("Pending validation"), + 'type': "warning", + 'priority': 4, + 'content': content, + }) + + return informations + class Meta: verbose_name = _("volunteer registration") verbose_name_plural = _("volunteer registrations")