﻿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
7027	Translating string constans passed to template tags breaks if the string contains spaces	Konstantinos Metaxas <kmetaxas@…>	Jacob	"Hi. The documentation for i18n states that the following can be used to translate string constants passed to template tags:


{{{
{% some_special_tag _(""Page not found"") value|yesno:_(""yes,no"") %}
}}}


However, when i use it with a string that contains spaces (like in the example in the docs) it raises a TemplateSyntaxError claiming that more parameters where passed to the ''some_special_tag'' than it accepts.

It seems that ''django.utils.text.smart_split'' breaks up quoted strings that are enclosed like thus: '''_('''""my quoted string""''')''' and contain spaces.
Example:

{{{
>>> from django.utils.text import smart_split
>>> list(smart_split(' _(""my quoted string"") '))
[u'_(""my', u'quoted', u'string"")']
#Without spaces
>>> list(smart_split(' _(""myquotedstring"") '))
[u'_(""myquotedstring"")']
}}}


This makes translating multi-word string constants in template tags impossible.
I am using svn revision 7425."		closed	Internationalization	dev		fixed			Accepted	1	0	0	0	0	0
