diff --git a/base/accounts.py b/base/accounts.py index 896e8b030b..50a5837d92 100644 --- a/base/accounts.py +++ b/base/accounts.py @@ -329,7 +329,7 @@ class RegistrationForm(forms.Form): if not emailuser: return self.cleaned_data['email'] else: - raise forms.ValidationError("该邮箱已被注册") + raise forms.ValidationError(_("A user with this email already")) def clean_userid(self): if self.cleaned_data['userid'] and len(self.cleaned_data['userid']) != 40: @@ -346,6 +346,6 @@ class RegistrationForm(forms.Form): """ if 'password1' in self.cleaned_data and 'password2' in self.cleaned_data: if self.cleaned_data['password1'] != self.cleaned_data['password2']: - raise forms.ValidationError("两次输入的密码不一致") + raise forms.ValidationError(_("The two password fields didn't match.")) return self.cleaned_data diff --git a/base/context_processors.py b/base/context_processors.py index e233d72de1..38f0060255 100644 --- a/base/context_processors.py +++ b/base/context_processors.py @@ -25,6 +25,7 @@ def base(request): base_template = request.base_template except AttributeError: base_template = 'myhome_base.html' + return { 'seafile_version': SEAFILE_VERSION, 'seahub_title': SEAHUB_TITLE, diff --git a/group/locale/zh_CN/LC_MESSAGES/django.mo b/group/locale/zh_CN/LC_MESSAGES/django.mo index cd6803eda8..1f920d9c91 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 5771ef1594..9b780cf8b7 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-23 16:30+0800\n" +"POT-Creation-Date: 2012-10-26 16:01+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,43 +62,43 @@ msgstr "无法删除自己" msgid "The group name has been occupied." msgstr "名称重复,请重新输入。" -#: views.py:563 +#: views.py:564 #, python-format msgid "Failed to add group member, %s is not in current organization." msgstr "添加成员失败,%s 未在当前团体中。" -#: views.py:597 +#: views.py:598 msgid "Failed to send mail." msgstr "邮件发送失败。" -#: views.py:614 +#: views.py:615 #, python-format msgid "Failed to add group member, %s is not registerd." msgstr "添加成员失败,%s 未注册。" -#: views.py:627 +#: views.py:628 msgid "Successfully added group member(s). An email has been sent to user(s)." msgstr "添加群组成员成功,邀请邮件已发送。" -#: views.py:629 +#: views.py:630 msgid "Successfully added group member(s)." msgstr "添加群组成员成功。" -#: views.py:795 +#: views.py:796 msgid "Recommend error: wrong group id" msgstr "推荐失败:群组id不正确" -#: views.py:803 +#: views.py:804 #, python-format msgid "Recommend to %s error: you are not in that group" msgstr "推荐到 %s 失败:未参加该群组" -#: views.py:823 +#: views.py:824 #, python-format msgid "" "Recommend to %(name)s success。" msgstr "推荐到%(name)s成功" -#: views.py:828 +#: views.py:829 msgid "Recommend failed" msgstr "推荐失败" diff --git a/group/locale/zh_CN/LC_MESSAGES/djangojs.mo b/group/locale/zh_CN/LC_MESSAGES/djangojs.mo new file mode 100644 index 0000000000..1387d07d70 Binary files /dev/null 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 new file mode 100644 index 0000000000..94d8b91509 --- /dev/null +++ b/group/locale/zh_CN/LC_MESSAGES/djangojs.po @@ -0,0 +1,27 @@ +# 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: 2012-10-26 17:04+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" + +#: templates/group/po.js:4 +msgid "Confirm to quit group?" +msgstr "确定要退出?" + +#: templates/group/po.js:5 +msgid "Confirm to unshare this repo?" +msgstr "确定要取消共享?" diff --git a/group/templates/group/dept_groups.html b/group/templates/group/dept_groups.html deleted file mode 100644 index f7132c1252..0000000000 --- a/group/templates/group/dept_groups.html +++ /dev/null @@ -1,29 +0,0 @@ -{% extends "myhome_base.html" %} -{% load url from future %} - -{% block nav_deptgroup_class %}class="cur"{% endblock %} -{% block left_panel %} - -{% include "group/groups_left_panel.html" %} -{% endblock %} - -{% block right_panel %} - -

部门

-{% include "group/groups_right_panel.html" %} -{% endblock %} - -{% block extra_script %} - -{% endblock %} diff --git a/group/templates/group/group_info.html b/group/templates/group/group_info.html index 20afd4389f..e28547f0ab 100644 --- a/group/templates/group/group_info.html +++ b/group/templates/group/group_info.html @@ -191,8 +191,8 @@ {% block extra_script %} {% include 'snippets/user_profile_js.html' %} + {% block extra_script %}{% endblock %} diff --git a/templates/myhome.html b/templates/myhome.html index f0b8fe45b4..29604f0e2c 100644 --- a/templates/myhome.html +++ b/templates/myhome.html @@ -1,47 +1,47 @@ {% extends "myhome_base.html" %} -{% load seahub_tags avatar_tags group_avatar_tags %} +{% load seahub_tags avatar_tags group_avatar_tags i18n %} {% load url from future %} {% block nav_myhome_class %}class="cur"{% endblock %} {% block left_panel %}
-

我的基本信息

+

{% trans "My Basic Infos" %}

{% avatar request.user 48 %} {% if nickname %}

{{ nickname }}

{% else %} -

暂无昵称 编辑

+

{% trans "Nickname is empty" %} {% trans

{% endif %}
{% if grpmsg_list or grpmsg_reply_list or orgmsg_list %}
-

提醒...

+

{% trans "Reminders..." %}

{% endif %}
-

已用空间

+

{% trans "Storage Used" %}

{{ quota_usage|filesizeformat }} {% if cloud_mode %}/ 2 GB {% endif %}

@@ -81,6 +81,5 @@ {% if events %} {% include "snippets/events_js.html" %} {% endif %} - {% endblock %} diff --git a/templates/myhome_base.html b/templates/myhome_base.html index 5a690b8e2b..8878e1f07d 100644 --- a/templates/myhome_base.html +++ b/templates/myhome_base.html @@ -9,21 +9,21 @@ {% if not cloud_mode %}
  • - 公共资料 + {% trans "Public Repo" %}
  • {% endif %}
  • - 群组 + {% trans "Groups" %}
  • - 共享管理 + {% trans "Share Admin" %}
  • - 通讯录 + {% trans "Contacts" %}
  • {% if not cloud_mode %}
  • - 公共信息 + {% trans "Public Info" %}
  • {% endif %} diff --git a/templates/registration/login.html b/templates/registration/login.html index 3cfd73f587..bc7ff2cea1 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -1,16 +1,17 @@ {% extends "myhome_base.html" %} -{% block title %}登录{% endblock %} +{% load i18n %} +{% block title %}{% trans "Log In" %}{% endblock %} {% block main_panel %}
    -

    登录

    +

    {% trans "Log In" %}

    @@ -27,19 +25,19 @@