Skip to content

chore(i18n): add zh_CN translations for the print preparation tip - #422

Open
Resurgamz wants to merge 1 commit into
linuxdeepin:release/snipefrom
Resurgamz:agent/pms-bug-bot/3dfd7276ad6f
Open

Resurgamz wants to merge 1 commit into
linuxdeepin:release/snipefrom
Resurgamz:agent/pms-bug-bot/3dfd7276ad6f

Conversation

@Resurgamz

@Resurgamz Resurgamz commented Oct 19, 2026 •

Copy link
Copy Markdown

Translations only.

Adds the zh_CN translation for the user-facing string introduced by the asynchronous PDF print conversion in #421:

  • Preparing the content for printing. This may take a while. Please wait…

Related to #421 (the source string is added there).

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Resurgamz

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

@sourcery-ai

sourcery-ai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR updates both translation catalogs with the two user-facing strings introduced by asynchronous PDF print conversion, adding Simplified Chinese translations while preserving the English source entries in the base catalog.

File-Level Changes

Change Details Files
Add Simplified Chinese translations for the asynchronous print-preparation status and error messages.
  • Add the two print-preparation message entries with source locations.
  • Provide localized zh_CN text for the waiting and retry prompts.
translations/deepin-reader_zh_CN.ts
Register the new print-preparation messages in the base translation catalog without translating them.
  • Add the two source strings and source locations to the catalog.
  • Keep the base-language entries identical to the English source text.
translations/deepin-reader.ts

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 reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Add the zh_CN translation for the string introduced by the asynchronous
PDF print conversion ("Preparing the content for printing. This may
take a while. Please wait…").

Log: 补充打印等待提示文案的中文翻译
Bug: https://pms.uniontech.com/bug-view-379067.html
@Resurgamz
Resurgamz force-pushed the agent/pms-bug-bot/3dfd7276ad6f branch from bace031 to 7587df2 Compare October 19, 2026 10:10
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 98 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 总体评分 98 分,大于 70 分通过阈值,代码质量符合要求。本次变更为 Qt 翻译文件(.ts)的简体中文本地化更新,为异步 PDF 打印转换功能添加了打印准备提示的 zh_CN 翻译,无安全漏洞,无性能影响。PR 描述与实际变更存在轻微不一致(声称添加两条字符串翻译但 diff 仅包含一条)。

🔍 详细分析

1. 语法逻辑 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: XML 结构正确,message 块遵循 Qt .ts 文件格式规范,location/source/translation 元素完整,两个文件的 location 引用一致(DocSheet.cpp line 2176)。


2. 代码质量 ✅

评价: 优秀 ✅ 通过

潜在问题:

  1. translations/deepin-reader.ts:0 - PR 描述声称添加两条字符串翻译('Preparing the content for printing...' 和 'Failed to prepare the content for printing...'),但 diff 仅包含第一条的翻译,第二条 'Failed to prepare the content for printing. Please try again.' 的 zh_CN 翻译缺失

建议: 确认 PR #421 是否同时引入了两条待翻译字符串。如确实引入了两条,请补充 'Failed to prepare the content for printing. Please try again.' 的 zh_CN 翻译(建议译为'准备打印内容失败,请重试。');若仅引入了一条,请更新 PR 描述以保持一致。


3. 代码性能 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 翻译文件变更无性能影响,仅增加静态文本条目,无需优化。


4. 代码安全 🔒

评价: 优秀 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: 翻译文件仅包含静态文本内容,无安全风险,无需安全加固。


💡 改进建议代码示例

<!-- 建议在 translations/deepin-reader.ts 中补充缺失的第二条字符串 -->
<message>
    <location filename="../reader/uiframe/DocSheet.cpp" line="XXXX"/>
    <source>Failed to prepare the content for printing. Please try again.</source>
    <translation>Failed to prepare the content for printing. Please try again.</translation>
</message>

<!-- 对应在 translations/deepin-reader_zh_CN.ts 中补充中文翻译 -->
<message>
    <location filename="../reader/uiframe/DocSheet.cpp" line="XXXX" />
    <source>Failed to prepare the content for printing. Please try again.</source>
    <translation>准备打印内容失败,请重试。</translation>
</message>

本报告由 AI 代码审查工具自动生成

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.

2 participants