summaryrefslogtreecommitdiff
path: root/django/views/i18n.py
AgeCommit message (Collapse)Author
2025-10-03Fixed #36636, Refs #15902 -- Removed session-based storage reference from ↵Dani Fornons
set_language() docs.
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-07-23Refs #36500 -- Shortened some long docstrings and comments.Mike Edmunds
Manually reformatted some long docstrings and comments that would be damaged by the to-be-applied autofixer script, in cases where editorial judgment seemed necessary for style or wording changes.
2023-02-17Fixed #34343 -- Moved built-in templates to filesystem.Nick Pope
2022-07-25Fixed #33863 -- Fixed JavaScriptCatalog with more than 1 level of fallback ↵Claude Paroz
translations. Co-authored-by: Carlos Mermingas <cmermingas@gmail.com>
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-01-29Fixed #32345 -- Fixed preserving encoded query strings in set_language() view.Sandro Covo
Thanks Johannes Maron for the review.
2021-01-14Refs #15902 -- Stopped set_language() storing user's language in the session.Mariusz Felisiak
Per deprecation timeline.
2020-08-05Refs #31493 -- Replaced var with const and let in JavaScriptCatalog template.Claude Paroz
2020-07-01Simplified JavaScript with Array.prototype.includes().Jon Dufresne
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes
2020-05-11Refs #30116 -- Simplified regex match group access with Match.__getitem__().Jon Dufresne
The method has been available since Python 3.6. The shorter syntax is also marginally faster.
2020-05-05Fixed #31534 -- Deprecated django.conf.urls.url().David Smith
2020-01-27Refs #30997 -- Removed HttpRequest.is_ajax() usage.Claude Paroz
2020-01-09Renamed set_language()'s next variable to avoid clash with builtin.Mike Yusko
2019-09-02Fixed #30747 -- Renamed is_safe_url() to url_has_allowed_host_and_scheme().Carlton Gibson
2019-04-08Fixed #30304 -- Added support for the HttpOnly, SameSite, and Secure flags ↵Ran Benita
on language cookies.
2019-02-14Refs #15902 -- Deprecated storing user's language in the session.Claude Paroz
2019-01-28Fixed #29825 -- Fixed JS ngettext if the string is a non-plural msgid in the ↵Claude Paroz
catalog.
2018-06-22Fixed #29511 -- Added charset to JavaScriptCatalog's Content-Type header.Tim Graham
2018-06-21Removed views.i18n.null_javascript_catalog().Tim Graham
Unused since de40cfbe74642df1e94c131e1adaa3363173c0cf.
2018-01-03Fixed #28982 -- Simplified code with and/or.Дилян Палаузов
2018-01-03Refs #15902 -- Made set_language() view always set the current language in a ↵Claude Paroz
cookie. The plan is to later deprecate/remove storing the language in the session.
2017-08-23Removed unneeded iter() calls.Sergey Fedoseev
A few of these were unnecessarily added in 2b281cc35ed9d997614ca3c416928d7fabfef1ad.
2017-06-06Fixed #18394 -- Added error for invalid JavaScriptCatalog packagesClaude Paroz
Thanks Tim Graham for the review.
2017-06-01Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne
2017-05-25Fixed #28221 -- Fixed plural fallback translations in JavaScriptCatalog viewClaude Paroz
Thanks Waldemar Kornewald for the report and initial patch.
2017-05-20Refs #28221 -- Honor plural number in JavaScriptCatalogClaude Paroz
2017-05-08Refs #27795 -- Stopped converting integer format settings to str in JS/JSON ↵Claude Paroz
i18n views Thanks Tim Graham for the review.
2017-03-03Refs #27656 -- Updated django.views docstring verbs according to PEP 257.Anton Samarchyan
2017-02-27Imported django.http classes instead of django.http.Asif Saifuddin Auvi
2017-01-26Refs #23919 -- Replaced usage of django.utils.http utilities with Python ↵Claude Paroz
equivalents Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-17Refs #19567 -- Removed deprecated javascript_catalog() and json_catalog() views.Tim Graham
2016-12-14Fixed #27418 -- Fixed occasional missing plural forms in JavaScriptCatalog.Waldemar Kornewald
2016-10-22Fixed #27374 -- Made JavaScriptCatalog respect the packages argument.Alvin Lindstam
2016-09-07Refs #26956 -- Allowed is_safe_url() to validate against multiple hostsJon Dufresne
2016-09-03Replaced smart_* by force_* calls whenever possibleClaude Paroz
The smart_* version should only be used when a lazy string should keep its lazy status.
2016-08-19Refs #26902 -- Protected against insecure redirects in set_language().Przemysław Suliga
2016-04-28Fixed #26553 -- Removed unneeded loop in views/i18n.pyTim Graham
2016-04-15Fixed #19567 -- Added JavaScriptCatalog and JSONCatalog class-based viewsClaude Paroz
Thanks Cristiano Coelho and Tim Graham for the reviews.
2016-04-09Fixed #26466 -- Added HTTP_REFERER decoding to i18n set_language() view.Miikka Salminen
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2016-03-29Fixed #21446 -- Allowed not performing redirect in set_language viewKrzysztof Jurewicz
Thanks Claude Paroz and Tim Graham for polishing the patch.
2016-03-08Reused the DjangoTranslation class for the javascript_catalog viewClaude Paroz
Thanks Tim Graham and Cristiano Coelho for the reviews. Refs #26328, #26319.
2016-01-25Fixed #26125 -- Fixed E731 flake warnings.userimack
2015-12-31Fixed #26013 -- Moved django.core.urlresolvers to django.urls.Marten Kenbeek
Thanks to Tim Graham for the review.
2015-08-05Fixed #22404 -- Added a view that exposes i18n catalog as a JSONSergey Kolosov
Added django.views.i18n.json_catalog() view, which returns a JSON response containing translations, formats, and a plural expression for the specified language.
2015-05-13Removed unnecessary arguments in .get method callsPiotr Jakimiak