added in welsh translations for crm values

This commit is contained in:
2021-09-21 10:16:27 +01:00
parent 461f7c4725
commit 597a0a91d1
11 changed files with 465 additions and 91 deletions
+62 -20
View File
@@ -5,6 +5,7 @@ import { setCurrentReference } from "../../store/currentView/action";
import { connect } from "react-redux";
import jsonpath from "jsonpath";
import _ from "lodash";
import transLookup from "../../data/lookuptranslations.json";
const SearchResults = (props) => {
const {
@@ -30,7 +31,8 @@ const SearchResults = (props) => {
{t("search:searchresults-count-label", {
count: searchResultsObj["@odata.count"].toString(),
})}
. You searched for <em>&quot;{searchString}&quot;</em>
. {t("search:searchresults-case-count-label")}{" "}
<em>&quot;{searchString}&quot;</em>
</p>
<dl className="govuk-summary-list govuk-!-margin-bottom-9 results">
<div className="govuk-summary-list__row results-headings">
@@ -76,7 +78,10 @@ const SearchResults = (props) => {
}}
>
<span className="results-visually-hidden">
Case Reference:
{t(
"search:searchresults-case-reference-label"
)}
:
</span>
{item.title}
</a>
@@ -84,7 +89,10 @@ const SearchResults = (props) => {
</dd>
<dd className="govuk-summary-list__value govuk-!-font-size-14">
<span className="results-visually-hidden">
Site Address:{" "}
{t(
"search:searchresults-site-address-label"
)}
:
</span>
{_.has(
detailsObj,
@@ -123,7 +131,10 @@ const SearchResults = (props) => {
</dd>
<dd className="govuk-summary-list__value govuk-!-font-size-14">
<span className="results-visually-hidden">
Appellant/Applicant:
{t(
"search:searchresults-applicant-label"
)}
:
</span>
{_.has(detailsObj, [
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
@@ -135,35 +146,66 @@ const SearchResults = (props) => {
</dd>
<dd className="govuk-summary-list__value govuk-!-font-size-14">
<span className="results-visually-hidden">
Authority:
{t(
"search:searchresults-authority-label"
)}
:
</span>
{_.has(detailsObj, [
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
])
? detailsObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
]
? router.locale == "cy"
? jsonpath.query(
transLookup,
'$..[?(@.value=="' +
detailsObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy'
)
: detailsObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] || "N/A"
: ""}
</dd>
<dd className="govuk-summary-list__value govuk-!-font-size-14">
<span className="results-visually-hidden">
Case Type:
{t(
"search:searchresults-case-type-label"
)}
:
</span>
{
item[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
]
}
{router.locale == "cy"
? jsonpath.query(
transLookup,
'$..[?(@.value=="' +
item[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy'
)
: item[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] || "N/A"}
</dd>
<dd className="govuk-summary-list__value govuk-!-font-size-14">
<span className="results-visually-hidden">
Status:
{t("search:searchresults-status-label")}
:
</span>
{
item[
"statuscode@OData.Community.Display.V1.FormattedValue"
]
}
{router.locale == "cy"
? jsonpath.query(
transLookup,
'$..[?(@.value=="' +
item[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy'
)
: item[
"statuscode@OData.Community.Display.V1.FormattedValue"
] || "N/A"}
</dd>
</div>
);