diff options
| author | Julien Phalip <jphalip@gmail.com> | 2011-11-12 23:07:51 +0000 |
|---|---|---|
| committer | Julien Phalip <jphalip@gmail.com> | 2011-11-12 23:07:51 +0000 |
| commit | b45099eefb9a46264bcb8811dff6013cd1d0f6d6 (patch) | |
| tree | 467168f13df16f47ab950675a20c3dd52d60eeee /django/forms | |
| parent | ba0734af9c54d1ace09285f6823cb8e4624acf99 (diff) | |
Fixed #17190 -- Ensured that the `NullBooleanSelect` widget's options get lazily localized. Thanks to pennersr for the report and to kenth for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms')
| -rw-r--r-- | django/forms/widgets.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 5b50f37b67..8c1e20b179 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -552,7 +552,9 @@ class NullBooleanSelect(Select): A Select Widget intended to be used with NullBooleanField. """ def __init__(self, attrs=None): - choices = ((u'1', ugettext('Unknown')), (u'2', ugettext('Yes')), (u'3', ugettext('No'))) + choices = ((u'1', ugettext_lazy('Unknown')), + (u'2', ugettext_lazy('Yes')), + (u'3', ugettext_lazy('No'))) super(NullBooleanSelect, self).__init__(attrs, choices) def render(self, name, value, attrs=None, choices=()): |
