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 desktop core modules (#11873)

LobeHub Botdce106b8be94
diff --git a/apps/desktop/src/common/routes.ts b/apps/desktop/src/common/routes.ts
index 91190fe9b9c..2b171528ce8 100644
--- a/apps/desktop/src/common/routes.ts
+++ b/apps/desktop/src/common/routes.ts
@@ -34,14 +34,14 @@ export interface RouteInterceptConfig {
*/
export const interceptRoutes: RouteInterceptConfig[] = [
{
- description: '开发者工具',
+ description: 'Developer Tools',
enabled: true,
pathPrefix: '/desktop/devtools',
targetWindow: 'devtools',
},
- // 未来可能的其他路由
+ // Possible future routes
// {
- // description: '帮助中心',
+ // description: 'Help Center',
// enabled: true,
// pathPrefix: '/help',
// targetWindow: 'help',
@@ -49,24 +49,24 @@ export const interceptRoutes: RouteInterceptConfig[] = [
];
/**
- * 通过路径查找匹配的路由拦截配置
- * @param path 需要检查的路径
- * @returns 匹配的拦截配置,如果没有匹配则返回 undefined
+ * Find matching route intercept configuration by path
+ * @param path Path to check
+ * @returns Matching intercept configuration, or undefined if no match found
*/
export const findMatchingRoute = (path: string): RouteInterceptConfig | undefined => {
return interceptRoutes.find((route) => route.enabled && path.startsWith(route.pathPrefix));
};
/**
- * 从完整路径中提取子路径
- * @param fullPath 完整路径,如 '/settings/agent'
- * @param pathPrefix 路径前缀,如 '/settings'
- * @returns 子路径,如 'agent'
+ * Extract sub-path from full path
+ * @param fullPath Full path, e.g., '/settings/agent'
+ * @param pathPrefix Path prefix, e.g., '/settings'
+ * @returns Sub-path, e.g., 'agent'
*/
export const extractSubPath = (fullPath: string, pathPrefix: string): string | undefined => {
if (fullPath.length <= pathPrefix.length) return undefined;
- // 去除前导斜杠
+ // Remove leading slash
const subPath = fullPath.slice(Math.max(0, pathPrefix.length + 1));
return subPath || undefined;
};
diff --git a/apps/desktop/src/main/modules/updater/configs.ts b/apps/desktop/src/main/modules/updater/configs.ts
index 7066aeb0543..8e67751759e 100644
--- a/apps/desktop/src/main/modules/updater/configs.ts
+++ b/apps/desktop/src/main/modules/updater/configs.ts
@@ -18,7 +18,7 @@ export const githubConfig = {
};
export const updaterConfig = {
- // 应用Update configuration
+ // Application update configuration
app: {
// Whether to auto-check for updates
autoCheckUpdate: true,
diff --git a/apps/desktop/src/main/types/protocol.ts b/apps/desktop/src/main/types/protocol.ts
index 22bc881ebce..82a8207f05a 100644
--- a/apps/desktop/src/main/types/protocol.ts
+++ b/apps/desktop/src/main/types/protocol.ts
@@ -37,24 +37,24 @@ export interface McpSchema {
homepage?: string;
/** Plugin icon */
icon?: string;
- /** Plugin unique identifier,必须与URL中的id参数匹配 */
+ /** Plugin unique identifier, must match the id parameter in the URL */
identifier: string;
- /** 插件名称 */
+ /** Plugin name */
name: string;
- /** 插件版本 (semver) */
+ /** Plugin version (semver) */
version: string;
}
/**
- * 协议URL解析结果
+ * Protocol URL parsing result
*/
export interface ProtocolUrlParsed {
/** Action type (e.g., 'install') */
action: string;
- /** 原始URL */
+ /** Original URL */
originalUrl: string;
- /** 解析后的所有查询参数 */
+ /** All parsed query parameters */
params: Record<string, string>;
- /** URL类型 (如: 'plugin') */
+ /** URL type (e.g., 'plugin') */
urlType: string;
}
diff --git a/apps/desktop/src/main/utils/logger.ts b/apps/desktop/src/main/utils/logger.ts
index 4a34a8f1a1a..000a9c722af 100644
--- a/apps/desktop/src/main/utils/logger.ts
+++ b/apps/desktop/src/main/utils/logger.ts
@@ -7,8 +7,8 @@ import { getDesktopEnv } from '@/env';
electronLog.transports.file.level = 'info'; // Log info level and above in production
electronLog.transports.console.level =
getDesktopEnv().NODE_ENV === 'development'
- ? 'debug' // 开发环境显示更多日志
- : 'info'; // 生产环境显示 info 及以上级别
+ ? 'debug' // Show more logs in development environment
+ : 'info'; // Show info level and above in production environment
// Create namespaced debugger
export const createLogger = (namespace: string) => {