diff --git a/src/frontend/components/property-type/default-type/filter.tsx b/src/frontend/components/property-type/default-type/filter.tsx index 15ec90ab3..24829409d 100644 --- a/src/frontend/components/property-type/default-type/filter.tsx +++ b/src/frontend/components/property-type/default-type/filter.tsx @@ -4,9 +4,11 @@ import { FormGroup, Input, Select } from '@adminjs/design-system' import allowOverride from '../../../hoc/allow-override.js' import { FilterPropertyProps } from '../base-property-props.js' import PropertyLabel from '../utils/property-label/property-label.js' +import { useTranslation } from '../../../hooks/use-translation.js' const Filter: React.FC = (props) => { const { property, onChange, filter } = props + const { translateProperty } = useTranslation() const handleInputChange = (event) => { onChange(property.path, event.target.value) @@ -21,13 +23,17 @@ const Filter: React.FC = (props) => { const filterKey = `filter-${property.path}` const value = filter[property.path] || '' if (property.availableValues) { + const availableValues = property.availableValues.map((v) => ({ + ...v, + label: translateProperty(v.label), + })) const selected = property.availableValues.find((av) => av.value === value) return (