Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2816 -- Marked a couple more translatable strings. Thanks, ram…

…iro.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9b034d27462b6d24668663c01ea8d3c98e0f4b3c 1 parent 4ed8267
Malcolm Tredinnick authored

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

  1. 5  django/contrib/auth/forms.py
5  django/contrib/auth/forms.py
@@ -4,6 +4,7 @@
4 4
 from django.template import Context, loader
5 5
 from django.core import validators
6 6
 from django import forms
  7
+from django.utils.translation import gettext_lazy as _
7 8
 
8 9
 class UserCreationForm(forms.Manipulator):
9 10
     "A form that creates a user, with no privileges, from the given username and password."
@@ -13,7 +14,7 @@ def __init__(self):
13 14
                 validator_list=[validators.isAlphaNumeric, self.isValidUsername]),
14 15
             forms.PasswordField(field_name='password1', length=30, maxlength=60, is_required=True),
15 16
             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.")]),
  17
+                validator_list=[validators.AlwaysMatchesOtherField('password1', _("The two password fields didn't match."))]),
17 18
         )
18 19
 
19 20
     def isValidUsername(self, field_data, all_data):
@@ -21,7 +22,7 @@ def isValidUsername(self, field_data, all_data):
21 22
             User.objects.get(username=field_data)
22 23
         except User.DoesNotExist:
23 24
             return
24  
-        raise validators.ValidationError, 'A user with that username already exists.'
  25
+        raise validators.ValidationError, _('A user with that username already exists.')
25 26
 
26 27
     def save(self, new_data):
27 28
         "Creates the user."

0 notes on commit 9b034d2

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