Ticket #2816: auth-form-i18n2.diff
File auth-form-i18n2.diff, 1.1 KB (added by , 18 years ago) |
---|
-
contrib/auth/forms.py
old new 13 13 validator_list=[validators.isAlphaNumeric, self.isValidUsername]), 14 14 forms.PasswordField(field_name='password1', length=30, maxlength=60, is_required=True), 15 15 forms.PasswordField(field_name='password2', length=30, maxlength=60, is_required=True, 16 validator_list=[validators.AlwaysMatchesOtherField('password1', "The two password fields didn't match.")]),16 validator_list=[validators.AlwaysMatchesOtherField('password1', _("The two password fields didn't match."))]), 17 17 ) 18 18 19 19 def isValidUsername(self, field_data, all_data): … … 21 21 User.objects.get(username=field_data) 22 22 except User.DoesNotExist: 23 23 return 24 raise validators.ValidationError, 'A user with that username already exists.'24 raise validators.ValidationError, _("A user with that username already exists.") 25 25 26 26 def save(self, new_data): 27 27 "Creates the user."