diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-19 16:05:40 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-19 16:05:40 +0200 |
| commit | 4df88b601b1900c287051d827eaff46f498f60d0 (patch) | |
| tree | b6db47fbb256dc68601f2aa31430d8636018f115 /config/locales | |
| parent | edf0d64aa2c837b4bb28787483f98cb4815601c2 (diff) | |
Redirect a page to a node or an external URL
Page#redirect_target resolves the precedence and returns nil for a
destination that is restricted or has no head, so a page with a broken
target renders itself rather than linking nowhere. The banner partial will
call the same method, so the redirect and the link cannot drift.
One hop, no exceptions, checked in publish_draft! rather than as a
validation: two nodes publishing concurrently could each pass a save-time
check and still produce a chain. "Live" means heads only, a draft redirect
that has not published is not yet a link anyone can follow.
Node.search excludes redirecting pages. editor_search does not: an editor
looking for one searches by title, and only the body is worth hiding.
Diffstat (limited to 'config/locales')
| -rw-r--r-- | config/locales/de.yml | 4 | ||||
| -rw-r--r-- | config/locales/en.yml | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/config/locales/de.yml b/config/locales/de.yml index bb99ac30..e94dfb7e 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml | |||
| @@ -140,6 +140,10 @@ de: | |||
| 140 | attach_in_trash: "An einen Node im Papierkorb können keine Assets angehängt werden" | 140 | attach_in_trash: "An einen Node im Papierkorb können keine Assets angehängt werden" |
| 141 | not_permitted: "In diesem Bereich dürfen nur Mitglieder der Redaktion veröffentlichte Inhalte ändern" | 141 | not_permitted: "In diesem Bereich dürfen nur Mitglieder der Redaktion veröffentlichte Inhalte ändern" |
| 142 | attach_with_autosave: "An einen Node mit ungespeicherten Änderungen im Editor können keine Assets angehängt werden" | 142 | attach_with_autosave: "An einen Node mit ungespeicherten Änderungen im Editor können keine Assets angehängt werden" |
| 143 | redirect_to_self: "Eine Seite kann nicht auf sich selbst weiterleiten" | ||
| 144 | redirect_target_missing: "Die Seite, auf die weitergeleitet werden sollte, gibt es nicht mehr." | ||
| 145 | redirect_to_redirect: "Auf eine Seite, die selbst weiterleitet, kann nicht weitergeleitet werden" | ||
| 146 | redirect_would_chain: "Eine andere Seite leitet bereits hierher weiter, daher kann diese Seite nicht weiterleiten" | ||
| 143 | page: | 147 | page: |
| 144 | attributes: | 148 | attributes: |
| 145 | slug: | 149 | slug: |
diff --git a/config/locales/en.yml b/config/locales/en.yml index cce5f12a..54d973e2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml | |||
| @@ -91,6 +91,10 @@ en: | |||
| 91 | attach_in_trash: "Cannot attach assets to a node in the Trash" | 91 | attach_in_trash: "Cannot attach assets to a node in the Trash" |
| 92 | not_permitted: "Only Redaktion members may change published content in this section" | 92 | not_permitted: "Only Redaktion members may change published content in this section" |
| 93 | attach_with_autosave: "Cannot attach assets to a node with unsaved changes in the editor" | 93 | attach_with_autosave: "Cannot attach assets to a node with unsaved changes in the editor" |
| 94 | redirect_to_self: "A page cannot redirect to itself" | ||
| 95 | redirect_target_missing: "The page this was to redirect to no longer exists." | ||
| 96 | redirect_to_redirect: "Cannot redirect to a page that itself redirects" | ||
| 97 | redirect_would_chain: "Another page already redirects here, so this page cannot redirect onward" | ||
| 94 | page: | 98 | page: |
| 95 | attributes: | 99 | attributes: |
| 96 | slug: | 100 | slug: |
