From 571bec63634756343903aeb2fbb6b778a6da21ea Mon Sep 17 00:00:00 2001 From: idalin Date: Mon, 9 Jan 2017 09:56:58 +0800 Subject: [PATCH 1/2] add Simplified Chinese translation --- .../zh_Hans_CN/LC_MESSAGES/messages.mo | Bin 0 -> 10769 bytes .../zh_Hans_CN/LC_MESSAGES/messages.po | 824 ++++++++++++++++++ 2 files changed, 824 insertions(+) create mode 100644 cps/translations/zh_Hans_CN/LC_MESSAGES/messages.mo create mode 100644 cps/translations/zh_Hans_CN/LC_MESSAGES/messages.po diff --git a/cps/translations/zh_Hans_CN/LC_MESSAGES/messages.mo b/cps/translations/zh_Hans_CN/LC_MESSAGES/messages.mo new file mode 100644 index 0000000000000000000000000000000000000000..7adcf65b42f38500e97288355253f265eda1d75e GIT binary patch literal 10769 zcmbW63vgW3dB;x(P*B^1kOE1{<3M681+S1z9gHv!+Y-bWMk>4`Lk_>*y$XIr4tk_tR0b^lV7BFd(FzK{3X_?X#nnw5TF4GQ^X=$enr2YTT z`F6FEd9=-l{oV8a&Ue1YInG;`p1)J!f3M=dEAiig3t5`^-_qYv>QWSM0~dmI;0541 z5PzyixKrv6f+eUQ7CsMt4&}4p=fS@OuK@p1%I|^ff5Go6g+Fx(e!dJ|4RXCDAlH8g zq-c+VzYT5xIbT2cTi_7Ld56I-f-i&TgFgo^0smgg?|@wIU2s15K6nFo9fT|eSAmy- zognAi22!5GQl0|wr{2I1#QgA2e*vDj_k9pFOnQIPVFf)|4mAouy_QvM0}`zZem#1!gXkmv9j96IH> z2;_b*2hpUi0Xfeikn$`ADgR0kTT=Ie?EfIhelcnHLC)I+(jK~{eHTc54S^hY7(5Rg z0ja+eAmw-kjBsUk7r&UXb%01S$V0NIRYcsmC8n z{Xc-zQx04V{u{{iDZ`{37XhyWZv`pWcR|YSN;w5`{39U#)JFVJjzN&;ISiV8gY>J{ zK-xb2AtLC%`f=2QCD^h~U9>szI)Q56E@?7^EJe zAf{Fc;U?kJ(*7cdKlL(xxX(91>g87;_5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Unab@R zsZ_8n=tLaK7Oc@pOE|PSbNnn+N8M&mjRt2o@Rc4MI+14M%@>l z3HnY^DBBg`cTVrwo%S8hZa!+KQDJc*dvYv$^3=O$)~d|<`{Uh0<`aJ2xNaEgwn5Tbs_kbDIp6!hv0&3cxTQNB+!7q$ z9gdtdbBygn0K?`m0g_~H#|YZ+QvUzFurtR-gTC)8o0DgBk{RBL;AT?H#%JM8)_E1a z!X0O!&0y2xsyHM-unh>DDz|52c60)Iv>{(H=9^p>3=AW0*k%Ru$WCpSAo9O?TFZ(S zGnawv2rRxY?Afkzn~`QmXFaF$N5(^t_`uJZh+7oVO&@!HrjJ$1%x5XB;ISbF@Vy&Y zo$KBkjE{$VMi(t!z(;7I5mk6i+gJ4T)INA{A!*DMf|p*j(R)@h%HK~+EP&0)BU<8* z#mXw!=~4SVJD-}=n7>1qf=TG|hPL_%2eFF-I0~GAeAyT<=NWBJ8=+bLzZ?z2K#I5K z&LquTH@DTsL}{J%rVjU<%^W&C%Uo<#uyHuI9>P4n#d^7|6(^T2<|1HICLEI!%?dlV z$_}5^>m!!4YLi|t<=_aioxLH1ef`s?aiOu{oi{o2HA}_Chec1xUwDv(aa!lzd5Qv- zWcAUBpl=ua8Id47u@0tWLl%NEE^^uRlQ158ue6DTMmPG>yJz;x&C|BAfF+Bi33t<; za5uF*c<}b+Y`f-*Iy*IB{gO*#O!q*r`E;gtOeVH@1Bnv5gMnwKHWxiJ?Nq$-6+8&( zMWU8950iYDVLtAeJUwpi(E_;u6upwInaSny+sPeW?nC{(;r_#!!L50(ftbBxuv=(jdg8DsS1zU5)5oSK ICPk3{0h%}96aWAK literal 0 HcmV?d00001 diff --git a/cps/translations/zh_Hans_CN/LC_MESSAGES/messages.po b/cps/translations/zh_Hans_CN/LC_MESSAGES/messages.po new file mode 100644 index 00000000..645469d5 --- /dev/null +++ b/cps/translations/zh_Hans_CN/LC_MESSAGES/messages.po @@ -0,0 +1,824 @@ +# Chinese (Simplified, China) translations for PROJECT. +# Copyright (C) 2017 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2017-01-03 19:50+0100\n" +"PO-Revision-Date: 2017-01-06 17:00+0800\n" +"Last-Translator: dalin \n" +"Language: zh_Hans_CN\n" +"Language-Team: zh_Hans_CN \n" +"Plural-Forms: nplurals=1; plural=0\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.3.4\n" + +#: cps/book_formats.py:109 cps/book_formats.py:113 cps/web.py:928 +msgid "not installed" +msgstr "未安装" + +#: cps/helper.py:98 +msgid "Calibre-web test email" +msgstr "Calibre-web 测试邮件" + +#: cps/helper.py:99 cps/helper.py:152 +msgid "This email has been sent via calibre web." +msgstr "此邮件已通过calibre web发送" + +#: cps/helper.py:133 cps/helper.py:221 +#, python-format +msgid "Failed to send mail: %s" +msgstr "发送邮件失败: %s" + +#: cps/helper.py:151 cps/templates/detail.html:124 +msgid "Send to Kindle" +msgstr "发送到Kindle" + +#: cps/helper.py:174 cps/helper.py:189 +msgid "Could not find any formats suitable for sending by email" +msgstr "无法适合邮件发送的格式" + +#: cps/helper.py:183 +msgid "Could not convert epub to mobi" +msgstr "无法转换epub到mobi" + +#: cps/helper.py:241 +msgid "The requested file could not be read. Maybe wrong permissions?" +msgstr "无法读取所请求的文件。可能是错误权限不对?" + +#: cps/web.py:722 +msgid "Latest Books" +msgstr "最新书籍" + +#: cps/web.py:747 +msgid "Hot Books (most downloaded)" +msgstr "热门书籍(最多下载)" + +#: cps/templates/index.xml:29 cps/web.py:755 +msgid "Random Books" +msgstr "随机书籍" + +#: cps/web.py:768 +msgid "Author list" +msgstr "作者列表" + +#: cps/web.py:785 +#, python-format +msgid "Author: %(nam)s" +msgstr "作者: %(nam)s" + +#: cps/templates/index.xml:50 cps/web.py:798 +msgid "Series list" +msgstr "丛书列表" + +#: cps/web.py:809 +#, python-format +msgid "Series: %(serie)s" +msgstr "丛书: %(serie)s" + +#: cps/web.py:811 cps/web.py:907 cps/web.py:1102 cps/web.py:1838 +msgid "Error opening eBook. File does not exist or file is not accessible:" +msgstr "无法打开电子书。 文件不存在或者文件不可访问:" + +#: cps/web.py:842 +msgid "Available languages" +msgstr "可用语言" + +#: cps/web.py:857 +#, python-format +msgid "Language: %(name)s" +msgstr "语言: %(name)s" + +#: cps/templates/index.xml:43 cps/web.py:870 +msgid "Category list" +msgstr "分类列表" + +#: cps/web.py:880 +#, python-format +msgid "Category: %(name)s" +msgstr "分类: %(name)s" + +#: cps/web.py:936 +msgid "Statistics" +msgstr "统计" + +#: cps/web.py:944 +msgid "Server restarts" +msgstr "重启服务器" + +#: cps/web.py:1078 cps/web.py:1085 cps/web.py:1092 cps/web.py:1099 +msgid "Read a Book" +msgstr "阅读一本书" + +#: cps/web.py:1141 cps/web.py:1474 +msgid "Please fill out all fields!" +msgstr "请填写所有字段" + +#: cps/web.py:1157 +msgid "An unknown error occured. Please try again later." +msgstr "发生一个未知错误。请稍后再试。" + +#: cps/web.py:1162 +msgid "This username or email address is already in use." +msgstr "此用户名或邮箱已被使用。" + +#: cps/web.py:1165 +msgid "register" +msgstr "注册" + +#: cps/web.py:1181 +#, python-format +msgid "you are now logged in as: '%(nickname)s'" +msgstr "您现在已以'%(nickname)s'身份登录" + +#: cps/web.py:1185 +msgid "Wrong Username or Password" +msgstr "用户名或密码错误" + +#: cps/web.py:1187 +msgid "login" +msgstr "登录" + +#: cps/web.py:1204 +msgid "Please configure the SMTP mail settings first..." +msgstr "请先配置SMTP邮箱..." + +#: cps/web.py:1208 +#, python-format +msgid "Book successfully send to %(kindlemail)s" +msgstr "此书已被成功发给 %(kindlemail)s" + +#: cps/web.py:1212 +#, python-format +msgid "There was an error sending this book: %(res)s" +msgstr "发送 %(res)s 这本书的时候出现错误" + +#: cps/web.py:1214 +msgid "Please configure your kindle email address first..." +msgstr "请先配置您的kindle电子邮箱地址..." + +#: cps/web.py:1234 +#, python-format +msgid "Book has been added to shelf: %(sname)s" +msgstr "此书已被添加到书架: %(sname)s" + +#: cps/web.py:1255 +#, python-format +msgid "Book has been removed from shelf: %(sname)s" +msgstr "此书已从书架 %(sname)s 中删除" + +#: cps/web.py:1273 cps/web.py:1294 +#, python-format +msgid "A shelf with the name '%(title)s' already exists." +msgstr "已存在书架 '%(title)s'。" + +#: cps/web.py:1278 +#, python-format +msgid "Shelf %(title)s created" +msgstr "书架 %(title)s 已被创建" + +#: cps/web.py:1280 cps/web.py:1305 +msgid "There was an error" +msgstr "发生错误" + +#: cps/web.py:1281 cps/web.py:1283 +msgid "create a shelf" +msgstr "创建书架" + +#: cps/web.py:1303 +#, python-format +msgid "Shelf %(title)s changed" +msgstr "书架 %(title)s 已被修改" + +#: cps/web.py:1306 cps/web.py:1308 +msgid "Edit a shelf" +msgstr "编辑书架" + +#: cps/web.py:1329 +#, python-format +msgid "successfully deleted shelf %(name)s" +msgstr "成功删除书架 %(name)s" + +#: cps/web.py:1350 +#, python-format +msgid "Shelf: '%(name)s'" +msgstr "书架: '%(name)s'" + +#: cps/web.py:1378 +#, python-format +msgid "Change order of Shelf: '%(name)s'" +msgstr "修改书架 '%(name)s' 顺序" + +#: cps/web.py:1433 +msgid "Found an existing account for this email address." +msgstr "找到已使用此邮箱的账号。" + +#: cps/web.py:1435 cps/web.py:1438 +#, python-format +msgid "%(name)s's profile" +msgstr "%(name)s 的资料" + +#: cps/web.py:1436 +msgid "Profile updated" +msgstr "资料已更新" + +#: cps/web.py:1447 cps/web.py:1455 +msgid "Admin page" +msgstr "管理页" + +#: cps/templates/admin.html:32 cps/web.py:1475 +msgid "Add new user" +msgstr "添加新用户" + +#: cps/web.py:1508 +#, python-format +msgid "User '%(user)s' created" +msgstr "用户 '%(user)s' 已被创建" + +#: cps/web.py:1512 +msgid "Found an existing account for this email address or nickname." +msgstr "已找到使用此邮箱或昵称的账号。" + +#: cps/web.py:1535 cps/web.py:1546 +msgid "Mail settings updated" +msgstr "邮箱设置已更新" + +#: cps/web.py:1541 +#, python-format +msgid "Test E-Mail successfully send to %(kindlemail)s" +msgstr "测试邮件已成功发送到 %(kindlemail)s" + +#: cps/web.py:1544 +#, python-format +msgid "There was an error sending the Test E-Mail: %(res)s" +msgstr "发送测试邮件时发生错误: %(res)s" + +#: cps/web.py:1547 +msgid "Edit mail settings" +msgstr "编辑邮箱设置" + +#: cps/web.py:1570 +#, python-format +msgid "User '%(nick)s' deleted" +msgstr "用户 '%(nick)s' 已被删除" + +#: cps/web.py:1625 +#, python-format +msgid "User '%(nick)s' updated" +msgstr "用户 '%(nick)s' 已被更新" + +#: cps/web.py:1628 +msgid "An unknown error occured." +msgstr "发生未知错误。" + +#: cps/web.py:1630 +#, python-format +msgid "Edit User %(nick)s" +msgstr "编辑用户 %(nick)s" + +#: cps/web.py:1868 +#, python-format +msgid "Failed to create path %s (Permission denied)." +msgstr "创建路径 %s 失败(权限拒绝)。" + +#: cps/web.py:1873 +#, python-format +msgid "Failed to store file %s (Permission denied)." +msgstr "存储文件 %s 失败(权限拒绝)。" + +#: cps/web.py:1878 +#, python-format +msgid "Failed to delete file %s (Permission denied)." +msgstr "删除文件 %s 失败(权限拒绝)。" + +#: cps/templates/admin.html:4 +msgid "User list" +msgstr "用户列表" + +#: cps/templates/admin.html:7 +msgid "Nickname" +msgstr "昵称" + +#: cps/templates/admin.html:8 +msgid "Email" +msgstr "" + +#: cps/templates/admin.html:9 +msgid "Kindle" +msgstr "" + +#: cps/templates/admin.html:10 +msgid "DLS" +msgstr "" + +#: cps/templates/admin.html:11 cps/templates/layout.html:83 +msgid "Admin" +msgstr "管理" + +#: cps/templates/admin.html:12 cps/templates/detail.html:114 +msgid "Download" +msgstr "下载" + +#: cps/templates/admin.html:13 cps/templates/layout.html:76 +msgid "Upload" +msgstr "上传" + +#: cps/templates/admin.html:14 +msgid "Edit" +msgstr "编辑" + +#: cps/templates/admin.html:15 +msgid "Passwd" +msgstr "修改密码" + +#: cps/templates/admin.html:33 +msgid "SMTP mail settings" +msgstr "SMTP设置" + +#: cps/templates/admin.html:36 cps/templates/email_edit.html:7 +msgid "SMTP hostname" +msgstr "SMTP地址" + +#: cps/templates/admin.html:37 +msgid "SMTP port" +msgstr "SMTP端口" + +#: cps/templates/admin.html:38 +msgid "SSL" +msgstr "" + +#: cps/templates/admin.html:39 cps/templates/email_edit.html:19 +msgid "SMTP login" +msgstr "SMTP用户名" + +#: cps/templates/admin.html:40 cps/templates/email_edit.html:23 +msgid "SMTP password" +msgstr "SMTP密码" + +#: cps/templates/admin.html:41 +msgid "From mail" +msgstr "来自邮箱" + +#: cps/templates/admin.html:53 +msgid "Change SMTP settings" +msgstr "修改SMTP设置" + +#: cps/templates/admin.html:55 +msgid "Configuration" +msgstr "配置" + +#: cps/templates/admin.html:58 +msgid "Log File" +msgstr "日志文件" + +#: cps/templates/admin.html:59 +msgid "Log Level" +msgstr "日志级别" + +#: cps/templates/admin.html:60 +msgid "Port" +msgstr "端口" + +#: cps/templates/admin.html:61 +msgid "Books per page" +msgstr "每页书籍数" + +#: cps/templates/admin.html:62 +msgid "Uploading" +msgstr "上传" + +#: cps/templates/admin.html:63 +msgid "Public registration" +msgstr "开放注册" + +#: cps/templates/admin.html:64 +msgid "Anonymous browsing" +msgstr "匿名浏览" + +#: cps/templates/admin.html:75 +msgid "Administration" +msgstr "管理" + +#: cps/templates/admin.html:77 +msgid "Restart Calibre-web" +msgstr "重启 Calibre-web" + +#: cps/templates/detail.html:38 +msgid "Book" +msgstr "" + +#: cps/templates/detail.html:38 +msgid "of" +msgstr "" + +#: cps/templates/detail.html:44 +msgid "language" +msgstr "语言" + +#: cps/templates/detail.html:103 +msgid "Description:" +msgstr "简介:" + +#: cps/templates/detail.html:128 +msgid "Read in browser" +msgstr "在浏览器中阅读" + +#: cps/templates/detail.html:147 +msgid "Add to shelf" +msgstr "添加到书架" + +#: cps/templates/detail.html:187 +msgid "Edit metadata" +msgstr "编辑元数据" + +#: cps/templates/edit_book.html:14 cps/templates/search_form.html:6 +msgid "Book Title" +msgstr "书名" + +#: cps/templates/edit_book.html:18 cps/templates/search_form.html:10 +msgid "Author" +msgstr "作者" + +#: cps/templates/edit_book.html:22 +msgid "Description" +msgstr "简介" + +#: cps/templates/edit_book.html:26 cps/templates/search_form.html:13 +msgid "Tags" +msgstr "标签" + +#: cps/templates/edit_book.html:31 cps/templates/layout.html:133 +#: cps/templates/search_form.html:33 +msgid "Series" +msgstr "丛书" + +#: cps/templates/edit_book.html:35 +msgid "Series id" +msgstr "丛书ID" + +#: cps/templates/edit_book.html:39 +msgid "Rating" +msgstr "评分" + +#: cps/templates/edit_book.html:43 +msgid "Cover URL (jpg)" +msgstr "封面URL (jpg)" + +#: cps/templates/edit_book.html:48 cps/templates/user_edit.html:27 +msgid "Language" +msgstr "语言" + +#: cps/templates/edit_book.html:59 +msgid "Yes" +msgstr "确认" + +#: cps/templates/edit_book.html:60 +msgid "No" +msgstr "" + +#: cps/templates/edit_book.html:102 +msgid "view book after edit" +msgstr "编辑后查看书籍" + +#: cps/templates/edit_book.html:105 cps/templates/login.html:19 +#: cps/templates/search_form.html:75 cps/templates/shelf_edit.html:15 +#: cps/templates/user_edit.html:94 +msgid "Submit" +msgstr "提交" + +#: cps/templates/edit_book.html:106 cps/templates/email_edit.html:32 +#: cps/templates/shelf_edit.html:17 cps/templates/shelf_order.html:12 +#: cps/templates/user_edit.html:96 +msgid "Back" +msgstr "后退" + +#: cps/templates/email_edit.html:11 +msgid "SMTP port (usually 25 for plain SMTP and 587 for SSL)" +msgstr "SMTP端口(不加密的SMTP通常是25, SSL加密的是587)" + +#: cps/templates/email_edit.html:15 +msgid "Server uses SSL (StartTLS)" +msgstr "服务器使用SSL (StartTLS)" + +#: cps/templates/email_edit.html:27 +msgid "From e-mail" +msgstr "来自邮箱" + +#: cps/templates/email_edit.html:30 +msgid "Save settings" +msgstr "保存设置" + +#: cps/templates/email_edit.html:31 +msgid "Save settings and send Test E-Mail" +msgstr "保存设置并发送测试邮件" + +#: cps/templates/feed.xml:14 +msgid "Next" +msgstr "下一个" + +#: cps/templates/index.html:5 +msgid "Discover (Random Books)" +msgstr "发现(随机书籍)" + +#: cps/templates/index.xml:5 +msgid "Start" +msgstr "开始" + +#: cps/templates/index.xml:7 cps/templates/layout.html:61 +msgid "Search" +msgstr "搜索" + +#: cps/templates/index.xml:15 cps/templates/layout.html:124 +msgid "Hot Books" +msgstr "热门书籍" + +#: cps/templates/index.xml:19 +msgid "Popular publications from this catalog based on Rating." +msgstr "" + +#: cps/templates/index.xml:22 cps/templates/layout.html:122 +msgid "New Books" +msgstr "新书" + +#: cps/templates/index.xml:26 +msgid "The latest Books" +msgstr "最新书籍" + +#: cps/templates/index.xml:33 +msgid "Show Random Books" +msgstr "显示随机书籍" + +#: cps/templates/index.xml:36 cps/templates/layout.html:135 +msgid "Authors" +msgstr "作者" + +#: cps/templates/index.xml:40 +msgid "Books ordered by Author" +msgstr "书籍按作者排序" + +#: cps/templates/index.xml:47 +msgid "Books ordered by category" +msgstr "书籍按分类排序" + +#: cps/templates/index.xml:54 +msgid "Books ordered by series" +msgstr "书籍按丛书排序" + +#: cps/templates/layout.html:48 +msgid "Toggle navigation" +msgstr "" + +#: cps/templates/layout.html:63 +msgid "Go!" +msgstr "走起!" + +#: cps/templates/layout.html:66 +msgid "Advanced Search" +msgstr "高级搜索" + +#: cps/templates/layout.html:87 +msgid "Logout" +msgstr "注销" + +#: cps/templates/layout.html:91 cps/templates/login.html:4 +msgid "Login" +msgstr "登录" + +#: cps/templates/layout.html:92 cps/templates/register.html:18 +msgid "Register" +msgstr "注册" + +#: cps/templates/layout.html:121 +msgid "Browse" +msgstr "浏览" + +#: cps/templates/layout.html:127 +msgid "Discover" +msgstr "发现" + +#: cps/templates/layout.html:130 +msgid "Categories" +msgstr "分类" + +#: cps/templates/layout.html:137 cps/templates/search_form.html:54 +msgid "Languages" +msgstr "语言" + +#: cps/templates/layout.html:140 +msgid "Public Shelves" +msgstr "公开书架" + +#: cps/templates/layout.html:144 +msgid "Your Shelves" +msgstr "您的书架" + +#: cps/templates/layout.html:149 +msgid "Create a Shelf" +msgstr "创建书架" + +#: cps/templates/layout.html:152 +msgid "About" +msgstr "关于" + +#: cps/templates/login.html:7 cps/templates/login.html:8 +#: cps/templates/register.html:7 cps/templates/user_edit.html:8 +msgid "Username" +msgstr "用户名" + +#: cps/templates/login.html:11 cps/templates/login.html:12 +#: cps/templates/register.html:11 cps/templates/user_edit.html:18 +msgid "Password" +msgstr "密码" + +#: cps/templates/login.html:16 +msgid "Remember me" +msgstr "记住我" + +#: cps/templates/read.html:136 +msgid "Reflow text when sidebars are open." +msgstr "" + +#: cps/templates/readpdf.html:29 +msgid "PDF.js viewer" +msgstr "" + +#: cps/templates/readtxt.html:6 +msgid "Basic txt Reader" +msgstr "" + +#: cps/templates/register.html:4 +msgid "Register a new account" +msgstr "注册新用户" + +#: cps/templates/register.html:8 +msgid "Choose a username" +msgstr "选择一个用户名" + +#: cps/templates/register.html:12 +msgid "Choose a password" +msgstr "选择一个密码" + +#: cps/templates/register.html:15 cps/templates/user_edit.html:13 +msgid "Email address" +msgstr "邮箱地址" + +#: cps/templates/register.html:16 +msgid "Your email address" +msgstr "您的邮箱地址" + +#: cps/templates/search.html:6 +msgid "No Results for:" +msgstr "找不到结果:" + +#: cps/templates/search.html:7 +msgid "Please try a diffrent Search" +msgstr "请尝试别的关键字" + +#: cps/templates/search.html:9 +msgid "Results for:" +msgstr "结果:" + +#: cps/templates/search_form.html:23 +msgid "Exclude Tags" +msgstr "排除标签" + +#: cps/templates/search_form.html:43 +msgid "Exclude Series" +msgstr "排除丛书" + +#: cps/templates/search_form.html:64 +msgid "Exclude Languages" +msgstr "排除语言" + +#: cps/templates/shelf.html:6 +msgid "Delete this Shelf" +msgstr "删除此书架" + +#: cps/templates/shelf.html:7 +msgid "Edit Shelf name" +msgstr "编辑书架名" + +#: cps/templates/shelf.html:8 +msgid "change order" +msgstr "修改顺序" + +#: cps/templates/shelf_edit.html:7 +msgid "Title" +msgstr "" + +#: cps/templates/shelf_edit.html:12 +msgid "should the shelf be public?" +msgstr "要公开此书架吗?" + +#: cps/templates/shelf_order.html:5 +msgid "Drag 'n drop to rearrange order" +msgstr "" + +#: cps/templates/shelf_order.html:11 +msgid "Change order" +msgstr "修改顺序" + +#: cps/templates/stats.html:3 +msgid "Linked libraries" +msgstr "链接库" + +#: cps/templates/stats.html:8 +msgid "Program library" +msgstr "程序库" + +#: cps/templates/stats.html:9 +msgid "Installed Version" +msgstr "已安装版本" + +#: cps/templates/stats.html:36 +msgid "Calibre library statistics" +msgstr "Calibre书库统计" + +#: cps/templates/stats.html:41 +msgid "Books in this Library" +msgstr "本书在此书库" + +#: cps/templates/stats.html:45 +msgid "Authors in this Library" +msgstr "个作者在此书库" + +#: cps/templates/stats.html:49 +msgid "Series in this Library" +msgstr "个丛书在此书库" + +#: cps/templates/stats.html:53 +msgid "Tags in this Library" +msgstr "个标签在此书库" + +#: cps/templates/stats.html:57 +msgid "Usercount for calibre web" +msgstr "" + +#: cps/templates/user_edit.html:23 +msgid "Kindle E-Mail" +msgstr "" + +#: cps/templates/user_edit.html:35 +msgid "Show books with language" +msgstr "按语言显示书籍" + +#: cps/templates/user_edit.html:37 +msgid "Show all" +msgstr "显示全部" + +#: cps/templates/user_edit.html:45 +msgid "Show random books" +msgstr "显示随机书籍" + +#: cps/templates/user_edit.html:49 +msgid "Show hot books" +msgstr "显示热门书籍" + +#: cps/templates/user_edit.html:53 +msgid "Show language selection" +msgstr "显示语言选择" + +#: cps/templates/user_edit.html:57 +msgid "Show series selection" +msgstr "显示丛书选择" + +#: cps/templates/user_edit.html:61 +msgid "Show category selection" +msgstr "显示分类选择" + +#: cps/templates/user_edit.html:68 +msgid "Admin user" +msgstr "管理用户" + +#: cps/templates/user_edit.html:72 +msgid "Allow Downloads" +msgstr "允许下载" + +#: cps/templates/user_edit.html:76 +msgid "Allow Uploads" +msgstr "允许上传" + +#: cps/templates/user_edit.html:80 +msgid "Allow Edit" +msgstr "允许编辑" + +#: cps/templates/user_edit.html:84 +msgid "Allow Changing Password" +msgstr "允许修改密码" + +#: cps/templates/user_edit.html:90 +msgid "Delete this user" +msgstr "删除此用户" + +#: cps/templates/user_edit.html:101 +msgid "Recent Downloads" +msgstr "最近下载" + +msgid "Latin" +msgstr "" + From 9f65eae024ea3efcc994869d1fefd29b6ded7198 Mon Sep 17 00:00:00 2001 From: idalin Date: Mon, 9 Jan 2017 13:47:50 +0800 Subject: [PATCH 2/2] add default language configuration --- .gitignore | 1 + cps/config.py | 6 ++++-- cps/web.py | 8 +++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 16abdd7a..4ed21c61 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ cps/static/[0-9]* .idea/ *.bak *.log.* +tags diff --git a/cps/config.py b/cps/config.py index ec3fbd9a..dd34ffef 100755 --- a/cps/config.py +++ b/cps/config.py @@ -53,9 +53,10 @@ DB_ROOT = check_setting_str(CFG, 'General', 'DB_ROOT', "") APP_DB_ROOT = check_setting_str(CFG, 'General', 'APP_DB_ROOT', os.getcwd()) MAIN_DIR = check_setting_str(CFG, 'General', 'MAIN_DIR', os.getcwd()) LOG_DIR = check_setting_str(CFG, 'General', 'LOG_DIR', os.getcwd()) -PORT = check_setting_int(CFG, 'General', 'PORT', 8083) +PORT = check_setting_int(CFG, 'General', 'PORT', 8083) NEWEST_BOOKS = check_setting_str(CFG, 'General', 'NEWEST_BOOKS', 60) RANDOM_BOOKS = check_setting_int(CFG, 'General', 'RANDOM_BOOKS', 4) +DEFAULT_LANG = check_setting_str(CFG, 'General', 'DEFAULT_LANG', "") CheckSection('Advanced') TITLE_REGEX = check_setting_str(CFG, 'Advanced', 'TITLE_REGEX', '^(A|The|An|Der|Die|Das|Den|Ein|Eine|Einen|Dem|Des|Einem|Eines)\s+') @@ -72,7 +73,7 @@ if DB_ROOT == "": configval = {"DB_ROOT": DB_ROOT, "APP_DB_ROOT": APP_DB_ROOT, "MAIN_DIR": MAIN_DIR, "LOG_DIR": LOG_DIR, "PORT": PORT, "NEWEST_BOOKS": NEWEST_BOOKS, "DEVELOPMENT": DEVELOPMENT, "TITLE_REGEX": TITLE_REGEX, - "PUBLIC_REG": PUBLIC_REG, "UPLOADING": UPLOADING, "ANON_BROWSE": ANON_BROWSE} + "PUBLIC_REG": PUBLIC_REG, "UPLOADING": UPLOADING, "ANON_BROWSE": ANON_BROWSE, "DEFAULT_LANG": DEFAULT_LANG} def save_config(configval): @@ -85,6 +86,7 @@ def save_config(configval): new_config['General']['LOG_DIR'] = configval["LOG_DIR"] new_config['General']['PORT'] = configval["PORT"] new_config['General']['NEWEST_BOOKS'] = configval["NEWEST_BOOKS"] + new_config['General']['DEFAULT_LANG'] = configval["DEFAULT_LANG"] new_config['Advanced'] = {} new_config['Advanced']['TITLE_REGEX'] = configval["TITLE_REGEX"] new_config['Advanced']['DEVELOPMENT'] = int(configval["DEVELOPMENT"]) diff --git a/cps/web.py b/cps/web.py index 281173e5..95fdab1f 100755 --- a/cps/web.py +++ b/cps/web.py @@ -165,7 +165,8 @@ LANGUAGES = { 'en': 'English', 'de': 'Deutsch', 'fr': 'Français', - 'es': 'Español' + 'es': 'Español', + 'zh_Hans_CN': '简体中文' } @@ -173,9 +174,14 @@ LANGUAGES = { def get_locale(): # if a user is logged in, use the locale from the user settings user = getattr(g, 'user', None) + translations = babel.list_translations() + [LC('en')] if user is not None and hasattr(user, "locale"): + if user.locale == 'zh': + return 'zh_Hans_CN' return user.locale preferred = [x.replace('-', '_') for x in request.accept_languages.values()] + if config.DEFAULT_LANG: + return config.DEFAULT_LANG return negotiate_locale(preferred, LANGUAGES.keys())