#27486: intword and filesizeformat filters shouldn't pass non-integers to
gettext
-------------------------------------+-------------------------------------
Reporter: Tim | Owner: Tim Graham
Graham |
Type: | Status: assigned
Cleanup/optimization |
Component: Template | Version: master
system |
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Python plans to [http://bugs.python.org/issue28692 deprecate selecting
plural form by fractional numbers]. The `intword` and `filesizeformat`
template filters are currently doing this:
{{{
$ python -Wall tests/runtests.py
humanize_tests.tests.HumanizeTests.test_i18n_intword
Testing against Django installed in '/home/tim/code/django/django' with up
to 3 processes
Creating test database for alias 'default'...
Creating test database for alias 'other'...
/home/tim/code/django/django/utils/translation/trans_real.py:373:
DeprecationWarning: Plural value must be an integer, got float
return getattr(t, translation_function)(singular, plural, number)
.
}}}
{{{
python -Wall tests/runtests.py
template_tests.filter_tests.test_filesizeformat.FunctionTests.test_localized_formats
Testing against Django installed in '/home/tim/code/django/django' with up
to 3 processes
Creating test database for alias 'default'...
Creating test database for alias 'other'...
/home/tim/code/django/django/utils/translation/trans_real.py:373:
DeprecationWarning: Plural value must be an integer, got float
return getattr(t, translation_function)(singular, plural, number)
.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27486>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.99b4c8732fd66c9ed4fb41efd513f3bf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.