i18next-conv
Advanced tools
Comparing version 0.0.6 to 0.1.0
@@ -16,4 +16,4 @@ // definition http://translate.sourceforge.net/wiki/l10n/pluralforms | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -41,4 +41,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -70,4 +70,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -86,4 +86,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -95,5 +95,5 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
5, | ||
1, | ||
2 | ||
2, | ||
5 | ||
], | ||
@@ -105,4 +105,4 @@ "plurals": function(n) { return Number(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -114,4 +114,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -138,5 +138,5 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
5, | ||
1, | ||
2 | ||
2, | ||
5 | ||
], | ||
@@ -148,4 +148,4 @@ "plurals": function(n) { return Number(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -164,5 +164,5 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
5, | ||
1, | ||
2 | ||
2, | ||
5 | ||
], | ||
@@ -174,5 +174,5 @@ "plurals": function(n) { return Number((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2); } | ||
"numbers": [ | ||
5, | ||
1, | ||
2 | ||
2, | ||
5 | ||
], | ||
@@ -184,5 +184,5 @@ "plurals": function(n) { return Number(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); } | ||
"numbers": [ | ||
3, | ||
1, | ||
2, | ||
3, | ||
8 | ||
@@ -195,4 +195,4 @@ ], | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -204,4 +204,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -220,4 +220,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -229,4 +229,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -238,4 +238,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -247,4 +247,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -256,4 +256,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -265,4 +265,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -274,4 +274,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -290,4 +290,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -307,4 +307,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -324,4 +324,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -333,4 +333,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -342,5 +342,5 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
3, | ||
1, | ||
2, | ||
2, | ||
3, | ||
7, | ||
@@ -354,6 +354,6 @@ 11 | ||
"numbers": [ | ||
20, | ||
1, | ||
2, | ||
3 | ||
3, | ||
20 | ||
], | ||
@@ -365,4 +365,4 @@ "plurals": function(n) { return Number((n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -374,4 +374,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -391,4 +391,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -400,4 +400,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -409,4 +409,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -418,5 +418,5 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
5, | ||
1, | ||
2 | ||
2, | ||
5 | ||
], | ||
@@ -428,4 +428,4 @@ "plurals": function(n) { return Number(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -437,4 +437,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -446,4 +446,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -462,4 +462,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -471,4 +471,4 @@ "plurals": function(n) { return Number(n%10!=1 || n%100==11); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -523,4 +523,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -539,4 +539,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -548,6 +548,6 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
4, | ||
1, | ||
2, | ||
3 | ||
3, | ||
4 | ||
], | ||
@@ -566,4 +566,4 @@ "plurals": function(n) { return Number((n==1) ? 0 : (n==2) ? 1 : (n == 3) ? 2 : 3); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -590,5 +590,5 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
10, | ||
1, | ||
2 | ||
2, | ||
10 | ||
], | ||
@@ -609,4 +609,4 @@ "plurals": function(n) { return Number(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -642,4 +642,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -651,4 +651,4 @@ "plurals": function(n) { return Number(n==1 || n%10==1 ? 0 : 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -660,4 +660,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -678,4 +678,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -694,4 +694,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
1, | ||
2, | ||
1, | ||
11, | ||
@@ -705,4 +705,4 @@ 20 | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -714,4 +714,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -723,4 +723,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -732,4 +732,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -741,4 +741,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -750,4 +750,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -759,4 +759,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -768,4 +768,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -793,4 +793,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -802,4 +802,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -811,5 +811,5 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
5, | ||
1, | ||
2 | ||
2, | ||
5 | ||
], | ||
@@ -821,4 +821,4 @@ "plurals": function(n) { return Number(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -830,4 +830,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -839,4 +839,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -848,4 +848,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -857,4 +857,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -866,4 +866,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1, | ||
2, | ||
20 | ||
@@ -876,5 +876,5 @@ ], | ||
"numbers": [ | ||
5, | ||
1, | ||
2 | ||
2, | ||
5 | ||
], | ||
@@ -893,4 +893,4 @@ "plurals": function(n) { return Number(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -902,4 +902,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -911,4 +911,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -920,5 +920,5 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
5, | ||
1, | ||
2 | ||
2, | ||
5 | ||
], | ||
@@ -940,4 +940,4 @@ "plurals": function(n) { return Number((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -949,4 +949,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -958,4 +958,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -967,5 +967,5 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
5, | ||
1, | ||
2 | ||
2, | ||
5 | ||
], | ||
@@ -984,4 +984,4 @@ "plurals": function(n) { return Number(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -993,4 +993,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -1002,4 +1002,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -1011,4 +1011,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -1043,4 +1043,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -1074,5 +1074,5 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
5, | ||
1, | ||
2 | ||
2, | ||
5 | ||
], | ||
@@ -1084,4 +1084,4 @@ "plurals": function(n) { return Number(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -1123,4 +1123,4 @@ "plurals": function(n) { return Number(n != 1); } | ||
"numbers": [ | ||
2, | ||
1 | ||
1, | ||
2 | ||
], | ||
@@ -1167,20 +1167,9 @@ "plurals": function(n) { return Number(n != 1); } | ||
var number = ext.numbers[i]; | ||
if (ext.numbers.length === 2) { | ||
// germanic like en | ||
if (ext.numbers[0] === 2) { | ||
if (number === 2) { | ||
number = 1; // singular | ||
} else if (number === 1) { | ||
number = -1; // regular plural | ||
} | ||
} | ||
// romanic like fr | ||
else if (ext.numbers[0] === 1) { | ||
if (number === 2) { | ||
number = -1; // regular plural | ||
} else if (number === 1) { | ||
number = 1; // singular | ||
} | ||
if (ext.numbers.length === 2 && ext.numbers[0] === 1) { | ||
if (number === 2) { | ||
number = -1; // regular plural | ||
} else if (number === 1) { | ||
number = 1; // singular | ||
} | ||
} //console.log(count + '-' + number); | ||
}//console.log(count + '-' + number); | ||
return number; | ||
@@ -1195,4 +1184,2 @@ } else { | ||
}; | ||
module.exports = pluralExtensions; | ||
}; |
@@ -6,3 +6,3 @@ { | ||
, "keywords": ["i18next", "gettext"] | ||
, "version": "0.0.6" | ||
, "version": "0.1.0" | ||
, "private": false | ||
@@ -9,0 +9,0 @@ , "preferGlobal": "true" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
0
111999
2581
3