Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added translation strings to django/contrib/admin/views/decorators.py…

…. Taken from new-admin

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit baba996254ecfe0ba2fa49e5d8b6b177b20869fe 1 parent 473eabc
Adrian Holovaty authored November 25, 2005

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

  1. 11  django/contrib/admin/views/decorators.py
11  django/contrib/admin/views/decorators.py
@@ -19,7 +19,7 @@ def _display_login_form(request, error_message=''):
19 19
     else:
20 20
         post_data = _encode_post_data({})
21 21
     return render_to_response('admin/login', {
22  
-        'title': 'Log in',
  22
+        'title': _('Log in'),
23 23
         'app_path': request.path,
24 24
         'post_data': post_data,
25 25
         'error_message': error_message
@@ -53,15 +53,14 @@ def _checklogin(request, *args, **kwargs):
53 53
         # If this isn't already the login page, display it.
54 54
         if not request.POST.has_key(LOGIN_FORM_KEY):
55 55
             if request.POST:
56  
-                message = "Please log in again, because your session has expired. "\
57  
-                          "Don't worry: Your submission has been saved."
  56
+                message = _("Please log in again, because your session has expired. Don't worry: Your submission has been saved.")
58 57
             else:
59 58
                 message = ""
60 59
             return _display_login_form(request, message)
61 60
 
62 61
         # Check that the user accepts cookies.
63 62
         if not request.session.test_cookie_worked():
64  
-            message = "Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again."
  63
+            message = _("Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again.")
65 64
             return _display_login_form(request, message)
66 65
 
67 66
         # Check the password.
@@ -75,9 +74,9 @@ def _checklogin(request, *args, **kwargs):
75 74
                 try:
76 75
                     user = users.get_object(email__exact=username)
77 76
                 except users.UserDoesNotExist:
78  
-                    message = "Usernames cannot contain the '@' character."
  77
+                    message = _("Usernames cannot contain the '@' character.")
79 78
                 else:
80  
-                    message = "Your e-mail address is not your username. Try '%s' instead." % user.username
  79
+                    message = _("Your e-mail address is not your username. Try '%s' instead.") % user.username
81 80
             return _display_login_form(request, message)
82 81
 
83 82
         # The user data is correct; log in the user in and continue.

0 notes on commit baba996

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