Django

Code

Changeset 4908

Show
Ignore:
Timestamp:
04/02/07 22:13:21 (2 years ago)
Author:
mtredinnick
Message:

Fixed #3882 -- Changed error messages in Brazilian localflavor to be in
English. Thanks, Wiliam Alves de Souza.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/localflavor/br/forms.py

    r4874 r4908  
    1616        super(BRZipCodeField, self).__init__(r'^\d{5}-\d{3}$', 
    1717            max_length=None, min_length=None, 
    18             error_message=u'Informe um código postal no formato XXXXX-XXX.'
     18            error_message=gettext(u'Enter a zip code in the format XXXXX-XXX.')
    1919            *args, **kwargs) 
    2020 
     
    2828        if m: 
    2929            return u'%s-%s-%s' % (m.group(1), m.group(2), m.group(3)) 
    30         raise ValidationError(u'Números de telefone devem estar no formato XX-XXXX-XXXX.'
     30        raise ValidationError(gettext(u'Phone numbers must be in XX-XXXX-XXXX format.')
    3131 
    3232class BRStateSelect(Select): 
  • django/trunk/tests/regressiontests/forms/localflavor.py

    r4887 r4908  
    735735Traceback (most recent call last): 
    736736... 
    737 ValidationError: [u'Informe um c\xf3digo postal no formato XXXXX-XXX.'] 
     737ValidationError: [u'Enter a zip code in the format XXXXX-XXX.'] 
    738738>>> f.clean('1234-123') 
    739739Traceback (most recent call last): 
    740740... 
    741 ValidationError: [u'Informe um c\xf3digo postal no formato XXXXX-XXX.'] 
     741ValidationError: [u'Enter a zip code in the format XXXXX-XXX.'] 
    742742>>> f.clean('abcde-abc') 
    743743Traceback (most recent call last): 
    744744... 
    745 ValidationError: [u'Informe um c\xf3digo postal no formato XXXXX-XXX.'] 
     745ValidationError: [u'Enter a zip code in the format XXXXX-XXX.'] 
    746746>>> f.clean('12345-') 
    747747Traceback (most recent call last): 
    748748... 
    749 ValidationError: [u'Informe um c\xf3digo postal no formato XXXXX-XXX.'] 
     749ValidationError: [u'Enter a zip code in the format XXXXX-XXX.'] 
    750750>>> f.clean('-123') 
    751751Traceback (most recent call last): 
    752752... 
    753 ValidationError: [u'Informe um c\xf3digo postal no formato XXXXX-XXX.'] 
     753ValidationError: [u'Enter a zip code in the format XXXXX-XXX.'] 
    754754>>> f.clean('') 
    755755Traceback (most recent call last): 
     
    769769Traceback (most recent call last): 
    770770... 
    771 ValidationError: [u'Informe um c\xf3digo postal no formato XXXXX-XXX.'] 
     771ValidationError: [u'Enter a zip code in the format XXXXX-XXX.'] 
    772772>>> f.clean('12345-') 
    773773Traceback (most recent call last): 
    774774... 
    775 ValidationError: [u'Informe um c\xf3digo postal no formato XXXXX-XXX.'] 
     775ValidationError: [u'Enter a zip code in the format XXXXX-XXX.'] 
    776776>>> f.clean('abcde-abc') 
    777777Traceback (most recent call last): 
    778778... 
    779 ValidationError: [u'Informe um c\xf3digo postal no formato XXXXX-XXX.'] 
     779ValidationError: [u'Enter a zip code in the format XXXXX-XXX.'] 
    780780>>> f.clean('1234-123') 
    781781Traceback (most recent call last): 
    782782... 
    783 ValidationError: [u'Informe um c\xf3digo postal no formato XXXXX-XXX.'] 
     783ValidationError: [u'Enter a zip code in the format XXXXX-XXX.'] 
    784784>>> f.clean('12345_123') 
    785785Traceback (most recent call last): 
    786786... 
    787 ValidationError: [u'Informe um c\xf3digo postal no formato XXXXX-XXX.'] 
     787ValidationError: [u'Enter a zip code in the format XXXXX-XXX.'] 
    788788>>> f.clean('12345-123') 
    789789u'12345-123'