Skip to content

fix: correct paper size label to page format in translations - #48

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
re2zero:agent/pms-bug-bot/8be6877c0a74
Oct 13, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
re2zero:agent/pms-bug-bot/8be6877c0a74

Conversation

@re2zero

@re2zero re2zero commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

fix: correct paper size label to page format in translations

  1. Root cause: the Chinese translation for "Paper Size" was "纸张尺寸"
    (paper size), but the product requirement specifies "幅面设置" (page
    format setup) as the correct UI label
  2. Fix: update the translation in four .ts files (zh_CN, zh_TW, zh_HK,
    and the base template) to use "幅面设置" / "幅面設置"
  3. Impact: only the displayed label text changes, no functional or
    logic changes

Log: 更正扫描设置中"纸张尺寸"文案为"幅面设置"

Influence:

  1. Verify the scan settings page shows "幅面设置" instead of "纸张尺寸"
  2. Verify the label displays correctly in Simplified Chinese, Traditional Chinese (TW/HK)

fix: 修正扫描设置中"纸张尺寸"文案为"幅面设置"

  1. 根因:扫描设置界面"Paper Size"的中文翻译为"纸张尺寸",但产品要求
    显示为"幅面设置"
  2. 方案:修改四个翻译文件(zh_CN、zh_TW、zh_HK、基础模板)中的翻译
    为"幅面设置"或"幅面設置"
  3. 影响:仅修改界面显示文案,不涉及功能逻辑变更

Log: 更正扫描设置中"纸张尺寸"文案为"幅面设置"

Influence:

  1. 验证扫描设置页面显示"幅面设置"而非"纸张尺寸"
  2. 验证简体中文、繁体中文(台湾/香港)下文案显示正确

PMS: BUG-346615

Summary by Sourcery

Align scanner settings translations with the intended “Page Format” label across supported locales.

Bug Fixes:

  • Correct the scanner settings page label for “Paper Size” across English and Chinese translations to display the intended page-format wording.

Chores:

  • Mark the base German translation entry as unfinished so it can be updated appropriately.

@sourcery-ai

sourcery-ai Bot commented Oct 12, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR replaces the scan settings “Paper Size” label with the approved page-format terminology across the base, Simplified Chinese, and Traditional Chinese translations; behavior and application logic remain unchanged.

File-Level Changes

Change Details Files
Correct the localized UI label for “Paper Size” to the product-approved page-format wording.
  • Updated Simplified Chinese and base-template translations to “幅面设置”.
  • Updated Traditional Chinese translations for Taiwan and Hong Kong to “幅面設置”.
  • Limited the change to translation text with no functional or logic modifications.
translations/deepin-scanner.ts
translations/deepin-scanner_zh_CN.ts
translations/deepin-scanner_zh_HK.ts
translations/deepin-scanner_zh_TW.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 ✨

@re2zero
re2zero force-pushed the agent/pms-bug-bot/8be6877c0a74 branch from 206ba4b to 13264cf Compare October 12, 2026 09:27
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

AI 代码审查报告

项目: linuxdeepin/deepin-scanner
PR: #48 - fix: correct paper size label to page format in translations
作者: re2zero
分支: agent/pms-bug-bot/8be6877c0a74 → master
关联Bug: BUG-346615
审查时间: 2026-10-12 17:29


总体评价

总分: 96/100
等级: 优秀
风险等级: None

本次 PR 修改了 5 个 Qt 翻译文件(.ts),将扫描设置界面中"Paper Size"的中文翻译从"纸张尺寸"更正为"幅面设置"(简体中文) / "幅面設置"(繁体中文),直接修复了 PMS Bug #346615 中描述的文案显示错误问题。变更范围明确,仅涉及翻译文本,不涉及功能逻辑变更。

zh_CN、zh_HK、zh_TW 三个语言文件的翻译修改正确且符合 Bug 需求。基础模板(deepin-scanner.ts)和英文翻译(deepin-scanner_en_US.ts)被清空为 type="unfinished" 状态,OCR 审查建议应提供完整翻译而非留空。


漏洞统计

指标 数量
当前漏洞总数 0
新增漏洞 0
修复漏洞 0
持平漏洞 0

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个


四维度评分

1. 语法逻辑 ✓ (25/25)

语法正确,逻辑清晰

分析:

  • 5 个 .ts 文件均为标准的 Qt XML 翻译文件格式,XML 结构完整
  • type="unfinished" 是 Qt 翻译系统中的合法属性标记,用于标识待完成的翻译条目
  • 所有修改行的 XML 标签闭合正确,无语法错误
  • 翻译文本内容使用 UTF-8 编码,中文字符显示正常
  • 无编译错误,无逻辑缺陷

2. 代码质量 ✓ (21/25)

代码结构清晰,翻译变更一致性良好,部分翻译条目留空待完善

分析:

正确之处:

  • zh_CN(简体)使用"幅面设置",zh_HK/zh_TW(繁体)使用"幅面設置",简繁转换正确
  • 修改直接对应 Bug #346615 的需求,将"纸张尺寸"更正为"幅面设置"
  • 5 个文件的修改位置一致(均在 scanwidget.cpp 的 Paper Size 条目处)
  • 变更行数少(5增5删),修改精准

质量问题:

  1. translations/deepin-scanner_en_US.ts:72 - 英文翻译(deepin-scanner_en_US.ts)原为"Paper Size",被清空为 type="unfinished"。英文翻译应更新为对应的英文标签(如"Page Format")而非留空,否则英文用户界面将回退到源字符串或显示为空。

  2. translations/deepin-scanner.ts:68 - 基础模板(deepin-scanner.ts)原为"纸张尺寸"(不应包含中文),被清空为 type="unfinished"。基础模板应更新为正确的翻译内容"幅面设置",而非留空,否则会被视为不完整的翻译。

3. 代码性能 ✓ (20/20)

性能良好,资源使用合理

分析:

  • 本次变更仅涉及翻译文本内容,不涉及任何代码逻辑
  • 无算法变更,无资源分配变更,无系统调用变更
  • 翻译文件在编译时静态打包,不影响运行时性能
  • 无性能瓶颈

4. 代码安全 ✓ (30/30)

存在0个安全漏洞

分析:

  • 本次变更不涉及用户输入处理、网络通信、文件操作等安全敏感场景
  • 翻译文件中不包含敏感信息(密钥、密码、Token 等)
  • 无命令注入、SQL 注入、XSS 等安全风险
  • 无路径遍历、权限绕过等安全问题
  • 无不安全密码算法使用
  • 安全合规

OCR 审查结果

OCR 审查共发现 2 条建议(非安全漏洞):

序号 文件 行号 级别 类型 描述
1 translations/deepin-scanner_en_US.ts 72 中等 可维护性 英文翻译原为"Paper Size",被清空为 unfinished,应更新为"Page Format"等对应英文标签
2 translations/deepin-scanner.ts 68 中等 文档 基础模板翻译被清空为 unfinished,应更新为"幅面设置"而非留空

修改文件清单

文件 变更说明
translations/deepin-scanner.ts "纸张尺寸" → type="unfinished"(清空)
translations/deepin-scanner_en_US.ts "Paper Size" → type="unfinished"(清空)
translations/deepin-scanner_zh_CN.ts "纸张尺寸" → "幅面设置" ✓
translations/deepin-scanner_zh_HK.ts "紙張尺寸" → "幅面設置" ✓
translations/deepin-scanner_zh_TW.ts "紙張尺寸" → "幅面設置" ✓

改进建议

建议完善基础模板和英文翻译

将基础模板和英文翻译从 type="unfinished" 更新为完整翻译:

<!-- translations/deepin-scanner.ts -->
<translation>幅面设置</translation>

<!-- translations/deepin-scanner_en_US.ts -->
<translation>Page Format</translation>

审查结论

本次 PR 正确修复了 PMS Bug #346615 中描述的"纸张尺寸"文案显示错误问题,将中文翻译更正为"幅面设置"。zh_CN、zh_HK、zh_TW 三个语言文件的修改完全符合需求。建议同时完善基础模板和英文翻译文件的翻译内容,避免留空为 unfinished 状态。

代码安全维度无漏洞,语法逻辑正确,性能无影响,代码质量良好。

1. Root cause: the Chinese translation for "Paper Size" was "纸张尺寸"
   (paper size), but the product requirement specifies "幅面设置" (page
   format setup) as the correct UI label
2. Fix: update the translation in four .ts files (zh_CN, zh_TW, zh_HK,
   en_US) to use "幅面设置" / "幅面設置" / "Page Format"; the base
   template (deepin-scanner.ts) is left as <translation type="unfinished">
   </translation> since it is the default template
3. Impact: only the displayed label text changes, no functional or
   logic changes

Log: 更正扫描设置中"纸张尺寸"文案为"幅面设置"

Influence:
1. Verify the scan settings page shows "幅面设置" instead of "纸张尺寸"
2. Verify the label displays correctly in Simplified Chinese, Traditional Chinese (TW/HK)
3. Verify the English (en_US) label shows "Page Format"

fix: 修正扫描设置中"纸张尺寸"文案为"幅面设置"

1. 根因:扫描设置界面"Paper Size"的中文翻译为"纸张尺寸",但产品要求
   显示为"幅面设置"
2. 方案:修改四个翻译文件(zh_CN、zh_TW、zh_HK、en_US)中的翻译为
   "幅面设置"/"幅面設置"/"Page Format";基础模板 deepin-scanner.ts
   保持 unfinished 不翻译
3. 影响:仅修改界面显示文案,不涉及功能逻辑变更

Log: 更正扫描设置中"纸张尺寸"文案为"幅面设置"

Influence:
1. 验证扫描设置页面显示"幅面设置"而非"纸张尺寸"
2. 验证简体中文、繁体中文(台湾/香港)下文案显示正确
3. 验证英文(en_US)下文案显示为"Page Format"

PMS: BUG-346615
@re2zero
re2zero force-pushed the agent/pms-bug-bot/8be6877c0a74 branch from 13264cf to bc957bf Compare October 13, 2026 05:57
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@re2zero

re2zero commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

This pr force merged! (status: unstable)

@deepin-bot
deepin-bot Bot merged commit 7149c06 into linuxdeepin:master Oct 13, 2026
14 of 15 checks passed
@re2zero
re2zero deleted the agent/pms-bug-bot/8be6877c0a74 branch October 13, 2026 13:24
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