Skip to content

Commit 4e08976

Browse files
fix(i18n): package count translations (#646)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 592982d commit 4e08976

File tree

24 files changed

+90
-77
lines changed

24 files changed

+90
-77
lines changed

app/components/Package/ListToolbar.vue

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,18 @@ function getSortKeyLabelKey(key: SortKey): string {
115115
>
116116
<template v-if="showingFiltered">
117117
{{
118-
$t('filters.count.showing_filtered', {
119-
filtered: filteredCount.toLocaleString(),
120-
count: totalCount.toLocaleString(),
121-
})
118+
$t(
119+
'filters.count.showing_filtered',
120+
{
121+
filtered: $n(filteredCount),
122+
count: $n(totalCount),
123+
},
124+
totalCount,
125+
)
122126
}}
123127
</template>
124128
<template v-else>
125-
{{ $t('filters.count.showing_all', { count: totalCount.toLocaleString() }) }}
129+
{{ $t('filters.count.showing_all', { count: $n(totalCount) }, totalCount) }}
126130
</template>
127131
</div>
128132

@@ -132,10 +136,14 @@ function getSortKeyLabelKey(key: SortKey): string {
132136
class="text-sm font-mono text-fg-muted"
133137
>
134138
{{
135-
$t('filters.count.showing_paginated', {
136-
pageSize: pageSize === 'all' ? filteredCount : pageSize,
137-
count: filteredCount.toLocaleString(),
138-
})
139+
$t(
140+
'filters.count.showing_paginated',
141+
{
142+
pageSize: pageSize === 'all' ? $n(filteredCount) : pageSize,
143+
count: $n(filteredCount),
144+
},
145+
filteredCount,
146+
)
139147
}}
140148
</div>
141149

app/components/PaginationControls.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function handlePageSizeChange(event: Event) {
181181
$t('filters.pagination.showing', {
182182
start: startItem,
183183
end: endItem,
184-
total: totalItems.toLocaleString(),
184+
total: $n(totalItems),
185185
})
186186
}}
187187
</span>

app/pages/search.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,10 +680,15 @@ defineOgImageComponent('Default', {
680680
class="text-fg-muted text-sm mt-4 font-mono"
681681
>
682682
{{
683-
$t('filters.count.showing_paginated', {
684-
pageSize: preferredPageSize === 'all' ? visibleResults.total : preferredPageSize,
685-
count: visibleResults.total.toLocaleString(),
686-
})
683+
$t(
684+
'filters.count.showing_paginated',
685+
{
686+
pageSize:
687+
preferredPageSize === 'all' ? $n(visibleResults.total) : preferredPageSize,
688+
count: $n(visibleResults.total),
689+
},
690+
visibleResults.total,
691+
)
687692
}}
688693
</p>
689694
</div>

i18n/locales/ar.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,9 +642,9 @@
642642
"nav_label": "التصفح"
643643
},
644644
"count": {
645-
"showing_filtered": "{filtered} من {total} حزمة",
646-
"showing_all": "{total} حزمة | حزمة واحدة | حزمتان | {total} حزم | {total} حزمة | {total} حزمة",
647-
"showing_paginated": "{pageSize} من {total} حزمة"
645+
"showing_filtered": "{filtered} من {count} حزمة",
646+
"showing_all": "{count} حزمة | حزمة واحدة | حزمتان | {count} حزم | {count} حزمة | {count} حزمة",
647+
"showing_paginated": "{pageSize} من {count} حزمة"
648648
},
649649
"table": {
650650
"security_warning": "تحذير أمني",

i18n/locales/az.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -661,9 +661,9 @@
661661
"nav_label": "Səhifələmə"
662662
},
663663
"count": {
664-
"showing_filtered": "{total} paketdən {filtered}",
665-
"showing_all": "{total} paket",
666-
"showing_paginated": "{total} paketdən {pageSize}"
664+
"showing_filtered": "{count} paketdən {filtered}",
665+
"showing_all": "{count} paket",
666+
"showing_paginated": "{count} paketdən {pageSize}"
667667
},
668668
"table": {
669669
"security_warning": "Təhlükəsizlik xəbərdarlığı",

i18n/locales/es.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -668,9 +668,9 @@
668668
"nav_label": "Paginación"
669669
},
670670
"count": {
671-
"showing_filtered": "{filtered} de {total} paquetes",
672-
"showing_all": "{total} paquetes",
673-
"showing_paginated": "{pageSize} de {total} paquetes"
671+
"showing_filtered": "{filtered} de {count} paquetes",
672+
"showing_all": "{count} paquetes",
673+
"showing_paginated": "{pageSize} de {count} paquetes"
674674
},
675675
"table": {
676676
"security_warning": "Advertencia de seguridad",

i18n/locales/fr-FR.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -671,9 +671,9 @@
671671
"nav_label": "Pagination"
672672
},
673673
"count": {
674-
"showing_filtered": "{filtered} sur {total} paquets",
675-
"showing_all": "{total} paquets",
676-
"showing_paginated": "{pageSize} sur {total} paquets"
674+
"showing_filtered": "{filtered} sur {count} paquets",
675+
"showing_all": "{count} paquets",
676+
"showing_paginated": "{pageSize} sur {count} paquets"
677677
},
678678
"table": {
679679
"security_warning": "Avertissement de sécurité",

i18n/locales/hu-HU.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,9 +659,9 @@
659659
"nav_label": "Lapozás"
660660
},
661661
"count": {
662-
"showing_filtered": "{filtered} / {total} csomag",
663-
"showing_all": "{total} csomag",
664-
"showing_paginated": "{pageSize} / {total} csomag"
662+
"showing_filtered": "{filtered} / {count} csomag",
663+
"showing_all": "{count} csomag",
664+
"showing_paginated": "{pageSize} / {count} csomag"
665665
},
666666
"table": {
667667
"security_warning": "Biztonsági figyelmeztetés",

i18n/locales/it-IT.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -636,9 +636,9 @@
636636
"nav_label": "Paginazione"
637637
},
638638
"count": {
639-
"showing_filtered": "{filtered} di {total} pacchetti",
640-
"showing_all": "{total} pacchetti",
641-
"showing_paginated": "{pageSize} di {total} pacchetti"
639+
"showing_filtered": "{filtered} di {count} pacchetti",
640+
"showing_all": "{count} pacchetti",
641+
"showing_paginated": "{pageSize} di {count} pacchetti"
642642
},
643643
"table": {
644644
"security_warning": "Avviso di sicurezza",

i18n/locales/pl-PL.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -712,9 +712,9 @@
712712
"nav_label": "Paginacja"
713713
},
714714
"count": {
715-
"showing_filtered": "{filtered} z {total} pakietów",
716-
"showing_all": "{total} pakietów",
717-
"showing_paginated": "{pageSize} z {total} pakietów"
715+
"showing_filtered": "{filtered} z {count} pakietów",
716+
"showing_all": "{count} pakietów",
717+
"showing_paginated": "{pageSize} z {count} pakietów"
718718
},
719719
"table": {
720720
"security_warning": "Ostrzeżenie bezpieczeństwa",

0 commit comments

Comments
 (0)