Skip to content

Commit

Permalink
Add lang attribute to withdrawal notice
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
maxgds committed Sep 15, 2020
1 parent b546602 commit 31346a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/presenters/content_item/withdrawable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ def page_title
end

def withdrawal_notice_component
I18n.locale.to_s == "en" ? lang = false : lang = "en"
if withdrawn?
{
title: withdrawal_notice_title,
description_govspeak: withdrawal_notice["explanation"]&.html_safe,
time: withdrawal_notice_time,
lang: lang
}
end
end
Expand Down

0 comments on commit 31346a5

Please sign in to comment.