#16723: Pluralize filter shouldn't pluralize decimal/float values between 1 and 2 ------------------------------------+--------------------------------- Reporter: rfugger | Owner: nobody Type: Bug | Status: new Milestone: | Component: Template system Version: SVN | Severity: Normal Resolution: | Keywords: Triage Stage: Accepted | Has patch: 1 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | ------------------------------------+--------------------------------- Changes (by aaugustin):
* stage: Unreviewed => Accepted Comment: The docs say that `pluralize` "returns a plural suffix if the value is not 1". It looks like `int(value)` is only intended to convert a string to an int and pluralize wasn't designed to deal with float values. An alternative fix could be to change the check to `if str(value) != "1"`. Thus 1.0 will be pluralized and it's still a one-liner. -- Ticket URL: <https://code.djangoproject.com/ticket/16723#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.