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
+15 -29
View File
@@ -1,4 +1,3 @@
import { JSONPath as jsonpath } from "jsonpath-plus";
import _ from "lodash";
import useTranslation from "next-translate/useTranslation";
import Link from "next/link";
@@ -33,6 +32,7 @@ import { planningappeals78_pdf } from "../../components/pdftemplates/planningapp
import { other_pdf } from "../../components/pdftemplates/other_pdf";
import { PDFDownloadLink, pdf } from "@react-pdf/renderer";
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
const TopThree = (props) => {
let { t } = useTranslation();
@@ -406,20 +406,13 @@ const TopThree = (props) => {
</div>
<div className="cardModuleReference">
<b>{t("myportal:appeal-type-label")}:</b>{" "}
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
showTopThreeArr[key][
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true
})
: showTopThreeArr[key][
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] || ""}
{resolveCrmDisplayValue({
value: showTopThreeArr[key][
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
],
locale,
translations: transLookup
})}
</div>
{/* )} */}
{/* {topThreeType != "awaitingSubmission" ? ( */}
@@ -484,20 +477,13 @@ const TopThree = (props) => {
)}
<div className="cardModuleReference">
<b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
showTopThreeArr[key][
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true
})
: showTopThreeArr[key][
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] || ""}
{resolveCrmDisplayValue({
value: showTopThreeArr[key][
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
],
locale,
translations: transLookup
})}
</div>
{topThreeType == "awaitingSubmission" ? (
<div className="carModuleAddress">