Re: i18n bug in template rendering.

2011-01-24 Thread Ramiro Morales
Hi, I've opened ticket [1]15157 in the Django issue tracker for this report. Any feedback or correction is welcome. Thanks! 1. http://code.djangoproject.com/ticket/15157 -- Ramiro Morales -- You received this message because you are subscribed to the Google Groups "Django developers" group

Re: i18n bug in template rendering.

2011-01-06 Thread Jonathan S
Thanks Ramiro, we hope the patch will be applied in the next release. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to dj

Re: i18n bug in template rendering.

2011-01-06 Thread Ramiro Morales
On Thu, Jan 6, 2011 at 8:15 AM, Ramiro Morales wrote: > Weird, it's working here: Ignore me, I was creating a new Template instance. I can reproduce it: In [1]: from django.utils import translation In [2]: from django.template import Template, Context In [3]: In [4]: In [5]: def language(

Re: i18n bug in template rendering.

2011-01-06 Thread Ramiro Morales
On Thu, Jan 6, 2011 at 5:07 AM, Jonathan S wrote: > >> You aren't supposed to use _('Foo') as a standalone variable. >> (see last paragraph >> herehttp://docs.djangoproject.com/en/1.2/topics/i18n/internationalization...) > > > Why shouldn't I use it as a standalone variable? (A language should >

Re: i18n bug in template rendering.

2011-01-06 Thread Jonathan S
> You aren't supposed to use _('Foo') as a standalone variable. > (see last paragraph > herehttp://docs.djangoproject.com/en/1.2/topics/i18n/internationalization...) Why shouldn't I use it as a standalone variable? (A language should have a *context free* grammar, which means, that the undersco

Re: i18n bug in template rendering.

2011-01-05 Thread Gert Van Gool
So for the sake of the argument I've changed the template code to use "{% load i18n %}" and also added a filter, since that is our use-case. http://dpaste.com/294778/ I thought that if you wanted to apply a filter to a string in a template that you had to use _ instead of {% trans %}. -- Gert Mo

Re: i18n bug in template rendering.

2011-01-05 Thread Ramiro Morales
On Wed, Jan 5, 2011 at 12:21 PM, Jonathan S wrote: > I guess, we found a bug, not sure if it has been reported earlier and > whether this is the right place to report. > > When a template contains translations in variables, like > {{ _("text") }}, the text seems to be translated already during the

Re: i18n bug in template rendering.

2011-01-05 Thread Jonathan S
See also: http://pastebin.com/Wstya2C6 -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@goo

i18n bug in template rendering.

2011-01-05 Thread Jonathan S
I guess, we found a bug, not sure if it has been reported earlier and whether this is the right place to report. When a template contains translations in variables, like {{ _("text") }}, the text seems to be translated already during the creation of the Template object. Every following call of Tem