From 20c735b0c5a2db9b8984848253ad99332d6211a8 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sun, 9 Aug 2026 03:33:55 +0200 Subject: Attach assets to the draft instead of to every lifecycle row Node#attach_asset! writes to the node's draft alone, creating one from the head when none is pending. It refuses when another user holds the lock, and when an autosave already exists The asset_attach verb goes with it. create_new_draft names the editor on the draft it creates and the publish entry's asset delta reports the attachment. --- config/locales/de.yml | 6 ++++-- config/locales/en.yml | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/locales/de.yml b/config/locales/de.yml index c6dc17b7..58367aaf 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -136,6 +136,7 @@ de: destroy_outside_trash: "Nodes können nur aus dem Papierkorb gelöscht werden" attach_in_trash: "An einen Node im Papierkorb können keine Assets angehängt werden" not_permitted: "In diesem Bereich dürfen nur Mitglieder der Redaktion veröffentlichte Inhalte ändern" + attach_with_autosave: "An einen Node mit ungespeicherten Änderungen im Editor können keine Assets angehängt werden" page: attributes: slug: @@ -659,8 +660,9 @@ de: assets: created: "Asset wurde angelegt." updated: "Asset wurde aktualisiert." - attached: "Asset wurde angelegt und an „%{title}“ angehängt." - already_attached: "Asset gespeichert — es war bereits an „%{title}“ angehängt." + already_attached: "Asset wurde gespeichert. Es war bereits an „%{title}“ angehängt." + attached_to_draft: "Zum Entwurf von %{title} hinzugefügt. Zum Veröffentlichen den Entwurf freigeben." + attached_new_draft: "Entwurf von %{title} mit diesem Anhang angelegt. Zum Veröffentlichen den Entwurf freigeben." events: created: "Termin wurde angelegt." updated: "Termin wurde aktualisiert." diff --git a/config/locales/en.yml b/config/locales/en.yml index bd339cc9..4bdca31b 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -87,6 +87,7 @@ en: destroy_outside_trash: "Nodes are only destroyed from the Trash" attach_in_trash: "Cannot attach assets to a node in the Trash" not_permitted: "Only Redaktion members may change published content in this section" + attach_with_autosave: "Cannot attach assets to a node with unsaved changes in the editor" page: attributes: slug: @@ -627,8 +628,9 @@ en: assets: created: "Asset was successfully created." updated: "Asset was successfully updated." - attached: "Asset was successfully created and attached to “%{title}”." already_attached: "Asset saved — it was already attached to “%{title}”." + attached_to_draft: "Attached to the draft of %{title}. Publish it to make the change live." + attached_new_draft: "Created a draft of %{title} with this attachment. Publish it to make the change live." events: created: "Event was successfully created." updated: "Event was successfully updated." -- cgit v1.3