"Label" of "SelectInput" has field value instead of translating
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start in src/InputGuesser.js at lines 44 and 60, then follow the SelectInput path into react-admin's SelectInput.tsx, FieldTitle.tsx, and getFieldLabelTranslationArgs.ts. Check which label-related value is passed through and compare it with the linked condition. Done means SelectInput displays the translated label instead of the field name.
Written by the indexing model from the issue text.
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
- Dominant language
- TypeScript
- Stars
- 516
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from api-platform/admin
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
api-platform/admin#616 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 64/100
api-platform/admin#660 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 50/100
api-platform/admin#659 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
api-platform/admin#631 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
api-platform/admin#626 · 1 comment · 1 reaction ·
All issues in api-platform/admin
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·