From e2523bb2a7d8bb210a74fff834200e8df554a918 Mon Sep 17 00:00:00 2001 From: Sam Stoelinga Date: Fri, 25 Jan 2013 14:22:43 +0800 Subject: [PATCH] Fixed l10n bugs and added zh_CN translation Some strings were not being localized because the string was already translated at import time it seems. Also added Chinese translation with help of Zhanghui --- openstack_auth/backend.py | 2 +- openstack_auth/forms.py | 2 +- .../locale/zh_CN/LC_MESSAGES/django.mo | Bin 0 -> 1110 bytes .../locale/zh_CN/LC_MESSAGES/django.po | 55 ++++++++++++++++++ 4 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 openstack_auth/locale/zh_CN/LC_MESSAGES/django.mo create mode 100644 openstack_auth/locale/zh_CN/LC_MESSAGES/django.po 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 hashlib 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 import forms 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 0000000000000000000000000000000000000000..dd612a588028bb6d3ce408cb1434472ffbc7fcee GIT binary patch literal 1110 zcmY*XTWb?R7#+3V0{S2bf+F9Wf=o=RVqLAcHd_tmMw$xxHciHKbvqMgC(-y+t7smq z7ibi3)XRgViUAd>7V*tD|AKgFHYxZc{I;8#I&e5UJLfy+?B)BGo;ty`5wQbNKx{(1 zM)>Oo;t=8|VkctzDnd3O8^|%_0puuh4S5&xCuHC27xHf8KgfB+*42bi+*j8GJ};5i z;r=V~Hso)}{=C;Y-`o@UP-H*%ATru4Wv@qGUVfJEgU19%$y&tn!bn0)0bD7mK<4vh zrFa2YS&wp|?L5=AD25^9aOQH*stT;gYyl3_T!l$oRG4EIpzLx5f{k%NmlAW`i&7QB zB-6Pfxl#U~rxc*&1unpL-7@BlQ~?7aUhqS870|9?=Q)fr7x<-;jh(_|Sg;WXOURX0 z!Cqjm3bUOhK}pH;Jg?oA6N+nP^GeV{D*G~quF(1QQ&^vzk!4_tgOGYDr6WCukHs*g zJCX@PXuLpAbLHAn7?3dsPMIexIBjKz;^|Z<%S%#enskeHfgUdxU7C{ygfi(I9Z(!! ztrRqdFVcYCNOT{KL}~8}s%TGM==$&le3xLIYB0{75ucEn#oXFX_D{2mgq}kRN5r<+^`3H%R-s zI=|LAuBavQvVcF60evI34rQFOVh$aYYRol2l$N$`fAlZ}m;I3tS)9GuZd_^JzT29b zUYvT+ZZv+6PqZ6zt(nQ@om, 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 "密码"