Skip to content

fix: unify shortcut key notation in en_US help manual - #320

Closed
LiHua000 wants to merge 3 commits into
linuxdeepin:release/eaglefrom
LiHua000:fix/en-us-shortcut-help-373443
Closed

fix: unify shortcut key notation in en_US help manual#320
LiHua000 wants to merge 3 commits into
linuxdeepin:release/eaglefrom
LiHua000:fix/en-us-shortcut-help-373443

Conversation

@LiHua000

@LiHua000 LiHua000 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

What this PR does

Fixes the en_US help manual shortcut help content for PMS 373443:

1. Shortcut key notation (commit 583473c)

Unifies the shortcut-key notation in the "View Shortcut Keys" section with the canonical key name used in code:

  • Before: Ctrl + Shift+ ?
  • After: Ctrl+Shift+/

The canonical key name is defined as key_ctrl_shift_slash = "Ctrl+Shift+/" (reader/app/Global.h:142) and is the value passed to deepin-shortcut-viewer for display (reader/widgets/ShortCutShow.cpp:109).

Applied to all three en_US manual files:

  • assets/deepin-reader/document-viewer/en_US/document-viewer.md
  • assets/deepin-reader/document-viewer/en_US/eu_document-viewer.md
  • assets/deepin-reader/document-viewer/en_US/i_document-viewer.md

2. Regenerate hotkey.png (commit 475eb0c)

Disclosure: en_US/fig/hotkey.png is rendered offline via Qt from the current shortcut definitions (not a real UI screenshot). It reproduces the two-column dark-theme layout matching the deepin-shortcut-viewer style. Content is taken strictly from ShortCutShow.cpp initPDF() at baseline 47fffc9b. This method was authorized by the team lead because the sandbox environment has no deepin GUI session for real screenshot capture; the image will be verified against a real deepin GUI at the human review gate.

The previous hotkey.png was stale (from 2021, commit 3186ecab), missing shortcuts added in the 2023 v23 merge and using the old Files group name (renamed to File in 2026).

Content checklist (all verified via OCR):

  • Group names: Settings, File (not Files), Display, Tools, Edit
  • Display includes Move to the beginning (Ctrl+Home) and Move to the end (Ctrl+End)
  • Tools includes Fullscreen (F11)
  • Edit does not include Save (Save is only in File group)

Scope

Only en_US scope (PMS 373443). zh_CN/zh_TW have the same stale-image issue but are tracked as a separate concern.

No runtime shortcut logic is changed.

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

Summary by Sourcery

Align the en_US Document Viewer shortcut documentation and reference image with the current shortcut definitions.

Bug Fixes:

  • Correct the shortcut notation in all en_US help manuals to match the canonical Ctrl+Shift+/ key combination.

Enhancements:

  • Refresh the en_US shortcut reference image to reflect the current shortcut groups and available commands.

Documentation:

  • Update the en_US Document Viewer manuals with consistent shortcut-key guidance and current shortcut reference content.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LiHua000

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 Aug 17, 2026

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

Reviewer's Guide

This PR standardizes the shortcut-key notation in the en_US Document Viewer help manuals so they match the canonical key name used in the application (Ctrl+Shift+/).

Sequence diagram for viewing shortcut keys with Ctrl+Shift/

sequenceDiagram
  actor User
  participant DocumentViewer
  participant ShortcutViewer

  User->>DocumentViewer: Press Ctrl+Shift/
  DocumentViewer->>ShortcutViewer: key_ctrl_shift_slash
  ShortcutViewer-->>User: Display shortcut keys
Loading

File-Level Changes

Change Details Files
Standardized the "View Shortcut Keys" shortcut notation in the en_US manuals to use the canonical Ctrl+Shift+/ form.
  • Replaced the previous "Ctrl + Shift+ ?" text with "Ctrl+Shift/" in the shortcut viewing instructions.
  • Ensured spacing and symbols in the shortcut description match the key name defined in code and shown by deepin-shortcut-viewer.
assets/deepin-reader/document-viewer/en_US/document-viewer.md
assets/deepin-reader/document-viewer/en_US/eu_document-viewer.md
assets/deepin-reader/document-viewer/en_US/i_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 reviewed your changes and they look great!


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.

The "View Shortcut Keys" section in the en_US help manual documents the
shortcut as "Ctrl + Shift+ ?", while the canonical key name defined in
code is "Ctrl+Shift+/" (reader/app/Global.h:142, key_ctrl_shift_slash),
which is also the value passed to deepin-shortcut-viewer for display.
Unify the notation to "Ctrl+Shift+/" for consistency between the manual
and the application.

Log: 统一英文帮助手册快捷键文案与代码键名
Bug: https://pms.uniontech.com/bug-view-373443.html
The en_US help manual's hotkey.png was stale (from 2021, commit 3186eca),
missing shortcuts added in the 2023 v23 merge (Move to the beginning/end)
and using the old "Files" group name (renamed to "File" in 2026).

Regenerate the image from the current shortcut definitions in
ShortCutShow.cpp initPDF() at baseline 47fffc9. The image is rendered
offline via Qt (not a real UI screenshot) and reproduces the two-column
layout with dark theme matching the deepin-shortcut-viewer style.

Content checklist (all verified):
- Group names: Settings, File (not Files), Display, Tools, Edit
- Display includes Move to the beginning (Ctrl+Home) and Move to the end (Ctrl+End)
- Tools includes Fullscreen (F11)
- Edit does not include Save (Save is only in File group)

Log: 重新生成英文帮助手册快捷键截图,基于现行快捷键定义离线渲染
Bug: https://pms.uniontech.com/bug-view-373443.html
Previous fix accidentally dropped the "+" between Shift and "/", producing
"Ctrl+Shift/" instead of the canonical "Ctrl+Shift+/" (Global.h:142,
key_ctrl_shift_slash). Restore the missing separator so the manual matches
the code and the in-app viewer display exactly.

Log: 补回英文帮助手册快捷键文案缺失的 "+" 分隔符
Bug: https://pms.uniontech.com/bug-view-373443.html
@LiHua000
LiHua000 force-pushed the fix/en-us-shortcut-help-373443 branch from e9e12c8 to 4d2ca55 Compare August 20, 2026 05:56
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:100分

■ 【总体评价】

代码实现了文档快捷键描述的修正与统一,提升了文档准确性
逻辑清晰且改动安全,无任何代码缺陷或安全漏洞

■ 【详细分析】

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

具体分析内容:修改了 document-viewer.mdeu_document-viewer.mdi_document-viewer.md 三个文件中的快捷键文本,将原先的 Ctrl + Shift+ ? 替换为 Ctrl+Shift+/。Markdown语法使用正确,文本替换逻辑无误,同时更新了对应的 hotkey.png 截图资源。
潜在问题:无
建议:无需修改

  • 2.代码质量(优秀)✓

具体分析内容:修改去除了快捷键描述中多余的空格,统一了书写格式,使其更符合实际的键盘按键映射,确保了文档与实际界面的高度一致性,符合文档维护规范。
潜在问题:无
建议:无需修改

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

具体分析内容:本次修改仅涉及静态Markdown文档文本和图片二进制资源的替换,不涉及任何代码执行逻辑、算法或系统调用,对系统性能无任何影响。
潜在问题:无
建议:无需修改

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

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
本次修改为纯文档内容更新,不涉及任何代码逻辑、输入输出处理或权限操作,不存在安全风险和攻击面。

  • 建议:无需修改

■ 【改进建议代码示例】

无需修改,当前文档更新已符合规范。

@LiHua000 LiHua000 closed this Aug 20, 2026
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