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/const (#10073)

LobeHub Bot11aa0ecad52c
diff --git a/packages/const/src/hotkeys.ts b/packages/const/src/hotkeys.ts
index b6cb7b80345..b952e414e2d 100644
--- a/packages/const/src/hotkeys.ts
+++ b/packages/const/src/hotkeys.ts
@@ -12,7 +12,7 @@ const combineKeys = (keys: string[]) => keys.join('+');
export type HotkeyRegistration = HotkeyItem[];
-// mod 在 Mac 上是 command 键,alt 在 Win 上是 ctrl 键
+// mod is the command key on Mac, alt is the ctrl key on Windows
export const HOTKEYS_REGISTRATION: HotkeyRegistration = [
// basic
{
@@ -93,7 +93,7 @@ export const HOTKEYS_REGISTRATION: HotkeyRegistration = [
group: HotkeyGroupEnum.Conversation,
id: HotkeyEnum.AddUserMessage,
keys: combineKeys([KeyEnum.Alt, KeyEnum.Enter]),
- // 不通过 Scope 模式激活
+ // Not activated through Scope mode
},
{
group: HotkeyGroupEnum.Conversation,
@@ -112,7 +112,7 @@ export const HOTKEYS_REGISTRATION: HotkeyRegistration = [
type DesktopHotkeyRegistration = DesktopHotkeyItem[];
-// 桌面端快捷键配置
+// Desktop hotkey configuration
export const DESKTOP_HOTKEYS_REGISTRATION: DesktopHotkeyRegistration = [
{
id: DesktopHotkeyEnum.ShowApp,
diff --git a/packages/const/src/models.ts b/packages/const/src/models.ts
index c2a6cc2d0a2..6ba9439ba21 100644
--- a/packages/const/src/models.ts
+++ b/packages/const/src/models.ts
@@ -5,14 +5,14 @@ export const systemToUserModels = new Set([
'o1-mini-2024-09-12',
]);
-// TODO: 临时写法,后续要重构成 model card 展示配置
+// TODO: temporary implementation, needs to be refactored into model card display configuration
export const disableStreamModels = new Set([
'o1',
'o1-2024-12-17',
'o1-pro',
'o1-pro-2025-03-19',
/*
- 官网显示不支持,但是实际试下来支持 Streaming,暂时注释掉
+ Official documentation shows no support, but actual testing shows Streaming is supported, temporarily commented out
'o3-pro',
'o3-pro-2025-06-10',
*/
diff --git a/packages/const/src/utils/merge.ts b/packages/const/src/utils/merge.ts
index 920481729f6..ea720b352e8 100644
--- a/packages/const/src/utils/merge.ts
+++ b/packages/const/src/utils/merge.ts
@@ -1,7 +1,7 @@
import { merge as _merge, isEmpty, mergeWith } from 'lodash-es';
/**
- * 用于合并对象,如果是数组则直接替换
+ * Used to merge objects. If it's an array, replace directly
* @param target
* @param source
*/
@@ -24,7 +24,7 @@ export const mergeArrayById = <T extends MergeableItem>(defaultItems: T[], userI
// Create a map of default items for faster lookup
const defaultItemsMap = new Map(defaultItems.map((item) => [item.id, item]));
- // 使用 Map 存储合并结果,这样重复 ID 的后项会自然覆盖前项
+ // Use Map to store merge results, so that later items with duplicate IDs naturally override earlier ones
const mergedItemsMap = new Map<string, T>();
// Process user items with default metadata
@@ -51,7 +51,7 @@ export const mergeArrayById = <T extends MergeableItem>(defaultItems: T[], userI
mergedItemsMap.set(userItem.id, mergedItem);
});
- // 添加只在默认配置中存在的项
+ // Add items that only exist in the default configuration
defaultItems.forEach((item) => {
if (!mergedItemsMap.has(item.id)) {
mergedItemsMap.set(item.id, item);