import type { TranslationMap } from "./index";

export const zhCN: TranslationMap = {
  // App header
  "app.title": "AI 视觉对话助手",
  "app.stats.requests": "次请求",

  // Connection status
  "status.connected": "已连接",
  "status.connecting": "连接中...",
  "status.disconnected": "未连接",

  // Settings
  "settings.title": "设置",
  "settings.appearance": "外观",
  "settings.theme": "主题",
  "settings.theme.desc": "切换明暗主题",
  "settings.theme.dark": "深色",
  "settings.theme.light": "浅色",
  "settings.session": "会话",
  "settings.tts": "语音回答",
  "settings.tts.desc": "AI 回答时同步播放语音",
  "settings.detail": "图像精度",
  "settings.detail.desc": "高精度适合识别文字，低精度省流量",
  "settings.detail.low": "低",
  "settings.detail.high": "高",
  "settings.language": "语言",
  "settings.language.desc": "交互语言偏好",
  "settings.scenario": "对话情景",
  "settings.scenario.desc": "选择 AI 扮演的角色",

  // Scenarios
  "scenario.choose": "选择对话情景",
  "scenario.freeChat": "自由对话",
  "scenario.freeChat.desc": "AI 视觉助手，自由聊天",
  "scenario.freeChat.hint": "AI 会作为视觉助手回答你的问题",
  "scenario.interviewer": "模拟面试官",
  "scenario.interviewer.desc": "AI 扮演面试官，进行模拟面试",
  "scenario.interviewer.hint": "AI 会扮演面试官，逐步提出专业问题并点评你的回答",
  "scenario.englishTeacher": "英语老师",
  "scenario.englishTeacher.desc": "AI 英语外教，纠正语法并引导对话",
  "scenario.englishTeacher.hint": "AI 会用英语对话，纠正语法错误并引导深入交流",
  "scenario.debate": "辩论对手",
  "scenario.debate.desc": "AI 反驳你的观点，锻炼逻辑思维",
  "scenario.debate.hint": "AI 会站在反方立场，用逻辑和证据反驳你的观点",
  "scenario.interpreter": "同声翻译",
  "scenario.interpreter.desc": "实时中英互译，口语化翻译",
  "scenario.interpreter.hint": "AI 会实时翻译你的话（中英互译），无解释评论",

  // Video indicators
  "video.listening": "🎤 正在聆听...",
  "video.playing": "🔊 正在播放...",
  "video.initVad": "正在初始化语音检测...",
  "video.clickToStart": "点击下方按钮开始对话",
  "video.placeholder": "在右侧聊天框输入即可开始对话",
  "video.cameraOff": "摄像头未开启",
  "video.cameraOff.hint": "可在右侧聊天框打字对话",
  "video.ended": "视频已结束",
  "video.ended.hint": "您可以继续在下方输入文字对话",

  // Controls
  "controls.connecting": "连接中...",
  "controls.start": "开始对话",
  "controls.startVideo": "开始视频通话",
  "controls.cameraOff": "关闭摄像头",
  "controls.cameraOn": "开启摄像头",
  "controls.micOff": "关闭麦克风",
  "controls.micOn": "开启麦克风",
  "controls.interrupt": "⏹ 打断",
  "controls.stop": "结束对话",
  "controls.stopVideo": "结束视频",
  "controls.endSession": "结束会话",
  "controls.resumeVideo": "重新开始视频",

  // Chat panel
  "chat.title": "对话",
  "chat.reconnecting": "连接已断开，正在重连...",
  "chat.connecting": "正在连接服务...",
  "chat.vadInit": "正在初始化语音检测...",
  "chat.empty.prompt": "在下方输入文字开始对话",
  "chat.empty.hint": "输入文字即可与 AI 交互，也可点击左侧按钮开启视频",
  "chat.welcome.prompt": "在下方输入文字开始对话",
  "chat.welcome.hint": "也可以开启麦克风用语音对话",
  "chat.userLabel": "你",
  "chat.input.placeholder": "输入文字对话...",
  "chat.send": "发送",
  "chat.scenarioSwitched": "已切换到 {name} 模式",

  // Session messages
  "session.recognizing": "（语音识别中...）",
  "session.sttFailed": "（语音识别失败，请重试）",
  "session.noSpeech": "（未识别到语音）",
  "session.interrupted": "（已打断）",

  // Errors
  "error.INVALID_MESSAGE": "消息格式异常，请重试",
  "error.SESSION_NOT_FOUND": "会话已过期，请重新连接",
  "error.RATE_LIMITED": "请求太频繁，请稍后再试",
  "error.IMAGE_TOO_LARGE": "图像过大，请降低分辨率",
  "error.AUDIO_TOO_SHORT": "语音太短，请再说一句",
  "error.LLM_TIMEOUT": "AI 响应超时，请重试",
  "error.LLM_ERROR": "AI 服务异常，请稍后重试",
  "error.STT_ERROR": "语音识别失败，请重试",
  "error.TTS_ERROR": "语音合成失败",
  "error.INTERNAL_ERROR": "服务内部错误，请重试",
  "error.unknown": "未知错误",

  // Sidebar
  "sidebar.new": "新对话",
  "sidebar.expand": "展开侧边栏",
  "sidebar.collapse": "收起侧边栏",
  "sidebar.empty": "暂无会话记录",
  "sidebar.messages": "条消息",
  "sidebar.rename": "重命名",
  "sidebar.delete": "删除",
  "sidebar.search": "搜索对话...",
  "sidebar.today": "今天",
  "sidebar.yesterday": "昨天",
  "sidebar.earlier": "更早",
  "sidebar.pinned": "置顶",
  "sidebar.video": "视频",
  "sidebar.clearHistory": "清除历史",

  // Scene cards (empty state)
  "scene.describe": "描述我面前的场景",
  "scene.describe.desc": "让 AI 观察并描述当前画面",
  "scene.text": "识别画面中的文字",
  "scene.text.desc": "提取并翻译画面里的文字",
  "scene.object": "帮我分析这个物品",
  "scene.object.desc": "识别物体并给出相关信息",
  "scene.suggest": "给我一些建议",
  "scene.suggest.desc": "基于当前场景给出实用建议",

  // Video controls (enhanced)
  "controls.recognize": "识别画面",
  "controls.device.default": "默认",

  // Status bar
  "statusbar.ready": "就绪 · 选择设备后开始通话",
  "statusbar.calling": "通话中",
  "statusbar.duration": "通话时长",
  "statusbar.recognitions": "次识别",
  "statusbar.tokens": "Token",

  // Input enhanced
  "chat.input.voice": "语音输入",

  // Device errors
  "error.vadInit": "VAD 初始化失败",
  "error.cameraAccess": "无法访问摄像头",
  "error.micAccess": "无法访问麦克风",

  // Auth
  "auth.subtitle": "AI 视觉对话助手",
  "auth.login": "登录",
  "auth.register": "注册",
  "auth.username": "用户名",
  "auth.username.placeholder": "3-64 个字符",
  "auth.password": "密码",
  "auth.password.placeholder": "8-72 个字符",
  "auth.submitting": "请稍候...",
  "auth.noAccount": "还没有账号？",
  "auth.hasAccount": "已有账号？",
  "auth.error.usernameLength": "用户名需要 3-64 个字符",
  "auth.error.passwordLength": "密码需要 8-72 个字符",
  "auth.logout": "退出登录",

  // Account (in settings)
  "settings.account": "账号",
  "settings.account.user": "当前用户",

  // Custom scenarios
  "settings.scenario.system": "系统预置情景",
  "settings.scenario.custom": "我的情景",
  "settings.scenario.empty": "还没有自建情景，点击上方按钮创建",
  "scenario.create.button": "创建新情景",
  "scenario.createChip": "新建",
  "scenario.create.title": "创建自建情景",
  "scenario.edit.title": "编辑情景",
  "scenario.create.name": "情景名称",
  "scenario.create.namePlaceholder": "例如：创意写作导师",
  "scenario.create.icon": "图标",
  "scenario.create.description": "简短描述",
  "scenario.create.descriptionPlaceholder": "一句话介绍这个情景的作用",
  "scenario.create.prompt": "System Prompt",
  "scenario.create.promptPlaceholder": "定义 AI 的角色和交互规则...",
  "scenario.create.promptGuide": "查看编写指南",
  "scenario.create.promptGuide.tips": "编写提示：",
  "scenario.create.promptGuide.tip1": "明确角色定位：你是谁，不是谁",
  "scenario.create.promptGuide.tip2": "列出交互规则：如何回答，每次几句话",
  "scenario.create.promptGuide.tip3": "添加约束条件：不要做什么",
  "scenario.create.promptGuide.example": "示例：",
  "scenario.create.greeting": "首句引导（可选）",
  "scenario.create.greetingPlaceholder": "切换到此情景时，AI 的第一句话...",
  "scenario.create.language": "默认语言",
  "scenario.error.nameLength": "情景名称需要 2-50 个字符",
  "scenario.error.promptLength": "Prompt 需要 10-2000 个字符",
  "scenario.error.greetingLength": "首句引导不超过 500 个字符",

  // Common actions
  "common.cancel": "取消",
  "common.create": "创建",
  "common.creating": "创建中...",
  "common.save": "保存",
  "common.saving": "保存中...",
  "common.edit": "编辑",
  "common.delete": "删除",
  "common.confirmDelete": "再次点击确认删除",
};
