From d291c72bf24387e4abe8d9883ebe9c69abdd26d0 Mon Sep 17 00:00:00 2001 From: Mike Hansen Date: Fri, 21 Jun 2019 09:41:01 -0700 Subject: Fixed #30585 -- Added {% translate %} and {% blocktranslate %} template tags. --- docs/ref/contrib/admin/index.txt | 4 ++-- docs/ref/templates/builtins.txt | 10 +++++----- docs/ref/templates/language.txt | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'docs/ref') 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 %}
  • - {% trans "History" %} + {% translate "History" %}
  • My Link
  • {% if has_absolute_url %}
  • - {% trans "View on site" %} + {% translate "View on site" %}
  • {% 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 -- cgit v1.3