diff -r 6641e941ef1e -r ff1a9aa48cfd app/django/contrib/localflavor/ch/forms.py --- a/app/django/contrib/localflavor/ch/forms.py Tue Oct 14 12:36:55 2008 +0000 +++ b/app/django/contrib/localflavor/ch/forms.py Tue Oct 14 16:00:59 2008 +0000 @@ -2,10 +2,10 @@ Swiss-specific Form helpers """ -from django.newforms import ValidationError -from django.newforms.fields import Field, RegexField, Select, EMPTY_VALUES +from django.forms import ValidationError +from django.forms.fields import Field, RegexField, Select, EMPTY_VALUES from django.utils.encoding import smart_unicode -from django.utils.translation import ugettext +from django.utils.translation import ugettext_lazy as _ import re id_re = re.compile(r"^(?P\w{8})(?P(\d{1}|<))(?P\d{1})$") @@ -13,7 +13,7 @@ class CHZipCodeField(RegexField): default_error_messages = { - 'invalid': ugettext('Enter a zip code in the format XXXX.'), + 'invalid': _('Enter a zip code in the format XXXX.'), } def __init__(self, *args, **kwargs): @@ -61,7 +61,7 @@ Algorithm is documented at http://adi.kousz.ch/artikel/IDCHE.htm """ default_error_messages = { - 'invalid': ugettext('Enter a valid Swiss identity or passport card number in X1234567<0 or 1234567890 format.'), + 'invalid': _('Enter a valid Swiss identity or passport card number in X1234567<0 or 1234567890 format.'), } def has_valid_checksum(self, number):