From 6d0bc3561294a91b984ec9f42d63fff3f339547f Mon Sep 17 00:00:00 2001 From: Robert Bond Date: Tue, 23 Jun 2026 10:38:24 +0000 Subject: [PATCH] Merged PR 2420: added welsh translations of api endpoints added welsh translations of api endpoints Related work items: #23879 --- components/case.js | 1 + components/case/summary.js | 9 +- components/case/summaryTypes/pinswg_dnsid.js | 8 +- .../case/summaryTypes/pinswg_sipscase.js | 2 +- components/mapping/index.js | 42 ++----- components/search/dnssearchresults.js | 11 +- locales/cy/dnsApplications.json | 4 +- locales/en/dnsApplications.json | 4 +- middleware.js | 14 +-- next.config.js | 114 +++++++++--------- pages/api/endpoint/getdnscoords_api.js | 72 ++++++++++- .../api/endpoint/getwatchedcasesproxy_api.js | 2 +- pages/myportal/dns/[developmentName].js | 7 +- 13 files changed, 171 insertions(+), 119 deletions(-) diff --git a/components/case.js b/components/case.js index c47b2f52..04eff767 100644 --- a/components/case.js +++ b/components/case.js @@ -44,6 +44,7 @@ const Case = (props) => { showLoginCheck={props.showLoginCheck} eventsObj={props.eventsObj} mediaObj={props.mediaObj} + mapTarget={props.mapTarget} /> {showRepresentations == true && ( { @@ -95,7 +95,8 @@ const CaseSummary = (props) => { currentView, messagesObj, docsOffline, - ticketnumber + ticketnumber, + mapTarget } = props; const showLoginCheck = @@ -1533,9 +1534,11 @@ const CaseSummary = (props) => { width: "100%" }} > - {/* */} diff --git a/components/case/summaryTypes/pinswg_dnsid.js b/components/case/summaryTypes/pinswg_dnsid.js index 00708a03..a316d657 100644 --- a/components/case/summaryTypes/pinswg_dnsid.js +++ b/components/case/summaryTypes/pinswg_dnsid.js @@ -7,7 +7,7 @@ import SummaryCard from "../summary/components/SummaryCard"; import SummaryRow from "../summary/components/SummaryRow"; import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue"; -import GoogleMapComponent from "../../mapping/"; +import MapComponent from "../../mapping/"; import OSPoint from "ospoint"; import { getBilingualText } from "../summary/utils/helpers"; @@ -71,11 +71,7 @@ const Pinswg_dnsid = (props) => { width: "100%" }} > - - {/* */} + )} diff --git a/components/case/summaryTypes/pinswg_sipscase.js b/components/case/summaryTypes/pinswg_sipscase.js index 22095153..de7df669 100644 --- a/components/case/summaryTypes/pinswg_sipscase.js +++ b/components/case/summaryTypes/pinswg_sipscase.js @@ -7,7 +7,7 @@ import SummaryCard from "../summary/components/SummaryCard"; import SummaryRow from "../summary/components/SummaryRow"; import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue"; -import GoogleMapComponent from "../../mapping"; +import MapComponent from "../../mapping"; import OSPoint from "ospoint"; diff --git a/components/mapping/index.js b/components/mapping/index.js index f4440f08..5ce168e0 100644 --- a/components/mapping/index.js +++ b/components/mapping/index.js @@ -1,7 +1,7 @@ import { he } from "date-fns/locale"; import GoogleMapReact from "google-map-react"; -const GoogleMapComponent = (props) => { - const { center, zoom } = props; +const MapComponent = (props) => { + const { center, zoom, locale, mapTarget } = props; let data = [center]; @@ -23,31 +23,8 @@ const GoogleMapComponent = (props) => { } }; - // console.log( - // "https://datamap.gov.wales/maps/pedw-dev/embed?center=" + - // props.center.lng + - // "," + - // props.center.lat + - // "&zoom=12#/" - // ); return ( - // ModelsMap(map, maps)} - // > <> - {" "}