You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, is the documentation about pluralRules still accurate? I'm having some trouble defining my own.. it doesn't seem to work. Here's my definition, I copy pasted if from the Readme and modify it:
constpolyglot=newPolyglot({locale: 'foo',phrases: {messages: 'You have no new messages.||||You have %{smart_count} new message.||||You have %{smart_count} new messages.',},pluralRules: {pluralTypes: {noneLike: function(n){if(n===0)return0;if(n===1)return1;return2;},},pluralTypeToLanguages: {noneLike: ['foo']}}});
It should print:
You have no new messages.
You have 1 new message.
You have 30 new messages.
But instead it's:
You have 0 new message.
You have no new messages.
You have 30 new message.
Hi, is the documentation about
pluralRules
still accurate? I'm having some trouble defining my own.. it doesn't seem to work. Here's my definition, I copy pasted if from the Readme and modify it:It should print:
But instead it's:
I wrote a CodePen: https://codepen.io/josemigallas/pen/poJxYNX
The text was updated successfully, but these errors were encountered: