From 401868395a04fd5edb1e3a0ce641974a47aea606 Mon Sep 17 00:00:00 2001 From: Danyang Chen Date: Tue, 1 Dec 2026 17:44:45 +0800 Subject: [PATCH] web: give /about an English channel through the page dictionary /about was one of the 21 pages the server never renders into English, so it shipped Chinese under whatever language the reader asked for. This slice marks its own body, adds the page keys to the shared page dictionary, and lets the gate render it, following the shape the contacts, guide and download slice established. Related #3479 --- docs/inventory/visible-controls.json | 10 +++--- flybot_workspace/static/about/index.html | 34 +++++++++---------- .../static/shell/system-locale-pages.mjs | 31 +++++++++++++++-- runtime/flybot-workspace-web/src/pages.js | 8 ++--- tests/system_locale.test.mjs | 4 +-- 5 files changed, 56 insertions(+), 31 deletions(-) diff --git a/docs/inventory/visible-controls.json b/docs/inventory/visible-controls.json index 75a8fac1c..1ec7af6e6 100644 --- a/docs/inventory/visible-controls.json +++ b/docs/inventory/visible-controls.json @@ -223,11 +223,11 @@ {"source": "flybot_workspace/static/about/index.html", "line": 17, "tag": "a", "id": null, "name": null, "href": "/settings", "type": null, "label": "返回设置 ‹ 设置", "initially_disabled": false, "data": {"data-ui-label": "settings.back"}, "execution_profile": "about", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, {"source": "flybot_workspace/static/about/index.html", "line": 18, "tag": "a", "id": null, "name": null, "href": "/chat", "type": null, "label": " FlyBot", "initially_disabled": false, "data": {}, "execution_profile": "about", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, {"source": "flybot_workspace/static/about/index.html", "line": 27, "tag": "a", "id": null, "name": null, "href": "https://github.com/ThinkFlowLab/FlyBot/releases/tag/v0.3.0", "type": null, "label": " v0.3.0", "initially_disabled": false, "data": {}, "execution_profile": "about", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, - {"source": "flybot_workspace/static/about/index.html", "line": 31, "tag": "a", "id": null, "name": null, "href": "https://github.com/ThinkFlowLab/FlyBot#readme", "type": null, "label": " 观看特性演示", "initially_disabled": false, "data": {}, "execution_profile": "about", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, - {"source": "flybot_workspace/static/about/index.html", "line": 32, "tag": "a", "id": null, "name": null, "href": "https://github.com/ThinkFlowLab/FlyBot/releases/tag/v0.3.0", "type": null, "label": " 查看版本说明", "initially_disabled": false, "data": {}, "execution_profile": "about", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, - {"source": "flybot_workspace/static/about/index.html", "line": 61, "tag": "a", "id": null, "name": null, "href": "https://github.com/ThinkFlowLab/FlyBot/blob/main/docs/GETTING_STARTED.md", "type": null, "label": " 自托管指南", "initially_disabled": false, "data": {}, "execution_profile": "about", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, - {"source": "flybot_workspace/static/about/index.html", "line": 65, "tag": "a", "id": null, "name": null, "href": "https://github.com/ThinkFlowLab/FlyBot", "type": null, "label": " 源代码", "initially_disabled": false, "data": {}, "execution_profile": "about", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, - {"source": "flybot_workspace/static/about/index.html", "line": 66, "tag": "a", "id": null, "name": null, "href": "https://github.com/ThinkFlowLab/FlyBot/issues", "type": null, "label": " 问题反馈", "initially_disabled": false, "data": {}, "execution_profile": "about", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, + {"source": "flybot_workspace/static/about/index.html", "line": 31, "tag": "a", "id": null, "name": null, "href": "https://github.com/ThinkFlowLab/FlyBot#readme", "type": null, "label": " 观看特性演示", "initially_disabled": false, "data": {"data-ui-text": "about.demo"}, "execution_profile": "about", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, + {"source": "flybot_workspace/static/about/index.html", "line": 32, "tag": "a", "id": null, "name": null, "href": "https://github.com/ThinkFlowLab/FlyBot/releases/tag/v0.3.0", "type": null, "label": " 查看版本说明", "initially_disabled": false, "data": {"data-ui-text": "about.release_notes"}, "execution_profile": "about", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, + {"source": "flybot_workspace/static/about/index.html", "line": 61, "tag": "a", "id": null, "name": null, "href": "https://github.com/ThinkFlowLab/FlyBot/blob/main/docs/GETTING_STARTED.md", "type": null, "label": " 自托管指南", "initially_disabled": false, "data": {"data-ui-text": "about.self_host"}, "execution_profile": "about", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, + {"source": "flybot_workspace/static/about/index.html", "line": 65, "tag": "a", "id": null, "name": null, "href": "https://github.com/ThinkFlowLab/FlyBot", "type": null, "label": " 源代码", "initially_disabled": false, "data": {"data-ui-text": "about.source"}, "execution_profile": "about", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, + {"source": "flybot_workspace/static/about/index.html", "line": 66, "tag": "a", "id": null, "name": null, "href": "https://github.com/ThinkFlowLab/FlyBot/issues", "type": null, "label": " 问题反馈", "initially_disabled": false, "data": {"data-ui-text": "about.issues"}, "execution_profile": "about", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, {"source": "flybot_workspace/static/agents/index.html", "line": 18, "tag": "a", "id": null, "name": null, "href": "#main", "type": null, "label": " 跳到主要内容", "initially_disabled": false, "data": {"data-ui-text": "shell.skip"}, "execution_profile": "agents", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, {"source": "flybot_workspace/static/agents/index.html", "line": 20, "tag": "a", "id": null, "name": null, "href": "/chat", "type": null, "label": "FlyBot", "initially_disabled": false, "data": {"data-ui-title": "shell.brand.chat"}, "execution_profile": "agents", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, {"source": "flybot_workspace/static/agents/index.html", "line": 22, "tag": "a", "id": null, "name": null, "href": "/chat", "type": null, "label": "聊天 聊天", "initially_disabled": false, "data": {"data-ui-title": "shell.chat", "data-ui-label": "shell.chat"}, "execution_profile": "agents", "verification": "unverified individual control/state; route-level evidence is not universal acceptance"}, diff --git a/flybot_workspace/static/about/index.html b/flybot_workspace/static/about/index.html index 96919a9bc..5ab61e738 100644 --- a/flybot_workspace/static/about/index.html +++ b/flybot_workspace/static/about/index.html @@ -4,7 +4,7 @@ - 关于 · FlyBot + 关于 · FlyBot @@ -25,45 +25,45 @@
FlyBotv0.3.0
-

人与 AI 智能体的协作工作区

-

在可自托管的工作区里,与智能体对话,和团队推进任务,把对话成果整理成可复用的作品。

+

人与 AI 智能体的协作工作区

+

在可自托管的工作区里,与智能体对话,和团队推进任务,把对话成果整理成可复用的作品。

-

从对话到交付

+

从对话到交付

-

独立运行,共享协作

-

每个账号使用独立的 DS-Bot 容器,Bot Social 负责共享会话与协作。管理员可以集中配置默认模型接口,账号也可使用自己的配置。

+

独立运行,共享协作

+

每个账号使用独立的 DS-Bot 容器,Bot Social 负责共享会话与协作。管理员可以集中配置默认模型接口,账号也可使用自己的配置。

- 自托管指南 + 自托管指南
diff --git a/flybot_workspace/static/shell/system-locale-pages.mjs b/flybot_workspace/static/shell/system-locale-pages.mjs index 3d42bedae..44b303ebd 100644 --- a/flybot_workspace/static/shell/system-locale-pages.mjs +++ b/flybot_workspace/static/shell/system-locale-pages.mjs @@ -1,7 +1,8 @@ // Dictionary for the pages that carry page-level slots but no chat dictionary: -// contacts, guide and download. The shell catalogue (system-locale-catalog.mjs) -// already covers the shared shell; these keys are page-prefixed and are loaded -// only for the three pages listed in PAGE_MESSAGE_PAGES (pages.js). +// contacts, guide, download and about. The shell catalogue +// (system-locale-catalog.mjs) already covers the shared shell; these keys are +// page-prefixed and are loaded only for the pages listed in PAGE_MESSAGE_PAGES +// (pages.js). // zh values are the shipped markup text, en is the system-language rendering. export const PAGE_MESSAGES = Object.freeze({ // Shared by more than one of the three pages. @@ -65,4 +66,28 @@ export const PAGE_MESSAGES = Object.freeze({ "download.android_title": ["未实现:没有 FlyBot Android 客户端", "Not implemented: no FlyBot client for Android"], "download.macos_title": ["未实现:没有 FlyBot macOS 客户端", "Not implemented: no FlyBot client for macOS"], "download.windows_title": ["未实现:没有 FlyBot Windows 客户端", "Not implemented: no FlyBot client for Windows"], + + // /about + "about.page_title": ["关于 · FlyBot", "About · FlyBot"], + "about.heading": ["人与 AI 智能体的协作工作区", "A collaboration workspace for people and AI agents"], + "about.lead": ["在可自托管的工作区里,与智能体对话,和团队推进任务,把对话成果整理成可复用的作品。", + "In a workspace you can host yourself, talk with agents, move work forward with your team, and turn conversations into reusable artifacts."], + "about.demo": ["观看特性演示", "Watch the feature tour"], + "about.release_notes": ["查看版本说明", "Read the release notes"], + "about.features_heading": ["从对话到交付", "From conversation to delivery"], + "about.feature_agents": ["智能体与群聊", "Agents and group chats"], + "about.feature_agents_body": ["与个人智能体流式对话,或邀请同事和多个智能体加入同一会话。", + "Chat with your personal agent as it streams, or invite colleagues and several agents into the same conversation."], + "about.feature_artifacts": ["作品与记忆", "Artifacts and memory"], + "about.feature_artifacts_body": ["把对话成果保存为作品,按需分享,并用工作区记忆延续上下文。", + "Save conversation results as artifacts, share them when needed, and keep context going with workspace memory."], + "about.feature_automations": ["会议与自动化", "Meetings and automations"], + "about.feature_automations_body": ["整理会议笔记和行动项,创建定时任务,跟进重复性工作。", + "Capture meeting notes and action items, create scheduled tasks, and keep recurring work moving."], + "about.deploy_heading": ["独立运行,共享协作", "Runs on its own, collaborates together"], + "about.deploy_body": ["每个账号使用独立的 DS-Bot 容器,Bot Social 负责共享会话与协作。管理员可以集中配置默认模型接口,账号也可使用自己的配置。", + "Every account runs its own DS-Bot container, while Bot Social handles shared conversations and collaboration. Administrators can configure the default model endpoint centrally, and accounts can also use their own settings."], + "about.self_host": ["自托管指南", "Self-hosting guide"], + "about.source": ["源代码", "Source code"], + "about.issues": ["问题反馈", "Issue tracker"], }); diff --git a/runtime/flybot-workspace-web/src/pages.js b/runtime/flybot-workspace-web/src/pages.js index 8e0241f79..edde3ac02 100644 --- a/runtime/flybot-workspace-web/src/pages.js +++ b/runtime/flybot-workspace-web/src/pages.js @@ -40,10 +40,10 @@ const PAGE_PACKAGE_PATH = /^\/chat\/assets\/([a-f0-9]{32})(\/[^?#]+)$/ const PAGE_ENTRY_RESOURCE = /((?:src|href)=")(\/[a-z][a-z-]*\/[A-Za-z0-9._-]+\.(?:css|mjs|js))"/g const CHAT_STARTUP_ENTRY = '' // Pages whose index.html the runtime may render in the system language. chat -// and settings carry their own dictionaries; contacts, guide and download -// share the page dictionary below. -const LOCALE_PAGES = new Set(['chat', 'settings', 'contacts', 'guide', 'download']) -const PAGE_MESSAGE_PAGES = new Set(['contacts', 'guide', 'download']) +// and settings carry their own dictionaries; contacts, guide, download and +// about share the page dictionary below. +const LOCALE_PAGES = new Set(['chat', 'settings', 'contacts', 'guide', 'download', 'about']) +const PAGE_MESSAGE_PAGES = new Set(['contacts', 'guide', 'download', 'about']) function matchesValidator(request, etag) { return (request.headers.get('if-none-match')?.split(',') ?? []).some(value => { diff --git a/tests/system_locale.test.mjs b/tests/system_locale.test.mjs index 01d279d43..699a1d11b 100644 --- a/tests/system_locale.test.mjs +++ b/tests/system_locale.test.mjs @@ -11,9 +11,9 @@ import {readForm} from '../flybot_workspace/static/settings/app.mjs'; const pagesDir = fileURLToPath(new URL('../flybot_workspace/static/', import.meta.url)); test('annotated English templates render before scripts with complete keys and escaped slots', () => { - for (const page of ['settings', 'chat', 'contacts', 'guide', 'download']) { + for (const page of ['settings', 'chat', 'contacts', 'guide', 'download', 'about']) { const source = readFileSync(new URL('../flybot_workspace/static/' + page + '/index.html', import.meta.url), 'utf8'); - const messages = page === 'chat' ? CHAT_MESSAGES : ['contacts', 'guide', 'download'].includes(page) ? PAGE_MESSAGES : undefined; + const messages = page === 'chat' ? CHAT_MESSAGES : ['contacts', 'guide', 'download', 'about'].includes(page) ? PAGE_MESSAGES : undefined; for (const [, key] of source.matchAll(/data-ui-(?:text|title|label|placeholder|alt|option-group)="([^"]+)"/g)) { assert.ok(uiText('zh-CN', key, undefined, messages), key); assert.ok(uiText('en', key, undefined, messages), key);