intword behavior change in Django 3.0.

12 views
Skip to first unread message

Mariusz Felisiak

unread,
Jun 11, 2019, 3:01:04 AM6/11/19
to Django internationalization and localization
In Django 3.0 all numeric values in {intword} (see [1]) template filter will be translated as plural, except 1.0 which will be translated as a singular phrase. This may be incorrect for some languages.  

This change is due to the fact that passing floats to {ngettext()} is deprecated in Python 3.7 (see [2]).

[1] https://docs.djangoproject.com/en/dev/ref/contrib/humanize/#intword
[2] https://bugs.python.org/issue28692
Reply all
Reply to author
Forward
0 new messages