From bd0f170263eb407a2aa33ca9ce4de4494c6a2560 Mon Sep 17 00:00:00 2001 From: Brian Austin <13002992+brianjaustin@users.noreply.github.com> Date: Sun, 5 Nov 2023 23:00:19 -0500 Subject: [PATCH] AO3-6058 Add 'translation into' to download preface (#4652) * AO3-6058 Add 'translation into' to download preface * Remove full stop --- .../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? %>