Skip to content

fix: add fallback md files to support non-p/d editions#288

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
LiHua000:master
Jun 30, 2026
Merged

fix: add fallback md files to support non-p/d editions#288
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
LiHua000:master

Conversation

@LiHua000

@LiHua000 LiHua000 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Log: as title

Bug: https://pms.uniontech.com/bug-view-365667.html

Summary by Sourcery

Documentation:

  • Introduce user manuals for Document Viewer in Simplified Chinese, Traditional Chinese (Taiwan), Traditional Chinese (Hong Kong), and English locales.

@sourcery-ai

sourcery-ai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds localized fallback documentation markdown files for the Deepin Document Viewer (deepin-reader) so that non-Pro/Desktop editions can load help content without relying on p/d-specific assets.

File-Level Changes

Change Details Files
Introduce full-featured Document Viewer help content in Simplified Chinese, English, Traditional Chinese (Taiwan), and Traditional Chinese (Hong Kong) as standalone markdown assets.
  • Create zh_CN markdown manual describing Document Viewer features, operations, and UI elements, referencing shared SVG icons and screenshots.
  • Create en_US markdown manual with equivalent structure and content, localized terminology and shortcuts, ensuring internal links and image paths match the zh_CN version.
  • Create zh_TW markdown manual tailored for Taiwan locale with Traditional Chinese wording and minor feature notes (e.g., printer advanced settings screenshot).
  • Create zh_HK markdown manual tailored for Hong Kong locale with Traditional Chinese wording and slight terminology differences, aligned structurally with other manuals.
  • Ensure all manuals reference common assets (../common/.svg and fig/.png) and use consistent section anchors for cross-linking within the document.
assets/deepin-reader/document-viewer/zh_CN/document-viewer.md
assets/deepin-reader/document-viewer/en_US/document-viewer.md
assets/deepin-reader/document-viewer/zh_TW/document-viewer.md
assets/deepin-reader/document-viewer/zh_HK/document-viewer.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="assets/deepin-reader/document-viewer/zh_TW/document-viewer.md" line_range="144-147" />
<code_context>
+
+1. 在文件查看器介面,開啟一個文件。
+2. 在文件頁面單擊滑鼠右鍵,選擇 **搜尋** 或使用快捷鍵 **Ctrl + F** 打開搜尋視窗。
+3. 在搜尋框中,单击![search](../common/search.svg),输入关键字。
+4. 按下鍵盤上的 **Enter** 鍵進行搜尋。
+
</code_context>
<issue_to_address>
**issue (typo):** Use Traditional Chinese characters consistently (單擊/輸入關鍵字).

This sentence uses Simplified Chinese in an otherwise Traditional Chinese document; please update it to "在搜尋框中,單擊![search](../common/search.svg),輸入關鍵字。" for consistency.

```suggestion
目前搜尋只針對目前分頁。

1. 在文件查看器介面,開啟一個文件。
2. 在文件頁面單擊滑鼠右鍵,選擇 **搜尋** 或使用快捷鍵 **Ctrl + F** 打開搜尋視窗。
3. 在搜尋框中,單擊![search](../common/search.svg),輸入關鍵字。
4. 按下鍵盤上的 **Enter** 鍵進行搜尋。
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +144 to +147
目前搜尋只針對目前分頁。

1. 在文件查看器介面,開啟一個文件。
2. 在文件頁面單擊滑鼠右鍵,選擇 **搜尋** 或使用快捷鍵 **Ctrl + F** 打開搜尋視窗。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (typo): Use Traditional Chinese characters consistently (單擊/輸入關鍵字).

This sentence uses Simplified Chinese in an otherwise Traditional Chinese document; please update it to "在搜尋框中,單擊search,輸入關鍵字。" for consistency.

Suggested change
目前搜尋只針對目前分頁。
1. 在文件查看器介面,開啟一個文件。
2. 在文件頁面單擊滑鼠右鍵,選擇 **搜尋** 或使用快捷鍵 **Ctrl + F** 打開搜尋視窗。
目前搜尋只針對目前分頁。
1. 在文件查看器介面,開啟一個文件。
2. 在文件頁面單擊滑鼠右鍵,選擇 **搜尋** 或使用快捷鍵 **Ctrl + F** 打開搜尋視窗。
3. 在搜尋框中,單擊![search](../common/search.svg),輸入關鍵字。
4. 按下鍵盤上的 **Enter** 鍵進行搜尋。

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LiHua000, lzwind

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:95分

■ 【总体评价】

文档实现了多语言使用手册的全面覆盖,但存在局部语言混杂与排版序号错误
逻辑正确但因语言混用和序号跳号扣5分

■ 【详细分析】

  • 1.语法逻辑(完全正确)✓

Markdown 语法结构正确,各级标题、列表、引用块和图片链接格式均符合规范,无解析错误
建议:保持当前的 Markdown 书写规范

  • 2.代码质量(一般)✕

文档整体结构清晰,但存在两处明显的排版与翻译质量问题。在 zh_HK/document-viewer.md 的幻灯片放映章节中,操作步骤序号从 1 直接跳到了 3,缺失了步骤 2;在 zh_TW/document-viewer.md 的搜尋章节第 3 步中,出现了简体中文混用情况("单击search,输入关键字"),未使用繁体用词
潜在问题:序号错误会误导用户操作步骤;繁简混用影响繁体中文用户的阅读体验和文档专业性
建议:修正 zh_HK 文件中幻灯片放映章节的序号,将 3、4 改为 2、3;修正 zh_TW 文件搜尋章节中的简体字为繁体字

  • 3.代码性能(无性能问题)✓

纯静态 Markdown 文档,不涉及算法复杂度、资源占用或系统调用,无任何性能瓶颈
建议:无需优化

  • 4.代码安全(存在0个安全漏洞)✓

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
纯文本 Markdown 文档不包含可执行代码、外部脚本引入或动态数据加载,无攻击面

  • 建议:继续保持静态文档的安全发布流程

■ 【改进建议代码示例】

diff --git a/assets/deepin-reader/document-viewer/zh_HK/document-viewer.md b/assets/deepin-reader/document-viewer/zh_HK/document-viewer.md
--- a/assets/deepin-reader/document-viewer/zh_HK/document-viewer.md
+++ b/assets/deepin-reader/document-viewer/zh_HK/document-viewer.md
@@ -198,8 +198,8 @@
 
 1. 在文檔查看器界面,單擊鼠標右鍵選擇 **幻燈片放映**,文檔頁面將以幻燈片形式進行播放。
-3. 單擊 ![play](../common/previous.svg)![play](../common/next.svg) 切換文檔頁面,也可以單擊 ![play](../common/suspend_normal.svg) 停止播放。
-4. 按下鍵盤上的 **Esc** 鍵退出播放。
+2. 單擊 ![play](../common/previous.svg)![play](../common/next.svg) 切換文檔頁面,也可以單擊 ![play](../common/suspend_normal.svg) 停止播放。
+3. 按下鍵盤上的 **Esc** 鍵退出播放。
 
diff --git a/assets/deepin-reader/document-viewer/zh_TW/document-viewer.md b/assets/deepin-reader/document-viewer/zh_TW/document-viewer.md
--- a/assets/deepin-reader/document-viewer/zh_TW/document-viewer.md
+++ b/assets/deepin-reader/document-viewer/zh_TW/document-viewer.md
@@ -151,7 +151,7 @@
 2. 在文件頁面單擊滑鼠右鍵,選擇 **搜尋** 或使用快捷鍵 **Ctrl + F** 打開搜尋視窗。
-3. 在搜尋框中,单击![search](../common/search.svg),输入关键字。
+3. 在搜尋框中,單擊![search](../common/search.svg),輸入關鍵字。
 4. 按下鍵盤上的 **Enter** 鍵進行搜尋。

@LiHua000

Copy link
Copy Markdown
Contributor Author

/merge

@deepin-bot

deepin-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

This pr cannot be merged! (status: unstable)

@LiHua000

Copy link
Copy Markdown
Contributor Author

/merge

@deepin-bot deepin-bot Bot merged commit 0755855 into linuxdeepin:master Jun 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants