Fix Occitan's locale data plural function (#2957)

* Fix the pluralRuleFunction of the locale data.
* Added more descriptions about how to write it.
This commit is contained in:
Koala Yeung
2017-05-10 20:44:48 +08:00
committed by Eugen Rochko
parent 2db53526c9
commit 7ac092513c
2 changed files with 95 additions and 8 deletions

View File

@@ -3,13 +3,8 @@
export default [{
locale: "oc",
pluralRuleFunction: function(e, a) {
var n = String(e).split("."),
l = !n[1],
o = Number(n[0]) == e,
t = o && n[0].slice(-1),
r = o && n[0].slice(-2);
return a ? 1 == t && 11 != r ? "un" : 2 == t && 12 != r ? "dos" : 3 == t && 13 != r ? "pauc" : "autre" : 1 == e && l ? "un" : "autre"
pluralRuleFunction: function (e, a) {
return a ? 1 == e ? "one" : "other" : e >= 0 && e < 2 ? "one" : "other";
},
fields: {
year: {