diff --git a/forms.py b/forms.py index 5d7f4dd89d..6939434d3a 100644 --- a/forms.py +++ b/forms.py @@ -64,29 +64,29 @@ class RepoCreateForm(forms.Form): Form for creating repo and org repo. """ repo_name = forms.CharField(max_length=50, error_messages={ - 'required': '名称不能为空', - 'max_length': '名称太长,不超过50个字符' + 'required': _(u'Name can\'t be empty'), + 'max_length': _(u'Name should be less than 50 characters') }) repo_desc = forms.CharField(max_length=100, error_messages={ - 'required': '描述不能为空', - 'max_length': '描述太长,不超过100个字符' + 'required': _(u'Description can\'t be empty'), + 'max_length': _(u'Description should be less than 100 characters') }) encryption = forms.CharField(max_length=1) passwd = forms.CharField(min_length=3, max_length=15, required=False, error_messages={ - 'min_length': '密码太短', - 'max_length': '密码太长', + 'min_length': _(u'Password should be at least 3 characters'), + 'max_length': _(u'Password should be less than 15 characters'), }) passwd_again = forms.CharField(min_length=3, max_length=15, required=False, error_messages={ - 'min_length': '密码太短', - 'max_length': '密码太长', + 'min_length': _(u'Password should be at least 3 characters'), + 'max_length': _(u'Password should be less than 15 characters'), }) def clean_repo_name(self): repo_name = self.cleaned_data['repo_name'] if not is_valid_filename(repo_name): - error_msg = u"您输入的名称 %s 包含非法字符" % repo_name + error_msg = _(u"Name %s is not valid") % repo_name raise forms.ValidationError(error_msg) else: return repo_name @@ -108,7 +108,7 @@ class RepoCreateForm(forms.Form): passwd = self.cleaned_data['passwd'] passwd_again = self.cleaned_data['passwd_again'] if passwd != passwd_again: - raise forms.ValidationError("两次输入的密码不一致") + raise forms.ValidationError(_("The two password fields didn't match.")) return self.cleaned_data class SharedRepoCreateForm(RepoCreateForm): diff --git a/group/i18n.sh.template b/group/i18n.sh.template index e56d2b66e3..9dcbe0d14a 100755 --- a/group/i18n.sh.template +++ b/group/i18n.sh.template @@ -1,4 +1,7 @@ #!/bin/sh django-admin.py makemessages -l zh_CN -e py,html + +django-admin.py makemessages -d djangojs -l zh_CN + django-admin.py compilemessages diff --git a/group/locale/zh_CN/LC_MESSAGES/django.mo b/group/locale/zh_CN/LC_MESSAGES/django.mo index 887150966b..98cd7b624b 100644 Binary files a/group/locale/zh_CN/LC_MESSAGES/django.mo and b/group/locale/zh_CN/LC_MESSAGES/django.mo differ diff --git a/group/locale/zh_CN/LC_MESSAGES/django.po b/group/locale/zh_CN/LC_MESSAGES/django.po index 3a22ee9a8f..74a778e965 100644 --- a/group/locale/zh_CN/LC_MESSAGES/django.po +++ b/group/locale/zh_CN/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-27 11:11+0800\n" +"POT-Creation-Date: 2012-10-27 13:34+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -135,6 +135,8 @@ msgid "You can click \"Add\" button to add members." msgstr "可以点击上方的“添加”来加入成员。" #: templates/group/group_info.html:57 templates/group/group_info.html.py:80 +#: templates/group/group_manage.html:13 templates/group/group_manage.html:32 +#: templates/group/group_manage.html:54 msgid "Operations" msgstr "操作" @@ -163,7 +165,7 @@ msgid "Description" msgstr "描述" #: templates/group/group_info.html:78 -msgid "Update Time" +msgid "Last Update" msgstr "更新时间" #: templates/group/group_info.html:79 @@ -211,7 +213,8 @@ msgstr "回复" msgid "Hide Reply" msgstr "收起回复" -#: templates/group/group_info.html:164 +#: templates/group/group_info.html:164 templates/group/group_manage.html:40 +#: templates/group/group_manage.html:63 msgid "Delete" msgstr "删除" @@ -223,6 +226,42 @@ msgstr "前一页" msgid "Next" msgstr "下一页" +#: templates/group/group_manage.html:8 +msgid "group management" +msgstr "群组管理" + +#: templates/group/group_manage.html:16 +msgid "Set Group Avatar" +msgstr "设置群组图标" + +#: templates/group/group_manage.html:17 +msgid "Dismiss Group" +msgstr "解散群组" + +#: templates/group/group_manage.html:18 +msgid "Back to Group" +msgstr "返回群组" + +#: templates/group/group_manage.html:25 +msgid "Group Members" +msgstr "成员列表" + +#: templates/group/group_manage.html:26 +msgid "Add Members" +msgstr "添加成员" + +#: templates/group/group_manage.html:31 templates/group/group_manage.html:53 +msgid "Email" +msgstr "邮箱" + +#: templates/group/group_manage.html:47 +msgid "Group Staffs" +msgstr "管理员列表" + +#: templates/group/group_manage.html:48 +msgid "Add Staffs" +msgstr "添加管理员" + #: templates/group/groups_left_panel.html:3 msgid "Tips" msgstr "小提示" @@ -264,3 +303,6 @@ msgstr "您还没有参加任何群组,可以点击“添加群组”按钮创 #: templates/group/groups_right_panel.html:27 msgid "Group Name" msgstr "群组名称" + +#~ msgid "Update Time" +#~ msgstr "更新时间" diff --git a/group/locale/zh_CN/LC_MESSAGES/djangojs.mo b/group/locale/zh_CN/LC_MESSAGES/djangojs.mo index 8b58ba95f7..cf7bea4a06 100644 Binary files a/group/locale/zh_CN/LC_MESSAGES/djangojs.mo and b/group/locale/zh_CN/LC_MESSAGES/djangojs.mo differ diff --git a/group/locale/zh_CN/LC_MESSAGES/djangojs.po b/group/locale/zh_CN/LC_MESSAGES/djangojs.po index 94d8b91509..e6a95c3ee9 100644 --- a/group/locale/zh_CN/LC_MESSAGES/djangojs.po +++ b/group/locale/zh_CN/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-26 17:04+0800\n" +"POT-Creation-Date: 2012-10-27 13:24+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,10 +18,24 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0\n" -#: templates/group/po.js:4 +#: templates/group/po.js:3 msgid "Confirm to quit group?" msgstr "确定要退出?" -#: templates/group/po.js:5 -msgid "Confirm to unshare this repo?" +#: templates/group/po.js:4 +#, fuzzy +msgid "Confirm to unshare this library?" msgstr "确定要取消共享?" + +#: templates/group/po.js:5 +msgid "" +"

Confirm to delete this message?

" +msgstr "" +"

确认要删除该留言吗?

" + +#: templates/group/po.js:6 +msgid "Successfully deleted." +msgstr "删除成功" diff --git a/group/templates/group/group_info.html b/group/templates/group/group_info.html index 1cb7f908c9..4766b00fc5 100644 --- a/group/templates/group/group_info.html +++ b/group/templates/group/group_info.html @@ -75,7 +75,7 @@ {% trans "Name" %} {% trans "Description" %} - {% trans "Update Time" %} + {% trans "Last Update" %} {% trans "Share From" %} {% trans "Operations" %} @@ -192,7 +192,7 @@ {% include 'snippets/user_profile_js.html' %}