Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/views/i18n.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #22404 -- Added a view that exposes i18n catalog ↵Sergey Kolosov2015-08-051-12/+49
| | | | | | | | 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.
* Removed unnecessary arguments in .get method callsPiotr Jakimiak2015-05-131-1/+1
|
* Removed spaces after 'function' in jsi18nMoritz Sichert2015-03-201-10/+10
|
* Fixed #22106 -- Allowed using more than one instance of ↵Moritz Sichert2015-03-201-75/+75
| | | | javascript_catalog per project.
* Fixed #24122 -- Redirected to translated url after ↵Claude Paroz2015-03-131-0/+4
| | | | | | setting language Thanks gbdlin for the initial patch and Tim Graham for the review.
* Fixed a few uses of Template that relied on a default ↵Aymeric Augustin2015-02-221-2/+2
| | | | | | engine. Refs #24389.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-5/+7
|
* Fixed #24149 -- Normalized tuple settings to lists.darkryder2015-02-031-1/+1
|
* Limited lines to 119 characters in django/Tim Graham2014-09-051-1/+2
| | | | refs #23395.
* Fixed #15318 -- Added settings for language cookie ↵Sergey Kolosov2014-03-011-1/+4
| | | | | | | | | | 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.
* Fixed #22120 -- Documented persistent activation of ↵Erik Romijn2014-02-221-2/+2
| | | | languages and cleaned up language session key use
* Renamed AppCache to Apps.Aymeric Augustin2013-12-241-2/+2
| | | | | | Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
* Moved apps back in the toplevel django namespace.Aymeric Augustin2013-12-221-1/+1
| | | | Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
* Stopped iterating on INSTALLED_APPS.Aymeric Augustin2013-12-221-1/+5
| | | | Used the app cache's get_app_configs() method instead.
* Correct flake8 E302 violationsRay Ashman Jr2013-11-031-0/+1
|
* Fixed #21347 -- Added missing JS variable declaration.Tim Graham2013-10-301-1/+1
| | | | Thanks szymon.barglowski at gmail.com for the report.
* Fixed #5789 -- Changed LocaleMiddleware session variable ↵Bouke Haarsma2013-10-221-1/+1
| | | | | | | | | | 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.
* Fixed #18659 -- Deprecated request.REQUEST and MergeDictBouke Haarsma2013-10-171-1/+1
| | | | Thanks Aymeric Augustin for the suggestion.
* Deprecated django.utils.importlibClaude Paroz2013-07-291-1/+1
| | | | This was a shim for pre-Python 2.7 support.
* Fixed #20433: Extract catalog compilation code from ↵zyegfryed2013-05-181-31/+37
| | | | javascript_catalog view.
* Ensured that the javascript_catalog view doesn't leak ↵Florian Apolloner2013-05-051-7/+8
| | | | translations.
* Fixed #18231 -- Made JavaScript i18n not pollute global ↵Matthew Tretter2013-04-141-113/+127
| | | | | | | | | JS namespace. Also, use Django templating for the dynamic generated JS code and use more idiomatic coding techniques. Thanks Matthew Tretter for the report and the patch.
* Fixed #18856 -- Ensured that redirects can't be poisoned ↵Florian Apolloner2012-12-101-5/+6
| | | | by malicious users.
* Fixed #19357 -- Allow non-ASCII chars in filesystem pathsClaude Paroz2012-12-081-1/+2
| | | | Thanks kujiu for the report and Aymeric Augustin for the review.
* Fixed #19136 -- Properly escape gettext context prefixes ↵Jannis Leidel2012-11-171-4/+4
| | | | in the i18n JavaScript view template.
* [py3] Ported django.utils.encoding.Aymeric Augustin2012-08-071-3/+3
| | | | | | | | | | | * Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
* [py3] Replaced basestring by six.string_types.Aymeric Augustin2012-07-221-3/+4
|
* Correct reference error (undefined variable)Matthew Tretter2012-04-281-1/+1
|
* Fixed #5494, #10765, #14924 -- Modified the order in ↵Ramiro Morales2011-02-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | which translations are read when composing the final translation to offer at runtime. This is slightly backward-incompatible (could result in changed final translations for literals appearing multiple times in different .po files but with different translations). Translations are now read in the following order (from lower to higher priority): For the 'django' gettext domain: * Django translations * INSTALLED_APPS apps translations (with the ones listed first having higher priority) * settings/project path translations (deprecated, see below) * LOCALE_PATHS translations (with the ones listed first having higher priority) For the 'djangojs' gettext domain: * Python modules whose names are passed to the javascript_catalog view * LOCALE_PATHS translations (with the ones listed first having higher priority, previously they weren't included) Also, automatic loading of translations from the 'locale' subdir of the settings/project path is now deprecated. Thanks to vanschelven, vbmendes and an anonymous user for reporting issues, to vanschelven, Claude Paroz and an anonymous contributor for their initial work on fixes and to Jannis Leidel and Claude for review and discussion. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #14824 -- Corrected the handling of formats when ↵Russell Keith-Magee2011-02-041-5/+2
| | | | | | USE_L10N is disabled. Thanks to nullie for the report and initial patch, and to idle for the separate report with helpful debug info. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15404 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #13726 -- Further refine changes made in r12384 ↵Jannis Leidel2010-12-131-13/+12
| | | | | | and r13069 for using non-English source languages in JavaScript translation catalogues. Thanks, Ramiro. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #9988 -- Added support for translation contexts. ↵Jannis Leidel2010-11-041-0/+17
| | | | | | Thanks, Claude Paroz. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #13514 -- Corrected the process of loading ↵Russell Keith-Magee2010-05-131-1/+4
| | | | | | multiple javascript translation catalogs. Thanks to jtiai for the report, to Ramiro Morales for working out the test case, and to Ramiro and Jannis for their help on the fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #13388 - Refined changes made in r12384 in the ↵Jannis Leidel2010-05-021-1/+1
| | | | | | JavaScript i18n admin view. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13069 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #3594 - Added ability to discard the language ↵Jannis Leidel2010-02-051-8/+22
| | | | | | catalog in the JavaScript i18n view in case the selected language is English but no English translation catalog actual exists, e.g. due to being the language translated from. Thanks to msaelices, aryx and Ramiro Morales. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12384 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed a whole bunch of places to raise exception ↵Adrian Holovaty2010-01-101-1/+1
| | | | | | instances instead of old-style raising exception classes plus a comma. Good for the future Python 3 conversion git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12492 - Refactored JavaScript format localization ↵Jannis Leidel2010-01-041-8/+32
| | | | | | by separating it from the translation backend. Thanks, Ramiro Morales. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12081 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12454 - Added support for localized formats to ↵Jannis Leidel2009-12-301-9/+15
| | | | | | admin date and time widgets. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12030 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12448 - Make sure format strings are handled ↵Jannis Leidel2009-12-301-1/+2
| | | | | | correctly as unicode. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12028 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7980 - Improved i18n framework to support locale ↵Jannis Leidel2009-12-221-3/+26
| | | | | | | | | | aware formatting (dates and numbers) and form processing. Thanks to Marc Garcia for working on this during his Google Summer of Code 2009! Additionally fixes #1061, #2203, #3940, #5526, #6449, #6231, #6693, #6783, #9366 and #10891. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #8193: all dynamic imports in Django are now done ↵Jacob Kaplan-Moss2009-03-181-2/+3
| | | | | | correctly. I know this because Brett Cannon borrowed the time machine and brought Python 2.7's '`importlib` back for inclusion in Django. Thanks for the patch-from-the-future, Brett! git-svn-id: http://code.djangoproject.com/svn/django/trunk@10088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #6864 -- Handle Javascript i18n when the plural ↵Malcolm Tredinnick2008-03-241-1/+12
| | | | | | | | | form expression returns True or False (so both booleans and integers are allowed). Thanks, Ramiro Morales. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7356 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5603 -- Allow customization of the language ↵Malcolm Tredinnick2008-02-291-1/+1
| | | | | | cookie name. Thanks, moe. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5853 -- Added handling for a missing 'en' PO file ↵Malcolm Tredinnick2007-11-291-2/+6
| | | | | | | | | in translation support (this file being missing is essentially harmless). Thanks, miracle2k. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed set_language() change from [6320] to use ↵Adrian Holovaty2007-09-151-3/+1
| | | | | | request.REQUEST, which is shorter git-svn-id: http://code.djangoproject.com/svn/django/trunk@6324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed set_language() redirect view to check POST data ↵Adrian Holovaty2007-09-151-1/+3
| | | | | | for 'next'. Thanks, msaelices git-svn-id: http://code.djangoproject.com/svn/django/trunk@6320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #3651 -- Changed set_language_view() to require ↵Malcolm Tredinnick2007-09-141-7/+13
| | | | | | | | | POST request is used, in accordance with the HTTP spec (it changes the user's state). Thanks, Fraser Nevett. This is a backwards incompatible change for anybody previously using this view. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #4414 -- Fixed Javascript message translation to ↵Malcolm Tredinnick2007-08-111-2/+2
| | | | | | also work when there is more than one format marker in a string. Thanks, tobias@neuyork.de. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5849 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #4040 -- Changed uses of has_key() to "in". Slight ↵Malcolm Tredinnick2007-04-261-3/+3
| | | | | | | | | | performance improvement and forward-compatible with future Python releases. Patch from Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #3640 -- Improved error handling in ↵Malcolm Tredinnick2007-03-121-3/+3
| | | | | | | | | views.i18n.set_language(). Thanks Jorge Gajon. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4708 bcc190cf-cafb-0310-a4f2-bffc1f526a37