-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[TwigBridge] Replace default list style to icon #12164
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
What's with the hyphens in the Twig tags? |
Thanks @stof! |
In case this doesn't get accepted for some reason (or doesn't get accepted for 2.6), I think a good backup plan would be to have this mentioned in the docs. See symfony/symfony-docs#4296. Cheers! |
👍 |
1 similar comment
👍 |
@Macsch15 Can you rebase to remove the merge commit? Thanks. |
@fabpot Done :) |
Thank you @Macsch15. |
This PR was merged into the 2.6-dev branch. Discussion ---------- [TwigBridge] Replace default list style to icon | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Replaces default list style in **bootstrap_3_layout.html.twig** to icon. Requires Glyphicons from Bootstrap 3. Before:  After:  Commits ------- 9a0b2cc [TwigBridge] Replace default list style to icon
{{- parent() -}} | ||
<ul class="list-unstyled"> | ||
{%- for error in errors -%} | ||
<li><span class="glyphicon glyphicon-exclamation-sign"></span> {{ error.message|trans({}, translation_domain) }}</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the translation is wrong here. error.message
is already translated. See the parent template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stof I checked it now, after delete trans({}, translation_domain)
translations doesn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean by "does not work" ? This is how they are displayed in the default theme:
<li>{{ error.message }}</li> |
As @stof pointed out in symfony#12164, error messages are already translated when they are passed to the template.
As @stof pointed out in symfony#12164, error messages are already translated when they are passed to the template.
This PR was merged into the 2.6-dev branch. Discussion ---------- don't translate error messages twice | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | As @stof pointed out in #12164, error messages are already translated when they are passed to the template. Commits ------- 4bd8661 don't translate error messages twice
Replaces default list style in bootstrap_3_layout.html.twig to icon.
Requires Glyphicons from Bootstrap 3.
Before:

After:
