diff --git a/locale/zh_CN/LC_MESSAGES/django.mo b/locale/zh_CN/LC_MESSAGES/django.mo index a7f59606f2..797087c91e 100644 Binary files a/locale/zh_CN/LC_MESSAGES/django.mo and b/locale/zh_CN/LC_MESSAGES/django.mo differ diff --git a/locale/zh_CN/LC_MESSAGES/django.po b/locale/zh_CN/LC_MESSAGES/django.po index eb2bad3ba4..0b1d51d9ce 100644 --- a/locale/zh_CN/LC_MESSAGES/django.po +++ b/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-27 17:21+0800\n" +"POT-Creation-Date: 2012-10-27 18:02+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -137,7 +137,7 @@ msgstr "我的基本信息" msgid "Nickname is empty" msgstr "暂无昵称" -#: templates/myhome.html:15 +#: templates/myhome.html:15 templates/repo_view_file.html:116 msgid "Edit" msgstr "编辑" @@ -198,7 +198,7 @@ msgstr "" "\"_blank\">加入Seafile 体验更多功能。" #: templates/repo.html:21 templates/repo.html.py:137 -#: templates/snippets/my_owned_repos.html:34 +#: templates/repo_view_file.html:123 templates/snippets/my_owned_repos.html:34 #: templates/snippets/my_owned_repos.html:76 msgid "Download" msgstr "下载" @@ -263,7 +263,7 @@ msgid "Folder" msgstr "目录" #: templates/repo.html:115 templates/repo.html.py:145 -#: templates/snippets/my_owned_repos.html:36 +#: templates/repo_view_file.html:74 templates/snippets/my_owned_repos.html:36 msgid "Delete" msgstr "删除" @@ -300,7 +300,8 @@ msgid "Folder Name" msgstr "目录名称" #: templates/repo.html:168 templates/repo.html.py:178 templates/repo.html:198 -#: templates/repo.html.py:209 templates/registration/login.html:13 +#: templates/repo.html.py:209 templates/repo_view_file.html:141 +#: templates/repo_view_file.html.py:167 templates/registration/login.html:13 #: templates/registration/registration_form.html:18 #: templates/snippets/group_recommend_form.html:23 #: templates/snippets/repo_share_form.html:18 @@ -328,6 +329,96 @@ msgstr "其他资料库" msgid "Please choose derection folder" msgstr "请点击选择目标目录。" +#: templates/repo_view_file.html:15 +msgid "snapshot viewing" +msgstr "镜像浏览" + +#: templates/repo_view_file.html:22 +msgid "history viewing" +msgstr "历史浏览" + +#: templates/repo_view_file.html:25 +msgid "Back to file versions" +msgstr "返回文件版本列表" + +#: templates/repo_view_file.html:31 +msgid "Back to Library" +msgstr "返回资料库" + +#: templates/repo_view_file.html:37 +msgid "Current Path: " +msgstr "当前路径:" + +#: templates/repo_view_file.html:72 +msgid "Get sharing link" +msgstr "获取分享地址" + +#: templates/repo_view_file.html:73 +msgid "Send" +msgstr "发送" + +#: templates/repo_view_file.html:76 +msgid "Unstar" +msgstr "取消新标" + +#: templates/repo_view_file.html:78 +msgid "Star" +msgstr "添加星标" + +#: templates/repo_view_file.html:88 +msgid "update this library" +msgstr "做了最新修改" + +#: templates/repo_view_file.html:91 +msgid "More" +msgstr "详情" + +#: templates/repo_view_file.html:95 +msgid "More Histories" +msgstr "更多历史" + +#: templates/repo_view_file.html:98 +msgid "contributors" +msgstr "个贡献者" + +#: templates/repo_view_file.html:113 +msgid "Open local file" +msgstr "打开本地文件" + +#: templates/repo_view_file.html:121 +msgid "Raw" +msgstr "原始文件" + +#: templates/repo_view_file.html:131 +msgid "File is loading..." +msgstr "文件内容读取中..." + +#: templates/repo_view_file.html:138 +msgid "Emails(seperated with ,)" +msgstr "邮箱(多个邮箱以,分隔)" + +#: templates/repo_view_file.html:143 +#, fuzzy +msgid "Sending..." +msgstr "提醒..." + +#: templates/repo_view_file.html:147 +msgid "Under processing, please wait..." +msgstr "处理中,请稍侯..." + +#: templates/repo_view_file.html:150 +#, python-format +msgid "You have not downloaded %(repo.name)s" +msgstr "您还没有将资料库 %(repo.name)s 下载到本地" + +#: templates/repo_view_file.html:151 +msgid "Click to download" +msgstr "点此下载" + +#: templates/repo_view_file.html:165 +msgid "Leave a message~" +msgstr "评论一下~" + #: templates/registration/login.html:8 #: templates/registration/registration_form.html:11 msgid "Email" diff --git a/locale/zh_CN/LC_MESSAGES/djangojs.mo b/locale/zh_CN/LC_MESSAGES/djangojs.mo index 500e6736a0..0df6b3ad78 100644 Binary files a/locale/zh_CN/LC_MESSAGES/djangojs.mo and b/locale/zh_CN/LC_MESSAGES/djangojs.mo differ diff --git a/locale/zh_CN/LC_MESSAGES/djangojs.po b/locale/zh_CN/LC_MESSAGES/djangojs.po index 4778e4dcc3..9614b0835a 100644 --- a/locale/zh_CN/LC_MESSAGES/djangojs.po +++ b/locale/zh_CN/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-27 14:09+0800\n" +"POT-Creation-Date: 2012-10-27 18:02+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -45,3 +45,37 @@ msgstr "输入不能为空" #: templates/po.js:13 msgid "Confirm to remove shared library?" msgstr "确定要取消共享?" + +#: templates/po.js:15 +msgid " " +msgstr " " + +#: templates/po.js:16 +msgid "Please type a message" +msgstr "请先输入您的评论" + +#: templates/po.js:17 +msgid "Can't find a application to open file. Seafile will open the folder." +msgstr "找不到打开该类型文件的程序。Seafile 将为你打开该文件所在目录" + +#: templates/po.js:18 +msgid "File is not Synchronized with server, please synchronize manually." +msgstr "本地文件尚未与服务器同步。请打开本地目录的自动同步,或者手动进行同步" + +#: templates/po.js:19 +msgid "File is not Synchronized with server, please retry later." +msgstr "本地文件尚未与服务器同步,请稍后再试" + +#: templates/po.js:20 +msgid "An error occur during opening local file." +msgstr "打开本地文件时出错" + +#: templates/po.js:21 +msgid "Seafile client is not start or out of date" +msgstr "Seafile 客户端程序未启动或者版本过低" + +#: templates/po.js:22 +msgid "" +"Your Seafile client is out of date, please upgrade to latest." +msgstr "您的 Seafile 客户端版本太低,请升级到最新版本" diff --git a/templates/po.js b/templates/po.js index 685522907f..5385d76d7b 100644 --- a/templates/po.js +++ b/templates/po.js @@ -14,3 +14,13 @@ msg = gettext('Incorrect email or password'); // myhome_extra_script.html msg = gettext('Input can\'t be empty'); msg = gettext('Confirm to remove shared library?'); + +// repo_view_file.html +msg = gettext(' '); +msg = gettext('Please type a message'); +msg = gettext('Can\'t find a application to open file. Seafile will open the folder.'); +msg = gettext('File is not Synchronized with server, please synchronize manually.'); +msg = gettext('File is not Synchronized with server, please retry later.'); +msg = gettext('An error occur during opening local file.'); +msg = gettext('Seafile client is not start or out of date'); +msg = gettext('Your Seafile client is out of date, please upgrade to latest.'); diff --git a/templates/repo_view_file.html b/templates/repo_view_file.html index f56fafbbe9..a2a3bfcdcf 100644 --- a/templates/repo_view_file.html +++ b/templates/repo_view_file.html @@ -1,5 +1,5 @@ {% extends base_template %} -{% load seahub_tags avatar_tags%} +{% load seahub_tags avatar_tags i18n %} {% load url from future %} {% block extra_style %} @@ -12,29 +12,29 @@ {% else %} {% if page_from == 'snapshot' %}

- {{repo.props.name}} 镜像浏览 + {{repo.props.name}} {% trans "snapshot viewing" %} ({{ current_commit.props.ctime|tsstr_sec }})

{% endif %} {% if page_from == 'file_history' %}

- {{repo.props.name}} 历史浏览 + {{repo.props.name}} {% trans "history viewing"%} ({{ current_commit.props.ctime|tsstr_sec }})

- +
{% endif %} {% if page_from == 'recycle' %}

{{repo.props.name}} 的文件回收站

- +
{% endif %} {% endif %}

- 当前路径: + {% trans "Current Path: "%} {% if page_from == 'recycle' %} {{repo.props.name}} 的文件回收站 @@ -69,13 +69,13 @@ {% if not view_history %}

- - - + + + {% if is_starred %} - + {% else %} - + {% endif %}
{% endif %} @@ -85,17 +85,17 @@

- {% avatar latest_contributor 20 %} {{ latest_contributor|email2nickname }} {{ last_modified|translate_commit_time}} 做了最新修改 + {% avatar latest_contributor 20 %} {{ latest_contributor|email2nickname }} {{ last_modified|translate_commit_time}} {% trans "update this library"%} {% if filetype == 'Text' or filetype == 'Markdown' %} {% if last_commit_id %} - 详情 + {% trans "More"%} {% endif %} {% endif %}

- 更多历史 + {% trans "More Histories"%}

- {{ contributors|length }} 个贡献者 + {{ contributors|length }} {% trans "contributors"%} {% for user in contributors %} {% avatar user 20 %} {% endfor %} @@ -110,17 +110,17 @@

{% endif %} {% if not view_history and request.user.is_authenticated %} - + {% if not read_only %} {% if filetype == 'Text' or filetype == 'Markdown' %} - + {% endif %} {% endif %} {% endif %} {% if filetype == 'Text' or filetype == 'Image' or filetype == 'SVG' or filetype == 'Markdown' %} - + {% endif %} - +
{% if filetype == 'Text' %} @@ -128,27 +128,27 @@ {% endifnotequal %} {% else %} -

文件内容读取中...

+

{% trans "File is loading..."%}

{% endif %}
{% if not view_history %}
-

处理中,请稍侯...

+

{% trans "Under processing, please wait..."%}

-

您还没有将资料库 {{repo.name}} 下载到本地

- +

{% blocktrans %}You have not downloaded {{repo.name}}{% endblocktrans %}

+
@@ -162,9 +162,9 @@
{% avatar request.user.username 48 %}
-
+

- +
@@ -320,7 +320,7 @@ $('#shared-link').click(function() { {% include "snippets/bottom_bar.html" %} {% if request.user.is_authenticated %} -$('#bottom-bar').append(' '); +$('#bottom-bar').append(gettext(' ')); $('#file-comment').css({'max-height':$(window).height() - parseInt($('#file-comment').css('bottom'))}); var gids = ''; {% for g in groups %} @@ -363,7 +363,7 @@ $('#comment-input').css('color', '#999').click(function() { }); $('#file-comment-form .submit').click(function() { if (!$.trim($('#comment-input').val())) { - $('#file-comment-form .error').html('请先输入您的评论').removeClass('hide'); + $('#file-comment-form .error').html(gettext('Please type a message')).removeClass('hide'); return false; } $.ajax({ @@ -409,19 +409,19 @@ function send_open_local_file_request(path) { } else if (data['no_assoc'] === true) { // no application to open the file - $('#open-local-error').html('找不到打开该类型文件的程序。Seafile 将为你打开该文件所在目录'); + $('#open-local-error').html(gettext('Can\'t find a application to open file. Seafile will open the folder.')); } else if (data['outdated'] === true) { // local repo not in sync yet if (data['auto-sync'] === false) { - $('#open-local-error').html('本地文件尚未与服务器同步。请打开本地目录的自动同步,或者手动进行同步'); + $('#open-local-error').html(gettext('File is not Synchronized with server, please synchronize manually.')); } else { - $('#open-local-error').html('本地文件尚未与服务器同步,请稍后再试'); + $('#open-local-error').html(gettext('File is not Synchronized with server, please retry later.')); } } else if (data['error']) { // other error - $('#open-local-error').html('打开本地文件时出错'); + $('#open-local-error').html(gettext('An error occur during opening local file.')); } else { // open file successfully @@ -452,7 +452,7 @@ $('#open-local').click(function () { local_applet_running = true; if (version < 1) { $('#open-local-handling-tip').addClass('hide'); - $('#open-local-error').html('您的 Seafile 客户端版本太低,请升级到最新版本'); + $('#open-local-error').html(gettext('Your Seafile client is out of date, please upgrade to latest.')); } else { send_open_local_file_request(path); } @@ -463,7 +463,7 @@ $('#open-local').click(function () { setTimeout(function() { if (!local_applet_running) { $('#open-local-handling-tip').addClass('hide'); - $('#open-local-error').html('Seafile 客户端程序未启动或者版本过低'); + $('#open-local-error').html(gettext('Seafile client is not start or out of date')); } }, 2000); });