import * as React from 'react'; export const IM_LOCALE_NAMESPACE = 'dsh-im'; const EN = Object.freeze({ '$locale': 'en', 'IM机器人': 'IM bots', 'IM机器人设置': 'IM bot settings', 'IM 渠道': 'IM channels', '让 DeepSeek Harness 触手可及': 'DeepSeek Harness, always within reach', 'AI Office': 'AI Office', '(实验功能)': '(Experimental)', 'AI Office 设置': 'AI Office settings', 'AI Office 设置页缺少 RPC 连接': 'AI Office settings are missing an RPC connection', '正在读取 AI Office Connector…': 'Loading AI Office Connector…', '本机主动连接公网 Office;Harness 不开放端口。协议 Hook 固定为 ': 'This machine connects outward to the public Office; Harness exposes no port. Protocol hooks: ', '尚未配置': 'Not configured', '已连接 Office': 'Connected to Office', '已配置': 'Configured', '等待重连': 'Waiting to reconnect', '凭据缺失': 'Credential missing', '最近心跳': 'Last heartbeat', '最近事件': 'Last event', '重连次数': 'Reconnects', '运行 Job': 'Running Jobs', '完成 Job': 'Completed Jobs', '尚无': 'None yet', '设备连接': 'Device connection', 'Token 只写入本机凭据存储': 'Token is written only to the local credential store', '粘贴 Office 一次性凭据': 'Paste the one-time Office credential', '已安全保存;留空保持不变': 'Stored securely; leave blank to keep it', '最大并发': 'Max concurrency', 'Heartbeat 秒数': 'Heartbeat seconds', 'Workspace 映射': 'Workspace mappings', '每行 alias=/本机/绝对路径;Office 只能看到 alias。': 'One alias=/local/absolute/path per line; Office sees only aliases.', 'Instruction Preset 映射': 'Instruction preset mappings', '每行 alias=指令;新增 preset 不需要改 Office 代码。': 'One alias=instruction per line; new presets require no Office code change.', '保存并连接': 'Save and connect', '测试连接': 'Test connection', '测试中…': 'Testing…', '重新连接': 'Reconnect', '移除连接': 'Remove connection', '连接测试通过。': 'Connection test passed.', '配置已保存。': 'Configuration saved.', '协议 Hook 预览': 'Protocol hook preview', '由 Base URL 自动派生,不单独填写': 'Derived from Base URL; no separate input', 'Base URL 无效': 'Invalid Base URL', 'Office Hook 尚未部署时,配置会安全保存并自动重试;出现 HTTP 404 代表协议端点待上线,不代表 Harness 故障。': 'Configuration is saved and retried while Office hooks are unavailable; HTTP 404 means the protocol endpoint is pending, not a Harness failure.', 'Workspace 映射每行必须使用 alias=value': 'Each workspace mapping must use alias=value', 'Instruction Preset 映射每行必须使用 alias=value': 'Each instruction preset mapping must use alias=value', 'action-items=转换为负责人、截止和验收明确的工单': 'action-items=Turn this into accountable tasks with deadlines and acceptance criteria', 'AI Office 拒绝了 Device Token。': 'AI Office rejected the Device Token.', 'AI Office Connector Hook 尚未就绪。': 'AI Office Connector hooks are not available yet.', 'AI Office Connector 协议版本不兼容。': 'The AI Office Connector protocol is incompatible.', '本机暂时无法访问 AI Office。': 'AI Office cannot currently be reached from this machine.', 'AI Office 连接已中断。': 'The AI Office connection was interrupted.', '帮助与反馈 · 前往 GitHub': 'Help & feedback · Open GitHub', '微信': 'WeChat', '飞书': 'Feishu', '钉钉': 'DingTalk', '企业微信': 'WeCom', '微信机器人': 'WeChat bot', '飞书机器人': 'Feishu bot', '钉钉机器人': 'DingTalk bot', '企业微信机器人': 'WeCom bot', 'QQ机器人': 'QQ bot', 'WhatsApp机器人': 'WhatsApp bot', 'WhatsApp账号': 'WhatsApp account', '微信设置': 'WeChat settings', '飞书机器人设置': 'Feishu bot settings', '群聊响应方式': 'Group response mode', '仅在 @机器人时响应(推荐)': 'Only respond when @mentioned (recommended)', '响应所有群消息': 'Respond to all group messages', '响应所有群消息(需飞书敏感权限)': 'Respond to all group messages (requires a sensitive Feishu scope)', '重新授权': 'Reauthorize', '去授权': 'Authorize', '重新授权群消息权限': 'Reauthorize group-message permission', '授权群消息权限': 'Authorize group-message permission', '正在准备授权…': 'Preparing authorization…', '正在准备…': 'Preparing…', '私聊始终响应;群聊仅处理明确 @当前机器人的消息。群消息权限已开通,再次切换无需授权。': 'Direct messages always work; group chats require an explicit @mention of this bot. The group-message permission is already granted, so switching again needs no authorization.', '私聊始终响应;群聊仅处理明确 @当前机器人的消息。选择全部消息后会打开飞书官方授权流程。': 'Direct messages always work; group chats require an explicit @mention of this bot. Selecting all messages opens the official Feishu authorization flow.', '已开通“获取群组中所有消息”权限(im:message.group_msg);机器人会处理群聊中的所有可见消息。': 'The “Read all messages in associated group chat” scope (im:message.group_msg) is granted; the bot processes every visible group message.', '尚未确认“获取群组中所有消息”权限,请完成飞书授权。': 'The “Read all messages in associated group chat” scope has not been confirmed. Complete Feishu authorization.', '私聊始终响应;群聊仅处理明确 @当前机器人的消息。': 'Direct messages always work; group chats require an explicit @mention of this bot.', '需在飞书为该机器人开通“获取群组中所有消息”权限(im:message.group_msg);开通后,机器人会处理群聊中的所有可见消息。': 'Grant this bot the “Read all messages in associated group chat” Feishu scope (im:message.group_msg); once granted, it will process every visible group message.', '群聊响应方式修改失败,请重试。': 'Could not update the group response mode. Try again.', '群消息权限授权失败,请重试。': 'Could not authorize group-message permission. Try again.', '钉钉设置': 'DingTalk settings', '企业微信设置': 'WeCom settings', '扫码接入机器人': 'Scan QR code', '正在接入': 'Connecting', '手动接入': 'Manual setup', '收起凭据': 'Hide credentials', '收起接入': 'Hide setup', '接入机器人': 'Connect bot', '开始接入': 'Start setup', '在线': 'online', '运行正常': 'Connected', '正在连接': 'Connecting', '正在连接…': 'Connecting…', '连接未就绪': 'Not connected', '连接中': 'Connecting', '连接中断': 'Disconnected', '需要处理': 'Needs attention', '状态未知': 'Unknown status', '离线': 'Offline', '已断开': 'Disconnected', '消息通道': 'Message channel', '查看消息通道说明': 'View message channel details', '最近检查': 'Last checked', '当前工作区': 'Current workspace', '选择目录': 'Choose folder', '选择机器人工作区目录': 'Select bot workspace folder', '当前目录': 'Current folder', '主目录': 'Home', '正在准备目录选择器…': 'Preparing folder picker…', '正在读取目录…': 'Loading folders…', '这个目录中没有子文件夹。': 'This folder has no subfolders.', '此目录的子文件夹过多,仅显示前一部分。': 'This folder has too many subfolders; only the first group is shown.', '无法读取目录,请重试。': 'Could not load the folder. Try again.', '重试': 'Retry', '显示隐藏文件夹': 'Show hidden folders', '切换后会清除这个机器人的旧会话映射。': 'Switching clears this bot’s previous session mappings.', '切换中…': 'Switching…', '选择此目录': 'Select this folder', '工作区绝对路径': 'Absolute workspace path', '/绝对路径/到/工作区': '/absolute/path/to/workspace', '修改': 'Change', '保存': 'Save', '保存中…': 'Saving…', '未设置': 'Not set', '工作区修改失败,请重试。': 'Could not update the workspace. Try again.', '请输入工作区绝对路径。': 'Enter an absolute workspace path.', '工作区必须是绝对路径。': 'The workspace must be an absolute path.', '工作区路径不存在。': 'The workspace path does not exist.', '工作区路径必须指向一个目录。': 'The workspace path must point to a directory.', '找不到要修改的机器人。': 'The bot could not be found.', 'Agent Preset': 'Agent Preset', '查看 Agent Preset 说明': 'View Agent Preset help', '跟随 Host 默认': 'Follow the Host default', '(已不可用)': ' (unavailable)', '只影响新建会话;若当前聊天已有会话,先发送 /new,再发送普通消息生效。': 'This affects only new sessions. If the current chat already has a session, send /new, then send a regular message to apply it.', '当前 Agent Preset 已不可用,请选择其他 Preset 或跟随 Host 默认。': 'The current Agent Preset is unavailable. Choose another preset or follow the Host default.', 'Agent Preset 修改失败,请重试。': 'Could not update the Agent Preset. Try again.', '请选择 Agent Preset。': 'Choose an Agent Preset.', 'Agent Preset 无效。': 'The Agent Preset is invalid.', 'Agent Preset 不存在或不可用。': 'The Agent Preset does not exist or is unavailable.', '尚未检查': 'Not checked yet', '刚刚': 'Just now', '检查连接': 'Check connection', '检查中…': 'Checking…', '连接检查失败,请稍后重试。': 'Connection check failed. Try again later.', '测试消息已发送,请到对应机器人会话中确认。': 'Test message sent. Check the matching bot conversation.', '连接检查完成。机器人尚未收到可用于测试的私聊消息。': 'Connection check completed. The bot has not received a direct message it can use for testing.', '连接检查完成,但测试消息发送失败。': 'Connection check completed, but the test message could not be sent.', '测试消息已发送,请到飞书会话中确认。': 'Test message sent. Check the Feishu conversation.', '测试消息已发送,请到 WhatsApp 自聊会话中确认。': 'Test message sent. Check the WhatsApp self-chat.', '连接检查完成,但当前没有可用的 WhatsApp 自聊目标。': 'Connection check completed, but no WhatsApp self-chat target is available.', '钉钉连接检查完成,测试消息已发送。': 'DingTalk connection check completed and the test message was sent.', '钉钉连接检查完成,但测试消息发送失败。': 'DingTalk connection check completed, but the test message could not be sent.', '微信连接检查完成,测试消息已发送。': 'WeChat connection check completed and the test message was sent.', '微信连接检查完成,但测试消息发送失败。': 'WeChat connection check completed, but the test message could not be sent.', '企业微信连接检查完成,测试消息已发送。': 'WeCom connection check completed and the test message was sent.', '企业微信连接检查完成,但测试消息发送失败。': 'WeCom connection check completed, but the test message could not be sent.', '重试连接': 'Reconnect', '重试中…': 'Retrying…', '移除接入': 'Remove connection', '确认移除接入': 'Remove connection', '确认移除': 'Remove', '正在移除…': 'Removing…', '保留机器人': 'Keep bot', '保留账号': 'Keep account', '取消': 'Cancel', '关闭': 'Close', '立即重试': 'Retry now', '重新读取': 'Reload', '重新生成二维码': 'Generate a new QR code', '重新生成二维码后继续': 'Generate a new QR code', '刷新二维码': 'Refresh QR code', '刷新中…': 'Refreshing…', '换一个二维码': 'Get another QR code', '继续连接': 'Continue connecting', '绑定并连接': 'Connect', '正在绑定…': 'Connecting…', '验证并连接': 'Verify and connect', '正在验证并连接…': 'Verifying and connecting…', '正在验证…': 'Verifying…', '操作失败,请稍后重试': 'The operation failed. Try again later.', '请稍后重试': 'Try again later.', '当前二维码有效时间': 'QR code expires in', '二维码有效时间': 'QR code expires in', '二维码已过期': 'QR code expired', '二维码已失效': 'QR code expired', '二维码已过期\n请重新生成': 'QR code expired\nGenerate a new one', '二维码图片正在生成…': 'Generating QR code…', '二维码正在生成…': 'Generating QR code…', '二维码正在自动刷新…': 'Refreshing QR code…', '二维码未就绪,请打开授权链接': 'The QR code is not ready. Open the authorization link.', '二维码图片未就绪,请使用备用链接。': 'The QR code is not ready. Use the alternate link.', '二维码图片未就绪,请重新生成。': 'The QR code is not ready. Generate a new one.', '等待刷新': 'Waiting to refresh', '正在刷新二维码': 'Refreshing QR code', '打开备用链接': 'Open alternate link', '生成二维码': 'Generate QR code', '生成微信二维码': 'Generate WeChat QR code', '生成飞书二维码': 'Generate Feishu QR code', '生成钉钉二维码': 'Generate DingTalk QR code', '生成企业微信二维码': 'Generate WeCom QR code', '生成 QQ 二维码': 'Generate QQ QR code', '正在生成二维码…': 'Generating QR code…', '正在准备授权二维码': 'Preparing authorization QR code', '正在准备权限授权二维码': 'Preparing permission authorization QR code', '正在准备微信二维码': 'Preparing WeChat QR code', '正在添加新机器人': 'Adding a new bot', '正在申请钉钉授权二维码…': 'Requesting DingTalk authorization QR code…', '正在申请企业微信二维码…': 'Requesting WeCom QR code…', '正在申请 QQ 二维码…': 'Requesting QQ QR code…', '正在生成 WhatsApp 二维码': 'Generating WhatsApp QR code', '扫码,创建第一个飞书入口': 'Scan to create your first Feishu bot', '扫码只会新增一个机器人,已接入的机器人会继续正常收发消息。': 'Scanning adds one bot. Existing bots will continue to send and receive messages.', '无需手动填写 App ID。以后还可以继续添加机器人,分别服务不同团队或飞书租户。': 'No App ID is required. You can add more bots later for different teams or Feishu tenants.', '使用飞书扫码创建机器人': 'Scan with Feishu to create a bot', '刷新二维码后继续': 'Refresh the QR code to continue', '打开飞书移动端,使用扫一扫读取二维码': 'Open Feishu on your phone and scan the QR code', '核对应用名称与权限范围,并确认创建': 'Review the app name and permissions, then confirm', '保持本页打开,等待新机器人的长连接就绪': 'Keep this page open until the bot connection is ready', '在飞书中打开': 'Open in Feishu', '取消添加': 'Cancel', '使用飞书扫码修复卡片按钮': 'Scan with Feishu to repair card buttons', '使用飞书确认群消息权限': 'Confirm group-message permission with Feishu', '扫码会更新现有飞书应用,只增量开通“获取群组中所有消息”权限;不会创建新应用。确认后会自动启用“响应所有群消息”,其他机器人不受影响。': 'Scanning updates the existing Feishu app with only the “Read all messages in associated group chat” scope. It does not create a new app. After confirmation, “Respond to all group messages” is enabled automatically; other bots are unaffected.', '核对现有应用,并确认“获取群组中所有消息”权限': 'Review the existing app and confirm the “Read all messages in associated group chat” permission', '保持本页打开,等待权限生效并自动切换响应方式': 'Keep this page open while the permission takes effect and the response mode switches automatically', '取消授权': 'Cancel authorization', '已确认,正在启用全部消息模式': 'Confirmed. Enabling all-message mode', '权限配置已提交,正在保存设置并重连此机器人;此阶段无法取消,其他机器人不会中断。': 'The permission update was submitted. Saving the setting and reconnecting this bot. This stage cannot be cancelled; other bots will not be interrupted.', '权限配置已提交,正在启用全部消息模式并重连此机器人;此阶段无法取消,其他机器人不会中断。': 'The permission update was submitted. Enabling all-message mode and reconnecting this bot. This stage cannot be cancelled; other bots will not be interrupted.', '正在为现有飞书应用申请群消息权限二维码,请稍候。': 'Requesting a group-message permission QR code for the existing Feishu app…', '群消息权限没有开通完成': 'Group-message permission was not granted', '扫码会更新现有飞书应用,只增量补充卡片按钮回调;不会创建新应用。确认后此机器人会短暂重连,其他机器人不受影响。': 'Scanning updates the existing Feishu app with only the card-button callback. It does not create a new app. This bot reconnects briefly after confirmation; other bots are not affected.', '核对现有应用名称,并确认只新增卡片回调': 'Review the existing app name and confirm that only the card callback is added', '保持本页打开,等待卡片按钮修复完成': 'Keep this page open until card-button repair finishes', '取消修复': 'Cancel repair', '已确认,正在完成卡片按钮修复': 'Confirmed. Finishing card-button repair', '正在准备修复二维码': 'Preparing the repair QR code', '配置已提交,正在验证卡片按钮回调并重连此机器人;此阶段无法取消,其他机器人不会中断。': 'The update was submitted. Verifying the card callback and reconnecting this bot. This stage cannot be cancelled; other bots will not be interrupted.', '正在为现有飞书应用申请一次性更新二维码,请稍候。': 'Requesting a one-time update QR code for the existing Feishu app…', '卡片按钮没有修复完成': 'Card-button repair did not finish', '修复卡片按钮': 'Repair card buttons', '等待扫码…': 'Waiting for scan…', '飞书服务返回了不匹配的卡片修复二维码': 'Feishu returned a repair QR code for a different bot', '飞书服务返回了不匹配的群消息权限二维码': 'Feishu returned a group-message permission QR code for a different bot', '飞书服务返回的修复信息缺少 botId': 'Feishu repair status is missing the bot ID', '飞书服务返回的应用更新信息缺少 botId': 'Feishu app-update status is missing the bot ID', '飞书服务返回了不匹配的注册进度': 'Feishu returned registration progress for a different operation', '此机器人': 'this bot', '用于为${botName}开通群消息权限的一次性授权二维码': 'One-time QR code for granting group-message permission to ${botName}', '正在为「${botName}」开通群消息权限': 'Granting group-message permission to “${botName}”', '${botName ?? "机器人"}的修复二维码已生成,请使用飞书扫码。': 'Repair QR code generated for ${botName ?? "bot"}. Scan it with Feishu.', '${botName ?? "机器人"}的群消息权限二维码已生成,请使用飞书确认。': 'Group-message permission QR code generated for ${botName ?? "bot"}. Confirm it with Feishu.', '${targetBotName}已开通群消息权限,并启用“响应所有群消息”。': '${targetBotName} now has group-message permission and “Respond to all group messages” is enabled.', '${targetBot.bot.name}已开通群消息权限,并启用“响应所有群消息”。': '${targetBot.bot.name} now has group-message permission and “Respond to all group messages” is enabled.', '${targetBot.bot.name}已连接,可以在飞书中开始聊天。': '${targetBot.bot.name} is connected and ready to chat in Feishu.', '已取消卡片按钮修复。': 'Card-button repair was cancelled.', '已取消群消息权限授权。': 'Group-message permission authorization was cancelled.', '卡片按钮已更新,但暂时无法确认机器人连接状态': 'The card callback was updated, but the bot connection could not be confirmed yet', '群消息权限已更新,但暂时无法确认机器人连接状态': 'The group-message permission was updated, but the bot connection could not be confirmed yet', '飞书卡片按钮修复失败': 'Could not repair the Feishu card buttons', '飞书群消息权限开通失败': 'Could not grant the Feishu group-message permission', '请先完成当前飞书授权操作,再开通群消息权限。': 'Finish the current Feishu authorization before granting group-message permission.', '已确认,正在连接新机器人': 'Confirmed. Connecting the new bot', '正在安全保存凭据并检查新机器人的消息通道,其他机器人不会中断。': 'Saving credentials and checking the new bot connection. Existing bots will not be interrupted.', '正在向飞书申请一次性授权二维码,请稍候。': 'Requesting a one-time authorization QR code from Feishu…', '新机器人没有添加完成': 'The new bot was not added', '新飞书机器人已连接,可以开始聊天。': 'The new Feishu bot is connected and ready to chat.', '飞书应用创建失败': 'Could not create the Feishu app', '机器人已经创建,但暂时无法确认连接状态': 'The bot was created, but its connection could not be confirmed yet', '机器人仍未连接': 'The bot is still offline', '机器人尚未连接': 'The bot is not connected yet', '长连接运行正常': 'Persistent connection is healthy', '长连接': 'Persistent connection', '应用标识已安全保存': 'App identifier stored securely', '机器人标识已安全保存': 'Bot identifier stored securely', '已安全保存': 'Stored securely', '已接入的微信账号': 'Connected WeChat accounts', '已接入的机器人': 'Connected bots', '已接入的钉钉机器人': 'Connected DingTalk bots', '已绑定的企业微信机器人': 'Connected WeCom bots', '已绑定的 QQ 机器人': 'Connected QQ bots', '已接入的 WhatsApp 机器人': 'Connected WhatsApp accounts', '使用手机微信扫描二维码': 'Scan with WeChat on your phone', '扫一次码,就能在微信里使用 Harness': 'Scan once to use Harness in WeChat', '打开手机微信并扫描左侧二维码': 'Open WeChat on your phone and scan the QR code', '在微信中确认连接该机器人': 'Confirm the bot connection in WeChat', '保持本页打开,等待机器人自动连接': 'Keep this page open while the bot connects', '等待微信扫码': 'Waiting for WeChat scan', '需要配对码': 'Pairing code required', '输入手机微信显示的数字': 'Enter the number shown in WeChat', '微信配对码': 'WeChat pairing code', '已扫码,请在手机上确认': 'Scanned. Confirm on your phone', '配对码已提交,正在等待微信确认。': 'Pairing code submitted. Waiting for WeChat confirmation.', '这是微信附加的安全确认步骤。配对码只用于本次扫码轮询,不会写入配置或日志。': 'This is an additional WeChat confirmation step. The pairing code is used only for this connection and is never stored.', '正在保存凭据并验证 Harness 与微信长轮询。': 'Saving credentials and verifying the WeChat connection.', '微信已确认,正在启动消息连接': 'Confirmed in WeChat. Starting the message connection', '微信已授权,但无法读取现有登录凭据。请检查 DSH 凭据存储。': 'WeChat was authorized, but the existing login credential could not be read. Check the DSH credential store.', '微信已授权,但登录凭据无法写入 DSH 凭据存储。请检查凭据存储是否可写。': 'WeChat was authorized, but the login credential could not be written to the DSH credential store. Check that the store is writable.', '微信已授权,但账号配置无法写入本机。请检查 DSH_HOME 目录权限。': 'WeChat was authorized, but the account configuration could not be saved locally. Check the DSH_HOME directory permissions.', '微信已授权,但无法初始化账号状态或工作区。请检查 DSH_HOME 和工作区目录。': 'WeChat was authorized, but the account state or workspace could not be initialized. Check DSH_HOME and the workspace directory.', '微信已授权,但插件无法连接本机 Harness。请检查 dsh web 地址和端口。': 'WeChat was authorized, but the plugin could not connect to the local Harness. Check the dsh web address and port.', '微信已授权,但 Harness 健康检查超时。请确认 dsh web 未阻塞。': 'WeChat was authorized, but the Harness health check timed out. Confirm that dsh web is not blocked.', '微信已授权,但 Harness 拒绝了本机健康检查。请检查 Host 信任配置。': 'WeChat was authorized, but Harness denied the local health check. Check the Host trust configuration.', '微信已授权,但找不到 Harness 健康检查接口。请确认 Harness 与插件版本兼容。': 'WeChat was authorized, but the Harness health endpoint was not found. Confirm that Harness and the plugin are compatible.', '微信已授权,但 Harness 健康检查返回服务错误。请查看 dsh web 日志。': 'WeChat was authorized, but the Harness health check returned a service error. Check the dsh web logs.', '微信已授权,但 Harness 返回了无法识别的响应。请确认 Harness 与插件版本兼容。': 'WeChat was authorized, but Harness returned an unrecognized response. Confirm that Harness and the plugin are compatible.', '微信已授权,但 Harness 拒绝了健康检查请求。请查看 dsh web 日志。': 'WeChat was authorized, but Harness rejected the health-check request. Check the dsh web logs.', '微信已授权,但 Harness 健康检查发生未知错误。请查看 dsh web 日志。': 'WeChat was authorized, but the Harness health check failed unexpectedly. Check the dsh web logs.', '微信已授权,但消息连接初始化失败。请查看 dsh web 日志后重试。': 'WeChat was authorized, but the message connection could not be initialized. Check the dsh web logs and try again.', '微信已授权,但激活过程中发生未知错误。请查看 dsh web 日志。': 'WeChat was authorized, but an unknown error occurred during activation. Check the dsh web logs.', '微信已绑定,可以开始向已绑定的机器人发消息。': 'WeChat is connected and ready for messages.', '这个微信账号已经绑定并保持在线。': 'This WeChat account is connected and online.', '微信账号及本机凭据已移除。': 'The WeChat account and local credentials were removed.', '已取消微信绑定。': 'WeChat setup was cancelled.', '正在联系腾讯微信 iLink 服务。': 'Contacting the WeChat iLink service.', 'iLink 长轮询': 'iLink long polling', '扫一次码,自动创建并连接机器人': 'Scan once to create and connect a bot', '使用钉钉 App 完成机器人授权': 'Authorize the bot with the DingTalk app', '使用已加入企业/组织的钉钉账号扫描左侧二维码': 'Scan the QR code with a DingTalk account that belongs to an organization', '在授权页点击“一键创建新机器人”': 'Select “Create new bot” on the authorization page', '请勿关闭本页,钉钉完成授权后将自动继续。': 'Keep this page open. Setup will continue after DingTalk authorization.', '等待钉钉扫码授权': 'Waiting for DingTalk authorization', '授权已确认,正在创建钉钉机器人': 'Authorized. Creating the DingTalk bot', '正在确认钉钉授权': 'Confirming DingTalk authorization', '正在检查钉钉 Stream 长连接,成功后会自动显示为在线。': 'Checking the DingTalk Stream connection. It will appear online when ready.', '钉钉机器人已接入,可以开始发送消息。': 'The DingTalk bot is connected and ready for messages.', '这个钉钉机器人已经接入并保持在线。': 'This DingTalk bot is connected and online.', 'Stream 长连接': 'Stream persistent connection', '使用企业微信 App 扫码创建智能机器人': 'Scan with WeCom to create an AI bot', '使用企业微信 App 完成智能机器人授权': 'Authorize the AI bot with WeCom', '打开企业微信 App,扫描左侧二维码': 'Open WeCom and scan the QR code', '在腾讯授权页面确认创建智能机器人': 'Confirm bot creation on the Tencent authorization page', '返回这里等待连接完成': 'Return here and wait for the connection to complete', '等待企业微信 App 扫码': 'Waiting for WeCom scan', '企业微信已授权,正在连接机器人': 'Authorized in WeCom. Connecting the bot', '凭据正在写入本机,并启动企业微信 WebSocket 消息连接。': 'Saving credentials locally and starting the WeCom WebSocket connection.', 'WebSocket 长连接': 'WebSocket persistent connection', '使用手机 QQ 扫码创建并绑定机器人': 'Scan with mobile QQ to create and connect a bot', '使用手机 QQ 完成机器人绑定': 'Complete bot setup with mobile QQ', '打开手机 QQ,扫描左侧二维码': 'Open mobile QQ and scan the QR code', '在腾讯授权页面确认创建或绑定机器人': 'Confirm bot creation or connection on the Tencent authorization page', '等待手机 QQ 扫码': 'Waiting for mobile QQ scan', 'QQ 已授权,正在连接机器人': 'Authorized in QQ. Connecting the bot', '凭据正在写入本机,并启动 QQ WebSocket 消息连接。': 'Saving credentials locally and starting the QQ WebSocket connection.', '使用手机 WhatsApp 扫描二维码即可接入。': 'Scan the QR code with WhatsApp to connect.', '用手机 WhatsApp 扫描二维码': 'Scan with WhatsApp on your phone', '打开 WhatsApp → 设置 → 已关联设备': 'Open WhatsApp → Settings → Linked devices', '点击“关联设备”并扫描左侧二维码': 'Select “Link a device” and scan the QR code', '等待 WhatsApp 扫码': 'Waiting for WhatsApp scan', '已扫码,正在连接 WhatsApp': 'Scanned. Connecting WhatsApp', '正在建立安全的关联设备会话。': 'Creating a secure linked-device session.', '关联设备正在接入 DeepSeek Harness。': 'Linking the device to DeepSeek Harness.', 'WhatsApp Web 关联设备运行正常': 'WhatsApp linked device is healthy', '查看 WhatsApp 访问模式说明': 'View WhatsApp access mode details', 'WhatsApp 访问模式': 'WhatsApp access mode', '仅自己模式': 'Only me', '指定联系人模式': 'Selected contacts', '开放响应模式': 'Open responses', '仅自己模式(默认)': 'Only me (default)', '已生效:': 'Active: ', '只响应已绑定 WhatsApp 账号的自聊消息。': 'Only respond to self-chat messages from the linked WhatsApp account.', '响应自聊和白名单联系人的私聊,忽略群聊。': 'Respond to self-chat and allowlisted direct messages; ignore group messages.', '响应所有私聊,以及群聊中的提及或回复。': 'Respond to all direct messages and to group mentions or replies.', '允许私聊的 WhatsApp 电话号码': 'WhatsApp phone numbers allowed to send direct messages', '每行一个含国家或地区代码的号码': 'One number with country or region code per line', '可以包含开头的 +,保存时会自动移除。': 'A leading + is allowed and removed when saved.', '仅指定联系人模式使用白名单,切换模式时会保留。': 'Only Selected contacts uses the allowlist; it is retained when modes change.', '白名单为空;保存后将只接受自聊消息。': 'The allowlist is empty; only self-chat messages will be accepted after saving.', '电话号码必须包含国家或地区代码,每行一个。': 'Each phone number must include a country or region code on its own line.', 'WhatsApp 访问设置暂不可用。': 'WhatsApp access settings are currently unavailable.', 'WhatsApp 访问设置保存失败。': 'Could not save WhatsApp access settings.', 'Bot API 长轮询': 'Bot API long polling', ' Gateway 长连接': ' Gateway persistent connection', 'Gateway 长连接': 'Gateway persistent connection', ' Socket Mode 长连接': ' Socket Mode persistent connection', 'Socket Mode 长连接': 'Socket Mode persistent connection', '接入 Telegram 机器人': 'Connect a Telegram bot', '先通过 @BotFather 获取 Bot Token,再在这里完成接入。': 'Get a Bot Token from @BotFather, then connect it here.', '填写 @BotFather 生成的 Bot Token': 'Enter the Bot Token from @BotFather', '访问模式': 'Access mode', '访问设置': 'Access settings', 'Telegram 访问模式': 'Telegram access mode', '查看 Telegram 访问模式说明': 'View Telegram access mode details', '群聊全部忽略,私聊仅允许白名单用户。': 'All group messages are ignored; only allowlisted users may send DMs.', '保持原有行为:私聊直接响应,群聊在被提及或回复时响应。': 'Keep the original behavior: respond to DMs and to group mentions or replies.', '安全模式': 'Safe mode', '兼容模式': 'Compatible mode', '已生效:安全模式': 'Active: Safe mode', '已生效:兼容模式': 'Active: Compatible mode', '模式': 'Mode', '兼容模式(默认)': 'Compatible mode (default)', '安全模式(私聊白名单)': 'Safe mode (private-chat allowlist)', '允许私聊的 Telegram User ID': 'Telegram User IDs allowed to send DMs', '每行一个数字 User ID': 'One numeric User ID per line', '白名单仅属于当前机器人。': 'This allowlist belongs only to the current bot.', '兼容模式下暂不使用白名单,切换模式时会保留。': 'Compatible mode does not enforce the allowlist; it is retained when modes change.', '白名单为空;保存后该机器人会拒绝所有入站消息。': 'The allowlist is empty; this bot will reject all inbound messages after saving.', '正在保存…': 'Saving…', '保存访问设置': 'Save access settings', 'User ID 必须是 1–16 位正整数,每行一个。': 'Each User ID must be a 1–16 digit positive integer on its own line.', 'Telegram 访问设置暂不可用。': 'Telegram access settings are currently unavailable.', 'Telegram 访问设置保存失败。': 'Could not save Telegram access settings.', '接入 Discord 机器人': 'Connect a Discord bot', '先在 Developer Portal 创建 Bot 并邀请到服务器,再在这里完成接入。': 'Create a bot in the Developer Portal and invite it to your server, then connect it here.', '填写 Discord Developer Portal 的 Bot Token': 'Enter the Bot Token from the Discord Developer Portal', '接入 Slack 机器人': 'Connect a Slack bot', '先用 Manifest 创建并配置 Slack App': 'Create and configure a Slack app with the manifest', '复制配置后,在 Slack 选择 From a manifest;创建完成后生成 connections:write App Token,并将应用安装到工作区。': 'Copy the manifest and choose “From a manifest” in Slack. Then create a connections:write App Token and install the app to your workspace.', '复制 Manifest': 'Copy manifest', '已复制 Manifest': 'Manifest copied', '打开 Slack 创建页': 'Open Slack app creation', 'Bot Token 来自 OAuth & Permissions;App Token 来自 Basic Information,并且必须包含 connections:write。': 'Get the Bot Token from OAuth & Permissions and the App Token from Basic Information. The App Token must include connections:write.', '使用官方 App Manifest 快速配置机器人,再填写 Bot Token 与 App Token 建立本地 Socket Mode 连接。': 'Configure the bot with the official app manifest, then enter the Bot Token and App Token to start a local Socket Mode connection.', 'Slack 工作区': 'Slack workspace', 'Bot Token 与 App Token': 'Bot Token and App Token', '填写 Bot Token': 'Enter Bot Token', '手动接入飞书机器人': 'Connect Feishu bot manually', '手动接入钉钉机器人': 'Connect DingTalk bot manually', '手动接入企业微信机器人': 'Connect WeCom bot manually', '手动接入QQ机器人': 'Connect QQ bot manually', '填写飞书开放平台 App ID': 'Enter the Feishu Open Platform App ID', '填写飞书开放平台 App Secret': 'Enter the Feishu Open Platform App Secret', '填写钉钉应用 Client ID': 'Enter the DingTalk Client ID', '填写钉钉应用 Client Secret': 'Enter the DingTalk Client Secret', '填写企业微信智能机器人 Bot ID': 'Enter the WeCom AI Bot ID', '填写企业微信智能机器人 Secret': 'Enter the WeCom AI Bot Secret', '填写 QQ 开放平台 AppID': 'Enter the QQ Open Platform AppID', '填写 QQ 开放平台 AppSecret': 'Enter the QQ Open Platform AppSecret', '扫码接入微信机器人': 'Connect WeChat bot by QR code', '扫码接入飞书机器人': 'Connect Feishu bot by QR code', '扫码接入钉钉机器人': 'Connect DingTalk bot by QR code', '扫码接入企业微信机器人': 'Connect WeCom bot by QR code', '扫码接入 QQ 机器人': 'Connect QQ bot by QR code', '扫码接入 WhatsApp 机器人': 'Connect WhatsApp by QR code', '扫码绑定 WhatsApp 机器人': 'Connect WhatsApp by QR code', '使用 App ID 和 App Secret 绑定飞书机器人': 'Connect a Feishu bot with App ID and App Secret', '使用 Client ID 和 Client Secret 绑定钉钉机器人': 'Connect a DingTalk bot with Client ID and Client Secret', '使用 Bot ID 和 Secret 绑定企业微信机器人': 'Connect a WeCom bot with Bot ID and Secret', '使用 AppID 和 AppSecret 绑定 QQ 机器人': 'Connect a QQ bot with AppID and AppSecret', '使用 Manifest 和双 Token 接入 Slack 机器人': 'Connect a Slack bot with a manifest and two tokens', '使用 Bot Token 接入 Telegram 机器人': 'Connect a Telegram bot with a Bot Token', '使用 Bot Token 接入 Discord 机器人': 'Connect a Discord bot with a Bot Token', '取消绑定': 'Cancel setup', '取消接入': 'Cancel setup', '二维码由腾讯微信 iLink 服务签发。用手机微信扫描并确认后,账号凭据会直接写入 Harness Host,浏览器不会收到 bot_token。': 'The QR code is issued by Tencent WeChat iLink. After you scan and confirm, account credentials are written directly to the Harness Host and are never exposed to the browser.', '扫码账号必须已加入企业/组织。如果钉钉提示尚未加入组织,请在提示页创建组织,或换用已加入组织的账号。': 'The DingTalk account must belong to an organization. If prompted, create an organization or use an account that already belongs to one.', '请在手机上核对并确认授权。部分账号会额外显示一个配对数字,页面会在需要时提示输入。': 'Review and confirm authorization on your phone. Some accounts may also require a pairing number.', '授权由钉钉官方页面完成。扫码账号必须已加入一个企业/组织并有权创建机器人;创建成功后,应用凭据会直接写入 Harness Host。': 'Authorization is completed on DingTalk’s official page. The account must belong to an organization and be allowed to create bots. Credentials are written directly to the Harness Host.', '扫码由腾讯官方页面完成,不需要手动填写 AppID 或 AppSecret。扫码成功后,机器人会自动连接 DeepSeek Harness。': 'Scanning is completed on Tencent’s official page. No AppID or AppSecret is required, and the bot connects automatically.', '扫码由腾讯官方页面完成,不需要手动填写 Bot ID 或 Secret。创建成功后,机器人会自动连接 DeepSeek Harness。': 'Scanning is completed on Tencent’s official page. No Bot ID or Secret is required, and the bot connects automatically.', '腾讯页面会创建或绑定一个 QQ 机器人,并把连接凭据安全交给本机 Harness Host。': 'Tencent will create or connect a QQ bot and securely deliver its credentials to the local Harness Host.', '企业微信官方页面会创建一个智能机器人,并把连接凭据安全交给本机 Harness Host。': 'WeCom will create an AI bot and securely deliver its credentials to the local Harness Host.', '从此 Harness 移除这个微信账号?': 'Remove this WeChat account from Harness?', '这会停止消息连接,并删除本机保存的 bot_token、账号配置和会话映射。其他微信账号不受影响。': 'This stops the message connection and removes the locally stored bot_token, account configuration, and session mappings. Other WeChat accounts are not affected.', '此操作会停止这个机器人的连接,并删除保存在本机的接入配置和凭据。飞书开放平台中的应用不会被自动删除,其他机器人也不受影响。': 'This stops the bot connection and removes the locally stored configuration and credentials. The app in Feishu Open Platform is not deleted, and other bots are not affected.', '这会停止消息连接,并删除本机保存的应用凭据、机器人配置及会话映射。钉钉开放平台中的机器人不会被自动删除。': 'This stops the message connection and removes the locally stored app credentials, bot configuration, and session mappings. The bot in DingTalk Open Platform is not deleted.', '这会停止消息连接,并删除本机保存的应用凭据、机器人配置及会话映射。企业微信平台中的机器人不会被自动删除。': 'This stops the message connection and removes the locally stored app credentials, bot configuration, and session mappings. The bot in WeCom is not deleted.', '这会停止消息连接,并删除本机保存的应用凭据、机器人配置及会话映射。腾讯平台中的机器人不会被自动删除。': 'This stops the message connection and removes the locally stored app credentials, bot configuration, and session mappings. The bot on Tencent’s platform is not deleted.', '这会停止消息连接,并删除本机保存的 WhatsApp 关联设备和会话映射。': 'This stops the message connection and removes the locally stored WhatsApp linked device and session mappings.', '正在读取飞书机器人列表': 'Loading Feishu bots', '正在读取飞书连接状态…': 'Loading Feishu connection status…', '正在读取微信连接状态…': 'Loading WeChat connection status…', '正在读取钉钉连接状态…': 'Loading DingTalk connection status…', '通过扫码把钉钉机器人接入 DeepSeek Harness': 'Connect a DingTalk bot to DeepSeek Harness by QR code', '钉钉服务没有返回扫码绑定进度': 'DingTalk did not return QR setup progress', '钉钉扫码服务没有返回有效的绑定任务': 'DingTalk did not return a valid setup attempt', '钉钉 Stream 长连接运行正常': 'DingTalk Stream connection is healthy', '钉钉服务没有返回有效的机器人列表': 'DingTalk did not return a valid bot list', '${totals.connected} / ${totals.configured} 在线': '${totals.connected} / ${totals.configured} online', '用于把钉钉机器人接入 DeepSeek Harness 的一次性二维码': 'One-time QR code for connecting a DingTalk bot to DeepSeek Harness', '二维码已过期\\n请重新生成': 'QR code expired\\nGenerate a new one', '机器人已创建,正在建立消息连接': 'Bot created. Starting the message connection', '钉钉扫码服务没有返回安全的二维码': 'DingTalk did not return a secure QR code', '钉钉二维码已生成,请使用钉钉 App 扫描。': 'DingTalk QR code generated. Scan it with the DingTalk app.', '钉钉机器人凭据已绑定。': 'DingTalk bot credentials connected.', '已取消钉钉机器人接入。': 'DingTalk bot setup cancelled.', '钉钉机器人及本机凭据已移除。': 'DingTalk bot and local credentials removed.', '飞书服务没有返回二维码信息': 'Feishu did not return QR code information', '飞书服务返回的二维码信息不完整': 'Feishu returned incomplete QR code information', '飞书服务返回了无效的机器人状态': 'Feishu returned an invalid bot status', '飞书服务返回的机器人缺少 botId': 'The Feishu bot is missing botId', '飞书服务没有返回连接状态': 'Feishu did not return connection status', '飞书服务没有返回创建进度': 'Feishu did not return creation progress', '飞书服务返回了未知的创建状态': 'Feishu returned an unknown creation status', '已接入 ${totals.configured} 个机器人,其中 ${totals.connected} 个在线': '${totals.connected} of ${totals.configured} bots online', '尚未接入机器人': 'No bot connected yet', '用于新增 DeepSeek Harness 飞书机器人的一次性授权二维码': 'One-time authorization QR code for adding a Feishu bot to DeepSeek Harness', '请刷新后重新扫码': 'Refresh and scan again', '${connected ? "检查连接" : "重试连接"}${bot.name}': '${connected ? "Check connection" : "Reconnect"} ${bot.name}', '无法读取飞书机器人': 'Could not load Feishu bots', '授权二维码已生成,请使用飞书扫码。': 'Authorization QR code generated. Scan it with Feishu.', '飞书机器人凭据已绑定。': 'Feishu bot credentials connected.', '已取消添加机器人。': 'Adding the bot was cancelled.', '${newBot.bot.name}已连接,可以在飞书中开始聊天。': '${newBot.bot.name} is connected and ready to chat in Feishu.', '${bot.name}操作失败,请查看机器人状态。': '${bot.name} operation failed. Check the bot status.', '${bot.name}已从此 DeepSeek Harness 移除;飞书开放平台中的应用未被删除。': '${bot.name} was removed from this DeepSeek Harness. The app in Feishu Open Platform was not deleted.', '无法读取连接状态': 'Could not load connection status', 'QQ 服务没有返回扫码绑定进度': 'QQ did not return QR setup progress', 'QQ 扫码服务没有返回有效的绑定任务': 'QQ did not return a valid setup attempt', 'QQ WebSocket 长连接运行正常': 'QQ WebSocket connection is healthy', 'QQ 服务没有返回有效的机器人列表': 'QQ did not return a valid bot list', '尚未绑定 QQ 机器人': 'No QQ bot connected yet', '用于绑定 QQ 机器人的一次性二维码': 'One-time QR code for connecting a QQ bot', '${channel}${connectionSummary}运行正常': '${channel}${connectionSummary} is healthy', '${channel} 服务没有返回有效的机器人列表': '${channel} did not return a valid bot list', '使用 Bot Token 接入 ${channel} 机器人': 'Connect a ${channel} bot with a Bot Token', '${model.totals.connected} / ${model.totals.configured} 在线': '${model.totals.connected}/${model.totals.configured} online', ' Bot API 长轮询': ' Bot API long polling', '企业微信服务没有返回扫码绑定进度': 'WeCom did not return QR setup progress', '企业微信扫码服务没有返回有效的绑定任务': 'WeCom did not return a valid setup attempt', '企业微信 WebSocket 长连接运行正常': 'WeCom WebSocket connection is healthy', '企业微信服务没有返回有效的机器人列表': 'WeCom did not return a valid bot list', '尚未绑定企业微信机器人': 'No WeCom bot connected yet', '用于绑定企业微信机器人的一次性二维码': 'One-time QR code for connecting a WeCom bot', '微信扫码服务没有返回有效的绑定任务': 'WeChat did not return a valid setup attempt', '微信绑定没有完成': 'WeChat setup did not complete', '微信连接正常': 'WeChat connection is healthy', '微信连接未就绪': 'WeChat connection is not ready', '当前模型不支持图片,请用 /models 查看可用模型,再用 /model <序号> 切换后重发。': 'The current model does not support images. Use /models to list models, then /model to switch and resend.', '图片超过宿主允许的大小,请压缩后重试。': 'The image exceeds the Host size limit. Compress it and try again.', '图片分辨率过高,请压缩后重试。': 'The image resolution is too high. Compress it and try again.', '图片内容无效或格式不受支持,请重新发送。': 'The image is invalid or unsupported. Send it again.', '未能读取图片内容,请重新发送。': 'The image could not be read. Send it again.', '图片格式与实际内容不一致,请重新发送。': 'The declared image format does not match its content. Send it again.', '一次发送的图片数量超过宿主限制,请减少后重试。': 'The message exceeds the Host image-count limit. Remove some images and try again.', '图片总大小超过宿主限制,请减少图片或压缩后重试。': 'The images exceed the Host total-size limit. Remove or compress some images and try again.', '图片下载地址发生了重定向,暂时无法读取。': 'The image download redirected and cannot be read.', '图片超过 5 MB,请压缩后重试。': 'The image exceeds 5 MB. Compress it and try again.', '一次发送的图片总大小过大,请减少图片数量或压缩后重试。': 'The images are too large in total. Remove or compress some images and try again.', '图片下载失败,请重新发送后再试。': 'The image download failed. Send it again.', '暂不支持该图片格式,请发送 JPEG、PNG、WebP 或 GIF 图片。': 'This image format is unsupported. Send a JPEG, PNG, WebP, or GIF image.', '消息处理失败,请稍后重试。': 'Message processing failed. Try again later.', '微信服务没有返回有效的账号列表': 'WeChat did not return a valid account list', '尚未绑定微信': 'No WeChat account connected yet', '用于把微信机器人绑定到 DeepSeek Harness 的一次性二维码': 'One-time QR code for connecting a WeChat bot to DeepSeek Harness', '保持本页打开,等待消息长轮询变为在线': 'Keep this page open until long polling is online', '微信二维码已生成,请使用手机微信扫描。': 'WeChat QR code generated. Scan it with WeChat on your phone.', '移除失败:${presentError(error).message}': 'Removal failed: ${presentError(error).message}', '无法读取微信状态': 'Could not load WeChat status', 'WhatsApp 服务没有返回扫码进度': 'WhatsApp did not return QR setup progress', 'WhatsApp 服务没有返回有效的扫码任务': 'WhatsApp did not return a valid setup attempt', 'WhatsApp 服务没有返回有效的机器人列表': 'WhatsApp did not return a valid account list', '用于关联 WhatsApp 设备的一次性二维码': 'One-time QR code for linking a WhatsApp device', }); export const en = EN; export const zh = Object.freeze(Object.fromEntries( Object.keys(EN).map((key) => [key, key === '$locale' ? 'zh' : key]), )); let translate = (key) => key; export function setImTranslator(next) { translate = typeof next === 'function' ? next : (key) => key; } export function isEnglish() { return translate('$locale') === 'en'; } function channelName(value) { return localizeText(value); } function translateDynamic(text) { let match = /^(\d+) \/ (\d+) 在线$/.exec(text); if (match) return `${match[1]}/${match[2]} online`; match = /^已接入 (\d+) 个机器人,其中 (\d+) 个在线$/.exec(text); if (match) return `${match[2]} of ${match[1]} bots online`; match = /^正在读取\s*(.+?)\s*机器人状态…$/.exec(text); if (match) return `Loading ${channelName(match[1])} bot status…`; match = /^无法读取\s*(.+?)\s*机器人状态$/.exec(text); if (match) return `Could not load ${channelName(match[1])} bot status`; match = /^尚未接入\s*(.+?)\s*机器人$/.exec(text); if (match) return `No ${channelName(match[1])} bot connected yet`; match = /^已接入的\s*(.+?)\s*机器人$/.exec(text); if (match) return `Connected ${channelName(match[1])} bots`; match = /^手动接入(.+)机器人$/.exec(text); if (match) return `Connect ${channelName(match[1])} bot manually`; match = /^(.+) 设置$/.exec(text); if (match) return `${channelName(match[1])} settings`; match = /^从 DeepSeek Harness 移除“(.+)”?$/.exec(text); if (match) return `Remove “${match[1]}” from DeepSeek Harness?`; match = /^从 DeepSeek Harness 移除(.+)$/.exec(text); if (match) return `Remove ${match[1]} from DeepSeek Harness`; match = /^(.+)的飞书授权流程$/.exec(text); if (match) return `Feishu authorization flow for ${match[1]}`; match = /^用于修复(.+)卡片按钮的一次性授权二维码$/.exec(text); if (match) return `One-time QR code for repairing card buttons for ${match[1]}`; match = /^用于为(.+)开通群消息权限的一次性授权二维码$/.exec(text); if (match) return `One-time QR code for granting group-message permission to ${match[1]}`; match = /^正在修复「(.+)」$/.exec(text); if (match) return `Repairing “${match[1]}”`; match = /^正在为「(.+)」开通群消息权限$/.exec(text); if (match) return `Granting group-message permission to “${match[1]}”`; match = /^修复(.+)的卡片按钮$/.exec(text); if (match) return `Repair card buttons for ${match[1]}`; match = /^(.+)的修复二维码已生成,请使用飞书扫码。$/.exec(text); if (match) return `Repair QR code generated for ${match[1]}. Scan it with Feishu.`; match = /^(.+)的群消息权限二维码已生成,请使用飞书确认。$/.exec(text); if (match) return `Group-message permission QR code generated for ${match[1]}. Confirm it with Feishu.`; match = /^(.+)的卡片按钮已修复。$/.exec(text); if (match) return `Card buttons repaired for ${match[1]}.`; match = /^(.+)已开通群消息权限,并启用“响应所有群消息”。$/.exec(text); if (match) return `${match[1]} now has group-message permission and “Respond to all group messages” is enabled.`; match = /^(检查连接|重试连接)(.+)$/.exec(text); if (match) return `${localizeText(match[1])} ${match[2]}`; match = /^移除(.+)$/.exec(text); if (match) return `Remove ${match[1]}`; match = /^这会停止消息连接,并删除本机保存的 (.+)、机器人配置及会话映射。(.+)中的机器人不会被自动删除。$/.exec(text); if (match) { return `This stops the message connection and removes the locally stored ${localizeText(match[1])}, bot configuration, and session mappings. The bot in ${localizeText(match[2])} is not deleted.`; } match = /^二维码剩余 (.+)$/.exec(text); if (match) return `QR code expires in ${match[1]}`; match = /^最近一条消息处理失败:(.+)$/.exec(text); if (match) return `Latest message failed: ${localizeText(match[1])}`; match = /^图片下载失败(HTTP (.+)),请重新发送后再试。$/.exec(text); if (match) return `The image download failed (HTTP ${match[1]}). Send it again.`; match = /^一次最多只能处理 (\d+) 张图片。$/.exec(text); if (match) return `A message can contain at most ${match[1]} images.`; match = /^状态刷新失败:(.+)$/.exec(text); if (match) return `Status refresh failed: ${match[1]}`; match = /^状态自动刷新失败:(.+)$/.exec(text); if (match) return `Automatic status refresh failed: ${match[1]}`; match = /^操作失败:(.+)$/.exec(text); if (match) return `Operation failed: ${match[1]}`; match = /^连接检查失败:(.+)$/.exec(text); if (match) return `Connection check failed: ${match[1]}`; match = /^移除失败:(.+)$/.exec(text); if (match) return `Removal failed: ${match[1]}`; const phrases = [ ['企业微信', 'WeCom'], ['DeepSeek Harness', 'DeepSeek Harness'], ['WhatsApp', 'WhatsApp'], ['Telegram', 'Telegram'], ['Discord', 'Discord'], ['Slack', 'Slack'], ['飞书', 'Feishu'], ['钉钉', 'DingTalk'], ['微信', 'WeChat'], ['机器人', 'bot'], ['账号', 'account'], ['应用', 'app'], ['凭据', 'credentials'], ['服务返回了无法识别的响应', 'service returned an unrecognized response'], ['服务没有返回有效的机器人列表', 'service did not return a valid bot list'], ['操作失败,请稍后重试', 'operation failed; try again later'], ['操作失败', 'operation failed'], ['连接尚未就绪', 'connection is not ready'], ['没有接入完成', 'was not connected'], ['没有绑定完成', 'was not connected'], ['设置页缺少 RPC 连接', 'settings are missing an RPC connection'], ['设置', 'settings'], ['连接检查完成', 'connection check completed'], ['仍未连接,插件会继续自动重试', 'is still offline; the plugin will keep retrying'], ['已重新连接', 'reconnected'], ['移除失败,请重试', 'could not be removed; try again'], ['已连接,可以开始聊天', 'is connected and ready to chat'], ['已连接,可以开始发送消息', 'is connected and ready for messages'], ['服务请求失败', 'service request failed'], ['连接遇到问题', 'connection encountered a problem'], ['正在读取', 'Loading '], ['连接状态', 'connection status'], ['二维码', 'QR code'], ]; let output = text; for (const [source, target] of phrases) output = output.replaceAll(source, target); return output; } export function localizeText(value) { if (typeof value !== 'string') return value; const exact = translate(value); if (exact !== value || !isEnglish()) return exact; return translateDynamic(value); } const LOCALIZED_PROPS = Object.freeze([ 'aria-label', 'alt', 'placeholder', 'title', ]); function localizeChild(child) { if (typeof child === 'string') return localizeText(child); if (Array.isArray(child)) return child.map(localizeChild); return child; } export function h(type, props, ...children) { let localizedProps = props; if (props) { for (const key of LOCALIZED_PROPS) { if (typeof props[key] === 'string') { localizedProps = localizedProps === props ? { ...props } : localizedProps; localizedProps[key] = localizeText(props[key]); } } } return React.createElement(type, localizedProps, ...children.map(localizeChild)); }