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
@@ -1,4 +1,3 @@
import { JSONPath as jsonpath } from "jsonpath-plus";
import useTranslation from "next-translate/useTranslation";
import Link from "next/link";
import { useRouter } from "next/router";
@@ -18,6 +17,7 @@ import {
setCurrentReference,
setCurrentView
} from "../../store/currentView/action";
import { resolveCrmDisplayValue } from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
const AwaitingSubmissionFromBlob = (props) => {
let { t } = useTranslation();
@@ -201,22 +201,14 @@ const AwaitingSubmissionFromBlob = (props) => {
</div>
<div className="cardModuleReference">
<b>{t("myportal:appeal-type-label")}:</b>{" "}
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
getFormCollectionByID(
showTopThreeArr[key]
.pinswg_appealcasetype
).value +
'")].value_cy',
json: transLookup,
eval: true
})
: getFormCollectionByID(
showTopThreeArr[key]
.pinswg_appealcasetype
).value || ""}
{resolveCrmDisplayValue({
value: getFormCollectionByID(
showTopThreeArr[key]
.pinswg_appealcasetype
).value,
locale,
translations: transLookup
})}
</div>
<div className="cardModuleReference">
<b>{t("myportal:case-address")}:</b>{" "}
@@ -302,20 +294,14 @@ const AwaitingSubmissionFromBlob = (props) => {
{router.locale == "cy" ? "ACLl" : "LPA"}
:
</b>
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
showTopThreeArr[key][
"pinswg_lpaname"
] +
'")].value_cy',
json: transLookup,
eval: true
})
: showTopThreeArr[key][
"pinswg_lpaname"
] || ""}
{resolveCrmDisplayValue({
value: showTopThreeArr[key][
"pinswg_lpaname"
],
locale,
translations: transLookup
})}
</div>
<div className="cardModuleReference">
<b>{t("myportal:date-raised")}:</b>