diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index bf177ef1..6be8be4f 100644
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -729,7 +729,25 @@
"noHostSelected": "No host selected",
"starred": "Starred",
"shortcuts": "Shortcuts",
- "directories": "Directories"
+ "directories": "Directories",
+ "removedFromRecentFiles": "Removed \"{{name}}\" from recent files",
+ "removeFailed": "Remove failed",
+ "unpinnedSuccessfully": "Unpinned \"{{name}}\" successfully",
+ "unpinFailed": "Unpin failed",
+ "removedShortcut": "Removed shortcut \"{{name}}\"",
+ "removeShortcutFailed": "Remove shortcut failed",
+ "clearedAllRecentFiles": "Cleared all recent files",
+ "clearFailed": "Clear failed",
+ "removeFromRecentFiles": "Remove from recent files",
+ "clearAllRecentFiles": "Clear all recent files",
+ "unpinFile": "Unpin file",
+ "removeShortcut": "Remove shortcut",
+ "saveFilesToSystem": "Save {{count}} files to system",
+ "saveToSystem": "Save to system",
+ "pinFile": "Pin file",
+ "addToShortcuts": "Add to shortcuts",
+ "selectLocationToSave": "Select location to save",
+ "downloadToDefaultLocation": "Download to default location"
},
"tunnels": {
"title": "SSH Tunnels",
diff --git a/src/locales/zh/translation.json b/src/locales/zh/translation.json
index 10889c2c..65c3457d 100644
--- a/src/locales/zh/translation.json
+++ b/src/locales/zh/translation.json
@@ -736,7 +736,25 @@
"cannotSaveFile": "无法保存文件",
"starred": "收藏",
"shortcuts": "快捷方式",
- "directories": "目录"
+ "directories": "目录",
+ "removedFromRecentFiles": "已从最近访问中移除\"{{name}}\"",
+ "removeFailed": "移除失败",
+ "unpinnedSuccessfully": "已取消固定\"{{name}}\"",
+ "unpinFailed": "取消固定失败",
+ "removedShortcut": "已移除快捷方式\"{{name}}\"",
+ "removeShortcutFailed": "移除快捷方式失败",
+ "clearedAllRecentFiles": "已清除所有最近访问记录",
+ "clearFailed": "清除失败",
+ "removeFromRecentFiles": "从最近访问中移除",
+ "clearAllRecentFiles": "清除所有最近访问",
+ "unpinFile": "取消固定",
+ "removeShortcut": "移除快捷方式",
+ "saveFilesToSystem": "保存 {{count}} 个文件到系统",
+ "saveToSystem": "保存到系统",
+ "pinFile": "固定文件",
+ "addToShortcuts": "添加到快捷方式",
+ "selectLocationToSave": "选择位置保存",
+ "downloadToDefaultLocation": "下载到默认位置"
},
"tunnels": {
"title": "SSH 隧道",
diff --git a/src/ui/Desktop/Apps/File Manager/FileManagerContextMenu.tsx b/src/ui/Desktop/Apps/File Manager/FileManagerContextMenu.tsx
index 85437d0f..59e87e6b 100644
--- a/src/ui/Desktop/Apps/File Manager/FileManagerContextMenu.tsx
+++ b/src/ui/Desktop/Apps/File Manager/FileManagerContextMenu.tsx
@@ -262,10 +262,10 @@ export function FileManagerContextMenu({
menuItems.push({
icon: ,
label: isMultipleFiles
- ? `保存 ${files.length} 个文件到系统`
- : "保存到系统",
+ ? t("fileManager.saveFilesToSystem", { count: files.length })
+ : t("fileManager.saveToSystem"),
action: () => onDragToDesktop(),
- shortcut: isModernBrowser ? "选择位置保存" : "下载到默认位置"
+ shortcut: isModernBrowser ? t("fileManager.selectLocationToSave") : t("fileManager.downloadToDefaultLocation")
});
}
@@ -276,13 +276,13 @@ export function FileManagerContextMenu({
if (isCurrentlyPinned && onUnpinFile) {
menuItems.push({
icon: ,
- label: "取消固定",
+ label: t("fileManager.unpinFile"),
action: () => onUnpinFile(files[0])
});
} else if (!isCurrentlyPinned && onPinFile) {
menuItems.push({
icon: ,
- label: "固定文件",
+ label: t("fileManager.pinFile"),
action: () => onPinFile(files[0])
});
}
@@ -292,7 +292,7 @@ export function FileManagerContextMenu({
if (isSingleFile && files[0].type === 'directory' && onAddShortcut) {
menuItems.push({
icon: ,
- label: "添加到快捷方式",
+ label: t("fileManager.addToShortcuts"),
action: () => onAddShortcut(files[0].path)
});
}
diff --git a/src/ui/Desktop/Apps/File Manager/FileManagerSidebar.tsx b/src/ui/Desktop/Apps/File Manager/FileManagerSidebar.tsx
index 05d46d60..582ff454 100644
--- a/src/ui/Desktop/Apps/File Manager/FileManagerSidebar.tsx
+++ b/src/ui/Desktop/Apps/File Manager/FileManagerSidebar.tsx
@@ -134,10 +134,10 @@ export function FileManagerSidebar({
try {
await removeRecentFile(currentHost.id, item.path);
loadQuickAccessData(); // 重新加载数据
- toast.success(`已从最近访问中移除"${item.name}"`);
+ toast.success(t("fileManager.removedFromRecentFiles", { name: item.name }));
} catch (error) {
console.error('Failed to remove recent file:', error);
- toast.error('移除失败');
+ toast.error(t("fileManager.removeFailed"));
}
};
@@ -147,10 +147,10 @@ export function FileManagerSidebar({
try {
await removePinnedFile(currentHost.id, item.path);
loadQuickAccessData(); // 重新加载数据
- toast.success(`已取消固定"${item.name}"`);
+ toast.success(t("fileManager.unpinnedSuccessfully", { name: item.name }));
} catch (error) {
console.error('Failed to unpin file:', error);
- toast.error('取消固定失败');
+ toast.error(t("fileManager.unpinFailed"));
}
};
@@ -160,10 +160,10 @@ export function FileManagerSidebar({
try {
await removeFolderShortcut(currentHost.id, item.path);
loadQuickAccessData(); // 重新加载数据
- toast.success(`已移除快捷方式"${item.name}"`);
+ toast.success(t("fileManager.removedShortcut", { name: item.name }));
} catch (error) {
console.error('Failed to remove shortcut:', error);
- toast.error('移除快捷方式失败');
+ toast.error(t("fileManager.removeShortcutFailed"));
}
};
@@ -176,10 +176,10 @@ export function FileManagerSidebar({
recentItems.map(item => removeRecentFile(currentHost.id, item.path))
);
loadQuickAccessData(); // 重新加载数据
- toast.success(`已清除所有最近访问记录`);
+ toast.success(t("fileManager.clearedAllRecentFiles"));
} catch (error) {
console.error('Failed to clear recent files:', error);
- toast.error('清除失败');
+ toast.error(t("fileManager.clearFailed"));
}
};
@@ -463,7 +463,7 @@ export function FileManagerSidebar({
}}
>
- 从最近访问中移除
+ {t("fileManager.removeFromRecentFiles")}
{recentItems.length > 1 && (
<>
@@ -476,7 +476,7 @@ export function FileManagerSidebar({
}}
>
- 清除所有最近访问
+ {t("fileManager.clearAllRecentFiles")}
>
)}
@@ -492,7 +492,7 @@ export function FileManagerSidebar({
}}
>
- 取消固定
+ {t("fileManager.unpinFile")}
)}
@@ -505,7 +505,7 @@ export function FileManagerSidebar({
}}
>
- 移除快捷方式
+ {t("fileManager.removeShortcut")}
)}