Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Change translation domain name for bundle translation and add an example #20797

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

jbonnier
Copy link
Contributor

The documentation was misleading regarding the bundle translations.

While the page Symfony Bundles Documentation mentions that translation file names should use PascalCase — as shown in the example AcmeBlogBundle.en.xlf — the Best Practices for Bundles suggest that the translation domain should be acme_blog.

This inconsistency led me to believe that there might be some mechanism that automatically converts the snake_case domain into PascalCase, but that isn’t the case.

I reviewed several bundles by core Symfony developers (such as EasyAdmin and bundles from SymfonyCasts), and they do indeed appear to use PascalCase translation domain names.

@javiereguiluz
Copy link
Member

Thank you @jbonnier.

@javiereguiluz javiereguiluz merged commit 937f8e9 into symfony:6.4 Mar 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants