From 316e4eefc18c68156f69e9d73ce958be2066d432 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 29 Oct 2020 16:08:27 +0100 Subject: [PATCH] Integrate chat --- .../templates/participation/chat.html | 16 ++ apps/participation/urls.py | 2 + locale/fr/LC_MESSAGES/django.po | 173 +++++++++--------- templates/base.html | 6 +- 4 files changed, 112 insertions(+), 85 deletions(-) create mode 100644 apps/participation/templates/participation/chat.html diff --git a/apps/participation/templates/participation/chat.html b/apps/participation/templates/participation/chat.html new file mode 100644 index 0000000..bbdd0f4 --- /dev/null +++ b/apps/participation/templates/participation/chat.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block extracss %} + +{% endblock %} + +{% block fullcontent %} + +{% endblock %} diff --git a/apps/participation/urls.py b/apps/participation/urls.py index 10b7676..6005fd1 100644 --- a/apps/participation/urls.py +++ b/apps/participation/urls.py @@ -1,4 +1,5 @@ from django.urls import path +from django.views.generic import TemplateView from .views import CalendarView, CreateTeamView, JoinTeamView, MyParticipationDetailView, MyTeamDetailView, \ ParticipationDetailView, PhaseUpdateView, TeamAuthorizationsView, TeamDetailView, TeamLeaveView, TeamUpdateView, \ @@ -20,4 +21,5 @@ urlpatterns = [ path("detail/upload-video//", UploadVideoView.as_view(), name="upload_video"), path("calendar/", CalendarView.as_view(), name="calendar"), path("calendar//", PhaseUpdateView.as_view(), name="update_phase"), + path("chat/", TemplateView.as_view(template_name="participation/chat.html"), name="chat") ] diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 76a01c1..95b7020 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Corres2math\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-20 15:53+0200\n" +"POT-Creation-Date: 2020-10-29 16:06+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Yohann D'ANELLO \n" "Language-Team: LANGUAGE \n" @@ -99,7 +99,7 @@ msgstr "changelogs" msgid "Changelog of type \"{action}\" for model {model} at {timestamp}" msgstr "Changelog de type \"{action}\" pour le modèle {model} le {timestamp}" -#: apps/participation/forms.py:15 apps/participation/models.py:28 +#: apps/participation/forms.py:15 apps/participation/models.py:29 msgid "The trigram must be composed of three uppercase letters." msgstr "Le trigramme doit être composé de trois lettres majuscules." @@ -131,28 +131,28 @@ msgstr "Cette phase doit commencer après les phases précédentes." msgid "This phase must end after the next phases." msgstr "Cette phase doit finir avant les phases suivantes." -#: apps/participation/models.py:21 apps/participation/tables.py:30 +#: apps/participation/models.py:22 apps/participation/tables.py:30 #: apps/participation/tables.py:52 apps/participation/tables.py:78 msgid "name" msgstr "nom" -#: apps/participation/models.py:27 apps/participation/tables.py:57 +#: apps/participation/models.py:28 apps/participation/tables.py:57 msgid "trigram" msgstr "trigramme" -#: apps/participation/models.py:35 +#: apps/participation/models.py:36 msgid "access code" msgstr "code d'accès" -#: apps/participation/models.py:36 +#: apps/participation/models.py:37 msgid "The access code let other people to join the team." msgstr "Le code d'accès permet aux autres participants de rejoindre l'équipe." -#: apps/participation/models.py:40 +#: apps/participation/models.py:41 msgid "Grant Animath to publish my video" msgstr "Autoriser Animath à publier ma vidéo" -#: apps/participation/models.py:41 +#: apps/participation/models.py:42 msgid "" "Give the authorisation to publish the video on the main website to promote " "the action." @@ -160,101 +160,101 @@ msgstr "" "Donner l'autorisation de publier la vidéo sur le site principal pour " "promouvoir les Correspondances." -#: apps/participation/models.py:72 +#: apps/participation/models.py:82 #, python-brace-format msgid "Team {name} ({trigram})" msgstr "Équipe {name} ({trigram})" -#: apps/participation/models.py:75 apps/participation/models.py:86 -#: apps/registration/models.py:89 apps/registration/models.py:134 +#: apps/participation/models.py:85 apps/participation/models.py:96 +#: apps/registration/models.py:93 apps/registration/models.py:138 msgid "team" msgstr "équipe" -#: apps/participation/models.py:76 +#: apps/participation/models.py:86 msgid "teams" msgstr "équipes" -#: apps/participation/models.py:90 +#: apps/participation/models.py:100 #, python-brace-format msgid "Problem #{problem:d}" msgstr "Problème n°{problem:d}" -#: apps/participation/models.py:93 apps/participation/tables.py:35 +#: apps/participation/models.py:103 apps/participation/tables.py:35 #: apps/participation/tables.py:62 msgid "problem number" msgstr "numéro de problème" -#: apps/participation/models.py:99 apps/participation/models.py:150 +#: apps/participation/models.py:109 apps/participation/models.py:160 msgid "valid" msgstr "valide" -#: apps/participation/models.py:100 apps/participation/models.py:151 +#: apps/participation/models.py:110 apps/participation/models.py:161 msgid "The video got the validation of the administrators." msgstr "La vidéo a été validée par les administrateurs." -#: apps/participation/models.py:109 +#: apps/participation/models.py:119 msgid "solution video" msgstr "vidéo de solution" -#: apps/participation/models.py:118 +#: apps/participation/models.py:128 msgid "received participation" msgstr "participation reçue" -#: apps/participation/models.py:127 +#: apps/participation/models.py:137 msgid "synthesis video" msgstr "vidéo de synthèse" -#: apps/participation/models.py:134 +#: apps/participation/models.py:144 #, python-brace-format msgid "Participation of the team {name} ({trigram})" msgstr "Participation de l'équipe {name} ({trigram})" -#: apps/participation/models.py:137 +#: apps/participation/models.py:147 msgid "participation" msgstr "participation" -#: apps/participation/models.py:138 +#: apps/participation/models.py:148 msgid "participations" msgstr "participations" -#: apps/participation/models.py:143 +#: apps/participation/models.py:153 msgid "link" msgstr "lien" -#: apps/participation/models.py:144 +#: apps/participation/models.py:154 msgid "The full video link." msgstr "Le lien complet de la vidéo." -#: apps/participation/models.py:178 +#: apps/participation/models.py:188 #, python-brace-format msgid "Video of team {name} ({trigram})" msgstr "Vidéo de l'équipe {name} ({trigram})" -#: apps/participation/models.py:182 +#: apps/participation/models.py:192 msgid "video" msgstr "vidéo" -#: apps/participation/models.py:183 +#: apps/participation/models.py:193 msgid "videos" msgstr "vidéos" -#: apps/participation/models.py:190 +#: apps/participation/models.py:200 msgid "phase number" msgstr "phase" -#: apps/participation/models.py:195 +#: apps/participation/models.py:205 msgid "phase description" msgstr "description" -#: apps/participation/models.py:199 +#: apps/participation/models.py:209 msgid "start date of the given phase" msgstr "début de la phase" -#: apps/participation/models.py:204 +#: apps/participation/models.py:214 msgid "end date of the given phase" msgstr "fin de la phase" -#: apps/participation/models.py:219 +#: apps/participation/models.py:229 msgid "" "Phase {phase_number:d} starts on {start:%Y-%m-%d %H:%M} and ends on {end:%Y-" "%m-%d %H:%M}" @@ -262,21 +262,21 @@ msgstr "" "Phase {phase_number:d} démarrant le {start:%d/%m/%Y %H:%M} et finissant le " "{end:%d/%m/%Y %H:%M}" -#: apps/participation/models.py:223 +#: apps/participation/models.py:233 msgid "phase" msgstr "phase" -#: apps/participation/models.py:224 +#: apps/participation/models.py:234 msgid "phases" msgstr "phases" #: apps/participation/templates/participation/create_team.html:11 -#: templates/base.html:229 +#: templates/base.html:231 msgid "Create" msgstr "Créer" #: apps/participation/templates/participation/join_team.html:11 -#: templates/base.html:225 +#: templates/base.html:227 msgid "Join" msgstr "Rejoindre" @@ -347,7 +347,7 @@ msgid "Update" msgstr "Modifier" #: apps/participation/templates/participation/phase_list.html:10 -#: templates/base.html:68 templates/base.html:70 templates/base.html:215 +#: templates/base.html:68 templates/base.html:70 templates/base.html:217 msgid "Calendar" msgstr "Calendrier" @@ -394,7 +394,7 @@ msgstr "Pas encore envoyée" #: apps/participation/templates/participation/team_detail.html:66 #: apps/participation/templates/participation/team_detail.html:128 -#: apps/participation/templates/participation/team_leave.html:9 +#: apps/participation/templates/participation/team_leave.html:11 msgid "Leave" msgstr "Quitter" @@ -454,74 +454,81 @@ msgstr "Modifier l'équipe" msgid "Leave team" msgstr "Quitter l'équipe" -#: apps/participation/templates/participation/team_leave.html:7 +#: apps/participation/templates/participation/team_leave.html:9 msgid "Are you sure that you want to leave this team?" msgstr "Êtes-vous sûr·e de vouloir quitter cette équipe ?" #: apps/participation/views.py:32 templates/base.html:77 -#: templates/base.html:228 +#: templates/base.html:230 msgid "Create team" msgstr "Créer une équipe" -#: apps/participation/views.py:39 apps/participation/views.py:69 +#: apps/participation/views.py:39 apps/participation/views.py:72 msgid "You don't participate, so you can't create a team." msgstr "Vous ne participez pas, vous ne pouvez pas créer d'équipe." -#: apps/participation/views.py:41 apps/participation/views.py:71 +#: apps/participation/views.py:41 apps/participation/views.py:74 msgid "You are already in a team." msgstr "Vous êtes déjà dans une équipe." -#: apps/participation/views.py:62 templates/base.html:82 -#: templates/base.html:224 +#: apps/participation/views.py:65 templates/base.html:82 +#: templates/base.html:226 msgid "Join team" msgstr "Rejoindre une équipe" -#: apps/participation/views.py:97 apps/participation/views.py:248 -#: apps/participation/views.py:259 +#: apps/participation/views.py:103 apps/participation/views.py:254 +#: apps/participation/views.py:280 msgid "You are not in a team." msgstr "Vous n'êtes pas dans une équipe." -#: apps/participation/views.py:98 apps/participation/views.py:260 +#: apps/participation/views.py:104 apps/participation/views.py:281 msgid "You don't participate, so you don't have any team." msgstr "Vous ne participez pas, vous n'avez donc pas d'équipe." -#: apps/participation/views.py:137 +#: apps/participation/views.py:143 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." -#: apps/participation/views.py:140 +#: apps/participation/views.py:146 msgid "The validation of the team is already done or pending." msgstr "La validation de l'équipe est déjà faite ou en cours." -#: apps/participation/views.py:153 +#: apps/participation/views.py:159 msgid "You are not an administrator." msgstr "Vous n'êtes pas administrateur." -#: apps/participation/views.py:156 +#: apps/participation/views.py:162 msgid "This team has no pending validation." msgstr "L'équipe n'a pas de validation en attente." -#: apps/participation/views.py:175 +#: apps/participation/views.py:181 msgid "You must specify if you validate the registration or not." msgstr "Vous devez spécifier si vous validez l'inscription ou non." -#: apps/participation/views.py:232 apps/registration/views.py:213 +#: apps/participation/views.py:238 apps/registration/views.py:213 #, python-brace-format msgid "Photo authorization of {student}.{ext}" msgstr "Autorisation de droit à l'image de {student}.{ext}" -#: apps/participation/views.py:236 +#: apps/participation/views.py:242 #, python-brace-format msgid "Photo authorizations of team {trigram}.zip" msgstr "Autorisations de droit à l'image de l'équipe {trigram}.zip" -#: apps/participation/views.py:269 +#: apps/participation/views.py:256 +#, fuzzy +#| msgid "The validation of the team is already done or pending." +msgid "The team is already validated or the validation is pending." +msgstr "La validation de l'équipe est déjà faite ou en cours." + +#: apps/participation/views.py:290 msgid "The team is not validated yet." msgstr "L'équipe n'est pas encore validée." -#: apps/participation/views.py:278 +#: apps/participation/views.py:299 +#, python-brace-format msgid "Participation of team {trigram}" msgstr "Participation de l'équipe {trigram}" @@ -533,7 +540,7 @@ msgstr "rôle" msgid "participant" msgstr "participant" -#: apps/registration/forms.py:16 apps/registration/models.py:143 +#: apps/registration/forms.py:16 apps/registration/models.py:147 msgid "coach" msgstr "encadrant" @@ -554,75 +561,75 @@ msgstr "email confirmé" msgid "Activate your Correspondances account" msgstr "Activez votre compte des Correspondances" -#: apps/registration/models.py:74 +#: apps/registration/models.py:78 msgid "registration" msgstr "inscription" -#: apps/registration/models.py:75 +#: apps/registration/models.py:79 msgid "registrations" msgstr "inscriptions" -#: apps/registration/models.py:94 +#: apps/registration/models.py:98 msgid "12th grade" msgstr "Terminale" -#: apps/registration/models.py:95 +#: apps/registration/models.py:99 msgid "11th grade" msgstr "Première" -#: apps/registration/models.py:96 +#: apps/registration/models.py:100 msgid "10th grade or lower" msgstr "Seconde ou inférieur" -#: apps/registration/models.py:98 +#: apps/registration/models.py:102 msgid "student class" msgstr "classe" -#: apps/registration/models.py:103 +#: apps/registration/models.py:107 msgid "school" msgstr "école" -#: apps/registration/models.py:107 +#: apps/registration/models.py:111 msgid "photo authorization" msgstr "autorisation de droit à l'image" -#: apps/registration/models.py:115 +#: apps/registration/models.py:119 msgid "student" msgstr "étudiant" -#: apps/registration/models.py:123 +#: apps/registration/models.py:127 msgid "student registration" msgstr "inscription d'élève" -#: apps/registration/models.py:124 +#: apps/registration/models.py:128 msgid "student registrations" msgstr "inscriptions d'élève" -#: apps/registration/models.py:138 +#: apps/registration/models.py:142 msgid "professional activity" msgstr "activité professionnelle" -#: apps/registration/models.py:151 +#: apps/registration/models.py:155 msgid "coach registration" msgstr "inscription d'encadrant" -#: apps/registration/models.py:152 +#: apps/registration/models.py:156 msgid "coach registrations" msgstr "inscriptions d'encadrants" -#: apps/registration/models.py:157 +#: apps/registration/models.py:161 msgid "role of the administrator" msgstr "rôle de l'administrateur" -#: apps/registration/models.py:162 +#: apps/registration/models.py:166 msgid "admin" msgstr "admin" -#: apps/registration/models.py:170 +#: apps/registration/models.py:174 msgid "admin registration" msgstr "inscription d'administrateur" -#: apps/registration/models.py:171 +#: apps/registration/models.py:175 msgid "admin registrations" msgstr "inscriptions d'administrateur" @@ -714,7 +721,7 @@ msgid "Your password has been set. You may go ahead and log in now." msgstr "Votre mot de passe a été changé. Vous pouvez désormais vous connecter." #: apps/registration/templates/registration/password_reset_complete.html:10 -#: templates/base.html:130 templates/base.html:219 templates/base.html:220 +#: templates/base.html:130 templates/base.html:221 templates/base.html:222 #: templates/registration/login.html:7 templates/registration/login.html:8 #: templates/registration/login.html:25 msgid "Log in" @@ -869,11 +876,11 @@ msgstr "Mail de confirmation de l'adresse mail envoyé" msgid "Resend email validation link" msgstr "Renvoyé le lien de validation de l'adresse mail" -#: corres2math/settings.py:151 +#: corres2math/settings.py:154 msgid "English" msgstr "Anglais" -#: corres2math/settings.py:152 +#: corres2math/settings.py:155 msgid "French" msgstr "Français" @@ -943,8 +950,8 @@ msgid "My participation" msgstr "Ma participation" #: templates/base.html:100 -msgid "Make a gift" -msgstr "Faire un don" +msgid "Chat" +msgstr "Chat" #: templates/base.html:104 msgid "Administration" @@ -970,7 +977,7 @@ msgstr "Mon compte" msgid "Log out" msgstr "Déconnexion" -#: templates/base.html:161 +#: templates/base.html:162 #, python-format msgid "" "Your email address is not validated. Please click on the link you received " @@ -981,11 +988,11 @@ msgstr "" "avez reçu par mail. Vous pouvez renvoyer un mail en cliquant sur ce lien." -#: templates/base.html:184 +#: templates/base.html:186 msgid "Contact us" msgstr "Nous contacter" -#: templates/base.html:217 +#: templates/base.html:219 msgid "Search results" msgstr "Résultats de la recherche" diff --git a/templates/base.html b/templates/base.html index e4bd5bc..8cd6fc7 100644 --- a/templates/base.html +++ b/templates/base.html @@ -96,8 +96,8 @@ {% endif %} {% endif %} {% if user.admin %}