Skip to content

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

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

export const zh = {
  'nav': '远程访问',
  'tabs.machines': '连接 SSH',
  'tabs.sync': '同步远端',
  'hero.title': '远程访问',
  'hero.desc': '两个方向都由这里开通:用 SSH 连接其他机器上的 dsh 实例(直连使用本机 ~/.ssh 的配置与密钥),或把本机 dsh 暴露到局域网与公网隧道。默认关闭,开启后才建立连接或监听。',
  'hero.enable': '启用远程访问',
  'hero.enabling': '正在启用…',
  'enable.hint': '打开后才会建立 SSH 连接、同步代码与暴露本机 dsh;开关只影响本机这个插件。',
  'enable.off': '已关闭:打开上面的开关后才能添加机器、同步或暴露本机。',
  'disable': '禁用',
  'error.unavailable': 'SSH 服务不可用:插件未加载或本地实例未就绪。',
  'title': '连接到 SSH 服务器',
  'intro': '连接直接使用本机 ~/.ssh 的配置与密钥:支持 config 别名、IdentityFile 与默认密钥;密码和私钥口令可选,仅在密钥不可用时作为回退。',
  'loading': '加载中…',
  'empty': '还没有 SSH 机器。点击「添加机器」创建第一台。',
  'configHosts': '来自 ~/.ssh/config 的主机',
  'configHostsHint': '只读列表:连接时实时解析别名的 HostName/User/Port/IdentityFile。添加同 ID 的手动机器可覆盖别名,或用于设置密码与远端端口。',
  'configTag': '~/.ssh/config',
  'addMachine': '添加机器',
  'refresh': '刷新',
  'save': '保存',
  'saveHint': '请填写机器 ID、名称和主机后再保存。',
  'remove': '删除',
  'edit': '编辑',
  'test': '测试',
  'connect': '连接',
  'open': '打开',
  'disconnect': '断开',
  'secret.set': '已设置',
  'secret.unset': '未设置',
  'error.banner': '错误:',
  'loadFailed': '面板数据加载失败。',
  'migration.warning': '旧状态目录迁移未完成,已按新目录空状态启动(旧文件未改动):',
  'notice.connected': '已连接:{url}',
  'notice.disconnected': '已断开',
  'field.id': 'ID',
  'field.name': '名称',
  'field.host': '主机(或 config 别名)',
  'field.port': '端口',
  'field.user': '用户(可选)',
  'session.remoteTitle': '目前正在 SSH 中',
  'sync.notConnectedHint': '还没有已连接的机器——先到「SSH 机器」标签页连接一台,再回来同步。',
  'sync.remoteSessionHint': '本实例正通过 SSH 使用:插件与 Skill 的同步请在发起连接的机器上操作(那里选「同步到远端…」)。',
  'session.remoteHintNamed': '此实例正通过 SSH 来自 {name} 的连接使用;机器的添加、编辑与连接都在发起端操作。',
  'session.remoteHint': '此实例正通过 SSH 远程连接使用;机器的添加、编辑与连接都在发起端操作。',
  'session.remoteSyncHint': '想把发起端的插件和 Skill 搬过来?回到发起连接的机器,在顶部切换器里选「同步到远端…」。',
  'field.remotePort': '远端端口',
  'field.profileName': '远端档案(默认 remote)',
  'field.startCommand': '启动命令(可选)',
  'field.password': '密码(可选)',
  'field.passphrase': '私钥口令(可选)',
  'field.color': '标识颜色',
  'color.none': '默认',
  'field.tintBorder': '同时着色边框',
  'open.tip': '在新窗口中打开远端实例',
  'status.disconnected': '未连接',
  'status.testing': '测试中…',
  'status.connecting': '连接中…',
  'status.connected': '已连接',
  'status.reconnecting': '重连中…',
  'status.givenUp': '已放弃连接',
  'status.nextRetry': '(下次重试:{hint})',
  'retry.now': '即刻',
  'retry.inSeconds': '{seconds}s 后',
  'remove.confirm.title': '删除机器',
  'remove.confirm.description': '将删除「{name}」的机器配置;已保存的密码/口令会一并删除。',
  'remove.confirm.cancel': '取消',
  'remove.confirm.ok': '确认删除',
  'bridge.error': '打开远端窗口失败:',
  'sync.title': '同步到远端',
  'sync.desc': '把本机档案里的第三方插件与用户级 Skill 推到一台已连接的机器:插件在远端执行 dsh plugin add;Skill 经 tar 流式写入远端 ~/.dsh/skills。桌面内置插件(dsh-tauri-*)在连接时已自动同步,故不在此列出。',
  'sync.target': '目标机器',
  'sync.plugins': '插件',
  'sync.skills': 'Skill',
  'sync.noPlugins': '本机没有第三方插件需要同步(桌面内置插件连接时已自动同步)。',
  'sync.noSkills': '没有用户级 Skill。',
  'sync.selected': '已选 {plugins} 个插件、{skills} 个 Skill',
  'sync.selectAll': '全选',
  'sync.clear': '清空',
  'sync.groupCount': '{checked}/{total}',
  'sync.notSyncable': '不可同步',
  'sync.apply': '同步所选',
  'sync.applyTo': '同步到 {name}',
  'sync.applying': '同步中…',
  'sync.progress': '正在同步第 {done}/{total} 项:{item}',
  'sync.refresh': '刷新列表',
  'sync.loadFailed': '加载同步列表失败:',
  'sync.applyFailed': '同步请求失败:',
  'sync.summary': '同步结果:{ok} 项成功、{failed} 项失败。',
  'sync.retryFailed': '重试失败项({count})',
  'sync.itemOk': '已同步',
  'sync.itemFailed': '失败',
  'sync.showOutput': '查看输出',
  'sync.hideOutput': '收起输出',
  'progress.syncing': '正在同步第 {attempt}/{total} 项…',
  'progress.handshake': '正在建立 SSH 连接…',
  'progress.starting': '正在启动远端实例…',
  'progress.probing': '健康检查 {attempt}/{total}…',
  'open.opening': '正在打开…',
  'open.probing': '正在探测桌面环境…',
  'add.title': '添加机器',
  'add.submit': '添加并保存',
  'add.cancel': '取消',
  'add.id_auto': '留空则按主机自动生成',
  'add.id_invalid': 'ID 需以小写字母或数字开头,仅含小写字母、数字、连字符',
  'add.id_taken': 'ID 已被占用',
  'add.host_required': '主机不能为空',
  'step.handshake': '握手',
  'step.installing': '安装',
  'step.starting': '启动',
  'step.probing': '探测',
  'step.syncing': '同步',
  'notice.probe_ok': '探测通过',
  'notice.probe_failed': '探测失败',
  'progress.installing': '正在安装 dsh(下载并校验官方打包运行时,通常 1–3 分钟)…',
  'install.action': '一键安装 dsh',
  'install.hint': '远端未检测到 dsh。将下载官方打包运行时(Node + DSH,版本钉定 + SHA-256 校验)并部署到远端 ~/.dsh-desktop;如需使用自己的发行仓,请在插件配置中设置 installRepo。安装完成后自动连接。',
  'install.done.copied': '安装完成,已复制本机 API Key,正在自动连接…',
  'install.done.nokey': '安装完成。本机未找到 DEEPSEEK_API_KEY,请在远端 dsh Web 的 Models 页面配置后使用。',
  'install.done.error': '安装完成,但凭据复制失败:',
  'tabs.access': '远程访问',
  'access.loading': '正在读取暴露状态…',
  'access.page.hint': '同一网络或公网隧道访问本机,均需先通过认证。',
  'access.listen.address': '监听地址',
  'access.listen.allInterfaces': '全部网卡',
  'access.listen.recommended': '推荐',
  'access.tunnel.title': '公网隧道',
  'access.tunnel.progress.check': '检查 cloudflared',
  'access.tunnel.progress.download': '下载 cloudflared',
  'access.tunnel.progress.extract': '解压安装包',
  'access.tunnel.progress.verify': '校验可执行文件',
  'access.tunnel.progress.spawn': '启动进程',
  'access.tunnel.progress.domain': '等待分配域名',
  'access.tunnel.progress.ready': '隧道已就绪',
  'access.tunnel.intro': '把本机 dsh 通过 Cloudflare 隧道开放到公网,外网设备凭链接或配对码访问。',
  'access.tunnel.mode': '隧道模式',
  'access.tunnel.mode.quick': 'Quick(免账号)',
  'access.tunnel.mode.token': '具名(Token)',
  'access.tunnel.token': 'Tunnel Token',
  'access.tunnel.hostname': '公开主机名',
  'access.tunnel.start': '启动隧道',
  'access.tunnel.stop': '停止隧道',
  'access.tunnel.state.stopped': '隧道未运行',
  'access.tunnel.state.starting': '隧道启动中…',
  'access.tunnel.state.running': '隧道运行中',
  'access.tunnel.state.error': '隧道异常',
  'access.control.title': '访问控制',
  'access.control.hint': '配对后设备长期记住授权。撤销会清除全部设备授权、会话和访问码,所有设备需要重新配对。',
  'access.lan.title': '局域网',
  'access.lan.hint': '打开后同一网络的设备可访问本机 dsh;关闭时不监听。',
  'access.lan.addressHint': '推荐地址按可达性排序,「全部网卡」用于地址会变或多网卡的场景。',
  'access.lan.loopback': '仅本机',
  'access.draft.cancel': '取消',
  'access.draft.save': '保存',
  'access.tunnel.state': '隧道状态',
  'access.tunnel.modeHint': '免账号模式分配随机域名;具名模式用账号 Token 绑定自己的域名。',
  'access.tunnel.retry': '重试',
  'access.tunnel.tokenHint': 'Tunnel Token 由 Cloudflare 签发,用于把隧道绑定到你的账号。',
  'access.tunnel.tokenPlaceholder': '粘贴 Tunnel Token',
  'access.tunnel.tokenSaved': '已保存,留空沿用',
  'access.tunnel.hostnameHint': '在 Cloudflare 控制台把该主机名指向本机入口。',
  'access.tunnel.hostnameRequired': '具名模式需要公开主机名(例如 dsh.example.com)。',
  'access.pairing.title': '临时配对码',
  'access.pairing.hint': '设备输入配对连接,5 分钟内有效。',
  'access.pairing.none': '开启监听后这里会给出配对码。',
  'access.pairing.remaining': '剩余',
  'access.pairing.expired': '已过期,正在换新码…',
  'access.token.title': '永久访问码',
  'access.token.hint': '长期不变;泄露后可重新生成,旧码立即失效。',
  'access.token.generate': '生成',
  'access.token.revoke': '撤销配对授权',
  'access.token.reveal': '显示',
  'access.token.hide': '隐藏',
} as const

export type RemoteKey = keyof typeof zh

export const en: Record<keyof typeof zh, string> = {
  'nav': 'Remote access',
  'tabs.machines': 'Connect to SSH server',
  'tabs.sync': 'Sync to remote',
  'hero.title': 'Remote access',
  'hero.desc': 'Both directions start here: connect to dsh instances on other machines over SSH (using this machine\'s ~/.ssh directly), or expose this machine\'s dsh on your LAN and through a public tunnel. Off by default — nothing connects or listens until you enable it.',
  'hero.enable': 'Enable remote access',
  'hero.enabling': 'Enabling…',
  'enable.hint': 'Turn this on to open SSH connections, sync code, and expose this machine; the switch only affects this plugin.',
  'enable.off': 'Off: turn the switch above on to add machines, sync, or expose this machine.',
  'disable': 'Disable',
  'error.unavailable': 'The SSH service is unavailable: the plugin is not loaded or the local instance is not ready.',
  'title': 'Connect to SSH server',
  'intro': 'Connections use this machine\'s ~/.ssh directly: config aliases, IdentityFile, and the default keys are honored; password and passphrase are optional fallbacks.',
  'loading': 'Loading…',
  'empty': 'No SSH machines yet. Click "Add machine" to create the first one.',
  'configHosts': 'Hosts from ~/.ssh/config',
  'configHostsHint': 'Read-only: each alias resolves HostName/User/Port/IdentityFile at connect time. Add a manual machine with the same ID to override it, or for password and remote-port needs.',
  'configTag': '~/.ssh/config',
  'addMachine': 'Add machine',
  'refresh': 'Refresh',
  'save': 'Save',
  'saveHint': 'Fill in the machine ID, name, and host before saving.',
  'remove': 'Remove',
  'edit': 'Edit',
  'test': 'Test',
  'connect': 'Connect',
  'open': 'Open',
  'disconnect': 'Disconnect',
  'secret.set': 'set',
  'secret.unset': 'not set',
  'error.banner': 'Error: ',
  'loadFailed': 'The panel failed to load.',
  'migration.warning': 'The legacy state directory was not fully migrated; starting from an empty new directory (legacy files untouched):',
  'notice.connected': 'Connected: {url}',
  'notice.disconnected': 'Disconnected',
  'field.id': 'ID',
  'field.name': 'Name',
  'field.host': 'Host or config alias',
  'field.port': 'Port',
  'field.user': 'User (optional)',
  'session.remoteTitle': 'Currently in an SSH session',
  'sync.notConnectedHint': 'No connected machines yet — connect one under “SSH machines” first, then come back here to sync.',
  'sync.remoteSessionHint': 'This instance is in use over SSH: run the plugin/skill sync on the machine that started the session (pick “Sync to remote…” there).',
  'session.remoteHintNamed': 'This instance is in use over SSH from {name}; add, edit and connect machines on the machine that started the session.',
  'session.remoteHint': 'This instance is in use over an SSH session; add, edit and connect machines on the machine that started it.',
  'session.remoteSyncHint': 'Want the plugins and skills from that side? On the machine that started the session, pick “Sync to remote…” in the top switcher.',
  'field.remotePort': 'Remote port',
  'field.profileName': 'Remote profile (default remote)',
  'field.startCommand': 'Start command (optional)',
  'field.password': 'Password (optional)',
  'field.passphrase': 'Key passphrase (optional)',
  'field.color': 'Color',
  'color.none': 'Default',
  'field.tintBorder': 'Also tint the border',
  'open.tip': 'Open the remote instance in a new window',
  'status.disconnected': 'Disconnected',
  'status.testing': 'Testing…',
  'status.connecting': 'Connecting…',
  'status.connected': 'Connected',
  'status.reconnecting': 'Reconnecting…',
  'status.givenUp': 'Given up',
  'status.nextRetry': ' (next retry: {hint})',
  'retry.now': 'now',
  'retry.inSeconds': 'in {seconds}s',
  'remove.confirm.title': 'Remove machine',
  'remove.confirm.description': 'This removes the "{name}" machine profile; any stored password or passphrase goes with it.',
  'remove.confirm.cancel': 'Cancel',
  'remove.confirm.ok': 'Remove it',
  'bridge.error': 'Failed to open the remote window: ',
  'sync.title': 'Sync to remote',
  'sync.desc': 'Push this profile\'s third-party plugins and user-level skills to a connected machine: plugins install remotely via dsh plugin add; skills stream as a tar into the remote ~/.dsh/skills. Desktop-bundled plugins (dsh-tauri-*) already sync on connect, so they are not listed.',
  'sync.target': 'Target machine',
  'sync.plugins': 'Plugins',
  'sync.skills': 'Skills',
  'sync.noPlugins': 'No third-party plugins to sync (desktop-bundled ones already sync on connect).',
  'sync.noSkills': 'No user-level skills.',
  'sync.selected': '{plugins} plugins and {skills} skills selected',
  'sync.selectAll': 'Select all',
  'sync.clear': 'Clear',
  'sync.groupCount': '{checked}/{total}',
  'sync.notSyncable': 'not syncable',
  'sync.apply': 'Sync selection',
  'sync.applyTo': 'Sync to {name}',
  'sync.applying': 'Syncing…',
  'sync.progress': 'Syncing item {done}/{total}: {item}',
  'sync.refresh': 'Refresh list',
  'sync.loadFailed': 'Failed to load the sync list: ',
  'sync.applyFailed': 'The sync request failed: ',
  'sync.summary': 'Sync result: {ok} succeeded, {failed} failed.',
  'sync.retryFailed': 'Retry failed items ({count})',
  'sync.itemOk': 'synced',
  'sync.itemFailed': 'failed',
  'sync.showOutput': 'Show output',
  'sync.hideOutput': 'Hide output',
  'progress.syncing': 'Syncing item {attempt}/{total}…',
  'progress.handshake': 'Connecting over SSH…',
  'progress.starting': 'Starting the remote instance…',
  'progress.probing': 'Health check {attempt}/{total}…',
  'open.opening': 'Opening…',
  'open.probing': 'Probing the desktop bridge…',
  'add.title': 'Add machine',
  'add.submit': 'Add & save',
  'add.cancel': 'Cancel',
  'add.id_auto': 'Leave empty to derive from the host',
  'add.id_invalid': 'ID must start with a lowercase letter or digit and use only lowercase letters, digits, dashes',
  'add.id_taken': 'ID already in use',
  'add.host_required': 'Host is required',
  'step.handshake': 'Handshake',
  'step.installing': 'Install',
  'step.starting': 'Start',
  'step.probing': 'Probe',
  'step.syncing': 'Sync',
  'notice.probe_ok': 'Probe passed',
  'notice.probe_failed': 'Probe failed',
  'progress.installing': 'Installing dsh (downloading and verifying the official packaged runtime, usually 1–3 min)…',
  'install.action': 'Install dsh',
  'install.hint': 'No dsh found on the remote. This downloads the official packaged runtime (Node + DSH, version-pinned and SHA-256 verified) and deploys it to ~/.dsh-desktop on the remote; set installRepo in the plugin config to use your own release repository. Auto-connects when done.',
  'install.done.copied': 'Installed. Your API key was copied to the remote; auto-connecting…',
  'install.done.nokey': 'Installed. No DEEPSEEK_API_KEY found locally; configure one on the remote Models page to use it.',
  'install.done.error': 'Installed, but copying credentials failed: ',
  'tabs.access': 'Remote access',
  'access.loading': 'Reading exposure state…',
  'access.page.hint': 'Devices on the same network or through the public tunnel must authenticate first.',
  'access.listen.address': 'Listen address',
  'access.listen.allInterfaces': 'all interfaces',
  'access.listen.recommended': 'recommended',
  'access.tunnel.title': 'Public tunnel',
  'access.tunnel.progress.check': 'Checking cloudflared',
  'access.tunnel.progress.download': 'Downloading cloudflared',
  'access.tunnel.progress.extract': 'Extracting archive',
  'access.tunnel.progress.verify': 'Verifying binary',
  'access.tunnel.progress.spawn': 'Starting process',
  'access.tunnel.progress.domain': 'Waiting for an assigned hostname',
  'access.tunnel.progress.ready': 'Tunnel ready',
  'access.tunnel.intro': 'Opens this machine\u2019s dsh to the internet through a Cloudflare tunnel; other devices use the link or the pairing code.',
  'access.tunnel.mode': 'Tunnel mode',
  'access.tunnel.mode.quick': 'quick (no account)',
  'access.tunnel.mode.token': 'Named (token)',
  'access.tunnel.token': 'Tunnel token',
  'access.tunnel.hostname': 'Public hostname',
  'access.tunnel.start': 'Start tunnel',
  'access.tunnel.stop': 'Stop tunnel',
  'access.tunnel.state.stopped': 'Tunnel stopped',
  'access.tunnel.state.starting': 'Tunnel starting…',
  'access.tunnel.state.running': 'Tunnel running',
  'access.tunnel.state.error': 'Tunnel failed',
  'access.control.title': 'Access control',
  'access.control.hint': 'Paired devices remember authorization. Revoking clears all device authorizations, sessions and access codes; every device must pair again.',
  'access.lan.title': 'Local network',
  'access.lan.hint': 'Turn this on to let devices on the same network reach this machine; off stops the listener.',
  'access.lan.addressHint': 'Recommended addresses are sorted by reachability; "all interfaces" suits multi-NIC hosts or addresses that change.',
  'access.lan.loopback': 'this machine only',
  'access.draft.cancel': 'Cancel',
  'access.draft.save': 'Save',
  'access.tunnel.state': 'Tunnel status',
  'access.tunnel.modeHint': 'The account-free mode assigns a random hostname; the named mode binds your own hostname with an account token.',
  'access.tunnel.retry': 'Retry',
  'access.tunnel.tokenHint': 'Issued by Cloudflare; it binds the tunnel to your account.',
  'access.tunnel.tokenPlaceholder': 'Paste the Tunnel token',
  'access.tunnel.tokenSaved': 'Saved — leave empty to keep it',
  'access.tunnel.hostnameHint': 'Point this hostname at the local entry in the Cloudflare dashboard.',
  'access.tunnel.hostnameRequired': 'Named mode needs a public hostname (for example dsh.example.com).',
  'access.pairing.title': 'Temporary pairing code',
  'access.pairing.hint': 'Enter this code on the other device; valid for 5 minutes.',
  'access.pairing.none': 'A pairing code appears here once listening is on.',
  'access.pairing.remaining': 'expires in',
  'access.pairing.expired': 'Expired, fetching a new code…',
  'access.token.title': 'Permanent access code',
  'access.token.hint': 'Does not rotate; regenerate it to invalidate the old code.',
  'access.token.generate': 'Generate',
  'access.token.revoke': 'Revoke paired access',
  'access.token.reveal': 'Show',
  'access.token.hide': 'Hide',
}

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