Commit Graph

153 Commits

Author SHA1 Message Date
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
Claude Paroz 1206d7fa57 Refs #25753 -- Reset l10n cache when format settings change
Thanks Jaap Roes for the initial patch.
2016-12-21 17:40:08 +01:00
Tim Graham b5f0b3478d Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
Krzysztof Urbaniak b8a815e9df Fixed #27402 -- Fixed incorrect LocaleMiddleware redirects with prefix_default_language=False. 2016-11-29 13:06:35 -05:00
Ramin Farajpour Cami 0a63ef3f61 Fixed #27463 -- Fixed E741 flake8 warnings. 2016-11-14 17:40:28 -05:00
za 321e94fa41 Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Krzysztof Urbaniak a01d887a3a Fixed #27063 -- Prevented i18n_patterns() from using too much of the URL as the language. 2016-10-31 14:32:01 -04:00
Krzysztof Urbaniak ee06689878 Added additional tests for translation's get_language_from_path(). 2016-10-31 11:55:24 -04:00
Jon Dufresne 2c716c1dc7 Fixed #27256 -- Changed Select widget's selected attribute to use HTML5 boolean syntax. 2016-09-21 15:12:13 -07:00
Tim Graham 8119b679eb Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.
http://bugs.python.org/issue27364
2016-09-17 15:44:06 -04:00
Mattias Loverot 2315114090 Fixed #27067 -- Deprecated string_concat() in favor of format_lazy(). 2016-08-25 16:12:40 -04:00
Alex Hill 971120778a
Fixed #26945 -- Ensured that i18n_patterns returns a list 2016-07-24 17:17:00 +02:00
Tim Graham c9ae09addf Replaced use of TestCase.fail() with assertRaises().
Also removed try/except/fail antipattern that hides exceptions.
2016-06-28 11:21:26 -04:00
jasisz b5a1c3a6f5 Fixed #25920 -- Added support for non-uniform NUMBER_GROUPING. 2016-06-22 17:28:49 -04:00
Jon Dufresne 4f336f6652 Fixed #26747 -- Used more specific assertions in the Django test suite. 2016-06-16 14:19:18 -04:00
Vytis Banaitis 57eb17b8c7 Fixed #26746 -- Fixed handling of zero priority in Accept-Language header parsing. 2016-06-13 07:58:25 -04:00