EasyCorp / EasyCorp/EasyAdminBundle
Nested Enum Labels do not translate
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4.3k
- Forks
- 1.1k
- Avg merge
- 8d 2h
- Merged PRs (30d)
- 11
Description
Describe the bug
When you got a ChoiceField that accesses an enum that implements the TranslatableInterface on a nested entity the label will not get translated in index/detail view.
To Reproduce
ChoiceField('foo.bar')->setChoices(Bar::cases()) where Bar is a string backed enum implementing TranslatableInterface
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.
Research direction
Start with the ChoiceField('foo.bar') entry point and reproduce the issue using a nested entity whose string-backed Bar enum implements TranslatableInterface. Trace how labels are resolved for index and detail views; done means the enum labels are translated there as they are for non-nested fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100