diff options
| author | Mike Hansen <mike@rover.com> | 2019-06-21 09:41:01 -0700 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-12-18 13:15:38 +0100 |
| commit | d291c72bf24387e4abe8d9883ebe9c69abdd26d0 (patch) | |
| tree | 72bd9196d31c4cdecaae59d02a30217c4d87718a /docs/ref/templates | |
| parent | 70d95682b1be6a85abdeaea0205a897f7530f8bc (diff) | |
Fixed #30585 -- Added {% translate %} and {% blocktranslate %} template tags.
Diffstat (limited to 'docs/ref/templates')
| -rw-r--r-- | docs/ref/templates/builtins.txt | 10 | ||||
| -rw-r--r-- | docs/ref/templates/language.txt | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 2e55b66d04..4d65dc82f7 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -814,10 +814,10 @@ This would display as "It is the 4th of September". You can also use the syntax ``{% now "Y" as current_year %}`` to store the output (as a string) inside a variable. This is useful if you want to use -``{% now %}`` inside a template tag like :ttag:`blocktrans` for example:: +``{% now %}`` inside a template tag like :ttag:`blocktranslate` for example:: {% now "Y" as current_year %} - {% blocktrans %}Copyright {{ current_year }}{% endblocktrans %} + {% blocktranslate %}Copyright {{ current_year }}{% endblocktranslate %} .. templatetag:: regroup @@ -1200,10 +1200,10 @@ image in the above example will be 88 pixels wide (because 175/200 = .875; .875 * 100 = 87.5 which is rounded up to 88). In some cases you might want to capture the result of ``widthratio`` in a -variable. It can be useful, for instance, in a :ttag:`blocktrans` like this:: +variable. It can be useful, for instance, in a :ttag:`blocktranslate` like this:: {% widthratio this_value max_value max_width as width %} - {% blocktrans %}The width is: {{ width }}{% endblocktrans %} + {% blocktranslate %}The width is: {{ width }}{% endblocktranslate %} .. templatetag:: with @@ -2023,7 +2023,7 @@ Example:: You have {{ num_cherries }} cherr{{ num_cherries|pluralize:"y,ies" }}. -.. note:: Use :ttag:`blocktrans` to pluralize translated strings. +.. note:: Use :ttag:`blocktranslate` to pluralize translated strings. .. templatefilter:: pprint diff --git a/docs/ref/templates/language.txt b/docs/ref/templates/language.txt index 62f866bbc0..d5221ad60b 100644 --- a/docs/ref/templates/language.txt +++ b/docs/ref/templates/language.txt @@ -414,7 +414,7 @@ Here are some tips for working with inheritance: tag ``as`` syntax can't be used inside the block. For example, this template doesn't render anything:: - {% trans "Title" as title %} + {% translate "Title" as title %} {% block content %}{{ title }}{% endblock %} * For extra readability, you can optionally give a *name* to your |
