Merge pull request #797 from ae-utbm/fix-image-injection

Better form for user submiting images
This commit is contained in:
thomas girod 2024-08-27 22:46:01 +02:00 committed by GitHub
commit ea42c98571
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 179 additions and 171 deletions

View File

@ -61,6 +61,7 @@
<p> <p>
{{ form[field_name].label }} {{ form[field_name].label }}
</p> </p>
{{ form[field_name].errors }}
{%- else -%} {%- else -%}
<em>{% trans %}To edit your profile picture, ask a member of the AE{% endtrans %}</em> <em>{% trans %}To edit your profile picture, ask a member of the AE{% endtrans %}</em>
{%- endif -%} {%- endif -%}

View File

@ -201,10 +201,7 @@ class RegisteringForm(UserCreationForm):
class UserProfileForm(forms.ModelForm): class UserProfileForm(forms.ModelForm):
"""Form handling the user profile, managing the files """Form handling the user profile, managing the files"""
This form is actually pretty bad and was made in the rush before the migration. It should be refactored.
TODO: refactor this form.
"""
class Meta: class Meta:
model = User model = User
@ -237,25 +234,35 @@ class UserProfileForm(forms.ModelForm):
] ]
widgets = { widgets = {
"date_of_birth": SelectDate, "date_of_birth": SelectDate,
"profile_pict": forms.ClearableFileInput,
"avatar_pict": forms.ClearableFileInput,
"scrub_pict": forms.ClearableFileInput,
"phone": RegionalPhoneNumberWidget, "phone": RegionalPhoneNumberWidget,
"parent_phone": RegionalPhoneNumberWidget, "parent_phone": RegionalPhoneNumberWidget,
"quote": forms.Textarea, "quote": forms.Textarea,
} }
labels = {
"profile_pict": _(
"Profile: you need to be visible on the picture, in order to be recognized (e.g. by the barmen)"
),
"avatar_pict": _("Avatar: used on the forum"),
"scrub_pict": _("Scrub: let other know how your scrub looks like!"),
}
def generate_name(self, field_name, f): def generate_name(self, field_name, f):
field_name = field_name[:-4] field_name = field_name[:-4]
return field_name + str(self.instance.id) + "." + f.content_type.split("/")[-1] return field_name + str(self.instance.id) + "." + f.content_type.split("/")[-1]
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Image fields are injected here to override the file field provided by the model
# This would be better if we could have a SithImage sort of model input instead of a generic SithFile
self.fields["profile_pict"] = forms.ImageField(
required=False,
label=_(
"Profile: you need to be visible on the picture, in order to be recognized (e.g. by the barmen)"
),
)
self.fields["avatar_pict"] = forms.ImageField(
required=False,
label=_("Avatar: used on the forum"),
)
self.fields["scrub_pict"] = forms.ImageField(
required=False,
label=_("Scrub: let other know how your scrub looks like!"),
)
def process(self, files): def process(self, files):
avatar = self.instance.avatar_pict avatar = self.instance.avatar_pict
profile = self.instance.profile_pict profile = self.instance.profile_pict
@ -305,7 +312,7 @@ class UserProfileForm(forms.ModelForm):
% { % {
"file_name": f, "file_name": f,
"msg": _( "msg": _(
"Bad image format, only jpeg, png, and gif are accepted" "Bad image format, only jpeg, png, webp and gif are accepted"
), ),
}, },
) )

View File

@ -6,7 +6,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-21 15:30+0200\n" "POT-Creation-Date: 2024-08-27 17:02+0200\n"
"PO-Revision-Date: 2016-07-18\n" "PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Skia <skia@libskia.so>\n" "Last-Translator: Skia <skia@libskia.so>\n"
"Language-Team: AE info <ae.info@utbm.fr>\n" "Language-Team: AE info <ae.info@utbm.fr>\n"
@ -219,7 +219,7 @@ msgstr "Compte"
msgid "Company" msgid "Company"
msgstr "Entreprise" msgstr "Entreprise"
#: accounting/models.py:312 core/models.py:311 sith/settings.py:404 #: accounting/models.py:312 core/models.py:311 sith/settings.py:413
#: stock/templates/stock/shopping_list_items.jinja:37 #: stock/templates/stock/shopping_list_items.jinja:37
msgid "Other" msgid "Other"
msgstr "Autre" msgstr "Autre"
@ -370,17 +370,17 @@ msgstr "Compte en banque : "
#: core/templates/core/user_account_detail.jinja:66 #: core/templates/core/user_account_detail.jinja:66
#: core/templates/core/user_clubs.jinja:34 #: core/templates/core/user_clubs.jinja:34
#: core/templates/core/user_clubs.jinja:63 #: core/templates/core/user_clubs.jinja:63
#: core/templates/core/user_edit.jinja:53 #: core/templates/core/user_edit.jinja:57
#: core/templates/core/user_preferences.jinja:48 #: core/templates/core/user_preferences.jinja:48
#: counter/templates/counter/last_ops.jinja:35 #: counter/templates/counter/last_ops.jinja:35
#: counter/templates/counter/last_ops.jinja:65 #: counter/templates/counter/last_ops.jinja:65
#: election/templates/election/election_detail.jinja:187 #: election/templates/election/election_detail.jinja:187
#: forum/templates/forum/macros.jinja:21 forum/templates/forum/macros.jinja:134 #: forum/templates/forum/macros.jinja:21 forum/templates/forum/macros.jinja:134
#: launderette/templates/launderette/launderette_admin.jinja:16 #: launderette/templates/launderette/launderette_admin.jinja:16
#: launderette/views.py:217 pedagogy/templates/pedagogy/guide.jinja:95 #: launderette/views.py:217 pedagogy/templates/pedagogy/guide.jinja:96
#: pedagogy/templates/pedagogy/guide.jinja:110 #: pedagogy/templates/pedagogy/guide.jinja:111
#: pedagogy/templates/pedagogy/uv_detail.jinja:185 #: pedagogy/templates/pedagogy/uv_detail.jinja:185
#: sas/templates/sas/album.jinja:32 sas/templates/sas/moderation.jinja:18 #: sas/templates/sas/album.jinja:33 sas/templates/sas/moderation.jinja:18
#: sas/templates/sas/picture.jinja:48 #: sas/templates/sas/picture.jinja:48
#: stock/templates/stock/stock_shopping_list.jinja:43 #: stock/templates/stock/stock_shopping_list.jinja:43
#: stock/templates/stock/stock_shopping_list.jinja:69 #: stock/templates/stock/stock_shopping_list.jinja:69
@ -433,10 +433,10 @@ msgstr "Nouveau compte club"
#: forum/templates/forum/macros.jinja:20 forum/templates/forum/macros.jinja:62 #: forum/templates/forum/macros.jinja:20 forum/templates/forum/macros.jinja:62
#: forum/templates/forum/macros.jinja:128 #: forum/templates/forum/macros.jinja:128
#: launderette/templates/launderette/launderette_list.jinja:16 #: launderette/templates/launderette/launderette_list.jinja:16
#: pedagogy/templates/pedagogy/guide.jinja:94 #: pedagogy/templates/pedagogy/guide.jinja:95
#: pedagogy/templates/pedagogy/guide.jinja:109 #: pedagogy/templates/pedagogy/guide.jinja:110
#: pedagogy/templates/pedagogy/uv_detail.jinja:184 #: pedagogy/templates/pedagogy/uv_detail.jinja:184
#: sas/templates/sas/album.jinja:31 trombi/templates/trombi/detail.jinja:9 #: sas/templates/sas/album.jinja:32 trombi/templates/trombi/detail.jinja:9
#: trombi/templates/trombi/edit_profile.jinja:34 #: trombi/templates/trombi/edit_profile.jinja:34
msgid "Edit" msgid "Edit"
msgstr "Éditer" msgstr "Éditer"
@ -526,7 +526,7 @@ msgid "Effective amount"
msgstr "Montant effectif" msgstr "Montant effectif"
#: accounting/templates/accounting/club_account_details.jinja:36 #: accounting/templates/accounting/club_account_details.jinja:36
#: sith/settings.py:450 #: sith/settings.py:459
msgid "Closed" msgid "Closed"
msgstr "Fermé" msgstr "Fermé"
@ -1162,7 +1162,7 @@ msgid "There are no members in this club."
msgstr "Il n'y a pas de membres dans ce club." msgstr "Il n'y a pas de membres dans ce club."
#: club/templates/club/club_members.jinja:80 #: club/templates/club/club_members.jinja:80
#: core/templates/core/file_detail.jinja:19 core/views/forms.py:332 #: core/templates/core/file_detail.jinja:19 core/views/forms.py:339
#: launderette/views.py:217 trombi/templates/trombi/detail.jinja:19 #: launderette/views.py:217 trombi/templates/trombi/detail.jinja:19
msgid "Add" msgid "Add"
msgstr "Ajouter" msgstr "Ajouter"
@ -1587,7 +1587,7 @@ msgstr "Type"
#: com/templates/com/weekmail.jinja:19 com/templates/com/weekmail.jinja:48 #: com/templates/com/weekmail.jinja:19 com/templates/com/weekmail.jinja:48
#: forum/templates/forum/forum.jinja:28 forum/templates/forum/forum.jinja:47 #: forum/templates/forum/forum.jinja:28 forum/templates/forum/forum.jinja:47
#: forum/templates/forum/main.jinja:30 forum/views.py:246 #: forum/templates/forum/main.jinja:30 forum/views.py:246
#: pedagogy/templates/pedagogy/guide.jinja:88 #: pedagogy/templates/pedagogy/guide.jinja:89
msgid "Title" msgid "Title"
msgstr "Titre" msgstr "Titre"
@ -2387,7 +2387,7 @@ msgstr "403, Non autorisé"
msgid "404, Not Found" msgid "404, Not Found"
msgstr "404. Non trouvé" msgstr "404. Non trouvé"
#: core/templates/core/500.jinja:12 #: core/templates/core/500.jinja:11
msgid "500, Server Error" msgid "500, Server Error"
msgstr "500, Erreur Serveur" msgstr "500, Erreur Serveur"
@ -2479,7 +2479,7 @@ msgstr "Photos"
#: eboutic/templates/eboutic/eboutic_main.jinja:22 #: eboutic/templates/eboutic/eboutic_main.jinja:22
#: eboutic/templates/eboutic/eboutic_makecommand.jinja:16 #: eboutic/templates/eboutic/eboutic_makecommand.jinja:16
#: eboutic/templates/eboutic/eboutic_payment_result.jinja:4 #: eboutic/templates/eboutic/eboutic_payment_result.jinja:4
#: sith/settings.py:403 sith/settings.py:411 #: sith/settings.py:412 sith/settings.py:420
msgid "Eboutic" msgid "Eboutic"
msgstr "Eboutic" msgstr "Eboutic"
@ -2621,20 +2621,20 @@ msgstr "Propriétés"
msgid "Owner: " msgid "Owner: "
msgstr "Propriétaire : " msgstr "Propriétaire : "
#: core/templates/core/file_detail.jinja:26 sas/templates/sas/album.jinja:46 #: core/templates/core/file_detail.jinja:26 sas/templates/sas/album.jinja:47
#: sas/templates/sas/main.jinja:49 #: sas/templates/sas/main.jinja:49
msgid "Clear clipboard" msgid "Clear clipboard"
msgstr "Vider le presse-papier" msgstr "Vider le presse-papier"
#: core/templates/core/file_detail.jinja:27 sas/templates/sas/album.jinja:33 #: core/templates/core/file_detail.jinja:27 sas/templates/sas/album.jinja:34
msgid "Cut" msgid "Cut"
msgstr "Couper" msgstr "Couper"
#: core/templates/core/file_detail.jinja:28 sas/templates/sas/album.jinja:34 #: core/templates/core/file_detail.jinja:28 sas/templates/sas/album.jinja:35
msgid "Paste" msgid "Paste"
msgstr "Coller" msgstr "Coller"
#: core/templates/core/file_detail.jinja:31 sas/templates/sas/album.jinja:40 #: core/templates/core/file_detail.jinja:31 sas/templates/sas/album.jinja:41
#: sas/templates/sas/main.jinja:43 #: sas/templates/sas/main.jinja:43
msgid "Clipboard: " msgid "Clipboard: "
msgstr "Presse-papier : " msgstr "Presse-papier : "
@ -2696,7 +2696,7 @@ msgid "Edit group"
msgstr "Éditer le groupe" msgstr "Éditer le groupe"
#: core/templates/core/group_edit.jinja:9 #: core/templates/core/group_edit.jinja:9
#: core/templates/core/user_edit.jinja:235 #: core/templates/core/user_edit.jinja:268
#: core/templates/core/user_group.jinja:13 #: core/templates/core/user_group.jinja:13
#: pedagogy/templates/pedagogy/uv_edit.jinja:36 #: pedagogy/templates/pedagogy/uv_edit.jinja:36
msgid "Update" msgid "Update"
@ -2771,23 +2771,23 @@ msgstr "Créneau"
msgid "Tokens" msgid "Tokens"
msgstr "Jetons" msgstr "Jetons"
#: core/templates/core/macros.jinja:123 core/templates/core/macros.jinja:125 #: core/templates/core/macros.jinja:163 core/templates/core/macros.jinja:165
msgid "Previous" msgid "Previous"
msgstr "Précédent" msgstr "Précédent"
#: core/templates/core/macros.jinja:129 #: core/templates/core/macros.jinja:169
msgid "current" msgid "current"
msgstr "actuel" msgstr "actuel"
#: core/templates/core/macros.jinja:135 core/templates/core/macros.jinja:137 #: core/templates/core/macros.jinja:175 core/templates/core/macros.jinja:177
msgid "Next" msgid "Next"
msgstr "Suivant" msgstr "Suivant"
#: core/templates/core/macros.jinja:153 #: core/templates/core/macros.jinja:193
msgid "Select All" msgid "Select All"
msgstr "Tout sélectionner" msgstr "Tout sélectionner"
#: core/templates/core/macros.jinja:154 #: core/templates/core/macros.jinja:194
msgid "Unselect All" msgid "Unselect All"
msgstr "Tout désélectionner" msgstr "Tout désélectionner"
@ -3194,31 +3194,31 @@ msgstr "Activer la caméra"
msgid "Take a picture" msgid "Take a picture"
msgstr "Prendre une photo" msgstr "Prendre une photo"
#: core/templates/core/user_edit.jinja:60 #: core/templates/core/user_edit.jinja:64
msgid "To edit your profile picture, ask a member of the AE" msgid "To edit your profile picture, ask a member of the AE"
msgstr "Pour changer votre photo de profil, demandez à un membre de l'AE" msgstr "Pour changer votre photo de profil, demandez à un membre de l'AE"
#: core/templates/core/user_edit.jinja:142 #: core/templates/core/user_edit.jinja:173
msgid "captured" msgid "captured"
msgstr "capturé" msgstr "capturé"
#: core/templates/core/user_edit.jinja:163 #: core/templates/core/user_edit.jinja:196
msgid "Edit user profile" msgid "Edit user profile"
msgstr "Éditer le profil de l'utilisateur" msgstr "Éditer le profil de l'utilisateur"
#: core/templates/core/user_edit.jinja:225 #: core/templates/core/user_edit.jinja:258
msgid "Change my password" msgid "Change my password"
msgstr "Changer mon mot de passe" msgstr "Changer mon mot de passe"
#: core/templates/core/user_edit.jinja:230 #: core/templates/core/user_edit.jinja:263
msgid "Change user password" msgid "Change user password"
msgstr "Changer le mot de passe" msgstr "Changer le mot de passe"
#: core/templates/core/user_edit.jinja:240 #: core/templates/core/user_edit.jinja:273
msgid "Username:" msgid "Username:"
msgstr "Nom d'utilisateur : " msgstr "Nom d'utilisateur : "
#: core/templates/core/user_edit.jinja:243 #: core/templates/core/user_edit.jinja:276
msgid "Account number:" msgid "Account number:"
msgstr "Numéro de compte : " msgstr "Numéro de compte : "
@ -3308,12 +3308,12 @@ msgstr "Photos de %(user_name)s"
msgid "Download all my pictures" msgid "Download all my pictures"
msgstr "Télécharger toutes mes photos" msgstr "Télécharger toutes mes photos"
#: core/templates/core/user_pictures.jinja:49 sas/templates/sas/album.jinja:74 #: core/templates/core/user_pictures.jinja:49 sas/templates/sas/album.jinja:75
#: sas/templates/sas/macros.jinja:16 #: sas/templates/sas/macros.jinja:16
msgid "To be moderated" msgid "To be moderated"
msgstr "A modérer" msgstr "A modérer"
#: core/templates/core/user_pictures.jinja:130 #: core/templates/core/user_pictures.jinja:136
msgid "pictures" msgid "pictures"
msgstr "photos" msgstr "photos"
@ -3508,12 +3508,12 @@ msgid "Moderate pictures"
msgstr "Modérer les photos" msgstr "Modérer les photos"
#: core/templates/core/user_tools.jinja:173 #: core/templates/core/user_tools.jinja:173
#: pedagogy/templates/pedagogy/guide.jinja:21 #: pedagogy/templates/pedagogy/guide.jinja:22
msgid "Create UV" msgid "Create UV"
msgstr "Créer UV" msgstr "Créer UV"
#: core/templates/core/user_tools.jinja:174 #: core/templates/core/user_tools.jinja:174
#: pedagogy/templates/pedagogy/guide.jinja:24 #: pedagogy/templates/pedagogy/guide.jinja:25
#: trombi/templates/trombi/detail.jinja:10 #: trombi/templates/trombi/detail.jinja:10
msgid "Moderate comments" msgid "Moderate comments"
msgstr "Modérer les commentaires" msgstr "Modérer les commentaires"
@ -3538,7 +3538,7 @@ msgstr "Autres outils"
msgid "Trombi tools" msgid "Trombi tools"
msgstr "Outils Trombi" msgstr "Outils Trombi"
#: core/templatetags/renderer.py:84 #: core/templatetags/renderer.py:89
#, python-format #, python-format
msgid "%(nb_days)d day, %(remainder)s" msgid "%(nb_days)d day, %(remainder)s"
msgid_plural "%(nb_days)d days, %(remainder)s" msgid_plural "%(nb_days)d days, %(remainder)s"
@ -3554,7 +3554,7 @@ msgstr "Ajouter un nouveau dossier"
msgid "Error creating folder %(folder_name)s: %(msg)s" msgid "Error creating folder %(folder_name)s: %(msg)s"
msgstr "Erreur de création du dossier %(folder_name)s : %(msg)s" msgstr "Erreur de création du dossier %(folder_name)s : %(msg)s"
#: core/views/files.py:154 core/views/forms.py:297 core/views/forms.py:304 #: core/views/files.py:154 core/views/forms.py:304 core/views/forms.py:311
#: sas/views.py:81 #: sas/views.py:81
#, python-format #, python-format
msgid "Error uploading file %(file_name)s: %(msg)s" msgid "Error uploading file %(file_name)s: %(msg)s"
@ -3652,7 +3652,7 @@ msgstr "Choisir un utilisateur"
msgid "Username, email, or account number" msgid "Username, email, or account number"
msgstr "Nom d'utilisateur, email, ou numéro de compte AE" msgstr "Nom d'utilisateur, email, ou numéro de compte AE"
#: core/views/forms.py:249 #: core/views/forms.py:254
msgid "" msgid ""
"Profile: you need to be visible on the picture, in order to be recognized (e." "Profile: you need to be visible on the picture, in order to be recognized (e."
"g. by the barmen)" "g. by the barmen)"
@ -3660,36 +3660,36 @@ msgstr ""
"Photo de profil: vous devez être visible sur la photo afin d'être reconnu " "Photo de profil: vous devez être visible sur la photo afin d'être reconnu "
"(par exemple par les barmen)" "(par exemple par les barmen)"
#: core/views/forms.py:251 #: core/views/forms.py:259
msgid "Avatar: used on the forum" msgid "Avatar: used on the forum"
msgstr "Avatar : utilisé sur le forum" msgstr "Avatar : utilisé sur le forum"
#: core/views/forms.py:252 #: core/views/forms.py:263
msgid "Scrub: let other know how your scrub looks like!" msgid "Scrub: let other know how your scrub looks like!"
msgstr "Blouse : montrez aux autres à quoi ressemble votre blouse !" msgstr "Blouse : montrez aux autres à quoi ressemble votre blouse !"
#: core/views/forms.py:308 #: core/views/forms.py:315
msgid "Bad image format, only jpeg, png, and gif are accepted" msgid "Bad image format, only jpeg, png, webp and gif are accepted"
msgstr "Mauvais format d'image, seuls les jpeg, png, et gif sont acceptés" msgstr "Mauvais format d'image, seuls les jpeg, png, webp et gif sont acceptés"
#: core/views/forms.py:329 #: core/views/forms.py:336
msgid "Godfather / Godmother" msgid "Godfather / Godmother"
msgstr "Parrain / Marraine" msgstr "Parrain / Marraine"
#: core/views/forms.py:330 #: core/views/forms.py:337
msgid "Godchild" msgid "Godchild"
msgstr "Fillot / Fillote" msgstr "Fillot / Fillote"
#: core/views/forms.py:335 counter/forms.py:67 trombi/views.py:149 #: core/views/forms.py:342 counter/forms.py:67 trombi/views.py:149
msgid "Select user" msgid "Select user"
msgstr "Choisir un utilisateur" msgstr "Choisir un utilisateur"
#: core/views/forms.py:348 core/views/forms.py:366 election/models.py:22 #: core/views/forms.py:355 core/views/forms.py:373 election/models.py:22
#: election/views.py:147 #: election/views.py:147
msgid "edit groups" msgid "edit groups"
msgstr "groupe d'édition" msgstr "groupe d'édition"
#: core/views/forms.py:351 core/views/forms.py:369 election/models.py:29 #: core/views/forms.py:358 core/views/forms.py:376 election/models.py:29
#: election/views.py:150 #: election/views.py:150
msgid "view groups" msgid "view groups"
msgstr "groupe de vue" msgstr "groupe de vue"
@ -3710,7 +3710,7 @@ msgstr "Nous n'avons pas réussi à vérifier que cette adresse mail existe."
msgid "Family" msgid "Family"
msgstr "Famille" msgstr "Famille"
#: core/views/user.py:207 sas/templates/sas/album.jinja:63 #: core/views/user.py:207 sas/templates/sas/album.jinja:64
#: trombi/templates/trombi/export.jinja:25 #: trombi/templates/trombi/export.jinja:25
#: trombi/templates/trombi/user_profile.jinja:11 #: trombi/templates/trombi/user_profile.jinja:11
msgid "Pictures" msgid "Pictures"
@ -3889,8 +3889,8 @@ msgstr "quantité"
msgid "Sith account" msgid "Sith account"
msgstr "Compte utilisateur" msgstr "Compte utilisateur"
#: counter/models.py:683 sith/settings.py:396 sith/settings.py:401 #: counter/models.py:683 sith/settings.py:405 sith/settings.py:410
#: sith/settings.py:421 #: sith/settings.py:430
msgid "Credit card" msgid "Credit card"
msgstr "Carte bancaire" msgstr "Carte bancaire"
@ -4926,12 +4926,12 @@ msgid "Washing and drying"
msgstr "Lavage et séchage" msgstr "Lavage et séchage"
#: launderette/templates/launderette/launderette_book.jinja:27 #: launderette/templates/launderette/launderette_book.jinja:27
#: sith/settings.py:635 #: sith/settings.py:644
msgid "Washing" msgid "Washing"
msgstr "Lavage" msgstr "Lavage"
#: launderette/templates/launderette/launderette_book.jinja:31 #: launderette/templates/launderette/launderette_book.jinja:31
#: sith/settings.py:635 #: sith/settings.py:644
msgid "Drying" msgid "Drying"
msgstr "Séchage" msgstr "Séchage"
@ -5127,30 +5127,30 @@ msgstr "signalant"
msgid "reason" msgid "reason"
msgstr "raison" msgstr "raison"
#: pedagogy/templates/pedagogy/guide.jinja:4 #: pedagogy/templates/pedagogy/guide.jinja:5
msgid "UV Guide" msgid "UV Guide"
msgstr "Guide des UVs" msgstr "Guide des UVs"
#: pedagogy/templates/pedagogy/guide.jinja:55 #: pedagogy/templates/pedagogy/guide.jinja:56
#, python-format #, python-format
msgid "%(display_name)s" msgid "%(display_name)s"
msgstr "%(display_name)s" msgstr "%(display_name)s"
#: pedagogy/templates/pedagogy/guide.jinja:69 #: pedagogy/templates/pedagogy/guide.jinja:70
#, python-format #, python-format
msgid "%(credit_type)s" msgid "%(credit_type)s"
msgstr "%(credit_type)s" msgstr "%(credit_type)s"
#: pedagogy/templates/pedagogy/guide.jinja:87 #: pedagogy/templates/pedagogy/guide.jinja:88
#: pedagogy/templates/pedagogy/moderation.jinja:12 #: pedagogy/templates/pedagogy/moderation.jinja:12
msgid "UV" msgid "UV"
msgstr "UE" msgstr "UE"
#: pedagogy/templates/pedagogy/guide.jinja:89 #: pedagogy/templates/pedagogy/guide.jinja:90
msgid "Department" msgid "Department"
msgstr "Département" msgstr "Département"
#: pedagogy/templates/pedagogy/guide.jinja:90 #: pedagogy/templates/pedagogy/guide.jinja:91
msgid "Credit type" msgid "Credit type"
msgstr "Type de crédit" msgstr "Type de crédit"
@ -5335,20 +5335,20 @@ msgstr "Utilisateur à sélectionner"
msgid "picture" msgid "picture"
msgstr "photo" msgstr "photo"
#: sas/templates/sas/album.jinja:9 sas/templates/sas/main.jinja:8 #: sas/templates/sas/album.jinja:10 sas/templates/sas/main.jinja:8
#: sas/templates/sas/main.jinja:17 sas/templates/sas/picture.jinja:8 #: sas/templates/sas/main.jinja:17 sas/templates/sas/picture.jinja:8
msgid "SAS" msgid "SAS"
msgstr "SAS" msgstr "SAS"
#: sas/templates/sas/album.jinja:52 sas/templates/sas/moderation.jinja:10 #: sas/templates/sas/album.jinja:53 sas/templates/sas/moderation.jinja:10
msgid "Albums" msgid "Albums"
msgstr "Albums" msgstr "Albums"
#: sas/templates/sas/album.jinja:117 #: sas/templates/sas/album.jinja:97
msgid "Upload" msgid "Upload"
msgstr "Envoyer" msgstr "Envoyer"
#: sas/templates/sas/album.jinja:124 #: sas/templates/sas/album.jinja:104
msgid "Template generation time: " msgid "Template generation time: "
msgstr "Temps de génération du template : " msgstr "Temps de génération du template : "
@ -5401,380 +5401,380 @@ msgstr "Erreur de création de l'album %(album)s : %(msg)s"
msgid "Add user" msgid "Add user"
msgstr "Ajouter une personne" msgstr "Ajouter une personne"
#: sith/settings.py:247 sith/settings.py:458 #: sith/settings.py:247 sith/settings.py:467
msgid "English" msgid "English"
msgstr "Anglais" msgstr "Anglais"
#: sith/settings.py:247 sith/settings.py:457 #: sith/settings.py:247 sith/settings.py:466
msgid "French" msgid "French"
msgstr "Français" msgstr "Français"
#: sith/settings.py:377 #: sith/settings.py:386
msgid "TC" msgid "TC"
msgstr "TC" msgstr "TC"
#: sith/settings.py:378 #: sith/settings.py:387
msgid "IMSI" msgid "IMSI"
msgstr "IMSI" msgstr "IMSI"
#: sith/settings.py:379 #: sith/settings.py:388
msgid "IMAP" msgid "IMAP"
msgstr "IMAP" msgstr "IMAP"
#: sith/settings.py:380 #: sith/settings.py:389
msgid "INFO" msgid "INFO"
msgstr "INFO" msgstr "INFO"
#: sith/settings.py:381 #: sith/settings.py:390
msgid "GI" msgid "GI"
msgstr "GI" msgstr "GI"
#: sith/settings.py:382 sith/settings.py:468 #: sith/settings.py:391 sith/settings.py:477
msgid "E" msgid "E"
msgstr "E" msgstr "E"
#: sith/settings.py:383 #: sith/settings.py:392
msgid "EE" msgid "EE"
msgstr "EE" msgstr "EE"
#: sith/settings.py:384 #: sith/settings.py:393
msgid "GESC" msgid "GESC"
msgstr "GESC" msgstr "GESC"
#: sith/settings.py:385 #: sith/settings.py:394
msgid "GMC" msgid "GMC"
msgstr "GMC" msgstr "GMC"
#: sith/settings.py:386 #: sith/settings.py:395
msgid "MC" msgid "MC"
msgstr "MC" msgstr "MC"
#: sith/settings.py:387 #: sith/settings.py:396
msgid "EDIM" msgid "EDIM"
msgstr "EDIM" msgstr "EDIM"
#: sith/settings.py:388 #: sith/settings.py:397
msgid "Humanities" msgid "Humanities"
msgstr "Humanités" msgstr "Humanités"
#: sith/settings.py:389 #: sith/settings.py:398
msgid "N/A" msgid "N/A"
msgstr "N/A" msgstr "N/A"
#: sith/settings.py:393 sith/settings.py:400 sith/settings.py:419 #: sith/settings.py:402 sith/settings.py:409 sith/settings.py:428
msgid "Check" msgid "Check"
msgstr "Chèque" msgstr "Chèque"
#: sith/settings.py:394 sith/settings.py:402 sith/settings.py:420 #: sith/settings.py:403 sith/settings.py:411 sith/settings.py:429
msgid "Cash" msgid "Cash"
msgstr "Espèces" msgstr "Espèces"
#: sith/settings.py:395 #: sith/settings.py:404
msgid "Transfert" msgid "Transfert"
msgstr "Virement" msgstr "Virement"
#: sith/settings.py:408 #: sith/settings.py:417
msgid "Belfort" msgid "Belfort"
msgstr "Belfort" msgstr "Belfort"
#: sith/settings.py:409 #: sith/settings.py:418
msgid "Sevenans" msgid "Sevenans"
msgstr "Sevenans" msgstr "Sevenans"
#: sith/settings.py:410 #: sith/settings.py:419
msgid "Montbéliard" msgid "Montbéliard"
msgstr "Montbéliard" msgstr "Montbéliard"
#: sith/settings.py:438 #: sith/settings.py:447
msgid "Free" msgid "Free"
msgstr "Libre" msgstr "Libre"
#: sith/settings.py:439 #: sith/settings.py:448
msgid "CS" msgid "CS"
msgstr "CS" msgstr "CS"
#: sith/settings.py:440 #: sith/settings.py:449
msgid "TM" msgid "TM"
msgstr "TM" msgstr "TM"
#: sith/settings.py:441 #: sith/settings.py:450
msgid "OM" msgid "OM"
msgstr "OM" msgstr "OM"
#: sith/settings.py:442 #: sith/settings.py:451
msgid "QC" msgid "QC"
msgstr "QC" msgstr "QC"
#: sith/settings.py:443 #: sith/settings.py:452
msgid "EC" msgid "EC"
msgstr "EC" msgstr "EC"
#: sith/settings.py:444 #: sith/settings.py:453
msgid "RN" msgid "RN"
msgstr "RN" msgstr "RN"
#: sith/settings.py:445 #: sith/settings.py:454
msgid "ST" msgid "ST"
msgstr "ST" msgstr "ST"
#: sith/settings.py:446 #: sith/settings.py:455
msgid "EXT" msgid "EXT"
msgstr "EXT" msgstr "EXT"
#: sith/settings.py:451 #: sith/settings.py:460
msgid "Autumn" msgid "Autumn"
msgstr "Automne" msgstr "Automne"
#: sith/settings.py:452 #: sith/settings.py:461
msgid "Spring" msgid "Spring"
msgstr "Printemps" msgstr "Printemps"
#: sith/settings.py:453 #: sith/settings.py:462
msgid "Autumn and spring" msgid "Autumn and spring"
msgstr "Automne et printemps" msgstr "Automne et printemps"
#: sith/settings.py:459 #: sith/settings.py:468
msgid "German" msgid "German"
msgstr "Allemand" msgstr "Allemand"
#: sith/settings.py:460 #: sith/settings.py:469
msgid "Spanish" msgid "Spanish"
msgstr "Espagnol" msgstr "Espagnol"
#: sith/settings.py:464 #: sith/settings.py:473
msgid "A" msgid "A"
msgstr "A" msgstr "A"
#: sith/settings.py:465 #: sith/settings.py:474
msgid "B" msgid "B"
msgstr "B" msgstr "B"
#: sith/settings.py:466 #: sith/settings.py:475
msgid "C" msgid "C"
msgstr "C" msgstr "C"
#: sith/settings.py:467 #: sith/settings.py:476
msgid "D" msgid "D"
msgstr "D" msgstr "D"
#: sith/settings.py:469 #: sith/settings.py:478
msgid "FX" msgid "FX"
msgstr "FX" msgstr "FX"
#: sith/settings.py:470 #: sith/settings.py:479
msgid "F" msgid "F"
msgstr "F" msgstr "F"
#: sith/settings.py:471 #: sith/settings.py:480
msgid "Abs" msgid "Abs"
msgstr "Abs" msgstr "Abs"
#: sith/settings.py:475 #: sith/settings.py:484
msgid "Selling deletion" msgid "Selling deletion"
msgstr "Suppression de vente" msgstr "Suppression de vente"
#: sith/settings.py:476 #: sith/settings.py:485
msgid "Refilling deletion" msgid "Refilling deletion"
msgstr "Suppression de rechargement" msgstr "Suppression de rechargement"
#: sith/settings.py:513 #: sith/settings.py:522
msgid "One semester" msgid "One semester"
msgstr "Un semestre, 20 €" msgstr "Un semestre, 20 €"
#: sith/settings.py:514 #: sith/settings.py:523
msgid "Two semesters" msgid "Two semesters"
msgstr "Deux semestres, 35 €" msgstr "Deux semestres, 35 €"
#: sith/settings.py:516 #: sith/settings.py:525
msgid "Common core cursus" msgid "Common core cursus"
msgstr "Cursus tronc commun, 60 €" msgstr "Cursus tronc commun, 60 €"
#: sith/settings.py:520 #: sith/settings.py:529
msgid "Branch cursus" msgid "Branch cursus"
msgstr "Cursus branche, 60 €" msgstr "Cursus branche, 60 €"
#: sith/settings.py:521 #: sith/settings.py:530
msgid "Alternating cursus" msgid "Alternating cursus"
msgstr "Cursus alternant, 30 €" msgstr "Cursus alternant, 30 €"
#: sith/settings.py:522 #: sith/settings.py:531
msgid "Honorary member" msgid "Honorary member"
msgstr "Membre honoraire, 0 €" msgstr "Membre honoraire, 0 €"
#: sith/settings.py:523 #: sith/settings.py:532
msgid "Assidu member" msgid "Assidu member"
msgstr "Membre d'Assidu, 0 €" msgstr "Membre d'Assidu, 0 €"
#: sith/settings.py:524 #: sith/settings.py:533
msgid "Amicale/DOCEO member" msgid "Amicale/DOCEO member"
msgstr "Membre de l'Amicale/DOCEO, 0 €" msgstr "Membre de l'Amicale/DOCEO, 0 €"
#: sith/settings.py:525 #: sith/settings.py:534
msgid "UT network member" msgid "UT network member"
msgstr "Cotisant du réseau UT, 0 €" msgstr "Cotisant du réseau UT, 0 €"
#: sith/settings.py:526 #: sith/settings.py:535
msgid "CROUS member" msgid "CROUS member"
msgstr "Membres du CROUS, 0 €" msgstr "Membres du CROUS, 0 €"
#: sith/settings.py:527 #: sith/settings.py:536
msgid "Sbarro/ESTA member" msgid "Sbarro/ESTA member"
msgstr "Membre de Sbarro ou de l'ESTA, 20 €" msgstr "Membre de Sbarro ou de l'ESTA, 20 €"
#: sith/settings.py:529 #: sith/settings.py:538
msgid "One semester Welcome Week" msgid "One semester Welcome Week"
msgstr "Un semestre Welcome Week" msgstr "Un semestre Welcome Week"
#: sith/settings.py:533 #: sith/settings.py:542
msgid "One month for free" msgid "One month for free"
msgstr "Un mois gratuit" msgstr "Un mois gratuit"
#: sith/settings.py:534 #: sith/settings.py:543
msgid "Two months for free" msgid "Two months for free"
msgstr "Deux mois gratuits" msgstr "Deux mois gratuits"
#: sith/settings.py:535 #: sith/settings.py:544
msgid "Eurok's volunteer" msgid "Eurok's volunteer"
msgstr "Bénévole Eurockéennes" msgstr "Bénévole Eurockéennes"
#: sith/settings.py:537 #: sith/settings.py:546
msgid "Six weeks for free" msgid "Six weeks for free"
msgstr "6 semaines gratuites" msgstr "6 semaines gratuites"
#: sith/settings.py:541 #: sith/settings.py:550
msgid "One day" msgid "One day"
msgstr "Un jour" msgstr "Un jour"
#: sith/settings.py:542 #: sith/settings.py:551
msgid "GA staff member" msgid "GA staff member"
msgstr "Membre staff GA (2 semaines), 1 €" msgstr "Membre staff GA (2 semaines), 1 €"
#: sith/settings.py:545 #: sith/settings.py:554
msgid "One semester (-20%)" msgid "One semester (-20%)"
msgstr "Un semestre (-20%), 12 €" msgstr "Un semestre (-20%), 12 €"
#: sith/settings.py:550 #: sith/settings.py:559
msgid "Two semesters (-20%)" msgid "Two semesters (-20%)"
msgstr "Deux semestres (-20%), 22 €" msgstr "Deux semestres (-20%), 22 €"
#: sith/settings.py:555 #: sith/settings.py:564
msgid "Common core cursus (-20%)" msgid "Common core cursus (-20%)"
msgstr "Cursus tronc commun (-20%), 36 €" msgstr "Cursus tronc commun (-20%), 36 €"
#: sith/settings.py:560 #: sith/settings.py:569
msgid "Branch cursus (-20%)" msgid "Branch cursus (-20%)"
msgstr "Cursus branche (-20%), 36 €" msgstr "Cursus branche (-20%), 36 €"
#: sith/settings.py:565 #: sith/settings.py:574
msgid "Alternating cursus (-20%)" msgid "Alternating cursus (-20%)"
msgstr "Cursus alternant (-20%), 24 €" msgstr "Cursus alternant (-20%), 24 €"
#: sith/settings.py:571 #: sith/settings.py:580
msgid "One year for free(CA offer)" msgid "One year for free(CA offer)"
msgstr "Une année offerte (Offre CA)" msgstr "Une année offerte (Offre CA)"
#: sith/settings.py:591 #: sith/settings.py:600
msgid "President" msgid "President"
msgstr "Président⸱e" msgstr "Président⸱e"
#: sith/settings.py:592 #: sith/settings.py:601
msgid "Vice-President" msgid "Vice-President"
msgstr "Vice-Président⸱e" msgstr "Vice-Président⸱e"
#: sith/settings.py:593 #: sith/settings.py:602
msgid "Treasurer" msgid "Treasurer"
msgstr "Trésorier⸱e" msgstr "Trésorier⸱e"
#: sith/settings.py:594 #: sith/settings.py:603
msgid "Communication supervisor" msgid "Communication supervisor"
msgstr "Responsable communication" msgstr "Responsable communication"
#: sith/settings.py:595 #: sith/settings.py:604
msgid "Secretary" msgid "Secretary"
msgstr "Secrétaire" msgstr "Secrétaire"
#: sith/settings.py:596 #: sith/settings.py:605
msgid "IT supervisor" msgid "IT supervisor"
msgstr "Responsable info" msgstr "Responsable info"
#: sith/settings.py:597 #: sith/settings.py:606
msgid "Board member" msgid "Board member"
msgstr "Membre du bureau" msgstr "Membre du bureau"
#: sith/settings.py:598 #: sith/settings.py:607
msgid "Active member" msgid "Active member"
msgstr "Membre actif⸱ve" msgstr "Membre actif⸱ve"
#: sith/settings.py:599 #: sith/settings.py:608
msgid "Curious" msgid "Curious"
msgstr "Curieux⸱euse" msgstr "Curieux⸱euse"
#: sith/settings.py:639 #: sith/settings.py:648
msgid "A new poster needs to be moderated" msgid "A new poster needs to be moderated"
msgstr "Une nouvelle affiche a besoin d'être modérée" msgstr "Une nouvelle affiche a besoin d'être modérée"
#: sith/settings.py:640 #: sith/settings.py:649
msgid "A new mailing list needs to be moderated" msgid "A new mailing list needs to be moderated"
msgstr "Une nouvelle mailing list a besoin d'être modérée" msgstr "Une nouvelle mailing list a besoin d'être modérée"
#: sith/settings.py:643 #: sith/settings.py:652
msgid "A new pedagogy comment has been signaled for moderation" msgid "A new pedagogy comment has been signaled for moderation"
msgstr "" msgstr ""
"Un nouveau commentaire de la pédagogie a été signalé pour la modération" "Un nouveau commentaire de la pédagogie a été signalé pour la modération"
#: sith/settings.py:645 #: sith/settings.py:654
#, python-format #, python-format
msgid "There are %s fresh news to be moderated" msgid "There are %s fresh news to be moderated"
msgstr "Il y a %s nouvelles toutes fraîches à modérer" msgstr "Il y a %s nouvelles toutes fraîches à modérer"
#: sith/settings.py:646 #: sith/settings.py:655
msgid "New files to be moderated" msgid "New files to be moderated"
msgstr "Nouveaux fichiers à modérer" msgstr "Nouveaux fichiers à modérer"
#: sith/settings.py:647 #: sith/settings.py:656
#, python-format #, python-format
msgid "There are %s pictures to be moderated in the SAS" msgid "There are %s pictures to be moderated in the SAS"
msgstr "Il y a %s photos à modérer dans le SAS" msgstr "Il y a %s photos à modérer dans le SAS"
#: sith/settings.py:648 #: sith/settings.py:657
msgid "You've been identified on some pictures" msgid "You've been identified on some pictures"
msgstr "Vous avez été identifié sur des photos" msgstr "Vous avez été identifié sur des photos"
#: sith/settings.py:649 #: sith/settings.py:658
#, python-format #, python-format
msgid "You just refilled of %s" msgid "You just refilled of %s"
msgstr "Vous avez rechargé votre compte de %s" msgstr "Vous avez rechargé votre compte de %s"
#: sith/settings.py:650 #: sith/settings.py:659
#, python-format #, python-format
msgid "You just bought %s" msgid "You just bought %s"
msgstr "Vous avez acheté %s" msgstr "Vous avez acheté %s"
#: sith/settings.py:651 #: sith/settings.py:660
msgid "You have a notification" msgid "You have a notification"
msgstr "Vous avez une notification" msgstr "Vous avez une notification"
#: sith/settings.py:663 #: sith/settings.py:672
msgid "Success!" msgid "Success!"
msgstr "Succès !" msgstr "Succès !"
#: sith/settings.py:664 #: sith/settings.py:673
msgid "Fail!" msgid "Fail!"
msgstr "Échec !" msgstr "Échec !"
#: sith/settings.py:665 #: sith/settings.py:674
msgid "You successfully posted an article in the Weekmail" msgid "You successfully posted an article in the Weekmail"
msgstr "Article posté avec succès dans le Weekmail" msgstr "Article posté avec succès dans le Weekmail"
#: sith/settings.py:666 #: sith/settings.py:675
msgid "You successfully edited an article in the Weekmail" msgid "You successfully edited an article in the Weekmail"
msgstr "Article édité avec succès dans le Weekmail" msgstr "Article édité avec succès dans le Weekmail"
#: sith/settings.py:667 #: sith/settings.py:676
msgid "You successfully sent the Weekmail" msgid "You successfully sent the Weekmail"
msgstr "Weekmail envoyé avec succès" msgstr "Weekmail envoyé avec succès"
#: sith/settings.py:675 #: sith/settings.py:684
msgid "AE tee-shirt" msgid "AE tee-shirt"
msgstr "Tee-shirt AE" msgstr "Tee-shirt AE"