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 | |
| parent | 70d95682b1be6a85abdeaea0205a897f7530f8bc (diff) | |
Fixed #30585 -- Added {% translate %} and {% blocktranslate %} template tags.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 4 | ||||
| -rw-r--r-- | docs/ref/templates/builtins.txt | 10 | ||||
| -rw-r--r-- | docs/ref/templates/language.txt | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index 75d8245499..669fc185a4 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -2695,14 +2695,14 @@ Therefore here is our new ``change_form.html`` : {% load i18n admin_urls %} {% block object-tools-items %} <li> - <a href="{% url opts|admin_urlname:'history' original.pk|admin_urlquote %}" class="historylink">{% trans "History" %}</a> + <a href="{% url opts|admin_urlname:'history' original.pk|admin_urlquote %}" class="historylink">{% translate "History" %}</a> </li> <li> <a href="mylink/" class="historylink">My Link</a> </li> {% if has_absolute_url %} <li> - <a href="{% url 'admin:view_on_site' content_type_id original.pk %}" class="viewsitelink">{% trans "View on site" %}</a> + <a href="{% url 'admin:view_on_site' content_type_id original.pk %}" class="viewsitelink">{% translate "View on site" %}</a> </li> {% endif %} {% endblock %} 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 |
