Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed #2731: updated password change form to allow translation

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 182b5c5b5c4a2703e0713dbcc59e2964b0dd3ac8 1 parent 0d24c93
authored September 25, 2006

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  django/contrib/auth/forms.py
6  django/contrib/auth/forms.py
@@ -81,7 +81,7 @@ def isValidUserEmail(self, new_data, all_data):
81 81
         try:
82 82
             self.user_cache = User.objects.get(email__iexact=new_data)
83 83
         except User.DoesNotExist:
84  
-            raise validators.ValidationError, "That e-mail address doesn't have an associated user acount. Are you sure you've registered?"
  84
+            raise validators.ValidationError, _("That e-mail address doesn't have an associated user acount. Are you sure you've registered?")
85 85
 
86 86
     def save(self, domain_override=None, email_template_name='registration/password_reset_email.html'):
87 87
         "Calculates a new password randomly and sends it to the user"
@@ -113,14 +113,14 @@ def __init__(self, user):
113 113
             forms.PasswordField(field_name="old_password", length=30, maxlength=30, is_required=True,
114 114
                 validator_list=[self.isValidOldPassword]),
115 115
             forms.PasswordField(field_name="new_password1", length=30, maxlength=30, is_required=True,
116  
-                validator_list=[validators.AlwaysMatchesOtherField('new_password2', "The two 'new password' fields didn't match.")]),
  116
+                validator_list=[validators.AlwaysMatchesOtherField('new_password2', _("The two 'new password' fields didn't match."))]),
117 117
             forms.PasswordField(field_name="new_password2", length=30, maxlength=30, is_required=True),
118 118
         )
119 119
 
120 120
     def isValidOldPassword(self, new_data, all_data):
121 121
         "Validates that the old_password field is correct."
122 122
         if not self.user.check_password(new_data):
123  
-            raise validators.ValidationError, "Your old password was entered incorrectly. Please enter it again."
  123
+            raise validators.ValidationError, _("Your old password was entered incorrectly. Please enter it again.")
124 124
 
125 125
     def save(self, new_data):
126 126
         "Saves the new password."

0 notes on commit 182b5c5

Please sign in to comment.
Something went wrong with that request. Please try again.