mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 16:36:15 +00:00
i18n form repo page
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{% extends base_template %}
|
||||
|
||||
{% load seahub_tags avatar_tags %}
|
||||
{% load seahub_tags avatar_tags i18n %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block info_bar_message %}
|
||||
@@ -8,7 +8,7 @@
|
||||
{{ block.super }}
|
||||
{% else %}
|
||||
<div id="sharelink-infobar">
|
||||
<p>当前链接会在短期内失效,欢迎您 <a href="http://seafile.com/" target="_blank">加入Seafile </a>体验更多功能。</p>
|
||||
<p>{% blocktrans %}Current page will be gone shortly, welcome joining <a href="http://seafile.com/" target="_blank">Seafile</a> to experience more features.{% endblocktrans %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -18,13 +18,13 @@
|
||||
<h2 class="fleft">{{repo.props.name}}</h2>
|
||||
{% if user_perm == 'rw' %}
|
||||
<div class="fright">
|
||||
<button id="repo-download-btn">下载到本地</button>
|
||||
<button id="recycle-btn" data="{% url 'repo_recycle_view' repo.id %}">文件回收站</button>
|
||||
<button id="repo-download-btn">{% trans "Download"%}</button>
|
||||
<button id="recycle-btn" data="{% url 'repo_recycle_view' repo.id %}">{% trans "Trash"%}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if user_perm == 'r' %}
|
||||
<p>这个资料库设置了只读共享,您只能在线浏览文件。</p>
|
||||
<p>{% trans "This library is read only, you can only view files."%}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if user_perm %}
|
||||
@@ -42,7 +42,7 @@
|
||||
<a class="lsch" href="{{ SITE_ROOT }}repo/history/changes/{{ repo.id }}/?commit_id={{ current_commit.id }}" data="{{ current_commit.props.ctime|tsstr_sec }}">详情</a>
|
||||
</span>
|
||||
{% if user_perm == 'rw' %}
|
||||
<a href="{% url 'seahub.views.repo_history' repo.id %}" class="more fright">更多历史</a>
|
||||
<a href="{% url 'seahub.views.repo_history' repo.id %}" class="more fright">{% trans "Histories"%}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p class="meta-info">
|
||||
@@ -52,10 +52,10 @@
|
||||
{% avatar current_commit.props.creator_name 20 %}
|
||||
<a class="name" href="{% url 'profile.views.user_profile' current_commit.props.creator_name %}">{{ current_commit.props.creator_name|short_email }}</a>
|
||||
{% else %}
|
||||
<span class="name">系统自动生成</span>
|
||||
<span class="name">{% trans "System automatically generate"%}</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
未知
|
||||
{% trans "Unknown"%}
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="time">{{ current_commit.props.ctime|translate_commit_time }}</span>
|
||||
@@ -68,12 +68,12 @@
|
||||
<div class="repo-file-list-inner-container">
|
||||
{% if not user_perm %}
|
||||
<div class="repo-file-list-not-show">
|
||||
<p class="access-notice">无法在线查看该资料库。</p>
|
||||
<p class="access-notice">{% trans "Can't view this library"%}</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="repo-file-list-topbar ovhd">
|
||||
<p class="path fleft">
|
||||
当前路径:
|
||||
{% trans "Current path: "%}
|
||||
{% for name, link in zipped %}
|
||||
{% if not forloop.last %}
|
||||
<a href="{{ SITE_ROOT }}repo/{{ repo.id }}/?p={{ link|urlencode }}">{{ name }}</a> /
|
||||
@@ -84,9 +84,9 @@
|
||||
</p>
|
||||
{% if user_perm == 'rw' %}
|
||||
<div class="repo-op fright">
|
||||
<button data="{{ SITE_ROOT }}repo/upload_file/{{repo.id}}/?p={{ path|urlencode }}" id="upload-file" class="op-btn">上传</button>
|
||||
<button id="add-new-dir" class="op-btn">新建目录</button>
|
||||
<button id="add-new-file" class="op-btn">新建文件</button>
|
||||
<button data="{{ SITE_ROOT }}repo/upload_file/{{repo.id}}/?p={{ path|urlencode }}" id="upload-file" class="op-btn">{% trans "Upload"%}</button>
|
||||
<button id="add-new-dir" class="op-btn">{% trans "New Folder"%}</button>
|
||||
<button id="add-new-file" class="op-btn">{% trans "New File"%}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -94,14 +94,14 @@
|
||||
<table class="repo-file-list">
|
||||
<tr>
|
||||
<th width="5%"></th>
|
||||
<th width="60%">名字</th>
|
||||
<th width="10%">大小</th>
|
||||
<th width="30%">操作</th>
|
||||
<th width="60%">{% trans "Name"%}</th>
|
||||
<th width="10%">{% trans "Size"%}</th>
|
||||
<th width="30%">{% trans "Operations"%}</th>
|
||||
</tr>
|
||||
|
||||
{% for dirent in dir_list %}
|
||||
<tr>
|
||||
<td class="icon-container"><img src="{{ MEDIA_URL }}img/folder-icon-24.png" alt="目录" /></td>
|
||||
<td class="icon-container"><img src="{{ MEDIA_URL }}img/folder-icon-24.png" alt="{% trans "Folder"%}" /></td>
|
||||
<td>
|
||||
<a href="{{ SITE_ROOT }}repo/{{ repo.id }}/?p={{ path|urlencode }}{{ dirent.obj_name|urlencode }}">{{ dirent.obj_name }}</a>
|
||||
</td>
|
||||
@@ -112,10 +112,10 @@
|
||||
<div class="repo-file-op vh">
|
||||
<img src="{{ MEDIA_URL }}img/dropdown-arrow.png" title="更多操作" alt="更多操作" class="more-op-icon" data="no-popup" />
|
||||
<ul class="hidden-op hide">
|
||||
<li><a class="op" href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/{{ dirent.props.obj_id }}/?p={{ path|urlencode }}&file_name={{ dirent.props.obj_name|urlencode }}&op=del">删除</a></li>
|
||||
<li><a class="op dir-rename" href="#" data="{{ dirent.obj_name }}">重命名</a></li>
|
||||
<li><a class="op dir-mv" href="#" data="{{ dirent.obj_name }}">移动</a></li>
|
||||
<li><a class="op dir-cp" href="#" data="{{ dirent.obj_name }}">复制</a></li>
|
||||
<li><a class="op" href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/{{ dirent.props.obj_id }}/?p={{ path|urlencode }}&file_name={{ dirent.props.obj_name|urlencode }}&op=del">{% trans "Delete"%}</a></li>
|
||||
<li><a class="op dir-rename" href="#" data="{{ dirent.obj_name }}">{% trans "Rename"%}</a></li>
|
||||
<li><a class="op dir-mv" href="#" data="{{ dirent.obj_name }}">{% trans "Move"%}</a></li>
|
||||
<li><a class="op dir-cp" href="#" data="{{ dirent.obj_name }}">{% trans "Copy"%}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
{% for dirent in file_list %}
|
||||
<tr>
|
||||
<td class="icon-container"><img src="{{ MEDIA_URL }}img/file/{{ dirent.obj_name|file_icon_filter }}" alt="文件" /></td>
|
||||
<td class="icon-container"><img src="{{ MEDIA_URL }}img/file/{{ dirent.obj_name|file_icon_filter }}" alt="{% trans "File"%}" /></td>
|
||||
<td>
|
||||
<a class="op" href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/files/?p={{ path|urlencode }}{{ dirent.obj_name|urlencode }}">{{ dirent.props.obj_name }}</a>
|
||||
</td>
|
||||
@@ -134,19 +134,19 @@
|
||||
<td>
|
||||
<div class="repo-file-op vh">
|
||||
<div class="displayed-op">
|
||||
<a class="op" href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/{{ dirent.props.obj_id }}/?file_name={{ dirent.props.obj_name }}&op=download">下载</a>
|
||||
<a class="op" href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/{{ dirent.props.obj_id }}/?file_name={{ dirent.props.obj_name }}&op=download">{% trans "Download"%}</a>
|
||||
{% if user_perm == 'rw' %}
|
||||
<a class="op" href="{{ SITE_ROOT }}repo/update_file/{{repo.id}}/?p={{ path|urlencode }}{{dirent.obj_name|urlencode}}">更新</a>
|
||||
<a class="op" href="{{ SITE_ROOT }}repo/update_file/{{repo.id}}/?p={{ path|urlencode }}{{dirent.obj_name|urlencode}}">{% trans "Update"%}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if user_perm == 'rw' %}
|
||||
<img src="{{ MEDIA_URL }}img/dropdown-arrow.png" title="更多操作" alt="更多操作" class="more-op-icon" data="no-popup" />
|
||||
<img src="{{ MEDIA_URL }}img/dropdown-arrow.png" title="{% trans "More Operations"%}" alt="{% trans "More Operations"%}" class="more-op-icon" data="no-popup" />
|
||||
<ul class="hidden-op hide">
|
||||
<li><a class="op" href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/{{ dirent.props.obj_id }}/?p={{ path|urlencode }}&file_name={{ dirent.props.obj_name|urlencode }}&op=del">删除</a></li>
|
||||
<li><a class="op file-rename" href="#" data="{{ dirent.obj_name }}">重命名</a></li>
|
||||
<li><a class="op file-mv" href="#" data="{{ dirent.obj_name }}">移动</a></li>
|
||||
<li><a class="op file-cp" href="#" data="{{ dirent.obj_name }}">复制</a></li>
|
||||
<li><a class="op" href="{% url 'file_revisions' repo.props.id %}?p={{ path }}{{ dirent.obj_name }}">历史</a></li>
|
||||
<li><a class="op" href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/{{ dirent.props.obj_id }}/?p={{ path|urlencode }}&file_name={{ dirent.props.obj_name|urlencode }}&op=del">{% trans "Delete"%}</a></li>
|
||||
<li><a class="op file-rename" href="#" data="{{ dirent.obj_name }}">{% trans "Rename"%}</a></li>
|
||||
<li><a class="op file-mv" href="#" data="{{ dirent.obj_name }}">{% trans "Move"%}</a></li>
|
||||
<li><a class="op file-cp" href="#" data="{{ dirent.obj_name }}">{% trans "Copy"%}</a></li>
|
||||
<li><a class="op" href="{% url 'file_revisions' repo.props.id %}?p={{ path }}{{ dirent.obj_name }}">{% trans "History"%}</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -160,31 +160,31 @@
|
||||
</div>
|
||||
|
||||
<form id="add-new-dir-form" action="" method="post" class="hide">{% csrf_token %}
|
||||
<h4>新目录名称:</h4>
|
||||
<h4>{% trans "Folder Name"%}</h4>
|
||||
<input type="hidden" name="repo_id" value="{{ repo.id }}" />
|
||||
<input type="hidden" name="parent_dir" value="{{ path }}" />
|
||||
<input type="text" name="new_dir_name" value="" /><br />
|
||||
<p class="error hide"></p>
|
||||
<input type="submit" value="提交" class="submit" />
|
||||
<button class="simplemodal-close">取消</button>
|
||||
<input type="submit" value="{% trans "Submit"%}" class="submit" />
|
||||
<button class="simplemodal-close">{% trans "Cancel"%}</button>
|
||||
</form>
|
||||
|
||||
<form id="add-new-file-form" action="" method="post" class="hide">{% csrf_token %}
|
||||
<h4>新文件名称:</h4>
|
||||
<h4>{% trans "File Name"%}</h4>
|
||||
<input type="hidden" name="repo_id" value="{{ repo.id }}" />
|
||||
<input type="hidden" name="parent_dir" value="{{ path }}" />
|
||||
<input type="text" name="new_file_name" value="" /><br />
|
||||
<p class="error hide"></p>
|
||||
<input type="submit" value="提交" class="submit" />
|
||||
<button class="simplemodal-close">取消</button>
|
||||
<input type="submit" value="{% trans "Submit"%}" class="submit" />
|
||||
<button class="simplemodal-close">{% trans "Cancel"%}</button>
|
||||
</form>
|
||||
|
||||
<form id="mv-form" action="{{ SITE_ROOT }}file/move/" method="post" class="hide">
|
||||
<h3 id="mv-hd"></h3>
|
||||
<div class="con">
|
||||
<h4><span class="tri-bg tri-down-bg"></span>当前资料库:</h4>
|
||||
<h4><span class="tri-bg tri-down-bg"></span>{% trans "Current Library"%}</h4>
|
||||
<div id="current-repo-dirs"></div>
|
||||
<h4><span class="tri-bg tri-right-bg"></span>其他资料库:</h4>
|
||||
<h4><span class="tri-bg tri-right-bg"></span>{% trans "Other Libraries"%}</h4>
|
||||
<div id="other-repos-dirs" class="hide"></div>
|
||||
</div>
|
||||
<input type="hidden" name="operation" id="operation" value="" />
|
||||
@@ -194,9 +194,9 @@
|
||||
<input type="hidden" name="obj_type" value="" />
|
||||
<input type="hidden" name="dst_repo" value="" />
|
||||
<input type="hidden" name="dst_path" value="" />
|
||||
<p class="error hide">请点击选择目标目录。</p>
|
||||
<input type="submit" value="提交" class="submit" />
|
||||
<button class="simplemodal-close">取消</button>
|
||||
<p class="error hide">{% trans "Please choose derection folder"%}</p>
|
||||
<input type="submit" value="{% trans "Submit"%}" class="submit" />
|
||||
<button class="simplemodal-close">{% trans "Cancel"%}</button>
|
||||
</form>
|
||||
|
||||
<form id="rename-form" action="{{ SITE_ROOT}}repo/file_rename/" method="post" class="hide">
|
||||
@@ -206,8 +206,8 @@
|
||||
<input type="hidden" name="oldname" value="" />
|
||||
<input type="text" name="newname" value="" class="new-name" /><br />
|
||||
<p class="error hide"></p>
|
||||
<input type="submit" value="提交" class="submit" />
|
||||
<button class="simplemodal-close">取消</button>
|
||||
<input type="submit" value="{% trans "Submit"%}" class="submit" />
|
||||
<button class="simplemodal-close">{% trans "Cancel"%}</button>
|
||||
</form>
|
||||
|
||||
{% with attach_type='dir' %}
|
||||
|
Reference in New Issue
Block a user