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
+22 -43
View File
@@ -21,6 +21,8 @@ import { getNewDocumentsPaged } from "../../../actions/services/adminService";
import { setCurrentPage } from "../../../store/currentView/action";
import { setDocumentDetails } from "../../../store/searchOutput/action";
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
const getDocumentTypes = [
{
"Value": 846040009,
@@ -397,19 +399,11 @@ const DocumentsTab = (props) => {
className="govuk-label-s govuk-checkboxes__label"
htmlFor={item.Value}
>
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
item.Label +
'")].value_cy',
json: transLookup,
eval: true
})
: item.Label ||
t(
"case:summary-no-date-entered-label"
)}{" "}
{resolveCrmDisplayValue({
value: item.Label,
locale,
translations: transLookup
})}
</label>
</div>
);
@@ -470,19 +464,11 @@ const DocumentsTab = (props) => {
className="govuk-label-s govuk-checkboxes__label"
htmlFor={"origin_" + item.Value}
>
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
item.Label +
'")].value_cy',
json: transLookup,
eval: true
})
: item.Label ||
t(
"case:summary-no-date-entered-label"
)}{" "}
{resolveCrmDisplayValue({
value: item.Label,
locale,
translations: transLookup
})}
</label>
</div>
);
@@ -822,23 +808,16 @@ const DocumentsTab = (props) => {
:
</span>
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)}
{resolveCrmDisplayValue(
{
value: detailsObj[
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
],
locale,
translations:
transLookup
}
)}
</dd>
<dd className="govuk-summary-list__value govuk-!-font-size-14">
<span className="results-visually-hidden">