Re: i18n variable string translation

2010-06-16 Thread Aaron Lee
Another problem I am facing is it seems some pages are not being translated until I hit certain page, after that everything is fine. I am not exactly sure what the problem is but if you guys experience this problem, would appreciate some insights. -Aaron On Wed, Jun 16, 2010 at 4:47 PM, Aaron Lee

Re: i18n variable string translation

2010-06-16 Thread Aaron Lee
Thanks, the lazy translation solves the problem. -Aaron On Wed, Jun 16, 2010 at 2:59 PM, Antoni Aloy wrote: > Try to use lazy translation. > > El 16/06/2010 23:09, "Aaron" escribió: > > > Well what happened was I have a forms.py > > which has > > CONSTANT = _("Hello World") > x = {'var': CONST

Re: i18n variable string translation

2010-06-16 Thread Antoni Aloy
Try to use lazy translation. El 16/06/2010 23:09, "Aaron" escribió: Well what happened was I have a forms.py which has CONSTANT = _("Hello World") x = {'var': CONSTANT } and in the django.po, I do have a translation msgid "Hello World" msgstr "xxx" But it doesn't show up on the website, all

Re: i18n variable string translation

2010-06-16 Thread Aaron
Well what happened was I have a forms.py which has CONSTANT = _("Hello World") x = {'var': CONSTANT } and in the django.po, I do have a translation msgid "Hello World" msgstr "xxx" But it doesn't show up on the website, all the other translations work, so I am wondering what am I missing -Aar

Re: i18n variable string translation

2010-06-16 Thread Baurzhan Ismagulov
On Wed, Jun 16, 2010 at 01:00:36PM -0700, Aaron Lee wrote: > def my_view(request): > sentence = 'Welcome to my site.' > output = _(sentence) > return HttpResponse(output) > > (The caveat with using variables or computed values, as in the previous two > examples, is that Django’s transl

i18n variable string translation

2010-06-16 Thread Aaron Lee
Hi guys, In http://www.djangobook.com/en/2.0/chapter19, there is a paragraph Translation works on variables. Again, here’s an identical example: def my_view(request): sentence = 'Welcome to my site.' output = _(sentence) return HttpResponse(output) (The caveat with using variables o