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.