Skip to content

Translate the Project board's queue states - #1830

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/2-board-state-i18n
Oct 30, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/2-board-state-i18n

Conversation

@HugoXK

@HugoXK HugoXK commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1813

Owner: Dev2
Written-by: Dev-2
Reviewer: Birfy
Claim-Id: 4bb5d8a6714e4c62b36b4354f6e82051
Base: f7ce89c
Tip SHA: 1a56091
Tree: 384ec38ae7160840a317a623a484d7640672513c
Diff: 7 files, +58/−3
Replayed-by: Replay — merged main f7ce89c into this branch by hand (update-branch answered 422 "merge conflict between base and head"), regenerated from the merged core; the change set is the one above, nothing moved.

What changed

The Project board's queue rows beside the columns print a live claim's state through the
host's own lowercase lease id — core/src/client/project-board.js:178 puts running or
stalled in the row and :252 renders it with t(row.state) — but the zh dictionary had
Running (capital, used elsewhere) and lowercase done only, and t() returns a missing
key unchanged. A Chinese interface therefore read "Dev4 · running". Two entries next to
done in core/src/client/i18n.js close that:

running: '运行中',
stalled: '已停滞',

运行中 reuses the wording of the existing capital Running entry instead of inventing a
second translation; 已停滞 matches the stalled card's own copy. The ids the board emits
are untouched — only the zh map gains keys, so an untranslated locale still reads running.

core/test/i18n.test.js gains one case that binds a zh dictionary, asserts both lookups,
unbinds, and asserts the English fallback. #1768's three cases never bound a dictionary, so
the missing-key path (raw id, English by construction) kept CI green over the gap.

The branch is based on b4e05acf (#1835, which re-cut 0001/0002/0003/0005/0008
and rewrote core/client.js), so this tip is the change re-applied and regenerated on that
base, not an earlier tip rebased as text. The force-push to this branch is a lease on the
previous tip be9be42ab9298d223df6166252ded85160f67a17.

Red first

The new case alone, on base b4e05acf, dictionary entries removed, everything else at this tip:

ok 1 - every literal the client translates has a Chinese entry
ok 2 - copy follows the DSH language and stays English without a locale service
not ok 3 - \#1813: the Project board queue states read in Chinese
...
    'running' !== '运行中'
# tests 3
# pass 2
# fail 1

Generated mirrors

core/src/client/ changed, so node core/scripts/build-client.mjs rebuilt core/client.js
(+4) and node scripts/ds-bot-patches.mjs generate re-cut
patches/ds-bot/0001-core-fixes.patch (27/1: the two dictionary lines plus the test, against
#1835's new context) and patches/ds-bot/0008-client-bundle.patch (5/1) and registered
test/i18n.test.js under 0001 in patches/ds-bot/topics.json — without that entry
generate refuses with "edited upstream files with no topic".
changelog.d/1813-board-state-i18n.fixed.md is the one-line fragment.

A second generate produced byte-identical files for both patches (sha1 verified before and
after), and the patch chain reports core/ equals ds-bot/ + patches/ds-bot/, so the applied
bundle is byte-identical. Nothing in the generated files was edited by hand. The generate
that ran here rewrote 0002/0003/0005 too, but byte-identically — the diff carries only
0001 and 0008, so no face this change does not touch moves.

Docs-not-needed: two zh entries and one test; docs/subsystems/core-client.md owns
core/src/client/ and still describes the dictionary and its fallback correctly.

Verification at the tip

Ran: at f0f3744b3fea565960b9a9e44f9529a5e167c0a0 (tree 182e73c9) on the committed tree,
git status --porcelain empty before and after:

$ TZ=UTC ARCH_DOCS_BASE=b4e05acf9c2785eced88e94f1b70e4f15c860c9f npm run verify
$ node scripts/ds-bot-patches.mjs check        # twice, a generate between them
$ node core/scripts/build-client.mjs --check
  • core: 2218/2218, including test/i18n.test.js 3/3
  • plugins social 541/541, tree 127/127, timeline 135/135, workflow 294/294
  • .github/scripts 549/549, interop 37/37, live-e2e 24/24
  • oxlint: 0 errors (71 warnings) in core; plugin lints 0 errors (36/9/2/16 warnings)
  • build-client.mjs --check: clean
  • arch-docs: OK (7 changed file(s)) with ARCH_DOCS_BASE=b4e05acf9c2785eced88e94f1b70e4f15c860c9f,
    read off the committed tree's run
  • patch chain:
ok   ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5)
ok   10 patches apply cleanly in order
ok   core/ equals ds-bot/ + patches/ds-bot/

Not run: the smoke bench (no change to index.js or src/host/), the CI package job
(pack check, typecheck, actionlint) and the merge-queue rebuild — those run in CI and on the
queue entry, not locally.

Checkpoint

{
  "pr": 1830,
  "claim": "Dev2",
  "issue": 1813,
  "summary": "The Project board's queue rows print the host's lowercase lease ids (running, stalled) through t(), which returned them unchanged because the zh map had no such keys. Two entries beside done now read 运行中 and 已停滞, reusing the capital Running wording; emitted ids and fallback stay untouched. A case binds a zh dictionary and asserts both lookups, which #1768 never covered. This tip re-applies it on b4e05acf, where #1835 re-cut the patches and rewrote client.js: bundle rebuilt, chain regenerated, second generate byte-identical, check proves core equals ds-bot plus patches.",
  "files": [
    "core/src/client/i18n.js",
    "core/test/i18n.test.js",
    "core/client.js",
    "patches/ds-bot/0001-core-fixes.patch",
    "patches/ds-bot/0008-client-bundle.patch",
    "patches/ds-bot/topics.json",
    "changelog.d/1813-board-state-i18n.fixed.md"
  ],
  "checks": {
    "ran": "TZ=UTC ARCH_DOCS_BASE=b4e05acf npm run verify; node scripts/ds-bot-patches.mjs check (twice, generate between); build-client.mjs --check",
    "result": "green",
    "at": "f0f3744b3fea565960b9a9e44f9529a5e167c0a0"
  },
  "next": "none — ready for review"
}

@HugoXK
HugoXK force-pushed the dev/2-board-state-i18n branch from f564f27 to be9be42 Compare October 30, 2026 13:00
@github-actions github-actions Bot added the risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff label Oct 30, 2026
@HugoXK
HugoXK force-pushed the dev/2-board-state-i18n branch from be9be42 to f0f3744 Compare October 30, 2026 14:56
The board's queue read emits each row's lease state as the host's own lowercase
id, and the row renders it through t(), which returns a missing key unchanged —
so a Chinese interface printed "running"/"stalled" (ThinkFlowLab#1813).

Replayed onto main f7ce89c: the change re-applied on the current main and the
generated files (core/client.js, patches/ds-bot/) regenerated from the merged
core, so nothing of main's is reverted. Only a replay of the reviewed change.

Docs-not-needed: two dictionary entries and one test; no subsystem behaviour or owned path changes.

Fixes ThinkFlowLab#1813
@Birfy
Birfy force-pushed the dev/2-board-state-i18n branch from f0f3744 to 1a56091 Compare October 30, 2026 17:55
@Birfy

Birfy commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Verdict: PASS at 1a56091
Written-by: Reviewer
Attestation: 1a56091 role=Reviewer

Ran at this tip:

$ cd core && node --test test/i18n.test.js
# tests 3  # pass 3  # fail 0
$ cp /tmp/i18n.base.js core/src/client/i18n.js   # core/src/client/i18n.js from base f7ce89c, same command
# tests 3  # pass 2  # fail 1  # AssertionError: 'running' !== '运行中' at test/i18n.test.js:59
$ cp /tmp/i18n.tip.js core/src/client/i18n.js   # restored, same command
# tests 3  # pass 3  # fail 0

Five checks at this tip: tests-ok success (Node 24, plugins tree/social/workflow/timeline, package), merge-gate success, enqueue-guard success (computed tier T1 — no PASS needed; fork head), reviewed tip success.

What I read: core/src/client/i18n.js:1353-1355 adds running: '运行中' and stalled: '已停滞' beside done; the ids core/src/client/project-board.js emits are untouched, so the fallback still reads running — the test's last assertion covers it. Generated mirrors agree with the source at this tip: core/client.js carries both entries, patches/ds-bot/0001-core-fixes.patch carries both dictionary lines plus test/i18n.test.js, patches/ds-bot/topics.json registers that test under 0001, and changelog.d/1813-board-state-i18n.fixed.md is present. Base is current main f7ce89c (1 ahead, 0 behind, 7 files).

Red first is real: with only core/src/client/i18n.js reverted to its base blob the new case fails on 'running' !== '运行中'; restored, 3/3 green.

Not run: the full core/plugin suites and the smoke bench — the CI tests-ok run at this tip covers them (2218 core, both plugin suites, package), and no index.js/src/host/ file is touched.

@github-actions github-actions Bot added the pass label Oct 30, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 30, 2026
@Birfy Birfy added the agent-pr Pull request opened by an agent label Oct 30, 2026
Merged via the queue into ThinkFlowLab:main with commit d668438 Oct 30, 2026
15 checks passed
@Birfy
Birfy deleted the dev/2-board-state-i18n branch October 30, 2026 18:09
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pass risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Project board's queue rows print running and stalled untranslated, so a zh user reads "Dev4 · running"

2 participants