govuk_publishing_components 24.14.0 → 24.15.3

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.
@@ -18,5 +18,10 @@
18
18
  id: "site-search-text",
19
19
  margin_bottom: 0,
20
20
  no_border: true,
21
+ data_attributes: {
22
+ track_category: "headerClicked",
23
+ track_action: "searchSubmitted",
24
+ track_label: "none",
25
+ },
21
26
  } %>
22
27
  </form>
@@ -0,0 +1,4 @@
1
+ data:
2
+ yaml:
3
+ write:
4
+ line_width: -1
@@ -12,20 +12,14 @@ en:
12
12
  article_schema:
13
13
  scoped_search_description: Search within %{title}
14
14
  attachment:
15
- opendocument_html: This file is in an <a href='https://www.gov.uk/guidance/using-open-document-formats-odf-in-your-organisation'
16
- target=%{target} class='govuk-link'>OpenDocument</a> format
15
+ opendocument_html: This file is in an <a href='https://www.gov.uk/guidance/using-open-document-formats-odf-in-your-organisation' target=%{target} class='govuk-link'>OpenDocument</a> format
17
16
  order_a_copy: Order a copy
18
17
  page:
19
18
  one: 1 page
20
- other: '%{count} pages'
19
+ other: "%{count} pages"
21
20
  reference: 'Ref: %{reference}'
22
21
  request_format_cta: Request an accessible format.
23
- request_format_details_html: If you use assistive technology (such as a screen
24
- reader) and need a version of this document in a more accessible format, please
25
- email <a href='mailto:%{alternative_format_contact_email}' target='_blank'
26
- class='govuk-link'>%{alternative_format_contact_email}</a>. Please tell us
27
- what format you need. It will help us if you say what assistive technology
28
- you use.
22
+ request_format_details_html: If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email <a href='mailto:%{alternative_format_contact_email}' target='_blank' class='govuk-link'>%{alternative_format_contact_email}</a>. Please tell us what format you need. It will help us if you say what assistive technology you use.
29
23
  request_format_text: This file may not be suitable for users of assistive technology.
30
24
  back_link:
31
25
  back: Back
@@ -44,28 +38,24 @@ en:
44
38
  buttons:
45
39
  accept_cookies: Accept additional cookies
46
40
  reject_cookies: Reject additional cookies
47
- hide: Hide this message
48
- text:
49
- - We use some essential cookies to make this website work.
50
- - We’d like to set additional cookies to understand how you use GOV.UK, remember your settings and improve government services.
51
- - We also use cookies set by other sites to help us deliver content from their services.
52
41
  confirmation_message: You can %{link} at any time.
53
42
  confirmation_message_link: change your cookie settings
43
+ hide: Hide this message
44
+ text:
45
+ - We use some essential cookies to make this website work.
46
+ - We’d like to set additional cookies to understand how you use GOV.UK, remember your settings and improve government services.
47
+ - We also use cookies set by other sites to help us deliver content from their services.
54
48
  title: Cookies on GOV.UK
55
49
  feedback:
56
50
  close: Close
57
- dont_include_personal_info: Don’t include personal or financial information
58
- like your National Insurance number or credit card details.
51
+ dont_include_personal_info: Don’t include personal or financial information like your National Insurance number or credit card details.
59
52
  email_address: Email address
60
53
  help_us_improve_govuk: Help us improve GOV.UK
61
54
  is_not_useful: this page is not useful
62
55
  is_this_page_useful: Is this page useful?
63
56
  is_useful: this page is useful
64
57
  maybe: Maybe
65
- more_about_visit: To help us improve GOV.UK, we’d like to know more about your
66
- visit today. We’ll send you a link to a feedback form. It will take only 2
67
- minutes to fill in. Don’t worry we won’t send you spam or share your email
68
- address with anyone.
58
+ more_about_visit: To help us improve GOV.UK, we’d like to know more about your visit today. We’ll send you a link to a feedback form. It will take only 2 minutes to fill in. Don’t worry we won’t send you spam or share your email address with anyone.
69
59
  'no': 'No'
70
60
  send: Send
71
61
  send_me_survey: Send me the survey
@@ -39,8 +39,7 @@ module GovukPublishingComponents
39
39
  tracking_category: "breadcrumbClicked",
40
40
  tracking_action: tracking_action,
41
41
  tracking_label: content_item["base_path"],
42
- tracking_dimension_enabled: false,
43
- }
42
+ }.merge(custom_dimension_tracking)
44
43
  end
45
44
 
46
45
  private
@@ -80,16 +79,36 @@ module GovukPublishingComponents
80
79
  [PRIORITY_TAXONS[:brexit_business], PRIORITY_TAXONS[:brexit_individuals]]
81
80
  end
82
81
 
82
+ def brexit_taxons
83
+ brexit_child_taxons << PRIORITY_TAXONS[:brexit_taxon]
84
+ end
85
+
83
86
  def preferred_priority_taxon
84
87
  query_parameters["priority-taxon"] if query_parameters
85
88
  end
86
89
 
87
90
  def tracking_action
88
91
  action = %w[superBreadcrumb]
89
- action << "Brexitbusiness" if taxon["content_id"] == PRIORITY_TAXONS[:brexit_business]
90
- action << "Brexitcitizen" if taxon["content_id"] == PRIORITY_TAXONS[:brexit_individuals]
91
- action << "Brexitbusinessandcitizen" if taxon["content_id"] == PRIORITY_TAXONS[:brexit_taxon]
92
- action.join(" ")
92
+ action << page_name_for_tracking
93
+ action.compact.join(" ")
94
+ end
95
+
96
+ def custom_dimension_tracking
97
+ tracking = { tracking_dimension_enabled: false }
98
+ if brexit_taxons.include?(taxon["content_id"])
99
+ tracking[:tracking_dimension_enabled] = true
100
+ tracking[:tracking_dimension] = page_name_for_tracking
101
+ tracking[:tracking_dimension_index] = 111
102
+ end
103
+ tracking
104
+ end
105
+
106
+ def page_name_for_tracking
107
+ {
108
+ PRIORITY_TAXONS[:brexit_business] => "Brexitbusiness",
109
+ PRIORITY_TAXONS[:brexit_individuals] => "Brexitcitizen",
110
+ PRIORITY_TAXONS[:brexit_taxon] => "Brexitbusinessandcitizen",
111
+ }[taxon["content_id"]]
93
112
  end
94
113
 
95
114
  def tagged_to_both_brexit_child_taxons?
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "24.14.0".freeze
2
+ VERSION = "24.15.3".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.14.0
4
+ version: 24.15.3
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-15 00:00:00.000000000 Z
11
+ date: 2021-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -178,6 +178,20 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: i18n-tasks
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: jasmine
183
197
  requirement: !ruby/object:Gem::Requirement
@@ -804,6 +818,7 @@ files:
804
818
  - app/views/govuk_publishing_components/components/metadata/_sentence.html.erb
805
819
  - app/views/govuk_publishing_components/components/related_navigation/_section.html.erb
806
820
  - app/views/layouts/govuk_publishing_components/application.html.erb
821
+ - config/i18n-tasks.yml
807
822
  - config/initializers/assets.rb
808
823
  - config/locales/ar.yml
809
824
  - config/locales/az.yml