Skip to content

Commit

Permalink
Merge pull request #382 from Restless-ET/patch-1
Browse files Browse the repository at this point in the history
Use 'choice_translation_domain' option
  • Loading branch information
Florian Eckerstorfer committed Dec 20, 2015
2 parents ad5ee4d + 2475381 commit e322b94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Resources/views/Form/bootstrap.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@
{% spaceless %}
{% for group_label, choice in options %}
{% if choice is iterable %}
<optgroup label="{{ group_label|trans({}, translation_domain) }}">
<optgroup label="{{ choice_translation_domain is defined ? (choice_translation_domain is sameas(false) ? group_label : group_label|trans({}, choice_translation_domain)) : group_label|trans({}, translation_domain) }}">
{% set options = choice %}
{{ block('choice_widget_options') }}
</optgroup>
{% else %}
<option value="{{ choice.value }}"{% if choice is selectedchoice(value) %} selected="selected"{% endif %}>{{ choice.label|trans({}, translation_domain) }}</option>
<option value="{{ choice.value }}"{% if choice is selectedchoice(value) %} selected="selected"{% endif %}>{{ choice_translation_domain is defined ? (choice_translation_domain is sameas(false) ? choice.label : choice.label|trans({}, choice_translation_domain)) : choice.label|trans({}, translation_domain) }}</option>
{% endif %}
{% endfor %}
{% endspaceless %}
Expand Down

0 comments on commit e322b94

Please sign in to comment.