-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Translation][Command][FrameworkBundle] Enable translation debugging in directories #13443
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
Conversation
This is now making it impossible to debug the whole translations |
@stof What do you mean with "the whole translations"? Before the change a bundle name was already mandatory. |
ping @stof I'm not sure what to do. Could you explain your last comment, please? |
@xelaris, stof means if we put the defaults value to app/Resources folder, there is no way to debug all translations available in the app. |
How was it possible before? Since the |
IMO if we want to set a default value for this command I think it should be the whole translations. |
Ok, I got the point. We could keep the |
|
@xelaris any news ? |
I think an |
I'm ok, then can we also move the defaults value(app/Resources folder) feature ? |
@xelaris TranslationUpdateCommand use defaults to app/Resources folder, forget my previous comment :) |
👍 ping @fabpot |
@xelaris can apply the below patch and rebase your branch: @@ -116,7 +116,9 @@ EOF
// Extract used messages
$extractedCatalogue = new MessageCatalogue($locale);
- $this->getContainer()->get('translation.extractor')->extract($rootPath.'/Resources/views', $extractedCatalogue);
+ if (is_dir($translationsPath)) {
+ $this->getContainer()->get('translation.extractor')->extract($translationsPath, $extractedCatalogue);
+ }
// Load defined messages
$currentCatalogue = new MessageCatalogue($locale); |
once you made the change I'll merge :) |
Harmonize TranslationDebugCommand and TranslationUpdateCommand to expect an optional bundle name or a directory and fall back to kernel root dir if none of them is given.
e9e7e07
to
2662244
Compare
@aitboudad The branch is rebased and I added the |
@xelaris ok nice ! |
Thank you @xelaris. |
…tion debugging in directories (xelaris) This PR was merged into the 2.7 branch. Discussion ---------- [Translation][Command][FrameworkBundle] Enable translation debugging in directories | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #12273 | License | MIT | Doc PR | This PR follows up #13340 and enables not only to inspect Bundles, but also directories, like the `app/` directory. Additionally it harmonizes the TranslationDebugCommand and TranslationUpdateCommand to expect an optional bundle name or a directory and fall back to kernel root dir if none of them is given. Commits ------- 2662244 [FrameworkBundle] Enable translation debugging in directories
@xelaris can you open an issue for |
Thanks for merging @aitboudad, an issue for the |
This PR follows up #13340 and enables not only to inspect Bundles, but also directories, like the
app/
directory.Additionally it harmonizes the TranslationDebugCommand and TranslationUpdateCommand to expect an optional bundle name or a directory and fall back to kernel root dir if none of them is given.