修复核心UI文本的i18n问题:支持多语言切换

主要修复:
- 右键菜单:在此处打开终端、运行、保存到系统
- 拖拽提示:拖拽系统文件到此处上传、拖拽文件到窗口外下载
- 终端窗口标题和状态提示
- 错误消息:没有选择主机、只能运行可执行文件
- 添加完整的中英文翻译条目

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ZacharyZcR
2025-09-17 01:32:15 +08:00
parent 948704055b
commit a0c3ce307d
5 changed files with 38 additions and 14 deletions

View File

@@ -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 }));
}
// 过滤文件并添加新建的临时项目