NOTE: Improve i18n pluralization
This commit is contained in:
parent
a76b1389e6
commit
8a8972f7ac
1 changed files with 4 additions and 0 deletions
|
@ -64,6 +64,10 @@
|
||||||
var message;
|
var message;
|
||||||
var iconUrl;
|
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 = [
|
var newMessageCount = [
|
||||||
this.length,
|
this.length,
|
||||||
this.length === 1 ? i18n('newMessage') : i18n('newMessages')
|
this.length === 1 ? i18n('newMessage') : i18n('newMessages')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue