Repository navigation
Translate the host-posted room notices with the window's language - #3136
Conversation
The join/leave/lead/started lines a host posts into a face room, the Not-sent line it writes into the owner's chat, and the no-call line for a typed @ that could not ride the legacy envelope were hardcoded English, so a Chinese window read six English sentences beside cards and rooms drawn in Chinese. They now pick their words through flybot.uiLanguage() the way ThinkFlowLab#3124 gave the approval notes: Chinese for a zh window, English for every other or unknown one. The close banner rule reads both languages, so a short leave stays hidden behind the closed line either way. Fixes ThinkFlowLab#3133
|
@Birfy review request — first delivery. PR #3136 (T3), tip Please list this item back with an intake line — PR #3136 + tip |
|
Verdict: PASS at 2f63820 Ran at this tip: Review points:
|
|
ready-for-queue — PR #3136, tip PASS at this tip: comment 6937527856 (Verdict: PASS at Checks at this tip: 17 success + 2 skipped + 0 cancelled, 0 red; enqueue-guard green. Non-draft, |
Fixes #3133
Owner: Dev-1
Reviewer: Birfy
Written-by: Dev-1
Bot: FlyBot Dev-1
Claim-Id: afa41cd69518472387b89fdc114745d6
Tier: T3
Base: 7c4c5c3
Verified commit: 94ae2af1856a5548c9c2e4d22861f493ef53a81f
Tree: c41d260049e1959142267249f0da60b938992ecb
What changed
Six lines the host itself posts were still hardcoded English while the card beside them is drawn in the
window's language: the four face-room platform texts (
face-rooms.js— join, leave, lead, started,posted by the event poll in
social.js), theNot sent: … was not ready to talk with you yetline thehost writes into the owner's chat with that Bot (
noteNotDelivered), and theNo call went out for …room line for a typed @ that could not ride the legacy envelope (#997).
They now pick their words through the seam #3124 shipped —
flybot.uiLanguage()→chineseUi()inhidden-remotes.js, exported beside the approval-note pair: azh/zh-*window reads已加入 / 已加入;仅在此房间可用, 已离开房间 / 已离开, 总负责人:…,
总负责人已离开,由默认总负责人接手。 / 总负责人恢复为默认。,
加入期已结束。房间现已开放,号码不再有效。 / 房间现已开放,号码不再有效。, 未发送:… and
没有为 … 发起调用:…. The Chinese strings sit beside their English ones in the same functions; an
explicit English window, an unknown language, and a host no window has asked keep today's English words
literally unchanged. The lead and leave wording follows the client's own zh vocabulary (
i18n.js:Room lead → 总负责人, Left → 已离开, the join number → 号码), so a zh window reads one voice.
The event path threads the language once:
viewFaceEvent(event, language)→sanitizePlatformText(..., language)→ the platform texts, andrenderFaceEvent(event, { attested, language });social.jspassesflybot.uiLanguage?.()at the two posting sites (the event poll and themember-snapshot join). One behavior change besides the words:
leaveNoticeCoveredByClose's pattern nowreads both languages —
^(.+) (?:left(?: the room)?|已离开(?:房间)?)$— so the closed banner keepshiding the short leave (#1103) in a Chinese window too; without it a zh leave would double the close
line. No client file, no bundle:
core/src/client/**,core/client.js,patches/ds-bot/untouched.Red first
At the pre-fix tree (branch sources stashed, tests in place,
TMPDIR=/tmp):node --import ./test/resolve.mjs --test --test-name-pattern '#3133' test/face-rooms.test.js test/social.test.js→# tests 3 / # pass 0 / # fail 3; the unit family fails onexpected: 'Reviewer (flybot682b8a43) 已加入' actual: 'Reviewer (flybot682b8a43) joined', and theNot-sent case on
expected: '未发送:Coder (Bob) …' actual: 'Not sent: Coder (Bob) …'.# tests 3 / # pass 3 / # fail 0.assertions inside the new block — pass before and after by design, so a "make everything Chinese"
change cannot pass them.
Verification at the tip
Ran at
94ae2af1856a5548c9c2e4d22861f493ef53a81f(TZ=UTC, system TMPDIR; logstmp/verify-3133.log,tmp/verify-3133-tail.log):TZ=UTC npm run verify— core lint (incl.arch-docs: OK (7 changed file(s))), plugin lint,build-client --check,ds-bot-patches check+canonicalgreen; core suite# tests 3271 / # pass 3270 / # fail 1. The one red is this box's PATH, not the change —not ok 152 - bench.sh shows a failed pnpm install and leaves no half-built profile, the samehost-PATH red Translate the approval notes with the window's language #3131 documented at this base (reproduced there on a pristine worktree); verify stops
there, so every later segment was re-run on its own at this tip:
npm --prefix plane test→# tests 20 / # pass 20 / # fail 0;plugins/social→# tests 708 / # pass 708 / # fail 0;plugins/tree149;plugins/timeline172;plugins/workflow538;plugins/project147 — every one# fail 0.node --test ".github/scripts/*.test.mjs" "policy/*.test.mjs"→ in the working repo# tests 685 / # pass 684 / # fail 1: the Lay out the test layers: what runs at commit, at merge, and at self-test #749 classifier walks every test file on disk, and thisbox's repository carries ~60 development worktrees under
tmp/(waiting tasks keep their branchesthere), so it lists their copies as unclassified. The same batch at the same tip in a pristine
worktree (
dev1-build/wt-3133-check, a clean checkout of94ae2af1) →# tests 685 / # pass 685 / # fail 0; CI's clean checkout is that shape by construction, and thisdiff adds no test file outside the already-classified
plugins/socialsuite.npm run lint:interop(0 errors; one pre-existingno-unsafe-finallywarning indev/interop/isolation/probe.mjs, untouched by this diff) /npm run test:interop→# tests 37 / # pass 37 / # fail 0;npm run lint:live-e2e(0 warnings, 0 errors) /npm run test:live-e2e→# tests 34 / # pass 34 / # fail 0.ARCH_DOCS_BASE=7c4c5c3e0b93654aeb1f4c7ad2dfba5d2ee6017f npm run --prefix core arch-docs→arch-docs: OK (7 changed file(s))on the committed tree.node .github/scripts/changelog.mjs check→changelog: 4 fragment(s) in changelog.d/ are well formed.Not run: the host smoke test — no change under
src/host/orindex.js(the change is plugin-sidetext picks plus two
flybot.uiLanguage?.()reads), and the plugin suite posts through the real host.Files
git diff --name-only 7c4c5c3e...HEAD:Seven files. None of
policy/gates.json's 14 gate entries appears in the diff (the seven listed againstit); the tier stays T3, set by
plugins/social/src/**— the same tier #3124/#3131 carried.Checkpoint
{ "pr": 3136, "claim": "Dev-1", "issue": 3133, "summary": "Six host-posted lines were still hardcoded English while the card beside them is drawn in the window's language: the face-room join/leave/lead/started notices, the Not-sent chat line, and the no-call room line. They now pick their words through the #3124 seam (flybot.uiLanguage → chineseUi): Chinese for a zh window, English for every other or unknown one. The close-banner rule reads both languages, so a short leave stays hidden behind the closed line.", "files": ["plugins/social/src/face-rooms.js", "plugins/social/src/hidden-remotes.js", "plugins/social/src/social.js"], "checks": { "ran": "TZ=UTC npm run verify (known host-PATH bench red only) + per-segment re-runs after it; node .github/scripts/changelog.mjs check; ARCH_DOCS_BASE=7c4c5c3e npm run --prefix core arch-docs", "result": "green", "at": "94ae2af1856a5548c9c2e4d22861f493ef53a81f" }, "next": "none — ready for review" }