django1/tests/i18n
Jon Dufresne 9e38ed0536 Fixed #27486 -- Fixed Python 3.7 DeprecationWarning in intword and filesizeformat filters.
intword and filesizeformat passed floats to ngettext() which is
deprecated in Python 3.7. The rationale for this warning is documented
in BPO-28692: https://bugs.python.org/issue28692.

For filesizeformat, the filesize value is expected to be an int -- it
fills %d string formatting placeholders. It was likely coerced to a
float to ensure floating point division on Python 2. Python 3 always
does floating point division, so coerce to an int instead of a float to
fix the warning.

For intword, the number may contain a decimal component. In English, a
decimal component makes the noun plural. A helper function,
round_away_from_one(), was added to convert the float to an integer that
is appropriate for ngettext().
2019-06-11 20:34:59 +02:00
..
commands Converted usage of ugettext* functions to their gettext* aliases 2017-02-07 09:04:04 +01:00
contenttypes Fixed #16027 -- Added app_label to ContentType.__str__(). 2019-02-07 19:56:47 -05:00
exclude Converted usage of ugettext* functions to their gettext* aliases 2017-02-07 09:04:04 +01:00
other Fixed #29986 -- Added .format() support to ngettext_lazy strings. 2018-12-06 15:12:34 -05:00
other2 Fixed #20477: Allowed list of modules for FORMAT_MODULE_PATH 2014-05-21 07:35:47 -04:00
patterns Updated test URL patterns to use path() and re_path(). 2018-12-31 10:47:32 -05:00
project_dir Converted usage of ugettext* functions to their gettext* aliases 2017-02-07 09:04:04 +01:00
resolution Removed superfluous models.py files. 2013-12-17 11:16:48 +01:00
sampleproject Reverted "Fixed #27878, refs #23919 -- Used python3 shebangs." 2017-03-07 10:10:32 -05:00
territorial_fallback Fixed #29144 -- Made untranslated strings for territorial language variants use translations from the generic language variant. 2018-03-03 12:08:24 -05:00
__init__.py Fixed #21307 -- Moved TransRealMixin to django.test.utils. 2013-10-22 22:19:56 -03:00
forms.py Fixed #24219 -- Moved SelectDateWidget together with the other widgets 2015-01-27 22:40:02 +07:00
models.py Converted usage of ugettext* functions to their gettext* aliases 2017-02-07 09:04:04 +01:00
test_compilation.py Fixed #29973 -- Added compilemessages --ignore option. 2019-01-28 18:23:41 -05:00
test_extraction.py Removed redundant os.chdir() in RunInTmpDirMixin child classes. 2019-02-05 11:00:04 -05:00
test_management.py Added a test for TranslatableFile.__eq__(). 2017-09-25 10:22:38 -04:00
test_percents.py Removed default mode='r' argument from calls to open(). 2019-01-27 17:41:43 -05:00
tests.py Fixed #27486 -- Fixed Python 3.7 DeprecationWarning in intword and filesizeformat filters. 2019-06-11 20:34:59 +02:00
urls.py Updated test URL patterns to use path() and re_path(). 2018-12-31 10:47:32 -05:00
urls_default_unprefixed.py Updated test URL patterns to use path() and re_path(). 2018-12-31 10:47:32 -05:00
utils.py Removed unused RunInTmpDirMixin.rmfile(). 2019-02-05 13:44:32 +01:00