1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 08:28:11 +00:00

i18n for share

This commit is contained in:
zhengxie
2012-10-29 11:19:21 +08:00
parent f4afd0edef
commit ca79f8fca0
10 changed files with 172 additions and 37 deletions

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-27 21:11+0800\n"
"POT-Creation-Date: 2012-10-29 10:41+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"
@@ -190,6 +190,8 @@ msgstr "信息栏"
#: templates/group/group_info.html:124
#: templates/group/groups_right_panel.html:30
#: templates/group/grpmember_add_form.html:12
#: templates/group/grpmember_add_form.html:19
msgid "Submit"
msgstr "提交"
@@ -304,5 +306,26 @@ msgstr "您还没有参加任何群组,可以点击“添加群组”按钮创
msgid "Group Name"
msgstr "群组名称"
#: templates/group/grpmember_add_form.html:3
msgid "Add members to "
msgstr "添加成员到 "
#: templates/group/grpmember_add_form.html:4
#: templates/group/grpmember_add_form.html:16
msgid "Type Emails"
msgstr "输入邮箱"
#: templates/group/grpmember_add_form.html:7
msgid "Tip: System will send an email to him if the email is not registered."
msgstr "Tip可以是未注册邮箱系统会向他发送邀请邮件。"
#: templates/group/grpmember_add_form.html:9
msgid "Tip: The email should be already registered."
msgstr "Tip必须是已注册的邮箱。"
#: templates/group/grpmember_add_form.html:15
msgid "Add staffs to "
msgstr "添加管理员到 "
#~ msgid "Update Time"
#~ msgstr "更新时间"

View File

@@ -1,19 +1,20 @@
{% load i18n %}
<form id="member-add-form" method="post" name="member-add-form" class="hide">
<label>添加成员到 {{ group.group_name }}:</label><br />
<textarea id="added-member-name" name="user_name" placeholder="输入邮箱"></textarea><br />
<label>{% trans "Add members to "%}{{ group.group_name }}:</label><br />
<textarea id="added-member-name" name="user_name" placeholder="{% trans "Type Emails"%}"></textarea><br />
<input type="hidden" id="group_id" name="group_id" value="{{ group.id }}" />
{% if cloud_mode and not org %}
<p class="tip">Tip可以是未注册邮箱系统会向他发送邀请邮件。</p>
<p class="tip">{% trans "Tip: System will send an email to him if the email is not registered."%}</p>
{% else %}
<p class="tip">Tip必须是已注册的邮箱。</p>
<p class="tip">{% trans "Tip: The email should be already registered."%}</p>
{% endif %}
<p class="error hide" id="member-add-error"></p>
<input type="submit" value="提交" id="member-add-submit" />
<input type="submit" value="{% trans "Submit"%}" id="member-add-submit" />
</form>
<form id="admin-add-form" method="post" name="admin-add-form" class="hide">
<label>添加管理员到 {{ group.group_name }}:</label><br />
<textarea id="added-admin-name" name="user_name" placeholder="输入邮箱"></textarea><br />
<label>{% trans "Add staffs to "%}{{ group.group_name }}:</label><br />
<textarea id="added-admin-name" name="user_name" placeholder="{% trans "Type Emails"%}"></textarea><br />
<input type="hidden" id="group_id" name="group_id" value="{{ group.id }}" />
<p class="error hide" id="admin-add-error"></p>
<input type="submit" value="提交" id="admin-add-submit" />
<input type="submit" value="{% trans "Submit"%}" id="admin-add-submit" />
</form>

View File

@@ -3,7 +3,7 @@
# Ignore all apps
# .py and .html i18n
django-admin.py makemessages -l zh_CN -e py,html -i "thirdpart*" -i "api*" -i "avatar*" -i "base*" -i "contacts*" -i "group*" -i "notifications*" -i "organizations*" -i "profile*" -i "share*"
django-admin.py makemessages -l zh_CN -e py,html -i "thirdpart*" -i "api*" -i "avatar*" -i "base*" -i "contacts*" -i "group*" -i "notifications*" -i "organizations*" -i "profile*" -i "share*" -i "media*"
# js i18n
django-admin.py makemessages -d djangojs -l zh_CN -i "thirdpart*" -i "api*" -i "avatar*" -i "base*" -i "contacts*" -i "group*" -i "notifications*" -i "organizations*" -i "profile*" -i "share*" -i "media*"

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-27 21:10+0800\n"
"POT-Creation-Date: 2012-10-29 10:38+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"

7
share/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,104 @@
# 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-10-29 11:17+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/repo/share_admin.html:14
msgid "Shared Libraries"
msgstr "我共享的资料库"
#: templates/repo/share_admin.html:19
msgid "Name"
msgstr "名字"
#: templates/repo/share_admin.html:20
msgid "Share To"
msgstr "共享到"
#: templates/repo/share_admin.html:21
msgid "Permission"
msgstr "权限"
#: templates/repo/share_admin.html:22
msgid "Description"
msgstr "描述"
#: templates/repo/share_admin.html:23 templates/repo/share_admin.html.py:74
msgid "Operations"
msgstr "操作"
#: templates/repo/share_admin.html:27 templates/repo/share_admin.html.py:40
msgid "Read-Write"
msgstr "可读写"
#: templates/repo/share_admin.html:33
msgid "Edit"
msgstr "编辑"
#: templates/repo/share_admin.html:38
msgid "Read-Only"
msgstr "只读"
#: templates/repo/share_admin.html:47 templates/repo/share_admin.html.py:50
#: templates/repo/share_admin.html:54 templates/repo/share_admin.html.py:56
msgid "Remove Share"
msgstr "取消共享"
#: templates/repo/share_admin.html:64
msgid ""
"Here will show libraries you share to your friends. You can click \"Share\" "
"icon in \"My Home\" to share library to your friends."
msgstr ""
"这里将显示您共享给您朋友的资料库。您可以点击“我的页面”任意资料库旁的“共享”图"
"标将您的资料库共享给您的朋友。"
#: templates/repo/share_admin.html:67
msgid "File Links"
msgstr "文件外链"
#: templates/repo/share_admin.html:71
msgid "File"
msgstr "文件"
#: templates/repo/share_admin.html:72
msgid "Library"
msgstr "资料库"
#: templates/repo/share_admin.html:73
msgid "View Count"
msgstr "查看次数"
#: templates/repo/share_admin.html:82
msgid "View Link"
msgstr "查看链接"
#: templates/repo/share_admin.html:83
msgid "Remove"
msgstr "删除"
#: templates/repo/share_admin.html:89
msgid ""
"Here will show your file links. You can click \"Get sharing link\" in file "
"viewing page to generate file link. "
msgstr ""
"这里将显示您分享的文件外链。您可以在文件浏览页面点击“获取分享地址”按钮生成文"
"件外链。"
#: templates/repo/share_admin.html:91
msgid "File Link: "
msgstr "文件外链:"

View File

@@ -1,5 +1,5 @@
{% extends base_template %}
{% load seahub_tags %}
{% load seahub_tags i18n %}
{% load url from future %}
{% block nav_shareadmin_class %}class="cur"{% endblock %}
@@ -11,49 +11,49 @@
{% endif %}
{% block right_panel %}
<h3>我共享的资料库</h3>
<h3>{% trans "Shared Libraries"%}</h3>
{% if shared_repos %}
<table>
<tr>
<th width="4%"><!--icon--></th>
<th width="20%">名字</th>
<th width="22%">共享给</th>
<th width="13%">权限</th>
<th width="30%">描述</th>
<th width="11%">操作</th>
<th width="20%">{% trans "Name"%}</th>
<th width="22%">{% trans "Share To"%}</th>
<th width="13%">{% trans "Permission"%}</th>
<th width="30%">{% trans "Description"%}</th>
<th width="11%">{% trans "Operations"%}</th>
</tr>
{% for repo in shared_repos %}
<tr data="{{repo.props.share_type}}">
<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 data="{{ repo.props.repo_id }}"><a href="{{ SITE_ROOT }}repo/{{ repo.props.repo_id }}">{{ repo.props.repo_name }}</a></td>
<td data="{{repo.props.user_info}}">{{ repo.props.user }}</td>
<td>
<div class="share-permission">
<span class="share-permission-cur-value">{{ repo.share_permission }}</span>
<img src="{{MEDIA_URL}}img/edit_12.png" alt="编辑 icon" title="编辑" class="share-permission-edit-icon vh" />
<img src="{{MEDIA_URL}}img/edit_12.png" alt="{% trans "Edit"%} icon" title="{% trans "Edit"%}" class="share-permission-edit-icon vh" />
</div>
<select name="permission" class="share-permission-select hide">
<option value="{{ repo.props.permission }}" selected="selected">{{ repo.share_permission }}</option>
{% if repo.props.permission == 'rw' %}
<option value="r">只可浏览</option>
<option value="r">{% trans "Read-Only"%}</option>
{% else %}
<option value="rw">可读写</option>
<option value="rw">{% trans "Read-Write"%}</option>
{% endif %}
</select>
</td>
<td>{{ repo.props.repo_desc }}</td>
<td>
{% if repo.props.share_type == 'group' %}
<a href="#" data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.props.repo_id }}&from={{ request.user }}&gid={{ repo.props.group_id }}" class="cancel-share op">取消共享</a>
<a href="#" data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.props.repo_id }}&from={{ request.user }}&gid={{ repo.props.group_id }}" class="cancel-share op">{% trans "Remove Share"%}</a>
{% endif %}
{% if repo.props.share_type == 'personal' %}
<a href="#" data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.props.repo_id }}&from={{ request.user }}&to={{ repo.props.user }}" class="cancel-share op">取消共享</a>
<a href="#" data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.props.repo_id }}&from={{ request.user }}&to={{ repo.props.user }}" class="cancel-share op">{% trans "Remove Share"%}</a>
{% endif %}
{% if repo.props.share_type == 'public' %}
{% if not org %}
<a href="#" data="{{ SITE_ROOT }}repo/unsetinnerpub/{{ repo.props.repo_id }}" class="cancel-share op">取消共享</a>
<a href="#" data="{{ SITE_ROOT }}repo/unsetinnerpub/{{ repo.props.repo_id }}" class="cancel-share op">{% trans "Remove Share"%}</a>
{% else %}
<a href="#" data="{{ SITE_ROOT }}organizations/{{ org.url_prefix }}/innerpubrepo/unset/{{ repo.props.repo_id }}" class="cancel-share op">取消共享</a>
<a href="#" data="{{ SITE_ROOT }}organizations/{{ org.url_prefix }}/innerpubrepo/unset/{{ repo.props.repo_id }}" class="cancel-share op">{% trans "Remove Share"%}</a>
{% endif %}
{% endif %}
</td>
@@ -61,17 +61,17 @@
{% endfor %}
</table>
{% else %}
<p class="empty-repo-tips">这里将显示您共享给您朋友的资料库。您可以点击“我的页面”任意资料库旁的“共享”图标将您的资料库共享给您的朋友。</p>
<p class="empty-repo-tips">{% blocktrans %}Here will show libraries you share to your friends. You can click "Share" icon in "My Home" to share library to your friends.{% endblocktrans %}</p>
{% endif %}
<h3>我管理的文件外链</h3>
<h3>{% trans "File Links"%}</h3>
{% if fileshares %}
<table class="sharelink-list">
<tr>
<th width="45%">文件名</th>
<th width="30%">所属资料库</th>
<th width="10%">查看次数</th>
<th width="15%">操作</th>
<th width="45%">{% trans "File"%}</th>
<th width="30%">{% trans "Library"%}</th>
<th width="10%">{% trans "View Count"%}</th>
<th width="15%">{% trans "Operations"%}</th>
</tr>
{% for fs in fileshares %}
<tr>
@@ -79,16 +79,16 @@
<td><a href="{{ SITE_ROOT }}repo/{{ fs.repo.id }}/">{{ fs.repo.name }}</a></td>
<td>{{ fs.view_cnt }}</td>
<td>
<a href="#" class="op view-link" data="{{ fs.token }}">查看链接</a>
<a class="op" href="{{ SITE_ROOT }}sharedlink/remove/?t={{ fs.token }}">删除</a>
<a href="#" class="op view-link" data="{{ fs.token }}">{% trans "View Link"%}</a>
<a class="op" href="{{ SITE_ROOT }}sharedlink/remove/?t={{ fs.token }}">{% trans "Remove"%}</a>
</td>
</tr>
{% endfor %}
</table>
{% else %}
<p class="empty-repo-tips">这里将显示您分享的文件外链。您可以在文件浏览页面点击“获取分享地址”按钮生成文件外链。</p>
<p class="empty-repo-tips">{% blocktrans %}Here will show your file links. You can click "Get sharing link" in file viewing page to generate file link. {% endblocktrans %}</p>
{% endif %}
<p id="link" class="hide">该文件外链为:<input type="text" readonly="readonly" value="" id="shared-link" /></p>
<p id="link" class="hide">{% trans "File Link: "%}<input type="text" readonly="readonly" value="" id="shared-link" /></p>
{% endblock %}
{% block extra_script %}

View File

@@ -20,5 +20,5 @@
<input type="password" name="passwd_again" disabled="disabled" class="passwd input-disabled" />
</div>
<p class="error hide"></p>
<input type="submit" id="repo-create-submit" value="提交" class="submit"/>
<input type="submit" id="repo-create-submit" value="{% trans "Submit"%}" class="submit"/>
</form>