From 40c23cc16605fca5f0dd7ea07ecaa9b56c62e84c Mon Sep 17 00:00:00 2001 From: Chad Date: Fri, 14 Sep 2018 11:26:15 +0200 Subject: [PATCH] fix zero plural localisation issue fix zero case for :t/members-active key --- src/status_im/chat/views/toolbar_content.cljs | 4 +++- translations/en.json | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/status_im/chat/views/toolbar_content.cljs b/src/status_im/chat/views/toolbar_content.cljs index a246f1c089..7d561ea3f2 100644 --- a/src/status_im/chat/views/toolbar_content.cljs +++ b/src/status_im/chat/views/toolbar_content.cljs @@ -62,7 +62,9 @@ (if public? (i18n/label :t/public-group-status) (let [cnt (inc (count contacts))] - (i18n/label-pluralize cnt :t/members-active)))]]))) + (if (zero? cnt) + (i18n/label :members-active-none) + (i18n/label-pluralize cnt :t/members-active))))]]))) (defview toolbar-content-view [] (letsubs [{:keys [group-chat color online contacts diff --git a/translations/en.json b/translations/en.json index 4e20eca422..1fb48a410f 100644 --- a/translations/en.json +++ b/translations/en.json @@ -21,9 +21,9 @@ "currency-display-name-sos": "Somalia Shilling", "members-active": { "one": "1 member", - "other": "{{count}} members", - "zero": "no members" + "other": "{{count}} members" }, + "members-active-none": "no members", "chat-name": "Chat name", "currency-display-name-zar": "South Africa Rand", "phew-here-is-your-passphrase": "Phew, that was hard. Here is your passphrase, *write this down and keep it safe!* You will need it to recover your account.", @@ -561,9 +561,9 @@ "transactions-unsigned": "Unsigned", "members": { "one": "1 member", - "other": "{{count}} members", - "zero": "no members" + "other": "{{count}} members" }, + "members-none": "no members", "delete-mailserver-title": "Delete mailserver", "intro-message1": "Welcome to Status!\nTap this message to set your password and get started.", "public-chat-user-count": "{{count}} people",