Skip to content

docs: Translate the missing sections of the zh-CN List guide - #4045

Merged
madcodelife merged 1 commit into
longbridge:mainfrom
lurenjia534:docs/list-zh-cn-sync
Nov 19, 2026
Merged

madcodelife merged 1 commit into
longbridge:mainfrom
lurenjia534:docs/list-zh-cn-sync

Conversation

@lurenjia534

Copy link
Copy Markdown
Contributor

Follow-up to #4030.

Description

The Chinese List guide (website/zh-CN/component/list.md) was about 150 lines shorter than the English one (website/component/list.md), because whole sections were never translated. This PR brings it in line with the English guide.

Added at the same positions as in the English guide:

  • ### 列表项样式 (Different Item Styles), between List Events and Drag and Drop Reordering.
  • ## 示例 (Examples), with ### 文件浏览器 (File Browser List) and ### 按首字母分组的通讯录 (Contact List with Sections), between Scrolling Control and Scroll bounce.

Restored in existing sections, where the translation had dropped them:

  • The render_section_footer method in List with Sections.
  • The bold Note marker in List with Sections.
  • The code comments in Basic List, List with Sections, List with Search, Loading State, Infinite Scrolling, List Events, List Configuration and Scrolling Control. They are translated into Chinese, as the page already does in its drag-and-drop example.

Docs only, one file. Apart from translated comments, every code block matches the English guide exactly. Component, API and type names stay in English, following the Chinese terminology rules in the Design Guides.

Not changed here: the English List with Search section says the list shows a search input by default, but ListState::searchable defaults to false (crates/component/src/list/list.rs). The Chinese guide already describes this correctly. Fixing the English sentence is left for a separate PR.

How to Test

  • Compare the headings of the two guides: both have the same 22 headings in the same order.
  • Strip // comments from the code blocks of both guides and diff them: they are identical.
  • typos website/zh-CN/component/list.md reports nothing.

Checklist

  • I have read the CONTRIBUTING document and followed the guidelines.
  • Reviewed the changes in this PR and confirmed AI generated code (If any) is accurate.
  • Passed cargo run for story tests related to the changes. (N/A, docs only)
  • Tested macOS, Windows and Linux platforms performance (if the change is platform-specific)

🤖 Generated with Claude Code

The Chinese List guide never had the "Different Item Styles" section or
the "Examples" section (File Browser List, Contact List with Sections).
Add both at the same positions as in the English guide.

Also restore what the existing translation dropped: the
`render_section_footer` method in "List with Sections", the bold "Note"
marker, and the code comments, translated into Chinese as the page
already does for its drag-and-drop example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@huacnlee

Copy link
Copy Markdown
Member

✅ LGTM: docs-only change that brings the zh-CN List guide in line with the English page.

Reviewed head 1be0aa9. Only website/zh-CN/component/list.md changes; the heading structure now matches website/en/component/list.md section for section (item styles, section footer, configuration, scrolling, examples). Code snippets are copied from the English guide with Chinese comments only, so no API drift.

Nit (non-blocking): /// 创建列表状态。 uses a doc-comment /// inside a code example where the rest uses //.

No CI checks have run on this PR (first-time contributor; needs "Approve and run" if wanted, though a docs-only change is low risk).

🤖 Noop (reviewer) · AI agent acting for @huacnlee

@madcodelife
madcodelife merged commit c42fa12 into longbridge:main Nov 19, 2026
18 of 19 checks passed
@madcodelife

Copy link
Copy Markdown
Member

Thank you!

linruohan pushed a commit to linruohan/gpui-kit that referenced this pull request Nov 20, 2026
…dge#4045)

Follow-up to longbridge#4030.

## Description

The Chinese List guide (`website/zh-CN/component/list.md`) was about 150
lines shorter than the English one (`website/component/list.md`),
because whole sections were never translated. This PR brings it in line
with the English guide.

Added at the same positions as in the English guide:

- `### 列表项样式` (Different Item Styles), between List Events and Drag and
Drop Reordering.
- `## 示例` (Examples), with `### 文件浏览器` (File Browser List) and `###
按首字母分组的通讯录` (Contact List with Sections), between Scrolling Control and
Scroll bounce.

Restored in existing sections, where the translation had dropped them:

- The `render_section_footer` method in List with Sections.
- The bold **Note** marker in List with Sections.
- The code comments in Basic List, List with Sections, List with Search,
Loading State, Infinite Scrolling, List Events, List Configuration and
Scrolling Control. They are translated into Chinese, as the page already
does in its drag-and-drop example.

Docs only, one file. Apart from translated comments, every code block
matches the English guide exactly. Component, API and type names stay in
English, following the Chinese terminology rules in the Design Guides.

Not changed here: the English List with Search section says the list
shows a search input by default, but `ListState::searchable` defaults to
`false` (`crates/component/src/list/list.rs`). The Chinese guide already
describes this correctly. Fixing the English sentence is left for a
separate PR.

## How to Test

- Compare the headings of the two guides: both have the same 22 headings
in the same order.
- Strip `//` comments from the code blocks of both guides and diff them:
they are identical.
- `typos website/zh-CN/component/list.md` reports nothing.

## Checklist

- [x] I have read the [CONTRIBUTING](../CONTRIBUTING.md) document and
followed the guidelines.
- [x] Reviewed the changes in this PR and confirmed AI generated code
(If any) is accurate.
- [ ] Passed `cargo run` for story tests related to the changes. (N/A,
docs only)
- [ ] Tested macOS, Windows and Linux platforms performance (if the
change is platform-specific)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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