#!/usr/bin/env bash
# Roll i18n catalog — shared / common messages (US-I18N-002).
# Sourced by lib/i18n.sh. Fill with _i18n_set.

# ── update notification ──
_i18n_set en update.available "v%s available — run 'roll update' to upgrade"
_i18n_set zh update.available "有新版本 v%s — 运行 'roll update' 升级"

# ── changelog heading ──
_i18n_set en changelog.heading "Recent Changes"
_i18n_set zh changelog.heading "最近更新"

# ── init: onboard agent ──
_i18n_set en init.onboard_retry "retry the same agent:   roll init"
_i18n_set zh init.onboard_retry "再试一次同一个 agent:  roll init"
_i18n_set en init.onboard_switch "switch to another:      ROLL_ONBOARD_AGENT=<name> roll init"
_i18n_set zh init.onboard_switch "换一个 agent:           ROLL_ONBOARD_AGENT=<name> roll init"

# ── peer help ──
_i18n_set en peer.help.from "Originating agent"
_i18n_set zh peer.help.from "发起方"
_i18n_set en peer.help.to "Target peer (auto-detected if omitted)"
_i18n_set zh peer.help.to "对端 peer（省略则自动选择）"
_i18n_set en peer.help.round "Current round (default: 1)"
_i18n_set zh peer.help.round "当前轮数"
_i18n_set en peer.help.tag "Task type for routing (architecture, security, test...)"
_i18n_set zh peer.help.tag "任务类型"
_i18n_set en peer.help.context "Context file to send to peer"
_i18n_set zh peer.help.context "上下文文件"
_i18n_set en peer.help.yes "Skip opt-out prompt"
_i18n_set zh peer.help.yes "跳过确认提示"
_i18n_set en peer.help.status_cmd "Show peer review state"
_i18n_set zh peer.help.status_cmd "显示状态"

# ── agent ──
_i18n_set en agent.use_hint "roll agent use <name>   — switch agent for this project"
_i18n_set zh agent.use_hint "roll agent use <name>   — 切换此项目的 agent"
_i18n_set en agent.list_hint "roll agent list         — show installed agents"
_i18n_set zh agent.list_hint "roll agent list         — 查看已安装的 agent"

# ── offboard ──
_i18n_set en offboard.manual_rm_agents "rm -f AGENTS.md CLAUDE.md      # only if they were generated by roll init"
_i18n_set zh offboard.manual_rm_agents "rm -f AGENTS.md CLAUDE.md      # 仅当这些文件由 roll init 生成"
_i18n_set en offboard.manual_rm_roll "rm -rf .roll/                  # all process artefacts"
_i18n_set zh offboard.manual_rm_roll "rm -rf .roll/                  # 所有过程文件"
_i18n_set en offboard.manual_edit_gitignore "Edit .gitignore to remove any '.roll/' entry"
_i18n_set zh offboard.manual_edit_gitignore "编辑 .gitignore 移除 '.roll/' 条目"

# ── doctor ──
_i18n_set en doctor.stale_plists "Stale launchd plists"
_i18n_set zh doctor.stale_plists "无效的 launchd 服务"
_i18n_set en doctor.stale_plists_path "Path no longer valid, clean up with:"
_i18n_set zh doctor.stale_plists_path "路径已失效，可清理:"

# ── check_structure (US-ONBOARD-004) ──
_i18n_set en check_structure.detected "Legacy structure detected at: %s"
_i18n_set zh check_structure.detected "发现老结构目录: %s"
_i18n_set en check_structure.pre_2_0_layout "This project uses the pre-2.0 layout (BACKLOG.md / docs/*). Roll 2.0 requires"
_i18n_set zh check_structure.pre_2_0_layout "此项目使用 2.0 之前的老结构 (BACKLOG.md / docs/*)。Roll 2.0 要求"
_i18n_set en check_structure.run_migration "process artifacts to live in .roll/. Run the migration to upgrade:"
_i18n_set zh check_structure.run_migration "过程文件放在 .roll/ 下。运行迁移命令升级:"
_i18n_set en check_structure.preview_changes "# Preview changes"
_i18n_set zh check_structure.preview_changes "# 预览变更"
_i18n_set en check_structure.execute "# Execute (single atomic commit)"
_i18n_set zh check_structure.execute "# 执行（单次原子提交）"
_i18n_set en check_structure.migration_guide "Migration guide"
_i18n_set zh check_structure.migration_guide "迁移指南"
_i18n_set en check_structure.roll_back "To roll back to Roll 1.x temporarily"
_i18n_set zh check_structure.roll_back "如需临时回退到 Roll 1.x"

# ── main dispatch ──
_i18n_set en main.unknown_command "Unknown command: %s"
_i18n_set zh main.unknown_command "未知命令: %s"

# ── dashboard status ──
_i18n_set en dashboard.pending "pending"
_i18n_set zh dashboard.pending "待办"

_i18n_set en shared.added_missing_config_entry "Added missing config entry: %s"
_i18n_set zh shared.added_missing_config_entry "已添加缺失配置项: %s"
_i18n_set en shared.config_updated_with_new_entries "Config updated with %s new entries"
_i18n_set zh shared.config_updated_with_new_entries "配置已更新，新增 %s 条目"
_i18n_set en shared.wrote "Wrote: %s"
_i18n_set zh shared.wrote "已写入: %s"
_i18n_set en shared.file_exists_and_differs "File exists and differs: %s"
_i18n_set zh shared.file_exists_and_differs "文件已存在且内容不同: %s"
_i18n_set en shared.skipped "Skipped: %s"
_i18n_set zh shared.skipped "已跳过: %s"
_i18n_set en shared.wrote_2 "Wrote: %s"
_i18n_set zh shared.wrote_2 "已写入: %s"
_i18n_set en shared.removed_stale "Removed stale %s: %s/%s"
_i18n_set zh shared.removed_stale "已删除过时%s: %s/%s"
_i18n_set en shared.skills_source_not_found_at_skills "Skills source not found at: %s/skills"
_i18n_set zh shared.skills_source_not_found_at_skills "技能源目录未找到: %s/skills"
_i18n_set en shared.removed_stale_skill "Removed stale skill: %s"
_i18n_set zh shared.removed_stale_skill "已删除过时技能: %s"
_i18n_set en shared.convention_source_not_found_at "Convention source not found at: %s"
_i18n_set zh shared.convention_source_not_found_at "约定源文件未找到: %s"
_i18n_set en shared.copying_global_conventions "Copying global conventions..."
_i18n_set zh shared.copying_global_conventions "正在复制全局约定..."
_i18n_set en shared.copying_project_templates "Copying project templates..."
_i18n_set zh shared.copying_project_templates "正在复制项目模板..."
_i18n_set en shared.convention_source_not_found_at_2 "Convention source not found at: %s"
_i18n_set zh shared.convention_source_not_found_at_2 "约定源文件未找到: %s"
_i18n_set en shared.run_this_from_the_roll_repo "Run this from the roll repo, or symlink bin/roll to PATH."
_i18n_set zh shared.run_this_from_the_roll_repo "请在 roll 仓库目录下运行，或将 bin/roll 软链接到 PATH。"
_i18n_set en shared.config_has_no_ai_entries_recreating "Config has no ai_* entries — recreating with defaults (backup saved)"
_i18n_set zh shared.config_has_no_ai_entries_recreating "配置无 ai_* 条目，将重建（已备份）"
_i18n_set en shared.backup_saved_roll_config_yaml_bak "Backup saved: ~/.roll/config.yaml.bak"
_i18n_set zh shared.backup_saved_roll_config_yaml_bak "备份已保存: ~/.roll/config.yaml.bak"
_i18n_set en shared.creating_default_config "Creating default config..."
_i18n_set zh shared.creating_default_config "正在创建默认配置..."
_i18n_set en shared.created_roll_config_yaml "Created: ~/.roll/config.yaml"
_i18n_set zh shared.created_roll_config_yaml "已创建: ~/.roll/config.yaml"
_i18n_set en shared.skipped_resolves_to_repo_refusing_to "Skipped ~/%s (resolves to repo — refusing to manage skills inside roll worktree)"
_i18n_set zh shared.skipped_resolves_to_repo_refusing_to "已跳过 ~/%s（解析到仓库目录 — 拒绝在 roll worktree 内管理技能）"
_i18n_set en shared.removing_legacy_symlink_skills "Removing legacy symlink ~/%s/skills -> %s"
_i18n_set zh shared.removing_legacy_symlink_skills "正在移除遗留软链接 ~/%s/skills -> %s"
_i18n_set en shared.skipped_skills_unknown_symlink_target "Skipped ~/%s/skills -> %s (unknown symlink target)"
_i18n_set zh shared.skipped_skills_unknown_symlink_target "已跳过 ~/%s/skills -> %s（未知软链接目标）"
_i18n_set en shared.skipped_skills_created_path_resolves_to "Skipped ~/%s/skills (created path resolves to repo — refusing to write)"
_i18n_set zh shared.skipped_skills_created_path_resolves_to "已跳过 ~/%s/skills（创建路径解析到仓库 — 拒绝写入）"
_i18n_set en shared.skills_linked_in_skills_new_repaired "Skills linked in ~/%s/skills (+%s new, ~%s repaired, -%s pruned)"
_i18n_set zh shared.skills_linked_in_skills_new_repaired "已在 ~/%s/skills 中创建软链接（新增 +%s，修复 ~%s，清理 -%s）"
_i18n_set en shared.wrote_3 "Wrote: %s"
_i18n_set zh shared.wrote_3 "已写入: %s"
_i18n_set en shared.created "Created: %s"
_i18n_set zh shared.created "已创建: %s"
_i18n_set en shared.appended_roll_md_to "Appended @roll.md to: %s"
_i18n_set zh shared.appended_roll_md_to "已将 @roll.md 追加至: %s"
_i18n_set en shared.already_included "Already included: %s"
_i18n_set zh shared.already_included "已包含: %s"
_i18n_set en shared.updating_skills "Updating skills..."
_i18n_set zh shared.updating_skills "正在更新技能..."
_i18n_set en shared.skills_updated_in_roll_skills "Skills updated in ~/.roll/skills"
_i18n_set zh shared.skills_updated_in_roll_skills "技能已更新至 ~/.roll/skills"
_i18n_set en shared.creating_skill_symlinks_for_ai_tools "Creating skill symlinks for AI tools..."
_i18n_set zh shared.creating_skill_symlinks_for_ai_tools "正在为 AI 工具创建技能软链接..."
_i18n_set en shared.tmux_not_found_installing_via_brew "tmux not found — installing via brew..."
_i18n_set zh shared.tmux_not_found_installing_via_brew "未安装 tmux，正在通过 brew 安装..."
_i18n_set en shared.tmux_installed_tmux "tmux installed.  tmux"
_i18n_set zh shared.tmux_installed_tmux "已安装。"
_i18n_set en shared.brew_install_tmux_failed_install_manually "brew install tmux failed — install manually: brew install tmux  brew"
_i18n_set zh shared.brew_install_tmux_failed_install_manually "安装失败，请手动 'brew install tmux'"
_i18n_set en shared.tmux_required_but_brew_not_available "tmux required but brew not available — install manually: brew install tmux"
_i18n_set zh shared.tmux_required_but_brew_not_available "缺少 brew，请手动 'brew install tmux'"
_i18n_set en shared.tmux_required_install_via_your_package "tmux required — install via your package manager (e.g. apt install tmux / pacman -S tmux)"
_i18n_set zh shared.tmux_required_install_via_your_package "请用系统包管理器安装 tmux"

_i18n_set en shared.skipped_resolves_to_repo "Skipped ~/%s/skills (resolves to repo — check if ~/%s symlinks to roll repo)"
_i18n_set zh shared.skipped_resolves_to_repo "已跳过 ~/%s/skills（解析到仓库 — 检查 ~/%s 是否软链接到 roll 仓库）"
