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
+6 -8
View File
@@ -32,6 +32,7 @@ import DocsOfflineNotice from "./buildCheckSection/DocsOfflineNotice";
import FinalisingStatePanel from "./buildCheckSection/FinalisingStatePanel";
import SectionReviewList from "./buildCheckSection/SectionReviewList";
import SubmitActionsPanel from "./buildCheckSection/SubmitActionsPanel";
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
let BuildCheckSection = (props) => {
useEffect(() => {
@@ -144,14 +145,11 @@ let BuildCheckSection = (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;
};