api-platform / api-platform/admin
"Label" of "SelectInput" has field value instead of translating
- Dominant language
- TypeScript
- Stars
- 516
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Description
**API Platform version(s) affected**: 2.0.1
**Description**
Fields "SelectInput" are not substituted by translation. Instead of translating "label" they always have a field name
**How to reproduce**
The problem is in the lines:
https://github.com/api-platform/admin/blob/v2.0.1/src/InputGuesser.js#L44
https://github.com/api-platform/admin/blob/v2.0.1/src/InputGuesser.js#L60
the next step
https://github.com/marmelab/react-admin/blob/v3.3.3/packages/ra-ui-materialui/src/input/SelectInput.tsx#L218
the next step
https://github.com/marmelab/react-admin/blob/v3.3.3/packages/ra-core/src/util/FieldTitle.tsx
the next step
https://github.com/marmelab/react-admin/blob/v3.3.3/packages/ra-core/src/util/getFieldLabelTranslationArgs.ts#L28
That's why the name of the field is displayed instead of the translation.
And this condition must be fulfilled.
https://github.com/marmelab/react-admin/blob/v3.3.3/packages/ra-core/src/util/getFieldLabelTranslationArgs.ts#L31
Contributor guide
Assessment
This issue has not been assessed yet.