Merged PR 2426: added var to summary map and welsh translatioins
added var to summary map and welsh translatioins Related work items: #23879
This commit is contained in:
@@ -197,21 +197,23 @@ const Pinswg_dnsid = (props) => {
|
||||
"case:summary-procedure-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
detailsObj.pinswg_choiceofprocedure !==
|
||||
null
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
}
|
||||
@@ -320,21 +322,22 @@ const Pinswg_dnsid = (props) => {
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
{detailsObj.pinswg_decision !== null
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ const Pinswg_sipscase = (props) => {
|
||||
|
||||
{projectTypes.length > 0 && (
|
||||
<SummaryRow
|
||||
label={"Project Type"}
|
||||
label={t("case:project-type-label")}
|
||||
value={
|
||||
<>
|
||||
{projectTypes.map(
|
||||
@@ -225,19 +225,21 @@ const Pinswg_sipscase = (props) => {
|
||||
"case:summary-procedure-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
detailsObj.pinswg_choiceofprocedure !==
|
||||
null
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
}
|
||||
@@ -245,19 +247,21 @@ const Pinswg_sipscase = (props) => {
|
||||
<SummaryRow
|
||||
label={"ES Submitted"}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_essubmitted@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_essubmitted@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
detailsObj.pinswg_essubmitted !==
|
||||
null
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_essubmitted@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_essubmitted@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
}
|
||||
@@ -267,19 +271,21 @@ const Pinswg_sipscase = (props) => {
|
||||
"Deemed Marine License Applied for"
|
||||
}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_deemedmarinelicenseappliedfor@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_deemedmarinelicenseappliedfor@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
detailsObj.pinswg_deemedmarinelicenseappliedfor !==
|
||||
null
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_deemedmarinelicenseappliedfor@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_deemedmarinelicenseappliedfor@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
}
|
||||
@@ -394,19 +400,20 @@ const Pinswg_sipscase = (props) => {
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
{detailsObj.pinswg_decision !== null
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)}
|
||||
|
||||
|
||||
@@ -919,5 +919,141 @@
|
||||
"value": "Refused planning permission for the development",
|
||||
"value_cy": "Wedi gwrthod caniatâd cynllunio ar gyfer y datblygiad"
|
||||
}
|
||||
],
|
||||
"common": [
|
||||
{
|
||||
"value": "Yes",
|
||||
"value_cy": "Ie"
|
||||
},
|
||||
{
|
||||
"value": "No",
|
||||
"value_cy": "Na"
|
||||
}
|
||||
],
|
||||
"projecTypes": [
|
||||
{
|
||||
"value": "Airport",
|
||||
"value_cy": "Maes Awyr"
|
||||
},
|
||||
{
|
||||
"value": "Dams and Reservoirs",
|
||||
"value_cy": "Argaeau a Chronfeydd Dŵr"
|
||||
},
|
||||
{
|
||||
"value": "Electricity infrastructure – installation of an electric line above ground associated with a generating station",
|
||||
"value_cy": "Seilwaith trydan – gosod llinell drydan uwchben y ddaear sy'n gysylltiedig â gorsaf gynhyrchu"
|
||||
},
|
||||
{
|
||||
"value": "Electricity infrastructure - Installation of an electric line, other than above ground associated with a generating station",
|
||||
"value_cy": "Seilwaith trydan – gosod llinell drydan, heblaw un uwchben y ddaear sy'n gysylltiedig â gorsaf gynhyrchu"
|
||||
},
|
||||
{
|
||||
"value": "Electricity infrastructure – marine other",
|
||||
"value_cy": "Seilwaith trydan – morol arall"
|
||||
},
|
||||
{
|
||||
"value": "Electricity infrastructure – marine solar",
|
||||
"value_cy": "Seilwaith trydan – ynni solar morol"
|
||||
},
|
||||
{
|
||||
"value": "Electricity infrastructure – marine tidal",
|
||||
"value_cy": "Seilwaith trydan – ynni llanw morol"
|
||||
},
|
||||
{
|
||||
"value": "Electricity infrastructure – marine wind",
|
||||
"value_cy": "Seilwaith trydan – ynni gwynt morol"
|
||||
},
|
||||
{
|
||||
"value": "Electricity infrastructure – onshore energy from waste",
|
||||
"value_cy": "Seilwaith trydan – ynni o wastraff ar y tir"
|
||||
},
|
||||
{
|
||||
"value": "Electricity infrastructure – onshore other",
|
||||
"value_cy": "Seilwaith trydan – ar y tir arall"
|
||||
},
|
||||
{
|
||||
"value": "Electricity infrastructure – onshore solar",
|
||||
"value_cy": "Seilwaith trydan – ynni solar ar y tir"
|
||||
},
|
||||
{
|
||||
"value": "Electricity infrastructure – onshore wind",
|
||||
"value_cy": "Seilwaith trydan – ynni gwynt ar y tir"
|
||||
},
|
||||
{
|
||||
"value": "Energy Storage",
|
||||
"value_cy": "Storio Ynni"
|
||||
},
|
||||
{
|
||||
"value": "Gas Reception Facilities",
|
||||
"value_cy": "Cyfleusterau Derbyn Nwy"
|
||||
},
|
||||
{
|
||||
"value": "Harbour facilities",
|
||||
"value_cy": "Cyfleusterau Harbwr"
|
||||
},
|
||||
{
|
||||
"value": "Hazardous Waste Facilities",
|
||||
"value_cy": "Cyfleusterau Gwastraff Peryglus"
|
||||
},
|
||||
{
|
||||
"value": "Highway",
|
||||
"value_cy": "Priffordd"
|
||||
},
|
||||
{
|
||||
"value": "Hydraulic Fracturing for Oil and Gas and Coal Gasification",
|
||||
"value_cy": "Hollti Hydrolig ar gyfer Olew a Nwy a Nwyeiddio Glo"
|
||||
},
|
||||
{
|
||||
"value": "Hydraulic fracturing for oil and gas and coal gasification",
|
||||
"value_cy": "Hollti hydrolig ar gyfer olew a nwy a nwyeiddio glo"
|
||||
},
|
||||
{
|
||||
"value": "Hydrogen production",
|
||||
"value_cy": "Cynhyrchu Hydrogen"
|
||||
},
|
||||
{
|
||||
"value": "Liquefied Natural Gas Facilities",
|
||||
"value_cy": "Cyfleusterau Nwy Naturiol Hylifedig"
|
||||
},
|
||||
{
|
||||
"value": "Non gas transport pipeline",
|
||||
"value_cy": "Piblinell gludo nad yw ar gyfer nwy"
|
||||
},
|
||||
{
|
||||
"value": "Open Cast Coal Mining",
|
||||
"value_cy": "Cloddio Glo Brig"
|
||||
},
|
||||
{
|
||||
"value": "Open cast coal mining",
|
||||
"value_cy": "Cloddio glo brig"
|
||||
},
|
||||
{
|
||||
"value": "Pipeline by Gas transporters",
|
||||
"value_cy": "Piblinell gan gludwyr nwy"
|
||||
},
|
||||
{
|
||||
"value": "Radioactive Waste Geological Disposal Facilities",
|
||||
"value_cy": "Cyfleusterau Gwaredu Daearegol Gwastraff Ymbelydrol"
|
||||
},
|
||||
{
|
||||
"value": "Rail Freight Interchange",
|
||||
"value_cy": "Cyfnewidfa Cludo Nwyddau Rheilffordd"
|
||||
},
|
||||
{
|
||||
"value": "Railway",
|
||||
"value_cy": "Rheilffordd"
|
||||
},
|
||||
{
|
||||
"value": "The construction of flood defence works",
|
||||
"value_cy": "Adeiladu gwaith amddiffyn rhag llifogydd"
|
||||
},
|
||||
{
|
||||
"value": "Transfer of Water Resources",
|
||||
"value_cy": "Trosglwyddo Adnoddau Dŵr"
|
||||
},
|
||||
{
|
||||
"value": "Waste Water Treatment Plants",
|
||||
"value_cy": "Gweithfeydd Trin Dŵr Gwastraff"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -151,5 +151,6 @@
|
||||
"live-event-link": "Gwylio'r ffrydio byw",
|
||||
"status-title": "Statws",
|
||||
"status-show-all-label": "Dangoswch bob cam",
|
||||
"status-hide-all-label": "Cuddio pob cam"
|
||||
"status-hide-all-label": "Cuddio pob cam",
|
||||
"project-type-label": "Math o brosiect"
|
||||
}
|
||||
@@ -152,5 +152,6 @@
|
||||
"live-event-link": "Watch live stream",
|
||||
"status-title": "Status",
|
||||
"status-show-all-label": "Show all stages",
|
||||
"status-hide-all-label": "Hide all stages"
|
||||
"status-hide-all-label": "Hide all stages",
|
||||
"project-type-label": "Project type"
|
||||
}
|
||||
@@ -38,7 +38,8 @@ const CaseHome = (props) => {
|
||||
pages,
|
||||
setSearchResults,
|
||||
setSearchDetails,
|
||||
searchResultsObj
|
||||
searchResultsObj,
|
||||
mapTarget
|
||||
} = props;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
@@ -113,6 +114,7 @@ const CaseHome = (props) => {
|
||||
showMaps={props.showMaps}
|
||||
eventsObj={props.searchResultsObj.eventsObj}
|
||||
mediaObj={props.searchResultsObj.mediaObj}
|
||||
mapTarget={props.mapTarget}
|
||||
/>
|
||||
</div>
|
||||
<Footer
|
||||
@@ -245,7 +247,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
),
|
||||
showFilteredDocs: process.env.SHOWFILTERDOCS || false,
|
||||
showMaps: process.env.SHOWMAPS,
|
||||
showLoginCheck: process.env.SHOWLOGIN || false
|
||||
showLoginCheck: process.env.SHOWLOGIN || false,
|
||||
mapTarget: process.env.MAP_TARGET || "pedw-dev"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ import ServiceBanner from "../../../components/myportal/servicebanner";
|
||||
import TimeOut from "../../../components/timeout";
|
||||
|
||||
const CaseHome = (props) => {
|
||||
const { footerLinks } = props;
|
||||
const { footerLinks, mapTarget } = props;
|
||||
useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
@@ -125,6 +125,7 @@ const CaseHome = (props) => {
|
||||
showMaps={props.showMaps}
|
||||
eventsObj={props.searchResultsObj.eventsObj}
|
||||
mediaObj={props.searchResultsObj.mediaObj}
|
||||
mapTarget={props.mapTarget}
|
||||
/>
|
||||
</div>
|
||||
<Footer
|
||||
@@ -403,7 +404,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
searchResultsObj.value[0].incidentid
|
||||
),
|
||||
showFilteredDocs: process.env.SHOWFILTERDOCS || false,
|
||||
showMaps: process.env.SHOWMAPS
|
||||
showMaps: process.env.SHOWMAPS,
|
||||
mapTarget: process.env.MAP_TARGET || "pedw-dev"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user