Unverified Commit 162db37d authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Improve errors raised by registration_fields

parent 711f1202
...@@ -7,9 +7,9 @@ msgid "" ...@@ -7,9 +7,9 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-12 14:06+0100\n" "POT-Creation-Date: 2018-02-16 08:57+0100\n"
"PO-Revision-Date: 2018-02-14 17:07+0100\n" "PO-Revision-Date: 2018-02-16 08:57+0100\n"
"Last-Translator: Sébastiaan Versteeg <se_bastiaan@outlook.com>\n" "Last-Translator: Thom Wiggers <thom@thomwiggers.nl>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: nl\n" "Language: nl\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
...@@ -18,27 +18,27 @@ msgstr "" ...@@ -18,27 +18,27 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.0.6\n" "X-Generator: Poedit 2.0.6\n"
#: admin.py:90 #: admin.py:95
msgid "Event Date" msgid "Event Date"
msgstr "Evenementdatum" msgstr "Evenementdatum"
#: admin.py:99 #: admin.py:104
msgid "Registration Start" msgid "Registration Start"
msgstr "Start Aanmelden" msgstr "Start Aanmelden"
#: admin.py:102 #: admin.py:107
msgid "Edit" msgid "Edit"
msgstr "Aanpassen" msgstr "Aanpassen"
#: admin.py:112 #: admin.py:117
msgid "Number of participants" msgid "Number of participants"
msgstr "Aantal deelnemers" msgstr "Aantal deelnemers"
#: admin.py:116 #: admin.py:121
msgid "Publish selected events" msgid "Publish selected events"
msgstr "Publiceer geselecteerde evenementen" msgstr "Publiceer geselecteerde evenementen"
#: admin.py:120 #: admin.py:125
msgid "Unpublish selected events" msgid "Unpublish selected events"
msgstr "Publicatie van geselecteerde evenementen ongedaan maken" msgstr "Publicatie van geselecteerde evenementen ongedaan maken"
...@@ -367,24 +367,28 @@ msgstr "verplicht" ...@@ -367,24 +367,28 @@ msgstr "verplicht"
msgid "last changed" msgid "last changed"
msgstr "laatst aangepast" msgstr "laatst aangepast"
#: services.py:82 #: services.py:81
msgid "" msgid ""
"You cannot re-register anymore since you've cancelled after the deadline." "You cannot re-register anymore since you've cancelled after the deadline."
msgstr "" msgstr ""
"Je kunt je niet opnieuw aanmelden omdat je je hebt afgemeld na de deadline." "Je kunt je niet opnieuw aanmelden omdat je je hebt afgemeld na de deadline."
#: services.py:92 #: services.py:91
msgid "You were already registered." msgid "You were already registered."
msgstr "Je bent al aangemeld." msgstr "Je bent al aangemeld."
#: services.py:94 #: services.py:93
msgid "You may not register." msgid "You may not register."
msgstr "Je mag je niet aanmelden." msgstr "Je mag je niet aanmelden."
#: services.py:123 services.py:137 services.py:189 #: services.py:122 services.py:136 services.py:167
msgid "You are not registered for this event." msgid "You are not registered for this event."
msgstr "Je bent niet aangemeld voor dit evenement." msgstr "Je bent niet aangemeld voor dit evenement."
#: services.py:190
msgid "You are not allowed to update this registration."
msgstr "Je mag deze aanmelding niet bijwerken."
#: templates/events/admin/details.html:4 templates/events/admin/details.html:5 #: templates/events/admin/details.html:4 templates/events/admin/details.html:5
#: templates/events/admin/email_export.html:4 #: templates/events/admin/email_export.html:4
#: templates/events/admin/email_export.html:5 #: templates/events/admin/email_export.html:5
......
...@@ -162,8 +162,9 @@ def registration_fields(member, event): ...@@ -162,8 +162,9 @@ def registration_fields(member, event):
event=event, event=event,
member=member member=member
) )
except Registration.DoesNotExist: except Registration.DoesNotExist as error:
pass raise RegistrationError(
_("You are not registered for this event.")) from error
if (event_permissions(member, event)["update_registration"] and if (event_permissions(member, event)["update_registration"] and
registration): registration):
...@@ -185,4 +186,5 @@ def registration_fields(member, event): ...@@ -185,4 +186,5 @@ def registration_fields(member, event):
return fields return fields
else: else:
raise RegistrationError(_("You are not registered for this event.")) raise RegistrationError(
_("You are not allowed to update this registration."))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment