Open natepage opened 2 years ago
@javiereguiluz Hi, thank you for looking at this issue. Is it fair to assume, as you added the label and milestone, that you are not against it? 😄
If that is the case, I would be happy to hear from you regardind specifics, and then I can work on a PR if you like.
👍
Short description of what this feature will allow to do: Right now EasyAdmin autogenerate field labels as a humanized version of the property name when no label is explicitly set. This feature would autogenerate field labels as translation key based on a predictable format so applications could control those translations without having to explicitly set those keys in their CRUD controllers.
The format of those generated translation key could be something like
admin.field.<entity>.<property>
.Ideally this new feature could be toggled at the Dashboard and/or Crud level, and be disabled by default to prevent any BC break.
Example of how to use this feature
Here is how this feature could be toggled:
If the feature is enabled, then by default the fields (and filters as they use the field label) would look like this:
And let's assume the translations are defined in PHP, the applications can simply define the following structure in their
messages.en.php
:To then have their field labels being translated: