Ticket #3127: NullBooleanFieldI18n.patch

File NullBooleanFieldI18n.patch, 756 bytes (added by Maciej Bliziński, 18 years ago)

Patch that adds _() around the hard-coded strings and fixes the problem

  • django/forms/__init__.py

     
    569569    "This SelectField provides 'Yes', 'No' and 'Unknown', mapping results to True, False or None"
    570570    def __init__(self, field_name, is_required=False, validator_list=None):
    571571        if validator_list is None: validator_list = []
    572         SelectField.__init__(self, field_name, choices=[('1', 'Unknown'), ('2', 'Yes'), ('3', 'No')],
     572        SelectField.__init__(self, field_name, choices=[('1', _('Unknown')), ('2', _('Yes')), ('3', _('No'))],
    573573            is_required=is_required, validator_list=validator_list)
    574574
    575575    def render(self, data):
Back to Top