diff --git a/app/helpers/content_items_helper.rb b/app/helpers/content_items_helper.rb index 8a3d4c2c8..421be9c16 100644 --- a/app/helpers/content_items_helper.rb +++ b/app/helpers/content_items_helper.rb @@ -1,11 +1,11 @@ module ContentItemsHelper - def email_subscription_success_banner_heading(account_flash) + def email_subscription_success_banner_heading(account_flash, locale = nil) if account_flash.include?("email-subscription-success") - sanitize(t("email.subscribe_title")) + sanitize(t("email.subscribe_title", locale:)) elsif account_flash.include?("email-unsubscribe-success") - sanitize(t("email.unsubscribe_title")) + sanitize(t("email.unsubscribe_title", locale:)) elsif account_flash.include?("email-subscription-already-subscribed") - sanitize(t("email.already_subscribed_title")) + sanitize(t("email.already_subscribed_title", locale:)) end end diff --git a/app/views/content_items/call_for_evidence.html.erb b/app/views/content_items/call_for_evidence.html.erb index 944b6caee..7e2a8a969 100644 --- a/app/views/content_items/call_for_evidence.html.erb +++ b/app/views/content_items/call_for_evidence.html.erb @@ -4,7 +4,7 @@ ) %> <% end %> -<%= render 'shared/email_subscribe_unsubscribe_flash' %> +<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.title_and_context[:title] } %>