1
0
mirror of https://github.com/django/django.git synced 2024-12-26 11:06:07 +00:00
Commit Graph

168 Commits

Author SHA1 Message Date
Tom Forbes
c00bc27945 Refs #30372 -- Stopped watching built-in Django translation files by auto-reloader. 2020-05-04 09:13:47 +02:00
Claude Paroz
e3e48b0012
Fixed #30439 -- Added support for different plural forms for a language.
Thanks to Michal Čihař for review.
2020-03-10 15:56:32 +01:00
Min ho Kim
fbb83fefd4 Fixed typos in comments and docs. 2019-07-02 09:36:17 +02:00
Andrew Godwin
a415ce70be Fixed #30451 -- Added ASGI handler and coroutine-safety.
This adds an ASGI handler, asgi.py file for the default project layout,
a few async utilities and adds async-safety to many parts of Django.
2019-06-20 12:29:43 +02:00
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
Daniel Hahler
08a4ee0651 Fixed typos in test names. 2019-04-27 07:47:42 +02:00
Jon Dufresne
6eb4996672 Fixed #30165 -- Deprecated ugettext(), ugettext_lazy(), ugettext_noop(), ungettext(), and ungettext_lazy(). 2019-02-08 10:05:53 -05:00
Tim Graham
77d25dbd0f Refs #27753 -- Favored SafeString over SafeText. 2019-02-06 14:12:06 -05:00
Jon Dufresne
7785e03ba8 Fixed #30137 -- Replaced OSError aliases with the canonical OSError.
Used more specific errors (e.g. FileExistsError) as appropriate.
2019-01-28 11:15:06 -05:00
Tom Forbes
c8720e7696 Fixed #27685 -- Added watchman support to the autoreloader.
Removed support for pyinotify (refs #9722).
2019-01-13 20:33:47 -05:00
Patrick Arminio
ae180fa4b7 Fixed #29986 -- Added .format() support to ngettext_lazy strings. 2018-12-06 15:12:34 -05:00
Simon Charette
0f212db29d Made reused RequestFactory instances class attributes. 2018-11-27 09:49:02 -05:00
David
5db8d617c0 Fixed #29713 -- Added check that LANGUAGE_CODE uses standard language id format. 2018-09-03 10:43:55 +02:00
Tim Graham
013d439ff0 Refs #29600 -- Added test for datetime_safe usage in localize_input(). 2018-07-26 16:51:50 -04:00
Claude Paroz
0adfba968e Fixed #29578 -- Made numberformat.format() honor forced l10n usage.
Thanks Sassan Haradji for the report.
2018-07-19 16:44:40 -04:00
Tim Graham
1e0cbc72e5
Moved to_language() to django.utils.translation.
Follow up to 1b7d524cfa.
2018-05-12 15:03:38 -04:00
Tim Graham
1b7d524cfa Consolidated duplicate to_locale() implementations.
Follow up to ac59ec8f1a.
2018-05-12 12:58:21 -04:00
Hasan Ramezani
305dee7bf9 Increased django.utils.translation.trans_null test coverage. 2018-05-12 11:23:44 -04:00
Hasan Ramezani
ac59ec8f1a Aliased trans_null.to_locale() to trans_real.to_locale().
The implementations have unintentionally diverged.
2018-05-12 10:54:22 -04:00
Hasan Ramezani
7ba040de77 Added tests for trans_null.ngettext(). 2018-05-09 09:54:41 -04:00
Patryk Zawadzki
a20aae414e Fixed #29144 -- Made untranslated strings for territorial language variants use translations from the generic language variant. 2018-03-03 12:08:24 -05:00
Sebastian Sangervasi
7905815510 Fixed #27449 -- Added django.utils.translation.get_supported_language_variant(). 2018-02-23 14:49:00 -05:00
Sebastian Sangervasi
f7b46f0b58 Removed unneeeded inner import in i18n tests. 2018-02-21 08:59:31 -05:00
Chillar Anand
e8e0cfa9e5 Fixed #28755 -- Made check_for_language() include apps' locale directories. 2018-02-20 21:34:40 -05:00
Manatsawin Hanmongkolchai
1a1264f149 Fixed #29109 -- Fixed the admin time picker widget for the Thai locale. 2018-02-10 16:05:41 -05:00
Vlastimil Zíma
fbc3c29e7c Fixed #29036 -- Fixed HTML5 required validation on SelectDateWidget if the attribute is added by JavaScript.
Thanks Tim Graham for the initial patch.
2018-01-30 19:09:31 -05:00
Jon Dufresne
ff05de760c Fixed #29038 -- Removed closing slash from HTML void tags. 2018-01-21 02:09:10 -05:00
Mariusz Felisiak
83a36ac49a
Removed unnecessary trailing commas and spaces in various code. 2017-12-28 21:07:29 +01:00
Claude Paroz
1b7780ea08 Fixed #28544 -- Made unlocalize template filter behave like {% localize off %} tag
Thanks Beda Kosata for the report and Tim Graham for the review.
2017-11-07 20:48:15 +01:00
Claude Paroz
c1fa6672dd Refs #28710 -- Simplified l10n format test 2017-10-14 21:07:51 +02:00
Claude Paroz
8c538871bd Fixed #28710 -- Fixed the Basque DATE_FORMAT string
Thanks Eneko Illarramendi for the report and initial patch.
2017-10-13 19:48:20 +02:00
Tom
f1c007bbf2 Fixed #28642 -- Added caching to parse_accept_lang_header(). 2017-10-02 14:07:28 -04:00
Tom
f04e6732c3 Refs #27804 -- Used subTest() in parse_accept_lang_header() test. 2017-10-02 14:04:52 -04:00
Tim Graham
87d2240e6c Refs #27067 -- Removed django.utils.translation.string_concat() per deprecation timeline. 2017-09-22 12:51:17 -04:00
Tim Graham
0c4ac12a7b Fixed #28546 -- Fixed translation's to_locale() with langauge subtags.
Thanks Brent Hand for the initial patch.
2017-09-08 13:46:00 -04:00
Tim Graham
9829b75d5b Added more tests for translation's to_locale(). 2017-09-08 13:43:06 -04:00
Jaap Roes
408ed9fea4 Fixed typo in tests/i18n/tests.py comment. 2017-07-10 12:08:57 -04:00
Claude Paroz
ceca221b31 Fixed #28304 -- Kept SafeData type for pgettext-translated strings 2017-06-15 21:00:50 +02:00
Claude Paroz
a6b5321ce9 Refs #24423 -- Readded inadvertently deleted i18n tests.
Mistake in 97c1931c4f.
2017-06-14 21:34:33 -04:00
Raphael Michel
504e7782fe Refs #22654 -- Added additional tests and amended release note. 2017-05-05 18:45:07 -04:00
Claude Paroz
c651331b34 Converted usage of ugettext* functions to their gettext* aliases
Thanks Tim Graham for the review.
2017-02-07 09:04:04 +01:00
Vytis Banaitis
8838d4dd49 Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments. 2017-02-01 11:41:56 -05:00
Claude Paroz
52138b1fd0 Refs #23919 -- Removed usage of obsolete SafeBytes class
The class will be removed as part of #27753.
Thanks Tim Graham for the review.
2017-01-30 15:04:45 +01:00
chillaranand
d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Claude Paroz
042b7350a0 Refs #23919 -- Removed unneeded str() calls 2017-01-20 14:13:55 +01:00
Tim Graham
4e729feaa6 Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.
These functions do nothing on Python 3.
2017-01-20 08:01:02 -05:00
Claude Paroz
7b2f2e74ad Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz
c716fe8782 Refs #23919 -- Removed six.PY2/PY3 usage
Thanks Tim Graham for the review.
2017-01-18 16:21:28 +01:00
Claude Paroz
d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Andy Craze
97c1931c4f Fixed #24423 -- Reorganized i18n tag tests. 2017-01-06 10:33:07 -05:00