mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 22:29:32 +00:00
Merge pull request #1533 from ae-utbm/counter-msg
more precise error messages when searching users for click
This commit is contained in:
2 files changed
+22
-3
No files matched your search
+7
-1
@@ -130,8 +130,14 @@ class GetUserForm(forms.Form):
|
|||||||
elif cleaned_data["id"]:
|
elif cleaned_data["id"]:
|
||||||
customer = Customer.objects.filter(user=cleaned_data["id"]).first()
|
customer = Customer.objects.filter(user=cleaned_data["id"]).first()
|
||||||
|
|
||||||
if customer is None or not customer.can_buy:
|
if customer is None:
|
||||||
raise forms.ValidationError(_("User not found"))
|
raise forms.ValidationError(_("User not found"))
|
||||||
|
if not customer.can_buy:
|
||||||
|
raise forms.ValidationError(_("This user cannot buy items on counters."))
|
||||||
|
if customer.user.is_banned_counter:
|
||||||
|
raise forms.ValidationError(
|
||||||
|
_("This user is banned from AE places. Take him/her out if you can.")
|
||||||
|
)
|
||||||
cleaned_data["user_id"] = customer.user_id
|
cleaned_data["user_id"] = customer.user_id
|
||||||
cleaned_data["user"] = customer.user
|
cleaned_data["user"] = customer.user
|
||||||
return cleaned_data
|
return cleaned_data
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2026-10-25 12:04+0100\n"
|
"POT-Creation-Date: 2026-10-27 23:26+0100\n"
|
||||||
"PO-Revision-Date: 2016-07-18\n"
|
"PO-Revision-Date: 2016-07-18\n"
|
||||||
"Last-Translator: Maréchal <thomas.girod@utbm.fr\n"
|
"Last-Translator: Maréchal <thomas.girod@utbm.fr\n"
|
||||||
"Language-Team: AE info <ae.info@utbm.fr>\n"
|
"Language-Team: AE info <ae.info@utbm.fr>\n"
|
||||||
@@ -3275,6 +3275,10 @@ msgstr "Erreur d'envoi du fichier %(file_name)s : %(msg)s"
|
|||||||
msgid "Apply rights recursively"
|
msgid "Apply rights recursively"
|
||||||
msgstr "Appliquer les droits récursivement"
|
msgstr "Appliquer les droits récursivement"
|
||||||
|
|
||||||
|
#: core/views/files.py
|
||||||
|
msgid "You cannot move this file there"
|
||||||
|
msgstr "Vous ne pouvez pas déplacer ce fichier là"
|
||||||
|
|
||||||
#: core/views/forms.py
|
#: core/views/forms.py
|
||||||
msgid "Ensure this timestamp is set in the future"
|
msgid "Ensure this timestamp is set in the future"
|
||||||
msgstr "Assurez-vous que cet horodatage est dans le futur"
|
msgstr "Assurez-vous que cet horodatage est dans le futur"
|
||||||
@@ -3388,6 +3392,14 @@ msgstr "Cet UID est invalide"
|
|||||||
msgid "User not found"
|
msgid "User not found"
|
||||||
msgstr "Utilisateur non trouvé"
|
msgstr "Utilisateur non trouvé"
|
||||||
|
|
||||||
|
#: counter/forms.py
|
||||||
|
msgid "This user cannot buy items on counters."
|
||||||
|
msgstr "Cet utilisateur ne peut pas faire d'achats sur les comptoirs."
|
||||||
|
|
||||||
|
#: counter/forms.py
|
||||||
|
msgid "This user is banned from AE places. Take him/her out if you can."
|
||||||
|
msgstr "Cette personne est ban comptoir. Faites-la sortir si vous le pouvez."
|
||||||
|
|
||||||
#: counter/forms.py
|
#: counter/forms.py
|
||||||
msgid "You are not a barman of this counter."
|
msgid "You are not a barman of this counter."
|
||||||
msgstr "Vous n'êtes pas barman sur ce comptoir."
|
msgstr "Vous n'êtes pas barman sur ce comptoir."
|
||||||
@@ -6114,7 +6126,8 @@ msgstr "Rendre cet emploi du temps publique"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"You can change this at any time in <a href=\"%(url)s\">your preferences</a>"
|
"You can change this at any time in <a href=\"%(url)s\">your preferences</a>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Vous pouvez changer ceci n'importe quand dans <a href=\"%(url)s\">vos préférences</a>"
|
"Vous pouvez changer ceci n'importe quand dans <a href=\"%(url)s\">vos "
|
||||||
|
"préférences</a>"
|
||||||
|
|
||||||
#: timetable/templates/timetable/generator.jinja
|
#: timetable/templates/timetable/generator.jinja
|
||||||
msgid "Save timetable"
|
msgid "Save timetable"
|
||||||
|
|||||||
Reference in new issue
Block a user