Skip to content

fix: update shortcut translation entries - #123

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
yixinshark:fix/update-shortcut-translations
Aug 3, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
yixinshark:fix/update-shortcut-translations

Conversation

@yixinshark

@yixinshark yixinshark commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • synchronize application shortcut translation entries with current definitions
  • complete Simplified Chinese window management and accessibility translations
  • add en_US metadata to English TS catalogs

Test plan

  • xmllint --noout on all three modified TS files
  • git diff --check

Summary by Sourcery

Align shortcut translation catalogs with current shortcut definitions and metadata.

Bug Fixes:

  • Complete and correct Simplified Chinese translations for window management and accessibility shortcuts.

Enhancements:

  • Add en_US language metadata to English TS translation catalogs for app shortcuts and keybindings.
  • Update TS XML headers for consistency and proper encoding in the zh_CN shortcut translations.

Synchronize shortcut translation catalogs with the current application shortcut definitions.
- Add missing window management and accessibility entries to the application catalog.
- Complete Simplified Chinese translations and remove obsolete shortcut labels.
- Set the en_US language metadata for English TS catalogs.

将快捷键翻译目录与当前应用快捷键定义同步。
- 在应用翻译目录中补充缺失的窗口管理和辅助功能条目。
- 完成简体中文翻译并移除已废弃的快捷键文案。
- 为英文 TS 翻译目录补充 en_US 语言元数据。

Log: update shortcut translation entries
Change-Id: I2dafa216ced23e6b2777231c3b91609d7be521eb
@yixinshark
yixinshark force-pushed the fix/update-shortcut-translations branch from e203698 to 5db80d6 Compare August 3, 2026 08:31
@sourcery-ai

sourcery-ai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Reviewer's Guide

Updates Qt TS translation catalogs for shortcut and keybinding definitions by normalizing XML headers, synchronizing zh_CN entries with current shortcut set, completing Chinese window/accessibility translations, and adding en_US language metadata to English catalogs to align with current shortcut definitions.

File-Level Changes

Change Details Files
Normalize TS XML headers and metadata for zh_CN and en catalogs.
  • Add explicit UTF-8 XML declaration and split TS DOCTYPE and root tags into separate lines in the zh_CN catalog
  • Add language="en_US" attribute to the dde-app English TS catalog
  • Add language="en_US" attribute to the keybinding English TS catalog
src/plugin-qt/shortcut/dde-app-shortcuts/translations/org.deepin.dde.shortcut.dde-app_zh_CN.ts
src/plugin-qt/shortcut/dde-app-shortcuts/translations/org.deepin.dde.shortcut.dde-app_en.ts
src/plugin-qt/shortcut/translations/org.deepin.dde.keybinding_en.ts
Synchronize zh_CN shortcut entries with current shortcut definitions and complete missing translations.
  • Remove obsolete zh_CN messages for next/previous window and workspace shortcuts
  • Mark previously unfinished AssistiveTools translation as fully translated
  • Add and translate new zh_CN messages for window management shortcuts (minimize, move, resize, quick tile, workspace navigation)
  • Add and translate new zh_CN messages for accessibility-related shortcuts such as zoom and screen tools (screen recorder, scrollshot, zoom in/out/actual size, window effect switching, window switching variants)
src/plugin-qt/shortcut/dde-app-shortcuts/translations/org.deepin.dde.shortcut.dde-app_zh_CN.ts
Align English dde-app TS catalog entries with the updated shortcut set and AssistiveTools label.
  • Reorder or replace messages so that the English catalog mirrors the updated shortcut list used in zh_CN and current code
  • Add an explicit translation string for AssistiveTools while leaving other messages as unfinished placeholders for future translation coverage
src/plugin-qt/shortcut/dde-app-shortcuts/translations/org.deepin.dde.shortcut.dde-app_en.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 left some high level feedback:

  • If the shortcuts for "Next/Previous Window" and workspace navigation are still present in the application, consider keeping or relocating their zh_CN translation messages instead of removing them entirely to avoid losing localized labels.
  • For consistency, consider deciding whether AssistiveTools should be translated as a spaced phrase ("Assistive Tools") across all locales or kept as a single token, and align the zh_CN and en_US entries accordingly.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- If the shortcuts for "Next/Previous Window" and workspace navigation are still present in the application, consider keeping or relocating their zh_CN translation messages instead of removing them entirely to avoid losing localized labels.
- For consistency, consider deciding whether `AssistiveTools` should be translated as a spaced phrase ("Assistive Tools") across all locales or kept as a single token, and align the zh_CN and en_US entries accordingly.

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.

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:100分

■ 【总体评价】

代码完成了快捷键翻译资源的规范化重构与大量新条目补充,格式严谨无瑕疵。
逻辑完全正确且无任何安全风险,符合满分标准。

■ 【详细分析】

  • 1.语法逻辑 完全正确 ✓
    XML标签闭合完整,zh_CN.ts文件修复了原有的单行混乱排版及文件末尾缺失的换行符,结构完全符合Qt Linguist的TS文件规范。
    建议:保持当前的XML格式化标准。
  • 2.代码质量 优秀 ✓
    统一了旧版Next/Previous Window为更语义化的Switch Windows系列命名,补全了AssistiveTools等遗留的unfinished状态翻译,新增的缩放、录屏等翻译术语准确符合UOS规范。
    建议:后续新增快捷键时继续保持此命名与翻译同步更新的节奏。
  • 3.代码性能 无性能问题 ✓
    纯静态翻译资源文件,由Qt语言学系统按需加载解析,不存在算法复杂度或资源消耗问题。
    建议:无。
  • 4.代码安全 存在0个安全漏洞 ✓
    漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
    文件内容仅为XML文本节点,不涉及任何动态代码执行、命令拼接或路径解析,无攻击面。
    建议:无。

■ 【改进建议代码示例】

<!-- 当前代码已非常规范,无需额外修复,此处展示保持良好格式的示例 -->
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
    <name>org.deepin.dde.shortcut.dde-app</name>
    <message>
        <source>Switch Windows</source>
        <translation>切换窗口</translation>
    </message>
</context>
</TS>

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: robertkill, yixinshark

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

@yixinshark

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot
deepin-bot Bot merged commit be9eae5 into linuxdeepin:master Aug 3, 2026
9 of 10 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