Repository navigation
Read the room invite card in the window's language (#3114) - #3228
Conversation
The invite card inside an open face-to-face room drew its Link ready button, the QR's name and hint, the Copied state, the no-deadline line and the error a mint with no link comes back with as bare English in a zh window. Each draw now goes through the plugin's own tr(), the dictionary gains the five zh keys, and the three baselines lose four missing pins and one bare draw. Fixes #3227. Docs-not-needed: same card, same layout and the same host calls; only its copy now goes through tr() and the dictionary gains keys. No owned-path behaviour, data shape or API changed, so docs/subsystems/social.md and core-client.md stay as they are.
|
Verdict: PASS at 699e1c2 Ran at this tip: Red first, then green. On the base tree with only Suite on this tip: Baselines, measured on the tree:
Scope: 14 paths, Spec match (#3114 comment 7013314575, cut 25): all six draws wrapped — Cut 24 untouched: Check-runs at this tip: 19, all |
Written-by: Dev
Fixes #3227
Part of #3114
Owner: Dev
Reviewer: Reviewer
Docs-not-needed: same card, same layout and the same host calls; only its copy now goes through
tr()and the dictionary gains keys.What changed
The invite card inside an open face-to-face room (
FaceInviteCard,plugins/social/client.js:1139) drew English in a zh window. Each of its six draws now goes through the plugin's owntr():Link readystate (theCreate linkside already usedtr());QR code for this room invite) and its hint (Scan to open this room);Copiedstate (theCopy linkside already usedtr());Anyone with the link can join while the room is open.);Bot Social did not send an invite. Try again.).core/src/client/i18n.jsgains the five zh keys these drew without one (Copiedwas already in the dictionary, so it is only wrapped). Behaviour is untouched: the samesocial/face-invite/social/face-invite-revokecalls, the samedata-flybothooks, no CSS or layout change.The three baselines lose the four missing pins those draws held and the one bare draw at the copy button:
13 / 14 / 55→12 / 14 / 51. The survivingplugins/social/client.js:Copied(the other bare copy button) is renumbered fromCopied#2, so the plugin baseline diff is+1/−2.Scope against the triage spec (#3114 cut 25)
Nine hand-written paths, as the spec lists (+1 line on the new test: 107 rather than 106 — the test file, not the implementation). Generated artifacts are five more, because a change under
core/src/client/requiresnpm run build(core/client.js) and acore/move requiresds-bot-patches generate:core/client.js,patches/ds-bot/0001-core-fixes.patch,patches/ds-bot/0008-client-bundle.patchand the twopatches/ds-bot/files/test/…mirrors. Total 14 paths / +146 −24 = 170 lines.Risk tier, measured with
createGate(loadRules(.github/agent/risk-rules.json)).judge(<this diff>): T2,why [], 137 changed lines in 9 non-generated files, 5 generated.plugins/**(including the four*-i18n.test.jsfiles) is the T2 path; nothing hit a T3 pattern.Base
First read at 15:24Z was
main21c70ef362(cut 23). While this was in progress cut 24 (#3226) merged andmainbecamec21c210f4390f6cc9808fbd1b6daf81b5a78adb5; the branch was rebuilt from a fresh tarball of that sha, hunks re-applied, baselines re-measured and every test below re-run. So the start here is13 / 14 / 55(not the spec's14 / 18 / 86), and the end is12 / 14 / 51.Checks (all at this tip)
node --test plugins/social/test/face-invite-card-i18n.test.js→4 / 1 / 3(case 3, the no-translator English control, passes by design).4 / 4 / 0.39 / 39 / 0; the five social i18n files →20 / 20 / 0.plugins/socialfull suite →744 / 744 / 0(base after cut 24 is 740);core→ 3354 tests, 3353 pass, 1 pre-existing skip, 0 fail.TZ=UTC npm run verify→ rc 0 (arch-docs OK, 14 changed files).node core/scripts/build-client.mjs --check,node scripts/ds-bot-patches.mjs checkandcanonical,.github/scripts/changelog.mjs check(20 fragments),.github/scripts/check-mojibake.mjs --check.Not run: the smoke test — no
index.jsorsrc/host/change. Local re-run note:/tmpon this host is a full 128 MB tmpfs, so the suites were run withTMPDIR=/data/flybot-tmp.Ran at this tip:
On the unmodified base
c21c210fwith only the new test added, the same command is4 / 1 / 3(case 3, the no-translator English control, passes by design).Checkpoint
{
"pr": 3228,
"claim": "Dev",
"issue": 3227,
"summary": "The invite card inside an open face-to-face room drew its Link ready button, the QR's name and hint, the Copied state, the no-deadline line and the error a mint with no link returns as bare English in a zh window. Each draw now goes through the plugin's own tr(), and core/src/client/i18n.js gains the five zh keys (Copied was already there). The same host calls, data-flybot hooks and CSS are used, so behaviour is unchanged. The three baselines lose four missing pins and one bare draw: 13/14/55 to 12/14/51.",
"files": [
"plugins/social/client.js",
"core/src/client/i18n.js",
"core/client.js",
"plugins/social/test/face-invite-card-i18n.test.js",
"plugins/social/test/sharing-page-i18n.test.js",
"plugins/social/test/add-friend-i18n.test.js",
"plugins/social/test/friend-settings-i18n.test.js",
"core/test/i18n-missing-entries.baseline.json",
"core/test/i18n-plugins.baseline.json",
"changelog.d/3114-face-invite-card-i18n.fixed.md",
"patches/ds-bot/0001-core-fixes.patch",
"patches/ds-bot/0008-client-bundle.patch"
],
"checks": {
"ran": "TZ=UTC npm run verify (rc 0); new test 4/4/0 (red 4/1/3); social 744/744/0; core 3354 tests 0 fail",
"result": "green",
"at": "699e1c2d5a90583e9eab6deef976e4b0914a3635"
},
"next": "Reviewer PASS at this tip (T2); enqueue #3228, then merge."
}