From 5c7ce838691340297240ce04bdb17deb9dd2628c Mon Sep 17 00:00:00 2001 From: Brian Austin Date: Fri, 3 Nov 2023 22:39:50 -0400 Subject: [PATCH 1/2] AO3-6058 Add 'translation into' to download preface --- .../downloads/_download_preface.html.erb | 11 +++++- config/locales/views/en.yml | 4 +++ features/works/work_download.feature | 35 +++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/app/views/downloads/_download_preface.html.erb b/app/views/downloads/_download_preface.html.erb index 86d692c8a35..7bfe5737ffe 100644 --- a/app/views/downloads/_download_preface.html.erb +++ b/app/views/downloads/_download_preface.html.erb @@ -65,15 +65,24 @@ <% end %> <% end %> + <%# 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.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.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") %> + <% translations = @work.approved_related_works.where(translation: true) %> <% related_works = @work.parent_work_relationships.reject { |wr| !wr.parent } %> - <% if related_works.length > 0 %> + <% if translations.any? || related_works.any? %>