api-platform / api-platform/admin
"Label" of "SelectInput" has field value instead of translating
- Lenguaje dominante
- TypeScript
- Estrellas
- 516
- Forks
- 134
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
**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
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.