Skip to content

Commit bba0181

Browse files
committed
fix pagination translation
1 parent 3f06dad commit bba0181

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

templates/components/styles/pagination.html.twig

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
{% set query = app.request.attributes.get('_route_params')|merge(app.request.query) %}
44

55
<nav class="l-cluster pagination" aria-labelledby="pagination">
6-
<h2 id="pagination" class="visuallyhidden">{{ pagination.label }}</h2>
6+
<h2 id="pagination" class="visuallyhidden">{{ 'pagination.label'|trans({}, 'w3c_website_templates_bundle') }}</h2>
77
<ul class="pagination__list">
88
{% if not pagination.firstPage %}
99
<li>
1010
<a rel="prev" href="{{ path(route, query|merge({page: pagination.previous})) }}">
11-
Previous
11+
{{ 'pagination.previous'|trans({}, 'w3c_website_templates_bundle') }}
1212
</a>
1313
</li>
1414
{% endif %}
@@ -17,7 +17,7 @@
1717
<li>
1818
<a class="pagination__list__first"
1919
href="{{ path(route, query|merge({page: pagination.first})) }}">
20-
{{ pagination.first }}
20+
{{ 'pagination.first'|trans({}, 'w3c_website_templates_bundle') }}
2121
</a>
2222
</li>
2323

@@ -28,12 +28,14 @@
2828
{% if page != pagination.page %}
2929
<li>
3030
<a href="{{ path(route, query|merge({page: page})) }}">
31-
{{ page }}
31+
{{ 'pagination.page'|trans({page: page}, 'w3c_website_templates_bundle') }}
3232
</a>
3333
</li>
3434
{% else %}
3535
<li>
36-
<a href="{{ path(route, query|merge({page: page})) }}" aria-current="page">{{ page }}</a>
36+
<a href="{{ path(route, query|merge({page: page})) }}" aria-current="page">
37+
{{ 'pagination.current_page'|trans({page: page}, 'w3c_website_templates_bundle') }}
38+
</a>
3739
</li>
3840
{% endif %}
3941
{% endfor %}
@@ -44,15 +46,15 @@
4446
<li>
4547
<a class="pagination__list__last"
4648
href="{{ path(route, query|merge({page: pagination.last})) }}">
47-
{{ pagination.last }}
49+
{{ 'pagination.last'|trans({}, 'w3c_website_templates_bundle') }}
4850
</a>
4951
</li>
5052
{% endif %}
5153

5254
{% if not pagination.lastPage %}
5355
<li>
5456
<a rel="next" href="{{ path(route, query|merge({page: pagination.next})) }}">
55-
Next
57+
{{ 'pagination.next'|trans({}, 'w3c_website_templates_bundle') }}
5658
</a>
5759
</li>
5860
{% endif %}

0 commit comments

Comments
 (0)