We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I just detect a minor bug in your script for the "pluralize".
Numéric> 1 = Plurialize string OK Numéric = 1 = singularize string OK Numéric = 0 = Singlularize string KO
I thank in advance the creator of this script to modify its code.
Update if (Math.abs(count) === 1) by if (Math.abs(count) === 1 || Math.abs(count) === 0)
function pluralize(format, count) { var plural = "s", singular = ""; if (format) { format = format.replace(/(:|;|\s)/gi, "").split(/\,/); if (format.length === 1) { plural = format[0]; } else { singular = format[0]; plural = format[1]; } } if (Math.abs(count) === 1 || Math.abs(count) === 0 ) { return singular; } else { return plural; } }
The text was updated successfully, but these errors were encountered:
0973e35
No branches or pull requests
Hello,
I just detect a minor bug in your script for the "pluralize".
Numéric> 1 = Plurialize string OK
Numéric = 1 = singularize string OK
Numéric = 0 = Singlularize string KO
I thank in advance the creator of this script to modify its code.
Update if (Math.abs(count) === 1) by if (Math.abs(count) === 1 || Math.abs(count) === 0)
The text was updated successfully, but these errors were encountered: