Skip to content

Fix filter label translation when field is hidden via hideOnIndex#7519

Open
Amoifr wants to merge 1 commit intoEasyCorp:5.xfrom
Amoifr:fix_7512
Open

Fix filter label translation when field is hidden via hideOnIndex#7519
Amoifr wants to merge 1 commit intoEasyCorp:5.xfrom
Amoifr:fix_7512

Conversation

@Amoifr
Copy link
Copy Markdown

@Amoifr Amoifr commented Mar 25, 2026

Summary

  • When useEntityTranslation is enabled and a field is hidden via hideOnIndex(), the corresponding filter label was not translated
  • The issue was in CommonConfigurator: when $fieldDto is null (field not in collection), it fell back to LabelGenerator::humanize() instead of using the entity translation system
  • Now CommonConfigurator uses EntityTranslationIdGenerator to generate the proper translation key when the field is not available

Test plan

  • Added unit tests for CommonConfigurator
  • Tests cover: field label available, TranslatableMessage label, humanized label (no entity translations), entity translation key (with entity translations enabled)
  • Manual testing with useEntityTranslation enabled and a field hidden via hideOnIndex()

Fix #7512

When using useEntityTranslation and a field is hidden via hideOnIndex(), the filter label was not translated because the corresponding FieldDto was null. Now CommonConfigurator uses EntityTranslationIdGenerator to generate the proper translation key when the field is not available. Fix EasyCorp#7512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant