1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 07:08:55 +00:00

translation and js/css modification for en

This commit is contained in:
llj
2012-10-29 21:43:52 +08:00
parent 4145f166fc
commit 5621d23694
22 changed files with 494 additions and 251 deletions

View File

@@ -1,5 +1,6 @@
{% load i18n %}
{% load url from future %}
var Bottom_bar = '<div id="bottom-bar">{% if groups %}<button id="recommend">推荐到群组</button> <button id="click-into-group">到所在群组</button>{% endif %}</div>';
var Bottom_bar = '<div id="bottom-bar">{% if groups %}<button id="recommend">{% trans "Recommend" %}</button> <button id="click-into-group">{% trans "Back to group" %}</button>{% endif %}</div>';
$('#wrapper').append(Bottom_bar);
$('#bottom-bar').css({'position':'fixed', 'bottom':0, 'right':'10px'});
$('#main-panel').css('margin-bottom', '28px');
@@ -27,7 +28,7 @@ $(document).click(function(e) {
$('#recommend-submit').click(function() {
if (!$.trim($('#recommend-to-group-form [name="message"]').val())) {
apply_form_error('recommend-form', '推荐语不能为空。');
apply_form_error('recommend-form', '{% trans "Please input recommend message." %}');
return false;
}
});

View File

@@ -1,6 +1,6 @@
{% load seahub_tags avatar_tags group_avatar_tags %}
{% load seahub_tags avatar_tags group_avatar_tags i18n %}
{% load url from future %}
<h3>最近事件</h3>
<h3>{% trans 'Latest Events' %}</h3>
<ul id="events" class="hide">
{% for ev in events %}
<li class="event-item w100 ovhd">
@@ -14,16 +14,16 @@
<span class="time">{{ commit.ctime|translate_commit_time }}</span>
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{{ author|email2nickname }}</a>
</div>
<p>更新了资料库 <a href="{{SITE_ROOT}}repo/{{repo.id}}">{{ repo.name }}</a></p>
<p>{% trans 'Updated library' %} <a href="{{SITE_ROOT}}repo/{{repo.id}}">{{ repo.name }}</a></p>
<p class="commit-msg ovhd">{{ commit.desc|translate_commit_desc }}
{% if repo.encrypted %}
{% if repo.password_set %}
<a class="lsch-encrypted" password_set="true" href="{{ SITE_ROOT }}repo/history/changes/{{ repo.id }}/?commit_id={{ commit.id }}" repo_id="{{repo.id}}" repo_name="{{repo.name}}" data="{{ commit.props.ctime|tsstr_sec }}">详情</a>
<a class="lsch-encrypted" password_set="true" href="{{ SITE_ROOT }}repo/history/changes/{{ repo.id }}/?commit_id={{ commit.id }}" repo_id="{{repo.id}}" repo_name="{{repo.name}}" data="{{ commit.props.ctime|tsstr_sec }}">{% trans 'Details' %}</a>
{% else %}
<a class="lsch-encrypted" password_set="false" href="{{ SITE_ROOT }}repo/history/changes/{{ repo.id }}/?commit_id={{ commit.id }}" repo_id="{{repo.id}}" repo_name="{{repo.name}}" data="{{ commit.props.ctime|tsstr_sec }}">详情</a>
<a class="lsch-encrypted" password_set="false" href="{{ SITE_ROOT }}repo/history/changes/{{ repo.id }}/?commit_id={{ commit.id }}" repo_id="{{repo.id}}" repo_name="{{repo.name}}" data="{{ commit.props.ctime|tsstr_sec }}">{% trans 'Details' %}</a>
{% endif %}
{% else %}
<a class="lsch" href="{{ SITE_ROOT }}repo/history/changes/{{ repo.id }}/?commit_id={{ commit.id }}" data="{{ commit.props.ctime|tsstr_sec }}">详情</a>
<a class="lsch" href="{{ SITE_ROOT }}repo/history/changes/{{ repo.id }}/?commit_id={{ commit.id }}" data="{{ commit.props.ctime|tsstr_sec }}">{% trans 'Details' %}</a>
{% endif %}
</p>
</div>
@@ -40,7 +40,7 @@
<span class="time">{{ ev.timestamp|translate_commit_time }}</span>
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{{ author|email2nickname }}</a>
</div>
<p>创建了资料库 <a href="{{SITE_ROOT}}repo/{{repo_id}}">{{ repo_name }}</a></p>
<p>{% trans 'Created library' %} <a href="{{SITE_ROOT}}repo/{{repo_id}}">{{ repo_name }}</a></p>
</div>
{% endwith %}
{% endif %}
@@ -55,7 +55,7 @@
<span class="time">{{ ev.timestamp|translate_commit_time }}</span>
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{{ author|email2nickname }}</a>
</div>
<p>删除了资料库 {{ repo_name }}</p>
<p>{% trans 'Deleted library' %} {{ repo_name }}</p>
</div>
{% endwith %}
{% endif %}
@@ -63,13 +63,13 @@
{% endfor %}
</ul>
<form id="repo-set-password-form" class="hide">
<h3>资料库 <span class="repo-name"></span> 已加密</h3>
<h3>{% trans 'Library' %} <span class="repo-name"></span> {% trans 'is encrypted' %}</h3>
<input type="hidden" name="repo_id" value="" />
<label>密码:</label>
<label>{% trans 'Password' %}</label>
<input type="password" name="password" maxlength="64" />
<p class="tip">密码只会在服务器上暂存1小时</p>
<p class="tip">{% trans 'The password will be kept in the server for only 1 hour.' %}</p>
<p class="error"></p>
<input type="submit" class="submit" value="提交" />
<button class="simplemodal-close">取消</button>
<input type="submit" class="submit" value="{% trans 'Submit' %}" />
<button class="simplemodal-close">{% trans 'Cancel' %}</button>
</form>
<div id="ls-ch" class="hide"></div><!--list modification details of a commit-->

View File

@@ -1,3 +1,4 @@
{% load i18n %}
{% if not cloud_mode or not no_quota %}
<script type="text/javascript">
function gen_uuid() {
@@ -47,7 +48,7 @@ function submit_and_real_time_show () {
$('#upload-submit').click(function () {
if (!$.trim($('#file').val())) {
$('#error-msg').html('请先选择一个文件');
$('#error-msg').html('{% trans "Please choose a file at first." %}');
return false;
}
$('#error-msg').addClass('hide');

View File

@@ -1,7 +1,7 @@
{% load i18n %}
{% load url from future %}
<form action="{% url 'group_recommend' %}" method="post" id="recommend-to-group-form" class="hide">{% csrf_token %}
<h3>{% trans "Recommend"%}
<h3>{% trans "Recommend" %}
{% for name, link in zipped %}
{% if forloop.last %}
<span class="op-target">{{ name }}</span>

View File

@@ -1,5 +1,5 @@
<!-- <script type="text/javascript"> -->
{% load i18n %}
function get_commit_diff(url, callback) {
$.ajax({
url: url,
@@ -16,31 +16,31 @@ function get_commit_diff(url, callback) {
con += '</ul>';
};
if (data['new'].length > 0) {
con += '<h3 id="ls-ch-new">新文件</h3>';
con += '<h3 id="ls-ch-new">{% trans "New files" %}</h3>';
show(data['new']);
}
if (data['removed'].length > 0) {
con += '<h3 id="ls-ch-rm">删除的文件</h3>';
con += '<h3 id="ls-ch-rm">{% trans "Deleted files" %}</h3>';
show(data['removed']);
}
if (data['renamed'].length > 0) {
con += '<h3 id="ls-ch-rn">重命名或移动的文件</h3>';
con += '<h3 id="ls-ch-rn">{% trans "Renamed or Moved files" %}</h3>';
show(data['renamed']);
}
if (data['modified'].length > 0) {
con += '<h3 id="ls-ch-modi">修改的文件</h3>';
con += '<h3 id="ls-ch-modi">{% trans "Modified files" %}</h3>';
show(data['modified']);
}
if (data['newdir'].length > 0) {
con += '<h3 id="ls-ch-newdir">新目录</h3>';
con += '<h3 id="ls-ch-newdir">{% trans "New directories" %}</h3>';
show(data['newdir']);
}
if (data['deldir'].length > 0) {
con += '<h3 id="ls-ch-deldir">删除的目录</h3>';
con += '<h3 id="ls-ch-deldir">{% trans "Deleted directories" %}</h3>';
show(data['deldir']);
}
if (!con) {
con = '<p>合并没有产生冲突文件</p>';
con = '<p>{% trans "No conflict in the merge." %}</p>';
}
callback(con);
}
@@ -51,7 +51,7 @@ function list_commit_change(obj) {
var url = obj.attr('href');
get_commit_diff(url, function(content) {
var time = '<p><span class="commit-time">' + obj.attr('data') + '</span></p>';
var title = '<h2>修改详情</h2>' + time;
var title = '<h2>{% trans "Modification Details" %}</h2>' + time;
$('#ls-ch').html(title + content).modal({
appendTo:'#main',
maxHeight: window.innerHeight - 57,

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 "Last Update" %}</th>
<th width="15%">{% trans "UpdateTime" %}</th>
<th width="14%">{% trans "Operations" %}</th>
</tr>
{% for repo in owned_repos %}
@@ -39,7 +39,7 @@
{% endfor %}
</table>
{% else %}
<p class="empty-repo-tips">{% trans "You can create a library to organize your files. For example, you can create one for each of your projects. Every library can be synchronized and shared respectively." %}</p>
<p class="empty-repo-tips">{% trans "You can create a library to organize your files. For example, you can create one for each of your projects. Every library can be synchronized and shared separately." %}</p>
{% endif %}
</div>
<div id="repos-shared-to-me">
@@ -49,8 +49,8 @@
<th width="4%"><!--icon--></th>
<th width="20%">{% trans "Name" %}</th>
<th width="36%">{% trans "Description" %}</th>
<th width="15%">{% trans "Last Update" %}</th>
<th width="15%">{% trans "Share From" %}</th>
<th width="15%">{% trans "UpdateTime" %}</th>
<th width="15%">{% trans "Shared By" %}</th>
<th width="10%">{% trans "Operations" %}</th>
</tr>
@@ -81,7 +81,7 @@
{% endfor %}
</table>
{% else %}
<p class="empty-repo-tips">{% trans "Libraries shared to you (for example, by your friends) will be shown here." %}</p>
<p class="empty-repo-tips">{% trans "Libraries shared to you will be shown here." %}</p>
{% endif %}
</div>
<div id="starred-files">
@@ -105,7 +105,7 @@
{% endfor %}
</table>
{% else %}
<p class="no-starred-file-tips">{% trans "You can star the important files, and they will be shown here." %}</p>
<p class="no-starred-file-tips">{% trans "You can star important files, and they will be shown here." %}</p>
{% endif %}
</div>
</div>

View File

@@ -16,7 +16,7 @@
<input type="checkbox" name="encryption" id="encrypt-switch" /><label>{% trans "Encrypt"%}</label><br />
<label>{% trans "Password"%}</label><span class="tip">{% trans "(3-15 characters)"%}</span><br />
<input type="password" name="passwd" disabled="disabled" class="passwd input-disabled" /><br />
<label>{% trans "Confirm Password"%}</label><br />
<label>{% trans "Password again"%}</label><br />
<input type="password" name="passwd_again" disabled="disabled" class="passwd input-disabled" />
</div>
<p class="error hide"></p>