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 src/hooks (#12028)

LobeHub Bot5db07efe6bf1
diff --git a/src/hooks/useFetchAgentList.ts b/src/hooks/useFetchAgentList.ts
index 550bb3708ad..d43a08d79d0 100644
--- a/src/hooks/useFetchAgentList.ts
+++ b/src/hooks/useFetchAgentList.ts
@@ -12,7 +12,7 @@ export const useFetchAgentList = () => {
const { isValidating, data } = useFetchAgentListHook(isLogin);
- // isRevalidating: 有缓存数据,后台正在更新
+ // isRevalidating: has cached data, updating in background
return {
isRevalidating: isValidating && !!data,
};
diff --git a/src/hooks/useHotkeys/chatScope.ts b/src/hooks/useHotkeys/chatScope.ts
index f7ead0c15db..ae3554f5214 100644
--- a/src/hooks/useHotkeys/chatScope.ts
+++ b/src/hooks/useHotkeys/chatScope.ts
@@ -49,7 +49,7 @@ export const useClearCurrentMessagesHotkey = () => {
});
};
-// 注册聚合
+// Register aggregate
export const useRegisterChatHotkeys = () => {
const { enableScope, disableScope } = useHotkeysContext();
diff --git a/src/hooks/useHotkeys/globalScope.ts b/src/hooks/useHotkeys/globalScope.ts
index 70614846b9f..917450479e9 100644
--- a/src/hooks/useHotkeys/globalScope.ts
+++ b/src/hooks/useHotkeys/globalScope.ts
@@ -7,7 +7,7 @@ import { useGlobalStore } from '@/store/global';
import { useHotkeyById } from './useHotkeyById';
-// 切换到会话标签(并聚焦到Lobe AI)
+// Switch to chat tab (and focus on Lobe AI)
export const useNavigateToChatHotkey = () => {
const navigateToAgent = useNavigateToAgent();
const [, { unpinAgent }] = usePinnedAgentState();
@@ -58,7 +58,7 @@ export const useCommandPaletteHotkey = () => {
};
export const useRegisterGlobalHotkeys = () => {
- // 全局自动注册不需要 enableScope
+ // Global auto-registration doesn't need enableScope
useToggleLeftPanelHotkey();
useToggleRightPanelHotkey();
useNavigateToChatHotkey();
diff --git a/src/hooks/useHotkeys/imageScope.ts b/src/hooks/useHotkeys/imageScope.ts
index 44962cc295b..e48532d17c3 100644
--- a/src/hooks/useHotkeys/imageScope.ts
+++ b/src/hooks/useHotkeys/imageScope.ts
@@ -19,7 +19,7 @@ export const useToggleImageRightPanelHotkey = () => {
);
};
-// 注册聚合
+// Register aggregate
export const useRegisterImageHotkeys = () => {
const { enableScope, disableScope } = useHotkeysContext();
diff --git a/src/hooks/usePWAInstall.ts b/src/hooks/usePWAInstall.ts
index 53afd382bbc..5a69810c2fb 100644
--- a/src/hooks/usePWAInstall.ts
+++ b/src/hooks/usePWAInstall.ts
@@ -19,7 +19,7 @@ export const usePWAInstall = () => {
}, []);
const installCheck = () => {
- // 当在 PWA 或不支持 PWA 的环境中时,不显示安装按钮
+ // Don't show install button when in PWA or environment that doesn't support PWA
if (isPWA || !isSupportInstallPWA) return false;
const pwa: any = document.querySelector(`#${PWA_INSTALL_ID}`);
if (!pwa) return false;