You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Choices that are fetched from a reference (e.g. authors from a book) shouldn't be translated.
What happened instead:
They are translated, but as they use their value as default translation, this isn't visible unless you enable the missing translation warnings in the i18nProvider.
Click on the first comment to open the comment edition page
Click on the post dropdown to reveal the list of options
The fist option is 'ERROR'
The only modifications I made relative to the canonical simple example are:
Replace AutocompleteInput by SelectInput in the CommentEdit form
Add a translation for the string 'A voluptas eius eveniet ut commodi dolor' in the English messages
Related code:
This has to do with the translateChoices prop in choice inputs (SelectInput, AutocompleteInput, RadioButtonGrupoInput, CheckboxGrupInput, etc.). Its default value should be true, except when inside a Reference input.
This feature used to work in v3, when ReferenceInput cloned its child.
fzaninotto
changed the title
translateChoices is not false when a SelectInput is a child of ReferenceInput
Choices are translated even when SelectInput is a child of ReferenceInputJul 25, 2023
What you were expecting:
Choices that are fetched from a reference (e.g. authors from a book) shouldn't be translated.
What happened instead:
They are translated, but as they use their value as default translation, this isn't visible unless you enable the missing translation warnings in the i18nProvider.
Steps to reproduce:
The only modifications I made relative to the canonical simple example are:
Related code:
This has to do with the
translateChoices
prop in choice inputs (SelectInput
,AutocompleteInput
,RadioButtonGrupoInput
,CheckboxGrupInput
, etc.). Its default value should betrue
, except when inside a Reference input.This feature used to work in v3, when ReferenceInput cloned its child.
react-admin/packages/ra-ui-materialui/src/input/ReferenceInput.tsx
Line 261 in d295fc9
It no longer works in v4, despite what's documented:
Environment
The text was updated successfully, but these errors were encountered: