feat: multi-language interface (zh-CN/zh-TW/en/ja), multilingual offline changelog, settings robustness
i18n - shared/i18n: dependency-free t() with flat per-namespace dictionaries (common/settings/workspace/terminal/ssh/panels/main), zh-CN fallback - language picker in Settings -> System; antd ConfigProvider locale follows it - main process tracks the language too: tray menu, close prompt, ssh/sftp/ zmodem errors and the log TUI marker are translated; tray rebuilds on change changelog - CHANGELOG.md (zh-CN canonical) + .zh-TW/.en/.ja, bundled via ?raw and read per interface language with per-version fallback to zh-CN (no network) - sync-changelog.cjs merges RELEASE_NOTES[.<lang>].md per release; release.cjs refuses to publish without a zh-CN entry for the version settings robustness - closeAction 'ask' survives the sanitizer (was silently coerced to 'tray', which made the 'ask every time' option dead) - highlight rules are repaired instead of dropped: string priority, 0/1 enabled, missing fg colour; unknown fields preserved - load-time warnings are written to settings-warnings.log (deduped, capped) terminal/UI - configurable terminal toolbar: open working directory (default on), session log recording (off), open logs folder (off) - global shortcut field records key combos (modifier or F-key required) - input suggestions + command history default to off, with a one-time reset migration for existing installs - settings dialog scrolling fixed (antd v6 renamed the tabs container), theme gallery nested scrollbar removed, joined segmented pickers with readable selected-state text tests: settings-store.mjs (15 checks) added; commands-store.mjs updated for the new off-by-default history setting
This commit is contained in:
1 parent
34094d607b
commit
4c6a29ef28
82 files changed
+3342
-608
No files matched your search
@@ -0,0 +1,147 @@
|
||||
/** 命名空间:settings(设置弹窗:字体/光标/渲染/高亮/主题/系统/关于)。归属:设置页维护者。 */
|
||||
const settings: Record<string, string> = {
|
||||
'settings.title': '设置',
|
||||
'settings.tabs.font': '字体',
|
||||
'settings.tabs.cursor': '光标与滚动',
|
||||
'settings.tabs.render': '渲染与行为',
|
||||
'settings.tabs.highlight': '高亮',
|
||||
'settings.tabs.theme': '主题',
|
||||
'settings.tabs.system': '系统',
|
||||
'settings.tabs.about': '关于',
|
||||
'settings.resizeHandle': '拖拽调整大小',
|
||||
'settings.preview': '预览',
|
||||
'settings.deleteConfirmDesc': '删除后无法恢复,确定继续?',
|
||||
'settings.color.foreground': '前景',
|
||||
'settings.color.background': '背景',
|
||||
'settings.color.cursor': '光标',
|
||||
'settings.color.selection': '选区',
|
||||
'settings.font.label': '字体',
|
||||
'settings.font.desc': '内置默认字体或系统等宽字体',
|
||||
'settings.font.placeholder': '选择字体',
|
||||
'settings.font.default': '默认',
|
||||
'settings.font.size': '字号',
|
||||
'settings.font.sizeDesc': '终端文字的像素大小',
|
||||
'settings.font.weight': '字重',
|
||||
'settings.font.weightDesc': '400 为常规,700 为粗体',
|
||||
'settings.font.boldWeight': '粗体字重',
|
||||
'settings.font.boldWeightDesc': '粗体文字所用的字重',
|
||||
'settings.font.letterSpacing': '字间距',
|
||||
'settings.font.letterSpacingDesc': '字符之间的水平间距',
|
||||
'settings.font.lineHeight': '行高',
|
||||
'settings.font.lineHeightDesc': '相邻两行之间的垂直距离',
|
||||
'settings.cursor.blink': '光标闪烁',
|
||||
'settings.cursor.blinkDesc': '光标是否周期性闪烁',
|
||||
'settings.cursor.style': '光标样式',
|
||||
'settings.cursor.styleDesc': '光标的显示形状',
|
||||
'settings.cursor.inactiveStyle': '非活动光标样式',
|
||||
'settings.cursor.inactiveStyleDesc': '窗口失焦时光标样式',
|
||||
'settings.cursor.scrollback': '滚动缓冲区',
|
||||
'settings.cursor.scrollbackDesc': '屏幕上可回滚的行数',
|
||||
'settings.cursorStyle.bar': '竖线 (bar)',
|
||||
'settings.cursorStyle.block': '方块 (block)',
|
||||
'settings.cursorStyle.underline': '下划线 (underline)',
|
||||
'settings.cursorStyle.outline': '轮廓 (outline)',
|
||||
'settings.cursorStyle.none': '无 (none)',
|
||||
'settings.rendererMode.auto': '自动',
|
||||
'settings.rendererMode.autoHint': '优先使用 WebGL 加速,失败时自动回退到 DOM 渲染',
|
||||
'settings.rendererMode.webgl': '高性能 WebGL',
|
||||
'settings.rendererMode.webglHint': '强制使用 GPU 加速渲染,适合高刷新率与大行数滚动',
|
||||
'settings.rendererMode.dom': '兼容 DOM',
|
||||
'settings.rendererMode.domHint': '纯 CPU 渲染,兼容性最好,适合无 GPU 或远程桌面环境',
|
||||
'settings.render.modeLabel': '渲染模式',
|
||||
'settings.render.modeHint': '终端单元渲染加速方式,改动将应用到所有终端',
|
||||
'settings.render.autoWrap': '自动换行',
|
||||
'settings.render.autoWrapDesc': '超出宽度时自动折行',
|
||||
'settings.render.copyOnSelect': '选中即复制',
|
||||
'settings.render.copyOnSelectDesc': '鼠标选中文字时自动复制',
|
||||
'settings.render.pasteRiskConfirm': '粘贴风险确认',
|
||||
'settings.render.pasteRiskConfirmDesc': '多行文本(或超长单行)粘贴前弹出确认;单行直接粘贴',
|
||||
'settings.render.suggest': '输入建议',
|
||||
'settings.render.suggestDesc': '输入时弹出命令建议;Tab 接受,回车始终直接执行',
|
||||
'settings.render.history': '记录命令历史',
|
||||
'settings.render.historyDesc': '关闭后不再记录新命令;已保存的历史仍然保留',
|
||||
'settings.render.historyLimit': '历史条数上限',
|
||||
'settings.render.historyLimitDesc': '命令历史最多保留多少条,重复命令只记一次',
|
||||
'settings.render.recButton': '终端工具栏 · 录制',
|
||||
'settings.render.recButtonDesc': '右上角显示「记录会话日志」按钮',
|
||||
'settings.render.openLogsButton': '终端工具栏 · 打开日志目录',
|
||||
'settings.render.openLogsButtonDesc': '右上角显示「打开日志目录」按钮',
|
||||
'settings.render.openCwdButton': '终端工具栏 · 打开工作区目录',
|
||||
'settings.render.openCwdButtonDesc':
|
||||
'右上角显示「打开当前目录」按钮(SSH 会话不显示;目录随 cd 实时跟踪,需开启 shell 集成或使用 cd 命令)',
|
||||
'settings.system.launchAtLogin': '开机时自启动',
|
||||
'settings.system.launchAtLoginDesc': '开机时自动启动软件(开发模式下注册的是开发版程序)',
|
||||
'settings.system.preventSleep': '阻止系统休眠',
|
||||
'settings.system.preventSleepDesc':
|
||||
'开启后 OpenTerminal 将阻止系统自动休眠;关闭则允许系统按系统设置休眠',
|
||||
'settings.system.restoreSession': '启动时恢复上次会话',
|
||||
'settings.system.restoreSessionDesc':
|
||||
'下次启动恢复分屏布局,并让每个终端回到它上次所在的目录;关闭则每次都以单个终端启动',
|
||||
'settings.system.shellIntegration': 'Shell 集成',
|
||||
'settings.system.shellIntegrationDesc':
|
||||
'让 shell 主动上报工作目录(OSC 7),路径记忆更精确(含脚本内的 cd);会包装你的命令提示符,遇到提示符主题异常时关掉即可',
|
||||
'settings.system.closeAction': '关闭按钮行为',
|
||||
'settings.system.closeActionDesc':
|
||||
'点击窗口关闭按钮时的动作;最小化到托盘后可在托盘图标右键菜单中退出',
|
||||
'settings.system.closeActionTray': '最小化到托盘',
|
||||
'settings.system.closeActionExit': '直接退出',
|
||||
'settings.system.closeActionAsk': '每次询问',
|
||||
'settings.system.globalShortcut': '全局唤起快捷键',
|
||||
'settings.system.globalShortcutDesc': '点击输入框后直接按下组合键;Esc 取消,退格清空禁用',
|
||||
'settings.system.globalShortcutHint':
|
||||
'配合全局键可在任何界面唤起/隐藏窗口;若注册失败(与其他软件冲突)则不生效,应用不会报错。',
|
||||
'settings.system.shortcutRecording': '按下组合键…',
|
||||
'settings.system.shortcutPlaceholder': '点击后按下快捷键,留空禁用',
|
||||
'settings.highlight.alert':
|
||||
'自定义高亮可增强显示效果,但会略微增加性能消耗。规则按优先级顺序应用。PS: 高亮在写入终端时注入颜色,对已有回滚内容不生效',
|
||||
'settings.highlight.enabled': '启用',
|
||||
'settings.highlight.pattern': '正则',
|
||||
'settings.highlight.patternPlaceholder': '例如 \\b(ERROR|FAILED)\\b',
|
||||
'settings.highlight.invalidRegex': '正则表达式无效',
|
||||
'settings.highlight.priority': '优先级',
|
||||
'settings.highlight.priorityHint': '值越小越先应用',
|
||||
'settings.highlight.color': '颜色',
|
||||
'settings.highlight.clearBg': '清空',
|
||||
'settings.highlight.addBg': '添加',
|
||||
'settings.highlight.palette': '色板',
|
||||
'settings.highlight.note': '备注',
|
||||
'settings.highlight.notePlaceholder': '规则说明(可选)',
|
||||
'settings.highlight.actions': '操作',
|
||||
'settings.highlight.addRule': '+ 新增规则',
|
||||
'settings.highlight.empty': '暂无高亮规则,点击「+ 新增规则」创建',
|
||||
'settings.highlight.deleteTitle': '删除高亮规则',
|
||||
'settings.highlight.resetTitle': '恢复默认高亮规则',
|
||||
'settings.highlight.resetDesc': '将替换当前全部规则为内置预设,不可恢复。',
|
||||
'settings.highlight.resetOk': '恢复',
|
||||
'settings.highlight.createTitle': '新建高亮规则',
|
||||
'settings.highlight.editTitle': '编辑高亮规则',
|
||||
'settings.theme.accent': '标签强调色',
|
||||
'settings.theme.accentDesc': '活动标签边框、侧栏指示条与 SSH 徽章的强调颜色',
|
||||
'settings.theme.customBadge': '自定义',
|
||||
'settings.theme.deleteTitle': '删除自定义主题',
|
||||
'settings.theme.create': '新建主题',
|
||||
'settings.theme.editTitle': '编辑主题',
|
||||
'settings.themeEditor.name': '名称',
|
||||
'settings.themeEditor.namePlaceholder': '主题名称',
|
||||
'settings.themeEditor.copySuffix': '(副本)',
|
||||
'settings.about.currentVersion': '当前版本',
|
||||
'settings.about.statusIdle': '点击检查更新',
|
||||
'settings.about.statusChecking': '正在检查更新…',
|
||||
'settings.about.statusAvailable': '发现新版本',
|
||||
'settings.about.statusLatest': '已经是最新版本',
|
||||
'settings.about.statusDownloading': '正在下载…',
|
||||
'settings.about.statusDownloaded': '下载完成,可重启安装',
|
||||
'settings.about.statusError': '检查失败',
|
||||
'settings.about.statusDev': '开发模式不支持更新检查',
|
||||
'settings.about.channelStable': '稳定更新通道',
|
||||
'settings.about.autoCheck': '启动时自动检查',
|
||||
'settings.about.download': '下载更新',
|
||||
'settings.about.downloadGithub': '(GitHub 源)',
|
||||
'settings.about.install': '重启安装',
|
||||
'settings.about.check': '检查更新',
|
||||
'settings.about.checkingButton': '检查中',
|
||||
'settings.about.changelog': '更新日志',
|
||||
'settings.about.changelogEmpty': '暂无更新日志'
|
||||
}
|
||||
|
||||
export default settings
|
||||
Reference in new issue
Block a user