Skip to content

DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.

9.4 KB
Raw Blame
import { defineLocale } from 'dsh-tauri/client'
import { PLUGIN_ID } from '../constants'

const zh = {
  extension: '插件扩展',
  pluginsTab: '插件',
  pluginsBack: '回退',
  skillsTab: '技能',
  mcpTab: 'MCP',
  skillsTitle: '技能管理',
  skillsIntro: '查看与编辑 dsh 发现的技能;用户级与仓库技能可就地管理。卡片开关控制技能是否加载。',
  newSkill: '新建技能',
  importRepository: '导入仓库',
  importRepositoryTitle: '导入 GitHub 技能仓库',
  importRepositoryHint: '输入 GitHub URL 或 owner/repo。',
  importRepositoryPlaceholder: 'owner/repo',
  importRepositoryInvalid: '请输入有效的 GitHub URL 或 owner/repo。',
  workspaceUnavailable: '没有可用工作区,无法启动技能创建器。请先打开或连接一个工作区。',
  skillCreatorFailed: '无法启动技能创建器',
  editSkill: '编辑技能',
  viewSkill: '查看技能',
  skillName: '名称(kebab-case)',
  skillDescription: '描述',
  skillWhenToUse: '使用时机(可选)',
  skillContent: '正文(Markdown)',
  skillPreview: 'Markdown 预览',
  skillPlainText: '纯文本',
  modelInvocable: '允许模型调用',
  userInvocable: '允许用户 / 调用',
  save: '保存',
  cancel: '取消',
  delete: '删除',
  edit: '编辑',
  view: '查看',
  close: '关闭',
  emptySkills: '还没有发现任何技能',
  loading: '载入中…',
  source: '来源',
  sourceProjectDsh: '项目',
  sourceProjectAgents: '项目',
  sourceUserDsh: '用户',
  sourceUserAgents: '用户',
  sourceRuntime: '运行时',
  sourceBundled: '内置',
  sourceCustom: '自定义',
  confirmDelete: '确认删除技能?',
  deleteWarn: '将删除整个用户技能目录,此操作不可撤销。',
  searchSkills: '搜索技能名称或描述',
  filterAll: '全部',
  noMatch: '没有匹配的技能',
  refresh: '刷新',
  skillDisabled: '已停用',
  skillUserOnly: '仅用户可用',
  skillModelOnly: '仅模型可用',
  toggleSkill: '切换技能加载',
  toggleSkillHint: '停用会同时禁止模型与用户调用;开启恢复默认策略。',
  openFolder: '打开目录',
  openUserSkills: '打开技能目录',
  repository: '仓库',
  githubRepository: '在 GitHub 打开仓库',
  mcpTitle: 'MCP 服务器',
  mcpIntro: '管理 profile 中的 MCP 服务器。改动写入 profile 配置:宿主支持热加载时立即生效,否则需重启 dsh。',
  addServer: '添加服务器',
  editServer: '编辑服务器',
  serverName: '服务器名(工具名前缀)',
  transport: '传输方式',
  transportStdio: 'stdio(本地命令)',
  transportHttp: 'streamable-http(URL)',
  command: '命令',
  args: '参数(每行一个)',
  envPairs: '环境变量(每行 KEY=VALUE)',
  url: 'URL',
  headersPairs: '请求头(每行 KEY: VALUE)',
  disabled: '已停用',
  enabled: '启用中',
  toggle: '停用/启用',
  confirmRemove: '确认移除该服务器?',
  removeWarn: '将从 profile 配置中移除这一行,其工具随之卸载。',
  emptyMcp: '还没有配置 MCP 服务器',
  importServers: '从其他 Agent 导入',
  importIntro: '扫描 Claude Code 与 Codex 的 MCP 配置,勾选后导入。',
  importEmpty: '没有发现可导入的 MCP 服务器',
  importSelectAll: '全选',
  importExisting: '已存在',
  importSelected: '导入选中项',
  restartNeeded: '配置已写入,需重启 dsh 后生效。',
  mcpApplied: '配置已生效,工具已重新加载。',
  restartNow: '重启服务',
  restart: '重启',
  restartConfirmTitle: '重启 dsh?',
  restartConfirmBody: '重启会中断正在进行的回合,未保存的输入可能丢失。',
  restarting: '正在重启,恢复后将自动刷新页面…',
  failed: '操作失败',
  editorJsonTab: '添加 JSON',
  editorFormTab: '表单填写',
  formatPaste: '粘贴 JSON 配置(mcpServers 包装或单条目均可)',
  formatFill: '解析并切换到表单',
  pasteTransportMismatch: '该行传输方式已锁定,与粘贴配置不一致。',
  scope: '范围',
  scopeAll: '全部',
  global: '全局',
  profile: 'Profile',
  connectivityOk: '连接成功',
  connectivityFailed: '连接失败',
  scopeGlobal: '全局',
  scopeProfile: '当前 profile',
  checkLabel: '检查',
  checkRunning: '检查中…',
  authorizeLabel: '前往验证',
  authorizationRunning: '等待验证…',
  authorizationRestartNeeded: '验证成功;如工具尚未连接,请重启 dsh 后生效。',
  authorizationFailed: '验证失败,请重试。',
  authorizationTimeout: '验证超时,请重试。',
  authorizationUrlInvalid: '验证地址无效,必须使用 HTTPS。',
  authorizationBrowserBlocked: '浏览器阻止了验证窗口,请允许弹出窗口后重试。',
  shadowedByGlobal: '全局层存在同名 id,此行不生效',
}

type LocaleKey = keyof typeof zh

const en: Record<LocaleKey, string> = {
  extension: 'Plugin Extensions',
  pluginsTab: 'Plugins',
  pluginsBack: 'Back',
  skillsTab: 'Skills',
  mcpTab: 'MCP',
  skillsTitle: 'Skills',
  skillsIntro: 'View and manage discovered skills, including user and repository skills. Each card switch controls loading.',
  newSkill: 'New skill',
  importRepository: 'Import repository',
  importRepositoryTitle: 'Import GitHub skill repository',
  importRepositoryHint: 'Enter a GitHub URL or owner/repo.',
  importRepositoryPlaceholder: 'owner/repo',
  importRepositoryInvalid: 'Enter a valid GitHub URL or owner/repo.',
  workspaceUnavailable: 'No workspace is available. Open or connect a workspace before creating a skill.',
  skillCreatorFailed: 'Could not start skill creator',
  editSkill: 'Edit skill',
  viewSkill: 'View skill',
  skillName: 'Name (kebab-case)',
  skillDescription: 'Description',
  skillWhenToUse: 'When to use (optional)',
  skillContent: 'Body (Markdown)',
  skillPreview: 'Markdown preview',
  skillPlainText: 'Plain text',
  modelInvocable: 'Model-invocable',
  userInvocable: 'User-invocable (/)',
  save: 'Save',
  cancel: 'Cancel',
  delete: 'Delete',
  edit: 'Edit',
  view: 'View',
  close: 'Close',
  emptySkills: 'No skills discovered yet',
  loading: 'Loading…',
  source: 'Source',
  sourceProjectDsh: 'project',
  sourceProjectAgents: 'project',
  sourceUserDsh: 'user',
  sourceUserAgents: 'user',
  sourceRuntime: 'runtime',
  sourceBundled: 'bundled',
  sourceCustom: 'custom',
  confirmDelete: 'Delete this skill?',
  deleteWarn: 'Removes the whole user skill directory. This cannot be undone.',
  searchSkills: 'Search name or description',
  filterAll: 'All',
  noMatch: 'No skills match',
  refresh: 'Refresh',
  skillDisabled: 'disabled',
  skillUserOnly: 'user-only',
  skillModelOnly: 'model-only',
  toggleSkill: 'Toggle skill loading',
  toggleSkillHint: 'Disable model and user invocation; enabling restores defaults.',
  openFolder: 'Open folder',
  openUserSkills: 'Open skills folder',
  repository: 'repository',
  githubRepository: 'Open repository on GitHub',
  mcpTitle: 'MCP servers',
  mcpIntro: 'Manage MCP server rows in this profile. Changes are written to the profile config and apply immediately when the host supports hot reload; otherwise restart dsh.',
  addServer: 'Add server',
  editServer: 'Edit server',
  serverName: 'Server name (tool prefix)',
  transport: 'Transport',
  transportStdio: 'stdio (local command)',
  transportHttp: 'streamable-http (URL)',
  command: 'Command',
  args: 'Arguments (one per line)',
  envPairs: 'Environment (KEY=VALUE per line)',
  url: 'URL',
  headersPairs: 'Headers (KEY: VALUE per line)',
  disabled: 'Disabled',
  enabled: 'Enabled',
  toggle: 'Enable/disable',
  confirmRemove: 'Remove this server?',
  removeWarn: 'Removes this profile row; its tools are unloaded with it.',
  emptyMcp: 'No MCP servers configured yet',
  importServers: 'Import from other agents',
  importIntro: 'Scan Claude Code and Codex MCP configs and import selected entries.',
  importEmpty: 'No importable MCP servers found',
  importSelectAll: 'Select all',
  importExisting: 'already here',
  importSelected: 'Import selected',
  restartNeeded: 'Configuration written; restart dsh to apply.',
  mcpApplied: 'Configuration applied and tools reloaded.',
  restartNow: 'Restart service',
  restart: 'Restart',
  restartConfirmTitle: 'Restart dsh?',
  restartConfirmBody: 'Restarting interrupts running turns and may lose unsaved input.',
  restarting: 'Restarting; the page reloads when the host returns…',
  failed: 'Operation failed',
  editorJsonTab: 'Add JSON',
  editorFormTab: 'Fill form',
  formatPaste: 'Paste a JSON config (wrapper or bare entry)',
  formatFill: 'Parse and switch to form',
  pasteTransportMismatch: 'The row transport is locked and differs from the pasted config.',
  scope: 'Scope',
  scopeAll: 'All',
  global: 'Global',
  profile: 'Profile',
  connectivityOk: 'Connected',
  connectivityFailed: 'Connection failed',
  scopeGlobal: 'Global',
  scopeProfile: 'This profile',
  checkLabel: 'Check',
  checkRunning: 'Checking…',
  authorizeLabel: 'Authorize',
  authorizationRunning: 'Waiting for authorization…',
  authorizationRestartNeeded: 'Authorized; restart dsh if the tools have not connected yet.',
  authorizationFailed: 'Authorization failed. Please try again.',
  authorizationTimeout: 'Authorization timed out. Please try again.',
  authorizationUrlInvalid: 'Invalid authorization URL; HTTPS is required.',
  authorizationBrowserBlocked: 'The authorization window was blocked. Allow pop-ups and try again.',
  shadowedByGlobal: 'a global row with the same id wins — this row has no effect',
}

export const locale = defineLocale(PLUGIN_ID, { zh, en })