From 52773c4d6ece7555afbd137a6e1b4e3ae7b57988 Mon Sep 17 00:00:00 2001 From: Danyang Chen Date: Sun, 29 Nov 2026 18:05:29 +0800 Subject: [PATCH 1/2] Localize the remaining Chat markup for the English render --- flybot_workspace/static/chat/index.html | 86 +++++++++---------- .../static/shell/system-locale-chat.mjs | 36 ++++++++ tests/system_locale_chat.test.mjs | 14 +++ 3 files changed, 93 insertions(+), 43 deletions(-) diff --git a/flybot_workspace/static/chat/index.html b/flybot_workspace/static/chat/index.html index 0f6aa33ff..afeb97358 100644 --- a/flybot_workspace/static/chat/index.html +++ b/flybot_workspace/static/chat/index.html @@ -157,7 +157,7 @@

置顶

对话

- +
+ @@ -189,7 +189,7 @@

-

选择联系人或智能体加入群组。

+

选择联系人或智能体加入群组。

@@ -252,7 +252,7 @@

登录

聊天

- + @@ -263,8 +263,8 @@

登录

- - + + @@ -273,9 +273,9 @@

登录

-
- +
@@ -913,7 +913,7 @@

添

- + @@ -950,20 +950,20 @@

提炼
-

提示词模板

- +

提示词模板

+
- +
- +
- + - 将可替换内容写成 {{topic}}。 - + 将可替换内容写成 {{topic}}。 +

@@ -997,14 +997,14 @@

通话

@@ -1078,24 +1078,24 @@

表情和贴纸
-

重命名对话

- +

重命名对话

+

- - + +
-

已归档的私聊

- +

已归档的私聊

+

    - +
    @@ -1117,7 +1117,7 @@

    联系人

    -

    正在加载联系人…

    +

    正在加载联系人…

      @@ -1139,7 +1139,7 @@

      添加联

      diff --git a/flybot_workspace/static/shell/system-locale-chat.mjs b/flybot_workspace/static/shell/system-locale-chat.mjs index 6553e508b..d635a1fad 100644 --- a/flybot_workspace/static/shell/system-locale-chat.mjs +++ b/flybot_workspace/static/shell/system-locale-chat.mjs @@ -388,4 +388,40 @@ export const CHAT_MESSAGES = Object.freeze({ "chat.resources.studio": ["团队文档", "Team documents"], "chat.resources.source": ["来源", "Source"], "chat.emoji.review_before_sending": ["放入输入框供你检查,不会自动发送。", "Add an emoji to the composer to review before sending."], + + // /chat markup that had no locale marker before this change. + "chat.sessions.archived": ["已归档", "Archived"], + "chat.sessions.archive": ["归档", "Archive"], + "chat.sessions.archive_title": ["已归档的私聊", "Archived conversations"], + "chat.sessions.archived_state": ["归档对话", "Archived conversation"], + "chat.sessions.archived_note": ["此对话已归档。", "This conversation is archived."], + "chat.sessions.restore": ["恢复对话", "Restore conversation"], + "chat.sessions.rename": ["重命名", "Rename"], + "chat.sessions.rename_title": ["重命名对话", "Rename conversation"], + "chat.sessions.name_label": ["对话名称", "Conversation name"], + "chat.save": ["保存", "Save"], + "chat.group.custom_intro": ["选择联系人或智能体加入群组。", "Choose contacts or agents to add to the group."], + "chat.group.review_selected": ["仅显示已选", "Show selected only"], + "chat.group.invite_link": ["群邀请链接", "Group invite link"], + "chat.group.invite_link_create": ["生成群邀请链接", "Create group invite link"], + "chat.group.invite_link_revoke": ["停用链接", "Disable link"], + "chat.cards.group": ["群聊待处理卡片", "Pending group cards"], + "chat.cards.private": ["私聊待处理卡片", "Pending direct cards"], + "chat.prompts.title": ["提示词模板", "Prompt templates"], + "chat.prompts.saved": ["已保存的模板", "Saved templates"], + "chat.prompts.insert": ["插入草稿", "Insert into draft"], + "chat.prompts.new_name": ["新模板名称", "New template name"], + "chat.prompts.syntax": ["将可替换内容写成 {{topic}}。", "Write replaceable parts as {{topic}}."], + "chat.prompts.save": ["保存当前草稿为模板", "Save the current draft as a template"], + "chat.call.record_title": ["录制通话音频", "Record call audio"], + "chat.call.record_help": ["当前参会者全部同意后才开始。音频仅由发起者保留在此设备。", "Starts only after every participant agrees. Only the organizer keeps the audio on this device."], + "chat.call.record_request": ["请求录音", "Request recording"], + "chat.call.record_allow": ["同意录音", "Allow recording"], + "chat.call.record_decline": ["不同意", "Decline"], + "chat.call.record_stop": ["停止并保留", "Stop and keep"], + "chat.meetings.copy_notes_link": ["复制纪要入口", "Copy notes link"], + "chat.meetings.notes_only": ["仅打开纪要", "Open notes only"], + "chat.contacts.loading": ["正在加载联系人…", "Loading contacts…"], + "chat.contacts.send_request": ["发送申请", "Send request"], + "chat.bot_computer": ["Bot 电脑", "Bot computer"], }); diff --git a/tests/system_locale_chat.test.mjs b/tests/system_locale_chat.test.mjs index 9a6cb90aa..d70d707fa 100644 --- a/tests/system_locale_chat.test.mjs +++ b/tests/system_locale_chat.test.mjs @@ -62,3 +62,17 @@ test('Native English Chat localizes controls and leaves dynamic identity slots o assert.match(html, /