1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #14806 -- Added support for contextual translations to the trans and blocktrans template tags. Thanks to jtiai for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Julien Phalip
2011-10-19 04:59:47 +00:00
parent 358e5a8031
commit 26698bc851
10 changed files with 324 additions and 22 deletions

View File

@@ -191,6 +191,14 @@ Additionally, it's now possible to define translatable URL patterns using
:ref:`url-internationalization` for more information about the language prefix
and how to internationalize URL patterns.
Contextual translation support for ``{% trans %}`` and ``{% blocktrans %}``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Django 1.3 introduced :ref:`contextual translation<contextual-markers>` support
in Python files via the ``pgettext`` function. This is now also supported by
the :ttag:`trans` and :ttag:`blocktrans` template tags using the new
``context`` keyword.
Customizable ``SingleObjectMixin`` URLConf kwargs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~