import type { en } from "./en";

export const zhCN: typeof en = {
  palette: {
    searchPlaceholder: "搜索命令…",
    empty: "没匹配到",
    footMove: "移动",
    footRun: "执行",
    footClose: "关闭",
    newChat: "新建会话",
    newChatHint: "丢掉当前对话，开新一轮",
    newTab: "新建标签",
    newTabHint: "再开一个独立工作区标签",
    closeTab: "关闭标签",
    closeTabHint: "关闭当前标签",
    abort: "中断当前生成",
    abortHint: "打断模型当前生成",
    copyLast: "复制最近回复",
    copyLastHint: "复制最近一条助手回复",
    exportMd: "导出对话为 Markdown",
    exportMdHint: "整段对话复制到剪贴板",
    clearChat: "清屏",
    clearChatHint: "只清当前 UI，subprocess 不重启",
    focusComposer: "聚焦输入框",
    pickWorkspace: "切换工作目录…",
    pickWorkspaceHint: "选另一个工作目录",
    settings: "设置",
    settingsHint: "模型、预算、主题…",
    about: "关于 Carbon Code",
    groupNav: "导航",
    groupAction: "动作",
    groupWorkspace: "目录",
    groupSettings: "设置",
    countSuffix: "项",
  },
  about: {
    sidebarLabel: "关于",
    tagline: "DeepSeek 原生编码助手",
    version: "版本",
    repo: "代码仓库",
    checkUpdates: "检查更新",
    checking: "检查中…",
    upToDate: "已是最新版本（{version}）",
    updateAvailable: "新版本可用：{version}",
    openReleases: "查看发布页",
    checkFailed: "检查失败：{message}",
    checkNoRelease: "尚无发布",
    close: "关闭",
  },
  workdir: {
    title: "切换工作目录",
    searchPlaceholder: "搜索最近路径…",
    empty: "暂无最近工作目录",
    browse: "浏览本地…",
  },
  sidebar: {
    newChat: "新建会话",
    searchCommands: "搜索命令…",
    recent: "最近",
    noSessions: "还没有会话",
    wallet: "余额",
    footHint: "cache-first agent",
  },
  toast: {
    copied: "已复制",
    copiedMd: "整段对话已复制为 Markdown",
    newSession: "已开新会话",
    cleared: "已清空 UI",
    aboutLine: "Carbon Code v{version} · cache-first DeepSeek agent",
  },
  composer: {
    busy: "carboncode 正在思考…",
    idle: "问点什么",
    send: "发送",
    newline: "换行",
    commands: "命令",
    placeholder: "向 Agent 提问 / 安排任务…",
    queueCount: "排队 {n}",
    queue: "排队",
    interrupt: "中断",
    mentionFiles: "提及文件",
    commandPalette: "命令面板",
    insertFile: "插入文件 (@ 提及)",
    insertImage: "插入图片 (@ 提及)",
    switchPreset: "切换模型预设",
    slashHeader: "命令 — 控制 agent、模型与会话",
    atHeader: "提及 — 工作区中的文件",
    noMatches: "无匹配项",
    select: "选择",
    confirm: "确认",
    close: "关闭",
    imageFilterName: "图片",
    commandsLabel: "命令",
    mentionLabel: "提及",
    workspaceRoot: "工作区根目录",
  },
  dragDrop: {
    overlay: "松开以作为 @ 提及附加",
  },
  settings: {
    title: "设置",
    close: "关闭",
    language: "语言",
    languageHint: "仅影响界面，不影响模型本身。",
    langEn: "English",
    langZhCn: "简体中文",
    langEnDesc: "English UI",
    langZhCnDesc: "中文界面",
    costCurrency: "费用币种",
    costCurrencyHint: "仅显示用。内部按 USD/token 记账，按 7.2 固定汇率换算。",
    cnyDesc: "和 DeepSeek 控制台一致",
    usdDesc: "和官方每 token 单价一致",
    theme: "主题",
    themeHint: "仅本机，不与 TUI 同步。",
    themeDark: "深色",
    themeLight: "浅色",
    themeDarkDesc: "默认 · 暗光环境",
    themeLightDesc: "高对比 · 白天",
    fontScale: "字体大小",
    fontScaleHint: "整体缩放，高分屏可选大档。",
    fontScaleSmall: "小",
    fontScaleMedium: "中",
    fontScaleLarge: "大",
    fontFamily: "字体",
    fontFamilyHint: "正文字体；代码块始终用等宽。",
    fontFamilySans: "无衬线",
    fontFamilySystem: "系统",
    fontFamilySerif: "衬线",
    reasoningEffort: "思考深度",
    reasoningEffortHint: "立即生效。",
    effortHigh: "high",
    effortMax: "max",
    effortHighDesc: "更快，思考更少",
    effortMaxDesc: "推理更深，更慢",
    editMode: "审批模式",
    editModeHint: "工具审批策略 — 改动写入磁盘，下一次工具调用生效。",
    editModeReview: "review",
    editModeAuto: "auto",
    editModeYolo: "yolo",
    editModeReviewDesc: "每次写入都要确认",
    editModeAutoDesc: "改文件自动，命令仍要确认",
    editModeYoloDesc: "全部放行 — 完全自动",
    budget: "预算上限",
    budgetHint: "每会话 USD 上限。留空 = 不限。",
    budgetPlaceholder: "不限",
    baseUrl: "DeepSeek base URL",
    baseUrlHint: "走代理时再改。留空 = 官方地址。需重启。",
    workspace: "工作目录",
    workspaceHint: "agent 工具操作的根目录。切换会写入配置并重载工具。",
    workspaceChange: "更换…",
    editor: "外部编辑器",
    editorHint: "点击文件路径时用它打开。系统默认 = OS 关联程序，其他需在 PATH 里。",
    editorSystem: "系统默认",
    editorCustom: "自定义",
    editorPlaceholder: '例如 "code"、"subl" 或可执行文件全路径',
    editorDefault: "(默认)",
    apiKey: "API key",
    apiKeyHint: "DeepSeek key — 保存到 ~/.carboncode/config.json (0600)。",
    apiKeyNotSet: "(未设置)",
    apiKeyCancel: "取消",
    apiKeySave: "保存",
    apiKeyShow: "显示",
    apiKeyHide: "隐藏",
    environment: "运行环境",
    model: "模型",
    pageGeneralLabel: "通用",
    pageGeneralDesc: "外观、语言、行为",
    pageModelsLabel: "模型",
    pageModelsDesc: "选择默认模型与采样参数",
    pageMcpLabel: "MCP 服务器",
    pageMcpDesc: "管理 MCP 协议工具服务器",
    pageSkillsLabel: "技能 / Skills",
    pageSkillsDesc: "为 / 命令绑定的可复用提示集",
    pageMemoryLabel: "记忆",
    pageMemoryDesc: "CLAUDE.md / AGENTS.md 注入说明",
    pageRulesLabel: "审批规则",
    pageRulesDesc: "自动批准、拒绝、需确认命令模式",
    pageBillingLabel: "账户 & 计费",
    pageBillingDesc: "账户余额、用量与发票",
    pageShortcutsLabel: "快捷键",
    pageShortcutsDesc: "键盘快捷键总览",
    appearanceSection: "外观",
    workspaceSection: "工作区",
    behaviorSection: "行为",
    apiSection: "DeepSeek API",
    mcpSection: "已配置",
    currentWorkspace: "当前工作目录",
    notSelected: "未选择",
    apiKeySet: "已设置 · {prefix}…",
    defaultModelCurrent: "默认模型 · 当前 {model}",
    modelAutoDesc: "自动从 flash 起步，遇复杂任务升级到 pro，兼顾速度与质量。",
    modelFlashDesc: "通用对话模型，速度快、长上下文、价格友好。",
    modelProDesc: "深度推理模型，先生成可解释的思考链，再给最终答案。",
    ctxWindow: "上下文",
    maxOutput: "输出",
    mcpConfigured: "已配置 · {count}",
    mcpBridged: "· 已桥接",
    mcpNotBridged: "· 当前桌面会话未桥接，重启 carboncode code (TUI) 后生效",
    mcpEmpty: "还没有配置 MCP 服务器。下面输入 spec 添加。",
    mcpRemove: "移除",
    parseError: "解析失败：{error}",
    mcpAddSection: "添加服务器",
    mcpSpecLabel: "spec 字符串",
    mcpSpecFormat: "格式：<code>name=command args</code> 或 <code>name=https://host/sse</code>",
    mcpAdd: "添加",
    skillsLoaded: "已加载 · {count} · 通过 / 命令调用",
    skillsEmpty:
      "没有可用技能。可在 ~/.carboncode/skills/ 或 项目根/.carboncode/skills/ 下创建 SKILL.md。",
    memorySection: "长期记忆",
    memoryDesc: "当前版本依赖内置 CLAUDE.md / AGENTS.md 注入；项目级别记忆在内核侧维护。",
    appMode: "应用模式",
    ruleAutoApprovalSection: "命令自动批准",
    ruleAutoApprovalHint:
      '在 ApprovalCard 中点击 "始终允许" 可向白名单添加命令前缀；后续匹配命令将不再询问。',
    balanceLabel: "钱包余额",
    balanceLow: "余额不足",
    balanceAvailable: "可用",
    sessionCost: "本会话花费",
    cacheHitRate: "缓存命中率",
    shortcutNewChat: "新建会话",
    shortcutNewTab: "新建标签",
    shortcutCloseTab: "关闭标签",
    shortcutCommandPalette: "命令面板",
    shortcutFocusComposer: "聚焦输入框",
    shortcutSwitchTab: "切换标签",
    shortcutAbort: "中断流式输出",
    shortcutSettings: "设置",
  },
  modal: {
    planFeedbackPlaceholder: "可选反馈 — 想要修改时写这里",
    choiceCustomPlaceholder: "或者自己写一个答案…",
  },
  plan: {
    activeTitle: "进行中的计划",
    progress: "{done} / {total} 步",
    progressNoTotal: "已完成 {done} 步",
    expand: "展开",
    collapse: "收起",
    dismiss: "关闭计划",
    riskLow: "低",
    riskMed: "中",
    riskHigh: "高",
  },
  editMode: {
    label: "审批模式",
    review: "review",
    auto: "auto",
    yolo: "yolo",
    reviewDesc: "每次写入都要确认",
    autoDesc: "改文件自动，命令仍要确认",
    yoloDesc: "全部放行",
    reviewHint: "每个工具调用都需要批准",
    autoHint: "命中白名单的命令自动批准",
    yoloHint: "全部自动批准 · 谨慎使用",
  },
  markdown: {
    filePillTitle: "点击打开 · 右键复制",
    externalLinkTitle: "在浏览器中打开 {href}",
    localLinkTitle: "打开 {href}",
    copy: "复制",
    copied: "已复制",
  },
  preset: {
    autoDesc: "Flash → Pro 自动升级",
    flashDesc: "快、便宜、长上下文",
    proDesc: "深度推理",
  },
  checkpoint: {
    title: "步骤已完成",
    progress: "{done} / {total}",
    notesLabel: "备注",
    continue: "继续",
    revise: "修改…",
    stop: "停止",
    revisePlaceholder: "下一步前需要改什么？（留空就继续）",
    sendRevise: "发送修订",
  },
  revision: {
    title: "计划修订",
    subtitle: "模型想替换剩余步骤",
    remainingHeading: "新的剩余步骤",
    accept: "接受",
    reject: "拒绝",
    cancel: "取消",
  },
  statusbar: {
    offline: "离线",
    busy: "运行中",
    online: "在线",
    jobs: "任务",
    jobsTip: "后台任务 · ⌘J",
    cacheHit: "缓存命中",
    cache: "缓存",
    tokens: "tokens",
    thisTurn: "本次",
    switchWorkspace: "切换工作区 · {workspace}",
    switchCurrency: "切换货币 (CNY / USD)",
    balance: "余额",
    switchTheme: "切换主题",
    themeDark: "深色",
    themeLight: "浅色",
  },
  jobs: {
    title: "后台任务",
    running: "运行中",
    exited: "已结束",
    empty: "当前工作区还没有后台任务。",
    stopAll: "全部中止",
    stopAllTip: "向所有正在运行的任务发送 SIGTERM",
    stop: "中止",
    stopOne: "中止该任务",
    kbToggle: "切换",
    kbClose: "关闭",
  },
  app: {
    toast: {
      newSession: "已创建新会话",
      cleared: "已清空",
      copied: "已复制",
      copiedMd: "已复制 Markdown",
      emptySession: "会话为空",
      langSwitched: "已切换到{lang}",
      modelSwitched: "已切换到 {model}",
      modeSwitched: "模式: {mode}",
    },
    cmd: {
      newSession: "新建会话",
      clearChat: "清屏",
      abort: "中断流式输出",
      copyLast: "复制最后一条回复",
      switchModel: "切换模型",
      toggleTheme: "切换深浅主题",
      toggleCurrency: "切换货币显示 (CNY / USD)",
      toggleLang: "切换界面语言 (中 / 英)",
      exportMd: "复制本会话为 Markdown",
      help: "查看所有命令",
    },
    skill: {
      generic: "{scope}技能 · {runAs}",
      scope: {
        builtin: "内置",
        global: "全局",
        project: "项目",
      },
      runAs: {
        inline: "内联",
        subagent: "子代理",
      },
    },
    yolo: {
      banner1: "所有工具调用、shell 命令、文件编辑都会",
      bannerBold: "自动批准",
      banner2: "，不会再询问。",
      switchBack: "切回 Review",
      toast: "所有操作将自动批准，不再询问",
    },
    errorLabel: "错误",
    jumpToBottom: "回到底部",
    splashSubtitle: "DeepSeek Agents",
    connecting: "正在连接 Carbon Code 内核…",
    langZH: "中文",
    langEN: "English",
    titlebar: {
      sidebar: "侧栏 (⌘B)",
      contextPanel: "上下文面板",
      more: "更多",
      commandPalette: "命令面板",
      exportMd: "导出 Markdown",
      clearChat: "清屏",
      settings: "设置",
      windowControls: "窗口控制",
      close: "关闭",
      minimize: "最小化",
      maximize: "最大化",
      restore: "还原",
    },
    tab: {
      newTabTitle: "新建标签 ⌘T",
      newTab: "新标签",
    },
    header: {
      noWorkspace: "未选择工作区",
      running: "运行中",
      clickToSelect: "点击选择工作区",
      copyMd: "复制对话为 Markdown",
      export: "导出",
      newChat: "新会话",
      abort: "中断",
    },
    empty: {
      welcome: "欢迎使用 Carbon Code",
      currentWorkspace: "当前工作区：",
      selectWorkspace: "请先在顶部选择工作区",
      suggestion0: "帮我审查最近一次提交的代码改动",
      suggestion1: "把当前文件的 TS 报错都修了",
      suggestion2: "把 README 翻译成中英双语",
      suggestion3: "为这个仓库生成一份 CHANGELOG",
    },
    setup: {
      welcome: "欢迎使用 Carbon Code",
      description: "首次使用需要配置 DeepSeek API Key 与工作目录。Key 仅保存在本地。",
      workspace: "工作目录",
      notSelected: "未选择",
      choose: "选择…",
      saveAndStart: "保存并开始",
    },
    update: {
      available: "新版本可用 · {current} → {latest}",
      installing: "正在安装…",
      failed: "安装失败",
      clickToInstall: "点击安装并重启",
      install: "安装",
      later: "稍后",
    },
    exportUserLabel: "你",
    exportReasoningSummary: "思考",
    exportToolLabel: "工具",
    session: {
      new: "{workspace} · 新会话",
      format: "会话 {month}-{day} {hour}:{minute}",
    },
  },
  planBadge: {
    failed: "失败",
    blocked: "阻塞",
    running: "运行中",
    done: "已完成",
    pending: "待开始",
  },
  cards: {
    reasoningName: "思考",
    reasoningComplete: "完成",
    shellAwaiting: "等待批准",
    shellRunning: "运行中",
    shellExecuteHint: "执行此命令",
    shellAlwaysAllow: "始终允许",
    shellReject: "拒绝",
    shellRun: "运行",
    diffApplyChanges: "应用变更",
    diffDiscard: "丢弃",
    diffApply: "应用",
    diffAwaiting: "等待批准",
    errorName: "错误",
    searchName: "网页搜索",
    subagentDone: "完成",
    subagentFailed: "失败",
    subagentRunning: "运行中",
    subagentDoneProgress: "完成",
    memoryName: "记忆",
    memoryCountSuffix: "项",
    checkpointRewind: "回到此处",
    planDefaultTitle: "计划",
    streaming: "流式输出中…",
    failed: "失败",
    done: "完成",
    running: "运行中",
    error: "错误",
    result: "结果",
    hits: "条结果",
    applied: "已应用",
    cacheHit: "缓存命中",
    prompt: "输入",
    reasoning: "思考",
    output: "输出",
    cost: "花费",
    elapsed: "耗时",
  },
  contextPanel: {
    reservedKey: "预留",
    usedKey: "已用",
    filesTab: "文件",
    toolsTab: "工具",
    memoryTab: "记忆",
    rulesTab: "规则",
    contextTokens: "上下文 · tokens",
    cacheKey: "缓存",
    freeKey: "余",
    filesTitle: "上下文中的文件",
    filesCount: "{count} 个文件",
    fileModified: "已修改",
    fileInContext: "在上下文中",
    mcpTitle: "MCP 服务器",
    mcpReadyAll: "{count} 个已就绪",
    mcpReadySome: "{ready}/{count} 已就绪",
    mcpEmpty: "未配置 MCP 服务器",
    mcpTools: "{count} 个工具",
    mcpReady: "就绪",
    mcpConnecting: "连接中",
    mcpDisabled: "已禁用",
    mcpFailed: "失败",
    mcpConfigured: "已配置",
    memoryTitle: "长期记忆",
    itemCount: "{count} 项",
    scopeProject: "项目",
    scopeGlobal: "全局",
    autoApproveTitle: "自动批准",
    ruleYolo: "YOLO 模式 · 所有工具调用自动批准",
    ruleReadOnly: "只读工具自动批准",
    ruleShellAllowlist: "命中 shell 白名单的命令自动批准",
    ruleWritesAsk: "写入与未知 shell 命令需确认",
    ruleReview: "Review 模式 · 每个工具调用都需确认",
    allow: "ALLOW",
    ask: "ASK",
    noFilesMsg: "上下文里还没有文件。",
    noMemoriesMsg: "还没保存任何记忆。",
  },
  sidebarPanel: {
    sessionTitle: "会话 {month}-{day} {hour}:{minute}",
    justNow: "刚刚",
    minutesAgo: "{n} 分钟前",
    hoursAgo: "{n} 小时前",
    daysAgo: "{n} 天前",
    weeksAgo: "{n} 周前",
    newChat: "新会话",
    commandPalette: "命令面板",
    searchSessions: "搜索会话…",
    recent: "近期",
    noSessions: "暂无会话",
    noMatches: "无匹配结果",
    messageCount: "{count} 条",
    deleteSession: "删除会话",
    approvalRules: "审批规则",
    settings: "设置",
    cancel: "取消",
    delete: "删除",
  },
  extraCards: {
    sessionUsage: "会话用量",
    sessionCost: "花费 {costLabel}",
    approve: "批准",
    reject: "拒绝",
    doctorTitle: "/doctor · 系统体检",
    balance: "余额 {balanceLabel}",
    prompt: "输入",
    reasoning: "思考",
    output: "输出",
    cacheHit: "缓存命中",
    cache: "缓存",
    contextWindow: "上下文窗口",
    topToolsUsage: "Top tools — 占用",
    memoryUser: "USER · 用户偏好",
    memoryFeedback: "FEEDBACK · 反馈与纠正",
    memoryProject: "PROJECT · 项目规范",
    memoryReference: "REFERENCE · 引用资料",
    unknownKind: "# 未知卡片类型 — fallback 渲染",
  },
  thread: {
    keepSteps: "保留剩余 {n} 步",
    keepOriginal: "保留原计划",
    you: "你",
    planRunning: "计划执行中 · step {step} / {total}",
    collapse: "收起",
    activePlan: "活动计划",
    risk: "risk",
    planStepCount: "{count} 步",
    planConfirmationKind: "计划确认",
    startPlan: "开始执行计划",
    approve: "批准",
    cancel: "取消",
    refine: "细化",
    checkpointKind: "计划检查点",
    checkpointTitle: "step {completed} / {total} 完成",
    checkpointSub: "检查点 · {completed} / {total}",
    continue: "继续",
    stop: "停止",
    revise: "修订",
    planRevisionKind: "计划修订",
    rewritePlan: "计划重写",
    revisionMeta: "原因 · 运行约束",
    approveRewrite: "批准重写",
    shellConfirmationKind: "命令确认",
    runCommand: "运行命令",
    runBackgroundCommand: "后台运行命令",
    riskMedium: "risk · 中 · {kind}",
    execute: "执行",
    reject: "拒绝",
    alwaysAllow: "始终允许 \"{prefix}\"",
    pathAccessKind: "路径访问",
    read: "读取",
    write: "写入",
    readPathOutsideSandbox: "读取沙盒外的路径",
    writePathOutsideSandbox: "写入沙盒外的路径",
    allowRead: "允许读取",
    allowWrite: "允许写入",
    alwaysAllowPrefix: "始终允许 {prefix}",
    userChoiceKind: "用户选择",
    optionCount: "{count} 个选项",
    subagent: "subagent",
    copyMessage: "复制这条消息",
    copyResponse: "复制这条回复",
  },
  live: {
    reasoning: "live · reasoning",
    running: "运行中",
    you: "你",
    secondsAgo: "{seconds}s 前",
    deliveredWaiting: "已送达 · 等待 agent 响应",
  },
  panel: {
    renderError: "{panel} 面板渲染错误",
  },
};
