Django

Code

Changeset 7449

Show
Ignore:
Timestamp:
04/23/08 11:02:25 (2 months ago)
Author:
brosner
Message:

newforms-admin: Fixed #6774, #7068 -- Use ugettext_lazy instead of ugettext in django/contrib/auth/forms.py. Marked a few strings for translation in the forms.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/newforms-admin/django/contrib/auth/forms.py

    r7191 r7449  
    55from django.core import validators 
    66from django import newforms as forms 
    7 from django.utils.translation import ugettext as _ 
     7from django.utils.translation import ugettext_lazy as _ 
    88 
    99class UserCreationForm(forms.ModelForm): 
     
    4848    username/password logins. 
    4949    """ 
    50     username = forms.CharField(max_length=30) 
    51     password = forms.CharField(max_length=30, widget=forms.PasswordInput) 
     50    username = forms.CharField(label=_("Username"), max_length=30) 
     51    password = forms.CharField(label=_("Password"), max_length=30, widget=forms.PasswordInput) 
    5252     
    5353    def __init__(self, request=None, *args, **kwargs): 
     
    8989 
    9090class PasswordResetForm(forms.Form): 
    91     email = forms.EmailField(max_length=40) 
     91    email = forms.EmailField(label=_("Email"), max_length=40) 
    9292     
    9393    def clean_email(self): 
     
    130130    A form that lets a user change his/her password. 
    131131    """ 
    132     old_password = forms.CharField(max_length=30, widget=forms.PasswordInput) 
    133     new_password1 = forms.CharField(max_length=30, widget=forms.PasswordInput) 
    134     new_password2 = forms.CharField(max_length=30, widget=forms.PasswordInput) 
     132    old_password = forms.CharField(label=_("Old password"), max_length=30, widget=forms.PasswordInput) 
     133    new_password1 = forms.CharField(label=_("New password"), max_length=30, widget=forms.PasswordInput) 
     134    new_password2 = forms.CharField(label=_("New password confirmation"), max_length=30, widget=forms.PasswordInput) 
    135135     
    136136    def __init__(self, user, *args, **kwargs): 
     
    165165    A form used to change the password of a user in the admin interface. 
    166166    """ 
    167     password1 = forms.CharField(max_length=60, widget=forms.PasswordInput) 
    168     password2 = forms.CharField(max_length=60, widget=forms.PasswordInput) 
     167    password1 = forms.CharField(label=_("Password"), max_length=60, widget=forms.PasswordInput) 
     168    password2 = forms.CharField(label=_("Password (again)"), max_length=60, widget=forms.PasswordInput) 
    169169     
    170170    def __init__(self, user, *args, **kwargs):