Skip to content

Commit

Permalink
adding share links after translating
Browse files Browse the repository at this point in the history
  • Loading branch information
cdhigh committed Jul 31, 2024
1 parent 93de4ef commit 5b066ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions application/lib/calibre/web/feeds/news.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,9 +1120,6 @@ def _postprocess_html(self, soup, first_fetch, job_info):
if not h_tag.get_text(strip=True):
h_tag.string = title

#job_info.article.url才是真实的url,对于内嵌内容RSS,job_info.url为一个临时文件名
self.append_share_links(soup, url=job_info.article.url)

ans = self.postprocess_html(soup, first_fetch)

# Nuke HTML5 tags
Expand All @@ -1142,6 +1139,10 @@ def _postprocess_html(self, soup, first_fetch, job_info):
if self.translator.get('enable') and (tts_enable != 'audio_only'):
self.translate_html(soup, title)

#添加分享链接,需要在翻译之后,避免翻译新添加的链接文字
#job_info.article.url才是真实的url,对于内嵌内容RSS,job_info.url为一个临时文件名
self.append_share_links(soup, url=job_info.article.url)

if job_info:
try:
if job_info.article:
Expand Down
6 changes: 3 additions & 3 deletions docs/Chinese/reader.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ KindleEar支持邮件推送和在线阅读,内置一个为电子墨水屏进
### 使用词典
1. 为了使用词典功能,首先在 "高级设置"/"词典" 选项页里面配置需要使用的翻译引擎和语种。

2. 在阅读时遇到不认识的单词:
2.1. 如果已经激活左上角词典模式(默认),则点击页面左上角进入查词模式;
2.2. 打开菜单,点击 "词典" 图标;
2. 在阅读时遇到不认识的单词:
2.1. 如果已经激活左上角词典模式(默认),则点击页面左上角进入查词模式;
2.2. 打开菜单,点击 "词典" 图标;
任意一种方式进入查词模式后,页面左上角会出现一个词典角标,点击需要查询的单词即可,查词后会自动退出查词模式。

3. 点击弹出的查词框内任意地方关闭查词框。

0 comments on commit 5b066ab

Please sign in to comment.