@@ -1,17 +1,15 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const translateLpaName = ({ name, locale, transLookup }) => {
|
||||
if (!name) return "";
|
||||
|
||||
if (locale !== "cy") return name;
|
||||
|
||||
return (
|
||||
jsonpath({
|
||||
path: '$..[?(@ && @.value=="' + name + '")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})?.[0] || name
|
||||
);
|
||||
return resolveCrmDisplayValue({
|
||||
value: name,
|
||||
locale,
|
||||
translations: transLookup
|
||||
});
|
||||
};
|
||||
|
||||
export const getCaseLpaNames = ({
|
||||
|
||||
Reference in New Issue
Block a user