diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index 4741d731..c111363b 100644
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -714,7 +714,19 @@
"sshStatusCheckTimeout": "SSH status check timed out",
"sshReconnectionTimeout": "SSH reconnection timed out",
"saveOperationTimeout": "Save operation timed out",
- "cannotSaveFile": "Cannot save file"
+ "cannotSaveFile": "Cannot save file",
+ "dragSystemFilesToUpload": "Drag system files here to upload",
+ "dragFilesToWindowToDownload": "Drag files outside window to download",
+ "openTerminalHere": "Open Terminal Here",
+ "run": "Run",
+ "saveToSystem": "Save to System",
+ "selectLocationToSave": "Select Location to Save",
+ "openTerminalInFolder": "Open Terminal in This Folder",
+ "openTerminalInFileLocation": "Open Terminal at File Location",
+ "terminalWithPath": "Terminal - {{host}}:{{path}}",
+ "runningFile": "Running - {{file}}",
+ "onlyRunExecutableFiles": "Can only run executable files",
+ "noHostSelected": "No host selected"
},
"tunnels": {
"title": "SSH Tunnels",
diff --git a/src/locales/zh/translation.json b/src/locales/zh/translation.json
index 3c0ff7bb..dbaeb2f8 100644
--- a/src/locales/zh/translation.json
+++ b/src/locales/zh/translation.json
@@ -705,6 +705,18 @@
"confirmDeleteMessage": "确定要删除 {{name}} 吗?",
"deleteDirectoryWarning": "这将删除文件夹及其所有内容。",
"actionCannotBeUndone": "此操作无法撤销。",
+ "dragSystemFilesToUpload": "拖拽系统文件到此处上传",
+ "dragFilesToWindowToDownload": "拖拽文件到窗口外下载",
+ "openTerminalHere": "在此处打开终端",
+ "run": "运行",
+ "saveToSystem": "保存到系统",
+ "selectLocationToSave": "选择位置保存",
+ "openTerminalInFolder": "在此文件夹打开终端",
+ "openTerminalInFileLocation": "在文件位置打开终端",
+ "terminalWithPath": "终端 - {{host}}:{{path}}",
+ "runningFile": "运行 - {{file}}",
+ "onlyRunExecutableFiles": "只能运行可执行文件",
+ "noHostSelected": "没有选择主机",
"recent": "最近的",
"pinned": "固定的",
"folderShortcuts": "文件夹快捷方式",
diff --git a/src/ui/Desktop/Apps/File Manager/FileManagerContextMenu.tsx b/src/ui/Desktop/Apps/File Manager/FileManagerContextMenu.tsx
index 11f0d4c8..044f2f87 100644
--- a/src/ui/Desktop/Apps/File Manager/FileManagerContextMenu.tsx
+++ b/src/ui/Desktop/Apps/File Manager/FileManagerContextMenu.tsx
@@ -206,7 +206,7 @@ export function FileManagerContextMenu({
menuItems.push({
icon: ,
- label: files[0].type === 'directory' ? "在此文件夹打开终端" : "在文件位置打开终端",
+ label: files[0].type === 'directory' ? t("fileManager.openTerminalInFolder") : t("fileManager.openTerminalInFileLocation"),
action: () => onOpenTerminal(targetPath),
shortcut: "Ctrl+T"
});
@@ -216,7 +216,7 @@ export function FileManagerContextMenu({
if (isSingleFile && hasExecutableFiles && onRunExecutable) {
menuItems.push({
icon: ,
- label: "运行",
+ label: t("fileManager.run"),
action: () => onRunExecutable(files[0]),
shortcut: "Enter"
});
@@ -322,7 +322,7 @@ export function FileManagerContextMenu({
if (onOpenTerminal && currentPath) {
menuItems.push({
icon: ,
- label: "在此处打开终端",
+ label: t("fileManager.openTerminalHere"),
action: () => onOpenTerminal(currentPath),
shortcut: "Ctrl+T"
});
diff --git a/src/ui/Desktop/Apps/File Manager/FileManagerGrid.tsx b/src/ui/Desktop/Apps/File Manager/FileManagerGrid.tsx
index 6ae5c17d..364f61c5 100644
--- a/src/ui/Desktop/Apps/File Manager/FileManagerGrid.tsx
+++ b/src/ui/Desktop/Apps/File Manager/FileManagerGrid.tsx
@@ -894,10 +894,10 @@ export function FileManagerGrid({
- 拖拽文件到此处上传
+ {t("fileManager.dragFilesToUpload")}
- 从系统文件管理器拖拽文件到这里进行上传
+ {t("fileManager.dragSystemFilesToUpload")}
@@ -912,11 +912,11 @@ export function FileManagerGrid({
- 拖拽系统文件到此处上传
+ {t("fileManager.dragSystemFilesToUpload")}
- 拖拽文件到窗口外下载
+ {t("fileManager.dragFilesToWindowToDownload")}
diff --git a/src/ui/Desktop/Apps/File Manager/FileManagerModern.tsx b/src/ui/Desktop/Apps/File Manager/FileManagerModern.tsx
index 0769b90c..ed7e0c52 100644
--- a/src/ui/Desktop/Apps/File Manager/FileManagerModern.tsx
+++ b/src/ui/Desktop/Apps/File Manager/FileManagerModern.tsx
@@ -1141,7 +1141,7 @@ function FileManagerContent({ initialHost, onClose }: FileManagerModernProps) {
// 打开终端处理函数
function handleOpenTerminal(path: string) {
if (!currentHost) {
- toast.error("没有选择主机");
+ toast.error(t("fileManager.noHostSelected"));
return;
}
@@ -1172,18 +1172,18 @@ function FileManagerContent({ initialHost, onClose }: FileManagerModernProps) {
component: createTerminalComponent
});
- toast.success(`在 ${path} 打开终端`);
+ toast.success(t("fileManager.terminalWithPath", { host: currentHost.name, path }));
}
// 运行可执行文件处理函数
function handleRunExecutable(file: FileItem) {
if (!currentHost) {
- toast.error("没有选择主机");
+ toast.error(t("fileManager.noHostSelected"));
return;
}
if (file.type !== 'file' || !file.executable) {
- toast.error("只能运行可执行文件");
+ toast.error(t("fileManager.onlyRunExecutableFiles"));
return;
}
@@ -1209,7 +1209,7 @@ function FileManagerContent({ initialHost, onClose }: FileManagerModernProps) {
);
openWindow({
- title: `运行 - ${file.name}`,
+ title: t("fileManager.runningFile", { file: file.name }),
x: offsetX,
y: offsetY,
width: 800,
@@ -1219,7 +1219,7 @@ function FileManagerContent({ initialHost, onClose }: FileManagerModernProps) {
component: createExecutionTerminal
});
- toast.success(`正在运行: ${file.name}`);
+ toast.success(t("fileManager.runningFile", { file: file.name }));
}
// 过滤文件并添加新建的临时项目