import type { TranslationMap } from "../lib/types.ts";

export const en: TranslationMap = {
  common: {
    version: "Version",
    health: "Health",
    ok: "OK",
    offline: "Offline",
    connect: "Connect",
    refresh: "Refresh",
    enabled: "Enabled",
    disabled: "Disabled",
    na: "n/a",
    docs: "Docs",
    resources: "Resources",
  },
  nav: {
    chat: "Chat",
    control: "Control",
    agent: "Agent",
    settings: "Settings",
    expand: "Expand sidebar",
    collapse: "Collapse sidebar",
  },
  tabs: {
    agents: "Agents",
    overview: "Overview",
    channels: "Channels",
    instances: "Instances",
    sessions: "Sessions",
    usage: "Usage",
    cron: "Cron Jobs",
    skills: "Skills",
    nodes: "Nodes",
    chat: "Chat",
    config: "Config",
    debug: "Debug",
    logs: "Logs",
  },
  subtitles: {
    agents: "Manage agent workspaces, tools, and identities.",
    overview: "Gateway status, entry points, and a fast health read.",
    channels: "Manage channels and settings.",
    instances: "Presence beacons from connected clients and nodes.",
    sessions: "Inspect active sessions and adjust per-session defaults.",
    usage: "Monitor API usage and costs.",
    cron: "Schedule wakeups and recurring agent runs.",
    skills: "Manage skill availability and API key injection.",
    nodes: "Paired devices, capabilities, and command exposure.",
    chat: "Direct gateway chat session for quick interventions.",
    config: "Edit ~/.openclaw/openclaw.json safely.",
    debug: "Gateway snapshots, events, and manual RPC calls.",
    logs: "Live tail of the gateway file logs.",
  },
  overview: {
    access: {
      title: "Gateway Access",
      subtitle: "Where the dashboard connects and how it authenticates.",
      wsUrl: "WebSocket URL",
      token: "Gateway Token",
      password: "Password (not stored)",
      sessionKey: "Default Session Key",
      language: "Language",
      connectHint: "Click Connect to apply connection changes.",
      trustedProxy: "Authenticated via trusted proxy.",
    },
    snapshot: {
      title: "Snapshot",
      subtitle: "Latest gateway handshake information.",
      status: "Status",
      uptime: "Uptime",
      tickInterval: "Tick Interval",
      lastChannelsRefresh: "Last Channels Refresh",
      channelsHint: "Use Channels to link WhatsApp, Telegram, Discord, Signal, or iMessage.",
    },
    stats: {
      instances: "Instances",
      instancesHint: "Presence beacons in the last 5 minutes.",
      sessions: "Sessions",
      sessionsHint: "Recent session keys tracked by the gateway.",
      cron: "Cron",
      cronNext: "Next wake {time}",
    },
    notes: {
      title: "Notes",
      subtitle: "Quick reminders for remote control setups.",
      tailscaleTitle: "Tailscale serve",
      tailscaleText: "Prefer serve mode to keep the gateway on loopback with tailnet auth.",
      sessionTitle: "Session hygiene",
      sessionText: "Use /new or sessions.patch to reset context.",
      cronTitle: "Cron reminders",
      cronText: "Use isolated sessions for recurring runs.",
    },
    auth: {
      required: "This gateway requires auth. Add a token or password, then click Connect.",
      failed:
        "Auth failed. Re-copy a tokenized URL with {command}, or update the token, then click Connect.",
    },
    pairing: {
      hint: "This device needs pairing approval from the gateway host.",
      mobileHint:
        "On mobile? Copy the full URL (including #token=...) from openclaw dashboard --no-open on your desktop.",
    },
    insecure: {
      hint: "This page is HTTP, so the browser blocks device identity. Use HTTPS (Tailscale Serve) or open {url} on the gateway host.",
      stayHttp: "If you must stay on HTTP, set {config} (token-only).",
    },
  },
  chat: {
    disconnected: "Disconnected from gateway.",
    refreshTitle: "Refresh chat data",
    thinkingToggle: "Toggle assistant thinking/working output",
    focusToggle: "Toggle focus mode (hide sidebar + page header)",
    hideCronSessions: "Hide cron sessions",
    showCronSessions: "Show cron sessions",
    showCronSessionsHidden: "Show cron sessions ({count} hidden)",
    onboardingDisabled: "Disabled during onboarding",
  },
  languages: {
    en: "English",
    zhCN: "简体中文 (Simplified Chinese)",
    zhTW: "繁體中文 (Traditional Chinese)",
    ptBR: "Português (Brazilian Portuguese)",
    de: "Deutsch (German)",
  },
  cron: {
    summary: {
      enabled: "Enabled",
      yes: "Yes",
      no: "No",
      jobs: "Jobs",
      nextWake: "Next wake",
      refreshing: "Refreshing...",
      refresh: "Refresh",
    },
    jobs: {
      title: "Jobs",
      subtitle: "All scheduled jobs stored in the gateway.",
      shownOf: "{shown} shown of {total}",
      searchJobs: "Search jobs",
      searchPlaceholder: "Name, description, or agent",
      enabled: "Enabled",
      schedule: "Schedule",
      lastRun: "Last run",
      all: "All",
      sort: "Sort",
      nextRun: "Next run",
      recentlyUpdated: "Recently updated",
      name: "Name",
      direction: "Direction",
      ascending: "Ascending",
      descending: "Descending",
      reset: "Reset",
      noMatching: "No matching jobs.",
      loading: "Loading...",
      loadMore: "Load more jobs",
    },
    runs: {
      title: "Run history",
      subtitleAll: "Latest runs across all jobs.",
      subtitleJob: "Latest runs for {title}.",
      scope: "Scope",
      allJobs: "All jobs",
      selectedJob: "Selected job",
      searchRuns: "Search runs",
      searchPlaceholder: "Summary, error, or job",
      newestFirst: "Newest first",
      oldestFirst: "Oldest first",
      status: "Status",
      delivery: "Delivery",
      clear: "Clear",
      allStatuses: "All statuses",
      allDelivery: "All delivery",
      selectJobHint: "Select a job to inspect run history.",
      noMatching: "No matching runs.",
      loadMore: "Load more runs",
      runStatusOk: "OK",
      runStatusError: "Error",
      runStatusSkipped: "Skipped",
      runStatusUnknown: "Unknown",
      deliveryDelivered: "Delivered",
      deliveryNotDelivered: "Not delivered",
      deliveryUnknown: "Unknown",
      deliveryNotRequested: "Not requested",
    },
    form: {
      editJob: "Edit Job",
      newJob: "New Job",
      updateSubtitle: "Update the selected scheduled job.",
      createSubtitle: "Create a scheduled wakeup or agent run.",
      required: "Required",
      requiredSr: "required",
      basics: "Basics",
      basicsSub: "Name it, choose the assistant, and set enabled state.",
      fieldName: "Name",
      description: "Description",
      agentId: "Agent ID",
      namePlaceholder: "Morning brief",
      descriptionPlaceholder: "Optional context for this job",
      agentPlaceholder: "main or ops",
      agentHelp: "Start typing to pick a known agent, or enter a custom one.",
      schedule: "Schedule",
      scheduleSub: "Control when this job runs.",
      every: "Every",
      at: "At",
      cronOption: "Cron",
      runAt: "Run at",
      unit: "Unit",
      minutes: "Minutes",
      hours: "Hours",
      days: "Days",
      expression: "Expression",
      expressionPlaceholder: "0 7 * * *",
      everyAmountPlaceholder: "30",
      timezoneOptional: "Timezone (optional)",
      timezonePlaceholder: "America/Los_Angeles",
      timezoneHelp: "Pick a common timezone or enter any valid IANA timezone.",
      jitterHelp: "Need jitter? Use Advanced → Stagger window / Stagger unit.",
      execution: "Execution",
      executionSub: "Choose when to wake, and what this job should do.",
      session: "Session",
      main: "Main",
      isolated: "Isolated",
      sessionHelp: "Main posts a system event. Isolated runs a dedicated agent turn.",
      wakeMode: "Wake mode",
      now: "Now",
      nextHeartbeat: "Next heartbeat",
      wakeModeHelp: "Now triggers immediately. Next heartbeat waits for the next cycle.",
      payloadKind: "What should run?",
      systemEvent: "Post message to main timeline",
      agentTurn: "Run assistant task (isolated)",
      systemEventHelp:
        "Sends your text to the gateway main timeline (good for reminders/triggers).",
      agentTurnHelp: "Starts an assistant run in its own session using your prompt.",
      timeoutSeconds: "Timeout (seconds)",
      timeoutPlaceholder: "Optional, e.g. 90",
      timeoutHelp:
        "Optional. Leave blank to use the gateway default timeout behavior for this run.",
      mainTimelineMessage: "Main timeline message",
      assistantTaskPrompt: "Assistant task prompt",
      deliverySection: "Delivery",
      deliverySub: "Choose where run summaries are sent.",
      resultDelivery: "Result delivery",
      announceDefault: "Announce summary (default)",
      webhookPost: "Webhook POST",
      noneInternal: "None (internal)",
      deliveryHelp: "Announce posts a summary to chat. None keeps execution internal.",
      webhookUrl: "Webhook URL",
      channel: "Channel",
      webhookPlaceholder: "https://example.com/cron",
      channelHelp: "Choose which connected channel receives the summary.",
      webhookHelp: "Send run summaries to a webhook endpoint.",
      to: "To",
      toPlaceholder: "+1555... or chat id",
      toHelp: "Optional recipient override (chat id, phone, or user id).",
      advanced: "Advanced",
      advancedHelp:
        "Optional overrides for delivery guarantees, schedule jitter, and model controls.",
      deleteAfterRun: "Delete after run",
      deleteAfterRunHelp: "Best for one-shot reminders that should auto-clean up.",
      clearAgentOverride: "Clear agent override",
      clearAgentHelp: "Force this job to use the gateway default assistant.",
      exactTiming: "Exact timing (no stagger)",
      exactTimingHelp: "Run on exact cron boundaries with no spread.",
      staggerWindow: "Stagger window",
      staggerUnit: "Stagger unit",
      staggerPlaceholder: "30",
      seconds: "Seconds",
      model: "Model",
      modelPlaceholder: "openai/gpt-5.2",
      modelHelp: "Start typing to pick a known model, or enter a custom one.",
      thinking: "Thinking",
      thinkingPlaceholder: "low",
      thinkingHelp: "Use a suggested level or enter a provider-specific value.",
      bestEffortDelivery: "Best effort delivery",
      bestEffortHelp: "Do not fail the job if delivery itself fails.",
      cantAddYet: "Can't add job yet",
      fillRequired: "Fill the required fields below to enable submit.",
      fixFields: "Fix {count} field to continue.",
      fixFieldsPlural: "Fix {count} fields to continue.",
      saving: "Saving...",
      saveChanges: "Save changes",
      addJob: "Add job",
      cancel: "Cancel",
    },
    jobList: {
      allJobs: "all jobs",
      selectJob: "(select a job)",
      enabled: "enabled",
      disabled: "disabled",
      edit: "Edit",
      clone: "Clone",
      disable: "Disable",
      enable: "Enable",
      run: "Run",
      history: "History",
      remove: "Remove",
    },
    jobDetail: {
      system: "System",
      prompt: "Prompt",
      delivery: "Delivery",
      agent: "Agent",
    },
    jobState: {
      status: "Status",
      next: "Next",
      last: "Last",
    },
    runEntry: {
      noSummary: "No summary.",
      runAt: "Run at",
      openRunChat: "Open run chat",
      next: "Next {rel}",
      due: "Due {rel}",
    },
    errors: {
      nameRequired: "Name is required.",
      scheduleAtInvalid: "Enter a valid date/time.",
      everyAmountInvalid: "Interval must be greater than 0.",
      cronExprRequired: "Cron expression is required.",
      staggerAmountInvalid: "Stagger must be greater than 0.",
      systemTextRequired: "System text is required.",
      agentMessageRequired: "Agent message is required.",
      timeoutInvalid: "If set, timeout must be greater than 0 seconds.",
      webhookUrlRequired: "Webhook URL is required.",
      webhookUrlInvalid: "Webhook URL must start with http:// or https://.",
      invalidRunTime: "Invalid run time.",
      invalidIntervalAmount: "Invalid interval amount.",
      cronExprRequiredShort: "Cron expression required.",
      invalidStaggerAmount: "Invalid stagger amount.",
      systemEventTextRequired: "System event text required.",
      agentMessageRequiredShort: "Agent message required.",
      nameRequiredShort: "Name required.",
    },
  },
};
