Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🌐 chore: translate non-English comments to English in packages/electron-client-ipc and packages/edge-config (#11926)

LobeHub Botce8c0c3eaffb
diff --git a/packages/edge-config/src/types.ts b/packages/edge-config/src/types.ts
index e6df9f29405..e4d11916d8d 100644
--- a/packages/edge-config/src/types.ts
+++ b/packages/edge-config/src/types.ts
@@ -2,7 +2,7 @@
import type { BusinessEdgeConfigData } from '@lobechat/business-config/server';
/**
- * EdgeConfig 完整配置类型
+ * EdgeConfig complete configuration type
*/
export interface EdgeConfigData extends BusinessEdgeConfigData {
/**
diff --git a/packages/electron-client-ipc/src/events/protocol.ts b/packages/electron-client-ipc/src/events/protocol.ts
index f117afb5ac6..77ad1ee0186 100644
--- a/packages/electron-client-ipc/src/events/protocol.ts
+++ b/packages/electron-client-ipc/src/events/protocol.ts
@@ -1,17 +1,17 @@
import { McpInstallSchema } from '../types';
/**
- * 协议安装相关的 Broadcast 事件(主进程 -> 渲染进程)
+ * Protocol installation related Broadcast events (main process -> renderer process)
*/
export interface ProtocolBroadcastEvents {
/**
- * MCP 插件安装请求事件
- * 主进程解析协议 URL 后发送给前端
+ * MCP plugin installation request event
+ * Sent to frontend after main process parses protocol URL
*/
mcpInstallRequest: (data: {
- /** 市场来源ID */
+ /** Market source ID */
marketId?: string;
- /** 插件ID */
+ /** Plugin ID */
pluginId: string;
/** MCP Schema 对象 */
schema: McpInstallSchema;
diff --git a/packages/electron-client-ipc/src/events/remoteServer.ts b/packages/electron-client-ipc/src/events/remoteServer.ts
index 92b6cb4d071..576311ce153 100644
--- a/packages/electron-client-ipc/src/events/remoteServer.ts
+++ b/packages/electron-client-ipc/src/events/remoteServer.ts
@@ -24,7 +24,7 @@ export interface AuthorizationProgress {
}
/**
- * 从主进程广播的远程服务器相关事件
+ * Remote server related events broadcast from main process
*/
export interface RemoteServerBroadcastEvents {
authorizationFailed: (params: { error: string }) => void;
diff --git a/packages/electron-client-ipc/src/types/dataSync.ts b/packages/electron-client-ipc/src/types/dataSync.ts
index 55880a0a2af..d5e2ce52763 100644
--- a/packages/electron-client-ipc/src/types/dataSync.ts
+++ b/packages/electron-client-ipc/src/types/dataSync.ts
@@ -5,7 +5,7 @@ export enum StorageModeEnum {
}
/**
- * 远程服务器配置相关的事件
+ * Remote server configuration related events
*/
export interface DataSyncConfig {
active?: boolean;
diff --git a/packages/electron-client-ipc/src/types/localSystem.ts b/packages/electron-client-ipc/src/types/localSystem.ts
index e4e9626ad1d..e6aefd99e89 100644
--- a/packages/electron-client-ipc/src/types/localSystem.ts
+++ b/packages/electron-client-ipc/src/types/localSystem.ts
@@ -91,12 +91,12 @@ export interface LocalReadFilesParams {
export interface WriteLocalFileParams {
/**
- * 要写入的内容
+ * Content to write
*/
content: string;
/**
- * 要写入的文件路径
+ * File path to write to
*/
path: string;
}
diff --git a/packages/electron-client-ipc/src/types/route.ts b/packages/electron-client-ipc/src/types/route.ts
index d65c3babb8e..952eee1e402 100644
--- a/packages/electron-client-ipc/src/types/route.ts
+++ b/packages/electron-client-ipc/src/types/route.ts
@@ -1,46 +1,46 @@
export interface InterceptRouteParams {
/**
- * 请求路径
+ * Request path
*/
path: string;
/**
- * 来源类型:'link-click', 'push-state', 'replace-state'
+ * Source type: 'link-click', 'push-state', 'replace-state'
*/
source: 'link-click' | 'push-state' | 'replace-state';
/**
- * 完整URL
+ * Full URL
*/
url: string;
}
export interface InterceptRouteResponse {
/**
- * 错误信息 (如果有)
+ * Error message (if any)
*/
error?: string;
/**
- * 是否已拦截
+ * Whether intercepted
*/
intercepted: boolean;
/**
- * 原始路径
+ * Original path
*/
path: string;
/**
- * 原始来源
+ * Original source
*/
source: string;
/**
- * 子路径 (如果有)
+ * Sub path (if any)
*/
subPath?: string;
/**
- * 目标窗口标识符
+ * Target window identifier
*/
targetWindow?: string;
}
diff --git a/packages/electron-client-ipc/src/types/shortcut.ts b/packages/electron-client-ipc/src/types/shortcut.ts
index f40bae95e13..8da848012e0 100644
--- a/packages/electron-client-ipc/src/types/shortcut.ts
+++ b/packages/electron-client-ipc/src/types/shortcut.ts
@@ -1,10 +1,10 @@
export interface ShortcutConfig {
/**
- * 快捷键加速器(如 CommandOrControl+E)
+ * Shortcut accelerator (e.g. CommandOrControl+E)
*/
accelerator: string;
/**
- * 快捷键 ID
+ * Shortcut ID
*/
id: string;
}
diff --git a/packages/electron-client-ipc/src/types/tray.ts b/packages/electron-client-ipc/src/types/tray.ts
index f1d4d820270..f625bc89045 100644
--- a/packages/electron-client-ipc/src/types/tray.ts
+++ b/packages/electron-client-ipc/src/types/tray.ts
@@ -1,39 +1,39 @@
/**
- * 显示托盘通知的参数
+ * Parameters for showing tray notification
*/
export interface ShowTrayNotificationParams {
/**
- * 通知内容
+ * Notification content
*/
content: string;
/**
- * 图标类型
+ * Icon type
*/
iconType?: 'info' | 'warning' | 'error' | 'none';
/**
- * 通知标题
+ * Notification title
*/
title: string;
}
/**
- * 更新托盘图标的参数
+ * Parameters for updating tray icon
*/
export interface UpdateTrayIconParams {
/**
- * 图标路径(相对于资源目录)
+ * Icon path (relative to resources directory)
*/
iconPath: string;
}
/**
- * 更新托盘提示文本的参数
+ * Parameters for updating tray tooltip
*/
export interface UpdateTrayTooltipParams {
/**
- * 提示文本
+ * Tooltip text
*/
tooltip: string;
}
diff --git a/packages/electron-client-ipc/src/utils/headers.ts b/packages/electron-client-ipc/src/utils/headers.ts
index e3b7f5d6756..ecf138b9104 100644
--- a/packages/electron-client-ipc/src/utils/headers.ts
+++ b/packages/electron-client-ipc/src/utils/headers.ts
@@ -1,7 +1,7 @@
/**
- * 将 HeadersInit 转换为 Record<string, string>
- * @param headersInit - Headers 初始化对象
- * @returns 转换后的记录对象
+ * Convert HeadersInit to Record<string, string>
+ * @param headersInit - Headers initialization object
+ * @returns Converted record object
*/
// eslint-disable-next-line no-undef
export const headersToRecord = (headersInit?: HeadersInit): Record<string, string> => {
diff --git a/packages/electron-client-ipc/src/utils/request.ts b/packages/electron-client-ipc/src/utils/request.ts
index 73b463ea435..fdefcbd24d6 100644
--- a/packages/electron-client-ipc/src/utils/request.ts
+++ b/packages/electron-client-ipc/src/utils/request.ts
@@ -1,7 +1,7 @@
/**
- * 从请求体中获取数据
- * @param body - 请求体
- * @returns 转换后的请求体数据
+ * Get data from request body
+ * @param body - Request body
+ * @returns Converted request body data
*/
export const getRequestBody = async (
// eslint-disable-next-line no-undef
@@ -23,6 +23,6 @@ export const getRequestBody = async (
return await body.arrayBuffer();
}
- console.warn('不支持的 IPC 代理请求体类型:', typeof body);
- throw new Error('不支持的 IPC 代理请求体类型');
+ console.warn('Unsupported IPC proxy request body type:', typeof body);
+ throw new Error('Unsupported IPC proxy request body type');
};