govuk_publishing_components 57.1.0 → 57.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/govuk_publishing_components/intervention/hmrc.svg +5 -0
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +4 -0
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +22 -0
  5. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-form-tracker.js +72 -12
  6. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-specialist-link-tracker.js +2 -2
  7. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/pii-remover.js +10 -0
  8. data/app/assets/javascripts/govuk_publishing_components/components/add-another.js +57 -7
  9. data/app/assets/javascripts/govuk_publishing_components/components/reorderable-list.js +24 -4
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss +17 -0
  11. data/app/controllers/govuk_publishing_components/audit_controller.rb +0 -1
  12. data/app/views/govuk_publishing_components/components/_add_another.html.erb +2 -0
  13. data/app/views/govuk_publishing_components/components/_intervention.html.erb +7 -2
  14. data/app/views/govuk_publishing_components/components/_reorderable_list.html.erb +24 -2
  15. data/app/views/govuk_publishing_components/components/docs/add_another.yml +25 -0
  16. data/app/views/govuk_publishing_components/components/docs/intervention.yml +10 -0
  17. data/app/views/govuk_publishing_components/components/docs/reorderable_list.yml +16 -0
  18. data/config/locales/ar.yml +12 -3
  19. data/config/locales/az.yml +12 -3
  20. data/config/locales/be.yml +12 -3
  21. data/config/locales/bg.yml +12 -3
  22. data/config/locales/bn.yml +12 -3
  23. data/config/locales/cs.yml +12 -3
  24. data/config/locales/cy.yml +14 -5
  25. data/config/locales/da.yml +12 -3
  26. data/config/locales/de.yml +12 -3
  27. data/config/locales/dr.yml +12 -3
  28. data/config/locales/el.yml +12 -3
  29. data/config/locales/en.yml +16 -7
  30. data/config/locales/es-419.yml +12 -3
  31. data/config/locales/es.yml +12 -3
  32. data/config/locales/et.yml +12 -3
  33. data/config/locales/fa.yml +12 -3
  34. data/config/locales/fi.yml +12 -3
  35. data/config/locales/fr.yml +12 -3
  36. data/config/locales/gd.yml +12 -3
  37. data/config/locales/gu.yml +12 -3
  38. data/config/locales/he.yml +12 -3
  39. data/config/locales/hi.yml +12 -3
  40. data/config/locales/hr.yml +12 -3
  41. data/config/locales/hu.yml +12 -3
  42. data/config/locales/hy.yml +12 -3
  43. data/config/locales/id.yml +12 -3
  44. data/config/locales/is.yml +12 -3
  45. data/config/locales/it.yml +12 -3
  46. data/config/locales/ja.yml +12 -3
  47. data/config/locales/ka.yml +12 -3
  48. data/config/locales/kk.yml +12 -3
  49. data/config/locales/ko.yml +12 -3
  50. data/config/locales/lt.yml +12 -3
  51. data/config/locales/lv.yml +12 -3
  52. data/config/locales/ms.yml +12 -3
  53. data/config/locales/mt.yml +12 -3
  54. data/config/locales/ne.yml +12 -6
  55. data/config/locales/nl.yml +12 -3
  56. data/config/locales/no.yml +12 -3
  57. data/config/locales/pa-pk.yml +12 -3
  58. data/config/locales/pa.yml +12 -3
  59. data/config/locales/pl.yml +12 -3
  60. data/config/locales/ps.yml +12 -3
  61. data/config/locales/pt.yml +12 -3
  62. data/config/locales/ro.yml +12 -3
  63. data/config/locales/ru.yml +12 -3
  64. data/config/locales/si.yml +12 -3
  65. data/config/locales/sk.yml +12 -3
  66. data/config/locales/sl.yml +12 -3
  67. data/config/locales/so.yml +12 -3
  68. data/config/locales/sq.yml +12 -3
  69. data/config/locales/sr.yml +12 -3
  70. data/config/locales/sv.yml +12 -3
  71. data/config/locales/sw.yml +12 -3
  72. data/config/locales/ta.yml +12 -3
  73. data/config/locales/th.yml +12 -3
  74. data/config/locales/tk.yml +12 -3
  75. data/config/locales/tr.yml +12 -3
  76. data/config/locales/uk.yml +12 -3
  77. data/config/locales/ur.yml +12 -3
  78. data/config/locales/uz.yml +12 -3
  79. data/config/locales/vi.yml +12 -3
  80. data/config/locales/zh-hk.yml +12 -3
  81. data/config/locales/zh-tw.yml +12 -3
  82. data/config/locales/zh.yml +12 -3
  83. data/lib/govuk_publishing_components/presenters/devolved_nations_helper.rb +14 -13
  84. data/lib/govuk_publishing_components/version.rb +1 -1
  85. metadata +2 -1
@@ -64,18 +64,27 @@ ru:
64
64
  devolved_nations:
65
65
  applies_to:
66
66
  aria_label:
67
- connectors:
68
- last_word:
69
- two_words:
70
67
  england:
68
+ end:
69
+ middle:
70
+ start:
71
71
  northern_ireland:
72
+ end:
73
+ middle:
74
+ start:
72
75
  scotland:
76
+ end:
77
+ middle:
78
+ start:
73
79
  type:
74
80
  consultation:
75
81
  detailed_guide:
76
82
  guidance:
77
83
  publication:
78
84
  wales:
85
+ end:
86
+ middle:
87
+ start:
79
88
  feedback:
80
89
  close: Закрыть
81
90
  dont_include_personal_info: Не указывайте личную или финансовую информацию, например номер национального страхования или данные кредитной карты.
@@ -60,18 +60,27 @@ si:
60
60
  devolved_nations:
61
61
  applies_to:
62
62
  aria_label:
63
- connectors:
64
- last_word:
65
- two_words:
66
63
  england:
64
+ end:
65
+ middle:
66
+ start:
67
67
  northern_ireland:
68
+ end:
69
+ middle:
70
+ start:
68
71
  scotland:
72
+ end:
73
+ middle:
74
+ start:
69
75
  type:
70
76
  consultation:
71
77
  detailed_guide:
72
78
  guidance:
73
79
  publication:
74
80
  wales:
81
+ end:
82
+ middle:
83
+ start:
75
84
  feedback:
76
85
  close: වසන්න
77
86
  dont_include_personal_info: ඔබේ ජාතික රක්ෂණ අංකය හෝ ක්රෙඩිට් කාඩ්පත් විස්තර වැනි පෞද්ගලික හෝ මූල්ය තොරතුරු ඇතුළත් නොකරන්න.
@@ -65,18 +65,27 @@ sk:
65
65
  devolved_nations:
66
66
  applies_to:
67
67
  aria_label:
68
- connectors:
69
- last_word:
70
- two_words:
71
68
  england:
69
+ end:
70
+ middle:
71
+ start:
72
72
  northern_ireland:
73
+ end:
74
+ middle:
75
+ start:
73
76
  scotland:
77
+ end:
78
+ middle:
79
+ start:
74
80
  type:
75
81
  consultation:
76
82
  detailed_guide:
77
83
  guidance:
78
84
  publication:
79
85
  wales:
86
+ end:
87
+ middle:
88
+ start:
80
89
  feedback:
81
90
  close: Zatvoriť
82
91
  dont_include_personal_info: Neuvádzajte osobné ani finančné údaje, ako je číslo vášho národného poistenia alebo údaje o kreditnej karte.
@@ -67,18 +67,27 @@ sl:
67
67
  devolved_nations:
68
68
  applies_to:
69
69
  aria_label:
70
- connectors:
71
- last_word:
72
- two_words:
73
70
  england:
71
+ end:
72
+ middle:
73
+ start:
74
74
  northern_ireland:
75
+ end:
76
+ middle:
77
+ start:
75
78
  scotland:
79
+ end:
80
+ middle:
81
+ start:
76
82
  type:
77
83
  consultation:
78
84
  detailed_guide:
79
85
  guidance:
80
86
  publication:
81
87
  wales:
88
+ end:
89
+ middle:
90
+ start:
82
91
  feedback:
83
92
  close: Zapri
84
93
  dont_include_personal_info: Ne vključujte osebnih ali finančnih podatkov, na primer številke zavarovanja ali podatkov o kreditni kartici.
@@ -60,18 +60,27 @@ so:
60
60
  devolved_nations:
61
61
  applies_to:
62
62
  aria_label:
63
- connectors:
64
- last_word:
65
- two_words:
66
63
  england:
64
+ end:
65
+ middle:
66
+ start:
67
67
  northern_ireland:
68
+ end:
69
+ middle:
70
+ start:
68
71
  scotland:
72
+ end:
73
+ middle:
74
+ start:
69
75
  type:
70
76
  consultation:
71
77
  detailed_guide:
72
78
  guidance:
73
79
  publication:
74
80
  wales:
81
+ end:
82
+ middle:
83
+ start:
75
84
  feedback:
76
85
  close: Xidhan
77
86
  dont_include_personal_info: Oo aanay kujirin macluumaadka shaqsiyadeed ama maaliyadeed sida lambarka Caymiska Qaranka ama faah-faahinta kiridhit kaadhka.
@@ -60,18 +60,27 @@ sq:
60
60
  devolved_nations:
61
61
  applies_to:
62
62
  aria_label:
63
- connectors:
64
- last_word:
65
- two_words:
66
63
  england:
64
+ end:
65
+ middle:
66
+ start:
67
67
  northern_ireland:
68
+ end:
69
+ middle:
70
+ start:
68
71
  scotland:
72
+ end:
73
+ middle:
74
+ start:
69
75
  type:
70
76
  consultation:
71
77
  detailed_guide:
72
78
  guidance:
73
79
  publication:
74
80
  wales:
81
+ end:
82
+ middle:
83
+ start:
75
84
  feedback:
76
85
  close: Mbyll
77
86
  dont_include_personal_info: Mos përfshini informacione personale ose financiare si numri juaj i Sigurimit Kombëtar ose detajet e kartës së kreditit.
@@ -61,18 +61,27 @@ sr:
61
61
  devolved_nations:
62
62
  applies_to:
63
63
  aria_label:
64
- connectors:
65
- last_word:
66
- two_words:
67
64
  england:
65
+ end:
66
+ middle:
67
+ start:
68
68
  northern_ireland:
69
+ end:
70
+ middle:
71
+ start:
69
72
  scotland:
73
+ end:
74
+ middle:
75
+ start:
70
76
  type:
71
77
  consultation:
72
78
  detailed_guide:
73
79
  guidance:
74
80
  publication:
75
81
  wales:
82
+ end:
83
+ middle:
84
+ start:
76
85
  feedback:
77
86
  close: Zatvori
78
87
  dont_include_personal_info: Nemojte navoditi lični ili finansijske podatke, na primer svoj broj osiguranja ili podatke o kreditnoj kartici.
@@ -60,18 +60,27 @@ sv:
60
60
  devolved_nations:
61
61
  applies_to:
62
62
  aria_label:
63
- connectors:
64
- last_word:
65
- two_words:
66
63
  england:
64
+ end:
65
+ middle:
66
+ start:
67
67
  northern_ireland:
68
+ end:
69
+ middle:
70
+ start:
68
71
  scotland:
72
+ end:
73
+ middle:
74
+ start:
69
75
  type:
70
76
  consultation:
71
77
  detailed_guide:
72
78
  guidance:
73
79
  publication:
74
80
  wales:
81
+ end:
82
+ middle:
83
+ start:
75
84
  feedback:
76
85
  close: Stäng
77
86
  dont_include_personal_info: Ange inte personlig eller finansiell information, t.ex. ditt försäkringsnummer eller kreditkortsuppgifter.
@@ -60,18 +60,27 @@ sw:
60
60
  devolved_nations:
61
61
  applies_to:
62
62
  aria_label:
63
- connectors:
64
- last_word:
65
- two_words:
66
63
  england:
64
+ end:
65
+ middle:
66
+ start:
67
67
  northern_ireland:
68
+ end:
69
+ middle:
70
+ start:
68
71
  scotland:
72
+ end:
73
+ middle:
74
+ start:
69
75
  type:
70
76
  consultation:
71
77
  detailed_guide:
72
78
  guidance:
73
79
  publication:
74
80
  wales:
81
+ end:
82
+ middle:
83
+ start:
75
84
  feedback:
76
85
  close: Funga
77
86
  dont_include_personal_info: Usiweke maelezo ya kibinafsi au ya fedha kama vile nambari yako ya Bima ya Kitaifa au maelezo ya kadi yako ya mikopo.
@@ -61,18 +61,27 @@ ta:
61
61
  devolved_nations:
62
62
  applies_to:
63
63
  aria_label:
64
- connectors:
65
- last_word:
66
- two_words:
67
64
  england:
65
+ end:
66
+ middle:
67
+ start:
68
68
  northern_ireland:
69
+ end:
70
+ middle:
71
+ start:
69
72
  scotland:
73
+ end:
74
+ middle:
75
+ start:
70
76
  type:
71
77
  consultation:
72
78
  detailed_guide:
73
79
  guidance:
74
80
  publication:
75
81
  wales:
82
+ end:
83
+ middle:
84
+ start:
76
85
  feedback:
77
86
  close: மூடு
78
87
  dont_include_personal_info: உங்கள் தேசிய காப்பீட்டு எண் அல்லது கடன் அட்டை விபரங்கள் போன்ற தனிப்பட்ட அல்லது நிதிசார் விபரங்களைச் சேர்க்க வேண்டாம்.
@@ -58,18 +58,27 @@ th:
58
58
  devolved_nations:
59
59
  applies_to:
60
60
  aria_label:
61
- connectors:
62
- last_word:
63
- two_words:
64
61
  england:
62
+ end:
63
+ middle:
64
+ start:
65
65
  northern_ireland:
66
+ end:
67
+ middle:
68
+ start:
66
69
  scotland:
70
+ end:
71
+ middle:
72
+ start:
67
73
  type:
68
74
  consultation:
69
75
  detailed_guide:
70
76
  guidance:
71
77
  publication:
72
78
  wales:
79
+ end:
80
+ middle:
81
+ start:
73
82
  feedback:
74
83
  close: ปิด
75
84
  dont_include_personal_info: อย่าใส่ข้อมูลส่วนบุคคลหรือข้อมูลทางการเงิน เช่น หมายเลขประกันสังคม (National Insurance) หรือรายละเอียดบัตรเครดิต
@@ -61,18 +61,27 @@ tk:
61
61
  devolved_nations:
62
62
  applies_to:
63
63
  aria_label:
64
- connectors:
65
- last_word:
66
- two_words:
67
64
  england:
65
+ end:
66
+ middle:
67
+ start:
68
68
  northern_ireland:
69
+ end:
70
+ middle:
71
+ start:
69
72
  scotland:
73
+ end:
74
+ middle:
75
+ start:
70
76
  type:
71
77
  consultation:
72
78
  detailed_guide:
73
79
  guidance:
74
80
  publication:
75
81
  wales:
82
+ end:
83
+ middle:
84
+ start:
76
85
  feedback:
77
86
  close: Ýapyk
78
87
  dont_include_personal_info: Milli ätiýaçlandyryş belgiňiz ýa-da töleg kartlaryňyza degişli maglumatlaryňyz ýaly şahsy ýa-da maliýe maglumatlary goşmaň.
@@ -61,18 +61,27 @@ tr:
61
61
  devolved_nations:
62
62
  applies_to:
63
63
  aria_label:
64
- connectors:
65
- last_word:
66
- two_words:
67
64
  england:
65
+ end:
66
+ middle:
67
+ start:
68
68
  northern_ireland:
69
+ end:
70
+ middle:
71
+ start:
69
72
  scotland:
73
+ end:
74
+ middle:
75
+ start:
70
76
  type:
71
77
  consultation:
72
78
  detailed_guide:
73
79
  guidance:
74
80
  publication:
75
81
  wales:
82
+ end:
83
+ middle:
84
+ start:
76
85
  feedback:
77
86
  close: Kapat
78
87
  dont_include_personal_info: Ulusal Sigorta numaranız veya kredi kartı bilgileriniz gibi kişisel veya ekonomik bilgileri eklemeyin.
@@ -67,18 +67,27 @@ uk:
67
67
  devolved_nations:
68
68
  applies_to:
69
69
  aria_label:
70
- connectors:
71
- last_word:
72
- two_words:
73
70
  england:
71
+ end:
72
+ middle:
73
+ start:
74
74
  northern_ireland:
75
+ end:
76
+ middle:
77
+ start:
75
78
  scotland:
79
+ end:
80
+ middle:
81
+ start:
76
82
  type:
77
83
  consultation:
78
84
  detailed_guide:
79
85
  guidance:
80
86
  publication:
81
87
  wales:
88
+ end:
89
+ middle:
90
+ start:
82
91
  feedback:
83
92
  close: Закрити
84
93
  dont_include_personal_info: Не вказуйте персональну чи фінансову інформацію, наприклад номер свого національного страхування або дані кредитної картки.
@@ -57,18 +57,27 @@ ur:
57
57
  devolved_nations:
58
58
  applies_to:
59
59
  aria_label:
60
- connectors:
61
- last_word:
62
- two_words:
63
60
  england:
61
+ end:
62
+ middle:
63
+ start:
64
64
  northern_ireland:
65
+ end:
66
+ middle:
67
+ start:
65
68
  scotland:
69
+ end:
70
+ middle:
71
+ start:
66
72
  type:
67
73
  consultation:
68
74
  detailed_guide:
69
75
  guidance:
70
76
  publication:
71
77
  wales:
78
+ end:
79
+ middle:
80
+ start:
72
81
  feedback:
73
82
  close: بند کریں
74
83
  dont_include_personal_info: اپنے قومی انشورنس نمبر یا کریڈٹ کارڈ کی تفصیلات کی جیسی ذاتی یا مالی معلومات استعمال نہ کریں۔
@@ -62,18 +62,27 @@ uz:
62
62
  devolved_nations:
63
63
  applies_to:
64
64
  aria_label:
65
- connectors:
66
- last_word:
67
- two_words:
68
65
  england:
66
+ end:
67
+ middle:
68
+ start:
69
69
  northern_ireland:
70
+ end:
71
+ middle:
72
+ start:
70
73
  scotland:
74
+ end:
75
+ middle:
76
+ start:
71
77
  type:
72
78
  consultation:
73
79
  detailed_guide:
74
80
  guidance:
75
81
  publication:
76
82
  wales:
83
+ end:
84
+ middle:
85
+ start:
77
86
  feedback:
78
87
  close: Ёпиш
79
88
  dont_include_personal_info: Шахсий ёки молиявий маълумотларни, масалан, давлат суғуртаси рақами ёки кредит карта маълумотларини, кўрсатиш керак эмас.
@@ -59,18 +59,27 @@ vi:
59
59
  devolved_nations:
60
60
  applies_to:
61
61
  aria_label:
62
- connectors:
63
- last_word:
64
- two_words:
65
62
  england:
63
+ end:
64
+ middle:
65
+ start:
66
66
  northern_ireland:
67
+ end:
68
+ middle:
69
+ start:
67
70
  scotland:
71
+ end:
72
+ middle:
73
+ start:
68
74
  type:
69
75
  consultation:
70
76
  detailed_guide:
71
77
  guidance:
72
78
  publication:
73
79
  wales:
80
+ end:
81
+ middle:
82
+ start:
74
83
  feedback:
75
84
  close: Đóng
76
85
  dont_include_personal_info: Không bao gồm thông tin cá nhân hoặc thông tin tài chính như số Bảo hiểm Quốc gia hoặc chi tiết thẻ tín dụng của bạn.
@@ -58,18 +58,27 @@ zh-hk:
58
58
  devolved_nations:
59
59
  applies_to:
60
60
  aria_label:
61
- connectors:
62
- last_word:
63
- two_words:
64
61
  england:
62
+ end:
63
+ middle:
64
+ start:
65
65
  northern_ireland:
66
+ end:
67
+ middle:
68
+ start:
66
69
  scotland:
70
+ end:
71
+ middle:
72
+ start:
67
73
  type:
68
74
  consultation:
69
75
  detailed_guide:
70
76
  guidance:
71
77
  publication:
72
78
  wales:
79
+ end:
80
+ middle:
81
+ start:
73
82
  feedback:
74
83
  close: 關閉
75
84
  dont_include_personal_info: 切勿加入諸如您的國民保險編號或信用卡詳情等個人或財務資訊。
@@ -58,18 +58,27 @@ zh-tw:
58
58
  devolved_nations:
59
59
  applies_to:
60
60
  aria_label:
61
- connectors:
62
- last_word:
63
- two_words:
64
61
  england:
62
+ end:
63
+ middle:
64
+ start:
65
65
  northern_ireland:
66
+ end:
67
+ middle:
68
+ start:
66
69
  scotland:
70
+ end:
71
+ middle:
72
+ start:
67
73
  type:
68
74
  consultation:
69
75
  detailed_guide:
70
76
  guidance:
71
77
  publication:
72
78
  wales:
79
+ end:
80
+ middle:
81
+ start:
73
82
  feedback:
74
83
  close: 關閉
75
84
  dont_include_personal_info: 請勿包含個人或財務資訊,例如英國國家保險號碼或信用卡細節。
@@ -58,18 +58,27 @@ zh:
58
58
  devolved_nations:
59
59
  applies_to:
60
60
  aria_label:
61
- connectors:
62
- last_word:
63
- two_words:
64
61
  england:
62
+ end:
63
+ middle:
64
+ start:
65
65
  northern_ireland:
66
+ end:
67
+ middle:
68
+ start:
66
69
  scotland:
70
+ end:
71
+ middle:
72
+ start:
67
73
  type:
68
74
  consultation:
69
75
  detailed_guide:
70
76
  guidance:
71
77
  publication:
72
78
  wales:
79
+ end:
80
+ middle:
81
+ start:
73
82
  feedback:
74
83
  close: 关闭
75
84
  dont_include_personal_info: 不要包含个人或财务信息,比如您的国家保险号或信用卡信息。
@@ -9,20 +9,21 @@ module GovukPublishingComponents
9
9
  end
10
10
 
11
11
  def applicable_nations_title_text(use_english_translation = nil)
12
- @national_applicability
13
- .select { |_, v| v[:applicable] == true }
14
- .map { |k, _| get_translation("components.devolved_nations.#{k}", use_english_translation) }
15
- .sort
16
- .to_sentence(
17
- two_words_connector: get_translation("components.devolved_nations.connectors.two_words", use_english_translation),
18
- last_word_connector: get_translation("components.devolved_nations.connectors.last_word", use_english_translation),
19
- )
12
+ nation_keys = @national_applicability
13
+ .select { |_, v| v[:applicable] == true }
14
+ .map { |k, _| k }
15
+ nation_keys.each_with_index.map { |k, i| name_for_position(k, i, nation_keys.count, use_english_translation) }.join
20
16
  end
21
17
 
22
- def get_translation(key, use_english_translation = nil)
23
- return I18n.t(key, locale: :en) if use_english_translation
24
-
25
- I18n.t(key)
18
+ def name_for_position(nation, position, total, use_english_translation)
19
+ key = if position.zero?
20
+ :start
21
+ elsif position == (total - 1)
22
+ :end
23
+ else
24
+ :middle
25
+ end
26
+ I18n.t("components.devolved_nations.#{nation}.#{key}", locale: use_english_translation ? :en : nil)
26
27
  end
27
28
 
28
29
  def ga4_applicable_nations_title_text(remove_connector_word = nil)
@@ -40,7 +41,7 @@ module GovukPublishingComponents
40
41
  end
41
42
 
42
43
  def alternative_content_text(name)
43
- nation = I18n.t("components.devolved_nations.#{name}")
44
+ nation = I18n.t("components.devolved_nations.#{name}.start")
44
45
 
45
46
  if I18n.exists?("components.devolved_nations.type.#{@content_type}")
46
47
  I18n.t("components.devolved_nations.type.#{@content_type}", nation:)
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "57.1.0".freeze
2
+ VERSION = "57.2.0".freeze
3
3
  end