style(web): translate Chinese comments to English in KnowledgeBase views

- Translate all Chinese comments to English in CreateDataset component
- Translate Chinese comments in DocumentDetails, Private, and Share pages
- Translate Chinese comments in all KnowledgeBase modal components (CreateContentModal, CreateDatasetModal, CreateFolderModal, etc.)
- Translate Chinese comments in KnowledgeGraph, RecallTest, and related components
- Translate Chinese comments in datasets and index files
- Improve code readability and maintain consistency with existing English codebase
- Ensure all inline comments and console logs use English for better maintainability
This commit is contained in:
yujiangping
2026-02-03 17:08:22 +08:00
parent 8697498b32
commit 6e0407f404
22 changed files with 415 additions and 416 deletions

View File

@@ -12,7 +12,7 @@ const RecallTestDrawer = forwardRef<RecallTestDrawerRef>(({},ref) => {
const pendingKbIdRef = useRef<string | undefined>(undefined);
const shouldCallHandleOpenRef = useRef(false);
// 调用 RecallTest handleOpen 方法
// Call RecallTest's handleOpen method
const callRecallTestHandleOpen = useCallback(() => {
if (recallTestRef.current && shouldCallHandleOpenRef.current) {
recallTestRef.current.handleOpen(pendingKbIdRef.current);
@@ -26,14 +26,14 @@ const RecallTestDrawer = forwardRef<RecallTestDrawerRef>(({},ref) => {
setOpen(true);
}
// Drawer 打开时,尝试调用 handleOpen
// When Drawer opens, try to call handleOpen
useLayoutEffect(() => {
if (open) {
callRecallTestHandleOpen();
}
}, [open, callRecallTestHandleOpen]);
// 使用回调 ref 确保在组件挂载后立即调用
// Use callback ref to ensure immediate call after component mount
const setRecallTestRef = useCallback((node: any) => {
recallTestRef.current = node;
if (open && shouldCallHandleOpenRef.current) {
@@ -41,7 +41,7 @@ const RecallTestDrawer = forwardRef<RecallTestDrawerRef>(({},ref) => {
}
}, [open, callRecallTestHandleOpen]);
// 暴露给父组件的方法
// Expose methods to parent component
useImperativeHandle(ref, () => ({
handleOpen,
}));