Skip to content

docs(zh-CN): update book translations, examples, and links - #2276

Merged
fdncred merged 4 commits into
nushell:mainfrom
passionworkeer:docs-zh-cn/complete-and-fix-links
Oct 31, 2026
Merged

fdncred merged 4 commits into
nushell:mainfrom
passionworkeer:docs-zh-cn/complete-and-fix-links

Conversation

@passionworkeer

@passionworkeer passionworkeer commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Description

Following #2274, this PR updates existing zh-CN documentation to reflect changes in the English book. Several chapters were missing newer sections or still contained outdated examples and links.

Changes

  • Translate missing sections in chapters covering aliases, custom commands, completions, modules, scripts, and the line editor, along with smaller additions elsewhere in the book.
  • Update examples and explanations to match the English source, including module naming restrictions, command shadowing with %, and background job descriptions.
  • Correct command references such as range → slice, repair tables and Markdown formatting, and update links to translated headings and command documentation across the zh-CN book, cookbook, and contributor book.

This is an incremental translation update; some untranslated content remains.

Verification

  • GitHub Actions build and Spell Check with Typos checks pass.

Related: #261.

These zh-CN pages were translated only part-way and stopped mid-document,
so readers hit a truncated page that looked like a complete one. This
finishes the missing sections.

Affected pages and what was missing:

- externs.md: the last three limitations were missing entirely
- metadata.md: about three quarters of the page
- creating_errors.md: about two thirds of the page
- running_externals.md: about two thirds of the page
- explore.md, scripts.md, custom_completions.md, working_with_tables.md,
  working_with_lists.md, working_with_records.md, aliases.md: the
  remaining sections

The existing wording was kept as-is where it was already translated; only
the missing parts were added, so the diff shows additions rather than a
rewrite.
Second pass over the pages that already existed in full: wording was
tightened to match the current English source, headings were renamed to
the current chapter titles, and the pages that carry frontmatter in
English keep the zh-CN convention of having none (so line counts compare
cleanly).

Also updates the links inside these pages: .html suffixes become .md,
and anchors now point at the Chinese heading slugs instead of the
English ones.
Pure link fixes, no content changes:

- .html link suffixes become .md (the site resolves .md links; .html
  paths do not exist as source files)
- anchors that still used English heading slugs now point at the
  corresponding Chinese heading slugs, so intra-book links resolve on
  the built site
Completes the remaining zh-CN book translation and fixes translation
defects found in a review. 37 files, +2303/-928.

Complete missing content:
- New translation: tui.md
- Fill in missing sections in background_jobs.md, installation.md,
  types_of_data.md, navigating_structured_data.md, coming_from_bash.md,
  operators.md and both modules/*.md
- Restore dropped table rows (operators.md x2, coming_from_bash.md x7)

Fix incorrect translations:
Line, heading and code-block counts can be satisfied with wrong content,
so a previous "structurally complete" result hid the following, found by
block-by-block comparison:
- modules/creating_modules.md: "may have the same name" was translated as
  "cannot have the same name" (inverted meaning), and a real 13-line error
  output was replaced by a fabricated one-liner
- modules/using_modules.md: the source greet example was swapped for
  std/assert with fabricated output; placeholders and string literals were
  translated
- custom_commands.md: str uppercase -> str upcase, cd / <-> cd ~, altered
  "# =>" output
- line_editor.md: dropped 4 mode entries, description_rows: 20 -> 10
- navigating_structured_data.md: command slice mistranslated as range
- nushell_map.md: missing table separator row and broken pipe escape
- stale version numbers (0.67.0 / 0.43 / 0.94 -> 0.116.0)

Fix links:
zh-CN/book internal anchors: 213 links, 0 broken. /commands/ and
/lang-guide/ targets: 591 links, 0 missing. Fix malformed links (nested
brackets, missing "#") and a relative path in cookbook/tables.md that
resolved outside zh-CN.

Verified with npm run build (1706 pages, 0 broken links in zh-CN),
prettier --check zh-CN/ and a block-by-block diff of modules/*.md
(0/24, 0/39 differences).

Known remaining: ~1256 lines still untranslated (dataframes, control_flow
and loading_data are the largest); 21 dead anchors in
contributor-book/plugin_protocol_reference.md are pre-existing upstream.
Copilot AI balanced review requested due to automatic review settings October 31, 2026 09:21

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@passionworkeer passionworkeer changed the title docs(zh-CN): complete the translation and fix incorrect translations docs(zh-CN): update book translations, examples, and links Oct 31, 2026
@fdncred
fdncred merged commit 8d8090d into nushell:main Oct 31, 2026
2 checks passed
@fdncred

fdncred commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Thanks

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