Skip to content

Commit 2854cb0

Browse files
author
Valdas Kalvaitis
committed
Use YML for storing messages, move them to pager domain
1 parent 62959c8 commit 2854cb0

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

src/DataDog/PagerBundle/Resources/translations/messages.en.php

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
no_records_found: "No records were found"
2+
showing_records: "Showing FROM-TO from TOTAL_PAGES"

src/DataDog/PagerBundle/Resources/views/pagination.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
{% trans_default_domain "pager" %}
12
{% set pager = pagination %}
3+
24
<ul class="pagination">
35
{% if pager.pagination.previous is defined %}
46
<li>
@@ -73,9 +75,7 @@
7375
{% set record_to = min(pager.itemsPerPage + pager.itemsPerPage*(pager.currentPage-1), pager.total) %}
7476
{% set total_pages = pager.total %}
7577

76-
{% trans with {'RECORD_FROM': record_from, 'RECORD_TO': record_to, 'TOTAL_PAGES': total_pages} %}
77-
showing_records
78-
{% endtrans %}
78+
{% trans with {'FROM': record_from, 'TO': record_to, 'TOTAL_PAGES': total_pages} %}showing_records{% endtrans %}
7979
{% endif %}
8080
</p>
8181
<div class="clearfix"></div>

0 commit comments

Comments
 (0)