better pluralize

This commit is contained in:
Ludovic Stephan 2017-02-11 21:41:09 -02:00
parent fc2de20ab8
commit 02735642f1

View file

@ -140,6 +140,7 @@ function requestAuth(data, callback, focus_next = null) {
}
String.prototype.pluralize = function(count, irreg_plural = false) {
plural = irreg_plural ? irreg_plural : this + 's' ;
return (count==1 ? this : plural) ;
if (Math.abs(count) >= 2)
return irreg_plural ? irreg_plural : this+'s' ;
return this ;
}