Commit Graph

90 Commits

Author SHA1 Message Date
Ran Benita 19fc6376ce
Fixed -- Added support for the HttpOnly, SameSite, and Secure flags on language cookies. 2019-04-08 11:26:06 +02:00
Claude Paroz a8e2a9bac6 Refs -- Deprecated storing user's language in the session. 2019-02-14 10:23:02 -05:00
Claude Paroz 16454ac35f Fixed -- Fixed JS ngettext if the string is a non-plural msgid in the catalog. 2019-01-28 21:04:36 +01:00
Tim Graham 7cdeb23ae7 Fixed -- Added charset to JavaScriptCatalog's Content-Type header. 2018-06-22 09:15:29 +02:00
Tim Graham 238ed313c5 Removed views.i18n.null_javascript_catalog().
Unused since de40cfbe74.
2018-06-21 11:06:14 -04:00
Дилян Палаузов d7b2aa24f7 Fixed -- Simplified code with and/or. 2018-01-03 20:12:23 -05:00
Claude Paroz b3cd9fb18b Refs -- Made set_language() view always set the current language in a cookie.
The plan is to later deprecate/remove storing the language in the session.
2018-01-03 11:25:40 -05:00
Sergey Fedoseev f2b93b509c Removed unneeded iter() calls.
A few of these were unnecessarily added in 2b281cc35e.
2017-08-23 16:48:29 -04:00
Claude Paroz 23142eea85 Fixed -- Added error for invalid JavaScriptCatalog packages
Thanks Tim Graham for the review.
2017-06-06 18:02:22 +02:00
Jon Dufresne 2c69824e5a Refs -- Removed unnecessary lists, generators, and tuple calls. 2017-06-01 19:08:59 -04:00
Claude Paroz 2cbb095bec Fixed -- Fixed plural fallback translations in JavaScriptCatalog view
Thanks Waldemar Kornewald for the report and initial patch.
2017-05-25 22:47:21 +02:00
Claude Paroz eb66057c1e Refs -- Honor plural number in JavaScriptCatalog 2017-05-20 13:23:54 +02:00
Claude Paroz d842ada305 Refs -- Stopped converting integer format settings to str in JS/JSON i18n views
Thanks Tim Graham for the review.
2017-05-08 19:32:03 +02:00
Anton Samarchyan 711123e1cd Refs -- Updated django.views docstring verbs according to PEP 257. 2017-03-03 17:05:42 -05:00
Asif Saifuddin Auvi 5f3a689f71 Imported django.http classes instead of django.http. 2017-02-27 14:47:11 -05:00
Claude Paroz fee42fd99e Refs -- Replaced usage of django.utils.http utilities with Python equivalents
Thanks Tim Graham for the review.
2017-01-26 19:49:03 +01:00
Claude Paroz 2b281cc35e Refs -- Removed most of remaining six usage
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Claude Paroz 7b2f2e74ad Refs -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Tim Graham 2b20e4148f Refs -- Removed deprecated javascript_catalog() and json_catalog() views. 2017-01-17 20:52:03 -05:00
Waldemar Kornewald b24af2f405 Fixed -- Fixed occasional missing plural forms in JavaScriptCatalog. 2016-12-14 18:20:30 -05:00
Alvin Lindstam 6b5106b1ce Fixed -- Made JavaScriptCatalog respect the packages argument. 2016-10-22 19:26:08 -04:00
Jon Dufresne f227b8d15d Refs -- Allowed is_safe_url() to validate against multiple hosts 2016-09-07 19:56:25 -07:00
Claude Paroz 2ced2f785d Replaced smart_* by force_* calls whenever possible
The smart_* version should only be used when a lazy string should keep
its lazy status.
2016-09-03 13:46:41 +02:00
Przemysław Suliga 1f68bb5683 Refs -- Protected against insecure redirects in set_language(). 2016-08-19 19:16:00 -04:00
Tim Graham 0d8b523422 Fixed -- Removed unneeded loop in views/i18n.py 2016-04-28 09:15:34 -04:00
Claude Paroz de40cfbe74 Fixed -- Added JavaScriptCatalog and JSONCatalog class-based views
Thanks Cristiano Coelho and Tim Graham for the reviews.
2016-04-15 17:28:54 +02:00
Miikka Salminen 9e3f141701 Fixed -- Added HTTP_REFERER decoding to i18n set_language() view. 2016-04-09 10:57:43 -04:00
Tim Graham df8d8d4292 Fixed E128 flake8 warnings in django/. 2016-04-08 09:51:06 -04:00
Krzysztof Jurewicz 940b7fd5cb Fixed -- Allowed not performing redirect in set_language view
Thanks Claude Paroz and Tim Graham for polishing the patch.
2016-03-29 22:15:14 +02:00
Claude Paroz 11c60b5298 Reused the DjangoTranslation class for the javascript_catalog view
Thanks Tim Graham and Cristiano Coelho for the reviews.
Refs , .
2016-03-08 21:39:59 +01:00
userimack 60586dd737 Fixed -- Fixed E731 flake warnings. 2016-01-25 14:23:43 -05:00
Marten Kenbeek 16411b8400 Fixed -- Moved django.core.urlresolvers to django.urls.
Thanks to Tim Graham for the review.
2015-12-31 14:21:29 -05:00
Sergey Kolosov 244404227e Fixed -- Added a view that exposes i18n catalog as a JSON
Added django.views.i18n.json_catalog() view, which returns a JSON
response containing translations, formats, and a plural expression
for the specified language.
2015-08-05 09:05:21 -04:00
Piotr Jakimiak 4157c502a5 Removed unnecessary arguments in .get method calls 2015-05-13 20:51:18 +02:00
Moritz Sichert d94449f37a Removed spaces after 'function' in jsi18n 2015-03-20 17:28:29 -04:00
Moritz Sichert 6bb2175ed6 Fixed -- Allowed using more than one instance of javascript_catalog per project. 2015-03-20 17:27:41 -04:00
Claude Paroz aa5ab114e3 Fixed -- Redirected to translated url after setting language
Thanks gbdlin for the initial patch and Tim Graham for the review.
2015-03-13 16:46:40 +01:00
Aymeric Augustin 556a74879f Fixed a few uses of Template that relied on a default engine.
Refs .
2015-02-22 23:13:55 +01:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs . 2015-02-06 08:16:28 -05:00
darkryder 9ec8aa5e5d Fixed -- Normalized tuple settings to lists. 2015-02-03 14:59:45 -05:00
Tim Graham 1101467ce0 Limited lines to 119 characters in django/
refs .
2014-09-05 09:22:16 -04:00
Sergey Kolosov 8c98f39624 Fixed -- Added settings for language cookie max-age, path, domain
Introduced a number of settings to configure max-age, path, and domain
for the language cookie: LANGUAGE_COOKIE_AGE, LANGUAGE_COOKIE_PATH and
LANGUAGE_COOKIE_DOMAIN.

Thanks sahid for the suggestion.
2014-03-01 07:52:45 -05:00
Erik Romijn 8cd32f0965 Fixed -- Documented persistent activation of languages and cleaned up language session key use 2014-02-22 18:29:06 +01:00
Aymeric Augustin 1716b7ce5a Renamed AppCache to Apps.
Also renamed app_cache to apps and "app cache" to "app registry".

Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-24 12:25:17 +01:00
Aymeric Augustin 2fef9e5375 Moved apps back in the toplevel django namespace.
Reverted 4a56a93cc4.
2013-12-22 11:39:55 +01:00
Aymeric Augustin 65cd74be8e Stopped iterating on INSTALLED_APPS.
Used the app cache's get_app_configs() method instead.
2013-12-22 11:39:18 +01:00
Ray Ashman Jr e2ae8b048e Correct flake8 E302 violations 2013-11-02 19:53:29 -04:00
Tim Graham 0b1d425a41 Fixed -- Added missing JS variable declaration.
Thanks szymon.barglowski at gmail.com for the report.
2013-10-30 09:12:27 -04:00
Bouke Haarsma 0d0f4f020a Fixed -- Changed LocaleMiddleware session variable to '_language'.
The old 'django_language' variable will still be read from in order
to migrate users. The backwards-compatability shim will be removed in
Django 1.8.

Thanks to jdunck for the report and stugots for the initial patch.
2013-10-22 09:24:42 -04:00
Bouke Haarsma 2fb5a51fa3 Fixed -- Deprecated request.REQUEST and MergeDict
Thanks Aymeric Augustin for the suggestion.
2013-10-17 09:42:28 -04:00