Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc: small fixes and translations before release #1006

Merged
merged 4 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ephios/api/views/events.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from urllib.parse import urljoin

import django_filters
from django.conf import settings
from django.db.models import Max, Min, Prefetch
from oauth2_provider.contrib.rest_framework import IsAuthenticatedOrTokenHasScope
from rest_framework import filters, serializers, viewsets
Expand Down Expand Up @@ -47,7 +50,10 @@ class EventSerializer(serializers.ModelSerializer):
end_time = serializers.DateTimeField(source="get_end_time")
signup_stats = SignupStatsSerializer(source="get_signup_stats")
shifts = ShiftSerializer(many=True)
frontend_url = serializers.URLField(source="get_absolute_url")
frontend_url = serializers.SerializerMethodField()

def get_frontend_url(self, obj):
return urljoin(settings.GET_SITE_URL(), obj.get_absolute_url())

class Meta:
model = Event
Expand Down
4 changes: 0 additions & 4 deletions ephios/core/models/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ class Meta:
verbose_name_plural = _("event types")
db_table = "eventtype"

@property
def color_hex(self):
return "#FF0"

def __str__(self):
return str(self.title)

Expand Down
136 changes: 76 additions & 60 deletions ephios/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-16 20:59+0200\n"
"PO-Revision-Date: 2023-07-16 21:00+0200\n"
"POT-Creation-Date: 2023-08-03 13:59+0200\n"
"PO-Revision-Date: 2023-08-03 14:00+0200\n"
"Last-Translator: Felix Rindt <[email protected]>\n"
"Language-Team: German <https://hosted.weblate.org/projects/ephios/ephios/de/"
">\n"
Expand All @@ -19,26 +19,37 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Poedit 3.3.2\n"

#: ephios/api/access/views.py:65
#: ephios/api/access/views.py:65 ephios/api/models.py:33 ephios/core/pdf.py:76
#: ephios/core/pdf.py:130
msgid "Description"
msgstr "Beschreibung"

#: ephios/api/access/views.py:66
msgid "What is this token for?"
msgstr "Wofür ist dieses Token?"

#: ephios/api/access/views.py:74
#: ephios/api/access/views.py:70
#: ephios/api/templates/api/access_token_list.html:31
#: ephios/api/templates/api/access_token_list.html:99
msgid "Scope"
msgstr "Geltungsbereich"

#: ephios/api/access/views.py:76
msgid "For security reasons, only select the scopes that are actually needed."
msgstr "Aus Sicherheitsgründen nur den benötigten Geltungsbereich auswählen."

#: ephios/api/access/views.py:113
#: ephios/api/access/views.py:79 ephios/core/models/users.py:331
msgid "expiration date"
msgstr "Ablaufdatum"

#: ephios/api/access/views.py:116
msgid "Token is too old to be revealed."
msgstr "Token ist zu alt, um angezeigt werden zu können."

#: ephios/api/access/views.py:123
#: ephios/api/access/views.py:126
msgid "Token was revoked."
msgstr "Token wurde entfernt."

#: ephios/api/models.py:33 ephios/core/pdf.py:76 ephios/core/pdf.py:130
msgid "Description"
msgstr "Beschreibung"

#: ephios/api/models.py:56
msgid "Access Token"
msgstr "Zugriffstoken"
Expand Down Expand Up @@ -103,11 +114,6 @@ msgstr ""
msgid "Third party applications"
msgstr "Drittanbieteranwendungen"

#: ephios/api/templates/api/access_token_list.html:31
#: ephios/api/templates/api/access_token_list.html:99
msgid "Scope"
msgstr "Geltungsbereich"

#: ephios/api/templates/api/access_token_list.html:40
#: ephios/api/templates/api/access_token_list.html:108
msgid "Revoked"
Expand Down Expand Up @@ -670,7 +676,7 @@ msgstr ""
msgid "Active user"
msgstr "Aktiver Benutzer"

#: ephios/core/models/events.py:47 ephios/core/models/events.py:64
#: ephios/core/models/events.py:47 ephios/core/models/events.py:60
#: ephios/core/models/users.py:219 ephios/core/models/users.py:242
msgid "title"
msgstr "Titel"
Expand All @@ -679,7 +685,7 @@ msgstr "Titel"
msgid "color"
msgstr "Farbe"

#: ephios/core/models/events.py:51 ephios/core/models/events.py:67
#: ephios/core/models/events.py:51 ephios/core/models/events.py:63
#: ephios/core/views/event.py:60
msgid "event type"
msgstr "Veranstaltungstyp"
Expand All @@ -688,116 +694,116 @@ msgstr "Veranstaltungstyp"
msgid "event types"
msgstr "Veranstaltungstypen"

#: ephios/core/models/events.py:65
#: ephios/core/models/events.py:61
msgid "description"
msgstr "Beschreibung"

#: ephios/core/models/events.py:66
#: ephios/core/models/events.py:62
msgid "location"
msgstr "Ort"

#: ephios/core/models/events.py:68
#: ephios/core/models/events.py:64
msgid "active"
msgstr "aktiv"

#: ephios/core/models/events.py:74 ephios/core/models/events.py:262
#: ephios/core/models/events.py:70 ephios/core/models/events.py:258
msgid "event"
msgstr "Veranstaltung"

#: ephios/core/models/events.py:75
#: ephios/core/models/events.py:71
msgid "events"
msgstr "Veranstaltungen"

#: ephios/core/models/events.py:188
#: ephios/core/models/events.py:184
msgid "requested"
msgstr "angefragt"

#: ephios/core/models/events.py:189 ephios/core/views/event.py:87
#: ephios/core/models/events.py:185 ephios/core/views/event.py:87
msgid "confirmed"
msgstr "bestätigt"

#: ephios/core/models/events.py:190
#: ephios/core/models/events.py:186
msgid "declined by user"
msgstr "abgesagt durch helfende Person"

#: ephios/core/models/events.py:191
#: ephios/core/models/events.py:187
msgid "rejected by responsible"
msgstr "abgesagt durch verantwortliche Person"

#: ephios/core/models/events.py:192
#: ephios/core/models/events.py:188
msgid "getting dispatched"
msgstr "in Zuteilung"

#: ephios/core/models/events.py:201 ephios/core/models/events.py:273
#: ephios/core/models/events.py:197 ephios/core/models/events.py:269
msgid "shift"
msgstr "Schicht"

#: ephios/core/models/events.py:204
#: ephios/core/models/events.py:200
msgid "state"
msgstr "Status"

#: ephios/core/models/events.py:205
#: ephios/core/models/events.py:201
msgid "Signup data"
msgstr "Anmeldungsdaten"

#: ephios/core/models/events.py:210
#: ephios/core/models/events.py:206
msgid "individual start time"
msgstr "Individueller Beginn"

#: ephios/core/models/events.py:211
#: ephios/core/models/events.py:207
msgid "individual end time"
msgstr "Individuelles Ende"

#: ephios/core/models/events.py:214
#: ephios/core/models/events.py:210
msgid "Comment"
msgstr "Kommentar"

#: ephios/core/models/events.py:220
#: ephios/core/models/events.py:216
msgid "finished"
msgstr "abgeschlossen"

#: ephios/core/models/events.py:264
#: ephios/core/models/events.py:260
msgid "meeting time"
msgstr "Treffpunkt"

#: ephios/core/models/events.py:265
#: ephios/core/models/events.py:261
msgid "start time"
msgstr "Beginn"

#: ephios/core/models/events.py:266
#: ephios/core/models/events.py:262
msgid "end time"
msgstr "Ende"

#: ephios/core/models/events.py:267
#: ephios/core/models/events.py:263
msgid "signup method"
msgstr "Anmeldeverfahren"

#: ephios/core/models/events.py:274
#: ephios/core/models/events.py:270
msgid "shifts"
msgstr "Schichten"

#: ephios/core/models/events.py:325
#: ephios/core/models/events.py:321
#: ephios/core/templates/core/fragments/shift_box_small.html:21
msgid "Signup method"
msgstr "Anmeldeverfahren"

#: ephios/core/models/events.py:337
#: ephios/core/models/events.py:333
msgid "Participant"
msgstr "Teilnehmende Person"

#: ephios/core/models/events.py:358
#: ephios/core/models/events.py:354
msgid "participation"
msgstr "Teilnahme"

#: ephios/core/models/events.py:359
#: ephios/core/models/events.py:355
msgid "participations"
msgstr "Teilnahmen"

#: ephios/core/models/events.py:386
#: ephios/core/models/events.py:382
msgid "placeholder participation"
msgstr "Platzhalter-Teilnahme"

#: ephios/core/models/events.py:387
#: ephios/core/models/events.py:383
msgid "placeholder participations"
msgstr "Platzhalter-Teilnahmen"

Expand Down Expand Up @@ -882,10 +888,6 @@ msgstr "Qualifikation"
msgid "qualifications"
msgstr "Qualifikationen"

#: ephios/core/models/users.py:331
msgid "expiration date"
msgstr "Ablaufdatum"

#: ephios/core/models/users.py:341
msgid "Qualification grant"
msgstr "Qualifikationserteilung"
Expand Down Expand Up @@ -2348,6 +2350,13 @@ msgstr "fehlt"
msgid "Participation is coupled to {}."
msgstr "Teilnahme ist gekoppelt an {}."

#: ephios/plugins/basesignup/signup/coupled_signup.py:74
msgid ""
"Participation is coupled to another shift, but the leading shift is missing."
msgstr ""
"Teilnahmen waren an eine andere Schicht gekoppelt, aber diese Schicht fehlt "
"jetzt."

#: ephios/plugins/basesignup/signup/instant.py:10
msgid "Instant Confirmation"
msgstr "Direkte Bestätigung"
Expand Down Expand Up @@ -2647,15 +2656,19 @@ msgstr ""
msgid "Content"
msgstr "Inhalt"

#: ephios/plugins/pages/models.py:8
msgid "Slug"
msgstr "Kurzform"

#: ephios/plugins/pages/models.py:9
msgid "URL slug"
msgstr "URL Kurzform"

#: ephios/plugins/pages/models.py:10
msgid "The slug is used to generate the page's URL."
msgstr "Die Kurzform wird in der URL der Seite genutzt."

#: ephios/plugins/pages/models.py:14
msgid "Show in footer"
msgstr "In der Fußzeile anzeigen"

#: ephios/plugins/pages/models.py:10
#: ephios/plugins/pages/models.py:15
msgid "Publicly visible"
msgstr "Öffentlich sichtbar"

Expand Down Expand Up @@ -2988,27 +3001,27 @@ msgstr "kann nicht löschen, hat Ressourcen"
msgid "Resource categories updated successfully."
msgstr "Ressourcenkategorien wurden erfolgreich aktualisiert."

#: ephios/settings.py:357
#: ephios/settings.py:399
msgid "Read public data like available events and shifts"
msgstr "Öffentliche Daten (bspw. Veranstaltungen und Schichten) lesen"

#: ephios/settings.py:358
#: ephios/settings.py:400
msgid "Write public data like available events and shifts"
msgstr "Öffentliche Daten (bspw. Veranstaltungen und Schichten) schreiben"

#: ephios/settings.py:359
#: ephios/settings.py:401
msgid "Read own personal data and participations"
msgstr "Eigene Daten und Teilnahmen lesen"

#: ephios/settings.py:360
#: ephios/settings.py:402
msgid "Write own personal data and participations"
msgstr "Eigene Daten und Teilnahmen schreiben"

#: ephios/settings.py:362
#: ephios/settings.py:404
msgid "Read confidential data like all users profile and participations"
msgstr "Vertrauliche Daten (bpsw. fremde Nutzerprofile und Teilnahmen) lesen"

#: ephios/settings.py:365
#: ephios/settings.py:407
msgid "Write confidential data like all users profile and participations"
msgstr ""
"Vertrauliche Daten (bpsw. fremde Nutzerprofile und Teilnahmen) schreiben"
Expand Down Expand Up @@ -3122,6 +3135,9 @@ msgstr "Passwort erfolgreich zurückgesetzt"
msgid "Please check your mailbox for further instructions."
msgstr "Bitte prüfen Sie Ihren E-Mail-Posteingang für weitere Anweisungen."

#~ msgid "Slug"
#~ msgstr "Kurzform"

#, fuzzy
#~| msgid "Notifications"
#~ msgid "Notification types"
Expand Down
7 changes: 2 additions & 5 deletions ephios/plugins/basesignup/signup/coupled_signup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,8 @@ def signup_is_disabled(method, participant):
_("Participation is coupled to {}.").format(method.leader_shift)
)
# This is red as it requires responsibles to update the shift configuration.
return ActionDisallowedError(
mark_safe(
f'<span class="text-danger">{_("Participation is coupled to another shift, but the leading shift is missing.")}</span>'
)
)
text = _("Participation is coupled to another shift, but the leading shift is missing.")
return ActionDisallowedError(mark_safe(f'<span class="text-danger">{text}</span>'))

@property
def _signup_checkers(self):
Expand Down