Skip to content

Commit

Permalink
Remove use of transchoice in twig
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu authored and OskarStark committed Jan 30, 2020
1 parent 69e45dc commit a3ea470
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions src/Resources/views/Block/block_stats.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ file that was distributed with this source code.
<h3>{{ pager.count() }}</h3>
<p>
{% if translation_domain %}
{{ settings.text|transchoice(pager.count(), {}, translation_domain) }}
{# NEXT_MAJOR: bump "symfony/translation" to ^4.2 and replace the previous line with the following #}
{# {{ settings.text|trans({'%count%': pager.count()}, translation_domain) }} #}
{{ settings.text|trans({'%count%': pager.count()}, translation_domain) }}
{% else %}
{{ settings.text }}
{% endif %}
Expand Down
4 changes: 1 addition & 3 deletions src/Resources/views/CRUD/batch_confirmation.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ file that was distributed with this source code.
{% if data.all_elements %}
{{ 'message_batch_all_confirmation'|trans({}, 'SonataAdminBundle') }}
{% else %}
{% transchoice data.idx|length with {'%count%': data.idx|length} from 'SonataAdminBundle' %}message_batch_confirmation{% endtranschoice %}
{# NEXT_MAJOR: bump "symfony/translation" to ^4.2 and replace the previous line with the following #}
{# {% trans with {'%count%': data.idx|length} from 'SonataAdminBundle' %}message_batch_confirmation{% endtrans %} #}
{% trans with {'%count%': data.idx|length} from 'SonataAdminBundle' %}message_batch_confirmation{% endtrans %}
{% endif %}
</div>
<div class="box-footer clearfix">
Expand Down
4 changes: 1 addition & 3 deletions src/Resources/views/Pager/base_results.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ file that was distributed with this source code.
{% endblock %}

{% block num_results %}
{% transchoice admin.datagrid.pager.nbresults with {'%count%': admin.datagrid.pager.nbresults} from 'SonataAdminBundle' %}list_results_count{% endtranschoice %}
{# NEXT_MAJOR: bump "symfony/translation" to ^4.2 and replace the previous line with the following #}
{# {% trans with {'%count%': admin.datagrid.pager.nbresults} from 'SonataAdminBundle' %}list_results_count{% endtrans %} #}
{% trans with {'%count%': admin.datagrid.pager.nbresults} from 'SonataAdminBundle' %}list_results_count{% endtrans %}
&nbsp;-&nbsp;
{% endblock %}

Expand Down
4 changes: 1 addition & 3 deletions src/Resources/views/Pager/simple_pager_results.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ file that was distributed with this source code.
{% if admin.datagrid.pager.lastPage != admin.datagrid.pager.page %}
{{ 'list_results_count_prefix'|trans({}, 'SonataAdminBundle') }}
{% endif %}
{% transchoice admin.datagrid.pager.nbresults with {'%count%': admin.datagrid.pager.nbresults} from 'SonataAdminBundle' %}list_results_count{% endtranschoice %}
{# NEXT_MAJOR: bump "symfony/translation" to ^4.2 and replace the previous line with the following #}
{# {% trans with {'%count%': admin.datagrid.pager.nbresults} from 'SonataAdminBundle' %}list_results_count{% endtrans %} #}
{% trans with {'%count%': admin.datagrid.pager.nbresults} from 'SonataAdminBundle' %}list_results_count{% endtrans %}
&nbsp;-&nbsp;
{% endblock %}

Expand Down

0 comments on commit a3ea470

Please sign in to comment.