Opened 16 years ago
Closed 16 years ago
#12381 closed (duplicate)
Shouldn't the pluralize filter consider 0 to be singular?
| Reported by: | aleray | Owned by: | nobody |
|---|---|---|---|
| Component: | Contrib apps | Version: | 1.1 |
| Severity: | Keywords: | pluralize templatetag | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Shouldn't the pluralize filter consider 0 to be singular?
Consider this example:
{% get_comment_count for paragraph as comment_count %}
{{ comment_count }} comment{{ comment_count|pluralize }}
For instance if comment_count is equal to 0, the output will be "0 comments" (with a final s).
Note:
See TracTickets
for help on using tickets.
Dupe of #12380