Opened 15 years ago
Closed 15 years ago
#13056 closed (invalid)
erorr in code snippet in documentation
Reported by: | daniel | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | |
Severity: | Keywords: | internationalization localization | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In the "Internationalization and localization" documentation page (all versions) it says:
{% blocktrans with book|title as book_t and author|title as author_t %} This is {{ book_t }} by {{ author_t }} {% endblocktrans %}
This does not work as "title" is interpreted as filter. I guess this should be "book.title".
Note:
See TracTickets
for help on using tickets.
What do you mean with does not work?. I can use that without problems:
It is using the
title
filter on purpose. You need to read that example in the context of the two examples before it, together they progress from the need to useblocktrans
(to intermix fixed text with variable text) to the possibility to assign the result of expression (including filter chaining to local variables inside theblocktrans
block and finally to the fact that you can use more than one of these expression -> vars bindings.