diff options
author | Adrian Holovaty <adrian@holovaty.com> | 2005-11-25 02:18:37 +0000 |
---|---|---|
committer | Adrian Holovaty <adrian@holovaty.com> | 2005-11-25 02:18:37 +0000 |
commit | baba996254ecfe0ba2fa49e5d8b6b177b20869fe (patch) | |
tree | 30d33d3a792268641e6bf2a6b6fc01f1b8f637b2 | |
parent | 473eabc4471df57e9bd534999a26d50aa42482c5 (diff) | |
download | django-baba996254ecfe0ba2fa49e5d8b6b177b20869fe.tar.gz |
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
-rw-r--r-- | django/contrib/admin/views/decorators.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/django/contrib/admin/views/decorators.py b/django/contrib/admin/views/decorators.py index 44e1234ce4..852057bf53 100644 --- a/django/contrib/admin/views/decorators.py +++ b/django/contrib/admin/views/decorators.py @@ -19,7 +19,7 @@ def _display_login_form(request, error_message=''): else: post_data = _encode_post_data({}) return render_to_response('admin/login', { - 'title': 'Log in', + 'title': _('Log in'), 'app_path': request.path, 'post_data': post_data, 'error_message': error_message @@ -53,15 +53,14 @@ def staff_member_required(view_func): # If this isn't already the login page, display it. if not request.POST.has_key(LOGIN_FORM_KEY): if request.POST: - message = "Please log in again, because your session has expired. "\ - "Don't worry: Your submission has been saved." + message = _("Please log in again, because your session has expired. Don't worry: Your submission has been saved.") else: message = "" return _display_login_form(request, message) # Check that the user accepts cookies. if not request.session.test_cookie_worked(): - message = "Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again." + message = _("Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again.") return _display_login_form(request, message) # Check the password. @@ -75,9 +74,9 @@ def staff_member_required(view_func): try: user = users.get_object(email__exact=username) except users.UserDoesNotExist: - message = "Usernames cannot contain the '@' character." + message = _("Usernames cannot contain the '@' character.") else: - message = "Your e-mail address is not your username. Try '%s' instead." % user.username + message = _("Your e-mail address is not your username. Try '%s' instead.") % user.username return _display_login_form(request, message) # The user data is correct; log in the user in and continue. |