On Thu, Aug 30, Jarek Zgoda wrote:

> 
> Michael Radziej napisał(a):
> 
> >>>> The next testing option is to try with non-lazy version.
> >>> that works! import gettext as _
> >> And that's a real bug, I think.
> >>
> >> Anyway, for future reference, keep in mind that lazily translated
> >> "strings" become real strings at access time. Before that they are
> >> function objects. That is, you cann't, for example, pickle them - and in
> >> consequence put in session because session data is pickled before
> >> saving. Laziness isn't always good. ;)
> > 
> > If I haven't mistaken anything, we're talking about the choices setting in
> > model fields. The models are read in during initialization. But the choices
> > need to be translated for each request, and for different languages. I don't
> > see how this could work without lazy translation, and I'd be astonished if
> > the solution above really worked.
> 
> True, that's why I call this behaviour "buggy".

Ah! I thought that you advocated for gettext instead of gettext_lazy in this
specific situation.

Michael

-- 
noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg -
Tel +49-911-9352-0 - Fax +49-911-9352-100
http://www.noris.de - The IT-Outsourcing Company
 
Vorstand: Ingo Kraupa (Vorsitzender), Joachim Astel, Hansjochen Klenk - 
Vorsitzender des Aufsichtsrats: Stefan Schnabel - AG Nürnberg HRB 17689

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to