diff --git a/messages.pot b/messages.pot index bf3c95a..987a0aa 100644 --- a/messages.pot +++ b/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2021-10-26 23:29+0200\n" +"POT-Creation-Date: 2021-11-04 16:04+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -189,30 +189,30 @@ msgstr "" msgid "message" msgstr "" -#: project/api/organization/resources.py:348 -#: project/views/admin_unit_member_invitation.py:92 +#: project/api/organization/resources.py:355 +#: project/views/admin_unit_member_invitation.py:85 msgid "You have received an invitation" msgstr "" -#: project/forms/admin.py:10 project/templates/layout.html:308 -#: project/views/root.py:42 +#: project/forms/admin.py:10 project/templates/layout.html:309 +#: project/views/root.py:37 msgid "Terms of service" msgstr "" -#: project/forms/admin.py:11 project/templates/layout.html:312 -#: project/views/root.py:50 +#: project/forms/admin.py:11 project/templates/layout.html:313 +#: project/views/root.py:45 msgid "Legal notice" msgstr "" -#: project/forms/admin.py:12 project/templates/_macros.html:1409 -#: project/templates/layout.html:316 +#: project/forms/admin.py:12 project/templates/_macros.html:1412 +#: project/templates/layout.html:317 #: project/templates/widget/event_suggestion/create.html:204 -#: project/views/admin_unit.py:73 project/views/root.py:58 +#: project/views/admin_unit.py:73 project/views/root.py:53 msgid "Contact" msgstr "" -#: project/forms/admin.py:13 project/templates/layout.html:320 -#: project/views/root.py:66 +#: project/forms/admin.py:13 project/templates/layout.html:321 +#: project/views/root.py:61 msgid "Privacy" msgstr "" @@ -327,7 +327,7 @@ msgstr "" msgid "The short name is used to create a unique identifier for your events" msgstr "" -#: project/forms/admin_unit.py:41 project/templates/_macros.html:1545 +#: project/forms/admin_unit.py:41 project/templates/_macros.html:1548 msgid "Short name must contain only letters numbers or underscore" msgstr "" @@ -341,7 +341,7 @@ msgstr "" #: project/forms/admin_unit_member.py:23 project/forms/admin_unit_member.py:28 #: project/forms/event.py:58 project/forms/event_suggestion.py:38 #: project/forms/organizer.py:27 project/templates/_macros.html:262 -#: project/templates/_macros.html:1505 project/templates/admin/users.html:19 +#: project/templates/_macros.html:1508 project/templates/admin/users.html:19 msgid "Email" msgstr "" @@ -696,11 +696,11 @@ msgid "" " course it works without it." msgstr "" -#: project/forms/event.py:208 project/templates/_macros.html:1266 +#: project/forms/event.py:208 project/templates/_macros.html:1269 msgid "The start must be before the end." msgstr "" -#: project/forms/event.py:214 project/templates/_macros.html:1283 +#: project/forms/event.py:214 project/templates/_macros.html:1286 msgid "An event can last a maximum of 14 days." msgstr "" @@ -869,7 +869,7 @@ msgstr "" msgid "Update event" msgstr "" -#: project/forms/event.py:397 project/templates/_macros.html:1238 +#: project/forms/event.py:397 project/templates/_macros.html:1241 #: project/templates/event/actions.html:47 #: project/templates/event/delete.html:6 msgid "Delete event" @@ -1071,7 +1071,7 @@ msgstr "" msgid "Delete request" msgstr "" -#: project/forms/reference_request.py:28 project/templates/_macros.html:1421 +#: project/forms/reference_request.py:28 project/templates/_macros.html:1424 #: project/templates/event_suggestion/review_status.html:18 #: project/templates/reference_request/review_status.html:12 msgid "Review status" @@ -1134,7 +1134,7 @@ msgid "This field is required." msgstr "" #: project/templates/_macros.html:134 project/templates/_macros.html:418 -#: project/templates/_macros.html:934 +#: project/templates/_macros.html:937 msgid "Date" msgstr "" @@ -1188,12 +1188,12 @@ msgid "Event" msgstr "" #: project/templates/_macros.html:445 project/templates/_macros.html:604 -#: project/templates/_macros.html:1490 project/templates/event/actions.html:32 +#: project/templates/_macros.html:1493 project/templates/event/actions.html:32 msgid "Share" msgstr "" #: project/templates/_macros.html:449 project/templates/_macros.html:608 -#: project/templates/_macros.html:1520 +#: project/templates/_macros.html:1523 msgid "Add to calendar" msgstr "" @@ -1214,27 +1214,27 @@ msgstr "" msgid "The event takes place both offline and online." msgstr "" -#: project/templates/_macros.html:700 project/templates/event_date/list.html:5 +#: project/templates/_macros.html:703 project/templates/event_date/list.html:5 #: project/templates/event_date/list.html:300 #: project/templates/reference_request/review.html:32 msgid "Event Dates" msgstr "" -#: project/templates/_macros.html:792 +#: project/templates/_macros.html:795 msgid "Search location on Google" msgstr "" -#: project/templates/_macros.html:858 +#: project/templates/_macros.html:861 #, python-format msgid "%(count)d event dates" msgstr "" -#: project/templates/_macros.html:874 project/templates/_macros.html:876 +#: project/templates/_macros.html:877 project/templates/_macros.html:879 #: project/templates/event_date/list.html:321 msgid "First" msgstr "" -#: project/templates/_macros.html:879 project/templates/_macros.html:881 +#: project/templates/_macros.html:882 project/templates/_macros.html:884 #: project/templates/event_date/list.html:322 #: project/templates/widget/event_suggestion/create.html:193 #: project/templates/widget/event_suggestion/create.html:218 @@ -1245,12 +1245,12 @@ msgstr "" msgid "Previous" msgstr "" -#: project/templates/_macros.html:883 +#: project/templates/_macros.html:886 #, python-format msgid "Page %(page)d of %(pages)d (%(total)d total)" msgstr "" -#: project/templates/_macros.html:885 project/templates/_macros.html:887 +#: project/templates/_macros.html:888 project/templates/_macros.html:890 #: project/templates/event_date/list.html:324 #: project/templates/widget/event_suggestion/create.html:194 #: project/templates/widget/event_suggestion/create.html:219 @@ -1260,73 +1260,73 @@ msgstr "" msgid "Next" msgstr "" -#: project/templates/_macros.html:890 project/templates/_macros.html:892 +#: project/templates/_macros.html:893 project/templates/_macros.html:895 #: project/templates/event_date/list.html:325 msgid "Last" msgstr "" -#: project/templates/_macros.html:957 +#: project/templates/_macros.html:960 msgid "Radius" msgstr "" -#: project/templates/_macros.html:1167 +#: project/templates/_macros.html:1170 msgid "Edit image" msgstr "" -#: project/templates/_macros.html:1188 +#: project/templates/_macros.html:1191 msgid "Close" msgstr "" -#: project/templates/_macros.html:1189 +#: project/templates/_macros.html:1192 msgid "Okay" msgstr "" -#: project/templates/_macros.html:1201 +#: project/templates/_macros.html:1204 msgid "Choose image file" msgstr "" -#: project/templates/_macros.html:1237 project/templates/event/actions.html:46 +#: project/templates/_macros.html:1240 project/templates/event/actions.html:46 msgid "Edit event" msgstr "" -#: project/templates/_macros.html:1240 project/templates/manage/events.html:45 +#: project/templates/_macros.html:1243 project/templates/manage/events.html:45 msgid "More" msgstr "" -#: project/templates/_macros.html:1287 +#: project/templates/_macros.html:1290 msgid "Please enter a valid time, between 00:00 and 23:59." msgstr "" -#: project/templates/_macros.html:1315 +#: project/templates/_macros.html:1318 #, python-format msgid "Just use %(term)s" msgstr "" -#: project/templates/_macros.html:1381 +#: project/templates/_macros.html:1384 msgid "Event suggestion" msgstr "" -#: project/templates/_macros.html:1499 +#: project/templates/_macros.html:1502 msgid "Link copied" msgstr "" -#: project/templates/_macros.html:1499 +#: project/templates/_macros.html:1502 msgid "Copy link" msgstr "" -#: project/templates/_macros.html:1528 +#: project/templates/_macros.html:1531 msgid "Google calendar" msgstr "" -#: project/templates/_macros.html:1529 +#: project/templates/_macros.html:1532 msgid "Apple calendar" msgstr "" -#: project/templates/_macros.html:1530 +#: project/templates/_macros.html:1533 msgid "Yahoo calendar" msgstr "" -#: project/templates/_macros.html:1531 +#: project/templates/_macros.html:1534 msgid "Other calendar" msgstr "" @@ -1345,24 +1345,21 @@ msgstr "" msgid "Events" msgstr "" -#: project/templates/layout.html:176 -msgid "Planing" -msgstr "" - -#: project/templates/layout.html:177 -msgid "Example" -msgstr "" - #: project/templates/admin/admin.html:19 #: project/templates/admin/admin_units.html:4 #: project/templates/admin/admin_units.html:11 -#: project/templates/layout.html:186 +#: project/templates/layout.html:176 project/templates/layout.html:186 #: project/templates/manage/admin_units.html:3 #: project/templates/manage/admin_units.html:25 +#: project/templates/organization/main.html:4 msgid "Organizations" msgstr "" -#: project/templates/layout.html:187 +#: project/templates/layout.html:177 +msgid "Planing" +msgstr "" + +#: project/templates/layout.html:187 project/templates/layout.html:271 #: project/templates/oauth2_client/list.html:10 #: project/templates/oauth2_client/read.html:10 #: project/templates/oauth2_token/list.html:10 project/templates/profile.html:4 @@ -1465,11 +1462,11 @@ msgstr "" msgid "Widgets" msgstr "" -#: project/templates/layout.html:280 +#: project/templates/layout.html:281 msgid "Switch organization" msgstr "" -#: project/templates/developer/read.html:4 project/templates/layout.html:330 +#: project/templates/developer/read.html:4 project/templates/layout.html:331 #: project/templates/profile.html:29 msgid "Developer" msgstr "" @@ -1963,23 +1960,23 @@ msgstr "" msgid "Member successfully deleted" msgstr "" -#: project/views/admin_unit_member_invitation.py:45 +#: project/views/admin_unit_member_invitation.py:38 msgid "Invitation successfully accepted" msgstr "" -#: project/views/admin_unit_member_invitation.py:52 +#: project/views/admin_unit_member_invitation.py:45 msgid "Invitation successfully declined" msgstr "" -#: project/views/admin_unit_member_invitation.py:97 +#: project/views/admin_unit_member_invitation.py:90 msgid "Invitation successfully sent" msgstr "" -#: project/views/admin_unit_member_invitation.py:120 +#: project/views/admin_unit_member_invitation.py:113 msgid "Entered email does not match invitation email" msgstr "" -#: project/views/admin_unit_member_invitation.py:125 +#: project/views/admin_unit_member_invitation.py:118 msgid "Invitation successfully deleted" msgstr "" @@ -2153,10 +2150,16 @@ msgstr "" msgid "Show" msgstr "" -#: project/views/utils.py:142 +#: project/views/utils.py:143 msgid "You do not have permission for this action" msgstr "" +#: project/views/utils.py:264 +msgid "" +"The invitation was issued to another user. Sign in with the email address" +" the invitation was sent to." +msgstr "" + #: project/views/widget.py:150 msgid "Thank you so much! The event is being verified." msgstr "" diff --git a/project/translations/de/LC_MESSAGES/messages.mo b/project/translations/de/LC_MESSAGES/messages.mo index a51a8b3..fe8eb15 100644 Binary files a/project/translations/de/LC_MESSAGES/messages.mo and b/project/translations/de/LC_MESSAGES/messages.mo differ diff --git a/project/translations/de/LC_MESSAGES/messages.po b/project/translations/de/LC_MESSAGES/messages.po index 4c53367..2488d5b 100644 --- a/project/translations/de/LC_MESSAGES/messages.po +++ b/project/translations/de/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2021-10-26 23:29+0200\n" +"POT-Creation-Date: 2021-11-04 16:04+0100\n" "PO-Revision-Date: 2020-06-07 18:51+0200\n" "Last-Translator: FULL NAME \n" "Language: de\n" @@ -190,30 +190,30 @@ msgstr "." msgid "message" msgstr "message" -#: project/api/organization/resources.py:348 -#: project/views/admin_unit_member_invitation.py:92 +#: project/api/organization/resources.py:355 +#: project/views/admin_unit_member_invitation.py:85 msgid "You have received an invitation" msgstr "Du hast eine Einladung erhalten" -#: project/forms/admin.py:10 project/templates/layout.html:308 -#: project/views/root.py:42 +#: project/forms/admin.py:10 project/templates/layout.html:309 +#: project/views/root.py:37 msgid "Terms of service" msgstr "Nutzungsbedingungen" -#: project/forms/admin.py:11 project/templates/layout.html:312 -#: project/views/root.py:50 +#: project/forms/admin.py:11 project/templates/layout.html:313 +#: project/views/root.py:45 msgid "Legal notice" msgstr "Impressum" -#: project/forms/admin.py:12 project/templates/_macros.html:1409 -#: project/templates/layout.html:316 +#: project/forms/admin.py:12 project/templates/_macros.html:1412 +#: project/templates/layout.html:317 #: project/templates/widget/event_suggestion/create.html:204 -#: project/views/admin_unit.py:73 project/views/root.py:58 +#: project/views/admin_unit.py:73 project/views/root.py:53 msgid "Contact" msgstr "Kontakt" -#: project/forms/admin.py:13 project/templates/layout.html:320 -#: project/views/root.py:66 +#: project/forms/admin.py:13 project/templates/layout.html:321 +#: project/views/root.py:61 msgid "Privacy" msgstr "Datenschutz" @@ -339,7 +339,7 @@ msgstr "" "eindeutig zu identifizieren. Der Kurzname darf nur Buchstaben, Nummern " "und Unterstriche enthalten." -#: project/forms/admin_unit.py:41 project/templates/_macros.html:1545 +#: project/forms/admin_unit.py:41 project/templates/_macros.html:1548 msgid "Short name must contain only letters numbers or underscore" msgstr "Der Kurzname darf nur Buchstaben, Nummern und Unterstriche enthalten" @@ -353,7 +353,7 @@ msgstr "Link URL" #: project/forms/admin_unit_member.py:23 project/forms/admin_unit_member.py:28 #: project/forms/event.py:58 project/forms/event_suggestion.py:38 #: project/forms/organizer.py:27 project/templates/_macros.html:262 -#: project/templates/_macros.html:1505 project/templates/admin/users.html:19 +#: project/templates/_macros.html:1508 project/templates/admin/users.html:19 msgid "Email" msgstr "Email" @@ -728,11 +728,11 @@ msgstr "" "Wir empfehlen dir, ein Foto für die Veranstaltung hochzuladen. Es macht " "schon deutlich mehr her, aber es geht natürlich auch ohne." -#: project/forms/event.py:208 project/templates/_macros.html:1266 +#: project/forms/event.py:208 project/templates/_macros.html:1269 msgid "The start must be before the end." msgstr "Der Start muss vor dem Ende sein." -#: project/forms/event.py:214 project/templates/_macros.html:1283 +#: project/forms/event.py:214 project/templates/_macros.html:1286 msgid "An event can last a maximum of 14 days." msgstr "Eine Veranstaltung darf maximal 14 Tage dauern." @@ -911,7 +911,7 @@ msgstr "Wähle den öffentlichen Status der Veranstaltung." msgid "Update event" msgstr "Veranstaltung aktualisieren" -#: project/forms/event.py:397 project/templates/_macros.html:1238 +#: project/forms/event.py:397 project/templates/_macros.html:1241 #: project/templates/event/actions.html:47 #: project/templates/event/delete.html:6 msgid "Delete event" @@ -1117,7 +1117,7 @@ msgstr "Anfrage speichern" msgid "Delete request" msgstr "Anfrage löschen" -#: project/forms/reference_request.py:28 project/templates/_macros.html:1421 +#: project/forms/reference_request.py:28 project/templates/_macros.html:1424 #: project/templates/event_suggestion/review_status.html:18 #: project/templates/reference_request/review_status.html:12 msgid "Review status" @@ -1180,7 +1180,7 @@ msgid "This field is required." msgstr "Dieses Feld ist erforderlich." #: project/templates/_macros.html:134 project/templates/_macros.html:418 -#: project/templates/_macros.html:934 +#: project/templates/_macros.html:937 msgid "Date" msgstr "Datum" @@ -1234,12 +1234,12 @@ msgid "Event" msgstr "Veranstaltung" #: project/templates/_macros.html:445 project/templates/_macros.html:604 -#: project/templates/_macros.html:1490 project/templates/event/actions.html:32 +#: project/templates/_macros.html:1493 project/templates/event/actions.html:32 msgid "Share" msgstr "Teilen" #: project/templates/_macros.html:449 project/templates/_macros.html:608 -#: project/templates/_macros.html:1520 +#: project/templates/_macros.html:1523 msgid "Add to calendar" msgstr "Zum Kalender" @@ -1262,27 +1262,27 @@ msgstr "" "Die Veranstaltung findet sowohl als Präsenzveranstaltung als auch online " "statt." -#: project/templates/_macros.html:700 project/templates/event_date/list.html:5 +#: project/templates/_macros.html:703 project/templates/event_date/list.html:5 #: project/templates/event_date/list.html:300 #: project/templates/reference_request/review.html:32 msgid "Event Dates" msgstr "Termine" -#: project/templates/_macros.html:792 +#: project/templates/_macros.html:795 msgid "Search location on Google" msgstr "Ort bei Google suchen" -#: project/templates/_macros.html:858 +#: project/templates/_macros.html:861 #, python-format msgid "%(count)d event dates" msgstr "%(count)d Termine" -#: project/templates/_macros.html:874 project/templates/_macros.html:876 +#: project/templates/_macros.html:877 project/templates/_macros.html:879 #: project/templates/event_date/list.html:321 msgid "First" msgstr "Letzte" -#: project/templates/_macros.html:879 project/templates/_macros.html:881 +#: project/templates/_macros.html:882 project/templates/_macros.html:884 #: project/templates/event_date/list.html:322 #: project/templates/widget/event_suggestion/create.html:193 #: project/templates/widget/event_suggestion/create.html:218 @@ -1293,12 +1293,12 @@ msgstr "Letzte" msgid "Previous" msgstr "Zurück" -#: project/templates/_macros.html:883 +#: project/templates/_macros.html:886 #, python-format msgid "Page %(page)d of %(pages)d (%(total)d total)" msgstr "Seite %(page)d von %(pages)d (%(total)d insgesamt)" -#: project/templates/_macros.html:885 project/templates/_macros.html:887 +#: project/templates/_macros.html:888 project/templates/_macros.html:890 #: project/templates/event_date/list.html:324 #: project/templates/widget/event_suggestion/create.html:194 #: project/templates/widget/event_suggestion/create.html:219 @@ -1308,73 +1308,73 @@ msgstr "Seite %(page)d von %(pages)d (%(total)d insgesamt)" msgid "Next" msgstr "Weiter" -#: project/templates/_macros.html:890 project/templates/_macros.html:892 +#: project/templates/_macros.html:893 project/templates/_macros.html:895 #: project/templates/event_date/list.html:325 msgid "Last" msgstr "Erste" -#: project/templates/_macros.html:957 +#: project/templates/_macros.html:960 msgid "Radius" msgstr "Umkreis" -#: project/templates/_macros.html:1167 +#: project/templates/_macros.html:1170 msgid "Edit image" msgstr "Bild bearbeiten" -#: project/templates/_macros.html:1188 +#: project/templates/_macros.html:1191 msgid "Close" msgstr "Schließen" -#: project/templates/_macros.html:1189 +#: project/templates/_macros.html:1192 msgid "Okay" msgstr "OK" -#: project/templates/_macros.html:1201 +#: project/templates/_macros.html:1204 msgid "Choose image file" msgstr "Bild-Datei auswählen" -#: project/templates/_macros.html:1237 project/templates/event/actions.html:46 +#: project/templates/_macros.html:1240 project/templates/event/actions.html:46 msgid "Edit event" msgstr "Veranstaltung bearbeiten" -#: project/templates/_macros.html:1240 project/templates/manage/events.html:45 +#: project/templates/_macros.html:1243 project/templates/manage/events.html:45 msgid "More" msgstr "Mehr" -#: project/templates/_macros.html:1287 +#: project/templates/_macros.html:1290 msgid "Please enter a valid time, between 00:00 and 23:59." msgstr "Bitte gib eine gültige Uhrzeit zwischen 00:00 und 23:59 ein." -#: project/templates/_macros.html:1315 +#: project/templates/_macros.html:1318 #, python-format msgid "Just use %(term)s" msgstr "Verwende einfach %(term)s" -#: project/templates/_macros.html:1381 +#: project/templates/_macros.html:1384 msgid "Event suggestion" msgstr "Veranstaltungsvorschlag" -#: project/templates/_macros.html:1499 +#: project/templates/_macros.html:1502 msgid "Link copied" msgstr "Link kopiert" -#: project/templates/_macros.html:1499 +#: project/templates/_macros.html:1502 msgid "Copy link" msgstr "Link kopieren" -#: project/templates/_macros.html:1528 +#: project/templates/_macros.html:1531 msgid "Google calendar" msgstr "Google Kalender" -#: project/templates/_macros.html:1529 +#: project/templates/_macros.html:1532 msgid "Apple calendar" msgstr "Apple Kalender" -#: project/templates/_macros.html:1530 +#: project/templates/_macros.html:1533 msgid "Yahoo calendar" msgstr "Yahoo Kalender" -#: project/templates/_macros.html:1531 +#: project/templates/_macros.html:1534 msgid "Other calendar" msgstr "Anderer Kalender" @@ -1393,24 +1393,21 @@ msgstr "Kostenlos registrieren" msgid "Events" msgstr "Veranstaltungen" -#: project/templates/layout.html:176 -msgid "Planing" -msgstr "Planung" - -#: project/templates/layout.html:177 -msgid "Example" -msgstr "Beispiel" - #: project/templates/admin/admin.html:19 #: project/templates/admin/admin_units.html:4 #: project/templates/admin/admin_units.html:11 -#: project/templates/layout.html:186 +#: project/templates/layout.html:176 project/templates/layout.html:186 #: project/templates/manage/admin_units.html:3 #: project/templates/manage/admin_units.html:25 +#: project/templates/organization/main.html:4 msgid "Organizations" msgstr "Organisationen" -#: project/templates/layout.html:187 +#: project/templates/layout.html:177 +msgid "Planing" +msgstr "Planung" + +#: project/templates/layout.html:187 project/templates/layout.html:271 #: project/templates/oauth2_client/list.html:10 #: project/templates/oauth2_client/read.html:10 #: project/templates/oauth2_token/list.html:10 project/templates/profile.html:4 @@ -1513,11 +1510,11 @@ msgstr "Einstellungen" msgid "Widgets" msgstr "Widgets" -#: project/templates/layout.html:280 +#: project/templates/layout.html:281 msgid "Switch organization" msgstr "Organisation wechseln" -#: project/templates/developer/read.html:4 project/templates/layout.html:330 +#: project/templates/developer/read.html:4 project/templates/layout.html:331 #: project/templates/profile.html:29 msgid "Developer" msgstr "Entwickler" @@ -2020,23 +2017,23 @@ msgstr "Die eingegebene Email passt nicht zur Email des Mitglieds" msgid "Member successfully deleted" msgstr "Mitglied erfolgreich gelöscht" -#: project/views/admin_unit_member_invitation.py:45 +#: project/views/admin_unit_member_invitation.py:38 msgid "Invitation successfully accepted" msgstr "Einladung erfolgreich akzeptiert" -#: project/views/admin_unit_member_invitation.py:52 +#: project/views/admin_unit_member_invitation.py:45 msgid "Invitation successfully declined" msgstr "Einladung erfolgreich abgelehnt" -#: project/views/admin_unit_member_invitation.py:97 +#: project/views/admin_unit_member_invitation.py:90 msgid "Invitation successfully sent" msgstr "Einladung erfolgreich gesendet" -#: project/views/admin_unit_member_invitation.py:120 +#: project/views/admin_unit_member_invitation.py:113 msgid "Entered email does not match invitation email" msgstr "Die eingegebene Email passt nicht zur Email der Einladung" -#: project/views/admin_unit_member_invitation.py:125 +#: project/views/admin_unit_member_invitation.py:118 msgid "Invitation successfully deleted" msgstr "Einladung erfolgreich gelöscht" @@ -2216,10 +2213,16 @@ msgstr "Fehler im Feld %s: %s" msgid "Show" msgstr "Anzeigen" -#: project/views/utils.py:142 +#: project/views/utils.py:143 msgid "You do not have permission for this action" msgstr "Du hast keine Berechtigung für diese Aktion" +#: project/views/utils.py:264 +msgid "" +"The invitation was issued to another user. Sign in with the email address" +" the invitation was sent to." +msgstr "Die Einladung wurde für einen anderen Nutzer ausgestellt. Melde dich mit der Email-Adresse an, an die die Einladung geschickt wurde." + #: project/views/widget.py:150 msgid "Thank you so much! The event is being verified." msgstr "Vielen Dank! Die Veranstaltung wird geprüft." @@ -2270,3 +2273,6 @@ msgstr "Neue Veranstaltung zu prüfen" #~ msgid "URL für Infoscreen" #~ msgstr "URL für Infoscreen" +#~ msgid "Example" +#~ msgstr "Beispiel" + diff --git a/project/translations/en/LC_MESSAGES/messages.mo b/project/translations/en/LC_MESSAGES/messages.mo index 367745d..ececdf0 100644 Binary files a/project/translations/en/LC_MESSAGES/messages.mo and b/project/translations/en/LC_MESSAGES/messages.mo differ diff --git a/project/translations/en/LC_MESSAGES/messages.po b/project/translations/en/LC_MESSAGES/messages.po index 7099967..151fc8f 100644 --- a/project/translations/en/LC_MESSAGES/messages.po +++ b/project/translations/en/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2021-10-26 23:29+0200\n" +"POT-Creation-Date: 2021-11-04 16:04+0100\n" "PO-Revision-Date: 2021-04-30 15:04+0200\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -190,30 +190,30 @@ msgstr "" msgid "message" msgstr "" -#: project/api/organization/resources.py:348 -#: project/views/admin_unit_member_invitation.py:92 +#: project/api/organization/resources.py:355 +#: project/views/admin_unit_member_invitation.py:85 msgid "You have received an invitation" msgstr "" -#: project/forms/admin.py:10 project/templates/layout.html:308 -#: project/views/root.py:42 +#: project/forms/admin.py:10 project/templates/layout.html:309 +#: project/views/root.py:37 msgid "Terms of service" msgstr "" -#: project/forms/admin.py:11 project/templates/layout.html:312 -#: project/views/root.py:50 +#: project/forms/admin.py:11 project/templates/layout.html:313 +#: project/views/root.py:45 msgid "Legal notice" msgstr "" -#: project/forms/admin.py:12 project/templates/_macros.html:1409 -#: project/templates/layout.html:316 +#: project/forms/admin.py:12 project/templates/_macros.html:1412 +#: project/templates/layout.html:317 #: project/templates/widget/event_suggestion/create.html:204 -#: project/views/admin_unit.py:73 project/views/root.py:58 +#: project/views/admin_unit.py:73 project/views/root.py:53 msgid "Contact" msgstr "" -#: project/forms/admin.py:13 project/templates/layout.html:320 -#: project/views/root.py:66 +#: project/forms/admin.py:13 project/templates/layout.html:321 +#: project/views/root.py:61 msgid "Privacy" msgstr "" @@ -328,7 +328,7 @@ msgstr "" msgid "The short name is used to create a unique identifier for your events" msgstr "" -#: project/forms/admin_unit.py:41 project/templates/_macros.html:1545 +#: project/forms/admin_unit.py:41 project/templates/_macros.html:1548 msgid "Short name must contain only letters numbers or underscore" msgstr "" @@ -342,7 +342,7 @@ msgstr "" #: project/forms/admin_unit_member.py:23 project/forms/admin_unit_member.py:28 #: project/forms/event.py:58 project/forms/event_suggestion.py:38 #: project/forms/organizer.py:27 project/templates/_macros.html:262 -#: project/templates/_macros.html:1505 project/templates/admin/users.html:19 +#: project/templates/_macros.html:1508 project/templates/admin/users.html:19 msgid "Email" msgstr "" @@ -697,11 +697,11 @@ msgid "" " course it works without it." msgstr "" -#: project/forms/event.py:208 project/templates/_macros.html:1266 +#: project/forms/event.py:208 project/templates/_macros.html:1269 msgid "The start must be before the end." msgstr "" -#: project/forms/event.py:214 project/templates/_macros.html:1283 +#: project/forms/event.py:214 project/templates/_macros.html:1286 msgid "An event can last a maximum of 14 days." msgstr "" @@ -870,7 +870,7 @@ msgstr "" msgid "Update event" msgstr "" -#: project/forms/event.py:397 project/templates/_macros.html:1238 +#: project/forms/event.py:397 project/templates/_macros.html:1241 #: project/templates/event/actions.html:47 #: project/templates/event/delete.html:6 msgid "Delete event" @@ -1072,7 +1072,7 @@ msgstr "" msgid "Delete request" msgstr "" -#: project/forms/reference_request.py:28 project/templates/_macros.html:1421 +#: project/forms/reference_request.py:28 project/templates/_macros.html:1424 #: project/templates/event_suggestion/review_status.html:18 #: project/templates/reference_request/review_status.html:12 msgid "Review status" @@ -1135,7 +1135,7 @@ msgid "This field is required." msgstr "" #: project/templates/_macros.html:134 project/templates/_macros.html:418 -#: project/templates/_macros.html:934 +#: project/templates/_macros.html:937 msgid "Date" msgstr "" @@ -1189,12 +1189,12 @@ msgid "Event" msgstr "" #: project/templates/_macros.html:445 project/templates/_macros.html:604 -#: project/templates/_macros.html:1490 project/templates/event/actions.html:32 +#: project/templates/_macros.html:1493 project/templates/event/actions.html:32 msgid "Share" msgstr "" #: project/templates/_macros.html:449 project/templates/_macros.html:608 -#: project/templates/_macros.html:1520 +#: project/templates/_macros.html:1523 msgid "Add to calendar" msgstr "" @@ -1215,27 +1215,27 @@ msgstr "" msgid "The event takes place both offline and online." msgstr "" -#: project/templates/_macros.html:700 project/templates/event_date/list.html:5 +#: project/templates/_macros.html:703 project/templates/event_date/list.html:5 #: project/templates/event_date/list.html:300 #: project/templates/reference_request/review.html:32 msgid "Event Dates" msgstr "" -#: project/templates/_macros.html:792 +#: project/templates/_macros.html:795 msgid "Search location on Google" msgstr "" -#: project/templates/_macros.html:858 +#: project/templates/_macros.html:861 #, python-format msgid "%(count)d event dates" msgstr "" -#: project/templates/_macros.html:874 project/templates/_macros.html:876 +#: project/templates/_macros.html:877 project/templates/_macros.html:879 #: project/templates/event_date/list.html:321 msgid "First" msgstr "" -#: project/templates/_macros.html:879 project/templates/_macros.html:881 +#: project/templates/_macros.html:882 project/templates/_macros.html:884 #: project/templates/event_date/list.html:322 #: project/templates/widget/event_suggestion/create.html:193 #: project/templates/widget/event_suggestion/create.html:218 @@ -1246,12 +1246,12 @@ msgstr "" msgid "Previous" msgstr "" -#: project/templates/_macros.html:883 +#: project/templates/_macros.html:886 #, python-format msgid "Page %(page)d of %(pages)d (%(total)d total)" msgstr "" -#: project/templates/_macros.html:885 project/templates/_macros.html:887 +#: project/templates/_macros.html:888 project/templates/_macros.html:890 #: project/templates/event_date/list.html:324 #: project/templates/widget/event_suggestion/create.html:194 #: project/templates/widget/event_suggestion/create.html:219 @@ -1261,73 +1261,73 @@ msgstr "" msgid "Next" msgstr "" -#: project/templates/_macros.html:890 project/templates/_macros.html:892 +#: project/templates/_macros.html:893 project/templates/_macros.html:895 #: project/templates/event_date/list.html:325 msgid "Last" msgstr "" -#: project/templates/_macros.html:957 +#: project/templates/_macros.html:960 msgid "Radius" msgstr "" -#: project/templates/_macros.html:1167 +#: project/templates/_macros.html:1170 msgid "Edit image" msgstr "" -#: project/templates/_macros.html:1188 +#: project/templates/_macros.html:1191 msgid "Close" msgstr "" -#: project/templates/_macros.html:1189 +#: project/templates/_macros.html:1192 msgid "Okay" msgstr "" -#: project/templates/_macros.html:1201 +#: project/templates/_macros.html:1204 msgid "Choose image file" msgstr "" -#: project/templates/_macros.html:1237 project/templates/event/actions.html:46 +#: project/templates/_macros.html:1240 project/templates/event/actions.html:46 msgid "Edit event" msgstr "" -#: project/templates/_macros.html:1240 project/templates/manage/events.html:45 +#: project/templates/_macros.html:1243 project/templates/manage/events.html:45 msgid "More" msgstr "" -#: project/templates/_macros.html:1287 +#: project/templates/_macros.html:1290 msgid "Please enter a valid time, between 00:00 and 23:59." msgstr "" -#: project/templates/_macros.html:1315 +#: project/templates/_macros.html:1318 #, python-format msgid "Just use %(term)s" msgstr "" -#: project/templates/_macros.html:1381 +#: project/templates/_macros.html:1384 msgid "Event suggestion" msgstr "" -#: project/templates/_macros.html:1499 +#: project/templates/_macros.html:1502 msgid "Link copied" msgstr "" -#: project/templates/_macros.html:1499 +#: project/templates/_macros.html:1502 msgid "Copy link" msgstr "" -#: project/templates/_macros.html:1528 +#: project/templates/_macros.html:1531 msgid "Google calendar" msgstr "" -#: project/templates/_macros.html:1529 +#: project/templates/_macros.html:1532 msgid "Apple calendar" msgstr "" -#: project/templates/_macros.html:1530 +#: project/templates/_macros.html:1533 msgid "Yahoo calendar" msgstr "" -#: project/templates/_macros.html:1531 +#: project/templates/_macros.html:1534 msgid "Other calendar" msgstr "" @@ -1346,24 +1346,21 @@ msgstr "" msgid "Events" msgstr "" -#: project/templates/layout.html:176 -msgid "Planing" -msgstr "" - -#: project/templates/layout.html:177 -msgid "Example" -msgstr "" - #: project/templates/admin/admin.html:19 #: project/templates/admin/admin_units.html:4 #: project/templates/admin/admin_units.html:11 -#: project/templates/layout.html:186 +#: project/templates/layout.html:176 project/templates/layout.html:186 #: project/templates/manage/admin_units.html:3 #: project/templates/manage/admin_units.html:25 +#: project/templates/organization/main.html:4 msgid "Organizations" msgstr "" -#: project/templates/layout.html:187 +#: project/templates/layout.html:177 +msgid "Planing" +msgstr "" + +#: project/templates/layout.html:187 project/templates/layout.html:271 #: project/templates/oauth2_client/list.html:10 #: project/templates/oauth2_client/read.html:10 #: project/templates/oauth2_token/list.html:10 project/templates/profile.html:4 @@ -1466,11 +1463,11 @@ msgstr "" msgid "Widgets" msgstr "" -#: project/templates/layout.html:280 +#: project/templates/layout.html:281 msgid "Switch organization" msgstr "" -#: project/templates/developer/read.html:4 project/templates/layout.html:330 +#: project/templates/developer/read.html:4 project/templates/layout.html:331 #: project/templates/profile.html:29 msgid "Developer" msgstr "" @@ -1964,23 +1961,23 @@ msgstr "" msgid "Member successfully deleted" msgstr "" -#: project/views/admin_unit_member_invitation.py:45 +#: project/views/admin_unit_member_invitation.py:38 msgid "Invitation successfully accepted" msgstr "" -#: project/views/admin_unit_member_invitation.py:52 +#: project/views/admin_unit_member_invitation.py:45 msgid "Invitation successfully declined" msgstr "" -#: project/views/admin_unit_member_invitation.py:97 +#: project/views/admin_unit_member_invitation.py:90 msgid "Invitation successfully sent" msgstr "" -#: project/views/admin_unit_member_invitation.py:120 +#: project/views/admin_unit_member_invitation.py:113 msgid "Entered email does not match invitation email" msgstr "" -#: project/views/admin_unit_member_invitation.py:125 +#: project/views/admin_unit_member_invitation.py:118 msgid "Invitation successfully deleted" msgstr "" @@ -2154,10 +2151,16 @@ msgstr "" msgid "Show" msgstr "" -#: project/views/utils.py:142 +#: project/views/utils.py:143 msgid "You do not have permission for this action" msgstr "" +#: project/views/utils.py:264 +msgid "" +"The invitation was issued to another user. Sign in with the email address" +" the invitation was sent to." +msgstr "" + #: project/views/widget.py:150 msgid "Thank you so much! The event is being verified." msgstr "" @@ -2201,3 +2204,6 @@ msgstr "" #~ msgid "URL für Infoscreen" #~ msgstr "" +#~ msgid "Example" +#~ msgstr "" + diff --git a/project/views/admin_unit_member_invitation.py b/project/views/admin_unit_member_invitation.py index 357f572..e966029 100644 --- a/project/views/admin_unit_member_invitation.py +++ b/project/views/admin_unit_member_invitation.py @@ -12,10 +12,9 @@ from project.forms.admin_unit_member import ( ) from project.models import AdminUnitMemberInvitation, AdminUnitMemberRole from project.services.admin_unit import add_user_to_admin_unit_with_roles -from project.services.user import find_user_by_email -from project.utils import strings_are_equal_ignoring_case from project.views.utils import ( flash_errors, + get_invitation_access_result, handleSqlError, non_match_for_deletion, permission_missing, @@ -26,16 +25,10 @@ from project.views.utils import ( @app.route("/invitations/", methods=("GET", "POST")) def admin_unit_member_invitation(id): invitation = AdminUnitMemberInvitation.query.get_or_404(id) + result = get_invitation_access_result(invitation.email) - # Wenn Email nicht als Nutzer vorhanden, dann direkt zu Registrierung - if not find_user_by_email(invitation.email): - return redirect(url_for("security.register")) - - if not current_user.is_authenticated: - return app.login_manager.unauthorized() - - if not strings_are_equal_ignoring_case(invitation.email, current_user.email): - return permission_missing(url_for("profile")) + if result: + return result form = NegotiateAdminUnitMemberInvitationForm() diff --git a/project/views/user.py b/project/views/user.py index 06c0995..3ee0b44 100644 --- a/project/views/user.py +++ b/project/views/user.py @@ -1,9 +1,9 @@ -from flask import redirect, render_template, url_for -from flask_security import auth_required, current_user +from flask import render_template +from flask_security import auth_required from project import app from project.models import AdminUnitInvitation -from project.services.user import find_user_by_email +from project.views.utils import get_invitation_access_result @app.route("/profile") @@ -15,13 +15,10 @@ def profile(): @app.route("/user/organization-invitations/") def user_organization_invitation(id): invitation = AdminUnitInvitation.query.get_or_404(id) + result = get_invitation_access_result(invitation.email) - # Wenn Email nicht als Nutzer vorhanden, dann direkt zu Registrierung - if not find_user_by_email(invitation.email): - return redirect(url_for("security.register")) - - if not current_user.is_authenticated: - return app.login_manager.unauthorized() + if result: + return result return render_template("user/organization_invitations.html") diff --git a/project/views/utils.py b/project/views/utils.py index 83f78e6..16b0a13 100644 --- a/project/views/utils.py +++ b/project/views/utils.py @@ -13,7 +13,7 @@ from project import app, db, mail from project.access import get_admin_unit_for_manage, get_admin_units_for_manage from project.dateutils import berlin_tz, round_to_next_day from project.models import Analytics, EventAttendanceMode, EventDate -from project.utils import get_place_str +from project.utils import get_place_str, strings_are_equal_ignoring_case def set_current_admin_unit(admin_unit): @@ -138,8 +138,11 @@ def flash_message(msg, url, link_text=None, category="success"): flash(message, category) -def permission_missing(redirect_location): - flash(gettext("You do not have permission for this action"), "danger") +def permission_missing(redirect_location, message=None): + if not message: + message = gettext("You do not have permission for this action") + + flash(message, "danger") return redirect(redirect_location) @@ -241,3 +244,26 @@ def get_calendar_links(event_date: EventDate) -> dict: calendar_links["ics"] = url_for("event_date_ical", id=event_date.id, _external=True) return calendar_links + + +def get_invitation_access_result(email: str): + from project.services.user import find_user_by_email + + # Wenn Email nicht als Nutzer vorhanden, dann direkt zu Registrierung + if not find_user_by_email(email): + return redirect(url_for("security.register")) + + # Wenn nicht angemeldet, dann zum Login + if not current_user.is_authenticated: + return app.login_manager.unauthorized() + + # Wenn der aktuelle Nutzer nicht der Empfänger der Einladung ist, Meldung ausgeben + if not strings_are_equal_ignoring_case(email, current_user.email): + return permission_missing( + url_for("profile"), + gettext( + "The invitation was issued to another user. Sign in with the email address the invitation was sent to." + ), + ) + + return None diff --git a/tests/views/test_user.py b/tests/views/test_user.py index fa67f9b..7288450 100644 --- a/tests/views/test_user.py +++ b/tests/views/test_user.py @@ -26,6 +26,19 @@ def test_organization_invitation_not_authenticated(client, app, utils, seeder): assert response.headers["Location"].startswith("http://localhost/login") +def test_organization_invitation_currentUserDoesNotMatchInvitationEmail( + client, app, db, utils, seeder +): + _, admin_unit_id = seeder.setup_base() + invitation_id = seeder.create_admin_unit_invitation(admin_unit_id) + + seeder.create_user("invited@test.de") + url = utils.get_url("user_organization_invitation", id=invitation_id) + response = client.get(url) + assert response.status_code == 302 + assert response.headers["Location"] == "http://localhost/profile" + + def test_organization_invitation_list(client, seeder, utils): _, admin_unit_id = seeder.setup_base(log_in=False) _ = seeder.create_admin_unit_invitation(admin_unit_id)