#!/usr/bin/env bash
# Roll i18n catalog — init command (US-I18N-002).

_i18n_set en init.onboard_cancelled "Onboard cancelled (Ctrl-C)."
_i18n_set zh init.onboard_cancelled "Onboard 已取消（Ctrl-C）。"
_i18n_set en init.onboard_agent_exited "Agent '%s' exited with code %s."
_i18n_set zh init.onboard_agent_exited "agent '%s' 异常退出 (code %s)。"
_i18n_set en init.onboard_next_step "Next step  下一步:"
_i18n_set zh init.onboard_next_step "下一步  Next step:"
_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_retry_en "retry the same agent:   roll init"
_i18n_set zh init.onboard_retry_en "retry the same 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"
_i18n_set en init.onboard_switch_en "switch to another:      ROLL_ONBOARD_AGENT=<name> roll init"
_i18n_set zh init.onboard_switch_en "switch to another:      ROLL_ONBOARD_AGENT=<name> roll init"

_i18n_set en init.no_templates_found_run_roll_setup "No templates found. Run 'roll setup' first."
_i18n_set zh init.no_templates_found_run_roll_setup "未找到模板，请先运行 'roll setup'。"
_i18n_set en init.unknown_flag_1 "Unknown flag: %s"
_i18n_set zh init.unknown_flag_1 "未知参数: %s"
_i18n_set en init.no_templates_found_run_roll_setup_2 "No templates found. Run 'roll setup' first."
_i18n_set zh init.no_templates_found_run_roll_setup_2 "未找到模板，请先运行 'roll setup'。"
_i18n_set en init.detected_legacy_project "Detected: legacy project (%s)"
_i18n_set zh init.detected_legacy_project "检测到遗留项目"
_i18n_set en init.onboarding "  Onboarding"
_i18n_set zh init.onboarding "需要一个 AI agent 来读懂这个项目。检测到："
_i18n_set en init.launching "Launching %s…"
_i18n_set zh init.launching "正在启动 %s…"
_i18n_set en init.no_input_received_aborting_onboard "No input received. Aborting onboard."
_i18n_set zh init.no_input_received_aborting_onboard "未收到输入，已取消 onboard。"
_i18n_set en init.invalid_choice "Invalid choice: '%s'."
_i18n_set zh init.invalid_choice "无效选择。"
_i18n_set en init.agent_has_no_interactive_mode_wired "Agent '%s' has no interactive mode wired up.  agent '%s'"
_i18n_set zh init.agent_has_no_interactive_mode_wired "暂未接入 interactive 模式。"
_i18n_set en init.agent "agent"
_i18n_set zh init.agent "正常退出但未生成 .roll/onboard-plan.yaml。"
_i18n_set en init.plan_written_running_apply "Plan written. Running apply…"
_i18n_set zh init.plan_written_running_apply "已写入 plan，正在执行 apply…"
_i18n_set en init.no_onboard_plan_found_at_roll "No onboard plan found at .roll/onboard-plan.yaml"
_i18n_set zh init.no_onboard_plan_found_at_roll "未找到 onboard 计划。"
_i18n_set en init.plan_validator_missing "Plan validator missing: %s"
_i18n_set zh init.plan_validator_missing "校验器缺失。"
_i18n_set en init.plan_validation_failed_see_errors_above "Plan validation failed. See errors above.  Plan"
_i18n_set zh init.plan_validation_failed_see_errors_above "校验失败。"
_i18n_set en init.applying_onboard_plan "Applying onboard plan..."
_i18n_set zh init.applying_onboard_plan "正在应用 onboard 计划..."
_i18n_set en init.added_roll_to_gitignore "Added Roll runtime ignores to .gitignore"
_i18n_set zh init.added_roll_to_gitignore "已将 Roll 运行时忽略项加入 .gitignore"
_i18n_set en init.syncing_conventions_to_ai_tools "Syncing conventions to AI tools..."
_i18n_set zh init.syncing_conventions_to_ai_tools "正在同步约定到 AI 工具..."
_i18n_set en init.onboard_apply_complete_onboard "Onboard apply complete.  Onboard"
_i18n_set zh init.onboard_apply_complete_onboard "应用完成。"

# US-ONBOARD-017: render the three analysis sections + gated BACKLOG seeding.
_i18n_set en init.onboard_rendered "Rendered: %s"
_i18n_set zh init.onboard_rendered "已生成：%s"
_i18n_set en init.onboard_render_failed "Could not render analysis markdown (skipping); onboard continues."
_i18n_set zh init.onboard_render_failed "分析 markdown 生成失败（已跳过），onboard 继续。"
_i18n_set en init.onboard_seed_preview_story "About to seed %s candidate stories to BACKLOG:"
_i18n_set zh init.onboard_seed_preview_story "准备向 BACKLOG 播种 %s 条候选 story："
_i18n_set en init.onboard_seed_preview_fix "About to seed %s HIGH-severity risks as FIX entries:"
_i18n_set zh init.onboard_seed_preview_fix "准备将 %s 条高严重度风险播种为 FIX 条目："
_i18n_set en init.onboard_seed_prompt "Seed these to BACKLOG?"
_i18n_set zh init.onboard_seed_prompt "把这些播种到 BACKLOG 吗？"
_i18n_set en init.onboard_seed_cancelled "Seeding cancelled. The analysis markdown was still generated."
_i18n_set zh init.onboard_seed_cancelled "已取消播种。分析 markdown 仍已生成。"
_i18n_set en init.onboard_seed_noninteractive "Non-interactive stdin — skipping BACKLOG seeding (markdown still generated)."
_i18n_set zh init.onboard_seed_noninteractive "stdin 非交互 —— 跳过 BACKLOG 播种（markdown 仍已生成）。"
_i18n_set en init.onboard_seeded_stories "Seeded %s candidate stories to BACKLOG."
_i18n_set zh init.onboard_seeded_stories "已向 BACKLOG 播种 %s 条候选 story。"
_i18n_set en init.onboard_seeded_fixes "Seeded %s candidate FIX entries to BACKLOG."
_i18n_set zh init.onboard_seeded_fixes "已向 BACKLOG 播种 %s 条候选 FIX。"
_i18n_set en init.onboard_seed_no_backlog "No .roll/backlog.md (backlog scope not approved) — skipping seeding."
_i18n_set zh init.onboard_seed_no_backlog "无 .roll/backlog.md（未批准 backlog scope）—— 跳过播种。"

_i18n_set en init.no_ai_agent_detected_install_one "No AI agent detected. Install one (e.g., claude, codex, kimi) and try again."
_i18n_set zh init.no_ai_agent_detected_install_one "未检测到 AI agent。请先安装 (如 claude / codex / kimi) 后重试。"
_i18n_set en init.the_process_will_use_your_agent "The process will use your agent to call models. Token cost is on your own account."
_i18n_set zh init.the_process_will_use_your_agent "  后续过程会使用你的 agent 调用模型，token 消耗在你自己的账户上。"
_i18n_set en init.code_and_conversations_stay_in_your "Code and conversations stay in your agent tool — Roll does not upload anything."
_i18n_set zh init.code_and_conversations_stay_in_your "  代码与对话都留在你的 agent 工具里 —— Roll 本身不上传任何内容。"
_i18n_set en init.use_exit_to_end_or_ctrl "Use /exit to end (or Ctrl-C). Roll will auto-apply after exit."
_i18n_set zh init.use_exit_to_end_or_ctrl "  在 agent 内用 /exit 结束（或 Ctrl-C）。退出后 Roll 会自动衔接 apply。"
_i18n_set en init.pick_an_agent "Pick an agent:"
_i18n_set zh init.pick_an_agent "  选一个 agent  Pick an agent:"
_i18n_set en init.en_roll_init "[EN:  对话完成后再次运行 \`roll init\` 即可。...]"
_i18n_set zh init.en_roll_init "  对话完成后再次运行 \`roll init\` 即可。"
_i18n_set en init.en_ai_agent_onboard_plan_ap "[EN:  请先在 AI agent 里运行 \%s-onboard 生成 plan，再回来执行 ap...]"
_i18n_set zh init.en_ai_agent_onboard_plan_ap "  请先在 AI agent 里运行 \%s-onboard 生成 plan，再回来执行 apply。"
