Merged PR 2449: language helper

Related work items: #23754
This commit is contained in:
Robert Bond
2026-07-01 11:29:15 +00:00
parent 49aa258fd9
commit e864049bec
63 changed files with 4008 additions and 6094 deletions
+33 -55
View File
@@ -35,6 +35,7 @@ import {
deleteWatchedCases,
getWatchedCasesProxy
} from "../../actions/services/portalService";
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
import { sendGAEvent } from "@next/third-parties/google";
import RepsOnResults from "./repsonresults";
@@ -613,20 +614,14 @@ const SearchResults = (props) => {
item,
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
)
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
item[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true
})
: item[
? resolveCrmDisplayValue({
value: item[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] || "N/A"
],
locale: router.locale,
translations: transLookup,
fallbackValue: "N/A"
})
: ""}
{item?.pinswg_lpareference && (
<>
@@ -649,39 +644,28 @@ const SearchResults = (props) => {
)}
:
</span>
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
item[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true
})
: item[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] || "N/A"}
{resolveCrmDisplayValue({
value: item[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
],
locale: router.locale,
translations: transLookup,
fallbackValue: "N/A"
})}
{detailsObj?.pinswg_specialistcaseprocess && (
<>
<br /> <br />
<span>
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
] || "N/A"}
{resolveCrmDisplayValue({
value: detailsObj[
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
],
locale: router.locale,
translations:
transLookup,
fallbackValue: "N/A"
})}
</span>
</>
)}
@@ -694,20 +678,14 @@ const SearchResults = (props) => {
:
</span>
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
item[
"statuscode@OData.Community.Display.V1.FormattedValue"
].trim() +
'")].value_cy',
json: transLookup,
eval: true
})
: item[
"statuscode@OData.Community.Display.V1.FormattedValue"
] || "N/A"}
{resolveCrmDisplayValue({
value: item[
"statuscode@OData.Community.Display.V1.FormattedValue"
]?.trim(),
locale: router.locale,
translations: transLookup,
fallbackValue: "N/A"
})}
</dd>
{myportal == true && (
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-summary-list__action">