From bddec1f8530262b4487697fbac3bd35fdbd943de Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Sun, 5 Apr 2026 20:40:49 -0500 Subject: [PATCH 01/19] Update notes section to show a message when the inspiration/translation parent is deleted --- app/helpers/works_helper.rb | 8 +++++++- app/views/works/_work_header_notes.html.erb | 10 ++++------ config/locales/views/en.yml | 3 +++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/app/helpers/works_helper.rb b/app/helpers/works_helper.rb index 36ab1e42a94..48958f77c29 100644 --- a/app/helpers/works_helper.rb +++ b/app/helpers/works_helper.rb @@ -125,9 +125,15 @@ def get_inspired_by(work) end def related_work_note(related_work, relation, download: false) + default_locale = download ? :en : nil + + if (related_work == nil) + return t(".#{relation}.deleted", + locale: default_locale) + end + work_link = link_to related_work.title, polymorphic_url(related_work) language = tag.span(related_work.language.name, lang: related_work.language.short) if related_work.language - default_locale = download ? :en : nil creator_link = if download byline(related_work, visibility: "public", only_path: false) diff --git a/app/views/works/_work_header_notes.html.erb b/app/views/works/_work_header_notes.html.erb index a81d38d84ba..6b189bdfccf 100644 --- a/app/views/works/_work_header_notes.html.erb +++ b/app/views/works/_work_header_notes.html.erb @@ -32,12 +32,10 @@ <%# i18n-tasks-use t("works.work_header_notes.inspired_by.revealed_html") %> <%# i18n-tasks-use t("works.work_header_notes.inspired_by.unrevealed") %> <% for related_work in @work.parents_after_saving %> - <% if related_work.parent %> -
  • - <% relation = related_work.translation ? "translation_of" : "inspired_by" %> - <%= related_work_note(related_work.parent, relation) %> -
  • - <% end %> +
  • + <% relation = related_work.translation ? "translation_of" : "inspired_by" %> + <%= related_work_note(related_work.parent, relation) %> +
  • <% end %> <%# prompts %> diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index c2e3a15cd7a..26370b7854a 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -944,6 +944,7 @@ en: restricted_html: Inspired by [Restricted Work] by %{creator_link} revealed_html: Inspired by %{work_link} by %{creator_link} unrevealed: Inspired by a work in an unrevealed collection + deleted: Inspired by a deleted work language: 'Language:' notes: Notes originally_posted_html: Posted originally on the %{archive_link} at %{work_url}. @@ -963,6 +964,7 @@ en: restricted_html: A translation of [Restricted Work] by %{creator_link} revealed_html: A translation of %{work_link} by %{creator_link} unrevealed: A translation of a work in an unrevealed collection + deleted: A translation of a deleted work updated: 'Updated: %{date}' words: 'Words: %{count_with_delimiters}' errors: @@ -3269,6 +3271,7 @@ en: restricted_html: Inspired by [Restricted Work] by %{creator_link} (Log in to access.) revealed_html: Inspired by %{work_link} by %{creator_link} unrevealed: Inspired by a work in an unrevealed collection + deleted: Inspired by a deleted work jump: endnotes_and_related_works_html: "(See the end of the work for %{endnotes_link} and %{related_works_link}.)" endnotes_html: "(See the end of the work for %{endnotes_link}.)" From 807e2adbe63e781721230ab61b966fe4accea1b8 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Sun, 5 Apr 2026 21:27:08 -0500 Subject: [PATCH 02/19] Previously removed works can now be unlinked in the Edit page --- app/views/works/_standard_form.html.erb | 30 +++++++++++++------------ config/locales/views/en.yml | 4 ++++ 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/app/views/works/_standard_form.html.erb b/app/views/works/_standard_form.html.erb index 29ccb4ae548..6f1231bf6aa 100644 --- a/app/views/works/_standard_form.html.erb +++ b/app/views/works/_standard_form.html.erb @@ -94,7 +94,7 @@ <%= check_box_tag "parent-options-show", "1", check_parent_box(@work), class: "toggle_formfield" %>
    - <%= label_tag "parent-options-show", ts("This work is a remix, a translation, a podfic, or was inspired by another work") %> + <%= label_tag "parent-options-show", t("works.associations.parent.header") %> <%= link_to_help "parent-works-help" %> @@ -137,20 +137,22 @@ <% unless existing_parents.blank? %>
    <%= ts("Current parent works") %>
    <% existing_parents.each do |related_work| %> - <% if related_work.parent %> -
    - +
    <% end %> <% end %> diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index 26370b7854a..cc09f69270f 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -3173,6 +3173,10 @@ en: language: choose: Choose a language title: Associations + parent: + header: This work is a remix, a translation, a podfic, or was inspired by another work + deleted: Deleted work + delete_confirm: Are you sure you want to delete the connection to this work? byline: add_co-creators: Add co-creators show_co-creator_options: Add co-creators? From 3f9c661bfb1812318d5a26a14a608e4ba24a0dc0 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Sun, 5 Apr 2026 21:34:21 -0500 Subject: [PATCH 03/19] Allow deleted works to appear on downloads --- app/views/downloads/_download_preface.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/downloads/_download_preface.html.erb b/app/views/downloads/_download_preface.html.erb index 08cf5c3d96b..2e5c5376515 100644 --- a/app/views/downloads/_download_preface.html.erb +++ b/app/views/downloads/_download_preface.html.erb @@ -71,7 +71,7 @@ <%# i18n-tasks-use t("downloads.download_preface.translation_of.revealed_html") %> <%# i18n-tasks-use t("downloads.download_preface.translation_of.unrevealed") %> <% translations = @work.approved_related_works.where(translation: true) %> - <% related_works = @work.parent_work_relationships.reject { |wr| !wr.parent } %> + <% related_works = @work.parent_work_relationships %> <% if translations.any? || related_works.any? %>
      <% translations.each do |related_work| %> From 8e662c724c71897101602a663d8c4622ed220f50 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Sun, 5 Apr 2026 21:48:23 -0500 Subject: [PATCH 04/19] Make some style fixes --- app/helpers/works_helper.rb | 5 ++--- app/views/works/_standard_form.html.erb | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/helpers/works_helper.rb b/app/helpers/works_helper.rb index 48958f77c29..9dacf41bdf3 100644 --- a/app/helpers/works_helper.rb +++ b/app/helpers/works_helper.rb @@ -127,9 +127,8 @@ def get_inspired_by(work) def related_work_note(related_work, relation, download: false) default_locale = download ? :en : nil - if (related_work == nil) - return t(".#{relation}.deleted", - locale: default_locale) + if related_work.nil? + return t(".#{relation}.deleted", locale: default_locale) end work_link = link_to related_work.title, polymorphic_url(related_work) diff --git a/app/views/works/_standard_form.html.erb b/app/views/works/_standard_form.html.erb index 6f1231bf6aa..03773f3cdcf 100644 --- a/app/views/works/_standard_form.html.erb +++ b/app/views/works/_standard_form.html.erb @@ -147,9 +147,7 @@ <% end %>
    • - <%= link_to ts("Remove"), related_work, - data: { confirm: t("works.associations.parent.delete_confirm") }, - method: :delete %> + <%= link_to ts("Remove"), related_work, data: { confirm: t("works.associations.parent.delete_confirm") }, method: :delete %>
    From 85bbfe8d44cb9f089456339c7b44272fae15bcbf Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Sun, 5 Apr 2026 21:54:12 -0500 Subject: [PATCH 05/19] More style fixes --- app/helpers/works_helper.rb | 4 +--- app/views/works/_standard_form.html.erb | 3 ++- config/locales/views/en.yml | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/works_helper.rb b/app/helpers/works_helper.rb index 9dacf41bdf3..16796ce0d5f 100644 --- a/app/helpers/works_helper.rb +++ b/app/helpers/works_helper.rb @@ -127,9 +127,7 @@ def get_inspired_by(work) def related_work_note(related_work, relation, download: false) default_locale = download ? :en : nil - if related_work.nil? - return t(".#{relation}.deleted", locale: default_locale) - end + return t(".#{relation}.deleted", locale: default_locale) if related_work.nil? work_link = link_to related_work.title, polymorphic_url(related_work) language = tag.span(related_work.language.name, lang: related_work.language.short) if related_work.language diff --git a/app/views/works/_standard_form.html.erb b/app/views/works/_standard_form.html.erb index 03773f3cdcf..a19ad082bbd 100644 --- a/app/views/works/_standard_form.html.erb +++ b/app/views/works/_standard_form.html.erb @@ -147,7 +147,8 @@ <% end %>
  • - <%= link_to ts("Remove"), related_work, data: { confirm: t("works.associations.parent.delete_confirm") }, method: :delete %> + <%= link_to t("works.associations.parent.delete_button"), related_work, + data: { confirm: t("works.associations.parent.delete_confirm") }, method: :delete %>
  • diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index cc09f69270f..e4d87325cce 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -3176,6 +3176,7 @@ en: parent: header: This work is a remix, a translation, a podfic, or was inspired by another work deleted: Deleted work + delete_button: Remove delete_confirm: Are you sure you want to delete the connection to this work? byline: add_co-creators: Add co-creators From 9d1eb358abfc10f8f85a51470bc090ef205e4c4d Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Sun, 5 Apr 2026 22:00:26 -0500 Subject: [PATCH 06/19] Hopefully the last style warning --- app/views/works/_standard_form.html.erb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/works/_standard_form.html.erb b/app/views/works/_standard_form.html.erb index a19ad082bbd..294d600c112 100644 --- a/app/views/works/_standard_form.html.erb +++ b/app/views/works/_standard_form.html.erb @@ -147,8 +147,7 @@ <% end %>
  • - <%= link_to t("works.associations.parent.delete_button"), related_work, - data: { confirm: t("works.associations.parent.delete_confirm") }, method: :delete %> + <%= link_to t("works.associations.parent.delete_button"), related_work, data: { confirm: t("works.associations.parent.delete_confirm") }, method: :delete %>
  • From 870fff690de7ecaa0f7d4ad11f5a5165480ccc0e Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Thu, 9 Apr 2026 20:39:12 -0500 Subject: [PATCH 07/19] Add annotations for some of the new translatable strings --- app/views/downloads/_download_preface.html.erb | 2 ++ app/views/works/_work_header_notes.html.erb | 1 + 2 files changed, 3 insertions(+) diff --git a/app/views/downloads/_download_preface.html.erb b/app/views/downloads/_download_preface.html.erb index 2e5c5376515..d3e71b01bad 100644 --- a/app/views/downloads/_download_preface.html.erb +++ b/app/views/downloads/_download_preface.html.erb @@ -64,9 +64,11 @@ <%# i18n-tasks-use t("downloads.download_preface.translated_to.restricted_html") %> <%# i18n-tasks-use t("downloads.download_preface.translated_to.revealed_html") %> <%# i18n-tasks-use t("downloads.download_preface.translated_to.unrevealed_html") %> + <%# i18n-tasks-use t("downloads.download_preface.translated_to.deleted") %> <%# i18n-tasks-use t("downloads.download_preface.inspired_by.restricted_html") %> <%# i18n-tasks-use t("downloads.download_preface.inspired_by.revealed_html") %> <%# i18n-tasks-use t("downloads.download_preface.inspired_by.unrevealed") %> + <%# i18n-tasks-use t("downloads.download_preface.inspired_by.deleted") %> <%# i18n-tasks-use t("downloads.download_preface.translation_of.restricted_html") %> <%# i18n-tasks-use t("downloads.download_preface.translation_of.revealed_html") %> <%# i18n-tasks-use t("downloads.download_preface.translation_of.unrevealed") %> diff --git a/app/views/works/_work_header_notes.html.erb b/app/views/works/_work_header_notes.html.erb index 6b189bdfccf..bdfb43f8a3f 100644 --- a/app/views/works/_work_header_notes.html.erb +++ b/app/views/works/_work_header_notes.html.erb @@ -31,6 +31,7 @@ <%# i18n-tasks-use t("works.work_header_notes.inspired_by.restricted_html") %> <%# i18n-tasks-use t("works.work_header_notes.inspired_by.revealed_html") %> <%# i18n-tasks-use t("works.work_header_notes.inspired_by.unrevealed") %> + <%# i18n-tasks-use t("works.work_header_notes.inspired_by.deleted") %> <% for related_work in @work.parents_after_saving %>
  • <% relation = related_work.translation ? "translation_of" : "inspired_by" %> From 65ad4b6a46288e14580a4f50bda9eba95a5e7a6a Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Fri, 10 Apr 2026 09:45:54 -0500 Subject: [PATCH 08/19] Add missing translation tag --- app/views/downloads/_download_preface.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/downloads/_download_preface.html.erb b/app/views/downloads/_download_preface.html.erb index d3e71b01bad..6af01d89a66 100644 --- a/app/views/downloads/_download_preface.html.erb +++ b/app/views/downloads/_download_preface.html.erb @@ -72,6 +72,7 @@ <%# i18n-tasks-use t("downloads.download_preface.translation_of.restricted_html") %> <%# i18n-tasks-use t("downloads.download_preface.translation_of.revealed_html") %> <%# i18n-tasks-use t("downloads.download_preface.translation_of.unrevealed") %> + <%# i18n-tasks-use t("downloads.download_preface.translation_of.deleted") %> <% translations = @work.approved_related_works.where(translation: true) %> <% related_works = @work.parent_work_relationships %> <% if translations.any? || related_works.any? %> From a647f714049f31e9642c666083b006e49ba3bb65 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Fri, 10 Apr 2026 10:00:03 -0500 Subject: [PATCH 09/19] Remove translation tag that's not needed --- app/views/downloads/_download_preface.html.erb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/downloads/_download_preface.html.erb b/app/views/downloads/_download_preface.html.erb index 6af01d89a66..d59fe1656ec 100644 --- a/app/views/downloads/_download_preface.html.erb +++ b/app/views/downloads/_download_preface.html.erb @@ -64,7 +64,6 @@ <%# i18n-tasks-use t("downloads.download_preface.translated_to.restricted_html") %> <%# i18n-tasks-use t("downloads.download_preface.translated_to.revealed_html") %> <%# i18n-tasks-use t("downloads.download_preface.translated_to.unrevealed_html") %> - <%# i18n-tasks-use t("downloads.download_preface.translated_to.deleted") %> <%# i18n-tasks-use t("downloads.download_preface.inspired_by.restricted_html") %> <%# i18n-tasks-use t("downloads.download_preface.inspired_by.revealed_html") %> <%# i18n-tasks-use t("downloads.download_preface.inspired_by.unrevealed") %> From 84358ebb07f72e6127cdb4b72dacd328bb9759ce Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Fri, 10 Apr 2026 10:37:28 -0500 Subject: [PATCH 10/19] Normalize I18n en files --- config/locales/controllers/e.yml | 1 + config/locales/devise/e.yml | 1 + config/locales/helpers/e.yml | 1 + config/locales/mailers/e.yml | 1 + config/locales/models/e.yml | 1 + config/locales/validators/e.yml | 1 + config/locales/views/e.yml | 1 + 7 files changed, 7 insertions(+) create mode 100644 config/locales/controllers/e.yml create mode 100644 config/locales/devise/e.yml create mode 100644 config/locales/helpers/e.yml create mode 100644 config/locales/mailers/e.yml create mode 100644 config/locales/models/e.yml create mode 100644 config/locales/validators/e.yml create mode 100644 config/locales/views/e.yml diff --git a/config/locales/controllers/e.yml b/config/locales/controllers/e.yml new file mode 100644 index 00000000000..2fbf0ffd710 --- /dev/null +++ b/config/locales/controllers/e.yml @@ -0,0 +1 @@ +--- {} diff --git a/config/locales/devise/e.yml b/config/locales/devise/e.yml new file mode 100644 index 00000000000..2fbf0ffd710 --- /dev/null +++ b/config/locales/devise/e.yml @@ -0,0 +1 @@ +--- {} diff --git a/config/locales/helpers/e.yml b/config/locales/helpers/e.yml new file mode 100644 index 00000000000..2fbf0ffd710 --- /dev/null +++ b/config/locales/helpers/e.yml @@ -0,0 +1 @@ +--- {} diff --git a/config/locales/mailers/e.yml b/config/locales/mailers/e.yml new file mode 100644 index 00000000000..2fbf0ffd710 --- /dev/null +++ b/config/locales/mailers/e.yml @@ -0,0 +1 @@ +--- {} diff --git a/config/locales/models/e.yml b/config/locales/models/e.yml new file mode 100644 index 00000000000..2fbf0ffd710 --- /dev/null +++ b/config/locales/models/e.yml @@ -0,0 +1 @@ +--- {} diff --git a/config/locales/validators/e.yml b/config/locales/validators/e.yml new file mode 100644 index 00000000000..2fbf0ffd710 --- /dev/null +++ b/config/locales/validators/e.yml @@ -0,0 +1 @@ +--- {} diff --git a/config/locales/views/e.yml b/config/locales/views/e.yml new file mode 100644 index 00000000000..2fbf0ffd710 --- /dev/null +++ b/config/locales/views/e.yml @@ -0,0 +1 @@ +--- {} From 6bc0e31c118505b085b7feb470b2ce86ac8edcec Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Fri, 10 Apr 2026 11:01:21 -0500 Subject: [PATCH 11/19] Run normalization of english translatio, but properly --- config/locales/views/en.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index e4d87325cce..920348bc8d8 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -941,10 +941,10 @@ en: end_notes_with_work_notes: more notes end_notes_without_work_notes: notes inspired_by: + deleted: Inspired by a deleted work restricted_html: Inspired by [Restricted Work] by %{creator_link} revealed_html: Inspired by %{work_link} by %{creator_link} unrevealed: Inspired by a work in an unrevealed collection - deleted: Inspired by a deleted work language: 'Language:' notes: Notes originally_posted_html: Posted originally on the %{archive_link} at %{work_url}. @@ -961,10 +961,10 @@ en: revealed_html: 'Translation into %{language} available: %{work_link} by %{creator_link}' unrevealed_html: 'Translation into %{language} available: A work in an unrevealed collection' translation_of: + deleted: A translation of a deleted work restricted_html: A translation of [Restricted Work] by %{creator_link} revealed_html: A translation of %{work_link} by %{creator_link} unrevealed: A translation of a work in an unrevealed collection - deleted: A translation of a deleted work updated: 'Updated: %{date}' words: 'Words: %{count_with_delimiters}' errors: @@ -3172,12 +3172,12 @@ en: associations: language: choose: Choose a language - title: Associations parent: - header: This work is a remix, a translation, a podfic, or was inspired by another work - deleted: Deleted work delete_button: Remove delete_confirm: Are you sure you want to delete the connection to this work? + deleted: Deleted work + header: This work is a remix, a translation, a podfic, or was inspired by another work + title: Associations byline: add_co-creators: Add co-creators show_co-creator_options: Add co-creators? @@ -3272,11 +3272,11 @@ en: heading: Download work_header_notes: inspired_by: + deleted: Inspired by a deleted work other_works_inspired_by_this_one: other works inspired by this one restricted_html: Inspired by [Restricted Work] by %{creator_link} (Log in to access.) revealed_html: Inspired by %{work_link} by %{creator_link} unrevealed: Inspired by a work in an unrevealed collection - deleted: Inspired by a deleted work jump: endnotes_and_related_works_html: "(See the end of the work for %{endnotes_link} and %{related_works_link}.)" endnotes_html: "(See the end of the work for %{endnotes_link}.)" From 3334dbb7358f4b756c6fb71088d6a0a8de45ed0f Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Mon, 20 Apr 2026 19:14:48 -0500 Subject: [PATCH 12/19] Remove accidental files --- config/locales/controllers/e.yml | 1 - config/locales/devise/e.yml | 1 - config/locales/helpers/e.yml | 1 - config/locales/mailers/e.yml | 1 - config/locales/models/e.yml | 1 - config/locales/validators/e.yml | 1 - config/locales/views/e.yml | 1 - 7 files changed, 7 deletions(-) delete mode 100644 config/locales/controllers/e.yml delete mode 100644 config/locales/devise/e.yml delete mode 100644 config/locales/helpers/e.yml delete mode 100644 config/locales/mailers/e.yml delete mode 100644 config/locales/models/e.yml delete mode 100644 config/locales/validators/e.yml delete mode 100644 config/locales/views/e.yml diff --git a/config/locales/controllers/e.yml b/config/locales/controllers/e.yml deleted file mode 100644 index 2fbf0ffd710..00000000000 --- a/config/locales/controllers/e.yml +++ /dev/null @@ -1 +0,0 @@ ---- {} diff --git a/config/locales/devise/e.yml b/config/locales/devise/e.yml deleted file mode 100644 index 2fbf0ffd710..00000000000 --- a/config/locales/devise/e.yml +++ /dev/null @@ -1 +0,0 @@ ---- {} diff --git a/config/locales/helpers/e.yml b/config/locales/helpers/e.yml deleted file mode 100644 index 2fbf0ffd710..00000000000 --- a/config/locales/helpers/e.yml +++ /dev/null @@ -1 +0,0 @@ ---- {} diff --git a/config/locales/mailers/e.yml b/config/locales/mailers/e.yml deleted file mode 100644 index 2fbf0ffd710..00000000000 --- a/config/locales/mailers/e.yml +++ /dev/null @@ -1 +0,0 @@ ---- {} diff --git a/config/locales/models/e.yml b/config/locales/models/e.yml deleted file mode 100644 index 2fbf0ffd710..00000000000 --- a/config/locales/models/e.yml +++ /dev/null @@ -1 +0,0 @@ ---- {} diff --git a/config/locales/validators/e.yml b/config/locales/validators/e.yml deleted file mode 100644 index 2fbf0ffd710..00000000000 --- a/config/locales/validators/e.yml +++ /dev/null @@ -1 +0,0 @@ ---- {} diff --git a/config/locales/views/e.yml b/config/locales/views/e.yml deleted file mode 100644 index 2fbf0ffd710..00000000000 --- a/config/locales/views/e.yml +++ /dev/null @@ -1 +0,0 @@ ---- {} From c3fae828f95165e67be98ffe8f9ad4a99cd47a67 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Mon, 20 Apr 2026 19:35:07 -0500 Subject: [PATCH 13/19] Using lazy loading for the newly added translation blocks --- app/views/works/_standard_form.html.erb | 6 +++--- config/locales/views/en.yml | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/works/_standard_form.html.erb b/app/views/works/_standard_form.html.erb index 294d600c112..f3aee44dbd8 100644 --- a/app/views/works/_standard_form.html.erb +++ b/app/views/works/_standard_form.html.erb @@ -94,7 +94,7 @@ <%= check_box_tag "parent-options-show", "1", check_parent_box(@work), class: "toggle_formfield" %>
    - <%= label_tag "parent-options-show", t("works.associations.parent.header") %> + <%= label_tag "parent-options-show", t(".header") %> <%= link_to_help "parent-works-help" %> @@ -143,11 +143,11 @@ <% if related_work.parent %> <%= link_to related_work.parent.title, related_work.parent %> <% else %> - <%= t("works.associations.parent.deleted") %> + <%= t(".deleted_work") %> <% end %>
  • - <%= link_to t("works.associations.parent.delete_button"), related_work, data: { confirm: t("works.associations.parent.delete_confirm") }, method: :delete %> + <%= link_to t(".remove"), related_work, data: { confirm: t(".remove_confirm") }, method: :delete %>
  • diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index 920348bc8d8..927abd87d81 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -3172,11 +3172,6 @@ en: associations: language: choose: Choose a language - parent: - delete_button: Remove - delete_confirm: Are you sure you want to delete the connection to this work? - deleted: Deleted work - header: This work is a remix, a translation, a podfic, or was inspired by another work title: Associations byline: add_co-creators: Add co-creators @@ -3251,6 +3246,11 @@ en: no_works: You have no works or drafts to edit. skin: select: Select work skin + standard_form: + deleted_work: Deleted work + header: This work is a remix, a translation, a podfic, or was inspired by another work + remove: Remove + remove_confirm: Are you sure you want to remove the connection to this work? work_approved_children: inspired_by: restricted_html: "[Restricted Work] by %{creator_link} (Log in to access.)" From 4b813ce93bc5057406c33246c9eade8cac5e1850 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Mon, 20 Apr 2026 19:48:07 -0500 Subject: [PATCH 14/19] Add missing translation and fix the order to match the yml --- app/views/downloads/_download_preface.html.erb | 4 ++-- app/views/works/_work_header_notes.html.erb | 1 + config/locales/views/en.yml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/downloads/_download_preface.html.erb b/app/views/downloads/_download_preface.html.erb index d59fe1656ec..eb8340ed7e3 100644 --- a/app/views/downloads/_download_preface.html.erb +++ b/app/views/downloads/_download_preface.html.erb @@ -64,14 +64,14 @@ <%# i18n-tasks-use t("downloads.download_preface.translated_to.restricted_html") %> <%# i18n-tasks-use t("downloads.download_preface.translated_to.revealed_html") %> <%# i18n-tasks-use t("downloads.download_preface.translated_to.unrevealed_html") %> + <%# i18n-tasks-use t("downloads.download_preface.inspired_by.deleted") %> <%# i18n-tasks-use t("downloads.download_preface.inspired_by.restricted_html") %> <%# i18n-tasks-use t("downloads.download_preface.inspired_by.revealed_html") %> <%# i18n-tasks-use t("downloads.download_preface.inspired_by.unrevealed") %> - <%# i18n-tasks-use t("downloads.download_preface.inspired_by.deleted") %> + <%# i18n-tasks-use t("downloads.download_preface.translation_of.deleted") %> <%# i18n-tasks-use t("downloads.download_preface.translation_of.restricted_html") %> <%# i18n-tasks-use t("downloads.download_preface.translation_of.revealed_html") %> <%# i18n-tasks-use t("downloads.download_preface.translation_of.unrevealed") %> - <%# i18n-tasks-use t("downloads.download_preface.translation_of.deleted") %> <% translations = @work.approved_related_works.where(translation: true) %> <% related_works = @work.parent_work_relationships %> <% if translations.any? || related_works.any? %> diff --git a/app/views/works/_work_header_notes.html.erb b/app/views/works/_work_header_notes.html.erb index bdfb43f8a3f..db100adc283 100644 --- a/app/views/works/_work_header_notes.html.erb +++ b/app/views/works/_work_header_notes.html.erb @@ -25,6 +25,7 @@ <% end %> <%# parent works %> + <%# i18n-tasks-use t("works.work_header_notes.translation_of.deleted") %> <%# i18n-tasks-use t("works.work_header_notes.translation_of.restricted_html") %> <%# i18n-tasks-use t("works.work_header_notes.translation_of.revealed_html") %> <%# i18n-tasks-use t("works.work_header_notes.translation_of.unrevealed") %> diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index 927abd87d81..2b1919acc30 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -3288,6 +3288,7 @@ en: revealed_html: 'Translation into %{language} available: %{work_link} by %{creator_link}' unrevealed_html: 'Translation into %{language} available: A work in an unrevealed collection' translation_of: + deleted: A translation of a deleted work restricted_html: A translation of [Restricted Work] by %{creator_link} (Log in to access.) revealed_html: A translation of %{work_link} by %{creator_link} unrevealed: A translation of a work in an unrevealed collection From 6d95f006e0b5486fb4b3ce6377550307fc90e505 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Fri, 24 Apr 2026 20:49:53 -0500 Subject: [PATCH 15/19] Added feature test for checking the deleted relationship notes --- features/works/work_related.feature | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/features/works/work_related.feature b/features/works/work_related.feature index b68699c495c..13e910b3364 100644 --- a/features/works/work_related.feature +++ b/features/works/work_related.feature @@ -802,3 +802,15 @@ Scenario: Notification emails for translations are translated And "encouragement" should receive 2 emails And the last email to "encouragement" should be non-translated And the last email should have "Related work notification" in the subject + +Scenario: A note appears on deleted inspirations and translations + + Given I have related works setup + And I post a related work as remixer + And I post a translation as translator + When I am logged in as "inspiration" + And I delete the work "Worldbuilding" + When I view the work "Followup" + Then I should see "Inspired by a deleted work" + When I view the work "Worldbuilding Translated" + Then I should see "A translation of a deleted work" \ No newline at end of file From 23eed6bb7b2069a5d7cd8b83701a0c7de8f06803 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Fri, 8 May 2026 14:53:42 -0500 Subject: [PATCH 16/19] Remove uneeded role from ul tag --- app/views/works/_standard_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/works/_standard_form.html.erb b/app/views/works/_standard_form.html.erb index 0b3d1261874..3dc488fe372 100644 --- a/app/views/works/_standard_form.html.erb +++ b/app/views/works/_standard_form.html.erb @@ -138,7 +138,7 @@
    <%= ts("Current parent works") %>
    <% existing_parents.each do |related_work| %>
    -