From 7d01d940ed8c627cb66190355d1144ddecb6ff32 Mon Sep 17 00:00:00 2001 From: cdhigh Date: Mon, 25 Mar 2024 22:16:12 -0300 Subject: [PATCH] porting to python3 --- application/back_end/db_models.py | 1 + .../back_end/task_queue_apscheduler.py | 5 +- application/back_end/task_queue_rq.py | 11 +- application/templates/base.html | 3 +- application/templates/setting.html | 17 +- .../tr_TR/LC_MESSAGES/messages.mo | Bin 22686 -> 23378 bytes .../tr_TR/LC_MESSAGES/messages.po | 242 ++++++++++-------- .../translations/zh/LC_MESSAGES/messages.mo | Bin 21420 -> 21977 bytes .../translations/zh/LC_MESSAGES/messages.po | 236 +++++++++-------- application/view/login.py | 10 +- application/view/setting.py | 34 ++- docs/Chinese/2.config.md | 33 ++- docs/Chinese/3.deployment.md | 22 +- docs/English/2.config.md | 32 ++- docs/English/3.deployment.md | 22 +- main.py | 9 +- messages.pot | 231 ++++++++++------- tools/nginx/gunicorn.conf.py | 6 +- tools/nginx/gunicorn.service | 1 + 19 files changed, 557 insertions(+), 358 deletions(-) diff --git a/application/back_end/db_models.py b/application/back_end/db_models.py index 7ec1fb89..e8d462b6 100644 --- a/application/back_end/db_models.py +++ b/application/back_end/db_models.py @@ -230,6 +230,7 @@ class InBox(MyBaseModel): sender = CharField() to = CharField() subject = CharField() + status = CharField() size = IntegerField(default=0) datetime = DateTimeField(default=datetime.datetime.utcnow) body = TextField(default='', index=False) diff --git a/application/back_end/task_queue_apscheduler.py b/application/back_end/task_queue_apscheduler.py index 3d1be730..eec14cef 100644 --- a/application/back_end/task_queue_apscheduler.py +++ b/application/back_end/task_queue_apscheduler.py @@ -22,8 +22,9 @@ elif _broker_url.startswith(('sqlite://', 'mysql://', 'postgresql://')): from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore jobstores = {"default": SQLAlchemyJobStore(url=_broker_url)} -elif _broker_url == '': - jobstores = {} #default is memory store +elif _broker_url == 'memory': + from apscheduler.jobstores.memory import MemoryJobStore + jobstores = {"default": MemoryJobStore()} else: raise ValueError('Unsupported TASK_QUEUE_BROKER_URL type: {_broker_url}') diff --git a/application/back_end/task_queue_rq.py b/application/back_end/task_queue_rq.py index 788806f7..5a7b6893 100644 --- a/application/back_end/task_queue_rq.py +++ b/application/back_end/task_queue_rq.py @@ -4,8 +4,9 @@ #Author: cdhigh import os, sys, json -#启动rq -#set FLASK_APP=main.py +#启动rq的worker命令,在shell下执行 +#windows: set FLASK_APP=main.py +#linux: export FLASK_APP=main.py #flask rq worker from flask_rq2 import RQ @@ -15,9 +16,9 @@ def init_task_queue_service(app): app.config['RQ_REDIS_URL'] = app.config['TASK_QUEUE_BROKER_URL'] rq.init_app(app) - #windows不支持,暂时屏蔽,正式版本需要取消注释 - #check_deliver.cron('0 */1 * * *', 'check_deliver') #每隔一个小时执行一次 - #remove_logs.cron('0 0 */1 * *', 'remove_logs') #每隔24小时执行一次 + #windows不支持,暂时屏蔽,正式版本需要取消注释, TODO + check_deliver.cron('40 */1 * * *', 'check_deliver') #每隔一个小时执行一次 + remove_logs.cron('0 0 */1 * *', 'remove_logs') #每隔24小时执行一次 return rq @rq.job diff --git a/application/templates/base.html b/application/templates/base.html index ef940a99..fef70fe3 100644 --- a/application/templates/base.html +++ b/application/templates/base.html @@ -91,7 +91,8 @@ abbrUpl: '{{_("Upl")|safe}}', abbrSep: '{{_("Sep")|safe}}', abbrLog: '{{_("Log")|safe}}', - abbrEmb: '{{_("Emb")|safe}}' + abbrEmb: '{{_("Emb")|safe}}', + testEmailOk: '{{_("The test email has been successfully sent to [{0}]. Please check your inbox or spam folder to confirm its delivery. Depending on your email server, there may be a slight delay.")|safe}}' }; {% block javascript_inhead %} diff --git a/application/templates/setting.html b/application/templates/setting.html index c3ca9b89..2f4d4c0d 100644 --- a/application/templates/setting.html +++ b/application/templates/setting.html @@ -239,8 +239,11 @@ {{_("You have not yet set up your email address. Please go to the 'Admin' page to add your email address firstly.")}}

{% endif %} +

- + +      +

@@ -309,5 +312,17 @@ $('#sm_save_path').hide(); } } + +//发送测试邮件 +function SendTestEmail() { + $.post("/send_test_email", {url: window.location.href}, function (data) { + if (data.status == "ok") { + ShowSimpleModalDialog('

{0}

'.format(i18n.testEmailOk.format(data.email))); + } else { + alert(data.status); + } + }); + return false; +} {% endblock -%} \ No newline at end of file diff --git a/application/translations/tr_TR/LC_MESSAGES/messages.mo b/application/translations/tr_TR/LC_MESSAGES/messages.mo index f8940bb2c2feb703d8fb1be18aa90c1fc2eebb78..9eaf0e04448b17786340de86e1b2941517783ee4 100644 GIT binary patch delta 6538 zcmY+{d3aUD8OQOH1(FcfAUi1sfj|NT2*FC&Bgh^In+S;BBq!l|Z|;qEL4)Fz3RJA1 zfM8WB7TM}XLnNSrJd#AvR$Gb`To4~n1Oc^*6|G>uznrl?%^&&9%$YOu&O0+F@KjaY zKWgG)AEhO(v-r6!&aygV=Ty~x`RUx&vKmoM$0Y2Ajj^{e$FvVN^--A2^KqtLXq;`l z)jThC>oF@xp*b%sL`|>^JK;*yK!3sn+=+^<1{Kf&^ZXF1|6$bo7f}Izi#Gmlc8owJVkbxLeL%w-14Yk4|RD}29uW&gk16xq3uSN~e5N z{a|d&pvqJll2j`lHO`<;{ zfN5BXlkp+E3ExNNwsJ_P+6%BNZirD(0I#7^S%(_bL|wlb zsQ&Y@VP(c3#?yWeYQmUle*m?hb*P1G#%8+zyC^8)TGUEUpeDG8n(#YRAgSCv4VZ>x z+v{SEz~7kqgQ$sD zqqgP=)QYQ6seBD}c;7`GzB8u&J#y}>R5n_-ArlpFK90abjOoSI6cp(*sEPNX_Oc!m z@CYX2F;r$gL_I%)3j7l4{hv?^=+MLMXQKkjLiHPlI%DHd^Uml&{+04l8Wh<=)P&1W zFRnlZv;p&QGb$4&QSY6_MtB*ur&p01YPHC4C+dR==z7%sA7ScV)cX|~1s=RN#Bi#^cyR_y2p-A*G+YN8Ru`I!rP3<)|&%iQ0-9OvP6*1rMUm#$jxN$57Yv z6zY_JiQ1~T{_cmVJ^HA3!fTk{`Yi?B;|-{R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sm2K9m3VCy?jf$v6b-Eq~K-(01jiQ476U%)P?0rOB1PeMgJ z6VpE;reG|5v2~=R)P=TCAo&JB|G>qkk7E*#U&^L|zYj0oW0f)gHMcw~% zsOxtT`COa0LifWo0r~gG1W|`*D|+z|@>`hs5w%r)rn|Q#7spaB!8>pbD!|XJ?TX01 z_AsZ&jkExD+Urq!^$POYHqEG%{fudt%4luTi+ylBDxeBX#|F&7ZJ3RpSv%h8o~_BK z!yE`x$fR%pwG|go6Wv5j(52XI&p-`ah{JF(>Xy8KO8qfxgC{TnKSaI%C2G(AgUa*` zY>$cLUxs^8P^xoK0~KKdmY_a3XHi@818VQ%OWX;PQG1_`IvWE~6AeLSWE3ic<*0y` zpeAfU^;?g86vJi<1?|Zfn1l(X?q2mo4X_xMkyV(8n^Cu8Cw9O+_W5yC20unk_yZ~f zp1a(@6H()&pvD=B9^LKAxUS)k8b-mW0Qonw7 zB(>9f(UI#Zv!Wa4ra6t_v}+@LixvgS2lBIKQFU#lFAyAfUv;JPKp+@&=J}o4kguv{ zzCRT5mpir9&XVf7kmGOZ6=~|a%oEA(nd@my!?ZwEdC(te$hg)jl06{G6Y*xZi;2q~ z=?od1J1jd=;H~pS-p}0--L=Nw{6Zk;uX1XAp}_p0KNN6k{WZZrrQ@%SY#N;zmHdAL zYCM^DN2K?dX)%$|#ECJ9?sQpxXG-&~s&aoQ@>za#Y-D@!Q_*co8F#^;5}&U&QdoK@ zDv~tw?@>W!bZP=iopQfZ;jbzWI5qxIy+3rgsp@dk(!)(oMO~ffnXry)ccqC9ABuySMK}kGeMsnEf`rn`(X5c0i$Nc`v3p{ diff --git a/application/translations/tr_TR/LC_MESSAGES/messages.po b/application/translations/tr_TR/LC_MESSAGES/messages.po index 0549e3ab..b7b19f61 100644 --- a/application/translations/tr_TR/LC_MESSAGES/messages.po +++ b/application/translations/tr_TR/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-03-19 20:51-0300\n" +"POT-Creation-Date: 2024-03-25 21:13-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: tr_TR\n" @@ -18,7 +18,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.14.0\n" -#: application/templates/admin.html:3 application/templates/base.html:139 +#: application/templates/admin.html:3 application/templates/base.html:144 msgid "Admin" msgstr "Yönetim" @@ -168,8 +168,8 @@ msgstr "Sil" #: application/templates/adv_archive.html:3 #: application/templates/adv_archive.html:13 -#: application/templates/adv_base.html:59 -#: application/templates/adv_base.html:63 +#: application/templates/adv_base.html:57 +#: application/templates/adv_base.html:61 msgid "Archive" msgstr "Arşiv" @@ -202,44 +202,46 @@ msgstr "Doğrulamak" #: application/templates/adv_archive.html:89 #: application/templates/book_translator.html:72 -#: application/templates/setting.html:243 +#: application/templates/setting.html:244 msgid "Save settings" msgstr "Ayarları kaydet" #: application/templates/adv_base.html:39 #: application/templates/adv_base.html:43 -#: application/templates/adv_delivernow.html:3 #: application/templates/adv_delivernow.html:8 -msgid "Deliver now" +msgid "Deliver Now" msgstr "Şimdi gönder" -#: application/templates/adv_base.html:49 -#: application/templates/adv_base.html:53 +#: application/templates/adv_base.html:48 +#: application/templates/adv_base.html:52 #: application/templates/adv_whitelist.html:13 msgid "White List" msgstr "Beyaz liste" -#: application/templates/adv_base.html:68 -#: application/templates/adv_base.html:72 +#: application/templates/adv_base.html:66 +#: application/templates/adv_base.html:70 #: application/templates/adv_import.html:8 msgid "Import Feeds" msgstr "feedleri içeri aktar" -#: application/templates/adv_base.html:77 -#: application/templates/adv_base.html:81 +#: application/templates/adv_base.html:75 +#: application/templates/adv_base.html:79 msgid "Cover Image" msgstr "Kapak resmi" -#: application/templates/adv_base.html:86 -#: application/templates/adv_base.html:90 +#: application/templates/adv_base.html:84 +#: application/templates/adv_base.html:88 #: application/templates/adv_uploadcss.html:3 msgid "Stylesheet" msgstr "Stylesheet" -#: application/templates/adv_base.html:95 -#: application/templates/adv_base.html:99 -#: application/templates/adv_calibre_options.html:3 +#: application/templates/adv_base.html:93 +#: application/templates/adv_base.html:97 #: application/templates/adv_calibre_options.html:12 +msgid "Calibre Options" +msgstr "Calibre seçenekleri" + +#: application/templates/adv_calibre_options.html:3 msgid "Calibre options" msgstr "Calibre seçenekleri" @@ -247,9 +249,13 @@ msgstr "Calibre seçenekleri" msgid "Set the parameters for Calibre, in JSON dictionary format." msgstr "Calibre için parametreleri JSON sözlük formatında ayarlayın." +#: application/templates/adv_delivernow.html:3 +msgid "Deliver now" +msgstr "Şimdi gönder" + #: application/templates/adv_delivernow.html:9 -msgid "Deliver selected recipes now" -msgstr "Şimdi seçilen tarifleri teslim et" +msgid "Deliver selected recipes now." +msgstr "Seçilen tarifleri şimdi teslim edin." #: application/templates/adv_delivernow.html:12 msgid "There are no recipes subscribed" @@ -331,12 +337,11 @@ msgid "White list" msgstr "Beyaz liste" #: application/templates/adv_whitelist.html:15 -#, python-format msgid "" -"Emails sent to %(name)sxxx@appid.appspotmail.com will be transferred to " -"your email." +"Emails sent to %(name)sxxx@%(mailHost)s will be transferred to your " +"kindle email." msgstr "" -"%(name)sxxx@appid.appspotmail.com adresine gönderilen emailler admin " +"%(name)sxxx@%(mailHost)s adresine gönderilen emailler admin " "hesabına bağlı Kindle'a gönderilecek." #: application/templates/adv_whitelist.html:27 @@ -499,7 +504,7 @@ msgstr "Kindle'laştırma Seçimi" msgid "Verified" msgstr "Doğrulanmış" -#: application/templates/base.html:59 application/view/login.py:72 +#: application/templates/base.html:59 application/view/login.py:78 #: application/view/share.py:154 msgid "The username does not exist or password is wrong." msgstr "Kullanıcı adı mevcut değil veya şifre yanlış." @@ -603,7 +608,7 @@ msgstr "Kullanıcı adı veya şifre boş." #: application/templates/base.html:84 application/view/admin.py:86 #: application/view/admin.py:165 application/view/admin.py:205 -#: application/view/login.py:213 application/view/login.py:273 +#: application/view/login.py:219 application/view/login.py:279 msgid "The two new passwords are dismatch." msgstr "İki yeni şifre uyuşmuyor." @@ -615,7 +620,7 @@ msgstr "Şifre başarıyla değiştirildi." msgid "Account added successfully." msgstr "Hesap başarıyla eklendi." -#: application/templates/base.html:87 application/view/login.py:123 +#: application/templates/base.html:87 application/view/login.py:129 msgid "login required" msgstr "Giriş yapılması gerekiyor" @@ -637,39 +642,62 @@ msgstr "" msgid "Translator" msgstr "Çevirmen" -#: application/templates/base.html:112 application/templates/home.html:12 +#: application/templates/base.html:91 +msgid "Upl" +msgstr "Upl" + +#: application/templates/base.html:92 +msgid "Sep" +msgstr "Sep" + +#: application/templates/base.html:93 +msgid "Log" +msgstr "Log" + +#: application/templates/base.html:94 +msgid "Emb" +msgstr "Emb" + +#: application/templates/base.html:95 +msgid "" +"The test email has been successfully sent to [{0}]. Please check your " +"inbox or spam folder to confirm its delivery. Depending on your email " +"server, there may be a slight delay." +msgstr "Test e-postası başarıyla [{0}] adresine gönderildi. Teslimatını onaylamak için gelen kutunuzu veya spam klasörünüzü kontrol edin. E-posta sunucunuza bağlı olarak hafif bir gecikme olabilir." + +#: application/templates/base.html:117 application/templates/home.html:12 msgid "Logout" msgstr "Çıkış" -#: application/templates/base.html:114 application/templates/home.html:17 +#: application/templates/base.html:119 application/templates/home.html:17 #: application/templates/login.html:3 application/templates/login.html:19 #: application/templates/login.html:29 msgid "Login" msgstr "Giriş" -#: application/templates/base.html:116 application/templates/signup.html:3 +#: application/templates/base.html:121 application/templates/signup.html:3 #: application/templates/signup.html:19 application/templates/signup.html:43 msgid "Signup" msgstr "Kaydol" -#: application/templates/base.html:136 application/templates/home.html:11 +#: application/templates/base.html:141 application/templates/home.html:11 #: application/templates/my.html:3 msgid "Feeds" msgstr "RSSler" -#: application/templates/base.html:137 application/templates/setting.html:3 +#: application/templates/base.html:142 application/templates/setting.html:3 msgid "Settings" msgstr "Ayarlar" -#: application/templates/base.html:138 application/templates/logs.html:3 +#: application/templates/base.html:143 application/templates/logs.html:3 msgid "Logs" msgstr "Kayıtlar" -#: application/templates/base.html:140 +#: application/templates/base.html:145 msgid "Advanced" msgstr "Gelişmiş" -#: application/templates/base.html:141 application/templates/library.html:3 +#: application/templates/base.html:146 application/templates/library.html:3 msgid "Shared" msgstr "Paylaşılan" @@ -817,16 +845,14 @@ msgid "" "With the open-source %(kindleear)s application, you can set up your own " "server to deliver daily news feeds to your e-reader and effortlessly " "share the service with friends." -msgstr "" -"ile siz de kendi serverınızı kurup Kindle'ınıza RSS'leri günlük " -"gönderebilir veya arkadaşlarınızla paylaşabilirsiniz." +msgstr "Açık kaynaklı %(kindleear)s uygulaması ile kendi sunucunuzu kurarak günlük haber akışlarınızı e-okuyucunuza teslim edebilir ve hizmeti dostlarınızla kolayca paylaşabilirsiniz." #: application/templates/library.html:50 application/templates/my.html:62 msgid "Search" msgstr "Ara" -#: application/templates/login.html:34 application/view/login.py:190 -#: application/view/login.py:197 +#: application/templates/login.html:34 application/view/login.py:196 +#: application/view/login.py:203 msgid "" "The website does not allow registration. You can ask the owner for an " "account." @@ -840,7 +866,7 @@ msgstr "Sadece son 10 işlem kaydını gösterir." #: application/templates/logs.html:21 application/templates/logs.html:66 msgid "Time" -msgstr "Tarih/Saat" +msgstr "Zaman" #: application/templates/logs.html:22 application/templates/logs.html:67 #: application/templates/my.html:17 application/templates/setting.html:98 @@ -1079,7 +1105,7 @@ msgstr "" msgid "Personal Document Settings" msgstr "Ayarları kaydet" -#: application/templates/setting.html:239 +#: application/templates/setting.html:239 application/view/setting.py:130 msgid "" "You have not yet set up your email address. Please go to the 'Admin' page" " to add your email address firstly." @@ -1087,6 +1113,10 @@ msgstr "" "Email adresinizi henüz ayarlamadınız. Lütfen e-posta adresinizi eklemek " "için 'Yönetim' sayfasına öncelikle gidin." +#: application/templates/setting.html:246 +msgid "Send Test Email" +msgstr "Test E-postası Gönder" + #: application/templates/signup.html:38 msgid "Invitation code" msgstr "Davetiye kodu" @@ -1095,7 +1125,7 @@ msgstr "Davetiye kodu" msgid "User account" msgstr "Kullanıcı hesabı" -#: application/view/admin.py:51 application/view/adv.py:355 +#: application/view/admin.py:51 application/view/adv.py:353 #: application/view/setting.py:96 application/view/subscribe.py:241 msgid "Settings Saved!" msgstr "Ayarlar Kaydedildi!" @@ -1111,23 +1141,23 @@ msgid "You do not have sufficient privileges." msgstr "Yeterli yetkiniz yok." #: application/view/admin.py:82 application/view/admin.py:152 -#: application/view/login.py:209 application/view/login.py:238 +#: application/view/login.py:215 application/view/login.py:244 #: application/view/setting.py:61 application/view/setting.py:63 #: application/view/setting.py:65 application/view/share.py:36 msgid "Some parameters are missing or wrong." msgstr "Bazı parametreler eksik veya yanlış." #: application/view/admin.py:84 application/view/login.py:40 -#: application/view/login.py:215 +#: application/view/login.py:221 msgid "The username includes unsafe chars." msgstr "Kullanıcı adı güvensiz karakterler içeriyor." -#: application/view/admin.py:88 application/view/login.py:217 +#: application/view/admin.py:88 application/view/login.py:223 msgid "Already exist the username." msgstr "Kullanıcı adı zaten var." #: application/view/admin.py:93 application/view/admin.py:171 -#: application/view/admin.py:198 application/view/login.py:264 +#: application/view/admin.py:198 application/view/login.py:270 msgid "The password includes non-ascii chars." msgstr "Şifre ascii olmayan karakterler içeriyor." @@ -1160,69 +1190,69 @@ msgstr "Eski şifre yanlış." msgid "Changes saved successfully." msgstr "Değişiklikler başarıyla kaydedildi." +#: application/view/adv.py:79 application/view/adv.py:80 #: application/view/adv.py:81 application/view/adv.py:82 #: application/view/adv.py:83 application/view/adv.py:84 #: application/view/adv.py:85 application/view/adv.py:86 -#: application/view/adv.py:87 application/view/adv.py:88 -#: application/view/adv.py:89 +#: application/view/adv.py:87 msgid "Append hyperlink '{}' to article" msgstr "'{}' linkini makaleye ekle" +#: application/view/adv.py:79 application/view/adv.py:80 #: application/view/adv.py:81 application/view/adv.py:82 -#: application/view/adv.py:83 application/view/adv.py:84 msgid "Save to {}" msgstr "{} kaydedildi" -#: application/view/adv.py:81 +#: application/view/adv.py:79 msgid "evernote" msgstr "evernote" -#: application/view/adv.py:82 +#: application/view/adv.py:80 msgid "wiz" msgstr "wiz" -#: application/view/adv.py:83 +#: application/view/adv.py:81 msgid "pocket" msgstr "pocket" -#: application/view/adv.py:84 +#: application/view/adv.py:82 msgid "instapaper" msgstr "instapaper" +#: application/view/adv.py:83 application/view/adv.py:84 #: application/view/adv.py:85 application/view/adv.py:86 -#: application/view/adv.py:87 application/view/adv.py:88 msgid "Share on {}" msgstr "{} üzerinde paylaş" -#: application/view/adv.py:85 +#: application/view/adv.py:83 msgid "weibo" msgstr "weibo" -#: application/view/adv.py:86 +#: application/view/adv.py:84 msgid "facebook" msgstr "facebook" -#: application/view/adv.py:88 +#: application/view/adv.py:86 msgid "tumblr" msgstr "tumblr" -#: application/view/adv.py:89 +#: application/view/adv.py:87 msgid "Open in browser" msgstr "Tarayıcıda aç" -#: application/view/adv.py:357 +#: application/view/adv.py:355 msgid "The format is invalid." msgstr "Format geçersiz." -#: application/view/adv.py:390 +#: application/view/adv.py:388 msgid "Authorization Error!
{}" msgstr "Yetkilendirme Hatası!
{}" -#: application/view/adv.py:413 +#: application/view/adv.py:411 msgid "Success authorized by Pocket!" msgstr "Pocket tarafından yetkilendirilen başarı!" -#: application/view/adv.py:419 +#: application/view/adv.py:417 msgid "" "Failed to request authorization of Pocket!
See details " "below:

{}" @@ -1230,17 +1260,17 @@ msgstr "" "Pocket yetkilendirme isteği başarısız oldu!
Aşağıdaki ayrıntılara " "bakın:

{}" -#: application/view/adv.py:429 +#: application/view/adv.py:427 msgid "Request type [{}] unsupported" msgstr "İstek türü [{}] desteklenmiyor" -#: application/view/adv.py:444 +#: application/view/adv.py:442 msgid "The Instapaper service encountered an error. Please try again later." msgstr "" "Instapaper servisi bir hata ile karşılaştı. Lütfen daha sonra tekrar " "deneyin." -#: application/view/deliver.py:67 application/view/login.py:160 +#: application/view/deliver.py:67 application/view/login.py:166 #: application/view/share.py:40 msgid "The username does not exist or the email is empty." msgstr "Kullanıcı adı mevcut değil veya e-posta boş." @@ -1276,65 +1306,65 @@ msgstr "Kullanıcı adı boş." msgid "The len of username reached the limit of 25 chars." msgstr "Kullanıcı adının uzunluğu 25 karakter sınırına ulaştı." -#: application/view/login.py:73 +#: application/view/login.py:79 msgid "Forgot password?" msgstr "Forgot password?" -#: application/view/login.py:139 application/view/login.py:275 +#: application/view/login.py:145 application/view/login.py:281 msgid "The token is wrong or expired." msgstr "Belirteç yanlış veya süresi dolmuş." -#: application/view/login.py:142 +#: application/view/login.py:148 msgid "Please input the correct username and email to reset password." msgstr "" "Şifreyi sıfırlamak için lütfen doğru kullanıcı adı ve e-posta adresini " "girin." -#: application/view/login.py:144 +#: application/view/login.py:150 msgid "The email of account '{name}' is {email}." msgstr "'{name}' hesabının e-postası {email}." -#: application/view/login.py:165 +#: application/view/login.py:171 msgid "Reset password success, Please close this page and login again." msgstr "" "Şifre sıfırlama başarılı, Lütfen bu sayfayı kapatın ve yeniden giriş " "yapın." -#: application/view/login.py:168 +#: application/view/login.py:174 msgid "The email you input is not associated with this account." msgstr "Girdiğiniz e-posta bu hesapla ilişkilendirilmemiştir." -#: application/view/login.py:179 +#: application/view/login.py:185 msgid "The link to reset your password has been sent to your email." msgstr "Şifrenizi sıfırlamak için gerekli bağlantı e-postanıza gönderilmiştir." -#: application/view/login.py:180 +#: application/view/login.py:186 msgid "Please check your email inbox within 24 hours." msgstr "Lütfen e-posta gelen kutunuzu 24 saat içinde kontrol edin." -#: application/view/login.py:211 +#: application/view/login.py:217 msgid "The invitation code is invalid." msgstr "Davetiye kodu geçersiz." -#: application/view/login.py:219 +#: application/view/login.py:225 msgid "" "Failed to create an account. Please contact the administrator for " "assistance." msgstr "Bir hesap oluşturulamadı. Yardım için lütfen yöneticiyle iletişime geçin." -#: application/view/login.py:229 +#: application/view/login.py:235 msgid "Successfully created account." msgstr "Hesap başarıyla oluşturuldu." -#: application/view/login.py:240 +#: application/view/login.py:246 msgid "Reset KindleEar password" msgstr "KindleEar şifrenizi sıfırlama" -#: application/view/login.py:241 +#: application/view/login.py:247 msgid "This is an automated email. Please do not reply to it." msgstr "Bu otomatik bir e-postadır. Lütfen yanıt vermeyin." -#: application/view/login.py:242 +#: application/view/login.py:248 msgid "You can click the following link to reset your KindleEar password." msgstr "" "KindleEar şifrenizi sıfırlamak için aşağıdaki bağlantıya " @@ -1348,107 +1378,107 @@ msgstr "Kindle E-mail adresi gerekli!" msgid "Title is requied!" msgstr "Başlık zorunlu!" -#: application/view/setting.py:123 +#: application/view/setting.py:153 msgid "Chinese" msgstr "Çince" -#: application/view/setting.py:124 +#: application/view/setting.py:154 msgid "English" msgstr "İngilizce" -#: application/view/setting.py:125 +#: application/view/setting.py:155 msgid "French" msgstr "Fransızca" -#: application/view/setting.py:126 +#: application/view/setting.py:156 msgid "Spanish" msgstr "İspanyolca" -#: application/view/setting.py:127 +#: application/view/setting.py:157 msgid "Portuguese" msgstr "Portekizce" -#: application/view/setting.py:128 +#: application/view/setting.py:158 msgid "German" msgstr "Almanca" -#: application/view/setting.py:129 +#: application/view/setting.py:159 msgid "Italian" msgstr "İtalyanca" -#: application/view/setting.py:130 +#: application/view/setting.py:160 msgid "Japanese" msgstr "Japonca" -#: application/view/setting.py:131 +#: application/view/setting.py:161 msgid "Russian" msgstr "Rusça" -#: application/view/setting.py:132 +#: application/view/setting.py:162 msgid "Turkish" msgstr "Türkçe" -#: application/view/setting.py:133 +#: application/view/setting.py:163 msgid "Korean" msgstr "Koreli" -#: application/view/setting.py:134 +#: application/view/setting.py:164 msgid "Arabic" msgstr "Arapça" -#: application/view/setting.py:135 +#: application/view/setting.py:165 msgid "Czech" msgstr "Çek" -#: application/view/setting.py:136 +#: application/view/setting.py:166 msgid "Dutch" msgstr "Flemenkçe" -#: application/view/setting.py:137 +#: application/view/setting.py:167 msgid "Greek" msgstr "Yunan" -#: application/view/setting.py:138 +#: application/view/setting.py:168 msgid "Hindi" msgstr "Hintçe" -#: application/view/setting.py:139 +#: application/view/setting.py:169 msgid "Malaysian" msgstr "Malezyalı" -#: application/view/setting.py:140 +#: application/view/setting.py:170 msgid "Bengali" msgstr "Bengal" -#: application/view/setting.py:141 +#: application/view/setting.py:171 msgid "Persian" msgstr "Farsça" -#: application/view/setting.py:142 +#: application/view/setting.py:172 msgid "Urdu" msgstr "Urduca" -#: application/view/setting.py:143 +#: application/view/setting.py:173 msgid "Swahili" msgstr "Svahili" -#: application/view/setting.py:144 +#: application/view/setting.py:174 msgid "Vietnamese" msgstr "Vietnam" -#: application/view/setting.py:145 +#: application/view/setting.py:175 msgid "Punjabi" msgstr "Pencap" -#: application/view/setting.py:146 +#: application/view/setting.py:176 msgid "Javanese" msgstr "Cava" -#: application/view/setting.py:147 +#: application/view/setting.py:177 msgid "Tagalog" msgstr "Tagalog" -#: application/view/setting.py:148 +#: application/view/setting.py:178 msgid "Hausa" msgstr "Hausa" diff --git a/application/translations/zh/LC_MESSAGES/messages.mo b/application/translations/zh/LC_MESSAGES/messages.mo index 99b23347a696bd6669a86bad3a6509855f55c8ef..a231ad6f63018d71baad77c90a94124bfff3257b 100644 GIT binary patch delta 6249 zcmY+{dstOf8prXC5Q^789Z^JgsTiQBsEvZDnVMG=(;1uc0(w*w&tW)dYM0|BOAPat z*~PRgI#c0=6b;3v%*#wQJv`=Pn%QI>#8Jzpn!$3W`Tp4NGt>A-pY^W2F7H}M6#egC`(HWEO@xWq5IbQsrkd$i-{0apu@TQlSe$K6 zHmBM1Sza7+0u-9lVIgXQm6(8QPy_t|BXJKZw|%ID-nHi^Q0=Qx{jZ`D`~h9OfvK3- z#&J60NYwK@Z0Lj>r+~shDi&dPtiW3_jEUGN-f@~?5^AD87=z=nG5*e;`>Z~QDbzoV zTEGsB!riEa?n5Pd6l0j*`H+HEb{bpYm*#hZF$1YfaJ@IMmjK?tv zub>iW+0N_V9yNX^R3g1Gq>3T-U;=7|xu^^u!4CKsY6o6JZGAavfCG3loY zY@YKzY6rf;WV~wiZ8+&lpl5sbUxn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XzWzkbQHQd<#l@)S%25fd zz^Z|<8u3=E|2=9)cAKA=f5ueici&Rb0M$6!%D5)#kTpa-*xBrbnjjywg=0|(l%bwq zjtu2iT71^pFIoH$HQv8bXDg~dG4s1*6|fVkAqOLIwAGJCOe%HG0;xE=ZUcZabh{tFW@agaYz57glt ziTXBNj!JMJYTRR}TXGT8@gb^zYM$S}D3ASD$2Y0az#Ea@9_|1tp}Uxa5qugo$A0Ey z)I`fMi0e>i;bYVeoJQ^7T~y)?hxpHTL$$wx90NDUvx)te1nQN_mQ(-8s@i*b2C$S^KE5^hJE4=v1ZsW?zrcP|nzcb59XO)bbI=%gb(vslM zr%s<99A6xqRX%RU%t^)N<;4?&vr2>WN@te`i>rEt_B4Gh5K3#F8Hl1`@YER-rx%Bo zC09m<(%OXuLK$h%5jE1f2Rn7lOiv39&S(}0&CM(euXxzwdZYh4WyOu2DWRC``GL^N c-bI0^8_Ravn6(GQM}|WA>#Kzd3YG=_3(`G!>i_@% diff --git a/application/translations/zh/LC_MESSAGES/messages.po b/application/translations/zh/LC_MESSAGES/messages.po index f1e36923..4397d91f 100644 --- a/application/translations/zh/LC_MESSAGES/messages.po +++ b/application/translations/zh/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: KindleEar v3.0.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-03-19 20:51-0300\n" +"POT-Creation-Date: 2024-03-25 21:13-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh\n" @@ -18,7 +18,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.14.0\n" -#: application/templates/admin.html:3 application/templates/base.html:139 +#: application/templates/admin.html:3 application/templates/base.html:144 msgid "Admin" msgstr "账号管理" @@ -168,8 +168,8 @@ msgstr "删除" #: application/templates/adv_archive.html:3 #: application/templates/adv_archive.html:13 -#: application/templates/adv_base.html:59 -#: application/templates/adv_base.html:63 +#: application/templates/adv_base.html:57 +#: application/templates/adv_base.html:61 msgid "Archive" msgstr "归档" @@ -202,44 +202,46 @@ msgstr "校验" #: application/templates/adv_archive.html:89 #: application/templates/book_translator.html:72 -#: application/templates/setting.html:243 +#: application/templates/setting.html:244 msgid "Save settings" msgstr "保存设置" #: application/templates/adv_base.html:39 #: application/templates/adv_base.html:43 -#: application/templates/adv_delivernow.html:3 #: application/templates/adv_delivernow.html:8 -msgid "Deliver now" +msgid "Deliver Now" msgstr "现在投递" -#: application/templates/adv_base.html:49 -#: application/templates/adv_base.html:53 +#: application/templates/adv_base.html:48 +#: application/templates/adv_base.html:52 #: application/templates/adv_whitelist.html:13 msgid "White List" msgstr "邮件白名单" -#: application/templates/adv_base.html:68 -#: application/templates/adv_base.html:72 +#: application/templates/adv_base.html:66 +#: application/templates/adv_base.html:70 #: application/templates/adv_import.html:8 msgid "Import Feeds" msgstr "导入订阅列表" -#: application/templates/adv_base.html:77 -#: application/templates/adv_base.html:81 +#: application/templates/adv_base.html:75 +#: application/templates/adv_base.html:79 msgid "Cover Image" msgstr "封面图像" -#: application/templates/adv_base.html:86 -#: application/templates/adv_base.html:90 +#: application/templates/adv_base.html:84 +#: application/templates/adv_base.html:88 #: application/templates/adv_uploadcss.html:3 msgid "Stylesheet" msgstr "样式表" -#: application/templates/adv_base.html:95 -#: application/templates/adv_base.html:99 -#: application/templates/adv_calibre_options.html:3 +#: application/templates/adv_base.html:93 +#: application/templates/adv_base.html:97 #: application/templates/adv_calibre_options.html:12 +msgid "Calibre Options" +msgstr "Calibre配置" + +#: application/templates/adv_calibre_options.html:3 msgid "Calibre options" msgstr "Calibre配置" @@ -247,8 +249,12 @@ msgstr "Calibre配置" msgid "Set the parameters for Calibre, in JSON dictionary format." msgstr "设置Calibre生成电子书的选项,要求为JSON字典格式。" +#: application/templates/adv_delivernow.html:3 +msgid "Deliver now" +msgstr "现在投递" + #: application/templates/adv_delivernow.html:9 -msgid "Deliver selected recipes now" +msgid "Deliver selected recipes now." msgstr "现在推送选择的Recipe" #: application/templates/adv_delivernow.html:12 @@ -329,11 +335,10 @@ msgid "White list" msgstr "邮件白名单" #: application/templates/adv_whitelist.html:15 -#, python-format msgid "" -"Emails sent to %(name)sxxx@appid.appspotmail.com will be transferred to " -"your email." -msgstr "发送至 %(name)sxxx@appid.appspotmail.com 的邮件将被转发到您的邮箱。" +"Emails sent to %(name)sxxx@%(mailHost)s will be transferred to your " +"kindle email." +msgstr "发送至 %(name)sxxx@%(mailHost)s 的邮件将被转发到您的邮箱。" #: application/templates/adv_whitelist.html:27 msgid "Please input mail address" @@ -491,7 +496,7 @@ msgstr "选择内容发送到Kindle" msgid "Verified" msgstr "已校验" -#: application/templates/base.html:59 application/view/login.py:72 +#: application/templates/base.html:59 application/view/login.py:78 #: application/view/share.py:154 msgid "The username does not exist or password is wrong." msgstr "用户名不存在或密码错误。" @@ -595,7 +600,7 @@ msgstr "用户名或密码为空。" #: application/templates/base.html:84 application/view/admin.py:86 #: application/view/admin.py:165 application/view/admin.py:205 -#: application/view/login.py:213 application/view/login.py:273 +#: application/view/login.py:219 application/view/login.py:279 msgid "The two new passwords are dismatch." msgstr "两个密码不匹配。" @@ -607,7 +612,7 @@ msgstr "修改密码成功。" msgid "Account added successfully." msgstr "添加账号成功。" -#: application/templates/base.html:87 application/view/login.py:123 +#: application/templates/base.html:87 application/view/login.py:129 msgid "login required" msgstr "需要登录" @@ -627,39 +632,62 @@ msgstr "您选择的文件总和超过16MB,请减小图像分辨率或分批 msgid "Translator" msgstr "书籍翻译器" -#: application/templates/base.html:112 application/templates/home.html:12 +#: application/templates/base.html:91 +msgid "Upl" +msgstr "Upl" + +#: application/templates/base.html:92 +msgid "Sep" +msgstr "Sep" + +#: application/templates/base.html:93 +msgid "Log" +msgstr "Log" + +#: application/templates/base.html:94 +msgid "Emb" +msgstr "Emb" + +#: application/templates/base.html:95 +msgid "" +"The test email has been successfully sent to [{0}]. Please check your " +"inbox or spam folder to confirm its delivery. Depending on your email " +"server, there may be a slight delay." +msgstr "测试邮件已经成功发送到 [{0}], 请打开收件箱或垃圾箱确认是否到达,根据服务器不同,可能稍有延迟。" + +#: application/templates/base.html:117 application/templates/home.html:12 msgid "Logout" msgstr "退出" -#: application/templates/base.html:114 application/templates/home.html:17 +#: application/templates/base.html:119 application/templates/home.html:17 #: application/templates/login.html:3 application/templates/login.html:19 #: application/templates/login.html:29 msgid "Login" msgstr "登录" -#: application/templates/base.html:116 application/templates/signup.html:3 +#: application/templates/base.html:121 application/templates/signup.html:3 #: application/templates/signup.html:19 application/templates/signup.html:43 msgid "Signup" msgstr "注册" -#: application/templates/base.html:136 application/templates/home.html:11 +#: application/templates/base.html:141 application/templates/home.html:11 #: application/templates/my.html:3 msgid "Feeds" msgstr "我的订阅" -#: application/templates/base.html:137 application/templates/setting.html:3 +#: application/templates/base.html:142 application/templates/setting.html:3 msgid "Settings" msgstr "设置" -#: application/templates/base.html:138 application/templates/logs.html:3 +#: application/templates/base.html:143 application/templates/logs.html:3 msgid "Logs" msgstr "投递日志" -#: application/templates/base.html:140 +#: application/templates/base.html:145 msgid "Advanced" msgstr "高级设置" -#: application/templates/base.html:141 application/templates/library.html:3 +#: application/templates/base.html:146 application/templates/library.html:3 msgid "Shared" msgstr "网友分享" @@ -727,7 +755,7 @@ msgstr "原文样式" msgid "Translated text style" msgstr "译文样式" -#: application/templates/book_translator.html:67y +#: application/templates/book_translator.html:67 msgid "Apply to all subscribed recipes" msgstr "应用到当前所有已订阅Recipe" @@ -809,8 +837,8 @@ msgstr "使用开源 %(kindleear)s 应用,您可以部署您自己的网站, msgid "Search" msgstr "搜索" -#: application/templates/login.html:34 application/view/login.py:190 -#: application/view/login.py:197 +#: application/templates/login.html:34 application/view/login.py:196 +#: application/view/login.py:203 msgid "" "The website does not allow registration. You can ask the owner for an " "account." @@ -1058,12 +1086,16 @@ msgstr "" msgid "Personal Document Settings" msgstr "个人文档设置" -#: application/templates/setting.html:239 +#: application/templates/setting.html:239 application/view/setting.py:130 msgid "" "You have not yet set up your email address. Please go to the 'Admin' page" " to add your email address firstly." msgstr "您尚未设置您的email地址,请先到“账号管理”页面添加您的email地址。" +#: application/templates/setting.html:246 +msgid "Send Test Email" +msgstr "发送测试邮件" + #: application/templates/signup.html:38 msgid "Invitation code" msgstr "邀请码" @@ -1072,7 +1104,7 @@ msgstr "邀请码" msgid "User account" msgstr "账号" -#: application/view/admin.py:51 application/view/adv.py:355 +#: application/view/admin.py:51 application/view/adv.py:353 #: application/view/setting.py:96 application/view/subscribe.py:241 msgid "Settings Saved!" msgstr "恭喜,保存成功!" @@ -1088,23 +1120,23 @@ msgid "You do not have sufficient privileges." msgstr "您没有足够的权限。" #: application/view/admin.py:82 application/view/admin.py:152 -#: application/view/login.py:209 application/view/login.py:238 +#: application/view/login.py:215 application/view/login.py:244 #: application/view/setting.py:61 application/view/setting.py:63 #: application/view/setting.py:65 application/view/share.py:36 msgid "Some parameters are missing or wrong." msgstr "一些参数为空或错误。" #: application/view/admin.py:84 application/view/login.py:40 -#: application/view/login.py:215 +#: application/view/login.py:221 msgid "The username includes unsafe chars." msgstr "用户名包含不安全字符。" -#: application/view/admin.py:88 application/view/login.py:217 +#: application/view/admin.py:88 application/view/login.py:223 msgid "Already exist the username." msgstr "此账号已经存在。" #: application/view/admin.py:93 application/view/admin.py:171 -#: application/view/admin.py:198 application/view/login.py:264 +#: application/view/admin.py:198 application/view/login.py:270 msgid "The password includes non-ascii chars." msgstr "密码包含非ASCII字符。" @@ -1137,83 +1169,83 @@ msgstr "原密码错误。" msgid "Changes saved successfully." msgstr "账号设置已更新。" +#: application/view/adv.py:79 application/view/adv.py:80 #: application/view/adv.py:81 application/view/adv.py:82 #: application/view/adv.py:83 application/view/adv.py:84 #: application/view/adv.py:85 application/view/adv.py:86 -#: application/view/adv.py:87 application/view/adv.py:88 -#: application/view/adv.py:89 +#: application/view/adv.py:87 msgid "Append hyperlink '{}' to article" msgstr "在每篇文章后附加 '{}' 超链接" +#: application/view/adv.py:79 application/view/adv.py:80 #: application/view/adv.py:81 application/view/adv.py:82 -#: application/view/adv.py:83 application/view/adv.py:84 msgid "Save to {}" msgstr "保存到 {}" -#: application/view/adv.py:81 +#: application/view/adv.py:79 msgid "evernote" msgstr "evernote" -#: application/view/adv.py:82 +#: application/view/adv.py:80 msgid "wiz" msgstr "为知笔记" -#: application/view/adv.py:83 +#: application/view/adv.py:81 msgid "pocket" msgstr "pocket" -#: application/view/adv.py:84 +#: application/view/adv.py:82 msgid "instapaper" msgstr "instapaper" +#: application/view/adv.py:83 application/view/adv.py:84 #: application/view/adv.py:85 application/view/adv.py:86 -#: application/view/adv.py:87 application/view/adv.py:88 msgid "Share on {}" msgstr "分享到 {}" -#: application/view/adv.py:85 +#: application/view/adv.py:83 msgid "weibo" msgstr "微博" -#: application/view/adv.py:86 +#: application/view/adv.py:84 msgid "facebook" msgstr "facebook" -#: application/view/adv.py:88 +#: application/view/adv.py:86 msgid "tumblr" msgstr "tumblr" -#: application/view/adv.py:89 +#: application/view/adv.py:87 msgid "Open in browser" msgstr "在浏览器打开" -#: application/view/adv.py:357 +#: application/view/adv.py:355 msgid "The format is invalid." msgstr "格式非法。" -#: application/view/adv.py:390 +#: application/view/adv.py:388 msgid "Authorization Error!
{}" msgstr "申请授权过程失败!
{}" -#: application/view/adv.py:413 +#: application/view/adv.py:411 msgid "Success authorized by Pocket!" msgstr "已经成功获得Pocket的授权!" -#: application/view/adv.py:419 +#: application/view/adv.py:417 msgid "" "Failed to request authorization of Pocket!
See details " "below:

{}" msgstr "申请Pocket授权失败!
错误信息参考如下:

{}" -#: application/view/adv.py:429 +#: application/view/adv.py:427 msgid "Request type [{}] unsupported" msgstr "不支持你请求的命令类型 [{}]" -#: application/view/adv.py:444 +#: application/view/adv.py:442 msgid "The Instapaper service encountered an error. Please try again later." msgstr "Instapaper服务器异常,请稍候再试。" -#: application/view/deliver.py:67 application/view/login.py:160 +#: application/view/deliver.py:67 application/view/login.py:166 #: application/view/share.py:40 msgid "The username does not exist or the email is empty." msgstr "用户名不存在或email为空。" @@ -1249,61 +1281,61 @@ msgstr "账号名为空。" msgid "The len of username reached the limit of 25 chars." msgstr "用户名超过25字符。" -#: application/view/login.py:73 +#: application/view/login.py:79 msgid "Forgot password?" msgstr "忘记密码?" -#: application/view/login.py:139 application/view/login.py:275 +#: application/view/login.py:145 application/view/login.py:281 msgid "The token is wrong or expired." msgstr "Token码错误或已经逾期。" -#: application/view/login.py:142 +#: application/view/login.py:148 msgid "Please input the correct username and email to reset password." msgstr "请输入正确的用户名和Email来重置密码。" -#: application/view/login.py:144 +#: application/view/login.py:150 msgid "The email of account '{name}' is {email}." msgstr "账号 '{name}' 的Email为 {email}" -#: application/view/login.py:165 +#: application/view/login.py:171 msgid "Reset password success, Please close this page and login again." msgstr "修改密码成功,请关闭此页面重新登录。" -#: application/view/login.py:168 +#: application/view/login.py:174 msgid "The email you input is not associated with this account." msgstr "您输入的email不正确。" -#: application/view/login.py:179 +#: application/view/login.py:185 msgid "The link to reset your password has been sent to your email." msgstr "重置密码的邮件已经被发送至你的email。" -#: application/view/login.py:180 +#: application/view/login.py:186 msgid "Please check your email inbox within 24 hours." msgstr "请在24小时内检查你的email收件箱。" -#: application/view/login.py:211 +#: application/view/login.py:217 msgid "The invitation code is invalid." msgstr "邀请码无效。" -#: application/view/login.py:219 +#: application/view/login.py:225 msgid "" "Failed to create an account. Please contact the administrator for " "assistance." msgstr "创建账号失败,请联系管理员请求协助。" -#: application/view/login.py:229 +#: application/view/login.py:235 msgid "Successfully created account." msgstr "成功创建账号。" -#: application/view/login.py:240 +#: application/view/login.py:246 msgid "Reset KindleEar password" msgstr "重置KindleEar密码" -#: application/view/login.py:241 +#: application/view/login.py:247 msgid "This is an automated email. Please do not reply to it." msgstr "这个是自动发送的邮件,请勿直接回复。" -#: application/view/login.py:242 +#: application/view/login.py:248 msgid "You can click the following link to reset your KindleEar password." msgstr "你可以点击下面的链接来重置你的KindleEar密码。" @@ -1315,107 +1347,107 @@ msgstr "Kindle E-mail必须填写!" msgid "Title is requied!" msgstr "书籍标题不能为空!" -#: application/view/setting.py:123 +#: application/view/setting.py:153 msgid "Chinese" msgstr "中文" -#: application/view/setting.py:124 +#: application/view/setting.py:154 msgid "English" msgstr "英语" -#: application/view/setting.py:125 +#: application/view/setting.py:155 msgid "French" msgstr "法语" -#: application/view/setting.py:126 +#: application/view/setting.py:156 msgid "Spanish" msgstr "西班牙语" -#: application/view/setting.py:127 +#: application/view/setting.py:157 msgid "Portuguese" msgstr "葡萄牙语" -#: application/view/setting.py:128 +#: application/view/setting.py:158 msgid "German" msgstr "德语" -#: application/view/setting.py:129 +#: application/view/setting.py:159 msgid "Italian" msgstr "意大利语" -#: application/view/setting.py:130 +#: application/view/setting.py:160 msgid "Japanese" msgstr "日语" -#: application/view/setting.py:131 +#: application/view/setting.py:161 msgid "Russian" msgstr "俄语" -#: application/view/setting.py:132 +#: application/view/setting.py:162 msgid "Turkish" msgstr "土耳其语" -#: application/view/setting.py:133 +#: application/view/setting.py:163 msgid "Korean" msgstr "韩语" -#: application/view/setting.py:134 +#: application/view/setting.py:164 msgid "Arabic" msgstr "阿拉伯语" -#: application/view/setting.py:135 +#: application/view/setting.py:165 msgid "Czech" msgstr "捷克语" -#: application/view/setting.py:136 +#: application/view/setting.py:166 msgid "Dutch" msgstr "荷兰语" -#: application/view/setting.py:137 +#: application/view/setting.py:167 msgid "Greek" msgstr "希腊语" -#: application/view/setting.py:138 +#: application/view/setting.py:168 msgid "Hindi" msgstr "印地语" -#: application/view/setting.py:139 +#: application/view/setting.py:169 msgid "Malaysian" msgstr "马来西亚语" -#: application/view/setting.py:140 +#: application/view/setting.py:170 msgid "Bengali" msgstr "孟加拉语" -#: application/view/setting.py:141 +#: application/view/setting.py:171 msgid "Persian" msgstr "波斯语" -#: application/view/setting.py:142 +#: application/view/setting.py:172 msgid "Urdu" msgstr "乌尔都语" -#: application/view/setting.py:143 +#: application/view/setting.py:173 msgid "Swahili" msgstr "斯瓦希里语" -#: application/view/setting.py:144 +#: application/view/setting.py:174 msgid "Vietnamese" msgstr "越南语" -#: application/view/setting.py:145 +#: application/view/setting.py:175 msgid "Punjabi" msgstr "旁遮普语" -#: application/view/setting.py:146 +#: application/view/setting.py:176 msgid "Javanese" msgstr "爪哇语" -#: application/view/setting.py:147 +#: application/view/setting.py:177 msgid "Tagalog" msgstr "他加禄语" -#: application/view/setting.py:148 +#: application/view/setting.py:178 msgid "Hausa" msgstr "豪萨语" diff --git a/application/view/login.py b/application/view/login.py index 8bb3d5b8..ab392d1b 100644 --- a/application/view/login.py +++ b/application/view/login.py @@ -65,8 +65,14 @@ def LoginPost(): u.custom = custom u.save() - return redirect(url_for("bpSubscribe.MySubscription") if u.kindle_email else url_for("bpSetting.Setting")) - #return redirect(url_for("bpSetting.Setting")) + if not u.sender: + url = url_for('bpAdmin.AdminAccountChange', name=name) + elif not u.kindle_email: + url = url_for("bpSetting.Setting") + else: + url = url_for("bpSubscribe.MySubscription") + default_log.info(f"Login event: {name}") + return redirect(url) else: #账号或密码错 time.sleep(5) #防止暴力破解 tips = (_("The username does not exist or password is wrong.") + diff --git a/application/view/setting.py b/application/view/setting.py index 25e48d74..49d97882 100644 --- a/application/view/setting.py +++ b/application/view/setting.py @@ -1,14 +1,14 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- #设置页面 -import locale, os +import locale, os, textwrap from flask import Blueprint, render_template, request, redirect, session from flask import current_app as app from flask_babel import gettext as _ from ..base_handler import * from ..utils import str_to_bool, str_to_int, ke_encrypt from ..back_end.db_models import * -from ..back_end.send_mail_adpt import avaliable_sm_services +from ..back_end.send_mail_adpt import avaliable_sm_services, send_mail from .subscribe import UpdateBookedCustomRss bpSetting = Blueprint('bpSetting', __name__) @@ -101,6 +101,36 @@ def SettingPost(): sm_services = avaliable_sm_services() return render_template('setting.html', tab='set', user=user, tips=tips, langMap=LangMap(), sm_services=sm_services) +@bpSetting.post("/send_test_email", endpoint='SendTestEmailPost') +@login_required() +def SendTestEmailPost(): + user = get_login_user() + srcUrl = request.form.get('url', '') + body = textwrap.dedent(f"""\ + Dear {user.name}, + + This is a test email from KindleEar, sent to verify the accuracy of the email sending configuration. + Please ignore it and do not reply. + + Receiving this email confirms that your KindleEar web application can send emails successfully. + Thank you for your attention to this matter. + + Best regards, + [KindleEar] + [From {srcUrl}] + """) + + if user.email: + status = 'ok' + try: + send_mail(user, user.email, 'Test email from KindleEar', body) + except Exception as e: + status = str(e) + else: + status = _("You have not yet set up your email address. Please go to the 'Admin' page to add your email address firstly.") + + return {'status': status, 'email': user.email} + #设置国际化语种 @bpSetting.route("/setlocale/") def SetLang(langCode): diff --git a/docs/Chinese/2.config.md b/docs/Chinese/2.config.md index 20a82f27..ba0f66eb 100644 --- a/docs/Chinese/2.config.md +++ b/docs/Chinese/2.config.md @@ -83,7 +83,7 @@ database_url = f"mysql://{db_username}:{db_password}@{db_host}:{db_port}/{db_nam ### MongoDB 应用最广的典型NoSQL数据库。 -参数配置如下: +1. 参数配置如下: ```python #template: DATABASE_URL = 'mongodb://username:password@hostname:port/' @@ -92,17 +92,38 @@ DATABASE_URL = 'mongodb://127.0.0.1:27017/' DATABASE_URL = 'mongodb://user:pass123@example.com:27017/' ``` +2. 如果部署的目标平台没有安装mongodb-server,可以参考 [官方文档](https://www.mongodb.com/docs/manual/installation/) 进行安装。 +这里是在ubuntu的安装方法: +```bash +sudo apt install gnupg curl +curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \ + sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \ + --dearmor +echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list +sudo apt update +sudo apt install -y mongodb-org +sudo systemctl start mongod +sudo systemctl enable mongod +``` ### Redis 可以持久化到磁盘的NoSQL内存数据库。如果目标系统已经安装并使用了redis用于任务队列,则直接使用redis可以省去安装其他数据库的资源消耗,但使用前要做好相关的redis持久化配置,避免丢失数据。 -参数配置如下(db_number可以省略,如果是0,建议省略): +1. 参数配置如下(db_number可以省略,如果是0,建议省略): ```python DATABASE_URL = 'redis://[:password]@hostname:port/db_number' DATABASE_URL = 'redis://127.0.0.1:6379/' DATABASE_URL = 'redis://:password123@example.com:6379/1' ``` +2. 如果不是的目标平台没有安装redis,可以参考 [官方文档]() 进行安装。 +这里是在ubuntu的安装方法: +```bash +sudo apt update +sudo apt install redis-server +sudo systemctl start redis-server +sudo systemctl enable redis-server +``` ### Pickle @@ -140,13 +161,17 @@ TASK_QUEUE_BROKER_URL = "" ```python TASK_QUEUE_SERVICE = "apscheduler" -TASK_QUEUE_BROKER_URL = "" #use memory store +TASK_QUEUE_BROKER_URL = "memory" #use memory store #or TASK_QUEUE_BROKER_URL = "redis://127.0.0.1:6379/" #or TASK_QUEUE_BROKER_URL = "sqlite:////home/username/dbfilename.db" ``` +注意事项: +1. apscheduler 3.x不支持多进程(不管使用什么jobstore),配合 gunicorn 使用时需要使用多线程,比如设置 workers=1, threads=3,并且 preload_app=False。 + + ### celery @@ -189,7 +214,7 @@ TASK_QUEUE_BROKER_URL = "redis://127.0.0.1:6379/" * **SMTP**: 这个选项就灵活了,大部分的电子邮件服务平台都支持SMTP,只是很多平台对SMTP登录都有诸多限制,使用前请注意阅读相关说明,特别是大多数平台的SMTP密码都和正常的账号密码不一致。 -除了使用市场上已有的服务外,ubuntu等平台也很方便的部署一个自己的SMTP服务。 +除了使用市场上已有的服务外,ubuntu等平台也很方便的使用postfix等部署一个自己的SMTP服务。 diff --git a/docs/Chinese/3.deployment.md b/docs/Chinese/3.deployment.md index f6dc4342..5746e4f0 100644 --- a/docs/Chinese/3.deployment.md +++ b/docs/Chinese/3.deployment.md @@ -82,8 +82,8 @@ sudo pip3 install virtualenv sudo apt install redis-server sudo systemctl start nginx sudo systemctl start redis-server -sudo systemctl enable nginx.service -sudo systemctl enable redis-server.service +sudo systemctl enable nginx +sudo systemctl enable redis-server curl localhost #test if nginx works well @@ -112,25 +112,25 @@ sudo netfilter-persistent save #modify nginx configuration vim ./tools/nginx/default #optional, change server_name if you want -sudo ln -fs ./tools/nginx/default /etc/nginx/sites-enabled/default +sudo cp -rf ./tools/nginx/default /etc/nginx/sites-enabled/default sudo nginx -t #test if nginx config file is correct #set gunicorn auto start -sudo cp ./tools/nginx/gunicorn.service /usr/lib/systemd/system +sudo cp ./tools/nginx/gunicorn.service /usr/lib/systemd/system/gunicorn.service sudo systemctl daemon-reload -sudo systemctl start gunicorn.service -sudo systemctl status gunicorn.service -sudo systemctl enable gunicorn.service +sudo systemctl start gunicorn +sudo systemctl status gunicorn +sudo systemctl enable gunicorn -sudo systemctl restart nginx.service -sudo systemctl status nginx.service +sudo systemctl restart nginx +sudo systemctl status nginx ``` 6. 版本更新方法 ```bash #先更新代码,不管是git/ftp/scp等,注意要保留数据库文件 -sudo systemctl restart gunicorn.service -sudo systemctl status gunicorn.service #确认running +sudo systemctl restart gunicorn +sudo systemctl status gunicorn #确认running ``` 7. 现在你就可以在浏览器中使用 "http://ip" 来确认是否已经部署成功。如果有证书的话,也可以继续配置nginx来使用SSL。 diff --git a/docs/English/2.config.md b/docs/English/2.config.md index 973f86d6..59c252aa 100644 --- a/docs/English/2.config.md +++ b/docs/English/2.config.md @@ -84,7 +84,7 @@ database_url = f"mysql://{db_username}:{db_password}@{db_host}:{db_port}/{db_nam ### MongoDB The most widely used typical NoSQL database. -Parameter configuration is as follows: +1. Parameter configuration is as follows: ```python #template: DATABASE_URL = 'mongodb://username:password@hostname:port/' @@ -93,19 +93,40 @@ DATABASE_URL = 'mongodb://127.0.0.1:27017/' DATABASE_URL = 'mongodb://user:pass123@example.com:27017/' ``` +2. If mongodb is not installed on the target platform, you can refer to the [official documentation](https://www.mongodb.com/docs/manual/installation/) for installation instructions. Here is the installation method for Ubuntu: +```bash +sudo apt install gnupg curl +curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \ + sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \ + --dearmor +echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list +sudo apt update +sudo apt install -y mongodb-org +sudo systemctl start mongod +sudo systemctl enable mongod +``` + ### Redis A memory NoSQL database that can persist to disk. If the target system already has Redis installed and used for task queues, using Redis directly can save the resource consumption of installing other databases. However, before using it, relevant Redis persistence configurations should be done to avoid data loss. -Parameter configuration is as follows (the db_number can be omitted, but if it's 0, it's recommended to omit it): +1. Parameter configuration is as follows (the db_number can be omitted, but if it's 0, it's recommended to omit it): ```python DATABASE_URL = 'redis://[:password]@hostname:port/db_number' DATABASE_URL = 'redis://127.0.0.1:6379/0' DATABASE_URL = 'redis://:password123@example.com:6379/1' ``` +2. If Redis is not installed on the target platform, you can refer to the [official documentation](https://redis.io/docs/install/install-redis/) for installation instructions. Here is the installation method for Ubuntu: +```bash +sudo apt update +sudo apt install redis-server +sudo systemctl start redis-server +sudo systemctl enable redis-server +``` + ### Pickle @@ -148,13 +169,16 @@ If database persistence is required, it supports SQLite/MySQL/PostgreSQL/MongoDB ```python TASK_QUEUE_SERVICE = "apscheduler" -TASK_QUEUE_BROKER_URL = "" # use memory store +TASK_QUEUE_BROKER_URL = "memory" # use memory store # or TASK_QUEUE_BROKER_URL = "redis://127.0.0.1:6379/" # or TASK_QUEUE_BROKER_URL = "sqlite:////home/username/dbfilename.db" ``` +Notes: +1. The apscheduler 3.x does not support multi-processes (No matter what job store is used). When used with gunicorn, using multi-threads instead, for example, setting workers=1, threads=3, and disabling preload_app. + ### celery @@ -200,7 +224,7 @@ During testing, another issue was discovered: if your sender email address is no * **SMTP**: This option is flexible, as most email service platforms support SMTP. However, many platforms have various restrictions on SMTP. Before use, please carefully read the relevant instructions, especially considering that the SMTP password for most platforms differs from the regular account password. -In addition to using existing services available in the market, platforms like Ubuntu also offer convenient ways to deploy your own SMTP service. +In addition to using existing services available in the market, platforms like Ubuntu also offer convenient ways to deploy your own SMTP service by using postfix. diff --git a/docs/English/3.deployment.md b/docs/English/3.deployment.md index 97db2d66..2146e111 100644 --- a/docs/English/3.deployment.md +++ b/docs/English/3.deployment.md @@ -86,8 +86,8 @@ sudo pip3 install virtualenv sudo apt install redis-server sudo systemctl start nginx sudo systemctl start redis-server -sudo systemctl enable nginx.service -sudo systemctl enable redis-server.service +sudo systemctl enable nginx +sudo systemctl enable redis-server curl localhost #test if nginx works well @@ -117,25 +117,25 @@ sudo netfilter-persistent save #2. add a line 'client_max_body_size 16M;' to http section sudo vim /etc/nginx/nginx.conf vim ./tools/nginx/default #change server_name if you want -sudo ln -f ./tools/nginx/default /etc/nginx/sites-enabled/default +sudo cp -rf ./tools/nginx/default /etc/nginx/sites-enabled/default sudo nginx -t #test if nginx config file is correct #set gunicorn auto start -sudo cp ./tools/nginx/gunicorn.service /usr/lib/systemd/system +sudo cp ./tools/nginx/gunicorn.service /usr/lib/systemd/system/gunicorn.service sudo systemctl daemon-reload -sudo systemctl start gunicorn.service -sudo systemctl status gunicorn.service -sudo systemctl enable gunicorn.service +sudo systemctl start gunicorn +sudo systemctl status gunicorn +sudo systemctl enable gunicorn -sudo systemctl restart nginx.service -sudo systemctl status nginx.service +sudo systemctl restart nginx +sudo systemctl status nginx ``` 6. Version Update Method ```bash # First, update the code using git/ftp/scp, etc. Ensure to preserve the database files. -sudo systemctl restart gunicorn.service -sudo systemctl status gunicorn.service # Confirm it is running +sudo systemctl restart gunicorn +sudo systemctl status gunicorn # Confirm it is running ``` 7. Now you can use "http://ip" in your browser to confirm if the deployment was successful. If you have a SSL certificate, you can also proceed to configure Nginx to use SSL. diff --git a/main.py b/main.py index a111e996..637bff08 100644 --- a/main.py +++ b/main.py @@ -10,12 +10,8 @@ from config import * appDir = os.path.dirname(os.path.abspath(__file__)) -if DATABASE_URL == 'datastore' or TASK_QUEUE_SERVICE == 'datastore': - log = logging.getLogger() -else: - log = logging.getLogger('gunicorn.error') -if log.level == logging.NOTSET: - log.setLevel(logging.INFO) #logging.DEBUG, WARNING +#logName = None if (DATABASE_URL == 'datastore') else 'gunicorn.error' +log = logging.getLogger() builtins.__dict__['default_log'] = log builtins.__dict__['appDir'] = appDir @@ -45,6 +41,7 @@ def set_env(): from application import init_app app = init_app(__name__, debug=False) celery_app = app.extensions.get("celery", None) +log.setLevel(logging.INFO) #logging.DEBUG, WARNING def main(): if len(sys.argv) == 2 and sys.argv[1] == 'debug': diff --git a/messages.pot b/messages.pot index 98d1efa9..c98da5ea 100644 --- a/messages.pot +++ b/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-03-19 20:51-0300\n" +"POT-Creation-Date: 2024-03-25 21:13-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.14.0\n" -#: application/templates/admin.html:3 application/templates/base.html:139 +#: application/templates/admin.html:3 application/templates/base.html:144 msgid "Admin" msgstr "" @@ -167,8 +167,8 @@ msgstr "" #: application/templates/adv_archive.html:3 #: application/templates/adv_archive.html:13 -#: application/templates/adv_base.html:59 -#: application/templates/adv_base.html:63 +#: application/templates/adv_base.html:57 +#: application/templates/adv_base.html:61 msgid "Archive" msgstr "" @@ -201,44 +201,46 @@ msgstr "" #: application/templates/adv_archive.html:89 #: application/templates/book_translator.html:72 -#: application/templates/setting.html:243 +#: application/templates/setting.html:244 msgid "Save settings" msgstr "" #: application/templates/adv_base.html:39 #: application/templates/adv_base.html:43 -#: application/templates/adv_delivernow.html:3 #: application/templates/adv_delivernow.html:8 -msgid "Deliver now" +msgid "Deliver Now" msgstr "" -#: application/templates/adv_base.html:49 -#: application/templates/adv_base.html:53 +#: application/templates/adv_base.html:48 +#: application/templates/adv_base.html:52 #: application/templates/adv_whitelist.html:13 msgid "White List" msgstr "" -#: application/templates/adv_base.html:68 -#: application/templates/adv_base.html:72 +#: application/templates/adv_base.html:66 +#: application/templates/adv_base.html:70 #: application/templates/adv_import.html:8 msgid "Import Feeds" msgstr "" -#: application/templates/adv_base.html:77 -#: application/templates/adv_base.html:81 +#: application/templates/adv_base.html:75 +#: application/templates/adv_base.html:79 msgid "Cover Image" msgstr "" -#: application/templates/adv_base.html:86 -#: application/templates/adv_base.html:90 +#: application/templates/adv_base.html:84 +#: application/templates/adv_base.html:88 #: application/templates/adv_uploadcss.html:3 msgid "Stylesheet" msgstr "" -#: application/templates/adv_base.html:95 -#: application/templates/adv_base.html:99 -#: application/templates/adv_calibre_options.html:3 +#: application/templates/adv_base.html:93 +#: application/templates/adv_base.html:97 #: application/templates/adv_calibre_options.html:12 +msgid "Calibre Options" +msgstr "" + +#: application/templates/adv_calibre_options.html:3 msgid "Calibre options" msgstr "" @@ -246,8 +248,12 @@ msgstr "" msgid "Set the parameters for Calibre, in JSON dictionary format." msgstr "" +#: application/templates/adv_delivernow.html:3 +msgid "Deliver now" +msgstr "" + #: application/templates/adv_delivernow.html:9 -msgid "Deliver selected recipes now" +msgid "Deliver selected recipes now." msgstr "" #: application/templates/adv_delivernow.html:12 @@ -330,8 +336,8 @@ msgstr "" #: application/templates/adv_whitelist.html:15 #, python-format msgid "" -"Emails sent to %(name)sxxx@appid.appspotmail.com will be transferred to " -"your email." +"Emails sent to %(name)sxxx@%(mailHost)s will be transferred to your " +"kindle email." msgstr "" #: application/templates/adv_whitelist.html:27 @@ -490,7 +496,7 @@ msgstr "" msgid "Verified" msgstr "" -#: application/templates/base.html:59 application/view/login.py:72 +#: application/templates/base.html:59 application/view/login.py:78 #: application/view/share.py:154 msgid "The username does not exist or password is wrong." msgstr "" @@ -594,7 +600,7 @@ msgstr "" #: application/templates/base.html:84 application/view/admin.py:86 #: application/view/admin.py:165 application/view/admin.py:205 -#: application/view/login.py:213 application/view/login.py:273 +#: application/view/login.py:219 application/view/login.py:279 msgid "The two new passwords are dismatch." msgstr "" @@ -606,7 +612,7 @@ msgstr "" msgid "Account added successfully." msgstr "" -#: application/templates/base.html:87 application/view/login.py:123 +#: application/templates/base.html:87 application/view/login.py:129 msgid "login required" msgstr "" @@ -626,39 +632,62 @@ msgstr "" msgid "Translator" msgstr "" -#: application/templates/base.html:112 application/templates/home.html:12 +#: application/templates/base.html:91 +msgid "Upl" +msgstr "" + +#: application/templates/base.html:92 +msgid "Sep" +msgstr "" + +#: application/templates/base.html:93 +msgid "Log" +msgstr "" + +#: application/templates/base.html:94 +msgid "Emb" +msgstr "" + +#: application/templates/base.html:95 +msgid "" +"The test email has been successfully sent to [{0}]. Please check your " +"inbox or spam folder to confirm its delivery. Depending on your email " +"server, there may be a slight delay." +msgstr "" + +#: application/templates/base.html:117 application/templates/home.html:12 msgid "Logout" msgstr "" -#: application/templates/base.html:114 application/templates/home.html:17 +#: application/templates/base.html:119 application/templates/home.html:17 #: application/templates/login.html:3 application/templates/login.html:19 #: application/templates/login.html:29 msgid "Login" msgstr "" -#: application/templates/base.html:116 application/templates/signup.html:3 +#: application/templates/base.html:121 application/templates/signup.html:3 #: application/templates/signup.html:19 application/templates/signup.html:43 msgid "Signup" msgstr "" -#: application/templates/base.html:136 application/templates/home.html:11 +#: application/templates/base.html:141 application/templates/home.html:11 #: application/templates/my.html:3 msgid "Feeds" msgstr "" -#: application/templates/base.html:137 application/templates/setting.html:3 +#: application/templates/base.html:142 application/templates/setting.html:3 msgid "Settings" msgstr "" -#: application/templates/base.html:138 application/templates/logs.html:3 +#: application/templates/base.html:143 application/templates/logs.html:3 msgid "Logs" msgstr "" -#: application/templates/base.html:140 +#: application/templates/base.html:145 msgid "Advanced" msgstr "" -#: application/templates/base.html:141 application/templates/library.html:3 +#: application/templates/base.html:146 application/templates/library.html:3 msgid "Shared" msgstr "" @@ -808,8 +837,8 @@ msgstr "" msgid "Search" msgstr "" -#: application/templates/login.html:34 application/view/login.py:190 -#: application/view/login.py:197 +#: application/templates/login.html:34 application/view/login.py:196 +#: application/view/login.py:203 msgid "" "The website does not allow registration. You can ask the owner for an " "account." @@ -1055,12 +1084,16 @@ msgstr "" msgid "Personal Document Settings" msgstr "" -#: application/templates/setting.html:239 +#: application/templates/setting.html:239 application/view/setting.py:130 msgid "" "You have not yet set up your email address. Please go to the 'Admin' page" " to add your email address firstly." msgstr "" +#: application/templates/setting.html:246 +msgid "Send Test Email" +msgstr "" + #: application/templates/signup.html:38 msgid "Invitation code" msgstr "" @@ -1069,7 +1102,7 @@ msgstr "" msgid "User account" msgstr "" -#: application/view/admin.py:51 application/view/adv.py:355 +#: application/view/admin.py:51 application/view/adv.py:353 #: application/view/setting.py:96 application/view/subscribe.py:241 msgid "Settings Saved!" msgstr "" @@ -1085,23 +1118,23 @@ msgid "You do not have sufficient privileges." msgstr "" #: application/view/admin.py:82 application/view/admin.py:152 -#: application/view/login.py:209 application/view/login.py:238 +#: application/view/login.py:215 application/view/login.py:244 #: application/view/setting.py:61 application/view/setting.py:63 #: application/view/setting.py:65 application/view/share.py:36 msgid "Some parameters are missing or wrong." msgstr "" #: application/view/admin.py:84 application/view/login.py:40 -#: application/view/login.py:215 +#: application/view/login.py:221 msgid "The username includes unsafe chars." msgstr "" -#: application/view/admin.py:88 application/view/login.py:217 +#: application/view/admin.py:88 application/view/login.py:223 msgid "Already exist the username." msgstr "" #: application/view/admin.py:93 application/view/admin.py:171 -#: application/view/admin.py:198 application/view/login.py:264 +#: application/view/admin.py:198 application/view/login.py:270 msgid "The password includes non-ascii chars." msgstr "" @@ -1134,83 +1167,83 @@ msgstr "" msgid "Changes saved successfully." msgstr "" +#: application/view/adv.py:79 application/view/adv.py:80 #: application/view/adv.py:81 application/view/adv.py:82 #: application/view/adv.py:83 application/view/adv.py:84 #: application/view/adv.py:85 application/view/adv.py:86 -#: application/view/adv.py:87 application/view/adv.py:88 -#: application/view/adv.py:89 +#: application/view/adv.py:87 msgid "Append hyperlink '{}' to article" msgstr "" +#: application/view/adv.py:79 application/view/adv.py:80 #: application/view/adv.py:81 application/view/adv.py:82 -#: application/view/adv.py:83 application/view/adv.py:84 msgid "Save to {}" msgstr "" -#: application/view/adv.py:81 +#: application/view/adv.py:79 msgid "evernote" msgstr "" -#: application/view/adv.py:82 +#: application/view/adv.py:80 msgid "wiz" msgstr "" -#: application/view/adv.py:83 +#: application/view/adv.py:81 msgid "pocket" msgstr "" -#: application/view/adv.py:84 +#: application/view/adv.py:82 msgid "instapaper" msgstr "" +#: application/view/adv.py:83 application/view/adv.py:84 #: application/view/adv.py:85 application/view/adv.py:86 -#: application/view/adv.py:87 application/view/adv.py:88 msgid "Share on {}" msgstr "" -#: application/view/adv.py:85 +#: application/view/adv.py:83 msgid "weibo" msgstr "" -#: application/view/adv.py:86 +#: application/view/adv.py:84 msgid "facebook" msgstr "" -#: application/view/adv.py:88 +#: application/view/adv.py:86 msgid "tumblr" msgstr "" -#: application/view/adv.py:89 +#: application/view/adv.py:87 msgid "Open in browser" msgstr "" -#: application/view/adv.py:357 +#: application/view/adv.py:355 msgid "The format is invalid." msgstr "" -#: application/view/adv.py:390 +#: application/view/adv.py:388 msgid "Authorization Error!
{}" msgstr "" -#: application/view/adv.py:413 +#: application/view/adv.py:411 msgid "Success authorized by Pocket!" msgstr "" -#: application/view/adv.py:419 +#: application/view/adv.py:417 msgid "" "Failed to request authorization of Pocket!
See details " "below:

{}" msgstr "" -#: application/view/adv.py:429 +#: application/view/adv.py:427 msgid "Request type [{}] unsupported" msgstr "" -#: application/view/adv.py:444 +#: application/view/adv.py:442 msgid "The Instapaper service encountered an error. Please try again later." msgstr "" -#: application/view/deliver.py:67 application/view/login.py:160 +#: application/view/deliver.py:67 application/view/login.py:166 #: application/view/share.py:40 msgid "The username does not exist or the email is empty." msgstr "" @@ -1246,61 +1279,61 @@ msgstr "" msgid "The len of username reached the limit of 25 chars." msgstr "" -#: application/view/login.py:73 +#: application/view/login.py:79 msgid "Forgot password?" msgstr "" -#: application/view/login.py:139 application/view/login.py:275 +#: application/view/login.py:145 application/view/login.py:281 msgid "The token is wrong or expired." msgstr "" -#: application/view/login.py:142 +#: application/view/login.py:148 msgid "Please input the correct username and email to reset password." msgstr "" -#: application/view/login.py:144 +#: application/view/login.py:150 msgid "The email of account '{name}' is {email}." msgstr "" -#: application/view/login.py:165 +#: application/view/login.py:171 msgid "Reset password success, Please close this page and login again." msgstr "" -#: application/view/login.py:168 +#: application/view/login.py:174 msgid "The email you input is not associated with this account." msgstr "" -#: application/view/login.py:179 +#: application/view/login.py:185 msgid "The link to reset your password has been sent to your email." msgstr "" -#: application/view/login.py:180 +#: application/view/login.py:186 msgid "Please check your email inbox within 24 hours." msgstr "" -#: application/view/login.py:211 +#: application/view/login.py:217 msgid "The invitation code is invalid." msgstr "" -#: application/view/login.py:219 +#: application/view/login.py:225 msgid "" "Failed to create an account. Please contact the administrator for " "assistance." msgstr "" -#: application/view/login.py:229 +#: application/view/login.py:235 msgid "Successfully created account." msgstr "" -#: application/view/login.py:240 +#: application/view/login.py:246 msgid "Reset KindleEar password" msgstr "" -#: application/view/login.py:241 +#: application/view/login.py:247 msgid "This is an automated email. Please do not reply to it." msgstr "" -#: application/view/login.py:242 +#: application/view/login.py:248 msgid "You can click the following link to reset your KindleEar password." msgstr "" @@ -1312,107 +1345,107 @@ msgstr "" msgid "Title is requied!" msgstr "" -#: application/view/setting.py:123 +#: application/view/setting.py:153 msgid "Chinese" msgstr "" -#: application/view/setting.py:124 +#: application/view/setting.py:154 msgid "English" msgstr "" -#: application/view/setting.py:125 +#: application/view/setting.py:155 msgid "French" msgstr "" -#: application/view/setting.py:126 +#: application/view/setting.py:156 msgid "Spanish" msgstr "" -#: application/view/setting.py:127 +#: application/view/setting.py:157 msgid "Portuguese" msgstr "" -#: application/view/setting.py:128 +#: application/view/setting.py:158 msgid "German" msgstr "" -#: application/view/setting.py:129 +#: application/view/setting.py:159 msgid "Italian" msgstr "" -#: application/view/setting.py:130 +#: application/view/setting.py:160 msgid "Japanese" msgstr "" -#: application/view/setting.py:131 +#: application/view/setting.py:161 msgid "Russian" msgstr "" -#: application/view/setting.py:132 +#: application/view/setting.py:162 msgid "Turkish" msgstr "" -#: application/view/setting.py:133 +#: application/view/setting.py:163 msgid "Korean" msgstr "" -#: application/view/setting.py:134 +#: application/view/setting.py:164 msgid "Arabic" msgstr "" -#: application/view/setting.py:135 +#: application/view/setting.py:165 msgid "Czech" msgstr "" -#: application/view/setting.py:136 +#: application/view/setting.py:166 msgid "Dutch" msgstr "" -#: application/view/setting.py:137 +#: application/view/setting.py:167 msgid "Greek" msgstr "" -#: application/view/setting.py:138 +#: application/view/setting.py:168 msgid "Hindi" msgstr "" -#: application/view/setting.py:139 +#: application/view/setting.py:169 msgid "Malaysian" msgstr "" -#: application/view/setting.py:140 +#: application/view/setting.py:170 msgid "Bengali" msgstr "" -#: application/view/setting.py:141 +#: application/view/setting.py:171 msgid "Persian" msgstr "" -#: application/view/setting.py:142 +#: application/view/setting.py:172 msgid "Urdu" msgstr "" -#: application/view/setting.py:143 +#: application/view/setting.py:173 msgid "Swahili" msgstr "" -#: application/view/setting.py:144 +#: application/view/setting.py:174 msgid "Vietnamese" msgstr "" -#: application/view/setting.py:145 +#: application/view/setting.py:175 msgid "Punjabi" msgstr "" -#: application/view/setting.py:146 +#: application/view/setting.py:176 msgid "Javanese" msgstr "" -#: application/view/setting.py:147 +#: application/view/setting.py:177 msgid "Tagalog" msgstr "" -#: application/view/setting.py:148 +#: application/view/setting.py:178 msgid "Hausa" msgstr "" diff --git a/tools/nginx/gunicorn.conf.py b/tools/nginx/gunicorn.conf.py index b4e01458..5b138bd3 100644 --- a/tools/nginx/gunicorn.conf.py +++ b/tools/nginx/gunicorn.conf.py @@ -1,11 +1,13 @@ # gunicorn.conf.py pythonpath = "/home/ubuntu/.local/lib/python3.10/site-packages" bind = "127.0.0.1:8000" -workers = 2 +workers = 1 +threads = 3 accesslog = "/home/ubuntu/log/gunicorn.access.log" errorlog = "/home/ubuntu/log/gunicorn.error.log" capture_output = True +enable_stdio_inheritance = True loglevel = "info" -preload_app = True +#preload_app = True #certfile = 'cert.pem' #keyfile = 'key.pem' diff --git a/tools/nginx/gunicorn.service b/tools/nginx/gunicorn.service index 0fe92594..a9b9be7f 100644 --- a/tools/nginx/gunicorn.service +++ b/tools/nginx/gunicorn.service @@ -7,5 +7,6 @@ User=ubuntu WorkingDirectory=/home/ubuntu/site/kindleear ExecStart=/home/ubuntu/.local/bin/gunicorn -c /home/ubuntu/site/kindleear/tools/nginx/gunicorn.conf.py main:app Restart=on-failure +Environment="PYTHONUNBUFFERED=True" [Install] WantedBy=multi-user.target \ No newline at end of file