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
+7 -8
View File
@@ -24,6 +24,7 @@ import {
selectRowFieldType,
selectRowLabelDescriptions
} from "../../lib/newappeal/formDerivation";
import { resolveCrmDisplayValue } from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
let BuildCheckRow = (props) => {
let { t } = useTranslation();
@@ -74,14 +75,12 @@ let BuildCheckRow = (props) => {
eval: true
});
let labelTrans =
router.locale == "cy"
? jsonpath({
path: '$..[?(@ && @.value=="' + label + '")].value_cy',
json: formObj,
eval: true
})
: label;
let labelTrans = resolveCrmDisplayValue({
value: label,
locale,
translations: formObj
});
return labelTrans;
};