sonata-project / SonataAdminBundle

The missing Symfony Admin Generator
https://docs.sonata-project.org/projects/SonataAdminBundle
MIT License
2.11k stars 1.26k forks source link

Deprecate catalogue or label_catalogue in favor of translation_domain and default_label_catalogue in favor of default_translation_domain #6116

Closed VincentLanglet closed 2 years ago

VincentLanglet commented 4 years ago

Feature Request

We should add consistency in our option names.

When configuring block, there is an option label_catalogue https://sonata-project.org/bundles/admin/2-3/doc/reference/dashboard.html#using-the-config-yml

When configuring an admin, there is an option label_catalogue. https://sonata-project.org/bundles/admin/2-3/doc/reference/dashboard.html#using-the-admin-service-declaration

There is also a default_label_catalogue option https://sonata-project.org/bundles/admin/3-x/doc/reference/configuration.html#full-configuration-options

For the Knp menu, documentation talk about translation_domain (see https://symfony.com/doc/master/bundles/SonataAdminBundle/reference/advanced_configuration.html#translations) but it's currently label_catalogue which is used (see https://github.com/sonata-project/SonataAdminBundle/blob/3.x/src/Resources/views/Menu/sonata_menu.html.twig#L25).

I would propose to change all the label_catalogue to translation_domain. This will add consistency in the options, and avoid mistakes.

VincentLanglet commented 4 years ago

There is also some catalogue key, cf: https://github.com/sonata-project/SonataAdminBundle/issues/5525