-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Translation] debug:translation command does not show components translations #29633
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
Comments
Hi @damienalexandre, I agree and it's a new feature that I'm trying to add for 4.3, see #29121, reviews are welcome :) |
Oh! That's exactly what I need, sorry I missed your PR 😨 Thanks a lot, as I can see you use the discovery already done in the Framework, that's very nice 👍 symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php Lines 1004 to 1020 in 562448a
Should I close this issue? |
IMHO, this is a bug fix and not a new feature |
In that case, we can split #29121 adding these particular paths as a bugfix in 3.4?
Note that it'll require anyway a new constructor argument in commands to allow extra paths. |
a new constructor arg seems like a new feature to me :) |
Hmm, indeed the help says:
I thought |
…tor paths, Twig paths and Translator aware services paths in commands (yceruto) This PR was merged into the 4.3-dev branch. Discussion ---------- [FrameworkBundle][Translation] Add support for Translator paths, Twig paths and Translator aware services paths in commands | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #29085, #29633, #17739 | License | MIT | Doc PR | TODO Add custom (also common) Twig and Translation paths to the translation commands: * Custom directories configured in `twig.paths`. * Custom directories configured in `translator.paths` * The `Resources/translations/` directory of `Validation` component (if installed). * The `Resources/translations/` directory of `Form` component (if installed). * The `Resources/translations/` directory of Security Core component (if installed). Commits ------- 31d7a09 Add support for translator paths and twig paths in translation commands
Symfony version(s) affected: 3.4 to 4.2 at least
Description
When running
php ./bin/console debug:translation --all fr
, translation from all bundles are read (like FrameworkBundle, TwigBundle... ) but translations from components likes validators or security are not:I think this is not the behavior I expected, it could be improved.
The help message on the "all" option tells:
So it work as expected, but someone using those components will have hidden translation in his application, and no way to read them / debug them.
How to reproduce
Possible Solution
Symfony should use the same path resolution for the debug command and the catalog loading in Translator. The Translator is capable of reading translations from the components, so this command should act the same way.
Additional context
Happy holidays 🎄 🎅
The text was updated successfully, but these errors were encountered: