/** Copy dictionaries for the Models settings section. */

import { WELCOME_NOTICE_COPY } from '../onboarding-copy.ts'

/** English strings (the key-set source of truth for this pair). */
export const en = {
  nav: 'Models',
  title: 'Models',
  intro: 'Enter your API keys to use models from the following providers.',
  edit: 'Edit',
  editProvider: 'Edit {provider}',
  remove: 'Delete',
  removeProvider: 'Delete {provider}',
  deleteTitle: 'Delete {provider}?',
  deleteDescription: 'Deleting {provider} removes its configuration. Any credential it uses is managed elsewhere and will be kept.',
  deleteDescriptionWithCredential: 'Deleting {provider} removes its configuration and stored API key.',
  deleteConfirm: 'Delete {provider}',
  deleting: 'Deleting {provider}…',
  add: 'Add provider',
  provider: 'Provider',
  close: 'Close',
  cancel: 'Cancel',
  apply: 'Apply',
  applying: 'Applying…',
  savedProvider: 'Saved {provider}.',
  credentialConfigured: 'API key configured',
  credentialMissing: 'API key missing',
  readOnly: 'The settings document is read-only in this deployment.',
  loadFailed: 'Loading the provider directory failed',
  conflict: 'Someone else changed these settings while this card was open. Close it and reopen to edit the current values.',
  retry: 'Retry',
  keyInput: 'API key',
  keyPlaceholder: 'Enter your API key',
  keyPlaceholderNative: 'Enter an API key, or leave blank to use environment authentication',
  keyStored: 'Configured — enter a new value to replace',
  keyEnvLocked: 'Provided by the launch environment (read-only)',
  customized: 'Customized settings',
  baseUrl: 'Base URL',
  baseUrlDefault: 'Provider default',
  models: 'Models',
  modelsInherited: 'Using the adapter defaults',
  modelsCustomized: 'Customized model catalog',
  resetModels: 'Restore defaults',
  model: 'Model',
  modelId: 'Model ID',
  modelName: 'Display name',
  modelNamePlaceholder: 'Uses the model ID when empty',
  contextWindow: 'Context window',
  contextWindowPlaceholder: 'Uses the provider default',
  maxTokens: 'Max output tokens',
  maxTokensPlaceholder: 'Uses the provider default',
  modelAdvanced: 'Capacities',
  addModel: 'Add model',
  removeModel: 'Delete model',
  modelsEmpty: 'No models will be shown in the selector. Unlisted IDs can still be sent directly.',
  keyBlank: 'Enter the API key, or leave the field empty to keep the stored one.',
  keyBlankNew: 'Enter the API key, or leave the field empty if this provider authenticates another way.',
  keyIllegalCharacters: 'This API key is not in a valid format. Please check it.',
  modelIdRequired: 'Model ID is required.',
  modelIdDuplicate: 'Model ID must be unique.',
  modelNameInvalid: 'Display name cannot be empty.',
  modelContextInvalid: 'Context window must be a positive count, like 131072, 256K, or 1M.',
  modelMaxTokensInvalid: 'Max output tokens must be a positive count, like 8192, 64K, or 1M.',
  advancedHint: 'Other fields live in settings.yaml; edit that section directly.',
  modelCapacityInvalid: 'A capacity must be a number, optionally suffixed K or M.',
  modelDuplicate: 'Each model ID may appear once.',
  modelContextWindow: 'Context window',
  modelMaxTokens: 'Max output tokens',
  fetchModels: 'Fetch available models',
  fetching: 'Asking the provider\u2026',
  fetchNeedsBaseUrl: 'Enter the base URL first, then fetch.',
  fetchEmpty: 'The provider listed no models. Add them by hand.',
  fetchTitle: 'Choose models to add',
  fetchDescription: 'These are the models this provider has available. Choose the ones to add.',
  fetchAdopt: 'Add selected',
  customAdd: 'Add a custom provider',
  customTitle: 'Custom provider',
  customTag: 'Custom',
  customRoute: 'Provider ID',
  customRouteHint: 'Lowercase identifier, starting with a letter, that uniquely names this provider in requests and as its credential name.',
  customRouteInvalid: 'Start with a lowercase letter; then lowercase letters, digits, and dashes.',
  customRouteTaken: 'A provider already uses this ID.',
  customDisplayName: 'Display name',
  customApi: 'API protocol',
  customApiUnset: 'Not selected',
  customNeedsBaseUrl: 'A custom provider needs a base URL.',
  customNeedsModels: 'A custom provider needs at least one model.',
  create: 'Create provider',
  creating: 'Creating\u2026',
  welcomeTitle: WELCOME_NOTICE_COPY.en.title,
  welcomeBody: WELCOME_NOTICE_COPY.en.body,
  welcomeContinue: WELCOME_NOTICE_COPY.en.continueLabel,
  welcomeError: 'The acknowledgement could not be saved. Please try again.',
  onboardingTitle: 'Add an API key to get started',
  onboardingDescription: 'Configure the official DeepSeek provider to start building.',
  onboardingLater: 'Configure later',
  onboardingSave: 'Save and continue',
  onboardingSaving: 'Saving…',
  keyRequired: 'Enter an API key to continue.',
}

/** The settings.models namespace key union. */
export type ModelsKey = keyof typeof en

/** Chinese strings (same keys as {@link en}). */
export const zh: { [Key in keyof typeof en]: string } = {
  nav: '模型',
  title: '模型',
  intro: '填入各提供方的 API 密钥即可使用其模型。',
  edit: '编辑',
  editProvider: '编辑 {provider}',
  remove: '删除',
  removeProvider: '删除 {provider}',
  deleteTitle: '删除 {provider}？',
  deleteDescription: '删除 {provider} 会移除其配置；其使用的凭证（如有）由其他位置管理，将会保留。',
  deleteDescriptionWithCredential: '删除 {provider} 会移除其配置和存储的 API 密钥。',
  deleteConfirm: '删除 {provider}',
  deleting: '正在删除 {provider}…',
  add: '添加提供方',
  provider: '提供方',
  close: '关闭',
  cancel: '取消',
  apply: '保存',
  applying: '保存中…',
  savedProvider: '已保存 {provider}。',
  credentialConfigured: 'API 密钥已配置',
  credentialMissing: 'API 密钥缺失',
  readOnly: '当前部署的设置文档为只读。',
  loadFailed: '加载提供方目录失败',
  conflict: '这张卡片打开期间，这些设置已被其他地方改动。请关闭后重新打开，在当前值上编辑。',
  retry: '重试',
  keyInput: 'API 密钥',
  keyPlaceholder: '输入 API 密钥',
  keyPlaceholderNative: '输入 API 密钥，或留空使用环境认证',
  keyStored: '已配置——输入新值可替换',
  keyEnvLocked: '由启动环境提供（只读）',
  customized: '自定义设置',
  baseUrl: 'API 地址',
  baseUrlDefault: '提供方默认',
  models: '模型目录',
  modelsInherited: '正在使用适配器默认模型',
  modelsCustomized: '已自定义模型目录',
  resetModels: '恢复默认模型',
  model: '模型',
  modelId: '模型 ID',
  modelName: '显示名称',
  modelNamePlaceholder: '留空时使用模型 ID',
  contextWindow: '上下文窗口',
  contextWindowPlaceholder: '使用提供方默认值',
  maxTokens: '最大输出 token 数',
  maxTokensPlaceholder: '使用提供方默认值',
  modelAdvanced: '容量',
  addModel: '添加模型',
  removeModel: '删除模型',
  modelsEmpty: '模型选择器中将不显示任何模型；目录外 ID 仍可直接发送。',
  keyBlank: '请输入 API 密钥；留空则保持已存储的密钥。',
  keyBlankNew: '请输入 API 密钥；若该提供方以其他方式鉴权，可以留空。',
  keyIllegalCharacters: '该 API 密钥格式错误，请检查。',
  modelIdRequired: '模型 ID 不能为空。',
  modelIdDuplicate: '模型 ID 不能重复。',
  modelNameInvalid: '显示名称不能为空。',
  modelContextInvalid: '上下文窗口必须是正数，例如 131072、256K 或 1M。',
  modelMaxTokensInvalid: '最大输出 token 数必须是正数，例如 8192、64K 或 1M。',
  advancedHint: '其余字段在 settings.yaml 中，请直接编辑对应段。',
  modelCapacityInvalid: '容量需为数字，可加 K 或 M 后缀。',
  modelDuplicate: '每个模型 ID 只能出现一次。',
  modelContextWindow: '上下文窗口',
  modelMaxTokens: '最大输出 token',
  fetchModels: '获取可用模型',
  fetching: '正在询问提供方\u2026',
  fetchNeedsBaseUrl: '请先填写 API 地址，再获取。',
  fetchEmpty: '该提供方没有列出任何模型，请手动添加。',
  fetchTitle: '选择要添加的模型',
  fetchDescription: '以下是模型提供方的可用模型，勾选要添加的模型。',
  fetchAdopt: '添加所选',
  customAdd: '添加自定义提供方',
  customTitle: '自定义提供方',
  customTag: '自定义',
  customRoute: 'Provider ID',
  customRouteHint: '以小写字母开头的标识，在请求中唯一标识该提供方，并用于派生凭据名。',
  customRouteInvalid: '需以小写字母开头，之后可用小写字母、数字和短横线。',
  customRouteTaken: '已有提供方使用了这个 ID。',
  customDisplayName: '显示名称',
  customApi: 'API 协议',
  customApiUnset: '未选择',
  customNeedsBaseUrl: '自定义提供方需要填写 API 地址。',
  customNeedsModels: '自定义提供方至少需要一个模型。',
  create: '创建提供方',
  creating: '创建中\u2026',
  welcomeTitle: WELCOME_NOTICE_COPY.zh.title,
  welcomeBody: WELCOME_NOTICE_COPY.zh.body,
  welcomeContinue: WELCOME_NOTICE_COPY.zh.continueLabel,
  welcomeError: '暂时无法保存确认状态，请重试。',
  onboardingTitle: '添加一个 API Key 开始使用',
  onboardingDescription: '配置 DeepSeek 官方模型，即可开始使用。',
  onboardingLater: '稍后配置',
  onboardingSave: '保存并继续',
  onboardingSaving: '保存中…',
  keyRequired: '请输入 API 密钥后继续。',
}
