change lang to zh
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Review Videos</title>
|
||||
<title>视频审核工具</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -24,7 +24,7 @@ fn copy_directory(template_path: String, target_path: String, new_folder_name: S
|
||||
let destination = target_parent.join(&new_folder_name);
|
||||
|
||||
if !template.exists() {
|
||||
return Err("Template directory does not exist".to_string());
|
||||
return Err("模板目录不存在".to_string());
|
||||
}
|
||||
|
||||
// Remove the check for existing destination to allow merging/overwriting
|
||||
@@ -155,7 +155,7 @@ fn check_dir_exists(path: String) -> bool {
|
||||
#[tauri::command]
|
||||
fn rename_videos(files: Vec<String>, prefix: String, base_name: String) -> Result<String, String> {
|
||||
if files.is_empty() {
|
||||
return Err("No files provided".to_string());
|
||||
return Err("未提供文件".to_string());
|
||||
}
|
||||
|
||||
// 1. Group files by parent directory to ensure index uniqueness per directory
|
||||
@@ -244,7 +244,7 @@ fn rename_videos(files: Vec<String>, prefix: String, base_name: String) -> Resul
|
||||
}
|
||||
}
|
||||
|
||||
Ok(format!("Successfully renamed {} files.", renamed_count))
|
||||
Ok(format!("成功重命名 {} 个文件。", renamed_count))
|
||||
}
|
||||
|
||||
// --- Check Logic ---
|
||||
@@ -281,7 +281,7 @@ fn remove_empty_dirs_recursive(path: &Path, deleted_list: &mut Vec<String>) -> s
|
||||
fn delete_empty_dirs(path: String) -> Result<Vec<String>, String> {
|
||||
let root_path = Path::new(&path);
|
||||
if !root_path.exists() || !root_path.is_dir() {
|
||||
return Err("Path is not a valid directory".to_string());
|
||||
return Err("路径不是有效的目录".to_string());
|
||||
}
|
||||
|
||||
let mut deleted = Vec::new();
|
||||
@@ -305,7 +305,7 @@ fn delete_empty_dirs(path: String) -> Result<Vec<String>, String> {
|
||||
fn check_file_naming(path: String, prefix: String) -> Result<Vec<String>, String> {
|
||||
let root_path = Path::new(&path);
|
||||
if !root_path.exists() || !root_path.is_dir() {
|
||||
return Err("Path is not a valid directory".to_string());
|
||||
return Err("路径不是有效的目录".to_string());
|
||||
}
|
||||
|
||||
let mut mismatches = Vec::new();
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "review-videos",
|
||||
"title": "视频审核工具",
|
||||
"width": 1200,
|
||||
"height": 840
|
||||
}
|
||||
|
||||
10
src/App.vue
10
src/App.vue
@@ -108,7 +108,7 @@ const loadConfig = async () => {
|
||||
if (config.working_dir) workingDir.value = config.working_dir;
|
||||
if (config.template_dir) templateDir.value = config.template_dir;
|
||||
} catch (e) {
|
||||
console.error("Failed to load config:", e);
|
||||
console.error("加载配置失败:", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ const saveConfig = async () => {
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.error("Failed to save config:", e);
|
||||
console.error("保存配置失败:", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ const loadHistory = async () => {
|
||||
const history = await invoke<Record<string, string[]>>('load_history');
|
||||
historyMap.value = history || {};
|
||||
} catch (e) {
|
||||
console.error("Failed to load history", e);
|
||||
console.error("加载历史记录失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ const handleRename = async () => {
|
||||
historyMap.value = newMap;
|
||||
updateHistoryList();
|
||||
} catch (e) {
|
||||
console.error("History save failed", e);
|
||||
console.error("保存历史记录失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -602,7 +602,7 @@ watch(currentDir, (newPath) => {
|
||||
|
||||
<!-- Action Area -->
|
||||
<div class="action-area">
|
||||
<el-input v-model="videoNameInput" placeholder="输入视频名称 (例如: 文本)" class="name-input">
|
||||
<el-input v-model="videoNameInput" placeholder="视频名称" class="name-input">
|
||||
<template #prepend>{{ videoNamePrefix }}</template>
|
||||
</el-input>
|
||||
<el-button type="primary" @click="handleRename" :disabled="isReviewDisabled || importedFiles.length === 0">命名</el-button>
|
||||
|
||||
Reference in New Issue
Block a user