From 2fed89be9d4473933e8a6508bf377656313adbb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Thu, 8 Dec 2022 11:54:34 +0100 Subject: [PATCH] feat: poll plural support (#375) --- components/status/StatusPoll.vue | 2 +- locales/en-US.json | 2 +- locales/es-ES.json | 8 ++++---- locales/fr-FR.json | 2 +- locales/zh-CN.json | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/status/StatusPoll.vue b/components/status/StatusPoll.vue index 6151ee97..5fbc8c43 100644 --- a/components/status/StatusPoll.vue +++ b/components/status/StatusPoll.vue @@ -57,7 +57,7 @@ async function vote(e: Event) {
- {{ $t('status.poll.count', [poll.votersCount]) }} + {{ $t('status.poll.count', poll.votersCount ?? 0) }} · diff --git a/locales/en-US.json b/locales/en-US.json index 5ffe7932..d7740402 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -155,7 +155,7 @@ "filter_removed_phrase": "Removed by filter", "filter_show_anyway": "Show anyway", "poll": { - "count": "{0} votes", + "count": "{n} votes", "ends": "ends {0}", "finished": "finished {0}" }, diff --git a/locales/es-ES.json b/locales/es-ES.json index 77f90a99..919914fb 100644 --- a/locales/es-ES.json +++ b/locales/es-ES.json @@ -155,9 +155,9 @@ "filter_removed_phrase": "Eliminado por filtrado", "filter_show_anyway": "Mostrar de todas formas", "poll": { - "count": "{0} votos|{0} voto|{0} votos", - "ends": "finaliza el {0}", - "finished": "finalizada el {0}" + "count": "{n} votos|{n} voto|{n} votos", + "ends": "finaliza {0}", + "finished": "finalizada {0}" }, "reblogged": "{0} retooteó", "spoiler_show_less": "Mostrar menos", @@ -178,7 +178,7 @@ "time_ago_options": { "day_future": "dentro de 0 días|mañana|dentro de {n} días", "day_past": "hace 0 días|ayer|hace {n} días", - "hour_future": "dentro de 0 horas|dentro de 1 hora|dentro {n} horas", + "hour_future": "dentro de 0 horas|dentro de 1 hora|dentro de {n} horas", "hour_past": "hace 0 horas|hace 1 hora|hace {n} horas", "just_now": "ahora mismo", "minute_future": "dentro de 0 minutos|dentro de 1 minuto|dentro de {n} minutos", diff --git a/locales/fr-FR.json b/locales/fr-FR.json index 20451a6b..f3eae83c 100644 --- a/locales/fr-FR.json +++ b/locales/fr-FR.json @@ -155,7 +155,7 @@ "filter_removed_phrase": "Caché par le filtre", "filter_show_anyway": "Montrer coûte que coûte", "poll": { - "count": "{0} votes", + "count": "{n} votes", "ends": "se clôt {0}", "finished": "clos {0}" }, diff --git a/locales/zh-CN.json b/locales/zh-CN.json index 9d03cebc..7340939a 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -154,7 +154,7 @@ "filter_removed_phrase": "从筛选中移除", "filter_show_anyway": "仍然展示", "poll": { - "count": "{0} 次投票", + "count": "{n} 次投票", "ends": "将在 {0} 结束", "finished": "已在 {0} 结束" },