Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1066 closed defect (fixed)

Lost import of i18n stuffs in defaultfilters

Reported by: Ivan Fedorov Owned by: Adrian Holovaty
Component: Core (Other) Version: dev
Severity: major Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Lost import of i18n stuffs in defaultfilters.

But it used in "yesno" filter.

Attachments (1)

defaultfilters.py.diff (431 bytes ) - added by Ivan Fedorov 18 years ago.
fix for bug

Download all attachments as: .zip

Change History (4)

by Ivan Fedorov, 18 years ago

Attachment: defaultfilters.py.diff added

fix for bug

comment:1 by hugo, 18 years ago

Resolution: fixed
Status: newclosed

(In [1673]) fixes #1066 - yesno used the wrong way to do translations

comment:2 by hugo, 18 years ago

There was no import missing - the "_" is available in the global namespace (the builtins). But the problem with it was that it used the wrong way - it used eager translation in a definition. I didn't use the gettext_lazy, as that - even though it works - usually is only the second-best solution (and is mostly restricted to the validators and models). Instead I do eager translation in the function itself by using the gettext function directly. yesno now correctly switches it's translation according to the current active language.

comment:3 by Ivan Fedorov, 18 years ago

ok. you right.

I'm only want use Django for my work... my solution is bad, but works for me... thanks for right way. :)

Note: See TracTickets for help on using tickets.
Back to Top