mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-10-31 16:20:00 +01:00 
			
		
		
		
	Add french comments on chat application
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
		| @@ -7,8 +7,14 @@ from tfjm.permissions import PermissionType | ||||
|  | ||||
|  | ||||
| def create_tournament_channels(instance: Tournament, **_kwargs): | ||||
|     """ | ||||
|     Lorsqu'un tournoi est créé, on crée les canaux de chat associés. | ||||
|     On crée notamment un canal d'annonces (accessible en écriture uniquement aux orgas), | ||||
|     un canal général, un de détente, un pour les juré⋅es et un pour les président⋅es de jury. | ||||
|     """ | ||||
|     tournament = instance | ||||
|  | ||||
|     # Création du canal « Tournoi - Annonces » | ||||
|     Channel.objects.update_or_create( | ||||
|         name=f"{tournament.name} - Annonces", | ||||
|         defaults=dict( | ||||
| @@ -19,6 +25,7 @@ def create_tournament_channels(instance: Tournament, **_kwargs): | ||||
|         ), | ||||
|     ) | ||||
|  | ||||
|     # Création du canal « Tournoi - Général » | ||||
|     Channel.objects.update_or_create( | ||||
|         name=f"{tournament.name} - Général", | ||||
|         defaults=dict( | ||||
| @@ -29,6 +36,7 @@ def create_tournament_channels(instance: Tournament, **_kwargs): | ||||
|         ), | ||||
|     ) | ||||
|  | ||||
|     # Création du canal « Tournoi - Détente » | ||||
|     Channel.objects.update_or_create( | ||||
|         name=f"{tournament.name} - Détente", | ||||
|         defaults=dict( | ||||
| @@ -39,6 +47,7 @@ def create_tournament_channels(instance: Tournament, **_kwargs): | ||||
|         ), | ||||
|     ) | ||||
|  | ||||
|     # Création du canal « Tournoi - Juré⋅es » | ||||
|     Channel.objects.update_or_create( | ||||
|         name=f"{tournament.name} - Juré⋅es", | ||||
|         defaults=dict( | ||||
| @@ -50,6 +59,7 @@ def create_tournament_channels(instance: Tournament, **_kwargs): | ||||
|     ) | ||||
|  | ||||
|     if tournament.remote: | ||||
|         # Création du canal « Tournoi - Président⋅es de jury » dans le cas d'un tournoi distanciel | ||||
|         Channel.objects.update_or_create( | ||||
|             name=f"{tournament.name} - Président⋅es de jury", | ||||
|             defaults=dict( | ||||
| @@ -62,10 +72,17 @@ def create_tournament_channels(instance: Tournament, **_kwargs): | ||||
|  | ||||
|  | ||||
| def create_pool_channels(instance: Pool, **_kwargs): | ||||
|     """ | ||||
|     Lorsqu'une poule est créée, on crée les canaux de chat associés. | ||||
|     On crée notamment un canal pour les membres de la poule et un pour les juré⋅es. | ||||
|     Cela ne concerne que les tournois distanciels. | ||||
|     """ | ||||
|     pool = instance | ||||
|     tournament = pool.tournament | ||||
|  | ||||
|     if tournament.remote: | ||||
|         # Dans le cadre d'un tournoi distanciel, on crée un canal pour les membres de la poule | ||||
|         # et un pour les juré⋅es de la poule. | ||||
|         Channel.objects.update_or_create( | ||||
|             name=f"{tournament.name} - Poule {pool.short_name}", | ||||
|             defaults=dict( | ||||
| @@ -88,6 +105,9 @@ def create_pool_channels(instance: Pool, **_kwargs): | ||||
|  | ||||
|  | ||||
| def create_team_channel(instance: Participation, **_kwargs): | ||||
|     """ | ||||
|     Lorsqu'une équipe est validée, on crée un canal de chat associé. | ||||
|     """ | ||||
|     if instance.valid: | ||||
|         Channel.objects.update_or_create( | ||||
|             name=f"Équipe {instance.team.trigram}", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user