We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Hi, The translation domain is not used in new twig Alert component
To Reproduce
(>= 4.20.4)
In the new templates/flash_messages.html.twig, with a specific translation domain (which is not messages).
templates/flash_messages.html.twig
messages
Works well with < 4.20.4 (without twig Alert component)
{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Provider\AdminContextProvider #} {% trans_default_domain ea.hasContext ? ea.i18n.translationDomain : (translation_domain is defined ? translation_domain ?? 'messages') %} {# Just for check domain #} {{ ea.hasContext ? ea.i18n.translationDomain : (translation_domain is defined ? translation_domain ?? 'messages') }} {% set flash_messages = app.flashes %} {% if flash_messages|length > 0 %} <div id="flash-messages"> {% for label, messages in flash_messages %} {% for message in messages %} {# THIS LINE IS ADDED FOR TESTS #} {{ message|trans|raw }} {# correctly translated #} <twig:ea:Alert variant="{{ label }}" withDismissButton> {{ message|trans|raw }} {# not translated, show only translation key #} </twig:ea:Alert> {% endfor %} {% endfor %} </div> {% endif %}
The text was updated successfully, but these errors were encountered:
ping @javiereguiluz some regression on new alert component
Sorry, something went wrong.
It seems that the domain is lost in the twig component.
This test works :
<twig:ea:Alert variant="{{ label }}" withDismissButton> {% trans_default_domain ea.hasContext ? ea.i18n.translationDomain : (translation_domain is defined ? translation_domain ?? 'messages') %} {{ message|trans|raw }} </twig:ea:Alert>
No branches or pull requests
Describe the bug
Hi,
The translation domain is not used in new twig Alert component
To Reproduce
(>= 4.20.4)
In the new
templates/flash_messages.html.twig
, with a specific translation domain (which is notmessages
).Works well with < 4.20.4 (without twig Alert component)
The text was updated successfully, but these errors were encountered: