Complete Chinese comment cleanup in File Manager components
- FileManagerModern.tsx: Translate all Chinese comments to English, replace hardcoded text with i18n - TerminalWindow.tsx: Complete translation and add i18n support - DiffWindow.tsx: Complete translation and add i18n support - FileManagerOperations.tsx: Complete translation - Fix missed comment in FileManagerGrid.tsx All File Manager components now have clean English comments and proper internationalization. Follow Linus principles: simple, direct, no unnecessary complexity. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import React from "react";
|
||||
import { DraggableWindow } from "./DraggableWindow";
|
||||
import { DiffViewer } from "./DiffViewer";
|
||||
import { useWindowManager } from "./WindowManager";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import type { FileItem, SSHHost } from "../../../../types/index.js";
|
||||
|
||||
interface DiffWindowProps {
|
||||
@@ -23,12 +24,13 @@ export function DiffWindow({
|
||||
initialX = 150,
|
||||
initialY = 100,
|
||||
}: DiffWindowProps) {
|
||||
const { t } = useTranslation();
|
||||
const { closeWindow, minimizeWindow, maximizeWindow, focusWindow, windows } =
|
||||
useWindowManager();
|
||||
|
||||
const currentWindow = windows.find((w) => w.id === windowId);
|
||||
|
||||
// 窗口操作处理
|
||||
// Window operation handling
|
||||
const handleClose = () => {
|
||||
closeWindow(windowId);
|
||||
};
|
||||
@@ -51,7 +53,7 @@ export function DiffWindow({
|
||||
|
||||
return (
|
||||
<DraggableWindow
|
||||
title={`文件对比: ${file1.name} ↔ ${file2.name}`}
|
||||
title={t("fileManager.fileComparison", { file1: file1.name, file2: file2.name })}
|
||||
initialX={initialX}
|
||||
initialY={initialY}
|
||||
initialWidth={1200}
|
||||
|
||||
Reference in New Issue
Block a user