Skip to content

[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

Merged
merged 1 commit into from
Oct 20, 2014
Merged

[TwigBridge] Replace default list style to icon #12164

merged 1 commit into from
Oct 20, 2014

Conversation

Macsch15
Copy link
Contributor

@Macsch15 Macsch15 commented Oct 7, 2014

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:
2014-10-07 11-55-50

After:
2014-10-07 11-55-07

@wildlyinaccurate
Copy link

What's with the hyphens in the Twig tags?

@stof
Copy link
Member

stof commented Oct 10, 2014

@wildlyinaccurate
Copy link

Thanks @stof!

@weaverryan
Copy link
Member

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!

@fabpot
Copy link
Member

fabpot commented Oct 19, 2014

👍

1 similar comment
@Tobion
Copy link
Contributor

Tobion commented Oct 19, 2014

👍

@fabpot
Copy link
Member

fabpot commented Oct 20, 2014

@Macsch15 Can you rebase to remove the merge commit? Thanks.

@Macsch15
Copy link
Contributor Author

@fabpot Done :)

@fabpot
Copy link
Member

fabpot commented Oct 20, 2014

Thank you @Macsch15.

@fabpot fabpot merged commit 9a0b2cc into symfony:master Oct 20, 2014
fabpot added a commit that referenced this pull request Oct 20, 2014
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:
![2014-10-07 11-55-50](https://cloud.githubusercontent.com/assets/1592053/4540807/d6f8eb46-4e0b-11e4-82bf-77b56fd1d17c.png)

After:
![2014-10-07 11-55-07](https://cloud.githubusercontent.com/assets/1592053/4540810/e02fe048-4e0b-11e4-9f3b-69902c0ae32b.png)

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>
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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:

xabbuh added a commit to xabbuh/symfony that referenced this pull request Oct 26, 2014
As @stof pointed out in symfony#12164, error messages are already translated
when they are passed to the template.
xabbuh added a commit to xabbuh/symfony that referenced this pull request Oct 26, 2014
As @stof pointed out in symfony#12164, error messages are already translated
when they are passed to the template.
fabpot added a commit that referenced this pull request Oct 26, 2014
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
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

Successfully merging this pull request may close these issues.

6 participants