diff --git a/components/case/documents.js b/components/case/documents.js index 09cf7c27..ad128580 100644 --- a/components/case/documents.js +++ b/components/case/documents.js @@ -89,7 +89,12 @@ const DocumentDetails = (props) => { key={key} >
- + {t( diff --git a/components/case/summary.js b/components/case/summary.js index bfdaf26a..bd0bcd6a 100644 --- a/components/case/summary.js +++ b/components/case/summary.js @@ -64,7 +64,7 @@ const CaseSummary = (props) => {

- Reference:{" "} + {t("case:summary-reference-label")}:{" "} {currentType == "searchResultsObj" ? detailsObj.pinswg_name : casesObj.reference} diff --git a/components/homepage/inspectorate.js b/components/homepage/inspectorate.js index d980c2fd..82a3867b 100644 --- a/components/homepage/inspectorate.js +++ b/components/homepage/inspectorate.js @@ -12,7 +12,7 @@ export default function Inspectorate() { diff --git a/components/search/advancedsearch.js b/components/search/advancedsearch.js index fad65670..f68b80b9 100644 --- a/components/search/advancedsearch.js +++ b/components/search/advancedsearch.js @@ -7,6 +7,7 @@ import { useDispatch, useSelector, shallowEqual, connect } from "react-redux"; import jsonpath from "jsonpath"; import data from "../../data/collections.json"; import LoadingOverlay from "react-loading-overlay"; +import transLookup from "../../data/lookuptranslations.json"; let AdvancedSearch = (props) => { let { t } = useTranslation(); @@ -78,7 +79,7 @@ let AdvancedSearch = (props) => { //onChange={(e) => props.onChangeSelectLPA(e)} > {_.isEmpty(optionsObj) ? "" @@ -88,7 +89,20 @@ let AdvancedSearch = (props) => { key={key} value={optionsObj[key].accountid} > - {optionsObj[key].name} + {/* {optionsObj[key].name} */} + + {router.locale == "cy" + ? jsonpath.query( + transLookup, + '$..[?(@.value=="' + + optionsObj[key] + .name + + '")].value_cy' + ) + : optionsObj[key].name || + t( + "case:summary-no-date-entered-label" + )} ); })} @@ -141,7 +155,7 @@ let AdvancedSearch = (props) => { //onChange={(e) => props.onChangeSelectAppealType(e)} > {_.isEmpty(optionsObj) ? "" @@ -180,7 +194,18 @@ let AdvancedSearch = (props) => { optionsObj[key].value ) ? "" - : optionsObj[key].value} + : router.locale == "cy" + ? jsonpath.query( + transLookup, + '$..[?(@.value=="' + + optionsObj[key] + .value + + '")].value_cy' + ) + : optionsObj[key].value || + t( + "case:summary-no-date-entered-label" + )} ); })} @@ -293,7 +318,7 @@ let AdvancedSearch = (props) => { component={RenderAppealTypeList} optionsObj={appealOptionsObj} // validate={[required]} - label="Select an appeal type" + label={t("search:appealtype-label")} errormsg="Appeal type is required" /> { name="search" className="govuk-button" > - Search + {t("common:search-button")}

diff --git a/components/search/dnssearchresults.js b/components/search/dnssearchresults.js index d6e47e7d..62b7f277 100644 --- a/components/search/dnssearchresults.js +++ b/components/search/dnssearchresults.js @@ -223,7 +223,7 @@ const DNSSearchResults = (props) => { ) : (
-

There are no records

+

{t("search:searchresults-no-records-label")}

)} diff --git a/components/search/searchresults.js b/components/search/searchresults.js index 33ef3e27..49b8ba4d 100644 --- a/components/search/searchresults.js +++ b/components/search/searchresults.js @@ -215,7 +215,9 @@ const SearchResults = (props) => { ) : (
-

There are no records

+

+ {t("search:searchresults-no-records-label")} +

)} diff --git a/data/lookuptranslations.json b/data/lookuptranslations.json index 06ad0297..15f6fa3e 100644 --- a/data/lookuptranslations.json +++ b/data/lookuptranslations.json @@ -201,6 +201,11 @@ "value_cy": "Cyngor Bwrdeistref Sirol Blaenau Gwent", "pinswg_lpa": 0 }, + { + "value": "Bridgend CBC", + "value_cy": "Cyngor Bwrdeistref Sirol Pen-y-bont ar Ogwr", + "pinswg_lpa": 0 + }, { "value": "Bridgend County Borough Council", "value_cy": "Cyngor Bwrdeistref Sirol Pen-y-bont ar Ogwr", diff --git a/locales/cy/case.json b/locales/cy/case.json index 503fcbb6..0f8b1184 100644 --- a/locales/cy/case.json +++ b/locales/cy/case.json @@ -1,6 +1,7 @@ { "page-title": "Cyfeirnod", "case-card-title": "Reference: APP/B1415/W/20/3271702", + "summary-reference-label": "Cyfeirnod", "summary-applicant-label": "Apelydd/Ymgeisydd", "summary-agent-label": "Asiant", "summary-site-address-label": "Cyfeiriad y Safle", diff --git a/locales/cy/common.json b/locales/cy/common.json index 92af5164..d19421e8 100644 --- a/locales/cy/common.json +++ b/locales/cy/common.json @@ -9,6 +9,7 @@ "error-textbox": "Choose an option", "available-in": "English", "continue-button": "Parhewch", + "search-button": "Chwilio", "submit-and-start": "Cyflwyno a dechrau'r cwrs", "footer-terms-conditions-link": "Telerau ac amodau", "footer-privacy-link": "Rhybudd Preifatrwydd", @@ -37,5 +38,6 @@ "cookie-banner-list-item-2": "i wella'n gwefan drwy gasglu ac adrodd gwybodaeth ar sut yr ydych yn defnyddio'r safle", "cookie-banner-list-item-3": "i deilwra cyfathrebu", "cookie-banner-decline": "Rwy'n dirywio", - "cookie-banner-accept": "Derbyn cwcis" + "cookie-banner-accept": "Derbyn cwcis", + "drop-down-select": "Dewiswch..." } \ No newline at end of file diff --git a/locales/cy/home.json b/locales/cy/home.json index 516fcf8c..a27edd0c 100644 --- a/locales/cy/home.json +++ b/locales/cy/home.json @@ -2,6 +2,7 @@ "login-card-title-temp": "Croeso", "login-comingsoon-temp-1": "Mae’r wefan hon yn cael ei datblygu o hyd. Os hoffech gyflwyno apêl neu gais newydd, neu wneud sylwadau ar un sydd eisoes yn bodoli, cyflwynwch yr apêl, y cais neu’r sylwadau, ynghyd ag unrhyw ddogfennau cysylltiedig perthnasol, i ", "login-comingsoon-temp-2": "Gellir gofyn am ffurflenni apelio a ffurflenni cais trwy e-bost neu gellir eu lawrlwytho trwy ddilyn y ddolen isod. ", + "login-comingsoon-forms-link": "https://llyw.cymru/ffurflenni-apelio", "login-card-title": "Mewngofnodi i apelio yn erbyn penderfyniad cynllunio", "login-card-id-label": "Dynodydd Defnyddiwr (ID) Porth y Llywodraeth", "login-card-id-hint": "Gallai hyn fod hyd at 12 o gymeriadau.", @@ -23,6 +24,7 @@ "casescomment-card-paragraph-two": "O ran apeliadau Deiliaid Tai a Masnachol, ni all partïon â buddiant wneud sylwadau yn ystod y cam apêl. Bydd unrhyw sylwadau a wnaed yn ystod y cam ymgeisio’n cael eu darparu gan yr awdurdod cynllunio lleol a’u hystyried gan yr arolygydd.", "inspectorate-card-visit-label": "Ymweld Yr Arolygiaeth Gynllunio", "inspectorate-card-visit-link": "Hafan", + "inspectorate-card-alt-text": "Yr Arolygiaeth Gynllunio", "dns-card-title": "Datblygiadau o Arwyddocâd Cenedlaethol", "dns-card-paragraph": "Mae Datblygiad o Arwyddocâd Cenedlaethol (DAC) yn fath o gais cynllunio ar gyfer prosiect seilwaith mawr sydd o bwysigrwydd cenedlaethol yng Nghymru. Yn y fan hon, gallwch gael gwybod am geisiadau DAC arfaethedig. Rheolir y safle hwn gan yr Arolygiaeth Gynllunio.", "dns-card-button": "Gweld pob cais" diff --git a/locales/cy/search.json b/locales/cy/search.json index c6bc59a3..4929abd7 100644 --- a/locales/cy/search.json +++ b/locales/cy/search.json @@ -9,6 +9,7 @@ "postcode-label": "Cod Post", "lpa-label": "Awdurdod Cynllunio Lleol", "lpa-reference-label": "Cyfeirnod yr Awdurdod Cynllunio Lleol", + "appealtype-label": "Dewiswch fath o apêl", "case-type-label": "Math o Achos", "case-type-option-1": "--Dewiswch--", "case-type-option-2": "Unrhyw fath/Pob math", @@ -57,5 +58,6 @@ "searchresults-status-label": "Statws", "searchresults-watch-label": "Gwylio", "searchresults-search-button-label": "Mireinio'r chwiliad", - "searchresults-new-search-button-label": "Chwiliad newydd" + "searchresults-new-search-button-label": "Chwiliad newydd", + "searchresults-no-records-label": "Nid oes unrhyw gofnodion" } \ No newline at end of file diff --git a/locales/en/case.json b/locales/en/case.json index 2f447cc6..82e5a216 100644 --- a/locales/en/case.json +++ b/locales/en/case.json @@ -1,6 +1,7 @@ { "page-title": "Reference", "case-card-title": "Reference: APP/B1415/W/20/3271702", + "summary-reference-label": "Reference", "summary-applicant-label": "Appellant/Applicant", "summary-agent-label": "Agent", "summary-site-address-label": "Site Address", diff --git a/locales/en/common.json b/locales/en/common.json index a7921911..ab29b7bd 100644 --- a/locales/en/common.json +++ b/locales/en/common.json @@ -9,6 +9,7 @@ "error-textbox": "Choose an option", "available-in": "Cymraeg", "continue-button": "Continue", + "search-button": "Search", "submit-and-start": "Submit and start course", "footer-terms-conditions-link": "Terms and conditions", "footer-privacy-link": "Privacy Notice", @@ -37,5 +38,6 @@ "cookie-banner-list-item-2": "improve our website by collecting and reporting information on how you use it", "cookie-banner-list-item-3": "tailor communications", "cookie-banner-decline": "I decline", - "cookie-banner-accept": "Accept cookies" + "cookie-banner-accept": "Accept cookies", + "drop-down-select": "Select..." } \ No newline at end of file diff --git a/locales/en/home.json b/locales/en/home.json index 394217e9..6bbd5f83 100644 --- a/locales/en/home.json +++ b/locales/en/home.json @@ -2,6 +2,7 @@ "login-card-title-temp": "Welcome", "login-comingsoon-temp-1": "This website is still in development, if you wish to submit a new appeal or application please submit it, along with any relevant associated documentation, to ", "login-comingsoon-temp-2": "Appeal and application forms can be requested by e-mail or downloaded following the below link.", + "login-comingsoon-forms-link": "https://gov.wales/planning-appeal-forms", "login-card-title": "Sign in to appeal a planning decision", "login-card-id-label": "Government Gateway user ID", "login-card-id-hint": "This could be up to 12 characters.", @@ -23,6 +24,7 @@ "casescomment-card-paragraph-two": "For Householder and Commercial appeals, interested parties are unable to make representations at appeal stage. Any representations made at application stage will be provided by the local planning authority and considered by the inspector.", "inspectorate-card-visit-label": "Visit the Planning Inspectorate", "inspectorate-card-visit-link": "Home", + "inspectorate-card-alt-text": "The Planning Inspectorate", "dns-card-title": "Developments of National Significance", "dns-card-paragraph": "A Development of National Significance (DNS) is a type of planning application for a large infrastructure project of national importance in Wales. Here you can find out about proposed DNS applications. This site is managed by the Planning Inspectorate.", "dns-card-button": "View all applications" diff --git a/locales/en/search.json b/locales/en/search.json index 0558704b..ade4a9e0 100644 --- a/locales/en/search.json +++ b/locales/en/search.json @@ -9,6 +9,7 @@ "postcode-label": "Postcode", "lpa-label": "Local Planning Authority", "lpa-reference-label": "LPA reference number", + "appealtype-label": "Select an appeal type", "case-type-label": "Case type", "case-type-option-1": "-- Select --", "case-type-option-2": "Any/All", @@ -57,5 +58,6 @@ "searchresults-status-label": "Status", "searchresults-watch-label": "Watch", "searchresults-search-button-label": "Refine Search", - "searchresults-new-search-button-label": "New Search" + "searchresults-new-search-button-label": "New Search", + "searchresults-no-records-label": "There are no records" } \ No newline at end of file