diff --git a/app/helpers/content_items_helper.rb b/app/helpers/content_items_helper.rb new file mode 100644 index 000000000..8a3d4c2c8 --- /dev/null +++ b/app/helpers/content_items_helper.rb @@ -0,0 +1,15 @@ +module ContentItemsHelper + def email_subscription_success_banner_heading(account_flash) + if account_flash.include?("email-subscription-success") + sanitize(t("email.subscribe_title")) + elsif account_flash.include?("email-unsubscribe-success") + sanitize(t("email.unsubscribe_title")) + elsif account_flash.include?("email-subscription-already-subscribed") + sanitize(t("email.already_subscribed_title")) + end + end + + def show_email_subscription_success_banner?(account_flash) + account_flash.include?("email-subscription-success") || account_flash.include?("email-unsubscribe-success") || account_flash.include?("email-subscription-already-subscribed") + end +end diff --git a/app/views/shared/_email_subscribe_unsubscribe_flash.html.erb b/app/views/shared/_email_subscribe_unsubscribe_flash.html.erb index 7b30e919d..3624ccff1 100644 --- a/app/views/shared/_email_subscribe_unsubscribe_flash.html.erb +++ b/app/views/shared/_email_subscribe_unsubscribe_flash.html.erb @@ -1,29 +1,13 @@ -<% if @account_flash.include?("email-subscription-success") %> +<% banner_description = capture do %> + <%= t("email.description") %> +<% end %> + +<% if show_email_subscription_success_banner?(@account_flash) %>
Go to your GOV.UK account to see and manage all your GOV.UK email subscriptions.
+ description: See and manage all your GOV.UK email subscriptions subscribe_title: You’ve subscribed to emails about this page unsubscribe_title: You’ve unsubscribed from emails about this page fatality_notice: diff --git a/config/locales/es-419.yml b/config/locales/es-419.yml index e415e70b5..b21e37492 100644 --- a/config/locales/es-419.yml +++ b/config/locales/es-419.yml @@ -299,7 +299,7 @@ es-419: welsh_language_scheme_html: Conozca nuestro compromiso con %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/es.yml b/config/locales/es.yml index 98c7910a3..448296b60 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -299,7 +299,7 @@ es: welsh_language_scheme_html: Encuentre más sobre nuestro compromiso de publicar en %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/et.yml b/config/locales/et.yml index 8ca799dc7..9303a9de8 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -299,7 +299,7 @@ et: welsh_language_scheme_html: Lisateave meie pühendumuse kohta %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/fa.yml b/config/locales/fa.yml index d6efb40e5..2838a3455 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -299,7 +299,7 @@ fa: welsh_language_scheme_html: درباره تعهد ما نسبت به %{link} اطلاعات کسب کنید. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 568c68850..1f35a5711 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -299,7 +299,7 @@ fi: welsh_language_scheme_html: Tutustu sitoumukseemme %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index ddcb85963..c91ae92e4 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -299,7 +299,7 @@ fr: welsh_language_scheme_html: Découvrez comment nous nous engageons sur %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/gd.yml b/config/locales/gd.yml index 080dc8cd3..43e7b3305 100644 --- a/config/locales/gd.yml +++ b/config/locales/gd.yml @@ -449,7 +449,7 @@ gd: welsh_language_scheme_html: Faigh amach ár gcomhréiteach ar an %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/gu.yml b/config/locales/gu.yml index 832fc33d8..466629f2e 100644 --- a/config/locales/gu.yml +++ b/config/locales/gu.yml @@ -299,7 +299,7 @@ gu: welsh_language_scheme_html: "%{link} પ્રત્યે અમારી પ્રતિબદ્ધતા અંગે જાણો." email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/he.yml b/config/locales/he.yml index b90f9738f..468c317a2 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -299,7 +299,7 @@ he: welsh_language_scheme_html: מידע נוסף על המחויבות שלנו לפרסום %{link} email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/hi.yml b/config/locales/hi.yml index cc1fc408b..c2296a766 100644 --- a/config/locales/hi.yml +++ b/config/locales/hi.yml @@ -299,7 +299,7 @@ hi: welsh_language_scheme_html: हमारी प्रकाशन के प्रति वचनबद्धता के बारे में जानें %(link)। email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 56147d917..07b5486fe 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -449,7 +449,7 @@ hr: welsh_language_scheme_html: Saznajte o našoj predanosti %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/hu.yml b/config/locales/hu.yml index d51399d5c..e5a54666e 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -299,7 +299,7 @@ hu: welsh_language_scheme_html: 'Tájékozódjon az információk közzétételével kapcsolatos elkötelezettségünkről: %{link}' email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/hy.yml b/config/locales/hy.yml index 25b87b6d8..b8ec03c77 100644 --- a/config/locales/hy.yml +++ b/config/locales/hy.yml @@ -299,7 +299,7 @@ hy: welsh_language_scheme_html: 'Տեղեկանալ մեր աշխատանքի մասին %{link} հղումով:' email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/id.yml b/config/locales/id.yml index f99684049..4186baa9f 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -224,7 +224,7 @@ id: welsh_language_scheme_html: Cari tahu komitmen kami kepada %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/is.yml b/config/locales/is.yml index 0dc507344..00ff034d6 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -299,7 +299,7 @@ is: welsh_language_scheme_html: Kynntu þér skuldbindingu okkar við %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/it.yml b/config/locales/it.yml index b2bda6ade..5c5735d2e 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -299,7 +299,7 @@ it: welsh_language_scheme_html: Scopri il nostro impegno per %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/ja.yml b/config/locales/ja.yml index e39c8f5cc..d6f1faad4 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -224,7 +224,7 @@ ja: welsh_language_scheme_html: 情報公開の詳細については %{link} をご覧下さい。 email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/ka.yml b/config/locales/ka.yml index 7518804c8..36a843132 100644 --- a/config/locales/ka.yml +++ b/config/locales/ka.yml @@ -299,7 +299,7 @@ ka: welsh_language_scheme_html: გაეცანით ჩვენს ვალდებულებას %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/kk.yml b/config/locales/kk.yml index 50909dcb5..6120af014 100644 --- a/config/locales/kk.yml +++ b/config/locales/kk.yml @@ -299,7 +299,7 @@ kk: welsh_language_scheme_html: "%{link} қосқан үлесіміз туралы оқыңыз." email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 16c063d49..5d6d4a6fe 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -224,7 +224,7 @@ ko: welsh_language_scheme_html: "%{link} 에서 정보 공개에 대한 내용." email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 90464f079..e12f2e583 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -374,7 +374,7 @@ lt: welsh_language_scheme_html: Sužinokite apie mūsų įsipareigojimą skelbti %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/lv.yml b/config/locales/lv.yml index dd8cc6e05..e01893a53 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -299,7 +299,7 @@ lv: welsh_language_scheme_html: Vairāk par mūsu apņemšanos nodrošināt informācijas pieejamību %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/ms.yml b/config/locales/ms.yml index fffff80a3..3896d3038 100644 --- a/config/locales/ms.yml +++ b/config/locales/ms.yml @@ -224,7 +224,7 @@ ms: welsh_language_scheme_html: Ketahui tentang komitmen kami kepada %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/mt.yml b/config/locales/mt.yml index eac016b86..7823b0f1c 100644 --- a/config/locales/mt.yml +++ b/config/locales/mt.yml @@ -449,7 +449,7 @@ mt: welsh_language_scheme_html: Kun af dwar l-impenn tagħna lejn %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/ne.yml b/config/locales/ne.yml index cbb09ab08..b72a6b828 100644 --- a/config/locales/ne.yml +++ b/config/locales/ne.yml @@ -299,7 +299,7 @@ ne: welsh_language_scheme_html: "%{link} को हाम्रो प्रतिबद्धताको बारेमा जानकारी पाउनुहोस्।" email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 5f965c831..e6eaaa50f 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -299,7 +299,7 @@ nl: welsh_language_scheme_html: Lees meer over onze inzet voor %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/no.yml b/config/locales/no.yml index 66a7dd77d..cb52f8449 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -299,7 +299,7 @@ welsh_language_scheme_html: Finn ut mer om vårt engasjement for %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/pa-pk.yml b/config/locales/pa-pk.yml index 568f477c9..7bd8f75c7 100644 --- a/config/locales/pa-pk.yml +++ b/config/locales/pa-pk.yml @@ -299,7 +299,7 @@ pa-pk: welsh_language_scheme_html: ساڈی وابستگی دے بارے جانو {link}%. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/pa.yml b/config/locales/pa.yml index 14ebeea1c..7686dffaf 100644 --- a/config/locales/pa.yml +++ b/config/locales/pa.yml @@ -299,7 +299,7 @@ pa: welsh_language_scheme_html: "%{link} ਪ੍ਰਤੀ ਸਾਡੀ ਵਚਨਬੱਧਤਾ ਬਾਰੇ ਜਾਣੋ।" email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 830d7de5d..2fa790161 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -449,7 +449,7 @@ pl: welsh_language_scheme_html: Poznaj nasze zobowiązania związane z publikowaniem w %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/ps.yml b/config/locales/ps.yml index bc06d2d6d..204551034 100644 --- a/config/locales/ps.yml +++ b/config/locales/ps.yml @@ -299,7 +299,7 @@ ps: welsh_language_scheme_html: "%{link} ته زموږ د ژمنتیا په اړه معلومات ترلاسه کړئ." email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 3aecf46ca..95b558219 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -299,7 +299,7 @@ pt: welsh_language_scheme_html: Saiba mais sobre o nosso compromisso para com %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 00d30de2b..71a778c27 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -374,7 +374,7 @@ ro: welsh_language_scheme_html: Aflați mai multe despre angajamentul nostru pentru %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/ru.yml b/config/locales/ru.yml index e78a635d1..195e739b0 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -449,7 +449,7 @@ ru: welsh_language_scheme_html: Узнайте о наших обязательствах по %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/si.yml b/config/locales/si.yml index fcd464215..ce0734104 100644 --- a/config/locales/si.yml +++ b/config/locales/si.yml @@ -299,7 +299,7 @@ si: welsh_language_scheme_html: "%{link} සඳහා අපේ කැපවීම ගැන සොයා බලන්න." email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 00f950545..4ea9b3490 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -374,7 +374,7 @@ sk: welsh_language_scheme_html: Prečítajte si o našom záväzku voči %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 21a348cd8..1e5919df6 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -449,7 +449,7 @@ sl: welsh_language_scheme_html: Izvedite več o naši zavezanosti %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/so.yml b/config/locales/so.yml index 31df6dbf6..346f41401 100644 --- a/config/locales/so.yml +++ b/config/locales/so.yml @@ -299,7 +299,7 @@ so: welsh_language_scheme_html: Raadi waxyaabaha ku saabsan ka go'naanshahayaga %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 61340c60e..afc88a191 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -299,7 +299,7 @@ sq: welsh_language_scheme_html: Mësoni rreth angazhimit tonë ndaj %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 248152114..c8a1dc443 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -449,7 +449,7 @@ sr: welsh_language_scheme_html: Saznajte više o našoj posvećenosti %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 445ec1282..fe7952ef4 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -299,7 +299,7 @@ sv: welsh_language_scheme_html: Ta reda på vårt åtagande om %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/sw.yml b/config/locales/sw.yml index 3d9be721e..fa8d8dd84 100644 --- a/config/locales/sw.yml +++ b/config/locales/sw.yml @@ -299,7 +299,7 @@ sw: welsh_language_scheme_html: Pata maelezo kuhusu wajibu wetu wa %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/ta.yml b/config/locales/ta.yml index b597e8165..cef1ca60c 100644 --- a/config/locales/ta.yml +++ b/config/locales/ta.yml @@ -299,7 +299,7 @@ ta: welsh_language_scheme_html: "%{link}-க்கு எங்கள் கடப்பாடு குறித்துக் கண்டறியுங்கள்." email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/th.yml b/config/locales/th.yml index 91d20365a..aa0f6b025 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -224,7 +224,7 @@ th: welsh_language_scheme_html: ดูข้อมูลเพิ่มเติมเกี่ยวกับพันธกิจของเราสำหรับ %{link} email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/tk.yml b/config/locales/tk.yml index 4434814a4..93e4cf6b7 100644 --- a/config/locales/tk.yml +++ b/config/locales/tk.yml @@ -299,7 +299,7 @@ tk: welsh_language_scheme_html: Niýetimiz barada %{link}-da okaň. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/tr.yml b/config/locales/tr.yml index bcef4e3ad..656073b7f 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -299,7 +299,7 @@ tr: welsh_language_scheme_html: "%{link} bağlantısına taahhüdümüzü okuyun." email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 0c8b9bd30..c72891619 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -449,7 +449,7 @@ uk: welsh_language_scheme_html: Дізнайтесь про дотримання нами %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/ur.yml b/config/locales/ur.yml index 7a956191c..9960e16b3 100644 --- a/config/locales/ur.yml +++ b/config/locales/ur.yml @@ -299,7 +299,7 @@ ur: welsh_language_scheme_html: "%{link} کے ساتھ ہماری وابستگی کے بارے میں جانیں۔" email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/uz.yml b/config/locales/uz.yml index 7f1716232..704308e21 100644 --- a/config/locales/uz.yml +++ b/config/locales/uz.yml @@ -299,7 +299,7 @@ uz: welsh_language_scheme_html: "%{link} да бизнинг содиқлилигимиз ҳақида билиб олинг ." email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/vi.yml b/config/locales/vi.yml index d3e403e80..a2dbe4412 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -224,7 +224,7 @@ vi: welsh_language_scheme_html: Tìm hiểu về cam kết của chúng tôi đối với %{link}. email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/yi.yml b/config/locales/yi.yml index cecc9a2c9..571252202 100644 --- a/config/locales/yi.yml +++ b/config/locales/yi.yml @@ -299,7 +299,7 @@ yi: welsh_language_scheme_html: email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/zh-hk.yml b/config/locales/zh-hk.yml index b61be9cea..298c10862 100644 --- a/config/locales/zh-hk.yml +++ b/config/locales/zh-hk.yml @@ -299,7 +299,7 @@ zh-hk: welsh_language_scheme_html: 查閱我們在 %{link} 的發佈承諾。 email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/zh-tw.yml b/config/locales/zh-tw.yml index 9ea4584e1..8dc35ae60 100644 --- a/config/locales/zh-tw.yml +++ b/config/locales/zh-tw.yml @@ -299,7 +299,7 @@ zh-tw: welsh_language_scheme_html: 了解我們對 %{link} 的承諾。 email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: diff --git a/config/locales/zh.yml b/config/locales/zh.yml index d8b863a3d..68051b762 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -224,7 +224,7 @@ zh: welsh_language_scheme_html: 查看我们对 %{link} 的承诺。 email: already_subscribed_title: - description_html: + description: subscribe_title: unsubscribe_title: fatality_notice: