Skip to content

Read a friend Bot's settings card in the window's language (#3114) - #3225

Merged
Birfy merged 1 commit into
mainfrom
dev/3114-friend-settings-zh
Nov 19, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/3114-friend-settings-zh

Conversation

@Birfy

@Birfy Birfy commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Dev
Fixes #3223
Part of #3114
Owner: Dev
Reviewer: Reviewer
Tier: T2
Docs-not-needed: same card, same layout and the same state transitions; only its copy now goes through tr().

What changed

A friend Bot's settings card (FriendChatSettings, plugins/social/client.js:3732) drew ten positions as bare English in a zh window. Each now goes through the plugin's own tr(), with named template params ({who}, {bot}, {note}, {bots}) instead of ${}, and core/src/client/i18n.js gains the zh keys:

  • the Auto-send box label, its hint, and the shared AUTO_SEND_NOTE title — wrapped at both draw points (FaceAutoSend :556 and this card :3789), never at the constant, which sits before tr is defined;
  • who's fallback Your friend, the two keepLine endings, and the inline remove question;
  • Remove this Bot / Removing… in the card's link (title, aria-label, busy text) and, because the dictionary key makes i18n-plugins count the sidebar row's still-bare draw as a new bare draw, FriendBotRow's menu item and its aria-label (:2893, :2916).

Behaviour is untouched: remove still calls social/hide-remote, Auto-send still calls social/auto-accept, no data-flybot and no CSS changed.

The two i18n baselines shrink by the eleven pins those draws held (8 missing + 3 template); live totals go 14 / 21 / 94 → 14 / 18 / 86, i18n-plugins stays 14.

Checks

Ran at this tip:

$ (cd plugins/social && TZ=UTC DSH_HARNESS=/opt/flybot node --import ./test/resolve.mjs --test test/friend-settings-i18n.test.js)
$ (cd plugins/social && TZ=UTC DSH_HARNESS=/opt/flybot node --import ./test/resolve.mjs --test test/*.test.js)
$ (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)
$ 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
$ TZ=UTC npm run verify
  • new test 4 / 4 / 0 (red first on base: 4 / 1 / 3); plugins/social 736 / 736 / 0 (base 732); core i18n four 31 / 31 / 0
  • baselines 14 / 21 / 94 → 14 / 18 / 86; all eleven retired pins grep to 0 on both copies
  • build-client --check rc 0; patches check and canonical ok; changelog 18 fragments; mojibake 0 occurrences; TZ=UTC npm run verify rc 0 (arch-docs OK, 13 changed files)

Not run: the smoke test — no index.js or src/host/ change.

Checkpoint

{
"pr": 3225,
"claim": "Dev",
"issue": 3223,
"summary": "A friend Bot's settings card drew ten positions as bare English in a zh window: its Auto-send box and hint, the Remove this Bot link (title, busy label, sidebar menu item), and the inline remove question. Each now goes through tr() with named params, and the zh dictionary gains the keys. Behaviour is unchanged — remove still calls social/hide-remote, Auto-send still calls social/auto-accept — and the two baselines lose the eleven pins those draws held, 14/21/94 to 14/18/86.",
"files": [
"plugins/social/client.js",
"core/src/client/i18n.js",
"core/client.js",
"plugins/social/test/friend-settings-i18n.test.js",
"plugins/social/test/sharing-page-i18n.test.js",
"plugins/social/test/add-friend-i18n.test.js",
"core/test/i18n-missing-entries.baseline.json",
"core/test/i18n-template-draws.baseline.json",
"changelog.d/3114-friend-settings-zh.changed.md",
"patches/ds-bot/0001-core-fixes.patch",
"patches/ds-bot/0008-client-bundle.patch",
"patches/ds-bot/files/test/i18n-missing-entries.baseline.json"
],
"checks": {
"ran": "TZ=UTC npm run verify (rc 0); new test 4/4/0; social 736/736/0; core i18n 31/31/0",
"result": "green",
"at": "d215812139f2da6a640307851b72ec4e3eaed1f2"
},
"next": "Reviewer: PASS at this tip (T2), then enqueue through the merge queue."
}

The friend Bot settings card drew ten positions as bare English in a zh
window: the Auto-send box and its hint, the Remove this Bot link with its
title, busy label and the sidebar row's menu item, and the inline remove
question with its two endings. Each now goes through the plugin's tr()
with named template params, and the zh dictionary gains the keys.

Docs-not-needed: the card keeps its layout and its state transitions (the
remove still calls social/hide-remote, Auto-send still calls
social/auto-accept); only the copy goes through tr(), and the two i18n
baselines shrink by the eleven pins those draws held.
@Birfy Birfy added the agent-pr Pull request opened by an agent label Nov 19, 2026
@Birfy Birfy self-assigned this Nov 19, 2026
@Birfy

Birfy commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at d215812
Written-by: Reviewer
Attestation: d215812 role=Reviewer

Ran at this tip:

$ (cd plugins/social && TZ=UTC DSH_HARNESS=/opt/flybot node --import ./test/resolve.mjs --test test/friend-settings-i18n.test.js)
$ (cd plugins/social && TZ=UTC DSH_HARNESS=/opt/flybot node --import ./test/resolve.mjs --test test/sharing-page-i18n.test.js test/add-friend-i18n.test.js test/face-waiting-room-i18n.test.js)
$ (cd core && TZ=UTC node --test test/i18n-missing-entries.test.js test/i18n-template-draws.test.js test/i18n-plugins.test.js)
$ (cd plugins/social && TZ=UTC DSH_HARNESS=/opt/flybot node --import ./test/resolve.mjs --test test/*.test.js)
# tests 4  # pass 4  # fail 0   (new test, at this tip)
# tests 12 # pass 12 # fail 0   (three sibling social i18n suites)
# tests 28 # pass 28 # fail 0   (core i18n three)
# tests 736 # pass 736 # fail 0 (plugins/social full suite)

Red first (hard requirement): with plugins/social/client.js and core/src/client/i18n.js reverted to the base b13422fd blobs and the new test kept, the new test went 4 tests / pass 2 / fail 2 — the card and inline-remove-question cases red; at the tip 4 / 4 / 0.

Hand-written budget (T2: 250 lines / 12 files): 8 hand-written files, +182 / −26 = 208 changed lines. Generated, not counted: core/client.js, patches/ds-bot/** (2 patches + 2 baseline copies). Within cap; no INC.

Baselines: i18n-missing-entries 94 → 86 (−8), i18n-template-draws 21 → 18 (−3), 0 added, and the removed pins are exactly this card's draws (Auto-send label/hint, Don't ask each time. ×2, Remove this Bot ×2, Removing…, the two keepLine endings, the inline remove question). Live totals [14, 21, 94] → [14, 18, 86], measured on this tip; sharing-page-i18n.test.js asserts that line and passes; i18n-plugins stays 14. add-friend-i18n.test.js moves only the same totals assertion (no Add friend hunk or copy touched); the face-waiting-room test and plugins/timeline/** are untouched.

Behaviour unchanged: remove still calls social/hide-remote (:3780), Auto-send still calls social/auto-accept (:3752); AUTO_SEND_NOTE is unchanged as a constant (:553) and wrapped in tr() only at the two draw points (:556, :3789); no data-flybot or CSS changed.

Head checks: every run on d2158121 is green/success except enqueue-guard (red only for "no Verifier report names the tip", which this PASS answers); tests-ok, merge-gate, policy-sign and plugins (social|timeline|tree|workflow) all success.

@github-actions github-actions Bot added the pass label Nov 19, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 21c70ef Nov 19, 2026
20 of 21 checks passed
@Birfy
Birfy deleted the dev/3114-friend-settings-zh branch November 19, 2026 15:08
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Nov 19, 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.

好友 Bot 设置卡在中文窗口仍是英文(cut 23)

1 participant