From 8a8972f7ac2df6622099c0b4a36efd76adbba098 Mon Sep 17 00:00:00 2001 From: Daniel Gasienica Date: Fri, 23 Feb 2018 16:29:09 -0500 Subject: [PATCH] NOTE: Improve i18n pluralization --- js/notifications.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/notifications.js b/js/notifications.js index 42dd348de..5a6f30e27 100644 --- a/js/notifications.js +++ b/js/notifications.js @@ -64,6 +64,10 @@ var message; var iconUrl; + // NOTE: i18n has more complex rules for pluralization than just + // distinguishing between zero (0) and other (non-zero), + // e.g. Russian: + // http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html var newMessageCount = [ this.length, this.length === 1 ? i18n('newMessage') : i18n('newMessages')