Closed derpue closed 7 years ago
Could you check the failing tests?
https://github.com/braincrafted/bootstrap-bundle/pull/436 should fix the failing tests.
They even failed with the unmodified develop branch under symfony 2.8
Got it, I restarted the tests.
Sometimes you don't need translation, maybe you just pulled the menu-items dynamically out of the database. The Debug-Toolbar shows missing-translation errors for that entries. Also for developing single-language apps this helps to keep the warnings away. The easy way of just globally disabling the translation component won't work, as most of the time external bundles (as FOSUserBundle for example) rely on that translation service.
This PR provides the ability to disable the translation for each item individually for Menus, Forms and page-wise for Flash Messages.
Disabling Translation for Menu Items repects the documented way: http://symfony.com/doc/current/bundles/KnpMenuBundle/i18n.html
Disabling Translation for Forms is just adding
'translation_domain' => false
to the form fields optionDisabling Translation for Flash Messages is just adding a parameter to the include:
{% include 'BraincraftedBootstrapBundle::flash.html.twig' with { 'close': true, 'translation_domain': false } %}