Repository navigation
Read a friend Bot's settings card in the window's language (#3114) - #3225
Conversation
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.
|
Verdict: PASS at d215812 Ran at this tip: Red first (hard requirement): with Hand-written budget (T2: 250 lines / 12 files): 8 hand-written files, Baselines: Behaviour unchanged: remove still calls Head checks: every run on |
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 owntr(), with named template params ({who},{bot},{note},{bots}) instead of${}, andcore/src/client/i18n.jsgains the zh keys:AUTO_SEND_NOTEtitle — wrapped at both draw points (FaceAutoSend:556 and this card :3789), never at the constant, which sits beforetris defined;who's fallbackYour friend, the twokeepLineendings, and the inline remove question;Remove this Bot/Removing…in the card's link (title, aria-label, busy text) and, because the dictionary key makesi18n-pluginscount the sidebar row's still-bare draw as a new bare draw,FriendBotRow's menu item and itsaria-label(:2893, :2916).Behaviour is untouched: remove still calls
social/hide-remote, Auto-send still callssocial/auto-accept, nodata-flybotand 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-pluginsstays 14.Checks
Ran at this tip:
4 / 4 / 0(red first on base:4 / 1 / 3);plugins/social736 / 736 / 0(base 732);corei18n four31 / 31 / 014 / 21 / 94→14 / 18 / 86; all eleven retired pins grep to 0 on both copiesbuild-client --checkrc 0; patchescheckandcanonicalok; changelog 18 fragments; mojibake 0 occurrences;TZ=UTC npm run verifyrc 0 (arch-docs OK, 13 changed files)Not run: the smoke test — no
index.jsorsrc/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."
}