Merged PR 2420: added welsh translations of api endpoints

added welsh translations of api endpoints

Related work items: #23879
This commit is contained in:
Robert Bond
2026-06-23 10:38:24 +00:00
parent d7bb1acb10
commit 6d0bc35612
13 changed files with 171 additions and 119 deletions
+7 -35
View File
@@ -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 (
// <GoogleMapReact
// options={function (maps) {
// return {
// overviewMapControl: true,
// mapTypeControl: true,
// };
// }}
// bootstrapURLKeys={{
// key: "AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo",
// }}
// defaultCenter={center}
// defaultZoom={zoom}
// yesIWantToUseGoogleMapApiInternals
// onGoogleApiLoaded={({ map, maps }) => ModelsMap(map, maps)}
// ></GoogleMapReact>
<>
{" "}
<div className="govuk-grid-row">
<div className="govuk-grid-column-full">
<a
@@ -62,21 +39,16 @@ const GoogleMapComponent = (props) => {
className="govuk-link govuk-link--no-underline govuk-!-font-size-14 "
target="_blank"
>
See this map on Datamap Wales
{locale === "cy"
? "Gweler y map hwn ar Datamap Cymru"
: "See this map on Datamap Wales "}
</a>
</div>
</div>
<div className="govuk-grid-row">
<div className="govuk-grid-column-full">
<iframe
src={
"https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
props.center.lng +
"," +
props.center.lat +
"&zoom=7#/"
}
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
src={`https://${locale === "cy" ? "mapdata.llyw.cymru" : "datamap.gov.wales"}/maps/${mapTarget}/embed?center=${center.lng},${center.lat}&zoom=7#/`}
width={"100%"}
style={{ maxHeight: "400px" }}
height={"500px"}
@@ -88,4 +60,4 @@ const GoogleMapComponent = (props) => {
);
};
export default GoogleMapComponent;
export default MapComponent;