Skip to content

Commit 59b67e2

Browse files
authored
feat(i18n): use rangeFormat for pagination (#2078)
1 parent c784a68 commit 59b67e2

27 files changed

+29
-28
lines changed

app/components/PaginationControls.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ const endItem = computed(() => {
3636
return Math.min(currentPage.value * (pageSize.value as number), props.totalItems)
3737
})
3838
39+
const numberFormatter = useNumberFormatter()
40+
3941
const canGoPrev = computed(() => currentPage.value > 1)
4042
const canGoNext = computed(() => currentPage.value < totalPages.value)
4143
@@ -167,8 +169,7 @@ function handlePageSizeChange(event: Event) {
167169
<span class="text-sm font-mono text-fg-muted">
168170
{{
169171
$t('filters.pagination.showing', {
170-
start: startItem,
171-
end: endItem,
172+
range: numberFormatter.formatRange(startItem, endItem),
172173
total: $n(totalItems),
173174
})
174175
}}

i18n/locales/ar.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@
767767
"paginated": "مقسم إلى صفحات",
768768
"items_per_page": "عدد العناصر في الصفحة",
769769
"per_page": "{count} / صفحة",
770-
"showing": "{start}-{end} من {total}",
770+
"showing": "{range} من {total}",
771771
"previous": "الصفحة السابقة",
772772
"next": "الصفحة التالية",
773773
"nav_label": "التصفح"

i18n/locales/az-AZ.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@
882882
"paginated": "Səhifələnmiş",
883883
"items_per_page": "Səhifə başına element",
884884
"per_page": "{count} / səhifə",
885-
"showing": "{start}-{end} / {total}",
885+
"showing": "{range} / {total}",
886886
"previous": "Əvvəlki səhifə",
887887
"next": "Növbəti səhifə",
888888
"nav_label": "Səhifələmə"

i18n/locales/bg-BG.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@
843843
"paginated": "Със страници",
844844
"items_per_page": "Елементи на страница",
845845
"per_page": "{count} / страница",
846-
"showing": "{start}-{end} от {total}",
846+
"showing": "{range} от {total}",
847847
"previous": "Предишна страница",
848848
"next": "Следваща страница",
849849
"nav_label": "Странициране"

i18n/locales/bn-IN.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@
654654
"paginated": "পাতায়িত",
655655
"items_per_page": "প্রতি পাতায় আইটেম",
656656
"per_page": "{count} / পাতায়",
657-
"showing": "{total} এর মধ্যে {start}-{end}",
657+
"showing": "{total} এর মধ্যে {range}",
658658
"previous": "আগের পাতা",
659659
"next": "পরের পাতা",
660660
"nav_label": "পাতায়ন"

i18n/locales/cs-CZ.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@
894894
"paginated": "Stránkované",
895895
"items_per_page": "Položek na stránku",
896896
"per_page": "{count} / stránku",
897-
"showing": "{start}-{end} z {total}",
897+
"showing": "{range} z {total}",
898898
"previous": "Předchozí stránka",
899899
"next": "Další stránka",
900900
"nav_label": "Stránkování"

i18n/locales/de-DE.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@
882882
"paginated": "Paginiert",
883883
"items_per_page": "Elemente pro Seite",
884884
"per_page": "{count} / Seite",
885-
"showing": "{start}-{end} von {total}",
885+
"showing": "{range} von {total}",
886886
"previous": "Vorherige Seite",
887887
"next": "Nächste Seite",
888888
"nav_label": "Paginierung"

i18n/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@
901901
"paginated": "Paginated",
902902
"items_per_page": "Items per page",
903903
"per_page": "{count} / page",
904-
"showing": "{start}-{end} of {total}",
904+
"showing": "{range} of {total}",
905905
"previous": "Previous page",
906906
"next": "Next page",
907907
"nav_label": "Pagination"

i18n/locales/es.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@
843843
"paginated": "Paginado",
844844
"items_per_page": "Elementos por página",
845845
"per_page": "{count} / página",
846-
"showing": "{start}-{end} de {total}",
846+
"showing": "{range} de {total}",
847847
"previous": "Página anterior",
848848
"next": "Página siguiente",
849849
"nav_label": "Paginación"

i18n/locales/fr-FR.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@
884884
"paginated": "Paginé",
885885
"items_per_page": "Éléments par page",
886886
"per_page": "{count} / page",
887-
"showing": "{start}-{end} sur {total}",
887+
"showing": "{range} sur {total}",
888888
"previous": "Page précédente",
889889
"next": "Page suivante",
890890
"nav_label": "Pagination"

0 commit comments

Comments
 (0)