mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-06-29 09:55:56 +08:00
cbf99f12fd
安全修复 (CRITICAL): - 启用 CSP (default-src 'self') - read_text_file 限制文件扩展名白名单 (.json/.csv/.txt) - capabilities 显式声明窗口权限 - profile 名校验增强 (null 字节/控制字符/长度限制) 功能修复 (HIGH): - AnalyzeDialog 重新打开时正确刷新数据 - UndoRedoButtons 订阅路径长度变化确保响应性 - 禁用状态持久化错误处理 (.catch → console.warn) - 硬编码中文全部迁移到 i18n (6 处) - PATH 长度检查改用 UTF-16 字符计数 - PATH 写入前 null 字节校验 - CLI export 拒绝写入系统目录 - savePaths 职责分离: window.confirm → Tauri ask() 对话框 代码质量 (MEDIUM): - 导入路径统一过滤 (sanitize_paths: null 字节/分号/空白) - 原子写入 (atomic_write: disabled.json + profiles) - 验证缓存自动清理 (PathTable useEffect) - Scanner 线程错误处理改进 (.unwrap → .map_err) - Ctrl+F 去重 (移除 use-keyboard 重复处理) - Profile 路径列表 key 修复 (index → path) - 生产构建启用日志插件 (Warn 级别) - export_paths JSON 序列化改 expect 测试: - Rust: 35 → 48 测试 (+13) - Frontend: 80 → 85 测试 (+5) - Vitest 全局 jsdom + 覆盖率阈值 (80%) - 安装 @vitest/coverage-v8 + test:coverage 脚本 - 移除未使用的 @testing-library/jest-dom 工程化: - CI 添加 Cargo 缓存 (Swatinem/rust-cache@v2) - CI 添加 cargo fmt --check - tsconfig.test.json 覆盖测试文件类型检查 - cargo fmt 全量格式化 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
113 lines
3.7 KiB
JSON
113 lines
3.7 KiB
JSON
{
|
|
"app": {
|
|
"name": "PathEditor",
|
|
"nameReadonly": "PathEditor (Read-only)"
|
|
},
|
|
"tab": {
|
|
"system": "System Variables",
|
|
"user": "User Variables",
|
|
"merged": "Merge Preview"
|
|
},
|
|
"table": {
|
|
"path": "Path"
|
|
},
|
|
"button": {
|
|
"new": "New",
|
|
"edit": "Edit",
|
|
"browse": "Browse...",
|
|
"delete": "Delete",
|
|
"moveUp": "Move Up",
|
|
"moveDown": "Move Down",
|
|
"clean": "Clean",
|
|
"import": "Import",
|
|
"export": "Export",
|
|
"save": "OK",
|
|
"cancel": "Cancel",
|
|
"help": "Help",
|
|
"analyze": "Analyze",
|
|
"profiles": "Profiles",
|
|
"undo": "Undo",
|
|
"redo": "Redo",
|
|
"darkMode": "Dark Mode",
|
|
"lightMode": "Light Mode",
|
|
"language": "Language",
|
|
"retry": "Retry"
|
|
},
|
|
"merge": {
|
|
"system": "System",
|
|
"user": "User",
|
|
"source": "Source"
|
|
},
|
|
"status": {
|
|
"normal": "Ready",
|
|
"readonly": "Read-only mode — Administrator privileges required for editing",
|
|
"saving": "Saving...",
|
|
"saved": "Saved successfully",
|
|
"saved_without_backup": "Saved (backup failed)",
|
|
"error": "Operation failed",
|
|
"warning_backup": "Backup creation failed, save will proceed without backup",
|
|
"deleted": "Deleted {{count}} path(s)",
|
|
"loaded": "Loaded {{sysCount}} system and {{userCount}} user paths",
|
|
"dragFolderOnly": "Only folders can be dropped",
|
|
"loading": "Loading...",
|
|
"modified": "Modified",
|
|
"readonly_label": "Read-only",
|
|
"light": "Light",
|
|
"dark": "Dark",
|
|
"adminWarning": "Running without administrator privileges, some features are disabled",
|
|
"saveWarningLongPaths": "PATH length exceeds recommended value. Continue saving?"
|
|
},
|
|
"dialog": {
|
|
"newPath": "New Path",
|
|
"editPath": "Edit Path",
|
|
"pathLabel": "Enter path:",
|
|
"selectDir": "Select Directory",
|
|
"importTitle": "Import Paths",
|
|
"exportTitle": "Export Paths",
|
|
"importTarget": "Import Target",
|
|
"importSystem": "System Only",
|
|
"importUser": "User Only",
|
|
"importBoth": "Both",
|
|
"helpTitle": "Help",
|
|
"languageTitle": "Select Language",
|
|
"backupTitle": "Backup Confirmation",
|
|
"backupMessage": "Back up registry before saving?",
|
|
"confirm": "Confirm",
|
|
"cancel": "Cancel",
|
|
"search": "Search paths...",
|
|
"importSystemCount": "System: {{count}} entries",
|
|
"importUserCount": "User: {{count}} entries"
|
|
},
|
|
"analyze": {
|
|
"title": "PATH Analysis",
|
|
"conflicts": "Conflicts",
|
|
"tools": "Tools",
|
|
"scanning": "Scanning...",
|
|
"noConflicts": "No executable conflicts found",
|
|
"noTools": "No matching executables found",
|
|
"priority": "Prioritized",
|
|
"shadowed": "Shadowed",
|
|
"searchPlaceholder": "Search executable name...",
|
|
"conflictCount": "{{count}} file conflict(s) found",
|
|
"notExists": "(not found)"
|
|
},
|
|
"profile": {
|
|
"title": "PATH Profiles",
|
|
"saveCurrent": "Save Current as Profile",
|
|
"namePlaceholder": "Profile name...",
|
|
"save": "Save",
|
|
"load": "Load",
|
|
"apply": "Apply",
|
|
"delete": "Delete",
|
|
"rename": "Rename",
|
|
"noProfiles": "No saved profiles",
|
|
"applyConfirm": "This will overwrite current PATH with profile \"{{name}}\" and write to registry. Confirm?",
|
|
"deleted": "Profile \"{{name}}\" deleted",
|
|
"selectProfile": "Select a profile",
|
|
"empty": "(empty)"
|
|
},
|
|
"help": {
|
|
"content": "PathEditor v5.0 — Windows System Environment Variable (PATH) Editor\n\nFeatures:\n• Create/Edit/Delete path entries\n• Move Up/Down to adjust priority\n• One-click cleanup of invalid & duplicate paths\n• Import/Export JSON, CSV, TXT formats\n• Full Undo/Redo support\n\nShortcuts:\n• Ctrl+N New\n• Ctrl+S Save\n• Ctrl+Z Undo\n• Ctrl+Y Redo\n• Ctrl+F Search\n• Delete Delete selected\n• F1 Help\n\nAuthor: 刘航宇\nGitHub: https://github.com/LHY0125/PathEditor"
|
|
}
|
|
}
|