Skip to content
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
41 changes: 41 additions & 0 deletions src/onegov/org/forms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,47 @@ class LinksSettingsForm(Form):
label=_('Open files in separate window')
)

short_links = TextAreaField(
label=_('Short links'),
description=(
'kalender: /a/b/kalender\n'
'support: https://my.support'
),
render_kw={'rows': 10}
)

def validate_short_links(self, field: TextAreaField) -> None:
if not field.data:
return

for number, line in enumerate(field.data.splitlines(), start=1):
parts = line.split(':', 1)
if len(parts) == 2:
_name, redirect_path = parts

try:
url = URL(redirect_path.strip())
except ValueError:
# fall-through to the end which will raise
pass
else:
if url.scheme():
if url.host():
# valid, skip to the next pair
continue
elif not url.host() and (path := url.path()):
if path.startswith('/'):
# valid, skip to the next pair
continue

raise ValidationError(_(
'Malformed short link on line ${number}. '
'Each line needs to be a pair of name: path where '
'path is either a valid path starting with a '
'backslash, or a complete URL with schema and host.',
mapping={'number': number}
))


class HeaderSettingsForm(Form):

Expand Down
123 changes: 68 additions & 55 deletions src/onegov/org/locale/de_CH/LC_MESSAGES/onegov.org.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
"POT-Creation-Date: 2026-06-23 10:57+0200\n"
"POT-Creation-Date: 2026-06-30 13:02+0200\n"
"PO-Revision-Date: 2022-03-15 10:21+0100\n"
"Last-Translator: Marc Sommerhalder <marc.sommerhalder@seantis.ch>\n"
"Language-Team: German\n"
Expand Down Expand Up @@ -218,8 +218,8 @@ msgstr "Täglicher Newsletter ${time}"
msgid "${org} OneGov Cloud Status"
msgstr "${org} OneGov Cloud Status"

#.
#. get the resource titles and ids
#.
msgid "General"
msgstr "Allgemein"

Expand Down Expand Up @@ -1236,21 +1236,21 @@ msgstr "Bitte benutzen sie ein End-Datum, welches vor dem Start-Datum liegt"
msgid ""
"The date range overlaps with an existing registration window (${range})."
msgstr ""
"Der Datumsbereich überschneidet sich mit einem bestehenden Anmeldezeitraum "
"(${range})."
"Der Datumsbereich überschneidet sich mit einem bestehenden Anmeldezeitraum ($"
"{range})."

#, python-format
msgid ""
"The limit cannot be lower than the already confirmed number of attendees "
"(${claimed_spots})"
"The limit cannot be lower than the already confirmed number of attendees ($"
"{claimed_spots})"
msgstr ""
"Das Limit kann nicht tiefer sein als die Anzahl bereits angemeldeter "
"Teilnehmer (${claimed_spots})"

#, python-format
msgid ""
"The limit cannot be lower than the already confirmed number attendees "
"(${claimed_spots}) and the number of pending requests (${pending_requests}). "
"The limit cannot be lower than the already confirmed number attendees ($"
"{claimed_spots}) and the number of pending requests (${pending_requests}). "
"Either enable the waiting list, process the pending requests or increase the "
"limit. "
msgstr ""
Expand Down Expand Up @@ -1476,8 +1476,8 @@ msgstr "Die folgenden Domänen sind für iFrames erlaubt:"

msgid "To allow more domains for iFrames, please contact info@seantis.ch."
msgstr ""
"Um mehr Domains für iFrames zuzulassen, kontaktieren Sie bitte info@seantis."
"ch."
"Um mehr Domains für iFrames zuzulassen, kontaktieren Sie bitte "
"info@seantis.ch."

msgid "The domain of the URL is not allowed for iFrames."
msgstr "Die Domäne der URL ist für iFrames nicht zulässig."
Expand Down Expand Up @@ -2278,6 +2278,19 @@ msgstr ""
msgid "Open files in separate window"
msgstr "Dateien in separatem Fenster öffnen"

msgid "Short links"
msgstr "Kurzlinks"

#, python-format
msgid ""
"Malformed short link on line ${number}. Each line needs to be a pair of "
"name: path where path is either a valid path starting with a backslash, or a "
"complete URL with schema and host."
msgstr ""
"Ungültiger Kurzlink auf Zeile ${number}. Jede Zeile muss dem Format Name: "
"Pfad entsprechen, wobei Pfad entweder ein Pfad ohne Schema oder Hostname "
"oder eine komplette URL ist."

msgid "Announcement"
msgstr "Ankündigung"

Expand Down Expand Up @@ -4184,8 +4197,8 @@ msgstr "Alle absagen mit Kommentar"
msgid "Add reservation"
msgstr "Reservation hinzufügen"

#. Used in sentence: "${event} published."
#.
#. Used in sentence: "${event} published."
msgid "Event"
msgstr "Veranstaltung"

Expand Down Expand Up @@ -4363,8 +4376,8 @@ msgstr ""
"Unterseiten löschen. Um diese Seite zu löschen müssen Sie erst alle "
"Unterseiten löschen, oder Sie wenden sich an einen Administrator."

#.
#. Modification for the footer left on all pages
#.
msgid "Source"
msgstr "Herkunft"

Expand Down Expand Up @@ -5124,8 +5137,8 @@ msgstr "Guten Tag"

msgid "Your e-mail address was just used to create an account on ${homepage}."
msgstr ""
"Ihre E-Mail Adresse wurde soeben zur Erstellung eines Accounts auf "
"${homepage} verwendet."
"Ihre E-Mail Adresse wurde soeben zur Erstellung eines Accounts auf $"
"{homepage} verwendet."

msgid "To activate your account, click confirm below:"
msgstr "Um Ihren Account zu aktivieren, bestätigen Sie bitte die Anmeldung:"
Expand All @@ -5142,8 +5155,8 @@ msgstr ""

msgid "Your e-mail address was just used to send a login link to ${homepage}."
msgstr ""
"Ihre E-Mail Adresse wurde soeben zum Senden eines Anmeldelinks auf "
"${homepage} verwendet."
"Ihre E-Mail Adresse wurde soeben zum Senden eines Anmeldelinks auf $"
"{homepage} verwendet."

msgid "Use the token below or click on the link to complete your login."
msgstr ""
Expand Down Expand Up @@ -5209,8 +5222,8 @@ msgstr "Neue Kunden Nachricht in Ticket ${link}"
msgid "${author} wrote"
msgstr "${author} schrieb"

#. Canonical text for ${link} is: "visit the request page"
#. Canonical text for ${link} is: "visit the request status page"
#. Canonical text for ${link} is: "visit the request page"
msgid "Please ${link} to reply."
msgstr "Bitte ${link} um zu antworten"

Expand All @@ -5222,9 +5235,9 @@ msgid "Have a great day!"
msgstr "Wir wünschen Ihnen einen schönen Tag!"

msgid ""
"This is the notification for customer messages on reservations for ${request."
"app.org.title}. If you no longer want to receive this e-mail please contact "
"an administrator so they can remove you from the recipients list."
"This is the notification for customer messages on reservations for $"
"{request.app.org.title}. If you no longer want to receive this e-mail please "
"contact an administrator so they can remove you from the recipients list."
msgstr ""
"Dies ist die tägliche Reservations-Übersicht für ${organisation}. Falls Sie "
"dieses E-Mail nicht mehr bekommen möchten, melden Sie sich bitte bei einem "
Expand All @@ -5244,8 +5257,8 @@ msgid ""
"want to receive this e-mail please contact an administrator so they can "
"remove you from the recipients list."
msgstr ""
"Dies ist die Benachrichtigung für Kunden Nachrichten zu Reservierungen für "
"${request.app.org.title}. Wenn Sie diese E-Mail nicht mehr erhalten möchten, "
"Dies ist die Benachrichtigung für Kunden Nachrichten zu Reservierungen für $"
"{request.app.org.title}. Wenn Sie diese E-Mail nicht mehr erhalten möchten, "
"kontaktieren Sie bitte einen Administrator, damit er Sie aus der Liste "
"entfernen kann."

Expand Down Expand Up @@ -5351,12 +5364,12 @@ msgid "New note in Ticket ${link}"
msgstr "Neue Notiz in Ticket ${link}"

msgid ""
"This is the notification for notes on reservations for ${request.app.org."
"title}. If you no longer want to receive this e-mail please contact an "
"administrator so they can remove you from the recipients list."
"This is the notification for notes on reservations for $"
"{request.app.org.title}. If you no longer want to receive this e-mail please "
"contact an administrator so they can remove you from the recipients list."
msgstr ""
"Dies ist die Benachrichtigung für Notizen zu Reservierungen für ${request."
"app.org.title}. Wenn Sie diese E-Mail nicht mehr erhalten möchten, "
"Dies ist die Benachrichtigung für Notizen zu Reservierungen für $"
"{request.app.org.title}. Wenn Sie diese E-Mail nicht mehr erhalten möchten, "
"kontaktieren Sie bitte einen Administrator, damit er Sie aus der Liste "
"entfernen kann."

Expand Down Expand Up @@ -5395,8 +5408,8 @@ msgid ""
"you no longer want to receive this e-mail please contact an administrator so "
"they can remove you from the recipients list."
msgstr ""
"Dies ist die Benachrichtigung für Notizen zu Reservierungen für ${request."
"app.org.title}. Wenn Sie diese E-Mail nicht mehr erhalten möchten, "
"Dies ist die Benachrichtigung für Notizen zu Reservierungen für $"
"{request.app.org.title}. Wenn Sie diese E-Mail nicht mehr erhalten möchten, "
"kontaktieren Sie bitte einen Administrator, damit er Sie aus der Liste "
"entfernen kann."

Expand All @@ -5421,8 +5434,8 @@ msgstr ""

msgid "To use your account you need the Yubikey with the serial ${number}"
msgstr ""
"Um Ihr Konto zu verwenden benötigen Sie den YubiKey mit der Seriennummer "
"${number}"
"Um Ihr Konto zu verwenden benötigen Sie den YubiKey mit der Seriennummer $"
"{number}"

msgid "read more"
msgstr "mehr lesen"
Expand Down Expand Up @@ -5495,8 +5508,8 @@ msgid ""
"you no longer wish to receive these notifications, please contact an "
"administrator so they can remove you from the recipients list."
msgstr ""
"Dies ist eine Benachrichtigung über die abgelehnten Reservierungen für "
"${Organisation}. Wenn Sie diese Benachrichtigungen nicht mehr erhalten "
"Dies ist eine Benachrichtigung über die abgelehnten Reservierungen für $"
"{Organisation}. Wenn Sie diese Benachrichtigungen nicht mehr erhalten "
"möchten, kontaktieren Sie bitte einen Administrator, damit er Sie aus der "
"Empfängerliste entfernen kann."

Expand Down Expand Up @@ -5819,18 +5832,18 @@ msgstr ""
msgid "Request Reference"
msgstr "Referenz Anfrage"

msgid "Search people"
msgstr "Personen suchen"

msgid "Filter after Organisation or Suborganisation"
msgstr "Nach Organisation oder Unterorganisation filtern"

msgid "Select organisation"
msgstr "Organisation wählen"

msgid "Select sub organisation"
msgstr "Unterorganisation wählen"

msgid "Filter after Organisation or Suborganisation"
msgstr "Nach Organisation oder Unterorganisation filtern"

msgid "Search people"
msgstr "Personen suchen"

msgid "No people added yet."
msgstr "Noch keine Personen erfasst."

Expand Down Expand Up @@ -6401,8 +6414,8 @@ msgid ""
"Availability period updated. ${deleted} allocations removed, ${updated} "
"allocations adjusted and ${created} new allocations created."
msgstr ""
"Verfügbarkeitszeitraum aktualisiert. ${deleted} Verfügbarkeiten entfernt, "
"${updated} Verfügbarkeiten angepasst und ${created} neue Verfügbarkeiten "
"Verfügbarkeitszeitraum aktualisiert. ${deleted} Verfügbarkeiten entfernt, $"
"{updated} Verfügbarkeiten angepasst und ${created} neue Verfügbarkeiten "
"erstellt."

msgid "Availability period not found"
Expand Down Expand Up @@ -6615,8 +6628,8 @@ msgstr ""

#, python-format
msgid ""
"Cannot convert field \"${field}\" from type \"${old_type}\" to "
"\"${new_type}\"."
"Cannot convert field \"${field}\" from type \"${old_type}\" to \"${new_type}"
"\"."
msgstr ""
"Feld \"${field}\" kann nicht von Typ \"${old_type}\" zu \"${new_type}\" "
"konvertiert werden."
Expand Down Expand Up @@ -6722,19 +6735,19 @@ msgstr "Neuer Empfänger"

#, python-format
msgid ""
"Registration for notifications on new entries in the directory "
"\"${directory}\""
"Registration for notifications on new entries in the directory \"${directory}"
"\""
msgstr ""
"Anmeldung für Benachrichtigungen bei neuen Einträgen im Verzeichnis "
"\"${directory}\""
"Anmeldung für Benachrichtigungen bei neuen Einträgen im Verzeichnis \"$"
"{directory}\""

#, python-format
msgid ""
"Success! We have sent a confirmation link to ${address}, if we didn't send "
"you one already."
msgstr ""
"Erfolg! Wir senden eine E-Mail zur Bestätigung Ihres Abonnements an "
"${address}, sofern Sie noch nicht angemeldet sind."
"Erfolg! Wir senden eine E-Mail zur Bestätigung Ihres Abonnements an $"
"{address}, sofern Sie noch nicht angemeldet sind."

msgid "Notification for new entries"
msgstr "Benachrichtigung bei neuen Einträgen"
Expand Down Expand Up @@ -7097,8 +7110,8 @@ msgid ""
"Success! We have sent a confirmation link to ${address}, if we didn't send "
"you one already. Your subscribed categories are ${subscribed}."
msgstr ""
"Erfolg! Wir senden eine E-Mail zur Bestätigung Ihres Abonnements an "
"${address}, sofern Sie noch nicht angemeldet sind. Ihre abonnierten "
"Erfolg! Wir senden eine E-Mail zur Bestätigung Ihres Abonnements an $"
"{address}, sofern Sie noch nicht angemeldet sind. Ihre abonnierten "
"Kategorien sind ${subscribed}."

# python-format
Expand Down Expand Up @@ -7454,8 +7467,8 @@ msgid ""
"Failed to create visits using the dormakaba API for site ID ${site_id} "
"please make sure your credentials are still valid."
msgstr ""
"Das Delegieren der Entriegelung der Türen via dormakaba API für Anlage "
"${site_id} ist fehlgeschlagen. Bitte stellen Sie sicher, dass die "
"Das Delegieren der Entriegelung der Türen via dormakaba API für Anlage $"
"{site_id} ist fehlgeschlagen. Bitte stellen Sie sicher, dass die "
"hinterlegten Zugangsdaten immer noch gültig sind."

msgid "Accepted"
Expand Down Expand Up @@ -7992,8 +8005,8 @@ msgstr "Beim Hochladen auf Gever ist ein Fehler aufgetreten."

#, python-format
msgid ""
"Encountered an error while uploading to Gever. Response status code is "
"${status}."
"Encountered an error while uploading to Gever. Response status code is $"
"{status}."
msgstr ""
"Beim Hochladen auf Gever ist ein Fehler aufgetreten. Der Statuscode der "
"Antwort lautet ${status}."
Expand Down
Loading