Skip to content

docs(zh-CN): fill four missing plugin API sections - #2029

Merged
Tioit-Wang merged 1 commit into
vastsa:mainfrom
Seraph-x:docs/2000-zh-cn-plugin-api-gaps
Nov 1, 2026
Merged

Tioit-Wang merged 1 commit into
vastsa:mainfrom
Seraph-x:docs/2000-zh-cn-plugin-api-gaps

Conversation

@Seraph-x

Copy link
Copy Markdown
Contributor

Related to #2000

The Chinese plugin API specification omits four contracts already documented in English. This adds their complete translations, including the projects.list() signature and PluginProjectInfo type, so Chinese readers can use these capabilities with the same information as English readers.

Scope and implementation evidence

Reviewed both docs/spec/07-plugins/03-plugin-api.md and docs/zh-CN/spec/07-plugins/03-plugin-api.md, then checked the following SDK and host implementations at base b32b8d9b5458:

Missing Chinese content English source Code checked
Theme variables: permission, declared values, private persistence, active-theme refresh Lines 3–9 themes.setVariables, validatePluginThemeVariables
projects.list(): signature/type, durable IDs, ordering, roots, failure behavior, read-only panel access Lines 333–344 and 389–406 PluginProjectInfo, createPluginProjectLister, panel dispatch
Provider entries in Add Service: catalog metadata, categories, tooltips, credentials, model discovery Lines 551–573 pluginProviderCatalogEntries, pluginProviderServiceOptions, PluginProviderKeySetupForm
Scenic Settings contribution: host-owned controls, typed Apply, declared package/external assets Lines 1252–1268 scenic IPC validation, setScenicThemeBlur, theme asset resolution

Only the Chinese API document changes. The English source already contains these sections and needs no synchronization. Existing headings stay in place, preserving their anchors. This complements #2006 and #2021; #2021 explicitly leaves the missing Chinese theme-variable and project-list content out of scope.

Validation

  • git diff --check
  • node docs/scripts/check-locales.mjs — 86 locale pairs passed
  • node docs/scripts/check-docs.mjs — 599 pages passed; existing advisory ADR notes only
  • node scripts/check-agent-policy-sync.mjs
  • node scripts/check-pr-base-main.mjs — current origin/main is an ancestor of this branch
  • node docs/node_modules/vitepress/bin/vitepress.js build docs — passed using the existing host dependency tree
  • Compared the added projects.list() signature/type byte-for-byte with English; checked all 40 existing heading anchors and the 3 added anchors using VitePress, including anchor links in the built page

Application tests and E2E were not run because this is a documentation-only translation.

Restore the missing Chinese API documentation for theme variables,
project enumeration, provider catalog entries, and scenic Settings.
Translate the existing English contracts in full so Chinese readers
can use these capabilities without consulting a second locale.

Related to vastsa#2000
Copilot AI lite review requested due to automatic review settings October 31, 2026 15:43

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.

@Tioit-Wang
Tioit-Wang merged commit d2c85a9 into vastsa:main Nov 1, 2026
2 checks passed
@Tioit-Wang

Copy link
Copy Markdown
Collaborator

Merged as \d2c85a95a. Thanks!

Checked the four sections against current \main\ before merging. All four were genuinely absent from the Chinese page while present in English, and your text matches the code:

  • \pi.projects.list()\ / \PluginProjectInfo\ — matches \packages/plugin-sdk/src/index.ts\ exactly, including the \projectId\ distinction from the project-group id returned by \workspace.get\
  • Theme variables — matches the \ui.theme\ gate and private-settings persistence
  • Provider entries in Add Service — matches the \contributes.providers\ data-projection behavior
  • Scenic Settings contribution — matches the host-owned DOM/Apply path and the \plugin-asset:\ rewrite

Leaving \Theme variables\ and the rest of the API surface outside #2021's scope and saying so was the right call — that is why these landed cleanly instead of colliding.\n\nOne thing I noticed while verifying, unrelated to your change: \docs/zh-CN/spec/07-plugins/03-plugin-api.md:415\ has ###代理\ (missing the space after ###), which breaks that heading's anchor. It predates your PR, so I am not asking you to fix it here — just recording it.

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