1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-05-13 02:15:59 +00:00

i18n for sys admin and notifications

This commit is contained in:
zhengxie 2012-11-01 15:09:14 +08:00
parent 02a0238b57
commit 5221743afe
18 changed files with 434 additions and 212 deletions

Binary file not shown.

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-01 13:57+0800\n"
"POT-Creation-Date: 2012-11-01 15:08+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -140,6 +140,86 @@ msgstr ""
msgid "简体中文"
msgstr ""
#: templates/add_user_form.html:3 templates/add_user_form.html.py:7
msgid "Add User"
msgstr "添加新用户"
#: templates/add_user_form.html:9 templates/sys_useradmin.html:15
#: templates/registration/login.html:8
#: templates/registration/registration_form.html:11
#: templates/snippets/user_profile_html.html:27
msgid "Email"
msgstr "邮箱"
#: templates/add_user_form.html:11 templates/registration/login.html:10
#: templates/registration/registration_form.html:13
#: templates/snippets/repo_create_form.html:17
msgid "Password"
msgstr "密码"
#: templates/add_user_form.html:13
#: templates/registration/registration_form.html:15
msgid "Confirm Password"
msgstr "确认密码"
#: templates/add_user_form.html:17 templates/decrypt_repo_form.html:15
#: templates/repo.html:168 templates/repo.html.py:178 templates/repo.html:198
#: templates/repo.html.py:209 templates/repo_update_file.html:21
#: templates/repo_upload_file.html:17 templates/repo_view_file.html:141
#: templates/repo_view_file.html.py:167 templates/userinfo.html:87
#: templates/registration/login.html:13
#: templates/registration/password_change_form.html:18
#: templates/registration/password_reset_confirm.html:19
#: templates/registration/password_reset_form.html:13
#: templates/registration/registration_form.html:18
#: templates/snippets/events.html:72
#: templates/snippets/group_recommend_form.html:23
#: templates/snippets/repo_create_form.html:23
#: templates/snippets/repo_share_form.html:18
#: templates/snippets/user_profile_html.html:33
msgid "Submit"
msgstr "提交"
#: templates/add_user_form.html:26 templates/registration/login.html:28
#: templates/registration/registration_form.html:28
msgid "Email cannot be blank"
msgstr "邮箱不能为空"
#: templates/add_user_form.html:30 templates/registration/login.html:32
#: templates/registration/registration_form.html:32
msgid "Password cannot be blank"
msgstr "密码不能为空"
#: templates/add_user_form.html:34
#: templates/registration/registration_form.html:36
msgid "Confirm password cannot be blank"
msgstr "确认密码不能为空"
#: templates/add_user_form.html:38
#: templates/registration/registration_form.html:40
msgid "The two password fields not match"
msgstr "两次输入的密码不一致"
#: templates/admin_base.html:8 templates/org_admin_base.html:11
msgid "Library Management"
msgstr "资料库管理"
#: templates/admin_base.html:11
msgid "User Management"
msgstr "用户管理"
#: templates/admin_base.html:14 templates/org_admin_base.html:14
msgid "Group Management"
msgstr "群组管理"
#: templates/admin_base.html:18
msgid "Org Management"
msgstr "团体管理"
#: templates/admin_base.html:22
msgid "Notification Management"
msgstr "通知管理"
#: templates/base.html:9
msgid "File Collaboration Team Organization"
msgstr "文件 合作 团队 团体"
@ -168,7 +248,7 @@ msgstr "管理员工作台"
msgid "Welcome,"
msgstr "欢迎,"
#: templates/base.html:60 templates/myhome.html:9
#: templates/base.html:60 templates/myhome.html:9 templates/userinfo.html:13
msgid "Profile"
msgstr "设置"
@ -241,23 +321,6 @@ msgstr ""
msgid "Password: "
msgstr "密码:"
#: templates/decrypt_repo_form.html:15 templates/repo.html:168
#: templates/repo.html.py:178 templates/repo.html:198
#: templates/repo.html.py:209 templates/repo_update_file.html:21
#: templates/repo_upload_file.html:17 templates/repo_view_file.html:141
#: templates/repo_view_file.html.py:167 templates/registration/login.html:13
#: templates/registration/password_change_form.html:18
#: templates/registration/password_reset_confirm.html:19
#: templates/registration/password_reset_form.html:13
#: templates/registration/registration_form.html:18
#: templates/snippets/events.html:72
#: templates/snippets/group_recommend_form.html:23
#: templates/snippets/repo_create_form.html:23
#: templates/snippets/repo_share_form.html:18
#: templates/snippets/user_profile_html.html:33
msgid "Submit"
msgstr "提交"
#: templates/file_revisions.html:6
msgid "'s Version History"
msgstr " 版本历史"
@ -288,6 +351,9 @@ msgstr "大小"
#: templates/file_revisions.html:26 templates/public_home.html:25
#: templates/repo.html:99 templates/repo_view_snapshot.html:18
#: templates/sys_group_admin.html:14 templates/sys_org_admin.html:15
#: templates/sys_seafadmin.html:14 templates/sys_useradmin.html:5
#: templates/sys_useradmin.html.py:17 templates/userinfo.html:40
#: templates/snippets/my_owned_repos.html:21
#: templates/snippets/my_owned_repos.html:54
msgid "Operations"
@ -408,14 +474,6 @@ msgstr "公共信息"
msgid "Org Info"
msgstr "团体概况"
#: templates/org_admin_base.html:11
msgid "Library Management"
msgstr "资料库管理"
#: templates/org_admin_base.html:14
msgid "Group Management"
msgstr "群组管理"
#: templates/org_base.html:9
msgid "Personal"
msgstr "个人页面"
@ -424,7 +482,10 @@ msgstr "个人页面"
msgid "Users"
msgstr "成员列表"
#: templates/pubinfo.html:16 templates/snippets/my_groups.html:16
#: templates/pubinfo.html:16 templates/sys_group_admin.html:54
#: templates/sys_org_admin.html:55 templates/sys_seafadmin.html:55
#: templates/userinfo.html:55 templates/userinfo.html.py:78
#: templates/snippets/my_groups.html:16
msgid "Empty"
msgstr "暂无"
@ -460,7 +521,9 @@ msgid "New Library"
msgstr "新建资料库"
#: templates/public_home.html:21 templates/repo.html:97
#: templates/repo_history_view.html:50
#: templates/repo_history_view.html:50 templates/sys_group_admin.html:11
#: templates/sys_org_admin.html:11 templates/sys_seafadmin.html:11
#: templates/userinfo.html:38 templates/userinfo.html.py:63
#: templates/snippets/my_owned_repos.html:18
#: templates/snippets/my_owned_repos.html:50
#: templates/snippets/repo_create_form.html:4
@ -468,21 +531,27 @@ msgid "Name"
msgstr "名称"
#: templates/public_home.html:22 templates/repo_history.html:18
#: templates/snippets/my_owned_repos.html:19
#: templates/sys_seafadmin.html:13 templates/userinfo.html:39
#: templates/userinfo.html.py:65 templates/snippets/my_owned_repos.html:19
#: templates/snippets/my_owned_repos.html:51
#: templates/snippets/repo_create_form.html:6
msgid "Description"
msgstr "描述"
#: templates/public_home.html:23 templates/repo_history.html:16
#: templates/snippets/my_owned_repos.html:20
#: templates/snippets/my_owned_repos.html:52
#: templates/snippets/my_owned_repos.html:94
msgid "Last Update"
msgstr "更新时间"
#: templates/public_home.html:24
#: templates/public_home.html:24 templates/userinfo.html:64
msgid "Share From"
msgstr "共享来源"
#: templates/public_home.html:31 templates/snippets/my_owned_repos.html:25
#: templates/public_home.html:31 templates/sys_seafadmin.html:18
#: templates/userinfo.html:45 templates/userinfo.html.py:70
#: templates/snippets/my_owned_repos.html:25
#: templates/snippets/my_owned_repos.html:61
#: templates/snippets/repo_create_form.html:11
#: templates/snippets/repo_share_form.html:13
@ -563,7 +632,10 @@ msgid "More operations"
msgstr "更多操作"
#: templates/repo.html:115 templates/repo.html.py:145
#: templates/repo_view_file.html:74 templates/snippets/my_owned_repos.html:36
#: templates/repo_view_file.html:74 templates/sys_group_admin.html:21
#: templates/sys_org_admin.html:23 templates/sys_seafadmin.html:22
#: templates/sys_useradmin.html:30 templates/userinfo.html:49
#: templates/snippets/my_owned_repos.html:36
msgid "Delete"
msgstr "删除"
@ -680,14 +752,20 @@ msgid "More"
msgstr "详情"
#: templates/repo_history.html:47 templates/repo_view_snapshot.html:51
#: templates/sys_group_admin.html:28 templates/sys_seafadmin.html:29
#: templates/sys_useradmin.html:40
msgid "Previous"
msgstr "前一页"
#: templates/repo_history.html:50 templates/repo_view_snapshot.html:54
#: templates/sys_group_admin.html:31 templates/sys_seafadmin.html:32
#: templates/sys_useradmin.html:43
msgid "Next"
msgstr "下一页"
#: templates/repo_history.html:55 templates/repo_view_snapshot.html:56
#: templates/sys_group_admin.html:36 templates/sys_seafadmin.html:37
#: templates/sys_useradmin.html:48
msgid "Per page: "
msgstr "每页:"
@ -835,7 +913,7 @@ msgid "Please type a message"
msgstr "请先输入您的评论"
#: templates/repo_view_file.html:413
msgid "Cannot find a application to open file. Seafile will open the folder."
msgid "Cannot find an application to open file. Seafile will open the folder."
msgstr "找不到打开该类型文件的程序。Seafile 将为你打开该文件所在目录"
#: templates/repo_view_file.html:418
@ -890,6 +968,73 @@ msgstr "生成时间"
msgid "Really want to restore this library?"
msgstr "确定要还原这个资料库?"
#: templates/sys_group_admin.html:7
msgid "All Groups"
msgstr "所有群组"
#: templates/sys_group_admin.html:12 templates/sys_org_admin.html:13
msgid "Creator"
msgstr "创建者"
#: templates/sys_group_admin.html:13 templates/sys_org_admin.html:14
msgid "Create At"
msgstr "创建时间"
#: templates/sys_group_admin.html:60
msgid "Really delete this group?"
msgstr "确定要删除这个群组?"
#: templates/sys_org_admin.html:7
msgid "All Organizations"
msgstr "所有团体"
#: templates/sys_org_admin.html:12
msgid "Url Prefix"
msgstr "个性域名"
#: templates/sys_org_admin.html:61
msgid "Really delete this organization?"
msgstr "确定要删除这个团体?"
#: templates/sys_seafadmin.html:6
msgid "All Libraries"
msgstr "所有资料库"
#: templates/sys_seafadmin.html:12
msgid "Owner"
msgstr "拥有者"
#: templates/sys_useradmin.html:7
msgid "Add new user"
msgstr "添加新用户"
#: templates/sys_useradmin.html:12
msgid "All Members"
msgstr "所有用户"
#: templates/sys_useradmin.html:16
msgid "Status"
msgstr "状态"
#: templates/sys_useradmin.html:24
msgid "Activated"
msgstr "已激活"
#: templates/sys_useradmin.html:26
msgid "Active"
msgstr "激活"
#: templates/sys_useradmin.html:31
#: templates/registration/password_reset_confirm.html:4
#: templates/registration/password_reset_form.html:4
#: templates/registration/password_reset_form.html:7
msgid "Password Reset"
msgstr "密码重置"
#: templates/sys_useradmin.html:77
msgid "Really reset?"
msgstr "确定要重置?"
#: templates/text_diff.html:6
msgid "modification details"
msgstr "修改详情"
@ -906,31 +1051,38 @@ msgstr "修改前"
msgid "after modification"
msgstr "修改历史"
#: templates/registration/login.html:8
#: templates/registration/registration_form.html:11
#: templates/snippets/user_profile_html.html:27
msgid "Email"
msgstr "邮箱"
#: templates/userinfo.html:24
msgid "Space Used"
msgstr "已用空间"
#: templates/registration/login.html:10
#: templates/registration/registration_form.html:13
#: templates/snippets/repo_create_form.html:17
msgid "Password"
msgstr "密码"
#: templates/userinfo.html:25
msgid "Set Quota"
msgstr "设置容量"
#: templates/userinfo.html:33
msgid "Owned"
msgstr "我拥有的"
#: templates/userinfo.html:58 templates/snippets/my_owned_repos.html:8
msgid "Shared"
msgstr "共享给我的"
#: templates/userinfo.html:82
msgid "Set user storage limit"
msgstr "设置该用户的存储容量上限"
#: templates/userinfo.html:85
msgid "Tip: 0 means default limit"
msgstr "Tip: 设置为0表示重置为默认上限"
#: templates/userinfo.html:133
msgid "Really delete this library?"
msgstr "确定要删除这个资料库?"
#: templates/registration/login.html:14
msgid "Forgot password?"
msgstr "忘记密码"
#: templates/registration/login.html:28
msgid "Email cant be blank"
msgstr "邮箱不能为空"
#: templates/registration/login.html:32
#: templates/registration/registration_form.html:32
msgid "Password cannot be blank"
msgstr "密码不能为空"
#: templates/registration/login.html:37
msgid "Incorrect email or password"
msgstr "您输入的邮箱或密码不正确"
@ -974,12 +1126,6 @@ msgstr "新密码:"
msgid "Confirm Password: "
msgstr "确认密码"
#: templates/registration/password_reset_confirm.html:4
#: templates/registration/password_reset_form.html:4
#: templates/registration/password_reset_form.html:7
msgid "Password Reset"
msgstr "密码重置"
#: templates/registration/password_reset_confirm.html:11
msgid "Input new password"
msgstr "输入新密码"
@ -1036,22 +1182,6 @@ msgstr "注册"
msgid "Welcome back, you are already signed in."
msgstr "欢迎回来,您已登录。"
#: templates/registration/registration_form.html:15
msgid "Confirm Password"
msgstr "确认密码"
#: templates/registration/registration_form.html:28
msgid "Email cannot be blank"
msgstr "邮箱不能为空"
#: templates/registration/registration_form.html:36
msgid "Confirm password cannot be blank"
msgstr "确认密码不能为空"
#: templates/registration/registration_form.html:40
msgid "The two password fields not match"
msgstr "两次输入的密码不一致"
#: templates/snippets/bottom_bar.html:3
#: templates/snippets/group_recommend_form.html:4
msgid "Recommend"
@ -1158,20 +1288,10 @@ msgstr "资料库"
msgid "Mine"
msgstr "我拥有的"
#: templates/snippets/my_owned_repos.html:8
msgid "Shared"
msgstr "共享给我的"
#: templates/snippets/my_owned_repos.html:9
msgid "Starred"
msgstr "星标文件"
#: templates/snippets/my_owned_repos.html:20
#: templates/snippets/my_owned_repos.html:52
#: templates/snippets/my_owned_repos.html:94
msgid "UpdateTime"
msgstr "更新时间"
#: templates/snippets/my_owned_repos.html:25
#: templates/snippets/my_owned_repos.html:61
#: templates/snippets/my_owned_repos.html:63
@ -1260,5 +1380,11 @@ msgstr "名字(可选)"
msgid "Note(optional)"
msgstr "备注(可选)"
#~ msgid "UpdateTime"
#~ msgstr "更新时间"
#~ msgid "Email cant be blank"
#~ msgstr "邮箱不能为空"
#~ msgid "more history"
#~ msgstr "更多历史"

7
notifications/i18n.sh.template Executable file
View File

@ -0,0 +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

Binary file not shown.

View File

@ -0,0 +1,65 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-01 15:05+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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/notifications/add_notification_form.html:3
#: templates/notifications/add_notification_form.html:7
#: templates/notifications/notification_list.html:8
msgid "Add new notification"
msgstr "添加新通知"
#: templates/notifications/add_notification_form.html:9
msgid "Notification"
msgstr "通知"
#: templates/notifications/add_notification_form.html:11
msgid "Submit"
msgstr "提交"
#: templates/notifications/notification_list.html:6
#: templates/notifications/notification_list.html:18
msgid "Operations"
msgstr "操作"
#: templates/notifications/notification_list.html:13
msgid "All Notifications"
msgstr "所有通知"
#: templates/notifications/notification_list.html:17
msgid "Notification Detail"
msgstr "通知内容"
#: templates/notifications/notification_list.html:24
msgid "(current notification)"
msgstr "(当前通知)"
#: templates/notifications/notification_list.html:28
msgid "Set to current"
msgstr "设为当前通知"
#: templates/notifications/notification_list.html:30
msgid "Delete"
msgstr "删除"
#: templates/notifications/notification_list.html:62
msgid "Empty"
msgstr "空"
#~ msgid "Detail"
#~ msgstr "内容"

View File

@ -1,18 +1,15 @@
{% extends "admin_base.html" %}
{% block title %}添加通知{% endblock %}
{% load i18n %}
{% block title %}{% trans "Add new notification" %}{% endblock %}
{% block nav_notificationadmin_class %}class="cur"{% endblock %}
{% block main_panel %}
<div class="narrow-panel">
<h3>添加通知</h3>
<h3>{% trans "Add new notification" %}</h3>
<form action="" method="post">
<label for="id_message">通知:</label>
<label for="id_message">{% trans "Notification" %}</label>
{{ form.message }}
<input type="submit" value="提交" class="submit" />
<input type="submit" value="{% trans "Submit" %}" class="submit" />
</form>
</div>
{% endblock %}
{% block extra_script %}
<script type="text/javascript">
</script>
{% endblock %}

View File

@ -1,32 +1,33 @@
{% extends "admin_base.html" %}
{% load i18n %}
{% block nav_notificationadmin_class %}class="cur"{% endblock %}
{% block left_panel %}
<h3>操作</h3>
<h3>{% trans "Operations" %}</h3>
<ul class="with-bg">
<li><a href="{{ SITE_ROOT }}notification/add/">添加新通知</a></li>
<li><a href="{{ SITE_ROOT }}notification/add/">{% trans "Add new notification" %}</a></li>
</ul>
{% endblock %}
{% block right_panel %}
<h3>所有通知</h3>
<h3>{% trans "All Notifications" %}</h3>
{% if notes %}
<table>
<tr>
<th width="75%">内容</th>
<th width="25%">操作</th>
<th width="75%">{% trans "Notification Detail" %}</th>
<th width="25%">{% trans "Operations" %}</th>
</tr>
{% for note in notes %}
<tr>
<td>{{ note.message }}
{% if note.primary == 1 %}
<span class="cur-note">(当前通知)</span>
<span class="cur-note">{% trans "(current notification)" %}</span>
{% endif %}
<td>
{% if note.primary != 1 %}
<a href="#" data="{{ SITE_ROOT }}notification/set-primary/{{ note.id }}/" class="note-change-btn op">设为当前通知</a>
<a href="#" data="{{ SITE_ROOT }}notification/set-primary/{{ note.id }}/" class="note-change-btn op">{% trans "Set to current" %}</a>
{% endif %}
<a href="#" data="{{ SITE_ROOT }}notification/delete/{{ note.id }}/" class="note-delete-btn op">删除</a>
<a href="#" data="{{ SITE_ROOT }}notification/delete/{{ note.id }}/" class="note-delete-btn op">{% trans "Delete" %}</a>
</td>
</tr>
{% endfor %}
@ -58,7 +59,7 @@
</div>
-->
{% else %}
<p>暂无</p>
<p>{% trans "Empty" %}</p>
{% endif %}
{% endblock %}

View File

@ -1,46 +1,43 @@
{% extends base_template %}
{% block title %}添加用户{% endblock %}
{% load i18n %}
{% block title %}{% trans "Add User" %}{% endblock %}
{% block nav_useradmin_class %}class="cur"{% endblock %}
{% block main_panel %}
<div class="narrow-panel">
<h3>添加用户</h3>
<h3>{% trans "Add User" %}</h3>
<form action="" method="post">
<label for="id_email">邮箱:</label>
{{ form.email }}
<label for="id_password1">密码:</label>
{{ form.password1 }}
<label for="id_password2">确认密码:</label>
{{ form.password2 }}
{{ form.email.errors }}
{{ form.password1.errors }}
{{ form.password2.errors }}
<label for="id_email">{% trans "Email" %}</label>
{{ form.email }} {{ form.email.errors }}
<label for="id_password1">{% trans "Password" %}</label>
{{ form.password1 }} {{ form.password1.errors }}
<label for="id_password2">{% trans "Confirm Password" %}</label>
{{ form.password2 }} {{ form.password2.errors }}
<p class="error hide" id="error"></p>
<input type="submit" value="添加" class="submit" />
<input type="submit" value="{% trans "Submit" %}" class="submit" />
</form>
</div>
{% endblock %}
{% block extra_script %}
<script type="text/javascript">
$('input[type="submit"]').click(function() {
if (!$.trim($('input[name="email"]').attr('value'))) {
$('#error').html('请输入邮箱。').removeClass('hide');
return false;
}
if (!$.trim($('input[name="password1"]').attr('value'))) {
$('#error').html('请输入密码。').removeClass('hide');
return false;
}
if (!$.trim($('input[name="password2"]').attr('value'))) {
$('#error').html('请确认密码。').removeClass('hide');
return false;
}
if ($.trim($('input[name="password1"]').attr('value')) != $.trim($('input[name="password2"]').attr('value'))) {
$('#error').html('两次输入的密码不一致。').removeClass('hide');
return false;
}
});
$('input[type="submit"]').click(function(){
if (!$.trim($('input[name="email"]').attr('value'))) {
$('.error').removeClass('hide').html('{% trans "Email cannot be blank" %}');
return false;
}
if (!$.trim($('input[name="password1"]').attr('value'))) {
$('.error').removeClass('hide').html('{% trans "Password cannot be blank" %}');
return false;
}
if (!$.trim($('input[name="password2"]').attr('value'))) {
$('.error').removeClass('hide').html('{% trans "Confirm password cannot be blank" %}');
return false;
}
if ($.trim($('input[name="password1"]').attr('value')) != $.trim($('input[name="password2"]').attr('value'))) {
$('.error').removeClass('hide').html('{% trans "The two password fields not match" %}');
return false;
}
});
</script>
{% endblock %}

View File

@ -1,24 +1,25 @@
{% extends "base.html" %}
{% load i18n %}
{% block top_bar_sys_manager_class %} class="cur"{% endblock %}
{% block nav %}
<ul class="nav">
{% if request.user.is_staff %}
<li>
<a href="{{ SITE_ROOT }}sys/seafadmin/" {% block nav_seafadmin_class %}{% endblock %}>资料库管理</a>
<a href="{{ SITE_ROOT }}sys/seafadmin/" {% block nav_seafadmin_class %}{% endblock %}>{% trans "Library Management" %}</a>
</li>
<li>
<a href="{{ SITE_ROOT }}sys/useradmin/" {% block nav_useradmin_class %}{% endblock %}>用户管理</a>
<a href="{{ SITE_ROOT }}sys/useradmin/" {% block nav_useradmin_class %}{% endblock %}>{% trans "User Management" %}</a>
</li>
<li>
<a href="{{ SITE_ROOT }}sys/groupadmin/" {% block nav_groupadmin_class %}{% endblock %}>群组管理</a>
<a href="{{ SITE_ROOT }}sys/groupadmin/" {% block nav_groupadmin_class %}{% endblock %}>{% trans "Group Management" %}</a>
</li>
{% if request.cloud_mode %}
<li>
<a href="{{ SITE_ROOT }}sys/orgadmin/" {% block nav_orgadmin_class %}{% endblock %}>团体管理</a>
<a href="{{ SITE_ROOT }}sys/orgadmin/" {% block nav_orgadmin_class %}{% endblock %}>{% trans "Org Management" %}</a>
</li>
{% endif %}
<li>
<a href="{{ SITE_ROOT }}sys/notificationadmin/" {% block nav_notificationadmin_class %}{% endblock %}>通知管理</a>
<a href="{{ SITE_ROOT }}sys/notificationadmin/" {% block nav_notificationadmin_class %}{% endblock %}>{% trans "Notification Management" %}</a>
</li>
{% endif %}
</ul>

View File

@ -25,7 +25,7 @@
<script type="text/javascript">
$('input[type="submit"]').click(function(){
if (!$.trim($('input[name="username"]').attr('value'))) {
$('.error').removeClass('hide').html('{% trans "Email cant be blank" %}');
$('.error').removeClass('hide').html('{% trans "Email cannot be blank" %}');
return false;
}
if (!$.trim($('input[name="password"]').attr('value'))) {

View File

@ -410,7 +410,7 @@ function send_open_local_file_request(path) {
} else if (data['no_assoc'] === true) {
// no application to open the file
$('#open-local-error').html('{% trans "Cannot find a application to open file. Seafile will open the folder." %}');
$('#open-local-error').html('{% trans "Cannot find an application to open file. Seafile will open the folder." %}');
} else if (data['outdated'] === true) {
// local repo not in sync yet

View File

@ -17,7 +17,7 @@
<th width="4%"><!--icon--></th>
<th width="24%">{% trans "Name" %}</th>
<th width="43%">{% trans "Description" %}</th>
<th width="15%">{% trans "UpdateTime" %}</th>
<th width="15%">{% trans "Last Update" %}</th>
<th width="14%">{% trans "Operations" %}</th>
</tr>
{% for repo in owned_repos %}
@ -49,7 +49,7 @@
<th width="4%"><!--icon--></th>
<th width="20%">{% trans "Name" %}</th>
<th width="36%">{% trans "Description" %}</th>
<th width="15%">{% trans "UpdateTime" %}</th>
<th width="15%">{% trans "Last Update" %}</th>
<th width="15%">{% trans "Shared By" %}</th>
<th width="10%">{% trans "Operations" %}</th>
</tr>
@ -91,7 +91,7 @@
<th width="5%"></th>
<th width="45%">{% trans "File Name" %}</th>
<th width="30%">{% trans "Library" %}</th>
<th width="20%">{% trans "UpdateTime" %}</th>
<th width="20%">{% trans "Last Update" %}</th>
</tr>
{% for sfile in starred_files %}
<tr>

View File

@ -1,36 +1,39 @@
{% extends "admin_base.html" %}
{% load seahub_tags %}
{% load seahub_tags i18n %}
{% block nav_groupadmin_class %}class="cur"{% endblock %}
{% block right_panel %}
<h3>所有群组</h3>
<h3>{% trans "All Groups" %}</h3>
{% if groups %}
<table>
<tr>
<th width="30%">名字</th>
<th width="40%">创建者</th>
<th width="23%">创建时间</th>
<th width="7%">操作</th>
<th width="30%">{% trans "Name" %}</th>
<th width="35%">{% trans "Creator" %}</th>
<th width="23%">{% trans "Create At" %}</th>
<th width="12%">{% trans "Operations" %}</th>
</tr>
{% for group in groups %}
<tr>
<td><a href="{{ SITE_ROOT }}group/{{ group.props.id }}/">{{ group.props.group_name }}</a></td>
<td>{{ group.props.creator_name }}</td>
<td>{{ group.props.timestamp|tsstr_sec }}</td>
<td><a href="#" data="{{ SITE_ROOT}}group/{{ group.id }}/?op=delete&src=sysgroupadmin" class="group-remove-btn op">删除</a></td>
<td><a href="#" data="{{ SITE_ROOT}}group/{{ group.id }}/?op=delete&src=sysgroupadmin" class="group-remove-btn op">{% trans "Delete" %}</a></td>
</tr>
{% endfor %}
</table>
<div id="paginator">
{% if current_page != 1 %}
<a href="{{ SITE_ROOT }}sys/groupadmin/?page={{ prev_page }}&per_page={{ per_page }}">上一页</a>
<a href="{{ SITE_ROOT }}sys/groupadmin/?page={{ prev_page }}&per_page={{ per_page }}">{% trans "Previous" %}</a>
{% endif %}
{% if page_next %}
<a href="{{ SITE_ROOT }}sys/groupadmin/?page={{ next_page }}&per_page={{ per_page }}">下一页</a>
<a href="{{ SITE_ROOT }}sys/groupadmin/?page={{ next_page }}&per_page={{ per_page }}">{% trans "Next" %}</a>
{% endif %}
<span>每页:</span>
{% if current_page != 1 or page_next %}
|
{% endif %}
<span>{% trans "Per page: " %}</span>
{% if per_page == 25 %}
<span> 25 </span>
{% else %}
@ -48,13 +51,13 @@
{% endif %}
</div>
{% else %}
<p>暂无</p>
<p>{% trans "Empty" %}</p>
{% endif %}
{% endblock %}
{% block extra_script %}
<script type="text/javascript">
addConfirmTo($('.group-remove-btn'), '确定要删除群组?')
addConfirmTo($('.group-remove-btn'), '{% trans "Really delete this group?" %}')
</script>
{% endblock %}

View File

@ -1,18 +1,18 @@
{% extends "admin_base.html" %}
{% load seahub_tags %}
{% load seahub_tags i18n %}
{% block nav_orgadmin_class %}class="cur"{% endblock %}
{% block right_panel %}
<h3>所有团体</h3>
<h3>{% trans "All Organizations" %}</h3>
{% if orgs %}
<table>
<tr>
<th width="20%">名字</th>
<th width="20%">域名前缀</th>
<th width="30%">创建者</th>
<th width="23%">创建时间</th>
<th width="7%">操作</th>
<th width="20%">{% trans "Name" %}</th>
<th width="18%">{% trans "Url Prefix" %}</th>
<th width="27%">{% trans "Creator" %}</th>
<th width="23%">{% trans "Create At" %}</th>
<th width="12%">{% trans "Operations" %}</th>
</tr>
{% for org in orgs %}
<tr>
@ -20,7 +20,7 @@
<td>{{ org.url_prefix }}</td>
<td>{{ org.creator }}</td>
<td>{{ org.ctime|tsstr_sec }}</td>
<td><a href="#" data="{{ SITE_ROOT}}org/remove/{{ org.org_id }}/" class="org-remove-btn op">删除</a></td>
<td><a href="#" data="{{ SITE_ROOT}}org/remove/{{ org.org_id }}/" class="org-remove-btn op">{% trans "Delete" %}</a></td>
</tr>
{% endfor %}
</table>
@ -52,13 +52,13 @@
</div>
-->
{% else %}
<p>暂无</p>
<p>{% trans "Empty" %}</p>
{% endif %}
{% endblock %}
{% block extra_script %}
<script type="text/javascript">
addConfirmTo($('.org-remove-btn'), '确定要删除该团体?');
addConfirmTo($('.org-remove-btn'), '{% trans "Really delete this organization?" %}');
</script>
{% endblock %}

View File

@ -1,36 +1,40 @@
{% extends "admin_base.html" %}
{% load i18n %}
{% block nav_seafadmin_class %}class="cur"{% endblock %}
{% block right_panel %}
<h3>所有资料库</h3>
<h3>{% trans "All Libraries" %}</h3>
{% if repos %}
<table>
<tr>
<th width="4%"><!--icon--></th>
<th width="25%">名字</th>
<th width="28%">拥有者</th>
<th width="36%">描述</th>
<th width="7%">操作</th>
<th width="25%">{% trans "Name" %}</th>
<th width="28%">{% trans "Owner" %}</th>
<th width="31%">{% trans "Description" %}</th>
<th width="12%">{% trans "Operations" %}</th>
</tr>
{% for repo in repos %}
<tr>
<td><img src="{{MEDIA_URL}}img/sync-folder-20.png" title="可读写" alt="目录icon" /></td>
<td><img src="{{MEDIA_URL}}img/sync-folder-20.png" title="{% trans "Read-Write" %}" alt="目录icon" /></td>
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/">{{ repo.props.name }}</a></td>
<td><a href="{{ SITE_ROOT }}useradmin/info/{{ repo.owner }}/">{{ repo.owner}}</a></td>
<td>{{ repo.props.desc }}</td>
<td><a href="#" data="{{ SITE_ROOT }}repo/remove/{{ repo.props.id }}/?next={{ request.path }}" class="repo-delete-btn op">删除</a></td>
<td><a href="#" data="{{ SITE_ROOT }}repo/remove/{{ repo.props.id }}/?next={{ request.path }}" class="repo-delete-btn op">{% trans "Delete" %}</a></td>
</tr>
{% endfor %}
</table>
<div id="paginator">
{% if current_page != 1 %}
<a href="{{ SITE_ROOT }}sys/seafadmin/?page={{ prev_page }}&per_page={{ per_page }}">上一页</a>
<a href="{{ SITE_ROOT }}sys/seafadmin/?page={{ prev_page }}&per_page={{ per_page }}">{% trans "Previous" %}</a>
{% endif %}
{% if page_next %}
<a href="{{ SITE_ROOT }}sys/seafadmin/?page={{ next_page }}&per_page={{ per_page }}">下一页</a>
<a href="{{ SITE_ROOT }}sys/seafadmin/?page={{ next_page }}&per_page={{ per_page }}">{% trans "Next" %}</a>
{% endif %}
<span>每页:</span>
{% if current_page != 1 or page_next %}
|
{% endif %}
<span>{% trans "Per page: " %}</span>
{% if per_page == 25 %}
<span> 25 </span>
{% else %}
@ -48,7 +52,7 @@
{% endif %}
</div>
{% else %}
<p>暂无</p>
<p>{% trans "Empty" %}</p>
{% endif %}
{% endblock %}

View File

@ -1,34 +1,34 @@
{% extends "admin_base.html" %}
{% load i18n %}
{% block nav_useradmin_class %}class="cur"{% endblock %}
{% block left_panel %}
<h3>操作</h3>
<h3>{% trans "Operations" %}</h3>
<ul class="with-bg">
<li><a href="{{ SITE_ROOT }}useradmin/add/">添加用户</a></li>
<li><a href="{{ SITE_ROOT }}useradmin/add/">{% trans "Add new user" %}</a></li>
</ul>
{% endblock %}
{% block right_panel %}
<h3>所有用户</h3>
<h3>{% trans "All Members" %}</h3>
<table>
<tr>
<th width="62%">邮箱</th>
<th width="20%">是否激活</th>
<th width="18%">操作</th>
<th width="55%">{% trans "Email" %}</th>
<th width="20%">{% trans "Status" %}</th>
<th width="25%">{% trans "Operations" %}</th>
</tr>
{% for user in users %}
<tr>
<td><a href="{{ SITE_ROOT }}useradmin/info/{{ user.props.email }}/">{{ user.props.email }}</a></td>
{% if user.props.is_active %}
<td>已激活</td>
<td>{% trans "Activated" %}</td>
{% else %}
<td><a href="#" data="{{ SITE_ROOT }}useradmin/activate/{{ user.props.id }}/" class="activate op">激活</a></td>
<td><a href="#" data="{{ SITE_ROOT }}useradmin/activate/{{ user.props.id }}/" class="activate op">{% trans "Active" %}</a></td>
{% endif %}
<td>
{% if not user.is_self %}
<a href="#" class="remove-user-btn op" data="{{ SITE_ROOT }}useradmin/remove/{{ user.props.id }}/">删除</a>
<a href="#" class="reset-user-btn op" data="{{ SITE_ROOT }}useradmin/password/reset/{{ user.props.id }}/">密码重置</a>
<a href="#" class="remove-user-btn op" data="{{ SITE_ROOT }}useradmin/remove/{{ user.props.id }}/">{% trans "Delete" %}</a>
<a href="#" class="reset-user-btn op" data="{{ SITE_ROOT }}useradmin/password/reset/{{ user.props.id }}/">{% trans "Password Reset" %}</a>
{% endif %}
</td>
</tr>
@ -37,12 +37,15 @@
<div id="paginator">
{% if current_page != 1 %}
<a href="{{ SITE_ROOT }}sys/useradmin/?page={{ prev_page }}&per_page={{ per_page }}">上一页</a>
<a href="{{ SITE_ROOT }}sys/useradmin/?page={{ prev_page }}&per_page={{ per_page }}">{% trans "Previous" %}</a>
{% endif %}
{% if page_next %}
<a href="{{ SITE_ROOT }}sys/useradmin/?page={{ next_page }}&per_page={{ per_page }}">下一页</a>
<a href="{{ SITE_ROOT }}sys/useradmin/?page={{ next_page }}&per_page={{ per_page }}">{% trans "Next" %}</a>
{% endif %}
<span>每页:</span>
{% if current_page != 1 or page_next %}
|
{% endif %}
<span>{% trans "Per page: " %}</span>
{% if per_page == 25 %}
<span> 25 </span>
{% else %}
@ -71,6 +74,6 @@ $('.activate').each(function(){
});
addConfirmTo($('.remove-user-btn'));
addConfirmTo($('.reset-user-btn'), '确定要重置?');
addConfirmTo($('.reset-user-btn'), '{% trans "Really reset?" %}');
</script>
{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends "admin_base.html" %}
{% load i18n avatar_tags %}
{% load url from future %}
{% block nav_useradmin_class %}class="cur"{% endblock %}
@ -9,10 +9,20 @@
<li><a href="{{ SITE_ROOT }}useradmin/add/">添加用户</a></li>
</ul>
-->
<div class="info-item">
<h3 class="info-item-top">{% trans "Profile" %}</h3>
<div class="info-item-bottom home-profile ovhd">
<a href="{{ SITE_ROOT }}profile/" class="no-deco">{% avatar request.user 48 %}</a>
{% if nickname %}
<p class="fleft">{{ nickname }}</p>
{% endif %}
</div>
</div>
<div class="info-item">
<div class="info-item-top">
<h3 class="inbl">已用空间</h3>
<a href="#" class="set-quota op">设置容量</a>
<h3 class="inbl">{% trans "Space Used" %}</h3>
<a href="#" class="set-quota op">{% trans "Set Quota" %}</a>
</div>
<p class="info-item-bottom">{{ quota_usage|filesizeformat }} {% if quota > 0 %} / {{ quota|filesizeformat }} {% endif %}</p>
</div>
@ -20,44 +30,44 @@
{% endblock %}
{% block right_panel %}
<h3>{{ email }} 拥有的资料库</h3>
<h3>{% trans "Owned" %}</h3>
{% if owned_repos %}
<table>
<tr>
<th width="4%"><!--icon--></th>
<th width="30%">名字</th>
<th width="46%">描述</th>
<th width="20%">操作</th>
<th width="30%">{% trans "Name" %}</th>
<th width="46%">{% trans "Description" %}</th>
<th width="20%">{% trans "Operations" %}</th>
</tr>
{% for repo in owned_repos %}
<tr>
<td><img src="{{MEDIA_URL}}img/sync-folder-20.png" title="可读写" alt="目录icon" /></td>
<td><img src="{{MEDIA_URL}}img/sync-folder-20.png" title="{% trans "Read-Write" %}" alt="目录icon" /></td>
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/">{{ repo.props.name }}</a></td>
<td>{{ repo.props.desc }}</td>
<td>
<a href="#" data="{{ SITE_ROOT }}repo/remove/{{ repo.props.id }}/?next={{ request.path }}" class="remove-user-repo op">删除</a>
<a href="#" data="{{ SITE_ROOT }}repo/remove/{{ repo.props.id }}/?next={{ request.path }}" class="remove-user-repo op">{% trans "Delete" %}</a>
</td>
</tr>
{% endfor %}
</table>
{% else %}
<p>暂无</p>
<p>{% trans "Empty" %}</p>
{% endif %}
<h3>共享给 {{ email }} 的资料库</h3>
<h3>{% trans "Shared" %}</h3>
{% if in_repos %}
<table>
<tr>
<th width="4%"><!--icon--></th>
<th width="30%">名字</th>
<th width="26%">共享来源</th>
<th width="40%">描述</th>
<th width="30%">{% trans "Name" %}</th>
<th width="26%">{% trans "Share From" %}</th>
<th width="40%">{% trans "Description" %}</th>
</tr>
{% for repo in in_repos %}
<tr>
<td><img src="{{MEDIA_URL}}img/sync-folder-20.png" title="可读写" alt="目录icon" /></td>
<td><img src="{{MEDIA_URL}}img/sync-folder-20.png" title="{% trans "Read-Write" %}" alt="目录icon" /></td>
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}">{{ repo.props.repo_name }}</a></td>
<td>{{ repo.props.user }}</td>
<td>{{ repo.props.repo_desc }}</td>
@ -65,16 +75,16 @@
{% endfor %}
</table>
{% else %}
<p>暂无</p>
<p>{% trans "Empty" %}</p>
{% endif %}
<form id="set-quota-form" method="post" class="hide">{% csrf_token %}
<label>设置该用户的存储容量上限</label><br />
<label>{% trans "Set user storage limit" %}</label><br />
<input type="hidden" name="email" value="{{ email }}" />
<input type="text" name="quota" /> MB <br />
<p class="tip">Tip: 设置为0表示重置为默认上限</p>
<p class="tip">{% trans "Tip: 0 means default limit" %}</p>
<p class="error hide"></p>
<input type="submit" value="提交" class="submit" />
<input type="submit" value="{% trans "Submit" %}" class="submit" />
</form>
{% endblock %}
@ -120,7 +130,7 @@ $('#set-quota-form .submit').click(function() {
return false;
});
addConfirmTo($('.remove-user-repo'), '确定要删除该资料库?');
addConfirmTo($('.remove-user-repo'), '{% trans "Really delete this library?" %}');
</script>
{% endblock %}

View File

@ -1879,13 +1879,21 @@ def user_info(request, email):
in_repos = seafserv_threaded_rpc.list_share_repos(email, 'to_email',
-1, -1)
# get nickname
if not Profile.objects.filter(user=email):
nickname = ''
else:
profile = Profile.objects.filter(user=email)[0]
nickname = profile.nickname
return render_to_response(
'userinfo.html', {
'owned_repos': owned_repos,
'quota': quota,
'quota_usage': quota_usage,
"in_repos": in_repos,
'email': email
'email': email,
'nickname': nickname,
}, context_instance=RequestContext(request))
@login_required