Skip to content

docs: fix image paths and formatting in Chinese documentation#34

Merged
mhduiy merged 1 commit intolinuxdeepin:masterfrom
mhduiy:spaces
Feb 3, 2026
Merged

docs: fix image paths and formatting in Chinese documentation#34
mhduiy merged 1 commit intolinuxdeepin:masterfrom
mhduiy:spaces

Conversation

@mhduiy
Copy link
Contributor

@mhduiy mhduiy commented Feb 3, 2026

Fixed image file paths and improved markdown formatting in Chinese documentation files for better readability and consistency. Changed backslash path separators to forward slashes in image references to ensure cross-platform compatibility. Added proper line breaks before images to separate them from preceding text for clearer document structure. Updated the backup/restore image filename from p_backuprestore.png to d_backup_restore.png to match the actual file.

docs: 修复中文文档中的图片路径和格式

修复了中文文档文件中的图片文件路径并改进了Markdown格式,以提高可读性和
一致性。将图片引用中的反斜杠路径分隔符改为正斜杠,以确保跨平台兼容性。在
图片前添加了适当的换行,以将图片与前面的文本分开,使文档结构更清晰。将备
份/恢复图片文件名从p_backuprestore.png更新为d_backup_restore.png以匹配实 际文件。

PMS: BUG-336869

Summary by Sourcery

Improve image references and formatting in Chinese DDE documentation pages for clearer structure and correct asset links.

Documentation:

  • Standardize spacing and line breaks around images in zh_CN, zh_TW, and zh_HK DDE guides to improve readability.
  • Replace backslash image paths with forward slashes in zh_CN DDE docs for cross-platform compatibility.
  • Update the backup/restore illustration reference in the zh_CN DDE guide to use the correct image filename.

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 3, 2026

Reviewer's Guide

Standardizes image references and markdown formatting across Chinese DDE documentation variants (zh_CN, zh_TW, zh_HK), adding line breaks before images, converting Windows-style image paths to POSIX-style paths, and fixing one incorrect backup/restore image filename.

Flow diagram for normalization of image references in Chinese documentation

flowchart TD
  A[Chinese_docs zh_CN zh_TW zh_HK] --> B[Existing_image_references]
  B --> C{Issue_type}
  C --> D[Windows_style_paths fig\p_license_activator_X.png]
  C --> E[Missing_line_break_before_image]
  C --> F[Incorrect_backup_restore_filename p_backuprestore.png]

  D --> G[Convert_to_POSIX_paths fig/p_license_activator_X.png]
  E --> H[Insert_blank_line_before_image]
  F --> I[Update_filename_to_d_backup_restore.png]

  G --> J[Standardized_image_paths]
  H --> K[Improved_markdown_structure]
  I --> L[Correct_image_file_reference]

  J --> M[Rendered_docs_with_consistent_images]
  K --> M
  L --> M
Loading

File-Level Changes

Change Details Files
Add blank lines before standalone images so they render as separate blocks instead of inline content.
  • Insert a blank line between notification-center description text and the following message.png image in all zh_CN/zh_TW/zh_HK DDE docs.
  • Insert blank lines before each license-activation sequence image so each screenshot is visually separated from preceding list text and bullets.
src/assets/dde/zh_HK/p_dde.md
src/assets/dde/zh_TW/p_dde.md
src/assets/dde/zh_CN/p_dde.md
src/assets/dde/zh_CN/d_dde.md
Normalize image paths and filenames for cross-platform correctness and to match actual assets.
  • Replace backslash path separators with forward slashes in all image references under fig/ in the simplified Chinese DDE doc.
  • Update the backup/restore image reference from p_backuprestore.png to d_backup_restore.png to align with the actual asset name.
src/assets/dde/zh_CN/p_dde.md
src/assets/dde/zh_CN/d_dde.md
Tidy indentation so markdown for images aligns better with lists/bullets for consistent rendering.
  • Unindent images that were previously prefixed with extra spaces so they are rendered as independent block images tied to their nearby list items.
  • Adjust spacing around some list bullets and following images to keep list structure valid while still separating screenshots.
src/assets/dde/zh_HK/p_dde.md
src/assets/dde/zh_TW/p_dde.md
src/assets/dde/zh_CN/p_dde.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

Copy link

@sourcery-ai sourcery-ai bot left a comment

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:

  • In zh_CN/p_dde.md, the image paths still use backslashes (e.g. fig\p_license_activator_1.png), which is inconsistent with the stated goal of switching to forward slashes and with the changes in d_dde.md.
  • The indentation of image lines inside lists is now inconsistent across the zh_CN/zh_TW/zh_HK docs (some images are flush left, some have one or two leading spaces), which may change how Markdown renders them inside list items; consider normalizing indentation so list structure is clearly preserved.
  • For several bullet points (e.g. the offline activation sections), images were moved from being under a - list item to standalone lines, which may break the intended association between the bullet text and its image; please confirm and align the pattern across all three locale files.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `zh_CN/p_dde.md`, the image paths still use backslashes (e.g. `fig\p_license_activator_1.png`), which is inconsistent with the stated goal of switching to forward slashes and with the changes in `d_dde.md`.
- The indentation of image lines inside lists is now inconsistent across the zh_CN/zh_TW/zh_HK docs (some images are flush left, some have one or two leading spaces), which may change how Markdown renders them inside list items; consider normalizing indentation so list structure is clearly preserved.
- For several bullet points (e.g. the offline activation sections), images were moved from being under a `-` list item to standalone lines, which may break the intended association between the bullet text and its image; please confirm and align the pattern across all three locale files.

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.

Fixed image file paths and improved markdown formatting in Chinese
documentation files for better readability and consistency. Changed
backslash path separators to forward slashes in image references
to ensure cross-platform compatibility. Added proper line breaks
before images to separate them from preceding text for clearer
document structure. Updated the backup/restore image filename from
p_backuprestore.png to d_backup_restore.png to match the actual file.

docs: 修复中文文档中的图片路径和格式

修复了中文文档文件中的图片文件路径并改进了Markdown格式,以提高可读性和
一致性。将图片引用中的反斜杠路径分隔符改为正斜杠,以确保跨平台兼容性。在
图片前添加了适当的换行,以将图片与前面的文本分开,使文档结构更清晰。将备
份/恢复图片文件名从p_backuprestore.png更新为d_backup_restore.png以匹配实
际文件。

PMS: BUG-336869
@deepin-ci-robot
Copy link

deepin pr auto review

这段代码 diff 主要涉及 Markdown 文档的格式调整和图片路径的修改。以下是针对语法逻辑、代码质量、代码性能和代码安全的详细审查意见:

1. 语法逻辑

  • 图片路径分隔符修正:

    • 问题: 在 src/assets/dde/zh_CN/d_dde.md 中,图片路径从 fig\p_backuprestore.png 修改为 fig\d_backup_restore.png
    • 意见: 这是一个很好的改动。Markdown 和大多数 Web 环境以及跨平台系统(Linux/macOS)都推荐使用正斜杠 / 作为路径分隔符。反斜杠 \ 是 Windows 特有的,在其他系统上会导致图片无法显示。修改后的路径更规范,跨平台兼容性更好。
  • 图片与列表项的缩进关系:

    • 问题: 在 p_dde.md 及其繁体版本中,多处将原本嵌套在列表项下的图片(带有缩进,如 - ![](...))修改为了顶格的图片(无缩进,如 ![](...)),并在图片前增加了一个空行。
    • 意见: 这种修改改变了文档的结构逻辑。
      • 原逻辑: 图片作为列表项的子内容,视觉上与列表项紧密相关。
      • 新逻辑: 图片与列表项分离,成为独立的段落。
      • 建议: 请确认这是否符合排版要求。如果希望图片独立显示以避免列表符号过长或对齐问题,目前的改动是合理的。如果希望图片紧跟在文字说明下方,建议保留缩进,或者使用不换行空格(如  )来控制视觉对齐,而不是完全改变 Markdown 结构。目前的修改会导致图片不再属于列表上下文,可能会影响某些 Markdown 渲染器生成的 PDF 或 HTML 目录结构。

2. 代码质量

  • 格式一致性:
    • 问题: 在多处修改中,在图片引用前增加了一个空行(例如 +\n![](...))。
    • 意见: 这是一个好的实践。在 Markdown 中,块级元素(如图片、段落)之间增加空行可以提高源代码的可读性,防止某些解析器将两行内容错误地合并渲染。建议保持这种风格。
    • 问题: 在 p_dde.md 的某些修改中(如 zh_CN/p_dde.md 第 721 行),图片前增加了空行,但去掉了原本列表项前的 - 符号前的空格缩进。
    • 意见: 这会导致图片与上方列表项的视觉层级关系变弱。建议检查是否所有相关图片的处理方式都统一了,目前 diff 中存在部分图片有缩进,部分没有的情况(虽然这次 diff 主要是去掉了缩进)。

3. 代码性能

  • 无关: Markdown 文件的修改通常不涉及运行时性能。唯一的性能影响在于构建系统(如 Hugo, Jekyll 或 VuePress 等)解析 Markdown 文件的速度。
    • 增加空行可能会略微增加文件体积,但影响微乎其微。
    • 修改文件路径不会影响性能。

4. 代码安全

  • 路径注入风险: 无。图片路径都是硬编码的相对路径,不包含用户输入或动态变量,不存在路径遍历或注入风险。

总结与改进建议

  1. 路径分隔符: 确认所有文件中的路径分隔符已统一为 /(本次修改中已修正,建议检查其他未修改的文件)。
  2. 图片缩进与排版:
    • 建议: 目前的修改将图片从列表中剥离出来。如果这是为了解决渲染时的对齐问题,可以接受。但为了保持文档结构的语义化,建议考虑以下两种方案之一:
      • 方案 A (当前方案): 保持图片独立,但在图片上方添加说明性文字作为段落,而不是作为列表项。
      • 方案 B (推荐): 如果图片是对列表项的补充,建议将图片保留在列表项内,但使用 HTML 的 <br> 或非换行空格来控制换行,例如:
        - 单击 **输入序列号**,输入或复制正确的序列号,单击 **立即激活**。<br>
        ![](fig/p_license_activator_1.png)
        这样既保持了逻辑从属关系,又解决了排版问题。
  3. 空格处理: 注意 p_dde.md 中有些图片前增加了额外的空行,有些则紧跟在文字后面(尽管去掉了列表符号)。建议统一风格:要么所有图片前都有空行,要么都没有,以保持文档风格的整洁。

总体而言,这次修改主要是为了修正路径格式和调整排版,只要确认图片脱离列表结构后的显示效果符合预期,即可合并。建议在合并前预览生成的文档(PDF 或 HTML),确保图片位置不会造成阅读困扰。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mhduiy, xionglinlin

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

@mhduiy mhduiy merged commit 36b7e86 into linuxdeepin:master Feb 3, 2026
14 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

Comments