Releases: nfsmaniac/simplin.js
Releases · nfsmaniac/simplin.js
v1.1.0
A new function getAllTranslated()
was added to get every translation for a string query – all in one single object.
This release allows translators to define special zero
-case plural form.
Old behaviour
"MSG_NEW_MESSAGE": {
"zero": "Nemáte žádné nové zprávy.",
"one": "Máte %i novou zprávu.",
"few": "Máte %i nové zprávy.",
"other": "Máte %i nových zpráv."
}
Input: 0
Result: Máte 0 nových zpráv.
New behaviour
"MSG_NEW_MESSAGE": {
"zero": "Nemáte žádné nové zprávy.",
"one": "Máte %i novou zprávu.",
"few": "Máte %i nové zprávy.",
"other": "Máte %i nových zpráv."
}
Input: 0
Result: Nemáte žádné nové zprávy.
Explanation
Per standard, there might be no zero
plural form for a language. Plural form decisioning is based on Intl.PluralRules.
Old behaviour was perfectly fine and grammaticaly correct, however, some translators might prefer number-less sentence for a "0" case, which is not against anything.
Full Changelog: 1.0.1...1.1.0
First release
This release addresses critical issues.
Full Changelog: 1.0.0...1.0.1
First release (testing)
1.0.0 Update package.json