Skip to content

Commit 5e82d27

Browse files
committed
[book][translation] Fixing wrong use of translation tag and language
1 parent df3a504 commit 5e82d27

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

book/translation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -741,14 +741,14 @@ texts* and complex expressions:
741741

742742
.. code-block:: jinja
743743
744-
{% message = '<h3>foo</h3>' %}
745-
746744
{# text translated between tags is never escaped #}
747745
{% trans %}
748-
{{ message }}
746+
<h3>foo</h3>
749747
{% endtrans %}
750748
751-
{# a variable translated via a filter must be escaped #}
749+
{% message = '<h3>foo</h3>' %}
750+
751+
{# a variable translated via a filter is escaped by default #}
752752
{{ message | trans | raw }}
753753
754754
{# but static strings are never escaped #}

0 commit comments

Comments
 (0)