From 2aee254dad41595fe4f333812152e6c9c6d02d07 Mon Sep 17 00:00:00 2001 From: maxgds Date: Tue, 15 Sep 2020 08:12:47 +0100 Subject: [PATCH] Add lang attribute to withdrawal notice Withdrawal notices are always presented in English but sometimes appear on a translated page. This passes en as a language value to the notice component when that happens. --- app/presenters/content_item/withdrawable.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/presenters/content_item/withdrawable.rb b/app/presenters/content_item/withdrawable.rb index 382a8802d..c0733e09d 100644 --- a/app/presenters/content_item/withdrawable.rb +++ b/app/presenters/content_item/withdrawable.rb @@ -14,6 +14,7 @@ def withdrawal_notice_component title: withdrawal_notice_title, description_govspeak: withdrawal_notice["explanation"]&.html_safe, time: withdrawal_notice_time, + lang: I18n.locale.to_s == "en" ? false : "en", } end end