added missing docstring to the blocktrans template tag

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Georg Bauer 2005-11-15 13:51:31 +00:00
parent ed92d36825
commit 705a568854
1 changed files with 17 additions and 0 deletions

View File

@ -163,6 +163,23 @@ def do_translate(parser, token):
def do_block_translate(parser, token):
"""
This will translate a block of text with parameters.
Format is like this::
{% blocktrans with foo|filter as bar and baz|filter as boo %}
This is {{ bar }} and {{ boo }}.
{% endblocktrans %}
Additionally this supports pluralization::
{% blocktrans count var|length as count %}
There is {{ count }} object.
{% plural %}
There are {{ count }} objects.
{% endblocktrans %}
This is much like ngettext, only in template syntax.
"""
class BlockTranslateParser(TokenParser):