Files
OpenTerminal/src/shared/i18n/dicts/zh-CN/ssh.ts
T
Bill e08e1cfec4 feat(highlight): preset overhaul, categories, stats, theme colours, per-host profiles
Rules & engine:
- 22 presets (was 11): split status into okstate/warnstate/badstate, add delop,
  createop, danger, secret, level, exitcode, percent, http; status words are
  case-insensitive and cover the ✓ ✔ ✅ ✗ ✘ ✖ ❌ ⚠ symbol set
- value bands: the first number in a match picks the colour
  (percent: <20% red / 20-50% yellow / 50-80% light green / >=80% green)
- optional per-rule `caseInsensitive`, `category`, `bands`; load-time
  `refreshBuiltinRules` upgrades untouched built-in patterns in place

Settings page:
- three-way master switch `highlightMode` (all / basic / off); `basic` runs only
  the five safety+status rules and `off` empties the rule set rather than
  bypassing HighlightStream (which would drop the held tail)
- category column + grouping (`highlightGroupByCategory`), per-rule hit/duration
  stats (`highlightStats`, opt-in sink, snapshot once a second), theme-following
  colours (`highlightThemeColors`, hue-bucket mapping onto the ANSI palette),
  import/export JSON envelope, live preview through the real engine
- named rule subsets bound per host (`highlightPerHost` + `highlightProfiles`
  + `SshConnection.highlightProfileId`); empty ruleIds = every rule

Tests: new tests/hl-rules.mjs (word boundaries, case flag, negative words,
bands, import/export, preview, basic mode, categories, stats, theme colours,
profiles) + profile round-trip in tests/settings-store.mjs
2026-09-23 11:14:31 +08:00

149 lines
6.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/** 命名空间:ssh(SSH 连接管理、主机密钥、文件面板、zmodem、系统监控)。归属:SSH 维护者。 */
const ssh: Record<string, string> = {
// 认证方式 / 密钥种类
'ssh.auth.password': '密码',
'ssh.auth.privateKey': '私钥',
'ssh.auth.agent': 'Agent',
'ssh.secret.passphrase': '口令',
// 连接编辑弹窗:认证相关字段
'ssh.fields.agentDesc': '使用本机 SSH Agent 中已加载的密钥进行认证,无需在本应用内保存任何密钥。',
'ssh.fields.askPasswordLabel': '连接时询问密码',
'ssh.fields.askPasswordHint': '开启后每次连接弹出对话框输入密码,不再使用已保存的密码',
'ssh.fields.passwordPlaceholder': '编辑时留空表示保留已保存的密码',
'ssh.fields.keyPath': '私钥文件路径(本机路径,可留空)',
'ssh.fields.keyContent': '私钥内容',
'ssh.fields.keyContentPlaceholder':
'粘贴私钥内容;留空则使用上面的路径(编辑时留空表示保留已保存的私钥)',
'ssh.fields.askPassphraseLabel': '连接时询问口令',
'ssh.fields.askPassphraseHint': '开启后每次连接提示输入私钥口令',
'ssh.fields.passphrase': '私钥口令',
'ssh.fields.passphrasePlaceholder': '编辑时留空表示保留已保存的口令',
// 连接编辑弹窗
'ssh.dialog.titleEdit': '编辑连接',
'ssh.dialog.titleNew': '新建连接',
'ssh.dialog.saveFailed': '保存失败,请检查输入后重试',
'ssh.dialog.name': '名称',
'ssh.dialog.nameRequired': '请输入连接名称',
'ssh.dialog.namePlaceholder': '例如:生产服务器',
'ssh.dialog.group': '分组',
'ssh.dialog.groupPlaceholder': '选择或输入新分组,留空归入“默认”',
'ssh.dialog.host': '主机',
'ssh.dialog.hostRequired': '请输入主机地址',
'ssh.dialog.hostPlaceholder': '192.168.1.10 或 example.com',
'ssh.dialog.port': '端口',
'ssh.dialog.portRange': '端口需在 1–65535 之间',
'ssh.dialog.username': '用户名',
'ssh.dialog.usernameRequired': '请输入用户名',
'ssh.dialog.authMethod': '认证方式',
'ssh.dialog.savedSecret': '已保存{kind},留空将保留原值',
'ssh.dialog.keepalive': 'Keepalive 间隔(秒)',
'ssh.dialog.keepaliveTooltip': '0 表示关闭 keepalive',
'ssh.dialog.keepaliveMin': '不能为负数',
'ssh.dialog.highlightProfile': '高亮规则集',
'ssh.dialog.highlightProfileDefault': '默认(全部规则)',
// 连接侧栏
'ssh.sidebar.defaultGroup': '默认',
'ssh.sidebar.timeJustNow': '刚刚',
'ssh.sidebar.timeMinutesAgo': '{n} 分钟前',
'ssh.sidebar.timeHoursAgo': '{n} 小时前',
'ssh.sidebar.timeDaysAgo': '{n} 天前',
'ssh.sidebar.modeTerminal': '终端工作区',
'ssh.sidebar.modeSsh': 'SSH 工作区',
'ssh.sidebar.title': '连接',
'ssh.sidebar.newConnection': '新建连接',
'ssh.sidebar.sectionTerminals': '终端',
'ssh.sidebar.noLocalTerminals': '无打开的本地终端',
'ssh.sidebar.local': '本地',
'ssh.sidebar.sectionServers': 'SSH 服务器',
'ssh.sidebar.empty': '暂无连接,点击+新建',
'ssh.sidebar.loading': '加载中…',
'ssh.sidebar.recent': '最近会话',
'ssh.sidebar.dblClickConnect': '双击连接 {host}',
'ssh.sidebar.deleteTitle': '删除该连接?',
'ssh.sidebar.deleteDesc': '连接配置删除后不可恢复。已保存的密钥数据会同步删除。',
// 主机密钥确认
'ssh.hostKey.changedTitle': '主机指纹已变更!',
'ssh.hostKey.unknownHost': '未知主机',
'ssh.hostKey.accept': '接受并连接',
'ssh.hostKey.reject': '拒绝',
'ssh.hostKey.mitmTitle': '可能遭受中间人攻击',
'ssh.hostKey.mitmDesc':
'远程主机的密钥指纹与之前记录的不一致。如果这不是你本人更换了服务器密钥,可能有人正在冒充该主机。',
'ssh.hostKey.firstConnect': '首次连接该主机,尚未记录其指纹。',
'ssh.hostKey.target': '主机:{target}',
'ssh.hostKey.fingerprint': '指纹:{fingerprint}',
// SSH 工作区:文件面板容器、主机徽标
'ssh.bottomPanel.resize': '调整文件面板高度',
'ssh.hostBadge.aria': 'SSH 主机 {label}',
// ZMODEM
'ssh.zmodem.done': 'ZMODEM 传输完成',
'ssh.zmodem.failed': 'ZMODEM 传输失败:{message}',
'ssh.zmodem.unknownError': '未知错误',
'ssh.zmodem.titleReceive': '下载到本地',
'ssh.zmodem.titleSend': '上传到服务器',
'ssh.zmodem.pickDir': '选择保存目录',
'ssh.zmodem.pickFiles': '选择文件',
'ssh.zmodem.receiveDesc': '检测到 sz 下载请求(远端正在发送文件),请选择保存在本地的目录。',
'ssh.zmodem.sendDesc': '检测到 rz 上传请求(远端正在接收文件),请选择要上传的文件。',
// 文件面板(SFTP)
'ssh.file.up': '上一级',
'ssh.file.refresh': '刷新',
'ssh.file.uploadFile': '上传文件',
'ssh.file.overwriteTitle': '覆盖已存在的文件?',
'ssh.file.overwriteDesc': '目标目录已存在同名文件,上传将覆盖其内容。',
'ssh.file.downloadSelected': '下载选中项',
'ssh.file.permOwner': '权限 / 属主',
'ssh.file.open': '打开',
'ssh.file.download': '下载',
'ssh.file.upload': '上传…',
'ssh.file.rename': '重命名',
'ssh.file.new': '新建',
'ssh.file.newFolder': '新建文件夹',
'ssh.file.copyPath': '复制路径',
'ssh.file.copyPathFailed': '复制路径失败',
'ssh.file.pathCopied': '已复制路径',
'ssh.file.permission': '文件权限…',
'ssh.file.deleteTitle': '确认删除?',
'ssh.file.loading': '加载中…',
'ssh.file.empty': '空目录',
'ssh.file.modeUnavailable': '权限不可用',
'ssh.file.folderName': '文件夹名称',
'ssh.file.create': '创建',
'ssh.file.renameTitle': '重命名 {name}',
'ssh.file.permTitle': '权限 · {name}',
'ssh.file.permApplied': '已应用权限',
'ssh.file.octal': '八进制',
'ssh.file.octalPlaceholder': '如 755',
'ssh.file.keepEmpty': '不改则留空',
'ssh.file.ownerHint': 'UID/GID 留空表示不修改属主',
'ssh.file.permRowOwner': '所有者',
'ssh.file.permRowGroup': '组',
'ssh.file.permRowOther': '其他',
'ssh.file.permColRead': '读',
'ssh.file.permColWrite': '写',
'ssh.file.permColExec': '执行',
// 系统监控
'ssh.monitor.collecting': '采集中…',
'ssh.monitor.interrupted': '采集中断:{error}',
'ssh.monitor.mem': '内存',
'ssh.monitor.disks': '磁盘',
'ssh.monitor.net': '网络',
'ssh.monitor.cores': '{n} 核',
'ssh.monitor.loadavg': '负载 {value}',
'ssh.monitor.uptime': '运行时间',
'ssh.monitor.uptimeSeconds': '{n}秒',
'ssh.monitor.uptimeMinutes': '{n}分钟',
'ssh.monitor.uptimeHours': '{h}小时{m}分',
'ssh.monitor.uptimeDays': '{n}天'
}
export default ssh