From 0b9ea946fa28d4c98430cfcb5338966f8e8b011b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99gielewski?= Date: Sun, 30 Jun 2024 11:42:40 +0200 Subject: [PATCH] fix: use translateLabel to translate enum label to match label in dropdown --- .../property-type/default-type/default-property-value.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/components/property-type/default-type/default-property-value.tsx b/src/frontend/components/property-type/default-type/default-property-value.tsx index 56faea447..82838a115 100644 --- a/src/frontend/components/property-type/default-type/default-property-value.tsx +++ b/src/frontend/components/property-type/default-type/default-property-value.tsx @@ -12,7 +12,7 @@ const DefaultPropertyValue: FC = ({ resource: { id: resourceId }, }) => { const rawValue = record?.params[path] - const { translateProperty } = useTranslation() + const { tl } = useTranslation() if (typeof rawValue === 'undefined') return null @@ -23,7 +23,7 @@ const DefaultPropertyValue: FC = ({ const label = option.label || rawValue return ( - {translateProperty(`${propertyPath}.${label}`, resourceId, { + {tl(`${propertyPath}.${label}`, resourceId, { defaultValue: startCase(label), })}