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
+24 -42
View File
@@ -22,6 +22,7 @@ import {
deleteWatchedCases,
getWatchedCasesProxy
} from "../../actions/services/portalService";
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
import {
setCurrentPage,
setCurrentReference
@@ -394,21 +395,14 @@ const DNSSearchResults = (props) => {
});
detailsObj = detailsObj[0];
var appType =
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";
var appType = resolveCrmDisplayValue({
value: item[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
],
locale: router.locale,
translations: transLookup,
fallbackValue: "N/A"
});
appType =
appType ==
@@ -609,20 +603,14 @@ const DNSSearchResults = (props) => {
detailsObj,
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
)
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
? resolveCrmDisplayValue({
value: detailsObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] || "N/A"
],
locale: router.locale,
translations: transLookup,
fallbackValue: "N/A"
})
: ""}
</dd>
<dd className="govuk-summary-list__value govuk-!-font-size-16">
@@ -632,20 +620,14 @@ const DNSSearchResults = (props) => {
)}
:
</span>
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
item[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true
})
: item[
"statuscode@OData.Community.Display.V1.FormattedValue"
] || "N/A"}
{resolveCrmDisplayValue({
value: item[
"statuscode@OData.Community.Display.V1.FormattedValue"
],
locale: router.locale,
translations: transLookup,
fallbackValue: "N/A"
})}
</dd>
<dd className="govuk-summary-list__value govuk-!-font-size-16">
<span className="results-visually-hidden">