From 0e998c824e887b6773633bdde2be9ec300545ece Mon Sep 17 00:00:00 2001 From: Sorunome Date: Sat, 14 Aug 2021 11:30:18 +0200 Subject: [PATCH] fix: Use plural string in translation --- assets/l10n/intl_cs.arb | 9 ++------- assets/l10n/intl_de.arb | 9 ++------- assets/l10n/intl_en.arb | 9 ++------- assets/l10n/intl_eo.arb | 9 ++------- assets/l10n/intl_es.arb | 9 ++------- assets/l10n/intl_et.arb | 9 ++------- assets/l10n/intl_fr.arb | 9 ++------- assets/l10n/intl_gl.arb | 9 ++------- assets/l10n/intl_hr.arb | 9 ++------- assets/l10n/intl_it.arb | 9 ++------- assets/l10n/intl_ja.arb | 15 +++++---------- assets/l10n/intl_nl.arb | 9 ++------- assets/l10n/intl_pl.arb | 9 ++------- assets/l10n/intl_pt_BR.arb | 9 ++------- assets/l10n/intl_ru.arb | 9 ++------- assets/l10n/intl_tr.arb | 9 ++------- assets/l10n/intl_zh.arb | 9 ++------- assets/l10n/intl_zh_Hant.arb | 9 ++------- lib/widgets/event_content/state_message.dart | 4 +--- 19 files changed, 40 insertions(+), 132 deletions(-) diff --git a/assets/l10n/intl_cs.arb b/assets/l10n/intl_cs.arb index f559e0e2..ea69768f 100644 --- a/assets/l10n/intl_cs.arb +++ b/assets/l10n/intl_cs.arb @@ -2283,18 +2283,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "{count} dalších událostí", - "@xMoreEvents": { + "moreEvents": "{count, plural, =1{1 další událost} other{{count} dalších událostí}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "1 další událost", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "goToTheNewRoom": "Přejít do nové místnost", "@goToTheNewRoom": { "type": "text", diff --git a/assets/l10n/intl_de.arb b/assets/l10n/intl_de.arb index a537c255..38236a10 100644 --- a/assets/l10n/intl_de.arb +++ b/assets/l10n/intl_de.arb @@ -2248,18 +2248,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "{count} weitere Ereignisse", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{1 weiteres Ereignis} other{{count} weitere Ereignisse}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "1 weiteres Ereignis", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "unlockChatBackup": "Chat-Backup entsperren", "@unlockChatBackup": { "type": "text", diff --git a/assets/l10n/intl_en.arb b/assets/l10n/intl_en.arb index 04c4c541..5a783458 100644 --- a/assets/l10n/intl_en.arb +++ b/assets/l10n/intl_en.arb @@ -676,13 +676,8 @@ "type": "text", "placeholders": {} }, - "oneMoreEvent": "1 more event", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, - "xMoreEvents": "{count} more events", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{1 more event} other{{count} more events}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} diff --git a/assets/l10n/intl_eo.arb b/assets/l10n/intl_eo.arb index 829445b3..b4c8d188 100644 --- a/assets/l10n/intl_eo.arb +++ b/assets/l10n/intl_eo.arb @@ -2210,18 +2210,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "{count} pliaj eventoj", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{1 plia evento} other{{count} pliaj eventoj}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "1 plia evento", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "noEncryptionForPublicRooms": "Vi nur povas aktivigi ĉifradon kiam la ĉambro ne plu estas publike alirebla.", "@noEncryptionForPublicRooms": { "type": "text", diff --git a/assets/l10n/intl_es.arb b/assets/l10n/intl_es.arb index 9e8d7e72..bb4ff8ff 100644 --- a/assets/l10n/intl_es.arb +++ b/assets/l10n/intl_es.arb @@ -1836,18 +1836,13 @@ "supportedVersions": {} } }, - "xMoreEvents": "{count} más eventos", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{1 evento más} other{{count} más eventos}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "1 evento más", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "chatBackupDescription": "Tu copia de seguridad del chat está protegida con una clave de seguridad. Por favor, asegúrate de no perderla.", "@chatBackupDescription": { "type": "text", diff --git a/assets/l10n/intl_et.arb b/assets/l10n/intl_et.arb index 001b7e25..c7e8afe1 100644 --- a/assets/l10n/intl_et.arb +++ b/assets/l10n/intl_et.arb @@ -2248,18 +2248,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "Veel {count} sündmust", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{Veel 1 sündmus}, other{Veel {count} sündmust}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "Veel 1 sündmus", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "unlockChatBackup": "Krüpti lahti oma vestluste varukoopia", "@unlockChatBackup": { "type": "text", diff --git a/assets/l10n/intl_fr.arb b/assets/l10n/intl_fr.arb index a73eb381..4354eabf 100644 --- a/assets/l10n/intl_fr.arb +++ b/assets/l10n/intl_fr.arb @@ -2248,18 +2248,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "{count} évènements en plus", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{1 évènement en plus} other{{count} évènements en plus}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "1 évènement en plus", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "unlockChatBackup": "Déverrouiller la sauvegarde de la discussion", "@unlockChatBackup": { "type": "text", diff --git a/assets/l10n/intl_gl.arb b/assets/l10n/intl_gl.arb index 4dd9fdcb..ece63008 100644 --- a/assets/l10n/intl_gl.arb +++ b/assets/l10n/intl_gl.arb @@ -2248,18 +2248,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "{count} eventos máis", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{Un evento máis} other{{count} eventos máis}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "Un evento máis", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "unlockChatBackup": "Desbloquear copia do chat", "@unlockChatBackup": { "type": "text", diff --git a/assets/l10n/intl_hr.arb b/assets/l10n/intl_hr.arb index 85680cbf..65f26432 100644 --- a/assets/l10n/intl_hr.arb +++ b/assets/l10n/intl_hr.arb @@ -2278,18 +2278,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "Još {count} događaja", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{Još jedan događaj} other{Još {count} događaja}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "Još jedan događaj", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "chats": "Chatovi", "@chats": { "type": "text", diff --git a/assets/l10n/intl_it.arb b/assets/l10n/intl_it.arb index 3da8d87c..b812235e 100644 --- a/assets/l10n/intl_it.arb +++ b/assets/l10n/intl_it.arb @@ -2246,18 +2246,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "{count} altri eventi", - "@xMoreEvents": { + "moreEvents": "{count,plural =1{1 altro evento} other{{count} altri eventi}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "1 altro evento", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "unlockChatBackup": "Sblocca il backup della discussione", "@unlockChatBackup": { "type": "text", diff --git a/assets/l10n/intl_ja.arb b/assets/l10n/intl_ja.arb index c0cf1e8e..1ecc100e 100644 --- a/assets/l10n/intl_ja.arb +++ b/assets/l10n/intl_ja.arb @@ -2125,10 +2125,12 @@ "type": "text", "placeholders": {} }, - "oneMoreEvent": "もう1つのイベント", - "@oneMoreEvent": { + "moreEvents": "{count,plural, =1{もう1つのイベント} other{{count}個のイベント}}", + "@moreEvents": { "type": "text", - "placeholders": {} + "placeholders": { + "count": {} + } }, "chatBackupDescription": "チャットのバックアップは秘密鍵によって保存されます。失くさないように気をつけてください。", "@chatBackupDescription": { @@ -2280,13 +2282,6 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "{count}個のイベント", - "@xMoreEvents": { - "type": "text", - "placeholders": { - "count": {} - } - }, "pleaseEnterSecurityKey": "セキュリティーキーを入力してください:", "@pleaseEnterSecurityKey": { "type": "text", diff --git a/assets/l10n/intl_nl.arb b/assets/l10n/intl_nl.arb index 412743da..680165e4 100644 --- a/assets/l10n/intl_nl.arb +++ b/assets/l10n/intl_nl.arb @@ -2239,18 +2239,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "Nog {count} gebeurtenissen", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{Nog 1 gebeurtenis} other{Nog {count} gebeurtenissen}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "Nog 1 gebeurtenis", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "unlockChatBackup": "Chatback-up ontgrendelen", "@unlockChatBackup": { "type": "text", diff --git a/assets/l10n/intl_pl.arb b/assets/l10n/intl_pl.arb index e9d6162b..443e3274 100644 --- a/assets/l10n/intl_pl.arb +++ b/assets/l10n/intl_pl.arb @@ -1587,18 +1587,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "{count} więcej wydarzeń", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{1 kolejne wydarzenie} other{{count} więcej wydarzeń}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "1 kolejne wydarzenie", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "chatBackupDescription": "Twoja kopia zapasowa Rozmów jest zabezpieczona kluczem bezpieczeństwa. Uważaj żeby go nie zgubić.", "@chatBackupDescription": { "type": "text", diff --git a/assets/l10n/intl_pt_BR.arb b/assets/l10n/intl_pt_BR.arb index 8bb1de2f..ecf03beb 100644 --- a/assets/l10n/intl_pt_BR.arb +++ b/assets/l10n/intl_pt_BR.arb @@ -2191,18 +2191,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "Mais {count} eventos", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{Mais 1 evento} other{Mais {count} eventos}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "Mais 1 evento", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "chatBackupDescription": "O backup da sua conversa é protegido com sua chave de segurança. Por favor, evite perdê-la.", "@chatBackupDescription": { "type": "text", diff --git a/assets/l10n/intl_ru.arb b/assets/l10n/intl_ru.arb index a91b43e6..7f62f118 100644 --- a/assets/l10n/intl_ru.arb +++ b/assets/l10n/intl_ru.arb @@ -2248,18 +2248,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "ещё {count} событий", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{Еще 1 событие} other{ещё {count} событий}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "Еще 1 событие", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "unlockChatBackup": "Разблокировать резервную копию чата", "@unlockChatBackup": { "type": "text", diff --git a/assets/l10n/intl_tr.arb b/assets/l10n/intl_tr.arb index 19081a37..44663abd 100644 --- a/assets/l10n/intl_tr.arb +++ b/assets/l10n/intl_tr.arb @@ -2248,18 +2248,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "{count} etkinlik daha", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{1 etkinlik daha} other{{count} etkinlik daha}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "1 etkinlik daha", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "unlockChatBackup": "Sohbet yedeklemesinin kilidini aç", "@unlockChatBackup": { "type": "text", diff --git a/assets/l10n/intl_zh.arb b/assets/l10n/intl_zh.arb index 29cc2f59..75e62ed6 100644 --- a/assets/l10n/intl_zh.arb +++ b/assets/l10n/intl_zh.arb @@ -2475,18 +2475,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "{count} 个更多事件", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{1 个更多事件} other{{count} 个更多事件}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "1 个更多事件", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "commandHintReact": "将回复作为响应发送", "@commandHintReact": { "type": "text", diff --git a/assets/l10n/intl_zh_Hant.arb b/assets/l10n/intl_zh_Hant.arb index 0e48f531..74ba4556 100644 --- a/assets/l10n/intl_zh_Hant.arb +++ b/assets/l10n/intl_zh_Hant.arb @@ -263,18 +263,13 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "還有{count}個事件", - "@xMoreEvents": { + "moreEvents": "{count,plural, =1{還有1個事件} other{還有{count}個事件}}", + "@moreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "還有1個事件", - "@oneMoreEvent": { - "type": "text", - "placeholders": {} - }, "hideUnknownEvents": "隱藏未知事件", "@hideUnknownEvents": { "type": "text", diff --git a/lib/widgets/event_content/state_message.dart b/lib/widgets/event_content/state_message.dart index 25546760..c9767462 100644 --- a/lib/widgets/event_content/state_message.dart +++ b/lib/widgets/event_content/state_message.dart @@ -50,9 +50,7 @@ class StateMessage extends StatelessWidget { ), if (counter != 0) Text( - counter == 1 - ? L10n.of(context).oneMoreEvent - : L10n.of(context).xMoreEvents(counter.toString()), + L10n.of(context).moreEvents(counter), style: TextStyle( fontWeight: FontWeight.bold, ),