Fixed #23534 -- Added documentation on blocktrans tags

Mentioned that other block tags are not allowed inside
a blocktrans template tag.

Thanks to edu2004eu for reporting the issue.
This commit is contained in:
Nadja Deininger 2014-10-13 15:57:01 +01:00 committed by Baptiste Mispelon
parent 59d487e7fc
commit 905a9a263b
1 changed files with 3 additions and 0 deletions

View File

@ -628,6 +628,9 @@ You can use multiple expressions inside a single ``blocktrans`` tag::
.. note:: The previous more verbose format is still supported: .. note:: The previous more verbose format is still supported:
``{% blocktrans with book|title as book_t and author|title as author_t %}`` ``{% blocktrans with book|title as book_t and author|title as author_t %}``
Other block tags (for example ``{% for %}`` or ``{% if %}``) are not allowed
inside a ``blocktrans`` tag.
If resolving one of the block arguments fails, blocktrans will fall back to If resolving one of the block arguments fails, blocktrans will fall back to
the default language by deactivating the currently active language the default language by deactivating the currently active language
temporarily with the :func:`~django.utils.translation.deactivate_all` temporarily with the :func:`~django.utils.translation.deactivate_all`