diff --git a/openstack_auth/backend.py b/openstack_auth/backend.py index 3f87aea..cd1f035 100644 --- a/openstack_auth/backend.py +++ b/openstack_auth/backend.py @@ -4,7 +4,7 @@ import logging from django.conf import settings -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ from keystoneclient.v2_0 import client as keystone_client from keystoneclient import exceptions as keystone_exceptions diff --git a/openstack_auth/forms.py b/openstack_auth/forms.py index efcac4e..7259c2f 100644 --- a/openstack_auth/forms.py +++ b/openstack_auth/forms.py @@ -2,7 +2,7 @@ from django.conf import settings from django.contrib.auth import authenticate from django.contrib.auth.forms import AuthenticationForm -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ from django.views.decorators.debug import sensitive_variables from .exceptions import KeystoneAuthException diff --git a/openstack_auth/locale/zh_CN/LC_MESSAGES/django.mo b/openstack_auth/locale/zh_CN/LC_MESSAGES/django.mo new file mode 100644 index 0000000..dd612a5 Binary files /dev/null and b/openstack_auth/locale/zh_CN/LC_MESSAGES/django.mo differ diff --git a/openstack_auth/locale/zh_CN/LC_MESSAGES/django.po b/openstack_auth/locale/zh_CN/LC_MESSAGES/django.po new file mode 100644 index 0000000..7d31610 --- /dev/null +++ b/openstack_auth/locale/zh_CN/LC_MESSAGES/django.po @@ -0,0 +1,55 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-01-25 13:41+0800\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0\n" + +#: backend.py:30 +msgid "The authentication token issued by the Identity service has expired." +msgstr "身份验证已过期。" + +#: backend.py:76 +msgid "Invalid user name or password." +msgstr "无效的用户名或密码。" + +#: backend.py:81 +msgid "An error occurred authenticating. Please try again later." +msgstr "验证发生错误。请稍后再试一次。" + +#: backend.py:95 +msgid "Unable to retrieve authorized projects." +msgstr "无法检索授权的项目。" + +#: backend.py:100 +msgid "You are not authorized for any projects." +msgstr "您未被任何项目授权。" + +#: backend.py:119 +msgid "Unable to authenticate to any available projects." +msgstr "无法跟可用的项目验证通过。" + +#: forms.py:20 +msgid "Region" +msgstr "" + +#: forms.py:21 +msgid "User Name" +msgstr "用户名" + +#: forms.py:22 +msgid "Password" +msgstr "密码"