Skip to content

Commit

Permalink
Add govspeak support for summary property
Browse files Browse the repository at this point in the history
  • Loading branch information
kashifatcha committed Feb 24, 2025
1 parent 24d9f6e commit 8bd0cce
Show file tree
Hide file tree
Showing 27 changed files with 32 additions and 27 deletions.
7 changes: 6 additions & 1 deletion app/presenters/finder_content_item_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ def details
logo_path: file.fetch("logo_path", nil),
show_summaries: file.fetch("show_summaries", false),
signup_link: file.fetch("signup_link", nil),
summary: file.fetch("summary", nil),
summary: [
{
content_type: "text/govspeak",
content: file.fetch("summary", ""),
},
],
label_text: file.fetch("label_text", nil),
facets: FinderContentItemPresenter.facets_without_specialist_publisher_properties(file.fetch("facets", nil)),
default_order: file.fetch("default_order", nil),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,6 @@
"show_summaries": true,
"signup_content_id": "99f5bacb-d1ef-4b93-87ef-bae129fed396",
"subscription_list_title_prefix": "Algorithmic transparency records",
"summary": "<p>Find algorithmic transparency records from UK public sector organisations with information on algorithmic tools used in decision making. These are completed in accordance with the Algorithmic Transparency Recording Standard.</p><p>Let us know what you think of this service: [<a href=\"https://forms.office.com/e/XNn3GBqzhY\">feedback form</a>]</p>",
"summary": "Find algorithmic transparency records from UK public sector organisations with information on algorithmic tools used in decision making. These are completed in accordance with the Algorithmic Transparency Recording Standard. Let us know what you think of this service: [feedback form](https://forms.office.com/e/XNn3GBqzhY)",
"target_stack": "live"
}
2 changes: 1 addition & 1 deletion lib/documents/schemas/animal_disease_cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,6 @@
],
"signup_content_id": "e39c8c6e-b4c2-4dec-84fd-7f3d77f96a7d",
"subscription_list_title_prefix": "Notifiable animal disease cases and control zones",
"summary": "<p>Find notifiable exotic animal disease cases and control zone declarations for England.</p><p>Read our <a href=\"https://www.gov.uk/government/collections/notifiable-diseases-in-animals\">guidance on notifiable diseases in animals</a>.</p>",
"summary": "Find notifiable exotic animal disease cases and control zone declarations for England. Read our [guidance on notifiable diseases in animals](https://www.gov.uk/government/collections/notifiable-diseases-in-animals).",
"target_stack": "live"
}
2 changes: 1 addition & 1 deletion lib/documents/schemas/asylum_support_decisions.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@
"show_summaries": true,
"signup_content_id": "307ea825-594c-4d88-85c9-0809fdc9c79e",
"subscription_list_title_prefix": "First-tier Tribunal (Asylum Support) decisions",
"summary": "<p>Find decisions on appeals against the Home Office heard by the First-tier Tribunal (Asylum Support).</p>",
"summary": "Find decisions on appeals against the Home Office heard by the First-tier Tribunal (Asylum Support).",
"target_stack": "live",
"taxons": [
"e1d2032c-6a59-4a1a-919c-dc149847dffb"
Expand Down
2 changes: 1 addition & 1 deletion lib/documents/schemas/cma_cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@
],
"signup_content_id": "43dd2b13-93ec-4ca6-a7a4-e2eb5f5d485a",
"subscription_list_title_prefix": "CMA cases",
"summary": "<p>This case finder includes cases and projects from the Competition and Markets Authority (CMA), Office for the Internal Market (OIM) and Subsidy Advice Unit (SAU).<p>",
"summary": "This case finder includes cases and projects from the Competition and Markets Authority (CMA), Office for the Internal Market (OIM) and Subsidy Advice Unit (SAU).",
"target_stack": "live",
"taxons": [
"8db04387-9076-4287-ab46-6a6695b593d7"
Expand Down
2 changes: 1 addition & 1 deletion lib/documents/schemas/countryside_stewardship_grants.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
"related": [
"5e91c0bf-187d-4fa0-a6ef-992736d5644c"
],
"summary": "<p>Search for options, supplements and capital items to include in your Countryside Stewardship application. Find out about <a href=\"/guidance/countryside-stewardship-get-funding-to-protect-and-improve-the-land-you-manage\">each Countryside Stewardship scheme and check if you’re eligible before you apply for a grant</a>.</p>",
"summary": "Search for options, supplements and capital items to include in your Countryside Stewardship application. Find out about each [Countryside Stewardship scheme and check if you’re eligible before you apply for a grant](/guidance/countryside-stewardship-get-funding-to-protect-and-improve-the-land-you-manage).",
"target_stack": "live",
"taxons": [
"9129d716-365b-44ba-9856-383423fe1e41"
Expand Down
2 changes: 1 addition & 1 deletion lib/documents/schemas/data_ethics_guidance_documents.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,6 @@
],
"related": [],
"show_summaries": true,
"summary": "<p>Find guidance for the responsible use and development of data and data technologies, including artificial intelligence (AI), developed by and for government and public sector bodies.</p><p>If you have suggestions for guidance, email <a href=\"mailto:data.ethics@digital.cabinet-office.gov.uk\">data.ethics@digital.cabinet-office.gov.uk</a>.</p>",
"summary": "Find guidance for the responsible use and development of data and data technologies, including artificial intelligence (AI), developed by and for government and public sector bodies. If you have suggestions for guidance, email [data.ethics@digital.cabinet-office.gov.uk](mailto:data.ethics@digital.cabinet-office.gov.uk).",
"target_stack": "live"
}
2 changes: 1 addition & 1 deletion lib/documents/schemas/drcf_digital_markets_researches.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,6 @@
"organisations": [
"957eb4ec-089b-4f71-ba2a-dc69ac8919ea"
],
"summary": "<p>Find research about digital markets and regulation carried out by public authorities, curated by the <a href=\"government/collections/the-digital-regulation-cooperation-forum\"> Digital Regulation Cooperation Forum (DRCF)</a></p>",
"summary": "Find research about digital markets and regulation carried out by public authorities, curated by the [Digital Regulation Cooperation Forum (DRCF)](government/collections/the-digital-regulation-cooperation-forum)",
"target_stack": "live"
}
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@
"show_summaries": true,
"signup_content_id": "1f5911f4-417a-4380-a5a0-674ebff332df",
"subscription_list_title_prefix": "Employment Appeal Tribunal decisions",
"summary": "<p>Find decisions on appeals against employment tribunals heard by the Employment Appeal Tribunal.</p><p>Includes decisions after December 2015. Find details of <a rel=\"external\" href=\"http://www.employmentappeals.gov.uk/Public/Search.aspx\">older cases.</a></p>",
"summary": "Find decisions on appeals against employment tribunals heard by the Employment Appeal Tribunal. Includes decisions after December 2015. Find details of [older cases.](http://www.employmentappeals.gov.uk/Public/Search.aspx)",
"target_stack": "live",
"taxons": [
"357110bb-cbc5-4708-9711-1b26e6c63e86"
Expand Down
2 changes: 1 addition & 1 deletion lib/documents/schemas/employment_tribunal_decisions.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
"show_summaries": true,
"signup_content_id": "6d7ace06-f437-4fb3-b948-8534ff34540f",
"subscription_list_title_prefix": "Employment tribunal decisions",
"summary": "<p>Find decisions on Employment Tribunal cases in England, Wales and Scotland from February 2017 onwards.</p><p>For enquiries about Employment Tribunal judgments in England and Wales prior to February 2017 contact <a href='https://www.find-court-tribunal.service.gov.uk/courts/bury-st-edmunds-county-court-and-family-court'>Bury St Edmunds County Court</a>. Please note that we are currently experiencing technical difficulties with the system used to search for judgments. Unfortunately, we are unable to confirm when this issue will be resolved and there may be a delay to you receiving the judgment you have requested.</p><p>If the decision was made before February 2017 in Scotland, contact <a href='https://www.find-court-tribunal.service.gov.uk/courts/glasgow-tribunals-centre'>Glasgow Tribunals Centre</a>.</p><p>Decisions are not affected by GDPR rules and cannot be removed from GOV.UK.</p>",
"summary": "Find decisions on Employment Tribunal cases in England, Wales and Scotland from February 2017 onwards. For enquiries about Employment Tribunal judgments in England and Wales prior to February 2017 contact [Bury St Edmunds County Court](https://www.find-court-tribunal.service.gov.uk/courts/bury-st-edmunds-county-court-and-family-court). Please note that we are currently experiencing technical difficulties with the system used to search for judgments. Unfortunately, we are unable to confirm when this issue will be resolved and there may be a delay to you receiving the judgment you have requested. If the decision was made before February 2017 in Scotland, contact [Glasgow Tribunals Centre](https://www.find-court-tribunal.service.gov.uk/courts/glasgow-tribunals-centre).Decisions are not affected by GDPR rules and cannot be removed from GOV.UK.",
"target_stack": "live",
"taxons": [
"357110bb-cbc5-4708-9711-1b26e6c63e86"
Expand Down
2 changes: 1 addition & 1 deletion lib/documents/schemas/esi_funds.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
],
"signup_content_id": "a4815714-e5d5-4e1b-8543-3ce10139988f",
"subscription_list_title_prefix": "European Structural and Investment Fund",
"summary": "<p>Applies to: England (see guidance for <a rel=\"external\" href=\"http://www.scotland.gov.uk/Topics/Business-Industry/support/17404\">Scotland</a>, <a rel=\"external\" href=\"http://wefo.wales.gov.uk/programmes/post2013/?skip=1&amp;lang=en\">Wales</a> and <a rel=\"external\" href=\"https://www.finance-ni.gov.uk/articles/european-structural-and-investment-fund-programmes-northern-ireland\">Northern Ireland</a>)</p><p>Apply to run projects backed by the European Structural and Investment Fund (ESIF). ESIF includes money from the European Social Fund (ESF), European Regional Development Fund (ERDF) and European Agricultural Fund for Rural Development (EAFRD).</p>",
"summary": "Applies to: England (see guidance for [Scotland](http://www.scotland.gov.uk/Topics/Business-Industry/support/17404), [Wales](http://wefo.wales.gov.uk/programmes/post2013/?skip=1&amp;lang=en) and [Northern Ireland](https://www.finance-ni.gov.uk/articles/european-structural-and-investment-fund-programmes-northern-ireland) Apply to run projects backed by the European Structural and Investment Fund (ESIF). ESIF includes money from the European Social Fund (ESF), European Regional Development Fund (ERDF) and European Agricultural Fund for Rural Development (EAFRD).",
"target_stack": "live",
"taxons": [
"2894668d-0c21-491a-9069-a271e67f6025"
Expand Down
2 changes: 1 addition & 1 deletion lib/documents/schemas/export_health_certificates.json
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@
"parent": "03f78404-e87c-4c2a-954b-f6ee9403efb8",
"signup_content_id": "9a5260d2-07e7-45dc-a24a-791b02e4a9da",
"subscription_list_title_prefix": "Export health certificates",
"summary": "<p>Find the export health certificate (EHC) and supporting documents you need to export a live animal or animal product like food and germplasm. The latest versions of the certificates are always here.</p> <p>You must nominate an official vet or local authority inspector to sign the certificate. Find out more about <a href=\"https://www.gov.uk/guidance/get-an-export-health-certificate\">getting an export health certificate</a>.</p><p>If you cannot find the correct export health certificate, <a href=\"https://www.gov.uk/guidance/get-an-export-health-certificate#if-you-need-help\">contact the Animal and Plant Health Agency (APHA)</a>.</p>",
"summary": "Find the export health certificate (EHC) and supporting documents you need to export a live animal or animal product like food and germplasm. The latest versions of the certificates are always here. You must nominate an official vet or local authority inspector to sign the certificate. Find out more about [getting an export health certificate](https://www.gov.uk/guidance/get-an-export-health-certificate). If you cannot find the correct export health certificate, [contact the Animal and Plant Health Agency (APHA)](https://www.gov.uk/guidance/get-an-export-health-certificate#if-you-need-help)",
"target_stack": "live",
"topics": [
"keeping-farmed-animals/animal-welfare"
Expand Down
2 changes: 1 addition & 1 deletion lib/documents/schemas/farming_grants.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,6 @@
"show_summaries": true,
"signup_content_id": "2cd12e92-3b68-4cb1-bafe-fde6a7939afb",
"subscription_list_title_prefix": "Funding for land or farms",
"summary": "<p>Find out about grants and funding for farmers and land managers in England. We will add more grants and funding as we develop this tool.</p><div class=\"application-notice info-notice\"><p>You can search for actions you can get paid for as part of the Sustainable Farming Incentive (SFI). The tool does not confirm your eligibility. <a href=\"https://www.gov.uk/government/collections/sustainable-farming-incentive-guidance\">Read the SFI guidance to check if you're eligible and how you can apply.</a></p></div><p>Search by keyword, action name or code if you know it. Use the filters to search by land types or areas of interest.</p>",
"summary": "Find out about grants and funding for farmers and land managers in England. We will add more grants and funding as we develop this tool. You can search for actions you can get paid for as part of the Sustainable Farming Incentive (SFI). The tool does not confirm your eligibility. [Read the SFI guidance to check if you're eligible and how you can apply.](https://www.gov.uk/government/collections/sustainable-farming-incentive-guidance) Search by keyword, action name or code if you know it. Use the filters to search by land types or areas of interest.",
"target_stack": "live"
}
2 changes: 1 addition & 1 deletion lib/documents/schemas/international_development_funds.json
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@
"show_summaries": true,
"signup_content_id": "f1a4e5b2-c8b3-40f2-acde-75061a45184d",
"subscription_list_title_prefix": "International development funds",
"summary": "<p>The funding finder tool is to help potential applicants to view, sort and filter UK Official Development Assistance (ODA) funding opportunities, across all UK government departments.</p><p>Each funding call will include a high level overview and information on how to apply.</p>",
"summary": "The funding finder tool is to help potential applicants to view, sort and filter UK Official Development Assistance (ODA) funding opportunities, across all UK government departments. Each funding call will include a high level overview and information on how to apply.",
"target_stack": "live",
"taxons": [
"9fb30a53-70fb-4f1c-878b-0064b202d1ba"
Expand Down
2 changes: 1 addition & 1 deletion lib/documents/schemas/licence_transactions.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,6 @@
"aa750cdf-7925-429d-a2b3-0d9fa47d2c48"
],
"show_summaries": true,
"summary": "<p>You may need a licence, permit or certification for:</p><ul><li>some business activities</li><li>other activities, such as street parties</li></ul><div class='application-notice info-notice'><p>This may not include all the licences you need. It will be updated with more licences.</p></div>",
"summary": "You may need a licence, permit or certification for:-some business activities -other activities, such as street parties This may not include all the licences you need. It will be updated with more licences.",
"target_stack": "live"
}
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,6 @@
"23a24aa8-1711-42b6-bf6b-47af0f230295"
],
"show_summaries": false,
"summary": "<p>UK approved service stations for International Convention for the Safety of Life at Sea (SOLAS)-standard inflatable life-saving appliances (LSAs).</p><p>Vessel owners need to ensure that their LSA is serviced at an approved service station that:</p><ul><li>is authorised to service the particular product make or type</li><li>is accepted by the Maritime and Coastguard Agency (MCA) and complies with International Maritime Organization (IMO) Resolution A.761(18) to maintain proper servicing facilities</li><li>uses only properly trained personnel and has evidence of personnel authorisation certification</li></ul><p>See <a href=\"https://www.gov.uk/government/publications/mgn-548-mf-inflatable-solas-certificated-liferafts-lifejackets-marine-evacuation-systems-and-repair-of-inflated-rescue-boats\">MGN 548 (M+F) Inflatable SOLAS certificated liferafts, lifejackets, marine evacuation systems and repair of inflated rescue boats</a> for more information.</p>",
"summary": "UK approved service stations for International Convention for the Safety of Life at Sea (SOLAS)-standard inflatable life-saving appliances (LSAs). Vessel owners need to ensure that their LSA is serviced at an approved service station that:-is authorised to service the particular product make or type -is accepted by the Maritime and Coastguard Agency (MCA) and complies with International Maritime Organization (IMO) Resolution A.761(18) to maintain proper servicing facilities -uses only properly trained personnel and has evidence of personnel authorisation certification See [MGN 548 (M+F) Inflatable SOLAS certificated liferafts, lifejackets, marine evacuation systems and repair of inflated rescue boats](https://www.gov.uk/government/publications/mgn-548-mf-inflatable-solas-certificated-liferafts-lifejackets-marine-evacuation-systems-and-repair-of-inflated-rescue-boats) for more information.",
"target_stack": "live"
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@
"show_summaries": true,
"signup_content_id": "512a14c1-260a-4c4e-8de8-643eadf7905c",
"subscription_list_title_prefix": "UK Approved Recommendations for marine equipment",
"summary": "<p>Find recommendations on how to interpret and apply the Merchant Shipping (Marine Equipment) Regulations 2016 as amended.</p>",
"summary": "Find recommendations on how to interpret and apply the Merchant Shipping (Marine Equipment) Regulations 2016 as amended.",
"target_stack": "live"
}
2 changes: 1 addition & 1 deletion lib/documents/schemas/marine_notices.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,6 @@
],
"signup_content_id": "21985d9f-8c84-4fa1-915c-2807eaa37dff",
"subscription_list_title_prefix": "Marine notices",
"summary": "<p>Find marine notices issued by the Maritime and Coastguard Agency</p>",
"summary": "Find marine notices issued by the Maritime and Coastguard Agency",
"target_stack": "draft"
}
2 changes: 1 addition & 1 deletion lib/documents/schemas/protected_food_drink_names.json
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,6 @@
"show_summaries": true,
"signup_content_id": "cff7449e-4181-480f-93e4-91fecfb4c774",
"subscription_list_title_prefix": "Protected geographical food and drink names",
"summary": "<p>Find protected food and drink names in the official GB registers published by Defra. Find out more about the <a href=\"https://www.gov.uk/guidance/protected-geographical-food-and-drink-names-uk-gi-schemes\">UK’s protected food and drinks schemes</a>.</p>",
"summary": "Find protected food and drink names in the official GB registers published by Defra. Find out more about the [UK’s protected food and drinks schemes](https://www.gov.uk/guidance/protected-geographical-food-and-drink-names-uk-gi-schemes)",
"target_stack": "live"
}
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@
],
"signup_content_id": "fdcbada2-1ad4-4194-98dc-5f04a448316e",
"subscription_list_title_prefix": "Research for Development output",
"summary": "<p>Research outputs published before 2 September 2020 were published by the Department for International Development (DFID)</p>",
"summary": "Research outputs published before 2 September 2020 were published by the Department for International Development (DFID)",
"target_stack": "live",
"taxons": [
"9fb30a53-70fb-4f1c-878b-0064b202d1ba"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@
"show_summaries": true,
"signup_content_id": "8a6239e1-76cf-41a0-9295-0ae1182080d2",
"subscription_list_title_prefix": "Residential property tribunal decisions",
"summary": "<p>Find decisions on Residential Property Tribunal cases in England from December 2018 onwards.</p><p>If the decision was about leasehold and was made before December 2018, visit <a href=\"https://decisions.lease-advice.org/\" rel=\"external\">Lease Advice</a>. Other decisions made before December 2018 can be found on <a href=\"https://www.bailii.org/recent-decisions.html\" rel=\"external\">BAILII</a></p>",
"summary": "Find decisions on Residential Property Tribunal cases in England from December 2018 onwards. If the decision was about leasehold and was made before December 2018, visit [Lease Advice](https://decisions.lease-advice.org/). Other decisions made before December 2018 can be found on [BAILII](https://www.bailii.org/recent-decisions.html)",
"target_stack": "live",
"taxons": [
"357110bb-cbc5-4708-9711-1b26e6c63e86"
Expand Down
Loading

0 comments on commit 8bd0cce

Please sign in to comment.