Merged PR 2420: added welsh translations of api endpoints
added welsh translations of api endpoints Related work items: #23879
This commit is contained in:
@@ -44,6 +44,7 @@ const Case = (props) => {
|
||||
showLoginCheck={props.showLoginCheck}
|
||||
eventsObj={props.eventsObj}
|
||||
mediaObj={props.mediaObj}
|
||||
mapTarget={props.mapTarget}
|
||||
/>
|
||||
{showRepresentations == true && (
|
||||
<RepresentationList
|
||||
|
||||
@@ -66,7 +66,7 @@ import CaseNoticeBanner from "./caseNoticeBanner";
|
||||
import WatchModal from "./watchmodal";
|
||||
import EIADetails from "./eia";
|
||||
|
||||
import GoogleMapComponent from "../mapping";
|
||||
import MapComponent from "../mapping";
|
||||
import OSPoint from "ospoint";
|
||||
|
||||
const CaseSummary = (props) => {
|
||||
@@ -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%"
|
||||
}}
|
||||
>
|
||||
<GoogleMapComponent
|
||||
<MapComponent
|
||||
center={center}
|
||||
zoom={zoom}
|
||||
locale={router.locale}
|
||||
mapTarget={mapTarget}
|
||||
/>
|
||||
{/* <OSMapComponent center={center} zoom={zoom} /> */}
|
||||
</div>
|
||||
|
||||
@@ -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%"
|
||||
}}
|
||||
>
|
||||
<GoogleMapComponent
|
||||
center={center}
|
||||
zoom={zoom}
|
||||
/>
|
||||
{/* <OSMapComponent center={center} zoom={zoom} /> */}
|
||||
<MapComponent center={center} zoom={zoom} />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -429,7 +429,8 @@ const DNSSearchResults = (props) => {
|
||||
href={
|
||||
router.locale == "cy"
|
||||
? myportal == true
|
||||
? "/fymhorth/dns"
|
||||
? "/fymhorth/dns/" +
|
||||
item.ticketnumber
|
||||
: "/dns/" +
|
||||
item.ticketnumber
|
||||
: myportal == true
|
||||
@@ -913,7 +914,7 @@ const DNSSearchResults = (props) => {
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="map-container map-container--expanded">
|
||||
<iframe
|
||||
src={`https://datamap.gov.wales/maps/${mapTarget}/embed?center=-3.6553189192727347,52.214962933659415&zoom=2#/`}
|
||||
src={`https://${locale === "cy" ? "mapdata.llyw.cymru" : "datamap.gov.wales"}/maps/${mapTarget}/embed?center=-3.6553189192727347,52.214962933659415&zoom=2#/`}
|
||||
width="100%"
|
||||
height="600"
|
||||
frameBorder="0"
|
||||
@@ -924,7 +925,7 @@ const DNSSearchResults = (props) => {
|
||||
className="govuk-link map-expand-link"
|
||||
onClick={() => setIsMapExpanded(false)}
|
||||
>
|
||||
Reduce map
|
||||
{t("dnsApplications:reduce-map-link")}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -992,7 +993,7 @@ const DNSSearchResults = (props) => {
|
||||
<div className="govuk-grid-column-one-half">
|
||||
<div className="map-container">
|
||||
<iframe
|
||||
src={`https://datamap.gov.wales/maps/${mapTarget}/embed?center=-3.6553189192727347,52.214962933659415&zoom=2#/`}
|
||||
src={`https://${locale === "cy" ? "mapdata.llyw.cymru" : "datamap.gov.wales"}/maps/${mapTarget}/embed?center=-3.6553189192727347,52.214962933659415&zoom=2#/`}
|
||||
width="100%"
|
||||
height="500"
|
||||
frameBorder="0"
|
||||
@@ -1005,7 +1006,7 @@ const DNSSearchResults = (props) => {
|
||||
className="govuk-link map-expand-link mapSizeButton"
|
||||
onClick={() => setIsMapExpanded(true)}
|
||||
>
|
||||
Enlarge map
|
||||
{t("dnsApplications:enlarge-map-link")}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user