api-platform / api-platform/admin

"Label" of "SelectInput" has field value instead of translating

Abierto
#283 0 comentarios 1 reacción 0 asignados Ver en GitHub
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

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.