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
+13 -26
View File
@@ -14,6 +14,7 @@ import Html from "react-pdf-html";
import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
import transLookup from "../../data/lookuptranslations.json";
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
export const AppealRow_pdf = (props) => {
let { t } = useTranslation();
@@ -435,32 +436,18 @@ export const AppealRow_pdf = (props) => {
)}
</Text>
<Text style={styles.questionAnswer}>
{locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
getPickListLabel(
props.pickListData,
datafieldname[0]
.value,
props.props[
datafieldname[0]
.value
]
) +
'")].value_cy',
json: transLookup,
eval: true
})
: getPickListLabel(
props.pickListData,
datafieldname[0]
.value,
props.props[
datafieldname[0]
.value
]
)}
{resolveCrmDisplayValue({
value: getPickListLabel(
props.pickListData,
datafieldname[0].value,
props.props[
datafieldname[0]
.value
]
),
locale,
translations: transLookup
})}
</Text>
</View>
);
@@ -22,6 +22,7 @@ import transLookupEN from "../../locales/en/newappeal.json";
import transLookup from "../../data/lookuptranslations.json";
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
import { JSONPath as jsonpath } from "jsonpath-plus";
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
const getTrans = (locale, key) => {
let jsonQuery = `$.${key}`;
@@ -666,22 +667,12 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
)}
</Text>
<Text style={styles.questionAnswer}>
{/* {values.caseObj.pinswg_lpaname ||
values.caseObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
]} */}
{locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
values.caseObj
.pinswg_lpaname +
'")].value_cy',
json: transLookup,
eval: true
})
: values.caseObj.pinswg_lpaname}
{resolveCrmDisplayValue({
value: values.caseObj
.pinswg_lpaname,
locale,
translations: transLookup
})}
</Text>
</View>
{/* <View