govuk_publishing_components 24.13.1 → 24.13.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +1 -1
  3. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +9 -4
  4. data/config/locales/ar.yml +3 -0
  5. data/config/locales/az.yml +3 -0
  6. data/config/locales/be.yml +3 -0
  7. data/config/locales/bg.yml +3 -0
  8. data/config/locales/bn.yml +3 -0
  9. data/config/locales/cs.yml +3 -0
  10. data/config/locales/cy.yml +3 -0
  11. data/config/locales/da.yml +3 -0
  12. data/config/locales/de.yml +3 -0
  13. data/config/locales/dr.yml +3 -0
  14. data/config/locales/el.yml +3 -0
  15. data/config/locales/en.yml +3 -0
  16. data/config/locales/es-419.yml +3 -0
  17. data/config/locales/es.yml +3 -0
  18. data/config/locales/et.yml +3 -0
  19. data/config/locales/fa.yml +3 -0
  20. data/config/locales/fi.yml +3 -0
  21. data/config/locales/fr.yml +3 -0
  22. data/config/locales/gd.yml +3 -0
  23. data/config/locales/gu.yml +3 -0
  24. data/config/locales/he.yml +3 -0
  25. data/config/locales/hi.yml +3 -0
  26. data/config/locales/hr.yml +3 -0
  27. data/config/locales/hu.yml +3 -0
  28. data/config/locales/hy.yml +3 -0
  29. data/config/locales/id.yml +3 -0
  30. data/config/locales/is.yml +3 -0
  31. data/config/locales/it.yml +3 -0
  32. data/config/locales/ja.yml +3 -0
  33. data/config/locales/ka.yml +3 -0
  34. data/config/locales/kk.yml +3 -0
  35. data/config/locales/ko.yml +3 -0
  36. data/config/locales/lt.yml +3 -0
  37. data/config/locales/lv.yml +3 -0
  38. data/config/locales/ms.yml +3 -0
  39. data/config/locales/mt.yml +3 -0
  40. data/config/locales/nl.yml +3 -0
  41. data/config/locales/no.yml +3 -0
  42. data/config/locales/pa-pk.yml +3 -0
  43. data/config/locales/pa.yml +3 -0
  44. data/config/locales/pl.yml +3 -0
  45. data/config/locales/ps.yml +3 -0
  46. data/config/locales/pt.yml +3 -0
  47. data/config/locales/ro.yml +3 -0
  48. data/config/locales/ru.yml +3 -0
  49. data/config/locales/si.yml +3 -0
  50. data/config/locales/sk.yml +3 -0
  51. data/config/locales/sl.yml +3 -0
  52. data/config/locales/so.yml +3 -0
  53. data/config/locales/sq.yml +3 -0
  54. data/config/locales/sr.yml +3 -0
  55. data/config/locales/sv.yml +3 -0
  56. data/config/locales/sw.yml +3 -0
  57. data/config/locales/ta.yml +3 -0
  58. data/config/locales/th.yml +3 -0
  59. data/config/locales/tk.yml +3 -0
  60. data/config/locales/tr.yml +3 -0
  61. data/config/locales/uk.yml +3 -0
  62. data/config/locales/ur.yml +3 -0
  63. data/config/locales/uz.yml +3 -0
  64. data/config/locales/vi.yml +3 -0
  65. data/config/locales/zh-hk.yml +3 -0
  66. data/config/locales/zh-tw.yml +3 -0
  67. data/config/locales/zh.yml +3 -0
  68. data/lib/govuk_publishing_components.rb +1 -0
  69. data/lib/govuk_publishing_components/presenters/brexit_cta_helper.rb +33 -0
  70. data/lib/govuk_publishing_components/version.rb +1 -1
  71. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15de2a7069f2588081fe6c47aa3a00d2065ef3ea1b130eff26e734d87d2fcffd
4
- data.tar.gz: 9484988fa1937a271d6b1ec1ef8eb1abb269f09210e381a10fd849845b3119af
3
+ metadata.gz: 5a5f30a829f44913c30260a6dcaa8f09cb443897477370f95d64b977e0ba3e3b
4
+ data.tar.gz: 7acbcf428ab0bcc171285ece6d46c19fbf1145b2c55e65de79f0ba6c51f2990a
5
5
  SHA512:
6
- metadata.gz: 4a567edf053fbee4026e12f16b2a524c12dece336511aa52f7e297c3ca4509bb4112241367bca17fa65957063b9e3b4495a12bd9a8be13f168807decedd136bb
7
- data.tar.gz: 804e96f0141c830fdb51dd1f2db135affdbf90f98c511b26a46addf2735947d04732ac5773af6aa326ca88d14a02d91f289cfdb43e922d969d736dd67289912d
6
+ metadata.gz: 05cc84e714cde48b7fd102495f024ab30284f171ea2fab94b6ef6a7aad9d0642dc78ab8c50b844be7b2eca1efa985e8a2aae4c6e5fa5f6e9f162e87db2d4c53c
7
+ data.tar.gz: 4cdb13383ef1ce24a5e688e2a0d1b5bf9b349a18290e3e41537f2c7c75881d1ee472a4c795e4d3c300e5d274e46aba3618b49e9e8e2cfb1ceed018112e1ff864
@@ -25,6 +25,6 @@
25
25
  <% end %>
26
26
 
27
27
  <% if navigation.show_brexit_cta? || navigation.show_brexit_related_links? %>
28
- <%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta' %>
28
+ <%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta', content_item: content_item %>
29
29
  <% end %>
30
30
  </div>
@@ -1,6 +1,11 @@
1
1
  <% shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) %>
2
- <% link_text = t("components.related_navigation.transition.link_text") %>
3
- <% link_path = t("components.related_navigation.transition.link_path") %>
2
+ <% cta_helper = GovukPublishingComponents::Presenters::BrexitCtaHelper.new(content_item) %>
3
+ <%
4
+ title = t(cta_helper.title_key)
5
+ link_text = t(cta_helper.link_text_key)
6
+ link_path = t(cta_helper.link_path_key)
7
+ lang = shared_helper.t_locale(cta_helper.title_key)
8
+ %>
4
9
 
5
10
  <% data_attributes = {
6
11
  "module": "gem-track-click",
@@ -12,12 +17,12 @@
12
17
  } %>
13
18
 
14
19
  <%= tag.div class: "gem-c-contextual-sidebar__brexit-cta" do %>
15
- <%= tag.h2 t("components.related_navigation.transition.title"), class: "gem-c-contextual-sidebar__brexit-heading govuk-heading-s" %>
20
+ <%= tag.h2 title, class: "gem-c-contextual-sidebar__brexit-heading govuk-heading-s" %>
16
21
  <%= tag.p class: "gem-c-contextual-sidebar__brexit-text govuk-body" do %>
17
22
  <%= link_to link_text,
18
23
  link_path,
19
24
  class: "govuk-link",
20
25
  data: data_attributes,
21
- lang: shared_helper.t_locale("components.related_navigation.transition.title") %>
26
+ lang: lang %>
22
27
  <% end %>
23
28
  <% end %>
@@ -116,6 +116,9 @@ ar:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ az:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ be:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ bg:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ bn:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ cs:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ cy:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path: "/brexit.cy"
120
123
  link_text: Gwiriwch beth sydd angen i chi ei wneud
121
124
  title: Brexit
@@ -116,6 +116,9 @@ da:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ de:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ dr:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ el:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -132,6 +132,9 @@ en:
132
132
  link_path: "/brexit"
133
133
  link_text: Check what you need to do
134
134
  title: Brexit
135
+ hub_page_link_path: "/transition-check/questions"
136
+ hub_page_link_text: Get a personalised list of actions
137
+ hub_page_title: Brexit checker
135
138
  world_locations: World locations
136
139
  search_box:
137
140
  input_title: Search
@@ -116,6 +116,9 @@ es-419:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ es:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ et:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ fa:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ fi:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ fr:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ gd:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ gu:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ he:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ hi:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ hr:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ hu:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ hy:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ id:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ is:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ it:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ ja:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ ka:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ kk:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ ko:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ lt:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ lv:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ ms:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ mt:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ nl:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ pa-pk:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ pa:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ pl:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ ps:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ pt:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ ro:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ ru:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ si:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ sk:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ sl:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ so:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ sq:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ sr:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ sv:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ sw:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ ta:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ th:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ tk:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ tr:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ uk:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ ur:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ uz:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ vi:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ zh-hk:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ zh-tw:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -116,6 +116,9 @@ zh:
116
116
  topical_events:
117
117
  topics:
118
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
119
122
  link_path:
120
123
  link_text:
121
124
  title:
@@ -7,6 +7,7 @@ require "govuk_publishing_components/presenters/shared_helper"
7
7
  require "govuk_publishing_components/presenters/attachment"
8
8
  require "govuk_publishing_components/presenters/breadcrumbs"
9
9
  require "govuk_publishing_components/presenters/breadcrumb_selector"
10
+ require "govuk_publishing_components/presenters/brexit_cta_helper"
10
11
  require "govuk_publishing_components/presenters/button_helper"
11
12
  require "govuk_publishing_components/presenters/contextual_navigation"
12
13
  require "govuk_publishing_components/presenters/related_navigation_helper"
@@ -0,0 +1,33 @@
1
+ module GovukPublishingComponents
2
+ module Presenters
3
+ class BrexitCtaHelper
4
+ BREXIT_HUB_PAGE_IDS = %w[
5
+ 6555e0bf-c270-4cf9-a0c5-d20b95fab7f1
6
+ 91cd6143-69d5-4f27-99ff-a52fb0d51c78
7
+ ].freeze
8
+
9
+ def initialize(content_item)
10
+ @content_item = content_item
11
+ end
12
+
13
+ def title_key
14
+ use_brexit_hub_page_navigation? ? "components.related_navigation.transition.hub_page_title" : "components.related_navigation.transition.title"
15
+ end
16
+
17
+ def link_text_key
18
+ use_brexit_hub_page_navigation? ? "components.related_navigation.transition.hub_page_link_text" : "components.related_navigation.transition.link_text"
19
+ end
20
+
21
+ def link_path_key
22
+ use_brexit_hub_page_navigation? ? "components.related_navigation.transition.hub_page_link_path" : "components.related_navigation.transition.link_path"
23
+ end
24
+
25
+ private
26
+
27
+ def use_brexit_hub_page_navigation?
28
+ I18n.locale == :en &&
29
+ BREXIT_HUB_PAGE_IDS.include?(@content_item["content_id"])
30
+ end
31
+ end
32
+ end
33
+ end
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "24.13.1".freeze
2
+ VERSION = "24.13.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 24.13.1
4
+ version: 24.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-03 00:00:00.000000000 Z
11
+ date: 2021-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -883,6 +883,7 @@ files:
883
883
  - lib/govuk_publishing_components/presenters/attachment.rb
884
884
  - lib/govuk_publishing_components/presenters/breadcrumb_selector.rb
885
885
  - lib/govuk_publishing_components/presenters/breadcrumbs.rb
886
+ - lib/govuk_publishing_components/presenters/brexit_cta_helper.rb
886
887
  - lib/govuk_publishing_components/presenters/button_helper.rb
887
888
  - lib/govuk_publishing_components/presenters/checkboxes_helper.rb
888
889
  - lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_ancestors.rb