Skip to content

Commit 4069eb5

Browse files
committed
build(core): rebuild client.js for the face chip's zh labels
Generated by `npm --prefix core run build` from core/src/client, and `node scripts/ds-bot-patches.mjs generate` so core/ stays equal to ds-bot/ + patches/ds-bot/. The 0008 hunk only adds the four zh entries; it carries no other branch's content.
1 parent 3e901fa commit 4069eb5

12 files changed

Lines changed: 173 additions & 16 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The face-to-face room status chip now reads in the window's language in every state — **Open**, **Closed**, **Left**, **Ended**, **Joining** — and an expired matching window says **Ended** instead of printing the internal `ended` status id (#3090).

‎core/client.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,10 @@ var ZH = {
12481248
"Source code": "源代码",
12491249
"Release notes": "发布说明",
12501250
Open: "打开",
1251+
Closed: "已关闭",
1252+
Left: "已离开",
1253+
Ended: "已结束",
1254+
Joining: "加入中",
12511255
// Feedback and errors
12521256
Feedback: "反馈",
12531257
"Report a problem": "报告问题",

‎core/src/client/i18n.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,10 @@ const ZH = {
12021202
'Source code': '源代码',
12031203
'Release notes': '发布说明',
12041204
Open: '打开',
1205+
Closed: '已关闭',
1206+
Left: '已离开',
1207+
Ended: '已结束',
1208+
Joining: '加入中',
12051209
// Feedback and errors
12061210
Feedback: '反馈',
12071211
'Report a problem': '报告问题',

‎core/test/i18n-missing-entries.baseline.json‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"plugins/social/client.js:Bot Social could not look up that link right now. Try again.",
1515
"plugins/social/client.js:Chat paused",
1616
"plugins/social/client.js:Choose which of your Bots join.",
17-
"plugins/social/client.js:Closed",
1817
"plugins/social/client.js:Copy with instructions",
1918
"plugins/social/client.js:Could not copy. Select the link and copy it by hand.#1",
2019
"plugins/social/client.js:Could not copy. Select the link and copy it by hand.#2",
@@ -36,13 +35,11 @@
3635
"plugins/social/client.js:Invites need a newer Bot Social. The 6-digit number still works.#2",
3736
"plugins/social/client.js:Invites need a newer Bot Social. The 6-digit number still works.#3",
3837
"plugins/social/client.js:Joined {}'s invite, but their Bot hasn't loaded yet. It shows in your list when it does; if not, accept the link again.{}",
39-
"plugins/social/client.js:Joining",
4038
"plugins/social/client.js:Joining with that link…#1",
4139
"plugins/social/client.js:Joining with that link…#2",
4240
"plugins/social/client.js:Leave this room?",
4341
"plugins/social/client.js:Leave#1",
4442
"plugins/social/client.js:Leave#2",
45-
"plugins/social/client.js:Left",
4643
"plugins/social/client.js:Link ready",
4744
"plugins/social/client.js:Loading friends…",
4845
"plugins/social/client.js:Loading your Bots…",

‎docs/subsystems/core-client.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The browser side of the patched `ds-bot` core (`core/`): sources in `core/src/cl
3737
| `core/src/client/memory-empty.js` | The memory dialog's refused-folder line (#2101), decided by pure helpers because the suite has no renderer: `memoryEmptyNotice(view)` answers one line naming the folder when `entries` is empty and the host reported refused scopes in `view.blocked`, and `null` for the ordinary empty view, so `memory-panel.js` draws it above `{name} has not saved anything yet`; `memoryBlockedNotice(view)` answers that same line from `view.blocked` alone, whatever `entries` holds, and the panel draws it above the summary and above the entries list, because `entries` is own and team merged and one scope's entries would otherwise silence the other scope's refusal. A refused folder and a fresh Bot both answer `entries: []`; the host side of that field is in [core-host](core-host.md). Tests: `core/test/memory-empty.test.js`. |
3838
| `core/src/client/memory-panel.js` | The memory dialog. `MemoryRow` is the Bot details pane's row — how much it keeps and the way into `MemoryDialog` — and `useMemoryCount` keeps that count from the same read the dialog does, so a read the host refuses answers `memoryCountText`'s sentence with the host's reason instead of `Loading…` for as long as the window stays open, while an empty memory and an arrived count keep their own wording; that sentence is drawn a second time below the row in a `role="status"` note, because the row's `aria-label` replaces the text inside the button whenever the accessible name is computed (#2402). The dialog has two pages: the summary the model writes from the entries (stale and failed states, **Try again**), and the entries themselves behind the ⋯ menu, grouped by scope and topic with a two-click **Remove**. The foot's **Ask or update** is one model call that answers from the entries or changes them, and lists each change as applied or refused. `useMemoryView` re-reads every `POLL_MS` while a summary is being written and only the latest answer counts. Since #2276 a read-only window (`roster.readOnly` a non-empty string) draws neither **Remove** nor the ask form — the host refuses `memory-forget` and `memory-ask` — and says why in the host's own sentence, while the entries and **Regenerate summary** (a read) still work. Tests: `core/test/memory-panel-readonly.test.js`, `core/test/memory.test.js`, `core/test/memory-empty.test.js`, `core/test/memory-search.test.js`. |
3939
| `core/src/client/exchange.js` | The Bot-exchange sheet: `ExchangeDialog` polls the stored turns between two Bots and `ExchangeLine` draws one. A stored line is read once, by `exchangeText`: a leading `Chief → 助手` delegation trace and an `<untrusted-message …>` fence are routing, not words, so the bubble and the message tools' **Copy** receive the same cleaned string. Unlike a sidebar row it is not folded to one line — a reply's paragraph breaks are the writer's own and stay exactly as stored. Since #2841 the trace is read the way every other surface reads it: `stripTrace(text, names)` in `src/client/text.js` removes a leading trace only when every hop is a roster Bot name, the names reach `readableLine`/`collapsedLine` and the bubble call sites (`cells.js`, `exchange.js`) as `botNames(roster)`, and with no roster nothing that merely looks like routing is removed — a reply that opens `Settings → Models 页面` keeps that line, and a real `Chief → FlyBot Dev-1: 正文` still reads `正文`. Tests: `core/test/exchange-read.test.js`, `core/test/inbound-ui.test.js`. |
40-
| `core/src/client/i18n.js` | The zh map the host `t()` reads. A plugin Settings page that calls `t('…')` adds the English key here (Settings → Bot Social friends and sharing, #1074); `npm run build` in `core/` copies the same map into `core/client.js`. |
40+
| `core/src/client/i18n.js` | The zh map the host `t()` reads. A plugin Settings page that calls `t('…')` adds the English key here (Settings → Bot Social friends and sharing, #1074); `npm run build` in `core/` copies the same map into `core/client.js`. The same map carries the words a plugin draws itself: the social plugin's face-room status chip calls `t()` for all five states — **Open** / **Closed** / **Left** / **Ended** / **Joining** (#3090) — so a missing key here leaves that chip in English. |
4141
| `core/src/client/new-chat.js` | Sidebar **+** picker. Plugin rows via `flybot.new-chat.action` (`newChatActionRows` in `flybot-registry.js`); social adds Face-to-face room and Add friend (copy actions live inside Add friend, #181). The DSH Agent row reads **Add coding agent** (hint "A plain DSH session, not a Bot") so it is not mistaken for **Create new Bot** (#181). The short + menu does not list individual Bots. A group the host refuses because one of my Bots is not shared with the friend whose Bot is in it (`error.details.reason === 'ungranted-local'`, put on the error by `client/api.js`) is drawn as a card, not a red line: it names the Bot(s) and friend(s), and offers **Copy invite link for {Bot}** (`__flybot__.social.createInvite`; shown only when social is loaded and can invite that Bot, nothing is granted by the click; it says *copied* only when `copiedToClipboard` in `shared/remote-label.js` reports the write took, else it shows the link in a read-only, select-on-focus field to copy by hand) and **Leave {Bot} out** (`ungrantedLocalFix`, `shared/remote-label.js`). |
4242
| `core/src/client/stats-dock.js` | The shell's run-stats footer under the composer (`conversation.composer.dock`) re-registered one priority lower with the shell's own component, inject and `chat` locale, so the English counts read **1 turn** / **1 step** instead of `1 turns 1 steps` (`pluralStats` rewrites only the exact English template, #419). The shell ids differ by version — one `stats` footer in 0.2.0-rc.2, the counts split into an `activity` pill next to `usage` in 0.2.1-alpha.1 — so `statsDocks` registers one wrapper per id and the wrapper whose id the shell does not publish draws nothing (#659); `usage` stays hidden. Still hidden in a friend's Bot chat by CSS (#419). Tests: `core/test/stats-dock.test.js`. |
4343
| `core/src/client/room-invite-preview.js` | The one room-invite preview card (#876). `invitePreviewOf` says only what a server reply can honestly say (a name cleaned at fixed point, the lead, `n / m in the room`, the deadline), `inviteCountdown` words the deadline, `RoomInvitePreview` draws the card from a caller-supplied `h`; `kind` renames the `data-flybot` hooks, so the face-room paste flow (`face-link-preview`) and the member-invite dialog (`room-invite-preview`) render the same tree instead of two copies of the markup. Registered on `__flybot__` in `flybot-slots.js`, because a classic-script plugin cannot import it. Tests: `core/test/room-invite-preview.test.js`. |

0 commit comments

Comments
 (0)