// en/admin_translations — Translation admin dashboard, override editor, TM review, backfill
export const admin_translations = {
  // Dashboard
  title: 'Translations',
  page_subtitle: 'Manage automatic deal translations',
  cross_link_languages: 'To add languages or change language settings, go to Languages →',
  col_deal: 'Deal',
  col_locale: 'Locale',
  col_status: 'Status',
  col_attempt: 'Attempts',
  col_cost: 'API cost ($)',
  col_created: 'Created',
  counter_pending: 'Queued',
  counter_running: 'Translating',
  counter_done: 'Done',
  counter_failed: 'Failed',
  status_all: 'All',
  status_pending: 'Queued',
  status_running: 'Translating',
  status_done: 'Done',
  status_failed: 'Failed',
  selected: 'selected',
  bulk_retry: 'Retry selected translations',
  bulk_retry_error: 'Failed to retry selected translations',
  load_more: 'Load more',
  search_placeholder: 'Search by deal title…',
  load_error: 'Failed to load translation jobs. Try again.',

  // Override editor
  locale_tabs_label: 'Locale tabs',
  field_title: 'Title',
  field_description: 'Description',
  field_specialInstructions: 'Special instructions',
  source_value: 'Source text ({language})',
  source_value_fallback: 'Source text',
  translated_value: 'Translation ({language})',
  lock_as_manual: 'Manual edit (blocks auto-translation)',
  save_override: 'Save',
  saving: 'Saving…',
  cancel: 'Cancel',
  status_ok_badge: 'Translated',
  status_stale_badge: 'Out of date — source changed',
  status_failed_badge: 'Translation failed',
  slug_label: 'URL slug:',
  stale_tab_aria: 'The source was edited after translation — this locale is out of date',
  lock_manual_tooltip:
    'On: your text is saved and never overwritten by auto-translation. Off: auto-translation manages this field',
  status_stale_tooltip:
    'Editing the source deal marks the translation out of date until re-translated',
  status_failed_tooltip:
    'The auto-translation job failed — retry from the Translations screen, or edit manually',
  empty_state:
    'No translations for this deal yet. Translations are created automatically, or via "Translate missing deals" on the Translations screen.',
  translated_at: 'Last translated: {date}',
  page_title_deal: 'Translation — {title} — Admin',

  // Slug regenerate
  regen_slug: 'Regenerate URL',
  regen_slug_title: 'Generate a new URL for this deal?',
  regen_slug_description:
    'A new URL will be generated from the translated title. The old URL will permanently redirect (301) to it, so existing links keep working. This cannot be undone.',
  regen_slug_tooltip:
    'Generates a new URL from the translated title; the old URL permanently redirects (301)',
  confirm_regen: 'Regenerate',

  // TM review
  translations_memory_title: 'Translation Memory',
  translations_memory_subtitle: 'Rate cached translations and remove bad ones from the cache',
  tm_col_locale_pair: 'Locale pair',
  tm_col_source: 'Source',
  tm_col_translation: 'Translation',
  tm_col_usage: 'Times reused',
  tm_col_quality: 'Quality',
  tm_col_actions: 'Actions',
  tm_score_aria: 'Set quality score',
  tm_score_btn_aria: 'Rate {score} out of 5',
  tm_evict: 'Remove from memory',
  tm_filter_label: 'Filter TM',
  tm_filter_recent: 'Recently used',
  'tm_filter_low-quality': 'Low score (1–2)',
  'tm_filter_most-reused': 'Most reused',
  tm_not_rated: 'Not rated',
  tm_empty_title: 'Translation memory is empty',
  tm_empty_desc:
    'Entries are added automatically on every translation run. Try another filter or check back after the next run.',
  tm_load_error: "Couldn't load translation memory. Try refreshing.",
  quality_header_tooltip:
    '1 = poor, 5 = excellent. Green: 4–5, red: 1, grey: 2–3 or not rated. Low-scored entries are candidates for removal.',
  usage_header_tooltip:
    'How many times this cached translation was reused instead of calling the model. High count = big savings, but also wide impact if the translation is wrong.',
  evict_tooltip:
    'Permanently deletes this cached translation; the content is re-translated on the next run.',
  locale_pair_tooltip: 'Source language → target language',

  // Backfill
  backfill_title: 'Translate missing deals',
  backfill_description:
    'Only deals missing a translation in the target locale will be translated. Already-translated deals are skipped.',
  backfill_locale: 'Target locale',
  backfill_rate: 'Translation rate (deals per minute)',
  per_min: '/ min',
  loading_estimate: 'Estimating cost…',
  deals: 'deals',
  estimated_time: 'Estimated time',
  minutes: 'min',
  estimate_line: 'Estimated cost: ${cost} · {deals} deals · ~{chars} chars per deal',
  backfill_running: 'Backfill running for',
  backfill_progress_aria: 'Backfill progress',
  progress_line: '{done}/{total} done · {failed} failed · Time left: ~{minutes} min',
  done: 'done',
  failed: 'failed',
  pause: 'Pause',
  start_backfill: 'Start backfill',
  starting: 'Starting…',
  close_keep_running: 'Close (run continues in background)',
  backfill_tooltip:
    'Finds deals missing a translation in the target locale and queues them for machine translation. A cost estimate is shown before starting.',
  rate_tooltip:
    'Higher rates finish sooner but put more load on the translation provider and may hit rate limits. Default: 60.',
  cost_col_tooltip:
    'Actual translation cost in USD as billed by the AI provider. Not a customer-facing charge.',
  attempts_col_tooltip:
    'Number of attempts made for this job. Failed jobs retry automatically up to 3 times.',
  pending_tile_tooltip: 'Jobs queued and not yet started.',
  running_tile_tooltip: 'Jobs currently sent to the translation provider. Accruing cost.',
  lang_he: 'Hebrew',
  lang_en: 'English',

  tab_deals: 'Deals',
  tab_memory: 'Translation Memory',
  tabs_aria_label: 'Translations tabs',
} as const;
