Skip to content
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

Missing support for translator in flash messages #14

Open
zeleznypa opened this issue Mar 28, 2022 · 1 comment
Open

Missing support for translator in flash messages #14

zeleznypa opened this issue Mar 28, 2022 · 1 comment

Comments

@zeleznypa
Copy link

Content of the flash message can be a localization key that can/should be translated.

Unfortunately the Nittro flash message not allowed to use the translator here.

@zeleznypa
Copy link
Author

zeleznypa commented Mar 28, 2022

Current workaround to print flash messages via Nittro but translated is the following:

    <div n:snippet="flashes">
        {* Hotfix for missing Nittro flashes translation support - https://github.com/nittro/nette-bridges/issues/14 *}
        {foreach $flashes as $flash}
            {capture $message}{_$flash->message}{/capture}
            {var $flash->message = $message}
        {/foreach}
        <div n:flashes data-flash-inline="false" data-flash-rich="true"></div>
    </div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant