Kaydet (Commit) e3968df5 authored tarafından Tobias Kunze's avatar Tobias Kunze Kaydeden (comit) Mariusz Felisiak

Refs #20122 -- Corrected documentation of pluralize template filter.

üst a9b88982
......@@ -851,8 +851,8 @@ def filesizeformat(bytes_):
@register.filter(is_safe=False)
def pluralize(value, arg='s'):
"""
Return a plural suffix if the value is not 1. By default, use 's' as the
suffix:
Return a plural suffix if the value is not 1, '1', or an object of
length 1. By default, use 's' as the suffix:
* If value is 0, vote{{ value|pluralize }} display "votes".
* If value is 1, vote{{ value|pluralize }} display "vote".
......
......@@ -1990,8 +1990,8 @@ If ``value`` is ``800-COLLECT``, the output will be ``800-2655328``.
``pluralize``
-------------
Returns a plural suffix if the value is not 1. By default, this suffix is
``'s'``.
Returns a plural suffix if the value is not ``1``, ``'1'``, or an object of
length 1. By default, this suffix is ``'s'``.
Example::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment