Merged PR 489: updated dropdown search with translations
updated dropdown search with translations Related work items: #6268
This commit is contained in:
@@ -89,7 +89,12 @@ const DocumentDetails = (props) => {
|
||||
key={key}
|
||||
>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-!-padding-left-2">
|
||||
<Link href="/">
|
||||
<Link
|
||||
href={
|
||||
"/" +
|
||||
detailsObj.pinswg_isharedocumentreference
|
||||
}
|
||||
>
|
||||
<a>
|
||||
<span className="results-visually-hidden">
|
||||
{t(
|
||||
|
||||
@@ -64,7 +64,7 @@ const CaseSummary = (props) => {
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<h1 className="govuk-heading-xl govuk-!-margin-bottom-7">
|
||||
Reference:{" "}
|
||||
{t("case:summary-reference-label")}:{" "}
|
||||
{currentType == "searchResultsObj"
|
||||
? detailsObj.pinswg_name
|
||||
: casesObj.reference}
|
||||
|
||||
@@ -12,7 +12,7 @@ export default function Inspectorate() {
|
||||
<div className="card clear" id="inspectorate-card">
|
||||
<div className="card-body">
|
||||
<Image
|
||||
alt="Planning Inspectorate"
|
||||
alt={t("home:inspectorate-card-alt-text")}
|
||||
src="/assets/images/PINS_dual_logo_400.png"
|
||||
width="380px"
|
||||
height="58px"
|
||||
|
||||
@@ -27,10 +27,10 @@ export default function LoginSoon() {
|
||||
<br />
|
||||
<a
|
||||
target="_blank"
|
||||
href="https://gov.wales/planning-appeal-forms"
|
||||
href={t("home:login-comingsoon-forms-link")}
|
||||
rel="noreferrer"
|
||||
>
|
||||
https://gov.wales/planning-appeal-forms
|
||||
{t("home:login-comingsoon-forms-link")}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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)}
|
||||
>
|
||||
<option value="" disabled defaultValue>
|
||||
Select...
|
||||
{t("common:drop-down-select")}
|
||||
</option>
|
||||
{_.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"
|
||||
)}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
@@ -141,7 +155,7 @@ let AdvancedSearch = (props) => {
|
||||
//onChange={(e) => props.onChangeSelectAppealType(e)}
|
||||
>
|
||||
<option value="" disabled defaultValue>
|
||||
Select...
|
||||
{t("common:drop-down-select")}
|
||||
</option>
|
||||
{_.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"
|
||||
)}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
@@ -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"
|
||||
/>
|
||||
<Field
|
||||
@@ -395,7 +420,7 @@ let AdvancedSearch = (props) => {
|
||||
name="search"
|
||||
className="govuk-button"
|
||||
>
|
||||
Search
|
||||
{t("common:search-button")}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -223,7 +223,7 @@ const DNSSearchResults = (props) => {
|
||||
) : (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-two-thirds">
|
||||
<h3>There are no records</h3>
|
||||
<h3>{t("search:searchresults-no-records-label")}</h3>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -215,7 +215,9 @@ const SearchResults = (props) => {
|
||||
) : (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-two-thirds">
|
||||
<h3>There are no records</h3>
|
||||
<h3>
|
||||
{t("search:searchresults-no-records-label")}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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..."
|
||||
}
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
@@ -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",
|
||||
|
||||
@@ -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..."
|
||||
}
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user