Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#16072 closed Bug (fixed)

Using multiple expressions inside a blocktrans tag not working as documented

Reported by: ivan.mincik@… Owned by: nobody
Component: Documentation Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

According 1.3 docs, using multiple expressions inside a blocktrans tag should be done using following statement:

{% blocktrans with book_t=book|title and author_t=author|title %}
This is {{ book_t }} by {{ author_t }}
{% endblocktrans %}

but it is not working.

This works in my case:

{% blocktrans with book|title as book_t and author|title as author_t %}
This is {{ book_t }} by {{ author_t }}
{% endblocktrans %}

Change History (8)

comment:1 Changed 6 years ago by Jannis Leidel

Component: Template systemDocumentation
Triage Stage: UnreviewedAccepted

Yeah, this is a documentation bug according to SmileyChris should be:

{% blocktrans with book_t=book|title author_t=author|title %}
This is {{ book_t }} by {{ author_t }}
{% endblocktrans %}

comment:2 Changed 6 years ago by Chris Beaven

Resolution: fixed
Status: newclosed

In [16268]:

(The changeset message doesn't reference this ticket)

comment:3 Changed 6 years ago by Chris Beaven

In [16269]:

(The changeset message doesn't reference this ticket)

comment:4 Changed 5 years ago by glund@…

Resolution: fixed
Status: closedreopened
UI/UX: unset

Hello, this is still broken in the 1.3 docs.

It looks to me like [16269] applied the fix in reverse somehow?! The trunk docs look fine.

comment:5 Changed 5 years ago by Julien Phalip

Resolution: fixed
Status: reopenedclosed

Well spotted, [16269] should have removed the "and" in the code sample. However, the new policy is to not make any fixes in the last minor release unless it's a critical bug, which it is not. See https://docs.djangoproject.com/en/dev/internals/release-process/#supported-versions

For that reason I'm re-closing as "Fixed" since it is effectively fixed in trunk. Thanks for bringing this up nonetheless.

comment:6 Changed 5 years ago by glund@…

With respect this is a documentation bug, I don't really see how not having correct documentation for the current supported release was the intention of that policy. The result of which was much lost time for us.

The code sample is the only description of the syntax concerned, it is not a 'nice to have extra' in this case.

What is the review process here, it seems absurd to have to raise this matter elsewhere but it is essential for our use of Django that the docs for the current version are correct.

comment:7 Changed 5 years ago by Carl Meyer

In [17011]:

[1.3.X] Refs #16072 -- Corrected blocktrans multiple-argument syntax example in the docs.

comment:8 Changed 5 years ago by Carl Meyer

I agree that the "critical fixes only" backporting policy does not apply to doc fixes. The release-process docs do need to be updated to mention that, however; filed #17068 for that.

I made this fix in the 1.3.X branch. Thanks glund for the report.

Note: See TracTickets for help on using tickets.
Back to Top