Skip to content

Read the Capabilities page's Description label and its six refusals in the window's language (#3114) - #3256

Merged
Birfy merged 1 commit into
mainfrom
dev/3114-capabilities-zh
Nov 20, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/3114-capabilities-zh

Conversation

@Birfy

@Birfy Birfy commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Dev
Fixes #3255
Part of #3114
Owner: Dev
Reviewer: Reviewer
Docs-not-needed: dictionary entries only; no component or host structure changes.

What changed

Before: in a zh window the Capabilities page still drew Description and the six fixed refusals a failed save leaves, in English. After: the form's label and those six sentences read Chinese. An English window is unchanged — the dictionary only gained entries, no English key or sentence was edited, and neither capability-settings.js (it already draws t(label)) nor the host was touched.

Seven dictionary entries: the Description label, the capability name rule, a fixed kind, a missing MCP command, a bad HTTP(S) URL, and non-text environment or header values. The two "text values" sentences are the host's template filled with Environment variables / Headers.

Verification at the tip

Tip SHA: 9fa0359
Ran: red first, only the test in place — (cd core && TZ=UTC node --test test/settings-error-placement.test.js) → # tests 4 / # pass 2 / # fail 2; after the dictionary → 4 / 4 / 0. Five i18n gates 39 / 39 / 0; test/i18n.test.js 3 / 3 / 0; the three baselines 12 / 9 / 46 ok; build-client.mjs --check rc 0; ds-bot-patches.mjs canonical + check all ok; changelog.mjs check 12 fragments; check-mojibake.mjs --check rc 0 (0 U+FFFD); node --prefix core run arch-docs rc 0.
Not run: TZ=UTC npm run verify reached core lint (arch-docs OK), plugin lint, build-client --check, ds-bot-patches check/canonical, the core suite (3383 tests, 0 fail, 1 skipped), plane 25, social 758, tree 152 and timeline 172 — all green — then hung in plugins/workflow takeover.test.js on this box and was killed. CI tests-ok at this tip is green for every job, plugins (workflow) included.

Checkpoint

{
  "pr": 3256,
  "claim": "Dev",
  "issue": 3255,
  "summary": "The Capabilities page now reads Chinese in a zh window: its Description label and the six fixed refusals a failed save leaves (name rule, fixed kind, missing MCP command, bad HTTP(S) URL, non-text environment or header values). Only the dictionary changed; the page already drew t(label) and api.js already translated the host sentence. English keys and sentences are untouched, and the generated client bundle plus patch mirrors were regenerated rather than hand-edited.",
  "files": [
    "core/src/client/i18n.js",
    "core/test/settings-error-placement.test.js",
    "changelog.d/3114-capabilities-zh.fixed.md"
  ],
  "checks": { "ran": "(cd core && TZ=UTC node --test test/settings-error-placement.test.js) + five i18n gates + build-client --check + ds-bot-patches check", "result": "green", "at": "9fa03595d9e6f4cee8b7528e9c2d931998249778" },
  "next": "none — ready for review"
}

…uage (#3114)

Docs-not-needed: dictionary entries only; no component or host structure changes.
@Birfy Birfy added the agent-pr Pull request opened by an agent label Nov 20, 2026
@Birfy Birfy self-assigned this Nov 20, 2026
@Birfy

Birfy commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at 9fa0359
Written-by: Reviewer
Attestation: 9fa0359 role=Reviewer

Ran at this tip:

$ cp base/core/src/client/i18n.js core/src/client/i18n.js   # only the tip dictionary reverted, new tests kept
$ (cd core && TZ=UTC node --test test/settings-error-placement.test.js)
# tests 4  # pass 2  # fail 2
$ cp /tmp/p3256_i18n_tip.js core/src/client/i18n.js          # dictionary put back
$ (cd core && TZ=UTC node --test test/settings-error-placement.test.js)
# tests 4  # pass 4  # fail 0
$ (cd core && TZ=UTC node --test test/i18n.test.js test/i18n-missing-entries.test.js test/i18n-template-draws.test.js test/i18n-plugins.test.js test/i18n-plugins-missing-zh.test.js)
# tests 39  # pass 39  # fail 0
$ node core/scripts/build-client.mjs --check
$ node scripts/ds-bot-patches.mjs check
$ node scripts/ds-bot-patches.mjs canonical
$ node .github/scripts/changelog.mjs check
$ node .github/scripts/check-mojibake.mjs --check

Red first: with only core/src/client/i18n.js back at base cc885ca4 the two zh cases fail (Description label + the six refusals), 4 tests / 2 pass / 2 fail; the English case is green in both runs. Restoring the tip dictionary gives 4 / 4 / 0. The only lines the test diff removes are the bundle entry and its destructure, swapped for the Capabilities/i18n exports — the existing first case and its assertions are untouched, and every new assertion is a strict equality on the rendered text.

Dictionary is additions only: diff base…tip core/src/client/i18n.js has 0 removed lines, so nothing English moved. The two text values sentences are the pre-assembled full sentences Environment variables must contain text values. / Headers must contain text values. — the only two label values at core/src/host/capabilities.js:48 (stringMap(body.env, …) / stringMap(body.headers, …)), and no ${label} template key was added to the dictionary. grep -c "'Enter a command for the MCP server.': '请填写 MCP 服务器的命令。'" core/src/client/i18n.js = 1. All six sentences sit next to their existing label keys; Description: '描述' is the label the form already draws through t(label).

Dictionary gates: 39/39/0, baselines unchanged at 12 (plugins) / 9 (template draws) / 46 (missing entries). Baseline files untouched by the diff.

Generated artifacts agree with the sources: build-client --check rc 0, ds-bot-patches check rc 0 (10 patches apply cleanly in order, core/ equals ds-bot/ + patches/ds-bot/), canonical rc 0 (patches/ds-bot/ is what generate writes (generate is a no-op)), git status --porcelain empty after both. Scope is the 7 files the brief names: changelog.d/3114-capabilities-zh.fixed.md, core/client.js, core/src/client/i18n.js, core/test/settings-error-placement.test.js, patches/ds-bot/0001-core-fixes.patch, 0008-client-bundle.patch, files/test/settings-error-placement.test.js.

Risk tier from the PR's own 7 paths and +/−: T1 (115 changed lines in 3 files, 4 generated files not counted) — so no PASS/approval is required; this report is the evidence.

changelog.d check: 12 well-formed fragments (11 before + this one). Mojibake: 0 occurrences of U+FFFD across 1781 text files.

Tip check-runs: 20 runs, 16 success, 2 skipped, 2 cancelled — the two cancelled are the superseded judge / agent-audience attempts of the same pair, whose latest runs both succeeded; no failure anywhere. Tip base equals main cc885ca4, mergeable clean.

The full local node --test sweep on this tip was still running when I posted this (the tip's own tests-ok check, which runs that same suite, is success); I will report its tail if it shows anything beyond the seven environment-only failures known on clean main (six client-bundle cases plus check-arch-docs on an empty diff).

@github-actions github-actions Bot added the pass label Nov 20, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 4128e27 Nov 20, 2026
18 of 20 checks passed
@Birfy
Birfy deleted the dev/3114-capabilities-zh branch November 20, 2026 07:55
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

设置 › 能力页按窗口语言显示(Cut 31)

1 participant