summaryrefslogtreecommitdiff
path: root/tests/i18n
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #34515 -- Made LocaleMiddleware prefer language from paths when i18n ↵Mariusz Felisiak2023-05-023-17/+28
| | | | | | | | | | | | | | patterns are used. Regression in 94e7f471c4edef845a4fe5e3160132997b4cca81. This reverts commit 94e7f471c4edef845a4fe5e3160132997b4cca81 (refs #34069) and partly reverts commit 3b4728310a7a64f8fcc548163b0aa5f98a5c78f5. Thanks Anthony Baillard for the report. Co-Authored-By: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
* Fixed #34455 -- Restored i18n_patterns() respect of prefix_default_language ↵sarahboyce2023-04-101-0/+6
| | | | | | | | argument when fallback language is used. Regression in 94e7f471c4edef845a4fe5e3160132997b4cca81. Thanks Oussama Jarrousse for the report.
* Fixed #33985 -- Used app_config.verbose_name in ContentType.__str__().Hrushikesh Vaidya2023-03-091-2/+2
|
* Refs #33476 -- Applied Black's 2023 stable style.David Smith2023-02-012-10/+0
| | | | | | | | Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
* Fixed CVE-2023-23969 -- Prevented DoS with pathological values for ↵Nick Pope2023-02-011-0/+12
| | | | | | | | | | | | Accept-Language. The parsed values of Accept-Language headers are cached in order to avoid repetitive parsing. This leads to a potential denial-of-service vector via excessive memory usage if the raw value of Accept-Language headers is very large. Accept-Language headers are now limited to a maximum length in order to avoid this issue.
* Refs #32873 -- Removed settings.USE_L10N per deprecation timeline.Mariusz Felisiak2023-01-171-232/+16
|
* Simplified django.utils.formats.date_format()/time_format() calls.Nick Pope2023-01-041-19/+6
| | | | | This removes redundant get_format() calls and passing a default value for the format argument.
* Refs #34074 -- Used headers argument for RequestFactory and Client in docs ↵David Wobrock2023-01-042-26/+42
| | | | and tests.
* Fixed #34074 -- Added headers argument to RequestFactory and Client classes.David Wobrock2022-11-141-2/+2
|
* Fixed #34069 -- Made LocaleMiddleware respect language from requests when ↵Sergio2022-10-131-5/+16
| | | | i18n patterns are used.
* Used test client headers in i18n tests.Adam Johnson2022-10-101-115/+79
|
* Fixed CVE-2022-41323 -- Prevented locales being interpreted as regular ↵Adam Johnson2022-10-041-0/+6
| | | | | | expressions. Thanks to Benjamin Balder Bach for the report.
* Updated translations from Transifex.Mariusz Felisiak2022-08-031-11/+7
| | | | | | | | This also fixes related i18n tests. Forwardport of a3bab9332416f655c6ae0fa306c94f7f52e7398d from stable/4.1.x. Co-authored-by: Claude Paroz <claude@2xlibre.net>
* Fixed BasicExtractorTests.test_makemessages_find_files() test.Claude Paroz2022-07-261-2/+4
|
* Fixed #23689 -- Made parsing HTTP Accept-Language header case-insensitive.Zainab Amir2022-06-201-2/+6
| | | | Thank you Daniel Samuels for test project.
* Fixed #33565 -- Improved locale format validation for the makemessages command.Ronnie van den Crommenacker2022-06-081-1/+83
|
* Fixed #33748 -- Fixed date template filter crash with lazy format.Claude Paroz2022-05-311-0/+3
| | | | Regression in 659d2421c7adbbcd205604002d521d82d6b0b465.
* Removed 'tests' path prefix in a couple tests.Tim Graham2022-05-021-1/+1
|
* Fixed #33661 -- Corrected Catalan date-format localization.mpachas2022-04-281-1/+4
| | | | | | | | Changed DATE_FORMAT, DATETIME_FORMAT and MONTH_DAY_FORMAT to use E placeholder (Month, locale specific alternative) to handle both “de gener” and contracted “d’abril” cases. Thanks to Ferran Jovell for review.
* Fixed #16406 -- Added ResolveMatch.captured_kwargs and extra_kwargs.Alokik Vijay2022-03-292-2/+22
| | | | Thanks Florian Apolloner for the review and implementation idea.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-074-39/+83
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-0725-1425/+2019
|
* Fixed #28628 -- Changed \d to [0-9] in regexes where appropriate.Ad Timmering2022-01-071-0/+1
|
* Updated translations from Transifex.Mariusz Felisiak2021-12-061-6/+12
| | | | | | | | This also fixes related i18n tests. Forwardport of 4c5215ab036aa8fda9cd0148fd034f4d8f7d69d1 from stable/4.0.x Co-authored-by: Claude Paroz <claude@2xlibre.net>
* Fixed #33078 -- Added support for language regions in i18n_patterns().Maxim Piskunov2021-12-031-2/+10
|
* Refs #33078 -- Added extra assertions to ↵Mariusz Felisiak2021-12-031-9/+20
| | | | MiscTests.test_get_language_from_path_real().
* Fixed #6106 -- Prevented makemessages from changing .po files when up to date.Ad Timmering2021-11-114-0/+67
| | | | Co-authored-by: Daniyal Abbasi <abbasi.daniyal98@gmail.com>
* Fixed #32873 -- Deprecated settings.USE_L10N.Claude Paroz2021-09-141-23/+52
| | | | Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #30086, Refs #32873 -- Made floatformat template filter independent of ↵Mariusz Felisiak2021-09-081-9/+9
| | | | USE_L10N.
* Fixed #32768 -- Added Vary header when redirecting to prefixed i18n pattern.Alex Hayward2021-09-011-1/+5
| | | | | | get_language_from_request() uses Accept-Language and/or Cookie to determine the correct redirect. Upstream caches need the matching Vary header to cache the result.
* Fixed #32941 -- Removed get_format_modules()'s unused reverse argument.Keryn Knight2021-07-191-10/+3
| | | | Unused since 0d8b523422fda71baa10807d5aebefd34bad7962.
* Refs #32144 -- Made makemessages remove temporary files on preprocessing error.Carlton Gibson2021-07-012-1/+8
| | | | Co-authored-by: Anders Hovmöller <anders.hovmoller@dryft.se>
* Fixed #32144 -- Made makemessages remove temporary files when locale path ↵Carlton Gibson2021-07-012-0/+6
| | | | doesn't exist.
* Fixed typo in makemessages error message.Jacob Walls2021-06-211-2/+2
|
* Fixed typos in test comments.luzpaz2021-06-071-1/+1
|
* Fixed #32762 -- Fixed locale reset in compilemessages test.Nilo César Teixeira2021-05-261-1/+1
| | | | | Reset the `LC_ALL` override value in the test environment to ensure that locale values the calling environment are not used.
* Refs #32738 -- Added sanitize_strftime_format() to replace datetime_safe.Nick Pope2021-05-121-1/+47
|
* Fixed #32479 -- Added fallbacks to subsequent language codes in translations.Maxim Beder2021-05-051-0/+20
| | | | Thanks Claude Paroz and Nick Pope for reviews.
* Fixed capitalization of "ECMAScript" and "JavaScript".Nick Pope2021-04-291-1/+1
|
* Fixed isolation of i18n.tests.FormattingTests.test_get_custom_format().Mariusz Felisiak2021-04-221-0/+1
|
* Updated translations from Transifex.Claude Paroz2021-04-061-6/+6
| | | | Forwardport of 1ea5e983151f797b285c789626411b9373cd8727 from stable/3.2.x.
* Fixed #32581 -- Prevented to_locale() from corrupting locale names.Claude Paroz2021-03-221-0/+4
|
* Added to_locale() tests for 3-char language codes.Claude Paroz2021-03-221-0/+3
|
* Fixed #32145 -- Improved makemessages error message when app's locale ↵Josh Santos2021-02-091-2/+6
| | | | directory doesn't exist.
* Refs #15902 -- Stopped set_language() storing user's language in the session.Mariusz Felisiak2021-01-141-20/+4
| | | | Per deprecation timeline.
* Refs #30165 -- Removed ugettext(), ugettext_lazy(), ugettext_noop(), ↵Mariusz Felisiak2021-01-141-43/+1
| | | | ungettext(), and ungettext_lazy() per deprecation timeline.
* Fixed #29712 -- Made makemessages warn if locales have hyphens and skip them.manav0142020-11-131-0/+14
|
* Fixed #20601 -- Allowed forcing format with thousand separators in ↵Jacob Walls2020-10-131-0/+24
| | | | | | floatformat filter. Thanks Claude Paroz and Nick Pope for reviews.
* Fixed #31850 -- Fixed BasicExtractorTests.test_extraction_warning with ↵Max Smolens2020-10-071-2/+2
| | | | | | | | | | xgettext 0.21+. "format string with unnamed arguments cannot be properly localized" warning is not raised in xgettext 0.21+. This patch uses a message that causes an xgettext warning regardless of the version.
* Fixed #31789 -- Added a new headers interface to HttpResponse.Tom Carrick2020-09-141-12/+12
|