-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Translations][Bundles] bundle overrides not taken into account #14942
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
The translation doesn't take into the bundle hierarchy but the order of registering bundles in the kernel. |
Hi @aitboudad What should be the right way to override a bundle template still having the translation system work? I think the error pages example can be idiomatic .. how has to be handled is IMHO not clear in the issues you linked .. but I'm pretty new to symfony2 so maybe I'm totally misunderstanding the entire problem Thank you for your patience :) |
@drAlberT overriding bundle templates does not change anything to the translation system. These are 2 independent systems. |
@stof I know .. maybe I'm not be clear in my explanation of the problem .. ;( I want to achieve the following goal:
AFAICS simply overriding TwigBundles templates I can't achieve my goal .. translations does not see them Maybe I'm wrong in something basic .. but it should be a simple task |
I worked around the problem moving error pages templates in a custom bundle (say CustomErrorsBundle or whatever you want call), override the Exception controller and the findTemplates() method (even here now everything works, but following the docs it was impossible to have it working :( ) This way I have a clean solution .. but the question became: is it the right approach? .. isn't it too tricky? it's not well documented IMHO .. Thank you guys .. hope to have been clear now :D |
@drAlberT What exactly did not work before? Providing translations for the messages or extract them from your templates? |
@xabbuh App/console translations:* do not see the templates So, yes, I can't extract them from templates
|
@xabbuh any news? |
@drAlberT I look into it :) |
👍 :) |
…es path. (aitboudad) This PR was merged into the 2.6 branch. Discussion ---------- [Translation][debug cmd] taken account into bundle overrides path. | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Fixed tickets | #14942 (partially) | Tests pass? | yes | License | MIT Commits ------- c3a077a [Translation][debug cmd] taken account into bundle overrides path.
…des path. (aitboudad) This PR was merged into the 2.3 branch. Discussion ---------- [Translation][update cmd] taken account into bundle overrides path. | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Fixed tickets | #14942 (partially) | Tests pass? | yes | License | MIT Commits ------- a8f315b [Translation][update cmd] taken account into bundle overrides path.
If one wants to override (for example) error pages he can override the TwigBundle Exceptions templates.
If we want to make these templates locale-aware we could put them into
app/Resources/TwigBundle/translations/
and they will work .. but the translations system seems to have no way to extract or dump them ...I think translations:[dump|update] should be overrides-aware and search for translations in every standard place a bundle could be overridden
Hope to have been clear in my explanation :)
The text was updated successfully, but these errors were encountered: