That's it! I guess I didn't wonder because I didn't get any error  
back, but it makes sense.
Thank you !

François

On 2 Jul 2009, at 21:39, Matthias Kestenholz wrote:

>
> Hi,
>
> 2009/7/2 François Verbeek <franc...@verbeek.name>:
>> Mmm to make the problem easier to deal with I wrote a very very small
>> app with just 1 view and a very basic template :
>> from django.http import HttpResponse
>> from django.utils.translation import ugettext as _
>> from django.shortcuts import render_to_response,get_object_or_404
>> def display_a_string_through_template(request,**kwargs):
>>      data=kwargs.get("argument","nothing")
>>      string=_("Hi, there %(wee)s" % {'wee':data})
>
> This should be _("Hi, there %(wee)s") % {'wee': data}
>
> Note the placement of parentheses. gettext recognizes only the string
> "Hi, there %(wee)s" before interpolation, and not anymore when the
> content of 'wee' has been filled in.
>
>
> Matthias
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to