From a90d4e989d3cc3bfded94071a5e650fb368a064d Mon Sep 17 00:00:00 2001 From: zhengxie Date: Sat, 27 Oct 2012 19:41:00 +0800 Subject: [PATCH] i18n for repo_view_file page --- locale/zh_CN/LC_MESSAGES/django.mo | Bin 6670 -> 7851 bytes locale/zh_CN/LC_MESSAGES/django.po | 101 +++++++++++++++++++++++++-- locale/zh_CN/LC_MESSAGES/djangojs.mo | Bin 919 -> 2042 bytes locale/zh_CN/LC_MESSAGES/djangojs.po | 36 +++++++++- templates/po.js | 10 +++ templates/repo_view_file.html | 72 +++++++++---------- 6 files changed, 177 insertions(+), 42 deletions(-) diff --git a/locale/zh_CN/LC_MESSAGES/django.mo b/locale/zh_CN/LC_MESSAGES/django.mo index a7f59606f2d711f1c8def55969207255bf12006b..797087c91ec792101713ffcf6e7b4001665f2b71 100644 GIT binary patch delta 3758 zcmY+FdvKK18HZ00urYy<05MQ13rI*Hq}(bP3n-!@5=HTXQZ7rfBum0>++7G4WfKS? zX%u8W2oWL(6D|rQk#G+e+cHC)wlj4~Z&OGA=*x9rK}fwh(HMR=}KeK~}GWwovKLzFgGz`n}W!rHb4#EBe4u+q@TzCiSh=$>X zGc%*10-gwU#t*|j@EOR@Jj+AlmRZ{iHGc!lgInNucp`)R>!tbw4GQEdD93jpYnoKj zaSzOaig*N+<6LV`h6>;js0E6lGV-!z2~@_ap!`=uWhe~!nYuybUuU-mOOE&3j-yZx z&qF!*7;54TsByox_8*}fe+D%!0)GJi21mkFq8khI;Z*n>TmZMieE8ci6$S7ubV0po zaySagVZP-gsD-Cndk$18pN0xF0F|jt@F)z!SumG#Q~(~R%rrq|wgrA4hL2GpSn~@= z*3C_*okpN0+_L>&Lmk1rydYFfCM-$8IV5(|$R(hAU_TGmHXlLxyAE^UO*jgE3AM3| z?1cZY$)+O5W0DPKB9wz7YZu%8*PterLOHIm+yr%bHCa1@TS((ZTINFen+P9-kJ@%m zf}DS)Z3tR!gam17p`nLz+zyqIFQ68>ZTU5n-@DenZ&=d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@f=$d!d QU%zzZ`uUe{UD)sb0ax$^8vp\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 500e6736a0338f2b984118c0cfd756c356440358..0df6b3ad78900bf0eb1febd3923e788869b2a8d4 100644 GIT binary patch literal 2042 zcmb7@-*XdH6vwZEzv2%Z27k=xjMw^W5H?Bspf$9Wv`w*N($+TZ48Co%H_7T|H*@!f z5T6QCnoTP<4ok(3wc1Pbr|5xkJyEKmFa&Zytb(gbvvk)1jD?B!`_6IV6VCFPv8g7LGXRB0PX~rz<%%#@GWrLlZ3nt2EZNQ7vLvg66^(+ zz&F4i* zG$GsZErB0_d%+}_2j2y6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pI=@yU+f=d*V_ozTMo08W)CQ~&?~ 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); });