import { AppConfig } from './types';

// Provided JSON content for Chinese
export const ZH_CN_LOCALE: Record<string, string> = {
    "menu_title": "AiNiee CLI - 主菜单",
    "menu_start_translation": "开始翻译任务",
    "menu_start_polishing": "开始润色任务",
    "menu_export_only": "仅执行导出 (基于现有缓存)",
    "menu_settings": "项目设置",
    "menu_api_settings": "API 配置",
    "menu_profiles": "配置管理",
    "menu_exit": "退出",
    "prompt_select": "请输入选项: ",
    "prompt_selector_select": "输入索引进行选择, 或输入 'q' 退出",
    "prompt_selector_select_adv": "输入索引、完整路径, 或 'q' 退出",
    "menu_recent_projects": "最近项目",
    "msg_export_started": "正在导出翻译文件...",
    "msg_export_completed": "导出成功! 文件已保存在输出目录。",
    "label_rpm": "请求/分",
    "label_tpm": "Token/分",
    "prompt_input_path": "输入路径",
    "prompt_output_path": "固定输出路径 (留空则自动)",
    "prompt_source_lang": "源语言",
    "prompt_target_lang": "目标语言",
    "prompt_model": "模型名称",
    "prompt_api_url": "API 地址",
    "prompt_api_key": "API 密钥",
    "prompt_confirm_save": "保存更改? (y/n): ",
    "msg_saved": "设置已保存。",
    "msg_invalid_option": "无效选项，请重试。",
    "msg_task_started": "任务已启动...",
    "msg_task_completed": "任务已完成!",
    "msg_task_stopped": "任务已停止。",
    "error_config_load": "加载配置失败。",
    "setting_project_type": "项目类型",
    "setting_auto_set_output_path": "输出目录自动跟随输入路径 (忽略固定设置)",
    "setting_input_path": "默认输入路径",
    "setting_output_path": "固定输出路径 (留空则自动)",
    "setting_src_lang": "源语言",
    "setting_tgt_lang": "目标语言",
    "setting_thread_count": "线程数",
    "setting_cache_backup_limit": "缓存备份上限",
    "setting_enable_api_failover": "开启API自动故障转移",
    "setting_api_failover_threshold": "API故障转移阈值",
    "setting_backup_apis": "备用API列表 (逗号分隔)",
    "menu_project_type": "选择项目类型",
    "cat_auto": "自动识别 (推荐)",
    "cat_game": "游戏翻译 (MTool, RenPy, 等)",
    "cat_doc": "文档与电子书 (Epub, PDF, Docx)",
    "cat_sub": "字幕文件 (SRT, ASS, VTT)",
    "cat_dev": "开发者/其他 (PO, JSON, CSV)",
    "menu_glossary": "术语表与禁翻表",
    "menu_select_trans_prompt": "选择翻译提示词",
    "menu_select_polish_prompt": "选择润色提示词",
    "prompt_current_selection": "当前: ",
    "msg_prompt_updated": "提示词模板已更新。",
    "prompt_template_select": "选择提示词模板: ",
    "setting_limit_mode": "翻译模式 (行数/Token)",
    "setting_detailed_logs": "显示详细翻译日志（启用翻译对照模式）",
    "setting_cache_backup": "开启缓存自动备份 (每8s)",
    "setting_auto_restore_ebook": "自动还原电子书原格式 (仅针对电子书)",
    "setting_enable_xlsx_conversion": "XLSX自动转换 (XLSX ↔ CSV)",
    "setting_dry_run": "开启首条任务预览 (防止Token浪费)",
    "setting_auto_heal": "开启缓存损坏自动恢复",
    "setting_retry_backoff": "开启请求失败自动重试 (指数退避)",
    "setting_task_notification": "开启任务完成通知 (音效+弹窗)",
    "setting_session_logging": "开启运行日志自动归档",
    "prompt_limit_val": "设置限制值",
    "msg_task_report_title": "任务执行总结报告",
    "label_report_total_lines": "总翻译行数",
    "label_report_total_tokens": "总消耗 Token",
    "label_report_total_time": "总持续时间",
    "label_report_efficiency": "平均效率",
    "label_report_success_rate": "请求成功率",
    "label_current_file": "当前文件",
    "msg_notification_title": "AiNiee 任务完成",
    "msg_notification_body": "您的翻译任务 [{}] 已成功完成！",
    "msg_cache_corrupted": "警告: 主缓存文件损坏! 正在尝试从备份恢复...",
    "msg_cache_healed": "成功: 已从备份恢复数据 ({})",
    "msg_cache_heal_fail": "错误: 无法恢复缓存，备份也不可用。",
    "msg_dry_run_title": "--- 首条任务预览 (Dry Run) ---",
    "msg_dry_run_confirm": "确认以上 Prompt 无误并开始正式任务吗?",
    "msg_dry_run_hint": "(提示: 您可以在设置菜单内关闭此预览功能)",
    "menu_api_online": "在线 API (预设)",
    "menu_api_local": "本地 API (预设)",
    "menu_api_validate": "验证当前 API",
    "menu_api_manual": "手动编辑当前 API",
    "msg_api_select_online": "请选择一个在线 API 预设",
    "msg_api_select_local": "请选择一个本地 API 预设",
    "msg_api_validating": "正在验证 API...",
    "msg_api_ok": "API 链接成功",
    "msg_api_fail": "API 链接失败",
    "label_api_official": "官方预设 (推荐)",
    "label_api_custom": "自定义 / 第三方中转",
    "tip_api_official": "提示: 官方预设已内置 API 地址。您只需提供 Key，并可根据需要更新模型名称。",
    "tip_api_custom": "提示: 自定义平台需要您提供完整的 API 地址、Key 和模型名称。",
    "menu_api_add_custom": "添加新的自定义平台",
    "opt_none": "不使用 / 无 (None)",
    "prompt_input_missing": "输入路径 '{}' 不存在。",
    "prompt_enter_path": "请输入有效的输入路径 (或输入 'q' 退出)",
    "msg_active_platform": "'{}' 现已激活。",
    "msg_api_key_for": "请输入 {} 的 API 密钥",
    "label_platform": "平台",
    "label_url": "地址",
    "label_key": "密钥",
    "label_model": "模型",
    "label_input": "输入",
    "label_output": "输出",
    "msg_test_msg": "你好，请问你运行正常吗？",
    "msg_test_sys": "你是一个翻译助手。",
    "setting_trans_mode": "翻译模式 (行数/Token)",
    "warn_path_change": "警告: 修改默认路径可能导致文件无法找到或被覆盖。请确保新路径存在且安全。",
    "tip_thread_count": "提示: 对于本地 LLM，线程数应小于等于 API 后端的并发限制 (Slots)，否则会导致大量报错。在线 API 通常建议 5-10。",
    "warn_project_type": "警告: 错误的项目类型可能导致文件解析失败或内容丢失。仅在确认文件格式匹配时修改。",
    "menu_trans_mode_select": "选择翻译切分模式",
    "mode_line": "行数模式 (Line Mode) - 推荐",
    "mode_token": "Token 模式 (Token Mode) - 高级",
    "tip_line_mode": "提示: 本地 LLM 和在线 API 通常建议设置为 20 行。设置过高可能导致上下文丢失。",
    "warn_token_mode_severe": "严重警告: Token 模式通常由程序自动分析最佳值。固定 Token 限制极易导致翻译质量下降或截断！",
    "prompt_confirm_risk": "请输入以下内容以确认修改: '{}'",
    "phrase_confirm_risk": "我已知晓，无视风险继续",
    "msg_no_paste": "检测到粘贴操作！请务必手动逐字输入以确认风险。",
    "msg_risk_abort": "输入错误，操作已取消。",
    "msg_online_features_warning": "警告：当前使用的是本地 API，角色设定/世界观等高级功能将被系统忽略。",
    "label_online_only": "仅在线 API 可用",
    "prompt_new_value": "请输入新值",
    "menu_input_mode": "选择输入模式",
    "mode_single_file": "单文件模式",
    "mode_batch_folder": "批量目录模式",
    "mode_resume": "继续上次任务 (路径: {})",
    "prompt_file_path": "请输入文件路径",
    "prompt_folder_path": "请输入目录路径 (回车默认: '{}')",
    "err_not_file": "错误: 路径不是一个文件或不存在。",
    "err_not_folder": "错误: 路径不是一个目录或不存在。",
    "menu_glossary_rules": "术语表与禁翻表",
    "menu_dict_settings": "术语表设置",
    "menu_exclusion_settings": "禁翻表设置",
    "menu_dict_import": "导入术语表数据 (JSON)",
    "menu_exclusion_import": "导入禁翻表数据 (JSON)",
    "menu_toggle_switch": "切换开关",
    "menu_clear_data": "清空数据",
    "msg_data_loaded": "成功加载 {} 条数据。",
    "msg_json_root_error": "JSON 根节点必须是一个列表。",
    "msg_data_cleared": "数据已清空。",
    "menu_api_think_switch": "思考模式开关 (Reasoning)",
    "menu_api_think_depth": "思考深度",
    "menu_api_think_budget": "思考预算",
    "hint_think_budget": "0=关闭, -1=无上限",
    "menu_api_structured_output_switch": "强制结构化输出 (JSON Mode)",
    "prompt_json_path": "请输入 JSON 文件路径",
    "prompt_think_depth": "思考深度 (0-10000)",
    "menu_sub_type_select": "选择具体类型",
    "menu_profile_select": "选择要激活的配置",
    "menu_profile_create": "创建新配置",
    "menu_profile_rename": "重命名当前配置",
    "menu_profile_delete": "删除配置",
    "prompt_profile_name": "请输入新配置名称",
    "prompt_profile_rename": "请输入当前配置的新名称",
    "msg_profile_created": "配置 '{}' 已创建。",
    "msg_profile_renamed": "配置已重命名为 '{}'。",
    "msg_profile_deleted": "配置 '{}' 已删除。",
    "msg_profile_delete_confirm": "确定要永久删除 '{}' 吗?",
    "msg_profile_invalid": "无效或已存在的配置名称。",
    "msg_delete_cancel": "删除已取消。",
    "msg_cannot_delete_last": "无法删除最后一个配置。",
    "menu_back": "返回上一级",
    "menu_cancel": "取消",
    "menu_api_pool_settings": "API 备用池管理",
    "setting_failover_status": "API 轮转状态",
    "setting_failover_threshold": "连续报错触发阈值",
    "label_current_pool": "当前 API 池序列",
    "prompt_add_to_pool": "添加 API 到备用池",
    "prompt_remove_from_pool": "从池中移除 API",
    "msg_api_pool_empty": "API 备用池目前为空",
    "msg_already_in_pool": "该 API 已在池中",
    "msg_web_server_started_bg": "Web服务器已在后台启动，正在打开监控面板...",
    "tip_failover_logic": "提示：仅在线 API 支持自动轮转。当连续报错达到阈值时，系统将原地重试并按序切换 API。",
    "msg_task_ended": "任务已结束。按回车键返回主菜单...",
    "msg_press_enter": "按回车键继续...",
    "msg_press_enter_abort": "按回车键中止任务...",
    "msg_enter_output_path": "未发现缓存，请输入正确的输出目录路径 (或输入 'q' 退出):",
    "label_recent_summary": "最近活动摘要:",
    "msg_thread_changed": "系统: 并发线程数已调整为 {}",
    "msg_api_switching_manual": "系统: 正在手动轮换 API Key...",
    "msg_estimating": "正在极速扫描并预估成本与时间...",
    "label_est_tokens": "预估总消耗",
    "label_est_cost": "参考费用 (仅供参考)",
    "label_est_time": "预估完成时间",
    "msg_ref_only": "注意：计算结果仅供参考，实际 Token 数以服务商统计为准。",
    "label_shortcuts": "[dim]快捷键: [P] 暂停 | [R] 恢复 | [Q] 停止 | [-/+] 线程 | [K] 切换密钥 | [M] 监控[/dim]",
    "label_status_normal": "● 系统运行正常",
    "label_status_fixing": "◐ 故障更正中 (正在切换密钥/原地重试)",
    "label_status_warning": "◑ 网络波动，正在尝试恢复",
    "label_status_error": "× 任务执行异常",
    "label_status_paused": "‖ 系统已暂停",
    "help_task": "指定要执行的任务 (translate, polish, export)。如果未提供，则进入交互式菜单。",
    "help_input": "要处理的输入文件或目录的路径。",
    "help_output": "指定输出目录 (可选, 默认在输入旁边创建)。",
    "help_profile": "使用指定的配置 Profile (可选, 默认使用上次激活的)。",
    "help_source": "覆盖配置中的源语言 (可选)。",
    "help_target": "覆盖配置中的目标语言 (可选)。",
    "help_resume": "尝试从现有缓存恢复任务 (可选)。",
    "help_yes": "自动对所有确认提示回答“是” (例如，恢复任务确认)。",
    "menu_prompt_features": "提示词管理",
    "prompt_toggle_feature": "输入ID切换功能开关",
    "menu_prompt_create": "创建新提示词",
    "label_readonly": "只读",
    "opt_apply": "应用提示词",
    "menu_response_checks": "回复内容检查",
    "prompt_toggle_check": "输入ID切换检查开关",
    "feature_pre_translation_switch": "启用译前处理",
    "feature_post_translation_switch": "启用译后处理",
    "feature_prompt_dictionary_switch": "启用术语表",
    "feature_exclusion_list_switch": "启用禁翻表",
    "feature_characterization_switch": "启用角色设定",
    "feature_world_building_switch": "启用世界观设定",
    "feature_writing_style_switch": "启用写作风格",
    "feature_translation_example_switch": "启用翻译示例",
    "feature_few_shot_and_example_switch": "启用少样本示例",
    "feature_auto_process_text_code_segment": "启用代码段自动处理",
    "feature_proofread_section": "AI校对设置",
    "feature_enable_auto_proofread": "翻译完成后自动校对",
    "check_newline_character_count_check": "换行符数量检查",
    "check_return_to_original_text_check": "返回原文检查",
    "check_residual_original_text_check": "残留原文检查",
    "check_reply_format_check": "回复格式检查",
    "setting_request_timeout": "请求超时 (秒)",
    "setting_retry_count": "最大重试次数",
    "setting_pre_line_counts": "上文行数 (影响质量)",
    "setting_round_limit": "最大执行轮次",
    "setting_enable_smart_round_limit": "启用智能轮次 (自动扩展)",
    "setting_enable_rate_limit": "启用速率限制",
    "setting_enable_rate_limit_desc": "严格限制请求速率，可能降低翻译速度，适合API有严格限额的情况",
    "setting_enable_context_enhancement": "启用上下文增强",
    "setting_enable_context_enhancement_desc": "在段落切分时保留原文上下文，提升翻译连贯性（略微增加Token消耗）",
    "setting_custom_rpm_limit": "自定义RPM限制",
    "setting_custom_rpm_limit_desc": "每分钟最大请求数，0表示使用平台默认值",
    "setting_custom_tpm_limit": "自定义TPM限制",
    "setting_custom_tpm_limit_desc": "每分钟最大Token数，0表示使用平台默认值",
    "setting_response_conversion_toggle": "开启简繁体转换",
    "tip_thread_count_auto_remark": " (0为自动检测: 适配本地与在线接口)",
    "msg_epub_detected": "检测到 {} 格式，正在调用转换中间件...",
    "msg_epub_reuse": "[green]检测到已转换的临时 EPUB: {}，将直接使用。[/green]",
    "msg_epub_conv_start": "[cyan]未发现缓存，正在为 {} 启动转换中间件...[/cyan]",
    "msg_epub_conv_success": "[green]转换成功: {}[/green]",
    "msg_epub_conv_fail": "[bold red]中间件错误: {}[/bold red]",
    "menu_update": "检查并更新软件",
    "setting_auto_update": "开启启动时自动检查更新",
    "setting_enable_bilingual_output": "开启双语输出 (译文+原文)",
    
    // UI Specific Extras
    "ui_dashboard_welcome": "欢迎回来，旅行者。",
    "ui_dashboard_subtitle": "AiNiee 随时准备处理您的语言数据。",
    "ui_system_online": "系统在线",
    "ui_new_task_desc": "开始新的小说、游戏或字幕翻译/润色任务。",
    "ui_config_desc": "管理 API 密钥、Prompt 模板、故障转移池及微调参数。",
    "ui_history_desc": "导出已完成项目，查看历史会话及管理缓存。",
    "ui_btn_start": "开始处理",
    "ui_btn_edit": "编辑设置",
    "ui_btn_history": "查看历史",
    "ui_recent_proj_header": "项目名称",
    "ui_recent_type": "类型",
    "ui_recent_date": "最后修改",
    "ui_recent_status": "状态",
    "ui_recent_action": "操作",
    "ui_resume": "继续",
    "ui_settings_title": "设置",
    "ui_settings_save": "保存 Profile",
    "ui_tab_general": "基础配置",
    "ui_tab_api": "API 配置",
    "ui_tab_project": "项目规则",
    "ui_tab_features": "功能开关",
    "ui_tab_system": "系统选项",
    "ui_language": "界面语言 (Interface Language)",
    "ui_cli_command": "CLI 命令预览",
    "msg_uploading": "正在上传...",
    "msg_drag_drop_title": "请拖动上传内容至此区域，或点击此处打开文件管理器",
    "msg_drag_drop_subtitle": "文件将被上传到项目的临时目录中",
    "msg_upload_limit_reached": "临时文件已达上限 ({})。继续上传将删除最早的文件 '{}'。是否继续？",
    "msg_upload_forced_delete": "临时文件已达最大缓冲上限 ({})。最早的文件 '{}' 已被强制删除。",
    "setting_temp_file_limit": "临时文件上传上限",
    
    // Rules Page
    "ui_rules_glossary": "术语表",
    "ui_rules_exclusion": "禁翻表",
    "ui_rules_source": "原文",
    "ui_rules_target": "译文",
    "ui_rules_note": "备注 (可选)",
    "ui_rules_marker": "文本标记 (完全匹配)",
    "ui_rules_regex": "正则表达式 (可选)",
    "ui_rules_add": "添加条目",
    "ui_rules_save": "保存",
    "ui_rules_filter": "搜索...",
    "ui_rules_enable_glossary": "启用术语表",
    "ui_rules_enable_exclusion": "启用禁翻表",
    "ui_rules_tip_save": "提示: 请注意保存您的配置，以防下次启动丢失内容。",
    "ui_rules_tip_advanced": "高级设置: 正则表达式 (Regex) 优先级高于普通文本标记。请谨慎使用，错误的正则可能导致匹配异常。",
    "ui_rules_no_items": "暂无数据，点击上方按钮添加。",
    "msg_recover_draft_confirm": "恢复未保存的草稿将覆盖当前编辑。确认继续吗？",
    "msg_draft_recovered": "草稿恢复成功！",
    "msg_import_success": "导入成功！",
    "msg_import_error_list": "格式错误：根节点必须是一个列表。",
    "msg_import_error_parse": "解析文件失败。",
    "ui_rules_world_placeholder": "在此处输入世界观背景设定...",
    "ui_rules_style_placeholder": "在此处输入写作风格指南...",
    "ui_rules_character_orig": "原名",
    "ui_rules_character_trans": "译名",
    "ui_rules_character_gender": "性别",
    "ui_rules_character_age": "年龄",
    "ui_rules_character_personality": "性格",
    "ui_rules_character_speech": "口吻",
    "ui_rules_character_info": "补充信息",
    "ui_rules_example_src": "源文本",
    "ui_rules_example_dst": "译文本",
    "menu_switch_profile_short": "切换当前配置",

    // Plugins
    "menu_plugin_settings": "插件功能管理",
    "msg_no_plugins_found": "未发现已加载的插件。",
    "prompt_toggle_plugin": "切换插件状态",
    "label_plugin_name": "插件名称",
    "label_status": "状态",
    "label_description": "描述",
    "ui_plugins_subtitle": "通过模块化扩展增强您的翻译体验",
    "ui_btn_refresh": "刷新列表",
    "ui_plugins_scan_title": "正在进行系统扫描",
    "ui_plugins_scan_desc": "正在发现 PluginScripts/ 目录中的脚本...",
    "ui_plugins_active": "已激活",
    "ui_plugins_no_desc": "此插件未提供描述。",
    "ui_plugins_source": "源码",
    "ui_plugins_default": "默认",
    "ui_plugins_on": "开启",
    "ui_plugins_off": "关闭",
    "ui_plugins_running": "运行中",
    "ui_plugins_disabled": "已禁用",
    "ui_plugins_applying": "应用中...",
    "ui_plugins_about_title": "关于插件",
    "ui_plugins_about_desc_part1": "插件允许您在不修改核心逻辑的情况下扩展 AiNiee 的功能。启用 ",
    "ui_plugins_about_desc_part2": "RAG 上下文插件",
    "ui_plugins_about_desc_part3": " 可利用历史翻译记忆库来提高长文本的一致性。此处的更改会全局保存并应用于所有配置文件。",
    "ui_plugins_arch_title": "模块化架构",

    // Task Page Refinements
    "ui_task_translate": "翻译",
    "ui_task_polish": "润色",
    "ui_task_export": "导出",
    "ui_task_upload": "上传",
    "ui_task_temp_uploaded": "临时上传文件",
    "ui_task_console": "控制台输出",
    "ui_task_perf_chart": "性能曲线",
    "ui_task_start": "开始",
    "ui_task_stop": "停止",
    "ui_monitor_title": "监控面板",
    "ui_monitor_subtitle": "实时性能与任务指标",
    "ui_system_active": "系统运行中",
    "ui_system_idle": "系统闲置",
    "ui_go_to_dashboard": "返回主控制台",
    "ui_no_file_active": "当前无活动文件",
    "ui_monitor_mode_warning": "监控模式下此页面不可用",
    "ui_monitor_mode_desc": "当前系统正处于独立监控模式，所有的交互功能已被禁用。请切换至监控面板查看实时任务进度。",
    "ui_monitor_mode_btn": "立即跳转至监控面板",
    "ui_initializing_system": "系统初始化中...",
    "ui_tab_console": "控制台/指标",
    "ui_tab_comparison": "原文/译文对照",
    "banner_langs": "语言",
    "banner_conv": "简繁转换",
    "banner_bilingual": "双语对照",
    "banner_on": "开启",
    "banner_off": "关闭",
    "banner_trans_first": "译->原",
    "banner_source_first": "原->译",
    "banner_not_enabled": "未开启",
    "banner_api": "接口",
    "banner_model": "模型",
    "banner_threads": "线程",
    "banner_context": "上下文",
    "banner_think": "思考",
    "menu_task_queue": "任务队列管理",
    "msg_queue_empty": "当前队列为空",
    "menu_queue_add": "添加新任务到队列",
    "menu_queue_remove": "移除指定任务",
    "menu_queue_clear": "清空所有任务",
    "menu_queue_start": "开始顺序执行队列",
    "menu_start_all_in_one": "翻译+润色【全部执行】",
    "menu_queue_edit_json": "在编辑器中编辑队列文件",
    "ui_process_queue": "队列执行",
    "tip_follow_profile": "遵循配置文件设置",
    "label_platform_override": "平台覆盖",
    "label_url_override": "地址覆盖",
    "label_key_override": "密钥覆盖",
    "label_model_override": "模型覆盖",

    // TaskQueue specific
    "msg_enter_input_path": "请输入输入路径",
    "msg_operation_failed": "操作失败",
    "msg_failed_remove_task": "移除任务失败",
    "msg_failed_clear_queue": "清空队列失败",
    "msg_failed_start_queue": "启动队列失败",
    "msg_loading_queue": "正在加载队列...",
    "task_type_all_in_one": "全流程",
    "task_type_translate": "翻译",
    "task_type_polish": "润色",
    "msg_task_locked": "当前文件正在{}中且已被锁定，无法修改当前任务数据和移动顺序，请等待处理结束",
    "task_status_translating_cn": "翻译",
    "task_status_polishing_cn": "润色",
    "task_status_all_in_one_cn": "翻译+润色",
    "icon_locked": "🔒",
    "title_realtime_queue_editing": "实时队列编辑",
    "msg_realtime_queue_tip": "支持实时队列修改，可以移动、删除和编辑任务配置",
    "msg_press_e_in_cli": "使用下方按钮进行队列编辑操作",
    "warning_thinking_compatibility": "警告：非思考模型开启思考模式可能出现未知问题，请查询模型提供方是否支持后再开启此类选项",
    "warning_thinking_online_only": "警告：思考模式仅支持在线API，本地模型不支持此功能",
    "btn_edit": "编辑",
    "btn_remove": "移除",
    "modal_modify_queue_task": "修改队列任务",
    "section_core_assignment": "核心任务设置",
    "label_config_profile": "配置文件",
    "label_rules_profile": "规则文件",
    "section_language_logic": "语言与逻辑",
    "label_source": "源语言",
    "label_target": "目标语言",
    "placeholder_current": "当前设置",
    "placeholder_project_type": "AutoType, Txt, Epub...",
    "placeholder_output_default": "默认: 父级目录",
    "section_advanced_overrides": "高级覆盖设置",
    "label_threads_override": "线程覆盖",
    "label_context_lines": "上下文行数",
    "label_lines_limit": "行数限制",
    "label_think_budget": "思考预算",
    "label_think_depth": "思考深度",
    "btn_cancel": "取消",
    "btn_save_changes": "保存修改",
    "btn_add_to_queue": "添加到队列",

    // TaskRunner specific
    "option_resume": "继续模式",
    "msg_no_files_found": "未找到文件",
    "label_original_source": "原始文本",
    "label_lines": "行",
    "msg_waiting_text": "等待文本...",
    "label_translation_output": "翻译输出",
    "msg_processing_batch": "正在处理批次...",
    "msg_processing": "处理中...",

    // Web Editor specific
    "menu_parallel_editor": "对照编辑器",
    "menu_cache_editor": "缓存编辑器",
    "editor_original_text": "原文",
    "editor_translation": "译文",

    // Cache Editor specific
    "cache_editor_title": "缓存编辑器",
    "cache_editor_project_path": "项目路径",
    "cache_editor_project_path_placeholder": "输入项目输出目录路径",
    "cache_editor_load_cache": "加载缓存",
    "cache_editor_loading": "加载中...",
    "cache_editor_search_placeholder": "搜索...",
    "cache_editor_switch_project": "切换项目",
    "cache_editor_source_text": "原文",
    "cache_editor_translation": "译文",
    "cache_editor_editing": "编辑中",
    "cache_editor_save": "保存",
    "cache_editor_cancel": "取消",
    "cache_editor_no_translation": "无译文",
    "cache_editor_modified": "✨ 已修改",
    "cache_editor_previous": "上一页",
    "cache_editor_next": "下一页",
    "cache_editor_page_info": "第 {} 页，共 {} 页",
    "cache_editor_line_info": "第 {}/{} 行 • 第 {}/{} 页",
    "cache_editor_no_source_loaded": "未加载原文",
    "cache_editor_no_translations_loaded": "未加载译文",
    "cache_editor_loading_translations": "正在加载译文...",
    "cache_editor_no_source_text": "无原文",
    "cache_editor_enter_project_path": "请输入项目路径",
    "cache_editor_cache_file_not_found": "缓存文件未找到",
    "cache_editor_failed_load_cache": "加载缓存失败",
    "cache_editor_failed_update_item": "更新项目失败",

    // AI Proofread
    "cache_editor_ai_proofread": "AI校对",
    "cache_editor_start_proofread": "开始AI校对",
    "cache_editor_stop_proofread": "停止校对",
    "cache_editor_proofread_running": "校对中...",
    "cache_editor_proofread_progress": "校对进度: {}/{}",
    "cache_editor_proofread_issues": "发现问题",
    "cache_editor_proofread_no_issues": "未发现问题",
    "cache_editor_proofread_accept": "采纳",
    "cache_editor_proofread_skip": "跳过",
    "cache_editor_proofread_edit": "编辑",
    "cache_editor_proofread_accept_all": "全部采纳",
    "cache_editor_proofread_clear": "清空列表",
    "cache_editor_proofread_issue_type": "问题类型",
    "cache_editor_proofread_severity": "严重程度",
    "cache_editor_proofread_description": "问题描述",
    "cache_editor_proofread_suggestion": "修正建议",
    "cache_editor_proofread_original": "原译文",
    "cache_editor_proofread_corrected": "修正译文",
    "cache_editor_proofread_high": "高",
    "cache_editor_proofread_medium": "中",
    "cache_editor_proofread_low": "低",
    "cache_editor_proofread_terminology": "术语错误",
    "cache_editor_proofread_omission": "漏译",
    "cache_editor_proofread_hallucination": "幻觉",
    "cache_editor_proofread_logic_error": "逻辑错误",
    "cache_editor_proofread_tokens_used": "Token消耗: {}",
    "cache_editor_proofread_completed": "校对完成",
    "cache_editor_proofread_error": "校对出错",
    "cache_editor_proofread_keep_original": "保留原文",
    "cache_editor_proofread_hide_panel": "隐藏AI面板",
    "cache_editor_proofread_view_suggestions": "查看AI建议 ({})",
    "cache_editor_single_check_tooltip": "调用AI检查此行",
    "cache_editor_single_check_btn": "AI 检查",
    "cache_editor_analyzing_text": "AI 正在分析中...",
    "cache_editor_issues_found_title": "发现问题:",
    "cache_editor_no_issues_found_text": "✓ AI 未发现明显问题。",
    "cache_editor_apply_fix_btn": "应用修正",
    "cache_editor_proposed_fix_title": "修正方案:",
    "cache_editor_ai_model_warning": "⚠️ AI校对功能的能力取决于您配置的API模型能力。尽可能使用思考/推理模型（如 DeepSeek-R1, GPT-5.2, Gemini Pro系列模型等），以获得最佳校对效果。",

    "editor_search": "搜索",
    "editor_save": "保存",
    "editor_reset": "重置",
    "editor_upload_cache": "上传缓存文件",
    "editor_no_project": "未加载项目",
    "editor_select_file": "选择文件",
    "editor_click_to_translate": "点击添加翻译",
    "editor_enter_to_edit": "按回车键编辑",
    "editor_enter_to_save": "按回车键保存",
    "editor_line_number": "行号",
    "editor_untranslated": "未翻译",
    "editor_translated": "已翻译",
    "editor_polished": "已润色",
    "editor_modified": "已修改",
    "editor_project_stats": "项目统计",
    "editor_overall_progress": "总体进度",
    "editor_total_lines": "总行数",
    "editor_files_count": "文件数量",
    "editor_lines_per_file": "平均每文件行数",
    "editor_completion_rate": "完成度",
    "editor_complete": "完成",
    "editor_nearly_done": "接近完成",
    "editor_in_progress": "进行中",
    "editor_getting_started": "开始阶段",
    "editor_search_placeholder": "输入搜索内容...",
    "editor_search_scope_all": "全部文本",
    "editor_search_scope_source": "原文",
    "editor_search_scope_translation": "译文",
    "editor_search_scope_polished": "润色文本",
    "editor_search_regex": "正则表达式",
    "editor_search_flagged_only": "仅限标记项",
    "editor_search_no_results": "无搜索结果",
    "editor_search_results_count": "找到 {} 个结果",
    "editor_search_tips": "提示：启用正则表达式进行模式匹配",
    "editor_goto_line": "跳转到行",
    "editor_clear_modifications": "清除修改标记",
    "editor_drag_upload": "拖拽上传缓存文件",
    "editor_drag_upload_desc": "支持JSON格式的缓存文件",
    "editor_upload_success": "文件上传成功",
    "editor_upload_error": "文件上传失败",
    "editor_upload_processing": "正在处理上传的文件...",
    "editor_unsupported_format": "不支持的文件格式",
    "loading": "加载中",
    "retry": "重试",
    "ui_ai_glossary": "AI术语分析",
    "ai_glossary_warning": "⚠ 当前暂不建议使用本地LLM进行分析，可能存在质量问题。尽可能使用在线API进行分析，但可能会产生相关API费用。\n注意：分析结果的准确程度取决于您使用的API模型能力，此功能仅提供初步分析结果，建议人工审核后再使用。",
    "ai_glossary_input_path": "输入文件路径",
    "ai_glossary_percent": "分析比例 (%)",
    "ai_glossary_lines": "或指定行数",
    "ai_glossary_start": "开始分析",
    "ai_glossary_stop": "停止分析",
    "ai_glossary_status": "分析状态",
    "ai_glossary_results": "分析结果",
    "ai_glossary_min_freq": "最低词频",
    "ai_glossary_save": "保存到术语表",
    "ai_glossary_term": "专有名词",
    "ai_glossary_type": "类型",
    "ai_glossary_count": "出现次数",
    "ai_glossary_filename": "文件名",
    "ai_glossary_idle": "等待开始",
    "ai_glossary_running": "分析中...",
    "ai_glossary_completed": "分析完成",
    "ai_glossary_error": "分析出错",
    "ai_glossary_api_config": "API配置",
    "ai_glossary_use_current": "使用当前配置",
    "ai_glossary_use_temp": "使用临时配置",
    "ai_glossary_temp_platform": "平台",
    "ai_glossary_temp_model": "模型",
    "ai_glossary_temp_url": "API地址",
    "ai_glossary_temp_key": "API密钥",
    "ai_glossary_temp_threads": "并发数",
    "term_selector_title": "术语多翻译选择",
    "term_selector_api_hint": "翻译质量取决于您设定的API所调用的LLM性能，使用更好的模型可能有更好的效果，但会消耗更多费用",
    "term_selector_hint": "双击选项进行编辑，点击圆圈切换选择，点击刷新图标重新翻译",
    "term_selector_translate_all": "一键翻译全部",
    "term_selector_translating_all": "批量翻译中...",
    "term_selector_save_all": "保存全部",
    "term_selector_cancel": "取消",
    "term_selector_header_term": "术语 (双击编辑原文)",
    "term_selector_header_type": "类型",
    "term_selector_header_options": "翻译选项 (双击翻译文字进行编辑)",
    "term_selector_header_action": "操作",
    "term_selector_waiting": "等待翻译...",
    "term_selector_manual_add": "+ 手动",
    "term_selector_retry_tooltip": "重新生成翻译建议 (获取更多选项)",
    "term_selector_save_tooltip": "保存到术语表",
    "term_selector_summary": "共 {} 个术语 | 已保存: {}",
    "term_selector_edit_hint": "提示: 双击翻译文本可直接修改译文",
    "term_selector_current_selection": "当前选择",
    "term_selector_confirm_save": "确认并保存",
    "term_selector_saved": "已保存",
    "term_selector_new_manual": "新翻译",
    "term_selector_duplicate_hint": "模型返回的译文和当前译文一致，可能需要人工处理"
};

// Approximated English Locale for demonstration
export const EN_LOCALE: Record<string, string> = {
    "menu_title": "AiNiee CLI - Main Menu",
    "menu_start_translation": "Start Translation Task",
    "menu_start_polishing": "Start Polishing Task",
    "menu_export_only": "Export Only (From Cache)",
    "menu_settings": "Project Settings",
    "menu_api_settings": "API Configuration",
    "menu_profiles": "Profile Management",
    "menu_exit": "Exit",
    "prompt_select": "Enter option: ",
    "menu_recent_projects": "Recent Projects",
    "label_rpm": "Req/Min",
    "label_tpm": "Tokens/Min",
    "prompt_input_path": "Input Path",
    "prompt_output_path": "Output Path (Empty for auto)",
    "prompt_source_lang": "Source Language",
    "prompt_target_lang": "Target Language",
    "setting_thread_count": "Thread Count",
    "setting_request_timeout": "Request Timeout (s)",
    "setting_retry_count": "Max Retries",
    "setting_round_limit": "Max Rounds",
    "setting_cache_backup_limit": "Cache Backup Limit",
    "setting_pre_line_counts": "Context Lines",
    "setting_enable_api_failover": "Enable API Failover",
    "setting_api_failover_threshold": "Failover Threshold",
    "menu_project_type": "Project Type",
    "setting_auto_set_output_path": "Output directory automatically follows input (ignore fixed setting)",
    "menu_glossary": "Glossary & Exclusion",
    "setting_limit_mode": "Split Mode (Lines/Tokens)",
    "setting_detailed_logs": "Show Detailed Translation Logs (Enable Comparison Mode)",
    "setting_cache_backup": "Auto Cache Backup",
    "setting_auto_restore_ebook": "Auto Restore Ebook Format",
    "setting_enable_xlsx_conversion": "XLSX Auto Conversion (XLSX ↔ CSV)",
    "setting_dry_run": "Dry Run (First Item Preview)",
    "setting_retry_backoff": "Auto Retry on Request Failure (Exponential Backoff)",
    "setting_session_logging": "Session Logging",
    "setting_enable_smart_round_limit": "Smart Round Limit",
    "setting_enable_rate_limit": "Enable Rate Limiting",
    "setting_enable_rate_limit_desc": "Strictly limit request rate, may slow down translation, for APIs with strict quotas",
    "setting_enable_context_enhancement": "Enable Context Enhancement",
    "setting_enable_context_enhancement_desc": "Preserve source context when splitting paragraphs, improves coherence (slightly increases token usage)",
    "setting_custom_rpm_limit": "Custom RPM Limit",
    "setting_custom_rpm_limit_desc": "Max requests per minute, 0 uses platform default",
    "setting_custom_tpm_limit": "Custom TPM Limit",
    "setting_custom_tpm_limit_desc": "Max tokens per minute, 0 uses platform default",
    "setting_response_conversion_toggle": "Response Conversion (Sim/Trad)",
    "setting_auto_update": "Auto Update on Startup",
    "setting_enable_bilingual_output": "Enable Bilingual Output",
    "menu_api_pool_settings": "API Failover Pool",
    "menu_api_think_switch": "Thinking Mode (Reasoning)",
    "menu_api_think_depth": "Thinking Depth",
    "menu_api_think_budget": "Thinking Budget",
    "hint_think_budget": "0=OFF, -1=Unlimited",
    "menu_api_structured_output_switch": "Force Structured Output (JSON Mode)",
    "label_current_pool": "Current Pool",
    "msg_task_started": "Task started...",
    "label_api_official": "Official Presets",
    "label_api_custom": "Custom / Proxy",
    "tip_api_official": "Tip: Official presets use built-in URLs. Just provide Key and update Model name.",
    "tip_api_custom": "Tip: Custom platforms require full API URL, Key, and Model name.",
    "menu_api_add_custom": "Add New Custom Platform",
    "opt_none": "None / Do not use",
    "msg_web_server_started_bg": "Web server started in background, opening monitor...",
    "label_shortcuts": "[dim]Keys: [P] Pause | [R] Resume | [Q] Stop | [-/+] Threads | [K] Switch Key | [M] Monitor[/dim]",
    "label_status_normal": "● System Normal",
    "label_status_fixing": "◐ Fixing (Retrying/Switching)",
    "label_status_warning": "◑ Network Warning",
    "label_status_error": "× Execution Error",
    "label_status_paused": "‖ System Paused",
    "menu_prompt_features": "Prompt Management",
    "menu_prompt_create": "Create New Prompt",
    "label_readonly": "Read Only",
    "opt_apply": "Apply Prompt",
    "feature_pre_translation_switch": "Enable Pre-Translation",
    "feature_post_translation_switch": "Enable Post-Translation",
    "feature_prompt_dictionary_switch": "Enable Prompt Dictionary",
    "feature_exclusion_list_switch": "Enable Exclusion List",
    "feature_characterization_switch": "Enable Characterization",
    "feature_world_building_switch": "Enable World Building",
    "feature_writing_style_switch": "Enable Writing Style",
    "feature_translation_example_switch": "Enable Translation Examples",
    "feature_few_shot_and_example_switch": "Enable Few-Shot Examples",
    "feature_auto_process_text_code_segment": "Enable Code Segmentation",
    "feature_proofread_section": "AI Proofread Settings",
    "feature_enable_auto_proofread": "Auto Proofread After Translation",
    "msg_online_features_warning": "Warning: Local API in use. Advanced features like Characterization/World Building will be ignored.",
    "label_online_only": "Online API Only",
    "ui_dashboard_welcome": "Welcome back, Traveler.",
    "ui_dashboard_subtitle": "AiNiee is ready to process your linguistic data.",
    "ui_system_online": "System Online",
    "ui_new_task_desc": "Start a new translation or polishing session.",
    "ui_config_desc": "Manage API keys, templates, and fine-tune parameters.",
    "ui_history_desc": "Export completed projects and manage cache.",
    "ui_btn_start": "Start Processing",
    "ui_btn_edit": "Edit Settings",
    "ui_btn_history": "View History",
    "ui_recent_proj_header": "Project Name",
    "ui_recent_type": "Type",
    "ui_recent_date": "Last Modified",
    "ui_recent_status": "Status",
    "ui_recent_action": "Action",
    "ui_resume": "Resume",
    "ui_settings_title": "Settings",
    "ui_settings_save": "Save Profile",
    "ui_tab_general": "General",
    "ui_tab_api": "API Config",
    "ui_tab_project": "Project",
    "ui_tab_features": "Features",
    "ui_tab_system": "System",
    "ui_language": "Interface Language",
    "ui_cli_command": "CLI Command Preview",
    "msg_uploading": "Uploading...",
    "msg_drag_drop_title": "Please drag and drop files here, or click to open file manager",
    "msg_drag_drop_subtitle": "Files will be uploaded to the project's temporary directory",
    "msg_upload_limit_reached": "Temp file limit ({}) reached. Uploading will delete oldest file '{}'. Continue?",
    "msg_upload_forced_delete": "Max buffer limit ({}) reached. Oldest file '{}' was forced deleted.",
    "setting_temp_file_limit": "Temp File Limit",
    
    // Rules Page
    "ui_rules_glossary": "Glossary",
    "ui_rules_exclusion": "Exclusion List",
    "ui_rules_source": "Source Text",
    "ui_rules_target": "Target Text",
    "ui_rules_note": "Note (Optional)",
    "ui_rules_marker": "Text Marker (Exact)",
    "ui_rules_regex": "Regex (Optional)",
    "ui_rules_add": "Add Entry",
    "ui_rules_save": "Save",
    "ui_rules_filter": "Filter...",
    "ui_rules_enable_glossary": "Enable Glossary",
    "ui_rules_enable_exclusion": "Enable Exclusion List",
    "ui_rules_tip_save": "Tip: Please remember to save your configuration to prevent data loss.",
    "ui_rules_tip_advanced": "Advanced: Regex has higher priority than text markers. Use with caution.",
    "ui_rules_no_items": "No items found. Click 'Add Entry' to create one.",
    "menu_glossary_rules": "Glossary & Text Rules",
    "msg_recover_draft_confirm": "Restoring unsaved draft will overwrite current edits. Continue?",
    "msg_draft_recovered": "Draft recovered successfully!",
    "msg_import_success": "Import successful!",
    "msg_import_error_list": "Format error: Root must be a list.",
    "msg_import_error_parse": "Failed to parse file.",
    "ui_rules_world_placeholder": "Enter world building details here...",
    "ui_rules_style_placeholder": "Enter writing style guidelines here...",
    "ui_rules_character_orig": "Original Name",
    "ui_rules_character_trans": "Translated Name",
    "ui_rules_character_gender": "Gender",
    "ui_rules_character_age": "Age",
    "ui_rules_character_personality": "Personality",
    "ui_rules_character_speech": "Speech Style",
    "ui_rules_character_info": "Additional Info",
    "ui_rules_example_src": "Source Text",
    "ui_rules_example_dst": "Translated Text",
    "menu_switch_profile_short": "Switch Profile",

    // Plugins
    "menu_plugin_settings": "Plugin Management",
    "msg_no_plugins_found": "No plugins found.",
    "prompt_toggle_plugin": "Toggle Plugin",
    "label_plugin_name": "Plugin Name",
    "label_status": "Status",
    "label_description": "Description",
    "ui_plugins_subtitle": "Enhance your translation experience with modular extensions",
    "ui_btn_refresh": "Refresh List",
    "ui_plugins_scan_title": "System Scan in Progress",
    "ui_plugins_scan_desc": "Discovering scripts in PluginScripts/ directory...",
    "ui_plugins_active": "Active",
    "ui_plugins_no_desc": "This plugin has no description provided by the developer.",
    "ui_plugins_source": "SOURCE",
    "ui_plugins_default": "DEFAULT",
    "ui_plugins_on": "ON",
    "ui_plugins_off": "OFF",
    "ui_plugins_running": "Running",
    "ui_plugins_disabled": "Disabled",
    "ui_plugins_applying": "Applying...",
    "ui_plugins_about_title": "About Plugins",
    "ui_plugins_about_desc_part1": "Plugins allow you to extend AiNiee's functionality without modifying core logic. Enable the ",
    "ui_plugins_about_desc_part2": "RAG Context Plugin",
    "ui_plugins_about_desc_part3": " to improve long-text consistency using historical translation memory. Changes are saved globally and apply to all profiles.",
    "ui_plugins_arch_title": "Modular Architecture",

    // Task Page Refinements
    "ui_task_translate": "TRANSLATE",
    "ui_task_polish": "POLISH",
    "ui_task_export": "EXPORT",
    "ui_task_upload": "UPLOAD",
    "ui_task_temp_uploaded": "Uploaded Files (Temp)",
    "ui_task_console": "Console Output",
    "ui_task_perf_chart": "Performance History",
    "ui_task_start": "START",
    "ui_task_stop": "STOP",
    "ui_monitor_title": "Monitor",
    "ui_monitor_subtitle": "Real-time Performance Metrics",
    "ui_system_active": "SYSTEM ACTIVE",
    "ui_system_idle": "SYSTEM IDLE",
    "ui_go_to_dashboard": "Go to Dashboard",
    "ui_no_file_active": "No file active",
    "ui_monitor_mode_warning": "Page Unavailable in Monitor Mode",
    "ui_monitor_mode_desc": "The system is in standalone monitor mode. Interactive features are disabled. Please use the monitor panel to check progress.",
    "ui_monitor_mode_btn": "Go to Monitor Panel",
    "ui_initializing_system": "Initializing System...",
    "ui_tab_console": "Console/Metrics",
    "ui_tab_comparison": "Comparison View",
    "banner_langs": "Langs",
    "banner_conv": "S/T Conv",
    "banner_bilingual": "Bilingual",
    "banner_on": "ON",
    "banner_off": "OFF",
    "banner_trans_first": "Trans->Src",
    "banner_source_first": "Src->Trans",
    "banner_not_enabled": "Not Enabled",
    "banner_api": "API",
    "banner_model": "Model",
    "banner_threads": "Threads",
    "banner_context": "Context",
    "banner_think": "Think",
    "menu_task_queue": "Task Queue Management",
    "msg_queue_empty": "Task queue is currently empty",
    "menu_queue_add": "Add Task to Queue",
    "menu_queue_remove": "Remove Task",
    "menu_queue_clear": "Clear All Tasks",
    "menu_queue_start": "Start Queue Execution",
    "menu_start_all_in_one": "Translate & Polish (All-in-One)",
    "menu_queue_edit_json": "Edit Queue in Editor",
    "ui_process_queue": "Run Queue",
    "tip_follow_profile": "Follow profile settings",
    "label_platform_override": "Platform Override",
    "label_url_override": "URL Override",
    "label_key_override": "Key Override",
    "label_model_override": "Model Override",

    // TaskQueue specific
    "msg_enter_input_path": "Please enter an input path",
    "msg_operation_failed": "Operation failed",
    "msg_failed_remove_task": "Failed to remove task",
    "msg_failed_clear_queue": "Failed to clear queue",
    "msg_failed_start_queue": "Failed to start queue",
    "msg_loading_queue": "Loading queue...",
    "task_type_all_in_one": "All-in-One",
    "task_type_translate": "Translate",
    "task_type_polish": "Polish",
    "msg_task_locked": "The current file is being {} and is locked. Cannot modify task data or move order. Please wait for processing to complete",
    "task_status_translating_cn": "translated",
    "task_status_polishing_cn": "polished",
    "task_status_all_in_one_cn": "translated and polished",
    "icon_locked": "🔒",
    "title_realtime_queue_editing": "Real-time Queue Editing",
    "msg_realtime_queue_tip": "Support real-time queue modification, you can move, delete and edit task configurations",
    "msg_press_e_in_cli": "Use the buttons below for queue editing operations",
    "warning_thinking_compatibility": "Warning: Enabling thinking mode on non-thinking models may cause unknown issues. Please verify model provider support before enabling this option",
    "warning_thinking_online_only": "Warning: Thinking mode only supports online APIs, local models do not support this feature",
    "btn_edit": "Edit",
    "btn_remove": "Remove",
    "modal_modify_queue_task": "Modify Queue Task",
    "section_core_assignment": "Core Assignment",
    "label_config_profile": "Config Profile",
    "label_rules_profile": "Rules Profile",
    "section_language_logic": "Language & Logic",
    "label_source": "Source",
    "label_target": "Target",
    "placeholder_current": "Current",
    "placeholder_project_type": "AutoType, Txt, Epub...",
    "placeholder_output_default": "Default: Parent Folder",
    "section_advanced_overrides": "Fine-grained Overrides (Advanced)",
    "label_threads_override": "Threads Override",
    "label_context_lines": "Context Lines",
    "label_lines_limit": "Lines Limit",
    "label_think_budget": "Think Budget",
    "label_think_depth": "Think Depth",
    "btn_cancel": "Cancel",
    "btn_save_changes": "Save Changes",
    "btn_add_to_queue": "Add to Queue",

    // TaskRunner specific
    "option_resume": "Resume Mode",
    "msg_no_files_found": "No files found",
    "label_original_source": "Original Source",
    "label_lines": "Lines",
    "msg_waiting_text": "Waiting for text...",
    "label_translation_output": "Translation Output",
    "msg_processing_batch": "Processing batch...",
    "msg_processing": "Processing...",

    // Web Editor specific
    "menu_parallel_editor": "Parallel Editor",
    "menu_cache_editor": "Cache Editor",
    "editor_original_text": "Original Text",
    "editor_translation": "Translation",

    // Cache Editor specific
    "cache_editor_title": "Cache Editor",
    "cache_editor_project_path": "Project Path",
    "cache_editor_project_path_placeholder": "Enter path to project output directory",
    "cache_editor_load_cache": "Load Cache",
    "cache_editor_loading": "Loading...",
    "cache_editor_search_placeholder": "Search...",
    "cache_editor_switch_project": "Switch Project",
    "cache_editor_source_text": "Source Text",
    "cache_editor_translation": "Translation",
    "cache_editor_editing": "(Editing)",
    "cache_editor_save": "Save",
    "cache_editor_cancel": "Cancel",
    "cache_editor_no_translation": "No translation",
    "cache_editor_modified": "✨ Modified",
    "cache_editor_previous": "Previous",
    "cache_editor_next": "Next",
    "cache_editor_page_info": "Page {} of {}",
    "cache_editor_line_info": "Line {}/{} • Page {}/{}",
    "cache_editor_no_source_loaded": "No source text loaded",
    "cache_editor_no_translations_loaded": "No translations loaded",
    "cache_editor_loading_translations": "Loading translations...",
    "cache_editor_no_source_text": "No source text",
    "cache_editor_enter_project_path": "Please enter a project path",
    "cache_editor_cache_file_not_found": "Cache file not found",
    "cache_editor_failed_load_cache": "Failed to load cache",
    "cache_editor_failed_update_item": "Failed to update item",

    // AI Proofread
    "cache_editor_ai_proofread": "AI Proofread",
    "cache_editor_start_proofread": "Start Proofread",
    "cache_editor_stop_proofread": "Stop Proofread",
    "cache_editor_proofread_running": "Proofreading...",
    "cache_editor_proofread_progress": "Progress: {}/{}",
    "cache_editor_proofread_issues": "Issues Found",
    "cache_editor_proofread_no_issues": "No Issues Found",
    "cache_editor_proofread_accept": "Accept",
    "cache_editor_proofread_skip": "Skip",
    "cache_editor_proofread_edit": "Edit",
    "cache_editor_proofread_accept_all": "Accept All",
    "cache_editor_proofread_clear": "Clear List",
    "cache_editor_proofread_issue_type": "Issue Type",
    "cache_editor_proofread_severity": "Severity",
    "cache_editor_proofread_description": "Description",
    "cache_editor_proofread_suggestion": "Suggestion",
    "cache_editor_proofread_original": "Original",
    "cache_editor_proofread_corrected": "Corrected",
    "cache_editor_proofread_high": "High",
    "cache_editor_proofread_medium": "Medium",
    "cache_editor_proofread_low": "Low",
    "cache_editor_proofread_terminology": "Terminology",
    "cache_editor_proofread_omission": "Omission",
    "cache_editor_proofread_hallucination": "Hallucination",
    "cache_editor_proofread_logic_error": "Logic Error",
    "cache_editor_proofread_tokens_used": "Tokens: {}",
    "cache_editor_proofread_completed": "Proofread Completed",
    "cache_editor_proofread_error": "Proofread Error",
    "cache_editor_proofread_keep_original": "Keep Original",
    "cache_editor_proofread_hide_panel": "Hide AI Panel",
    "cache_editor_proofread_view_suggestions": "View AI Suggestions ({})",
    "cache_editor_single_check_tooltip": "Run AI Check for this line",
    "cache_editor_single_check_btn": "AI Check",
    "cache_editor_analyzing_text": "AI Analyzing...",
    "cache_editor_issues_found_title": "Issues Found:",
    "cache_editor_no_issues_found_text": "✓ No issues found by AI.",
    "cache_editor_apply_fix_btn": "Apply Fix",
    "cache_editor_proposed_fix_title": "Proposed Fix:",
    "cache_editor_ai_model_warning": "⚠️ AI proofreading depends on the capability of your API model. Use reasoning models (e.g., DeepSeek-R1, GPT-5.2, Gemini Pro Series) for best results.",

    "editor_search": "Search",
    "editor_save": "Save",
    "editor_reset": "Reset",
    "editor_upload_cache": "Upload Cache File",
    "editor_no_project": "No Project Loaded",
    "editor_select_file": "Select a File",
    "editor_click_to_translate": "Click to add translation",
    "editor_enter_to_edit": "Press Enter to edit",
    "editor_enter_to_save": "Press Enter to save",
    "editor_line_number": "Line",
    "editor_untranslated": "Untranslated",
    "editor_translated": "Translated",
    "editor_polished": "Polished",
    "editor_modified": "Modified",
    "editor_project_stats": "Project Statistics",
    "editor_overall_progress": "Overall Progress",
    "editor_total_lines": "Total Lines",
    "editor_files_count": "Files",
    "editor_lines_per_file": "Lines per File",
    "editor_completion_rate": "Completion Rate",
    "editor_complete": "Complete",
    "editor_nearly_done": "Nearly Done",
    "editor_in_progress": "In Progress",
    "editor_getting_started": "Getting Started",
    "editor_search_placeholder": "Enter search query...",
    "editor_search_scope_all": "All Text",
    "editor_search_scope_source": "Original Text",
    "editor_search_scope_translation": "Translation",
    "editor_search_scope_polished": "Polished Text",
    "editor_search_regex": "Regex",
    "editor_search_flagged_only": "Flagged Only",
    "editor_search_no_results": "No Results",
    "editor_search_results_count": "{} result{} found",
    "editor_search_tips": "Tips: Enable Regex for pattern matching",
    "editor_goto_line": "Jump to Line",
    "editor_clear_modifications": "Clear modification marks",
    "editor_drag_upload": "Drag & Drop Cache Files",
    "editor_drag_upload_desc": "Support JSON format cache files",
    "editor_upload_success": "File uploaded successfully",
    "editor_upload_error": "File upload failed",
    "editor_upload_processing": "Processing uploaded file...",
    "editor_unsupported_format": "Unsupported file format",
    "loading": "Loading",
    "retry": "Retry",
    "ui_ai_glossary": "AI Glossary Analysis",
    "ai_glossary_warning": "⚠ Local LLMs are not recommended for analysis due to potential quality issues. Use online APIs for better results, but this may incur API costs.\nNote: Analysis accuracy depends on your API model. This is preliminary analysis - manual review recommended.",
    "ai_glossary_input_path": "Input File Path",
    "ai_glossary_percent": "Analysis Percent (%)",
    "ai_glossary_lines": "Or Specify Lines",
    "ai_glossary_start": "Start Analysis",
    "ai_glossary_stop": "Stop Analysis",
    "ai_glossary_status": "Status",
    "ai_glossary_results": "Results",
    "ai_glossary_min_freq": "Min Frequency",
    "ai_glossary_save": "Save to Glossary",
    "ai_glossary_term": "Term",
    "ai_glossary_type": "Type",
    "ai_glossary_count": "Count",
    "ai_glossary_filename": "Filename",
    "ai_glossary_idle": "Idle",
    "ai_glossary_running": "Analyzing...",
    "ai_glossary_completed": "Completed",
    "ai_glossary_error": "Error",
    "ai_glossary_api_config": "API Config",
    "ai_glossary_use_current": "Use Current Config",
    "ai_glossary_use_temp": "Use Temp Config",
    "ai_glossary_temp_platform": "Platform",
    "ai_glossary_temp_model": "Model",
    "ai_glossary_temp_url": "API URL",
    "ai_glossary_temp_key": "API Key",
    "ai_glossary_temp_threads": "Threads",
    "term_selector_title": "Term Translation Selection",
    "term_selector_api_hint": "Translation quality depends on the LLM performance of your configured API. Better models may yield better results but cost more",
    "term_selector_hint": "Double-click options to edit, click circle to switch, click refresh icon to re-translate",
    "term_selector_translate_all": "Translate All",
    "term_selector_translating_all": "Translating All...",
    "term_selector_save_all": "Save All",
    "term_selector_cancel": "Cancel",
    "term_selector_header_term": "Term (Double-click to edit source)",
    "term_selector_header_type": "Type",
    "term_selector_header_options": "Options (Double-click text to edit)",
    "term_selector_header_action": "Action",
    "term_selector_waiting": "Waiting...",
    "term_selector_manual_add": "+ Manual",
    "term_selector_retry_tooltip": "Regenerate translation suggestion (get more options)",
    "term_selector_save_tooltip": "Save to glossary",
    "term_selector_summary": "Total {} terms | Saved: {}",
    "term_selector_edit_hint": "Tip: Double-click translation text to edit directly",
    "term_selector_current_selection": "Current Selection",
    "term_selector_confirm_save": "Confirm & Save",
    "term_selector_saved": "Saved",
    "term_selector_new_manual": "New Translation",
    "term_selector_duplicate_hint": "Model returned the same translation as existing, may need manual handling"
};

export const DEFAULT_CONFIG: AppConfig = {
  interface_language: 'zh_CN',
  // Basic
  label_input_path: '',
  label_output_path: '',
  translated_output_path: '',
  polishing_output_path: '',
  auto_set_output_path: true,
  keep_original_encoding: true,
  
  source_language: 'Japanese',
  target_language: 'Chinese (Simplified)',
  
  translation_project: 'AutoType',
  
  // Performance
  user_thread_counts: 5,
  request_timeout: 60,
  retry_count: 3,
  round_limit: 3,
  enable_smart_round_limit: false,
  smart_round_limit_multiplier: 1.0,
  
  // Processing
  enable_fast_translate: false,
  enable_line_breaks: true,
  line_breaks_style: 1,
  response_conversion_toggle: false,
  opencc_preset: 's2t',
  
  // Limits
  tokens_limit_switch: false,
  lines_limit: 20,
  pre_line_counts: 3,
  tokens_limit: 1500,

  // Switches
  pre_translation_switch: false,
  post_translation_switch: false,
  prompt_dictionary_switch: false,
  exclusion_list_switch: false,
  characterization_switch: false,
  world_building_switch: false,
  writing_style_switch: false,
  translation_example_switch: false,
  few_shot_and_example_switch: false,
  auto_process_text_code_segment: false,

  // Data Containers
  pre_translation_data: null,
  post_translation_data: null,
  exclusion_list_data: [],
  prompt_dictionary_data: [],
  characterization_data: [],
  world_building_content: '',
  writing_style_content: '',
  translation_example_data: [],

  // API & Platform
  enable_api_failover: false,
  backup_apis: [],
  api_failover_threshold: 10,
  
  platforms: {
    'OpenAI': {
      tag: 'OpenAI',
      group: 'online',
      name: 'OpenAI',
      api_url: 'https://api.openai.com/v1',
      model: 'gpt-3.5-turbo',
      think_switch: false,
      think_depth: 0
    }
  },
  target_platform: 'OpenAI',
  base_url: 'https://api.openai.com/v1',
  model: 'gpt-3.5-turbo',
  api_settings: { translate: 'OpenAI', polish: 'OpenAI' },

  // Prompts
  interactive_mode: false,
  translation_prompt_selection: {},
  polishing_prompt_selection: {},

  // System
  show_detailed_logs: false,
  recent_projects: [],
  enable_cache_backup: true,
  enable_auto_restore_ebook: true,
  enable_dry_run: false,
  unlocked_themes: ['default'],
  temp_file_limit: 10,
  cache_editor_page_size: 15,
  response_check_switch: {
    newline_character_count_check: false,
    return_to_original_text_check: false,
    residual_original_text_check: false,
    reply_format_check: false
  }
};

export const PLATFORMS = [
  'OpenAI',
  'Anthropic',
  'Gemini',
  'LocalLLM',
  'Sakura',
  'Azure',
  'DeepSeek',
  'SiliconFlow',
  'CustomOpenAI',
  'Ollama',
  'VLLM'
];

export const PROJECT_TYPES = [
  'AutoType',
  'MTool',
  'RenPy', 
  'TPP',
  'Txt',
  'Epub',
  'Docx',
  'Srt',
  'Ass',
  'Po',
  'I18next'
];

export const MOCK_LOGS = [
  "[SYSTEM] AiNiee Control Center initialized.",
  "[INFO] Loading configuration profile 'Default'...",
  "[INFO] Plugin manager loaded 12 plugins.",
  "[READY] System ready. Waiting for task input.",
];