﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12332	{% blocktrans with value as variable %} syntax cannot parse literal values passed through filters	Alun Bestor	nobody	"As a contrived example:

{{{
{% blocktrans with ""String Literal""|lower as lowercase_string %}Here is a lowercase string: {{ lowercase_string }}{% endblocktrans %}
}}}

This example will fail in Django 1.1 and 1.2 trunk with:

{{{
TemplateSyntaxError: variable bindings in 'blocktrans' must be 'with value as variable'
}}}

The example will be parsed successfully if the filter is omitted, or if the filtered value is a context variable instead of a literal (e.g. string_var|lower).

One workaround for the parsing problem would be to use the following code:
{{{
{% with ""String Literal""|lower as lowercase_string %}
{% blocktrans with lowercase_string as lowercase_string %}Here is a lowercase string: {{ lowercase_string }}{% endblocktrans %}
{‰ endwith %}
}}}

(In the contrived example it is of course unnecessary to use the lower filter on a literal value; the actual case came up with a custom filter which processes a value differently depending on active settings.)"	Bug	closed	Template system	dev	Normal	duplicate	blocktrans i18n		Accepted	0	0	0	0	0	0
