Skip to content

docs: unify Semantic DOM headings in Chinese docs - #160

Merged
cc-hearts merged 1 commit into
mainfrom
sync/ant-design-x-1877
Aug 4, 2026
Merged

docs: unify Semantic DOM headings in Chinese docs#160
cc-hearts merged 1 commit into
mainfrom
sync/ant-design-x-1877

Conversation

@cc-hearts

Copy link
Copy Markdown
Member

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ⌨️ Accessibility improvement
  • ❓ Other (about what?)

🔗 Related Issues

💡 Background and Solution

The Chinese FileCard and Folder documentation still used the translated 语义化 DOM section heading, while the upstream documentation standardized this section as Semantic DOM.

This change updates only those two section headings. The existing Chinese descriptions remain unchanged. The generated documentation search index contains the expected /components/file-card#semantic-dom and /components/folder#semantic-dom anchors.

Verification:

  • vp check packages/docs/src/pages/components/file-card/index.zh-CN.md packages/docs/src/pages/components/folder/index.zh-CN.md — passed
  • vp run docs:build — passed; 398 Chinese and 398 English search documents generated
  • generated search index contains both #semantic-dom anchors
  • vp test — 45 files, 442 tests passed
  • repository-wide vp check formatting passed; lint/type checking is currently blocked by 2 unrelated existing errors in packages/x-markdown/vite.build.config.ts

📝 Change Log

Language Changelog
🇺🇸 English Standardize the Semantic DOM section heading in the Chinese FileCard and Folder documentation.
🇨🇳 Chinese 统一 FileCard 和 Folder 中文文档中的 Semantic DOM 章节标题。

@cc-hearts
cc-hearts merged commit 855a0da into main Aug 4, 2026
1 check passed
@cc-hearts
cc-hearts deleted the sync/ant-design-x-1877 branch August 4, 2026 03:01
@cc-hearts

Copy link
Copy Markdown
Member Author

Review:⚠️ 忠实复刻了上游,但没达成 issue 标题说的「统一」,建议先别合

没问题的部分

改动与上游 ant-design/x#1877 一致(上游也只动了 file-card + folder 两个 zh-CN 文件)。锚点方面也不会破坏任何链接 —— 全仓唯一引用 #语义化-dom 的是 think/index.zh-CN.md,不在本次改动范围内。

问题:改完反而更不统一了

下游 zh-CN 文档里共有 15 个 ## 语义化 DOM 标题,本 PR 只改了其中 2 个,结果从「15 个一致」变成「13 : 2 分裂」。

上游只需改 2 个,是因为上游其余文件早就是英文标题;下游的起点不同,不能按文件数照搬。

更关键:仓库已有自己的约定

welcomesources 的 zh-CN 用的是:

## 语义化 DOM {#semantic-dom}

保留中文标题、用显式锚点与英文对齐。这个方案同时满足了「锚点统一」和「中文文档说中文」,本 PR 直接改标题文本的做法与自家约定是背离的。

建议

二选一,都比现状好:

  • A(推荐) 15 个文件统一加 {#semantic-dom} 显式锚点,保留中文标题 —— 与 welcome/sources 已有做法一致,且不影响中文阅读体验
  • B 15 个文件全部改成 ## Semantic DOM —— 彻底对齐上游,但要连带处理 think/index.zh-CN.md 里那两处 #语义化-dom 引用

方向定了我可以直接把对应改动补上。

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.

[sync][P3] docs: 统一中文文档 Semantic DOM 标题 (#1877)

1 participant