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

This commit is contained in:
Tobias Kunze 2019-04-27 18:08:39 +02:00 committed by Mariusz Felisiak
parent a9b8898242
commit e3968df527
2 changed files with 4 additions and 4 deletions

View File

@ -851,8 +851,8 @@ def filesizeformat(bytes_):
@register.filter(is_safe=False) @register.filter(is_safe=False)
def pluralize(value, arg='s'): def pluralize(value, arg='s'):
""" """
Return a plural suffix if the value is not 1. By default, use 's' as the Return a plural suffix if the value is not 1, '1', or an object of
suffix: length 1. By default, use 's' as the suffix:
* If value is 0, vote{{ value|pluralize }} display "votes". * If value is 0, vote{{ value|pluralize }} display "votes".
* If value is 1, vote{{ value|pluralize }} display "vote". * If value is 1, vote{{ value|pluralize }} display "vote".

View File

@ -1990,8 +1990,8 @@ If ``value`` is ``800-COLLECT``, the output will be ``800-2655328``.
``pluralize`` ``pluralize``
------------- -------------
Returns a plural suffix if the value is not 1. By default, this suffix is Returns a plural suffix if the value is not ``1``, ``'1'``, or an object of
``'s'``. length 1. By default, this suffix is ``'s'``.
Example:: Example::