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:
Bill committed 2026-09-20 14:22:29 +08:00
1 parent 34094d607b
commit 4c6a29ef28
82 files changed
+3342 -608

No files matched your search

+144
View File
@@ -0,0 +1,144 @@
/** 命名空間: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.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.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