Opened 6 years ago

Closed 6 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: UI/UX:

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).

Change History (1)

comment:1 Changed 6 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Dupe of #12380

Note: See TracTickets for help on using tickets.
Back to Top