govuk_publishing_components 34.0.0 → 34.5.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.
- checksums.yaml +4 -4
- data/app/assets/images/govuk_publishing_components/icon-search.svg +3 -0
- data/app/assets/images/govuk_publishing_components/youtube-play-icon.png +0 -0
- data/app/assets/images/govuk_publishing_components/youtube-play-icon.svg +4 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/auto-scroll-tracker.js +2 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics/linked-domains.js +135 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +1 -40
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +2 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4.js +0 -1
- data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +2 -2
- data/app/assets/javascripts/govuk_publishing_components/components/image-card.js +19 -0
- data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +12 -69
- data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +14 -13
- data/app/assets/javascripts/govuk_publishing_components/dependencies.js +3 -0
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js +3 -2
- data/app/assets/javascripts/govuk_publishing_components/load-analytics.js +209 -0
- data/app/assets/javascripts/govuk_publishing_components/modules.js +7 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +15 -19
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +82 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +247 -412
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_steps.scss +26 -9
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss +2 -2
- data/app/controllers/govuk_publishing_components/application_controller.rb +0 -13
- data/app/controllers/govuk_publishing_components/audit_controller.rb +1 -1
- data/app/models/govuk_publishing_components/audit_comparer.rb +1 -1
- data/app/models/govuk_publishing_components/audit_components.rb +103 -82
- data/app/views/govuk_publishing_components/audit/_applications.html.erb +1 -1
- data/app/views/govuk_publishing_components/audit/_component_contents.html.erb +47 -39
- data/app/views/govuk_publishing_components/audit/_components.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_accordion.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_contextual_footer.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +7 -3
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +10 -6
- data/app/views/govuk_publishing_components/components/_error_message.html.erb +2 -1
- data/app/views/govuk_publishing_components/components/_google_tag_manager_script.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_hint.html.erb +2 -1
- data/app/views/govuk_publishing_components/components/_image_card.html.erb +12 -9
- data/app/views/govuk_publishing_components/components/_input.html.erb +8 -2
- data/app/views/govuk_publishing_components/components/_label.html.erb +5 -3
- data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +6 -2
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +125 -145
- data/app/views/govuk_publishing_components/components/_related_navigation.html.erb +12 -6
- data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_textarea.html.erb +10 -2
- data/app/views/govuk_publishing_components/components/docs/contextual_footer.yml +43 -0
- data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +58 -0
- data/app/views/govuk_publishing_components/components/docs/emergency_banner.yml +3 -1
- data/app/views/govuk_publishing_components/components/docs/error_message.yml +13 -0
- data/app/views/govuk_publishing_components/components/docs/hint.yml +6 -0
- data/app/views/govuk_publishing_components/components/docs/image_card.yml +24 -1
- data/app/views/govuk_publishing_components/components/docs/input.yml +32 -0
- data/app/views/govuk_publishing_components/components/docs/intervention.yml +2 -1
- data/app/views/govuk_publishing_components/components/docs/label.yml +17 -0
- data/app/views/govuk_publishing_components/components/docs/layout_header.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/previous_and_next_navigation.yml +2 -0
- data/app/views/govuk_publishing_components/components/docs/related_navigation.yml +27 -0
- data/app/views/govuk_publishing_components/components/docs/textarea.yml +31 -0
- data/app/views/govuk_publishing_components/components/docs/translation_nav.yml +2 -0
- data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +1 -2
- data/app/views/govuk_publishing_components/components/metadata/_sentence.html.erb +4 -2
- data/app/views/govuk_publishing_components/components/related_navigation/_section.html.erb +18 -8
- data/app/views/layouts/govuk_publishing_components/application.html.erb +2 -2
- data/config/locales/ar.yml +14 -7
- data/config/locales/az.yml +14 -7
- data/config/locales/be.yml +14 -7
- data/config/locales/bg.yml +14 -7
- data/config/locales/bn.yml +14 -7
- data/config/locales/cs.yml +14 -7
- data/config/locales/cy.yml +14 -7
- data/config/locales/da.yml +14 -7
- data/config/locales/de.yml +14 -7
- data/config/locales/dr.yml +14 -7
- data/config/locales/el.yml +14 -7
- data/config/locales/en.yml +18 -18
- data/config/locales/es-419.yml +14 -7
- data/config/locales/es.yml +14 -7
- data/config/locales/et.yml +14 -7
- data/config/locales/fa.yml +14 -7
- data/config/locales/fi.yml +14 -7
- data/config/locales/fr.yml +14 -7
- data/config/locales/gd.yml +14 -7
- data/config/locales/gu.yml +14 -7
- data/config/locales/he.yml +14 -7
- data/config/locales/hi.yml +14 -7
- data/config/locales/hr.yml +14 -7
- data/config/locales/hu.yml +14 -7
- data/config/locales/hy.yml +14 -7
- data/config/locales/id.yml +14 -7
- data/config/locales/is.yml +14 -7
- data/config/locales/it.yml +14 -7
- data/config/locales/ja.yml +14 -7
- data/config/locales/ka.yml +14 -7
- data/config/locales/kk.yml +14 -7
- data/config/locales/ko.yml +14 -7
- data/config/locales/lt.yml +14 -7
- data/config/locales/lv.yml +14 -7
- data/config/locales/ms.yml +14 -7
- data/config/locales/mt.yml +14 -7
- data/config/locales/nl.yml +14 -7
- data/config/locales/no.yml +14 -7
- data/config/locales/pa-pk.yml +14 -7
- data/config/locales/pa.yml +14 -7
- data/config/locales/pl.yml +14 -7
- data/config/locales/ps.yml +14 -7
- data/config/locales/pt.yml +14 -7
- data/config/locales/ro.yml +14 -7
- data/config/locales/ru.yml +14 -7
- data/config/locales/si.yml +14 -7
- data/config/locales/sk.yml +14 -7
- data/config/locales/sl.yml +14 -7
- data/config/locales/so.yml +14 -7
- data/config/locales/sq.yml +14 -7
- data/config/locales/sr.yml +14 -7
- data/config/locales/sv.yml +14 -7
- data/config/locales/sw.yml +14 -7
- data/config/locales/ta.yml +14 -7
- data/config/locales/th.yml +14 -7
- data/config/locales/tk.yml +14 -7
- data/config/locales/tr.yml +14 -7
- data/config/locales/uk.yml +14 -7
- data/config/locales/ur.yml +14 -7
- data/config/locales/uz.yml +14 -7
- data/config/locales/vi.yml +14 -7
- data/config/locales/zh-hk.yml +14 -7
- data/config/locales/zh-tw.yml +14 -7
- data/config/locales/zh.yml +14 -7
- data/lib/govuk_publishing_components/presenters/image_card_helper.rb +65 -2
- data/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +1 -1
- data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +4 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/README.md +1 -1
- data/node_modules/axe-core/axe.d.ts +76 -24
- data/node_modules/axe-core/axe.js +4903 -4648
- data/node_modules/axe-core/axe.min.js +3 -3
- data/node_modules/axe-core/package.json +28 -28
- data/node_modules/axe-core/sri-history.json +16 -0
- data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +5 -0
- data/node_modules/govuk-frontend/package.json +1 -1
- metadata +9 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/init-ga4.js +0 -28
data/config/locales/tk.yml
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
tk:
|
|
3
3
|
common:
|
|
4
|
+
hide: Gizle
|
|
5
|
+
show: görkez
|
|
6
|
+
toggle_less: Azrak görkez
|
|
7
|
+
toggle_more: "%{show} %{number} köpeltmek üçin"
|
|
4
8
|
translations: Terjimeler
|
|
5
9
|
components:
|
|
6
10
|
accordion:
|
|
7
|
-
hide: Gizle
|
|
8
11
|
hide_all: Ähli bölümleri gizle
|
|
9
|
-
show: görkez
|
|
10
12
|
show_all: Ähli bölümleri görkez
|
|
11
13
|
this_section_visually_hidden: " Bu bölüm"
|
|
12
14
|
article_schema:
|
|
@@ -38,8 +40,12 @@ tk:
|
|
|
38
40
|
buttons:
|
|
39
41
|
accept_cookies: Goşmaça kukileri kabul et
|
|
40
42
|
reject_cookies: Goşmaça kukileri ret et
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
view_cookies:
|
|
44
|
+
confirmation_message:
|
|
45
|
+
accepted:
|
|
46
|
+
html: Islendik wagt %{link} edip bilersiňiz.
|
|
47
|
+
link: kukiler sazlamalaryňyzy üýtgediň
|
|
48
|
+
rejected:
|
|
43
49
|
hide: Bu habary gizle
|
|
44
50
|
text:
|
|
45
51
|
- Bu internet sahypasyny işletmek üçin käbir möhüm kukileri ulanýarys.
|
|
@@ -110,7 +116,10 @@ tk:
|
|
|
110
116
|
menu_toggle_label:
|
|
111
117
|
hide:
|
|
112
118
|
show:
|
|
113
|
-
|
|
119
|
+
navigation_link:
|
|
120
|
+
href:
|
|
121
|
+
label:
|
|
122
|
+
navigation_links_columns:
|
|
114
123
|
navigation_menu_heading:
|
|
115
124
|
navigation_search_heading:
|
|
116
125
|
navigation_search_subheading:
|
|
@@ -124,8 +133,6 @@ tk:
|
|
|
124
133
|
part_of: Bir bölegi
|
|
125
134
|
published: Çap edilen
|
|
126
135
|
see_all_updates: Ähli täzelenmelere serediň
|
|
127
|
-
toggle_less: Azrak görkez
|
|
128
|
-
toggle_more: "+ %{number} köpeltmek üçin"
|
|
129
136
|
modal_dialogue:
|
|
130
137
|
close_modal: Modal gepleşikleri tamamlamak
|
|
131
138
|
notice:
|
data/config/locales/tr.yml
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
tr:
|
|
3
3
|
common:
|
|
4
|
+
hide: Gizle
|
|
5
|
+
show: Göster
|
|
6
|
+
toggle_less: Daha az göster
|
|
7
|
+
toggle_more: "%{show} %{number} daha fazla"
|
|
4
8
|
translations: Tercümeler
|
|
5
9
|
components:
|
|
6
10
|
accordion:
|
|
7
|
-
hide: Gizle
|
|
8
11
|
hide_all: Tüm bölümleri gizle
|
|
9
|
-
show: Göster
|
|
10
12
|
show_all: Tüm bölümleri göster
|
|
11
13
|
this_section_visually_hidden: " Bu bölüm"
|
|
12
14
|
article_schema:
|
|
@@ -38,8 +40,12 @@ tr:
|
|
|
38
40
|
buttons:
|
|
39
41
|
accept_cookies: Ek çerezleri kabul et
|
|
40
42
|
reject_cookies: Ek çerezleri reddet
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
view_cookies:
|
|
44
|
+
confirmation_message:
|
|
45
|
+
accepted:
|
|
46
|
+
html: İstediğiniz zaman %{link} yapabilirsiniz.
|
|
47
|
+
link: çerez ayarlarınızı değiştirin
|
|
48
|
+
rejected:
|
|
43
49
|
hide: Bu mesajı gizle
|
|
44
50
|
text:
|
|
45
51
|
- Bu web sitesini çalıştırmak için bazı gerekli çerezleri kullanıyoruz.
|
|
@@ -110,7 +116,10 @@ tr:
|
|
|
110
116
|
menu_toggle_label:
|
|
111
117
|
hide:
|
|
112
118
|
show:
|
|
113
|
-
|
|
119
|
+
navigation_link:
|
|
120
|
+
href:
|
|
121
|
+
label:
|
|
122
|
+
navigation_links_columns:
|
|
114
123
|
navigation_menu_heading:
|
|
115
124
|
navigation_search_heading:
|
|
116
125
|
navigation_search_subheading:
|
|
@@ -124,8 +133,6 @@ tr:
|
|
|
124
133
|
part_of: Şunun kısmı
|
|
125
134
|
published: Yayınlanan
|
|
126
135
|
see_all_updates: Tüm güncellemeleri görün
|
|
127
|
-
toggle_less: Daha az göster
|
|
128
|
-
toggle_more: "+ %{number} daha fazla"
|
|
129
136
|
modal_dialogue:
|
|
130
137
|
close_modal: Model diyaloğu kapat
|
|
131
138
|
notice:
|
data/config/locales/uk.yml
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
uk:
|
|
3
3
|
common:
|
|
4
|
+
hide: Приховати
|
|
5
|
+
show: Показати
|
|
6
|
+
toggle_less: Показати менше
|
|
7
|
+
toggle_more: "%{show} %{number} більше"
|
|
4
8
|
translations: Переклади
|
|
5
9
|
components:
|
|
6
10
|
accordion:
|
|
7
|
-
hide: Приховати
|
|
8
11
|
hide_all: приховати всі розділи
|
|
9
|
-
show: Показати
|
|
10
12
|
show_all: Показати всі розділи
|
|
11
13
|
this_section_visually_hidden: " цей розділ"
|
|
12
14
|
article_schema:
|
|
@@ -40,8 +42,12 @@ uk:
|
|
|
40
42
|
buttons:
|
|
41
43
|
accept_cookies: Прийняти додаткові файли cookie
|
|
42
44
|
reject_cookies: Відхилити додаткові файли cookie
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
view_cookies:
|
|
46
|
+
confirmation_message:
|
|
47
|
+
accepted:
|
|
48
|
+
html: Ви можете %{link} у будь -який час.
|
|
49
|
+
link: Змініть налаштування файлів cookie
|
|
50
|
+
rejected:
|
|
45
51
|
hide: Приховати це повідомлення
|
|
46
52
|
text:
|
|
47
53
|
- Ми використовуємо деякі важливі файли cookie
|
|
@@ -116,7 +122,10 @@ uk:
|
|
|
116
122
|
menu_toggle_label:
|
|
117
123
|
hide:
|
|
118
124
|
show:
|
|
119
|
-
|
|
125
|
+
navigation_link:
|
|
126
|
+
href:
|
|
127
|
+
label:
|
|
128
|
+
navigation_links_columns:
|
|
120
129
|
navigation_menu_heading:
|
|
121
130
|
navigation_search_heading:
|
|
122
131
|
navigation_search_subheading:
|
|
@@ -130,8 +139,6 @@ uk:
|
|
|
130
139
|
part_of: Частина
|
|
131
140
|
published: Опубліковано
|
|
132
141
|
see_all_updates: Переглянути всі оновлення
|
|
133
|
-
toggle_less: Показати менше
|
|
134
|
-
toggle_more: "+ %{number} більше"
|
|
135
142
|
modal_dialogue:
|
|
136
143
|
close_modal: Закрити модальний діалог
|
|
137
144
|
notice:
|
data/config/locales/ur.yml
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
ur:
|
|
3
3
|
common:
|
|
4
|
+
hide: پوشیدہ کریں
|
|
5
|
+
show: دکھائی
|
|
6
|
+
toggle_less: کم دکھائیں
|
|
7
|
+
toggle_more: "%{show} %{number} مزید"
|
|
4
8
|
translations: تراجم
|
|
5
9
|
components:
|
|
6
10
|
accordion:
|
|
7
|
-
hide: پوشیدہ کریں
|
|
8
11
|
hide_all: تمام سیکشنز کو پوشیدہ کریں
|
|
9
|
-
show: دکھائی
|
|
10
12
|
show_all: تمام سیکشنز دکھائیں
|
|
11
13
|
this_section_visually_hidden: " یہ سیکشن"
|
|
12
14
|
article_schema:
|
|
@@ -38,8 +40,12 @@ ur:
|
|
|
38
40
|
buttons:
|
|
39
41
|
accept_cookies: اضافی کوکیز کو قبول کریں
|
|
40
42
|
reject_cookies: اضافی کوکیز کو مسترد کریں
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
view_cookies:
|
|
44
|
+
confirmation_message:
|
|
45
|
+
accepted:
|
|
46
|
+
html: آپ کسی بھی وقت %{link} کر سکتے ہیں۔
|
|
47
|
+
link: اپنی کوکی کی ترتیبات تبدیل کریں
|
|
48
|
+
rejected:
|
|
43
49
|
hide: اس پیغام کو پوشیدہ کریں
|
|
44
50
|
text:
|
|
45
51
|
- ہم اس ویب سائٹ کو چلانے کے لیے کچھ ضروری کوکیز استعمال کرتے ہیں۔، ہم اس بات کو سمجھنے کے لیے کچھ اضافی کوکیز سیٹ کرنا چاہیں گے کہ آپ GOV.UK کو کیسے سمجھتے ہیں، اپنی ترتیبات یاد رکھیں اور حکومتی سروسز کو بہتر بنائیں۔، ہم دیگر سائٹس سے مواد کی ترسیل کرنے کے لیے دیگر سائٹس کی جانب سے سیٹ کی گئی کوکیز بھی استعمال کرتے ہیں۔
|
|
@@ -106,7 +112,10 @@ ur:
|
|
|
106
112
|
menu_toggle_label:
|
|
107
113
|
hide:
|
|
108
114
|
show:
|
|
109
|
-
|
|
115
|
+
navigation_link:
|
|
116
|
+
href:
|
|
117
|
+
label:
|
|
118
|
+
navigation_links_columns:
|
|
110
119
|
navigation_menu_heading:
|
|
111
120
|
navigation_search_heading:
|
|
112
121
|
navigation_search_subheading:
|
|
@@ -120,8 +129,6 @@ ur:
|
|
|
120
129
|
part_of: حصہ از
|
|
121
130
|
published: شائع کردہ
|
|
122
131
|
see_all_updates: تمام اپ ڈیٹس دیکھیں
|
|
123
|
-
toggle_less: کم دکھائیں
|
|
124
|
-
toggle_more: "+ %{number} مزید"
|
|
125
132
|
modal_dialogue:
|
|
126
133
|
close_modal: محدود موڈل ڈائیلاگ
|
|
127
134
|
notice:
|
data/config/locales/uz.yml
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
uz:
|
|
3
3
|
common:
|
|
4
|
+
hide: Яшириш
|
|
5
|
+
show: Кўрсатиш
|
|
6
|
+
toggle_less: Камроқ кўрсатиш
|
|
7
|
+
toggle_more: "%{show} %{number} кўпроқ"
|
|
4
8
|
translations: Таржималар
|
|
5
9
|
components:
|
|
6
10
|
accordion:
|
|
7
|
-
hide: Яшириш
|
|
8
11
|
hide_all: Бўлимларни барчасини яшириш
|
|
9
|
-
show: Кўрсатиш
|
|
10
12
|
show_all: Бўлимларни барчасини кўрсатиш
|
|
11
13
|
this_section_visually_hidden: " ушбу бўлим"
|
|
12
14
|
article_schema:
|
|
@@ -38,8 +40,12 @@ uz:
|
|
|
38
40
|
buttons:
|
|
39
41
|
accept_cookies: cookie қўшимча файлларини қабул қилиш
|
|
40
42
|
reject_cookies: cookie қўшимча файлларини бекор қилиш
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
view_cookies:
|
|
44
|
+
confirmation_message:
|
|
45
|
+
accepted:
|
|
46
|
+
html: Сиз %{link} исталган вақтда қилишингиз мумкин.
|
|
47
|
+
link: cookie файлларини созламаларини ўзгариши
|
|
48
|
+
rejected:
|
|
43
49
|
hide: Ушбу хабарни яшириш
|
|
44
50
|
text:
|
|
45
51
|
- Биз ушбу веб-сайтни ишини таъминлаш учун cookieнинг муайян файлларини қўллаймиз.
|
|
@@ -111,7 +117,10 @@ uz:
|
|
|
111
117
|
menu_toggle_label:
|
|
112
118
|
hide:
|
|
113
119
|
show:
|
|
114
|
-
|
|
120
|
+
navigation_link:
|
|
121
|
+
href:
|
|
122
|
+
label:
|
|
123
|
+
navigation_links_columns:
|
|
115
124
|
navigation_menu_heading:
|
|
116
125
|
navigation_search_heading:
|
|
117
126
|
navigation_search_subheading:
|
|
@@ -125,8 +134,6 @@ uz:
|
|
|
125
134
|
part_of: Қисм
|
|
126
135
|
published: Нашр қилинган
|
|
127
136
|
see_all_updates: Барча янгиланишларни кўриш
|
|
128
|
-
toggle_less: Камроқ кўрсатиш
|
|
129
|
-
toggle_more: "+ %{number} кўпроқ"
|
|
130
137
|
modal_dialogue:
|
|
131
138
|
close_modal: Модал мулоқотни ёпиш
|
|
132
139
|
notice:
|
data/config/locales/vi.yml
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
vi:
|
|
3
3
|
common:
|
|
4
|
+
hide: Ẩn
|
|
5
|
+
show: Hiển thị
|
|
6
|
+
toggle_less: Ẩn bớt
|
|
7
|
+
toggle_more: "%{show} thêm %{number}"
|
|
4
8
|
translations: Bản dịch
|
|
5
9
|
components:
|
|
6
10
|
accordion:
|
|
7
|
-
hide: Ẩn
|
|
8
11
|
hide_all: Ẩn tất cả các phần
|
|
9
|
-
show: Hiển thị
|
|
10
12
|
show_all: Hiển thị tất cả các phần
|
|
11
13
|
this_section_visually_hidden: " phần này"
|
|
12
14
|
article_schema:
|
|
@@ -37,8 +39,12 @@ vi:
|
|
|
37
39
|
buttons:
|
|
38
40
|
accept_cookies: Chấp nhận các cookie bổ sung
|
|
39
41
|
reject_cookies: Từ chối các cookie bổ sung
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
view_cookies:
|
|
43
|
+
confirmation_message:
|
|
44
|
+
accepted:
|
|
45
|
+
html: Bạn có thể %{link} bất kỳ lúc nào.
|
|
46
|
+
link: thay đổi cài đặt cookie của bạn
|
|
47
|
+
rejected:
|
|
42
48
|
hide: Ẩn thông báo này
|
|
43
49
|
text:
|
|
44
50
|
- Chúng tôi sử dụng một số cookie cần thiết để vận hành trang web này.
|
|
@@ -108,7 +114,10 @@ vi:
|
|
|
108
114
|
menu_toggle_label:
|
|
109
115
|
hide:
|
|
110
116
|
show:
|
|
111
|
-
|
|
117
|
+
navigation_link:
|
|
118
|
+
href:
|
|
119
|
+
label:
|
|
120
|
+
navigation_links_columns:
|
|
112
121
|
navigation_menu_heading:
|
|
113
122
|
navigation_search_heading:
|
|
114
123
|
navigation_search_subheading:
|
|
@@ -122,8 +131,6 @@ vi:
|
|
|
122
131
|
part_of: Một phần của
|
|
123
132
|
published: Đã xuất bản
|
|
124
133
|
see_all_updates: Xem tất cả nội dung cập nhật
|
|
125
|
-
toggle_less: Ẩn bớt
|
|
126
|
-
toggle_more: "+ thêm %{number}"
|
|
127
134
|
modal_dialogue:
|
|
128
135
|
close_modal: Đóng đối thoại phương thức
|
|
129
136
|
notice:
|
data/config/locales/zh-hk.yml
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
zh-hk:
|
|
3
3
|
common:
|
|
4
|
+
hide: 隱藏
|
|
5
|
+
show: 顯示
|
|
6
|
+
toggle_less: 顯示更少內容
|
|
7
|
+
toggle_more: "%{show} %{number} more"
|
|
4
8
|
translations: 譯文
|
|
5
9
|
components:
|
|
6
10
|
accordion:
|
|
7
|
-
hide: 隱藏
|
|
8
11
|
hide_all: 隱藏所有部份
|
|
9
|
-
show: 顯示
|
|
10
12
|
show_all: 顯示所有部份
|
|
11
13
|
this_section_visually_hidden: 此部份
|
|
12
14
|
article_schema:
|
|
@@ -37,8 +39,12 @@ zh-hk:
|
|
|
37
39
|
buttons:
|
|
38
40
|
accept_cookies: 接受額外 cookies
|
|
39
41
|
reject_cookies: 拒絕額外 cookies
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
view_cookies:
|
|
43
|
+
confirmation_message:
|
|
44
|
+
accepted:
|
|
45
|
+
html: 您可隨時 %{link} 。
|
|
46
|
+
link: 更改您的 cookie 設定
|
|
47
|
+
rejected:
|
|
42
48
|
hide: 隱藏此一訊息
|
|
43
49
|
text:
|
|
44
50
|
- 我們使用部份基本 cookies 讓此一網站運作。
|
|
@@ -107,7 +113,10 @@ zh-hk:
|
|
|
107
113
|
menu_toggle_label:
|
|
108
114
|
hide:
|
|
109
115
|
show:
|
|
110
|
-
|
|
116
|
+
navigation_link:
|
|
117
|
+
href:
|
|
118
|
+
label:
|
|
119
|
+
navigation_links_columns:
|
|
111
120
|
navigation_menu_heading:
|
|
112
121
|
navigation_search_heading:
|
|
113
122
|
navigation_search_subheading:
|
|
@@ -121,8 +130,6 @@ zh-hk:
|
|
|
121
130
|
part_of: 部份
|
|
122
131
|
published: 已發佈
|
|
123
132
|
see_all_updates: 查閱所有更新項
|
|
124
|
-
toggle_less: 顯示更少內容
|
|
125
|
-
toggle_more: "+ %{number} more"
|
|
126
133
|
modal_dialogue:
|
|
127
134
|
close_modal: 關閉互動視窗對話
|
|
128
135
|
notice:
|
data/config/locales/zh-tw.yml
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
zh-tw:
|
|
3
3
|
common:
|
|
4
|
+
hide: 隱藏
|
|
5
|
+
show: 展開
|
|
6
|
+
toggle_less: 顯示部分
|
|
7
|
+
toggle_more: "%{show} %{number}更多"
|
|
4
8
|
translations: 翻譯
|
|
5
9
|
components:
|
|
6
10
|
accordion:
|
|
7
|
-
hide: 隱藏
|
|
8
11
|
hide_all: 隱藏所有區段
|
|
9
|
-
show: 展開
|
|
10
12
|
show_all: 展開所有區段
|
|
11
13
|
this_section_visually_hidden: " 這個區段"
|
|
12
14
|
article_schema:
|
|
@@ -37,8 +39,12 @@ zh-tw:
|
|
|
37
39
|
buttons:
|
|
38
40
|
accept_cookies: 接受額外cookie
|
|
39
41
|
reject_cookies: 拒絕額外cookie
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
view_cookies:
|
|
43
|
+
confirmation_message:
|
|
44
|
+
accepted:
|
|
45
|
+
html: 可以隨時 %{link}。
|
|
46
|
+
link: 更改你的cookie設定
|
|
47
|
+
rejected:
|
|
42
48
|
hide: 隱藏此訊息
|
|
43
49
|
text:
|
|
44
50
|
- 我們使用一些必要的 cookie 來正常運作本網站。
|
|
@@ -107,7 +113,10 @@ zh-tw:
|
|
|
107
113
|
menu_toggle_label:
|
|
108
114
|
hide:
|
|
109
115
|
show:
|
|
110
|
-
|
|
116
|
+
navigation_link:
|
|
117
|
+
href:
|
|
118
|
+
label:
|
|
119
|
+
navigation_links_columns:
|
|
111
120
|
navigation_menu_heading:
|
|
112
121
|
navigation_search_heading:
|
|
113
122
|
navigation_search_subheading:
|
|
@@ -121,8 +130,6 @@ zh-tw:
|
|
|
121
130
|
part_of: 部分
|
|
122
131
|
published: 發布
|
|
123
132
|
see_all_updates: 查看所有更新
|
|
124
|
-
toggle_less: 顯示部分
|
|
125
|
-
toggle_more: "+ %{number}更多"
|
|
126
133
|
modal_dialogue:
|
|
127
134
|
close_modal: 關閉模態對話
|
|
128
135
|
notice:
|
data/config/locales/zh.yml
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
zh:
|
|
3
3
|
common:
|
|
4
|
+
hide: 隐藏
|
|
5
|
+
show: 显示
|
|
6
|
+
toggle_less: 显示更少
|
|
7
|
+
toggle_more: "%{show} %{number}更多"
|
|
4
8
|
translations: 翻译
|
|
5
9
|
components:
|
|
6
10
|
accordion:
|
|
7
|
-
hide: 隐藏
|
|
8
11
|
hide_all: 隐藏所有小节
|
|
9
|
-
show: 显示
|
|
10
12
|
show_all: 显示所有小节
|
|
11
13
|
this_section_visually_hidden: " 本小节"
|
|
12
14
|
article_schema:
|
|
@@ -37,8 +39,12 @@ zh:
|
|
|
37
39
|
buttons:
|
|
38
40
|
accept_cookies: 接受额外cookies
|
|
39
41
|
reject_cookies: 拒绝额外cookies
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
view_cookies:
|
|
43
|
+
confirmation_message:
|
|
44
|
+
accepted:
|
|
45
|
+
html: 您可以随时 %{link}。
|
|
46
|
+
link: 更改您的cookie设置
|
|
47
|
+
rejected:
|
|
42
48
|
hide: 隐藏此消息
|
|
43
49
|
text:
|
|
44
50
|
- 我们使用一些基本的cookie以使本网站运作。
|
|
@@ -107,7 +113,10 @@ zh:
|
|
|
107
113
|
menu_toggle_label:
|
|
108
114
|
hide:
|
|
109
115
|
show:
|
|
110
|
-
|
|
116
|
+
navigation_link:
|
|
117
|
+
href:
|
|
118
|
+
label:
|
|
119
|
+
navigation_links_columns:
|
|
111
120
|
navigation_menu_heading:
|
|
112
121
|
navigation_search_heading:
|
|
113
122
|
navigation_search_subheading:
|
|
@@ -121,8 +130,6 @@ zh:
|
|
|
121
130
|
part_of: 一部分
|
|
122
131
|
published: 已发布
|
|
123
132
|
see_all_updates: 查看全部更新
|
|
124
|
-
toggle_less: 显示更少
|
|
125
|
-
toggle_more: "+ %{number}更多"
|
|
126
133
|
modal_dialogue:
|
|
127
134
|
close_modal: 关闭模态对话
|
|
128
135
|
notice:
|
|
@@ -4,14 +4,15 @@ module GovukPublishingComponents
|
|
|
4
4
|
include ActionView::Helpers
|
|
5
5
|
include ActionView::Context
|
|
6
6
|
|
|
7
|
-
attr_reader :
|
|
7
|
+
attr_reader :href_data_attributes, :extra_details, :extra_details_no_indent, :heading_text, :metadata, :lang, :image_loading, :youtube_video_id, :image_src
|
|
8
8
|
|
|
9
|
-
def initialize(local_assigns)
|
|
9
|
+
def initialize(local_assigns, brand_helper)
|
|
10
10
|
@href = local_assigns[:href]
|
|
11
11
|
@href_data_attributes = local_assigns[:href_data_attributes]
|
|
12
12
|
@extra_details = local_assigns[:extra_details] || []
|
|
13
13
|
@image_src = local_assigns[:image_src]
|
|
14
14
|
@image_alt = local_assigns[:image_alt] || ""
|
|
15
|
+
@youtube_video_alt = local_assigns[:youtube_video_alt]
|
|
15
16
|
@image_loading = local_assigns[:image_loading] || "auto"
|
|
16
17
|
@srcset = local_assigns[:srcset] || nil
|
|
17
18
|
@sizes = local_assigns[:sizes] || nil
|
|
@@ -23,6 +24,22 @@ module GovukPublishingComponents
|
|
|
23
24
|
@extra_details_no_indent = local_assigns[:extra_details_no_indent]
|
|
24
25
|
@metadata = local_assigns[:metadata]
|
|
25
26
|
@lang = local_assigns[:lang]
|
|
27
|
+
@youtube_video_id = local_assigns[:youtube_video_id] || nil
|
|
28
|
+
|
|
29
|
+
@brand_helper = brand_helper
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def href
|
|
33
|
+
return youtube_href if @youtube_video_id
|
|
34
|
+
|
|
35
|
+
@href
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def large
|
|
39
|
+
# if youtube video, we don't want to use
|
|
40
|
+
# the small variant, large will be always
|
|
41
|
+
# true if a youtube_video_id is supplied
|
|
42
|
+
@youtube_video_id || @large
|
|
26
43
|
end
|
|
27
44
|
|
|
28
45
|
def is_tracking?
|
|
@@ -36,6 +53,12 @@ module GovukPublishingComponents
|
|
|
36
53
|
false
|
|
37
54
|
end
|
|
38
55
|
|
|
56
|
+
def media
|
|
57
|
+
return youtube_link if @youtube_video_id
|
|
58
|
+
|
|
59
|
+
image
|
|
60
|
+
end
|
|
61
|
+
|
|
39
62
|
def image
|
|
40
63
|
if @image_src
|
|
41
64
|
content_tag(:figure, class: "gem-c-image-card__image-wrapper") do
|
|
@@ -75,6 +98,46 @@ module GovukPublishingComponents
|
|
|
75
98
|
def description
|
|
76
99
|
content_tag(:div, @description, class: "gem-c-image-card__description") if @description
|
|
77
100
|
end
|
|
101
|
+
|
|
102
|
+
def youtube_href
|
|
103
|
+
"https://www.youtube.com/watch?v=#{@youtube_video_id}"
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def youtube_thumbnail_url
|
|
107
|
+
"https://img.youtube.com/vi/#{@youtube_video_id}/maxresdefault.jpg"
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def youtube_thumbnail
|
|
111
|
+
thumbnail = content_tag(:div, class: "gem-c-image-card__youtube-thumbnail-image-container") do
|
|
112
|
+
image_tag(
|
|
113
|
+
youtube_thumbnail_url,
|
|
114
|
+
class: "gem-c-image-card__image gem-c-image-card__youtube-thumbnail-image",
|
|
115
|
+
alt: "",
|
|
116
|
+
loading: @image_loading,
|
|
117
|
+
)
|
|
118
|
+
end
|
|
119
|
+
thumbnail + content_tag(:figcaption, @youtube_video_alt, class: "gem-c-image-card__youtube-thumbnail-container-text govuk-link #{@brand_helper.color_class}")
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
def youtube_link
|
|
123
|
+
content_tag(
|
|
124
|
+
:figure,
|
|
125
|
+
class: "gem-c-image-card__image-wrapper gem-c-image-card__image-wrapper--youtube-embed",
|
|
126
|
+
) do
|
|
127
|
+
content_tag(:div) do
|
|
128
|
+
link_to(
|
|
129
|
+
href,
|
|
130
|
+
{
|
|
131
|
+
class: "govuk-body govuk-link gem-c-image-card__youtube-thumbnail-container js-youtube-card-embed",
|
|
132
|
+
"data-youtube-player-analytics": true,
|
|
133
|
+
"data-youtube-player-analytics-category": "EmbeddedYoutube",
|
|
134
|
+
},
|
|
135
|
+
) do
|
|
136
|
+
youtube_thumbnail
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
78
141
|
end
|
|
79
142
|
end
|
|
80
143
|
end
|
|
@@ -77,7 +77,7 @@ module GovukPublishingComponents
|
|
|
77
77
|
if show_sidebar?
|
|
78
78
|
@sidebar ||= current_step_nav.content.tap do |sb|
|
|
79
79
|
configure_for_sidebar(sb)
|
|
80
|
-
sb.merge!(small: true, heading_level: 3, tracking_id: current_step_nav.content_id)
|
|
80
|
+
sb.merge!(small: true, heading_level: 3, tracking_id: current_step_nav.content_id, ga4_tracking: @query_parameters[:ga4_tracking])
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
end
|
|
@@ -65,6 +65,10 @@ module GovukPublishingComponents
|
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
+
def component_title
|
|
69
|
+
I18n.t("components.related_#{@context}_navigation.related_content", default: I18n.t("components.related_navigation.related_content"))
|
|
70
|
+
end
|
|
71
|
+
|
|
68
72
|
def section_css_class(css_class, section_title, link: {}, link_is_inline: false)
|
|
69
73
|
css_classes = [css_class]
|
|
70
74
|
css_classes << "#{css_class}--#{@context}" unless @context.nil?
|
|
@@ -177,6 +177,6 @@ Read the [documentation on contributing](CONTRIBUTING.md)
|
|
|
177
177
|
|
|
178
178
|
## Acknowledgements
|
|
179
179
|
|
|
180
|
-
Thanks to Dulin
|
|
180
|
+
Thanks to Marat Dulin for his [css-selector-parser](https://www.npmjs.com/package/css-selector-parser) implementation which is included for shadow DOM support.
|
|
181
181
|
|
|
182
182
|
Thanks to the [Slick Parser](https://github.com/mootools/slick/blob/master/Source/Slick.Parser.js) implementers for their contribution, we have used some of their algorithms in our shadow DOM support code.
|