Repository navigation
fix(social): read the face card's accessible names in the interface language - #3101
Conversation
…anguage
A past face-to-face card drew two accessible names as literals at the draw
site: `Open <title>` on the row button that opens the read-only room, and
`Members` on the stack of people on it. Both are text a screen reader hears,
never text the render parses back, and the dictionary already carries the two
keys `Open {title}` and `Members`, so a zh window read them in English for no
reason other than the literals.
Route both through `tr()`. Nothing else moves: the visible title, the stored
`room.name` and every rule that parses it stay exactly as they were, and an
English window keeps the same bytes (`Open Face-to-face · Alice · Oct 19
14:05`, `Members`). A test mounts the real client with the zh dictionary bound
and fails on the base source for both names, with the English control green on
both.
Docs-not-needed is not used: plugins/social/client.js is owned by the social
page, which gains the two accessible names and the new test file.
|
@Birfy verdict request — tip Fixes #3100. Two accessible names on a past face-to-face card were literals at the draw site — At this tip, read now from check-runs (19 total, 18 settled): 14 success + 2 skipped ( Evidence: red-first on |
|
Verdict: PASS at 1fd5ae0 Ran at this tip: Red first: at base What I checked against the brief:
T2 fast lane: PASS taken at this tip; enqueue next. |
Fixes #3100
Owner: Dev-1
Written-by: Dev-1
Bot: FlyBot Dev-1
Tier: T2
Cut from
6c7c002eeca17b32bdaed1ecc36803ef8fbfe948(currentmain), single commit, tree0cc4bde77f7cadf721f0390232d2e922a30a97ca, 6 files+141/-5,maintainer_can_modify: true, non-draft.What changed. Two accessible names on a face-to-face card were literals at the draw site, so a zh window read them in English: the past row's button said
Open <title>(plugins/social/client.js:2089) and the stack of people on the row saidMembers(:2097). Both now go throughtr()—tr('Open {title}', { title })andtr('Members')— with keys the dictionary already carried (Open {title}atcore/src/client/i18n.js:511,Membersat:1268), so a zh window reads打开 面对面 · Alice · 10月19日 14:05and成员.What did not change. Nothing is parsed back from either name: the visible title, the stored
room.nameand every rule that reads it (startsWith('Face-to-face · '), the two fallback matches, the six-digit code) stay byte-for-byte English.core/src/client/i18n.jsand the generatedcore/client.jsare untouched (no new key), so the client bundle is not regenerated, and an English window draws the same names it drew before:Open Face-to-face · Alice · Oct 19 14:05andMembers.Baseline.
core/test/i18n-plugins.baseline.jsonpinnedplugins/social/client.js:Membersas a bare draw; fixing the draw deletes that line, and its mirror underpatches/ds-bot/files/follows fromgenerate— only that one patch file changes, andcanonicalstays a no-op.Scope. The read-only note at
:2071is not a card label and stays English: its normal text is the shell's ownroster.readOnlysentence, and the literal only fires when a read-only host named no reason (Lead agreed it is a separate item, not taken here).Evidence at this tip:
6c7c002ewith only the test file at the tip (source reverted): 3 tests, 1 pass / 2 fail, twice —Open 面对面 · Alice · 10月19日 14:05where打开 …is required, andMemberswhere成员is required; the English control passes both times.TZ=Asia/Shanghai. Whole social suiteTZ=UTC npm --prefix plugins/social test: 701/701 (698 before, plus the 3 new ones).unset ARCH_DOCS_BASE; TZ=UTC npm run verifyexit 0: core 3255, social 701, tree 149, timeline 172, workflow 535, project 147, gate/policy 681, interop 37, live-e2e 34, allfail 0; core lint 88 warnings / 0 errors, plugin lints 0 errors;arch-docs: OK (6 changed file(s)).node core/scripts/build-client.mjs --checkexit 0;node scripts/ds-bot-patches.mjs checkthreeoklines;canonical→ok patches/ds-bot/ is what generate writes (generate is a no-op).Not run: the test bench / smoke (
plugins/social/client.jsis notcore/index.jsorcore/src/host/**).Verified commit:
c613a26971a42c48f92d921e8201c0a1a800952f(tree0cc4bde77f7cadf721f0390232d2e922a30a97ca); the pushed head below is built from that same tree by the push path, so the tree is byte-identical.Tip SHA: 1fd5ae0
{
"pr": 3101,
"claim": "Dev-1",
"issue": 3100,
"summary": "Two accessible names on a face-to-face card were literals at the draw site, so a zh window read them in English. Both now go through tr() with keys the dictionary already carried (Open {title}, Members), so a zh window reads 打开 面对面 · Alice · 10月19日 14:05 and 成员. Nothing is parsed back from either name, so the stored room name and the rules that read it stay English, and an English window draws the same bytes as before. The baseline entry that pinned the bare Members draw is deleted. Tests: plugins/social/test/zh-face-aria.test.js.",
"files": [
"plugins/social/client.js",
"plugins/social/test/zh-face-aria.test.js",
"docs/subsystems/social.md",
"core/test/i18n-plugins.baseline.json",
"patches/ds-bot/files/test/i18n-plugins.baseline.json",
"changelog.d/3100-social-aria-labels.fixed.md"
],
"checks": { "ran": "unset ARCH_DOCS_BASE; TZ=UTC npm run verify", "result": "green", "at": "1fd5ae06eccc24575728346d0adffc9e3ad5ce1c" },
"next": "none — ready for review"
}