dsh-config-manager 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli/actions.js +2 -3
- package/lib/cli/import-source.js +2 -6
- package/lib/cli/index.js +2 -3
- package/lib/client.d.ts +0 -5
- package/lib/client.js +26116 -25801
- package/lib/core/exporter.js +2 -4
- package/lib/core/host-schedulers/cache-cleanup.d.ts +41 -0
- package/lib/core/host-schedulers/cache-cleanup.js +45 -0
- package/lib/core/host-schedulers/lifecycle-hooks.d.ts +51 -0
- package/lib/core/host-schedulers/lifecycle-hooks.js +78 -0
- package/lib/core/host-schedulers/market-cache.d.ts +40 -0
- package/lib/core/host-schedulers/market-cache.js +92 -0
- package/lib/core/model-tools.js +2 -6
- package/lib/core/restore.d.ts +0 -2
- package/lib/core/restore.js +16 -18
- package/lib/core/verify-recovery.js +4 -7
- package/lib/index.d.ts +3 -22
- package/lib/index.js +69 -325
- package/lib/profiles/dsh-profile-manager.d.ts +23 -1
- package/lib/profiles/dsh-profile-manager.js +70 -2
- package/lib/routes/kit.d.ts +21 -0
- package/lib/routes/kit.js +29 -0
- package/lib/routes/prefs.js +6 -6
- package/lib/routes/recovery.js +25 -41
- package/lib/routes/route-support.d.ts +23 -1
- package/lib/routes/route-support.js +185 -0
- package/lib/routes/snapshots.js +4 -11
- package/lib/routes/sync.js +5 -7
- package/lib/security/redaction.d.ts +5 -1
- package/lib/security/redaction.js +26 -23
- package/lib/sync/backup-scheduler.js +2 -6
- package/lib/ui/backup-inspect.d.ts +1 -1
- package/lib/ui/dsh-profiles-view.d.ts +0 -10
- package/lib/ui/dsh-profiles-view.js +3 -7
- package/lib/ui/snapshots-view.d.ts +0 -14
- package/lib/ui/snapshots-view.js +16 -2
- package/lib/utils/paths.d.ts +20 -4
- package/lib/utils/paths.js +22 -6
- package/lib/utils/time.d.ts +31 -0
- package/lib/utils/time.js +54 -0
- package/package.json +1 -1
- package/src/cli/actions.ts +2 -3
- package/src/cli/import-source.ts +2 -7
- package/src/cli/index.ts +2 -3
- package/src/client/about/AboutPanel.tsx +1 -1
- package/src/client/about/ReleaseBody.tsx +22 -52
- package/src/client/about/ReleaseNotesDialog.tsx +15 -69
- package/src/client/about/release-notes-view.ts +4 -11
- package/src/client/common/info-hint-guard.test.ts +11 -5
- package/src/client/common/ui.tsx +23 -0
- package/src/client/config-manager.module.css +201 -32
- package/src/client/css-token-guard.test.ts +135 -1
- package/src/client/import/ConflictList.tsx +3 -3
- package/src/client/import/ImportWizardView.tsx +1 -1
- package/src/client/library/ArtifactRow.tsx +2 -2
- package/src/client/library/RestorePlanView.tsx +21 -9
- package/src/client/library/report-dismiss.test.ts +5 -3
- package/src/client/locales/about.ts +97 -0
- package/src/client/locales/backup.ts +141 -0
- package/src/client/locales/common.ts +113 -0
- package/src/client/locales/export.ts +184 -0
- package/src/client/locales/foreign.ts +184 -0
- package/src/client/locales/import-compat.ts +32 -0
- package/src/client/locales/import.ts +192 -0
- package/src/client/locales/next-steps.ts +25 -0
- package/src/client/locales/overview-control.ts +32 -0
- package/src/client/locales/overview.ts +145 -0
- package/src/client/locales/profiles.ts +263 -0
- package/src/client/locales/report.ts +17 -0
- package/src/client/locales/restore.ts +132 -0
- package/src/client/locales/sessions.ts +257 -0
- package/src/client/locales/shell.ts +149 -0
- package/src/client/locales.ts +49 -1783
- package/src/client/market/MarketImportReview.tsx +2 -2
- package/src/client/market/MarketPanel.tsx +1 -1
- package/src/client/market/market-view.ts +3 -5
- package/src/client/recovery/RecoveryPanel.tsx +62 -1054
- package/src/client/recovery/SessionHealthCard.tsx +134 -0
- package/src/client/recovery/SessionHealthDialog.tsx +665 -0
- package/src/client/recovery/SessionLayoutSection.tsx +284 -0
- package/src/client/recovery/recovery-api.ts +10 -1
- package/src/client/recovery/recovery-panel-layout.test.ts +20 -5
- package/src/client/recovery/session-dialog-mount.test.ts +16 -9
- package/src/client/recovery/use-recovery-write.test.ts +90 -0
- package/src/client/recovery/use-recovery-write.ts +53 -0
- package/src/client/run-store.ts +57 -2
- package/src/client/sync/PushPreviewCard.tsx +2 -2
- package/src/client/sync/SyncConfirmView.tsx +5 -5
- package/src/client/sync/SyncLogList.tsx +2 -2
- package/src/client/sync/history-model.ts +4 -5
- package/src/client/sync/sync-view.ts +3 -4
- package/src/core/exporter.ts +2 -4
- package/src/core/host-schedulers/cache-cleanup.test.ts +84 -0
- package/src/core/host-schedulers/cache-cleanup.ts +74 -0
- package/src/core/host-schedulers/lifecycle-hooks.test.ts +111 -0
- package/src/core/host-schedulers/lifecycle-hooks.ts +118 -0
- package/src/core/host-schedulers/market-cache.test.ts +93 -0
- package/src/core/host-schedulers/market-cache.ts +116 -0
- package/src/core/model-tools.ts +2 -7
- package/src/core/restore-failure-state.test.ts +210 -0
- package/src/core/restore.ts +16 -18
- package/src/core/verify-recovery.ts +4 -7
- package/src/index.ts +76 -330
- package/src/profiles/dsh-profile-copy-rollback.test.ts +156 -0
- package/src/profiles/dsh-profile-manager.ts +71 -3
- package/src/routes/kit.ts +37 -0
- package/src/routes/prefs.ts +6 -6
- package/src/routes/recovery.ts +25 -42
- package/src/routes/route-support.ts +208 -1
- package/src/routes/snapshots.ts +4 -9
- package/src/routes/sync.ts +4 -7
- package/src/security/redaction.ts +29 -23
- package/src/sync/backup-scheduler.ts +3 -6
- package/src/sync/sync-config.test.ts +24 -13
- package/src/ui/backup-inspect.ts +1 -1
- package/src/ui/dsh-profiles-view.ts +3 -5
- package/src/ui/i18n.test.ts +8 -3
- package/src/ui/snapshots-view.ts +2 -2
- package/src/utils/paths.test.ts +36 -1
- package/src/utils/paths.ts +30 -6
- package/src/utils/time.test.ts +46 -0
- package/src/utils/time.ts +55 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Manager 字典分域 · 导出(加密、文件名)与内容选择器(含插件树、分组显示名)。
|
|
3
|
+
*
|
|
4
|
+
* tech-debt #22(2026-11 拆分):本文件只承载该域键值;聚合与键顺序由 ../locales.ts 编排。
|
|
5
|
+
* 约束:zh 文案逐字保留、en 一键一镜像(`Record<keyof typeof zh, string>` 编译期校验),
|
|
6
|
+
* 键集合由 src/core/engine-locale.test.ts 的既有键冻结指纹兜底。本文件零依赖、零 import。
|
|
7
|
+
*/
|
|
8
|
+
export const zh = {
|
|
9
|
+
// —— 导出 ——
|
|
10
|
+
'export.hint': '默认导出推荐分区(可迁移、不含设备专属数据)。',
|
|
11
|
+
'export.encrypt': '加密备份',
|
|
12
|
+
'export.encryptHint': '用密码加密整个备份文件(AES-256-GCM)。密码仅用于本次加密,不会写入备份或任何配置文件;导入时必须输入该密码才能解锁。',
|
|
13
|
+
'export.password': '备份加密密码',
|
|
14
|
+
'export.passwordConfirm': '确认密码',
|
|
15
|
+
'export.passwordMismatch': '两次输入的密码不一致',
|
|
16
|
+
'export.passwordRequired': '加密备份必须设置密码',
|
|
17
|
+
'export.includeSecrets': '导出密钥',
|
|
18
|
+
'export.includeSecretsHint': '把真实密钥(凭据值)写入备份。密钥必须以加密形式保存:勾选时会自动选中「加密备份」;取消「加密备份」会同时取消「导出密钥」。',
|
|
19
|
+
'export.run': '开始导出',
|
|
20
|
+
'export.download': '下载备份文件',
|
|
21
|
+
'export.saved': '已保存到下载目录:{name}',
|
|
22
|
+
'export.selectionWarnings': '以下分区为设备相关数据,跨设备导入时可能不适用:',
|
|
23
|
+
'export.fileName': '自定义文件名',
|
|
24
|
+
'export.fileNameHint': '留空自动命名(dsh-config-<日期>.zip);无需手动输入 .zip 后缀,保存时自动补全。仅允许字母数字、空格、- _ .。',
|
|
25
|
+
'export.fileNameInvalid': '文件名不合法:仅允许字母数字、空格、- _ .,不能包含路径分隔符。',
|
|
26
|
+
'export.note': '备注',
|
|
27
|
+
'export.notePlaceholder': '例如:迁移前的完整备份 / 2026-08 存档',
|
|
28
|
+
'export.noteHint': '备注保存在本机备份列表中(随配置备份迁移),便于区分多个导出产物。',
|
|
29
|
+
'export.compositionTitle': '本次将导出',
|
|
30
|
+
'export.compositionHint': '按当前勾选估算(只读预览,零写入)',
|
|
31
|
+
'export.compositionPartial': '将导出 {sections} 个分区 · 已读取 {units} 个条目 · 约 {size}(含未读取分区,实际不少于该值)',
|
|
32
|
+
'export.compositionEmpty': '没有勾选任何可导出的内容',
|
|
33
|
+
// —— 内容选择器(Phase 1 条目级导出选择)——
|
|
34
|
+
'picker.title': '选择要导出的内容',
|
|
35
|
+
'picker.search': '搜索分区或条目…',
|
|
36
|
+
'picker.selectAll': '全选',
|
|
37
|
+
'picker.selectNone': '全不选',
|
|
38
|
+
'picker.expand': '展开',
|
|
39
|
+
'picker.collapse': '收起',
|
|
40
|
+
'picker.partial': '部分',
|
|
41
|
+
'picker.blankSession': '新会话',
|
|
42
|
+
'picker.highRisk': '高风险',
|
|
43
|
+
'picker.highRiskHint': '该分区来自公共仓库、未经官方审核:勾选后会在本机安装插件 / 写入文件 / 注入全局指令。导入前会创建可回滚快照,风险由你确认。',
|
|
44
|
+
'picker.locked': '捆绑',
|
|
45
|
+
'picker.lockedHint': '与同组条目必须一起导出(例如 pnpm patch 声明与其补丁文件),取消任一都会整组取消。',
|
|
46
|
+
'picker.selectedOf': '已选 {selected}/{total}',
|
|
47
|
+
'picker.fileCount': '{count} 个文件',
|
|
48
|
+
'picker.summary': '将导出 {sections} 个分区 · {units} 个条目 · 约 {size}',
|
|
49
|
+
'picker.loading': '正在读取可导出的条目…',
|
|
50
|
+
'picker.loadingItems': '正在读取条目…',
|
|
51
|
+
'picker.loadingSection': '读取中…',
|
|
52
|
+
'picker.empty': '没有匹配的分区或条目',
|
|
53
|
+
'picker.sessionWorkspaceLinked': '会话与工作区联动勾选:勾上会话会自动勾上它所属的工作区;取消工作区会取消它的会话',
|
|
54
|
+
'picker.unitsUnavailable': '部分分区的条目清单读取失败,这些分区将整体导出。',
|
|
55
|
+
'picker.sectionLoadFailed': '读取失败 · 将整体导出',
|
|
56
|
+
'picker.deviceSpecific': '设备相关',
|
|
57
|
+
'picker.sensitive': '敏感',
|
|
58
|
+
'picker.showAll': '显示全部(共 {count} 条)',
|
|
59
|
+
'picker.summaryImport': '{sections} 个分区 · {units} 个条目',
|
|
60
|
+
// —— 「插件与扩展」组内嵌的插件树(插件 → 清单条目 / 数据目录 / 大文件)——
|
|
61
|
+
'picker.pluginRoot': '插件',
|
|
62
|
+
'picker.pluginLeafPlugin': '插件清单条目',
|
|
63
|
+
'picker.pluginLeafConfig': '数据目录(配置)',
|
|
64
|
+
'picker.pluginLeafAssets': '大文件(壁纸 / 数据库)',
|
|
65
|
+
'picker.pluginAreaUnread': '未读取',
|
|
66
|
+
'picker.pluginAreaAbsent': '无内容',
|
|
67
|
+
'picker.bucketPlugins': '插件分区的其他条目(补丁行 / pnpm-workspace.yaml)',
|
|
68
|
+
'picker.bucketLooseFiles': '未归属到插件的配置(~/.dsh 根)',
|
|
69
|
+
'picker.bucketHint': '这些条目没有可证明的插件归属,不猜;展开可逐条勾选。',
|
|
70
|
+
'picker.groupHint.extensions': '只列出能证明的归属(内置来源表 + 插件自述 dsh.dataDirs);没有包名信息的配置留在「未归属」。',
|
|
71
|
+
// 导出目录的分组标题(与 ui/types.ts 的 EXPORT_GROUPS 一一对应,顺序由它决定)
|
|
72
|
+
'group.general': '通用',
|
|
73
|
+
'group.ai': 'AI',
|
|
74
|
+
'group.extensions': '插件与扩展',
|
|
75
|
+
'group.mcp': 'MCP / 工具',
|
|
76
|
+
'group.customization': '定制',
|
|
77
|
+
'group.automation': '自动化',
|
|
78
|
+
'group.workspace': '工作区',
|
|
79
|
+
'group.ui': '界面',
|
|
80
|
+
'group.optional': '可选数据',
|
|
81
|
+
'import.nothingSelected': '未勾选任何内容',
|
|
82
|
+
'import.excludedByUser': '取消勾选 {count} 项(未导入、未入快照)',
|
|
83
|
+
'import.consult.hint': '只读分析:先看结论与依据,确认后再选择要导入的内容。',
|
|
84
|
+
'consult.title': '迁移前咨询',
|
|
85
|
+
'library.pullTitle': '拉取远端快照',
|
|
86
|
+
// 「拉取」不是只读预览:宿主把该快照落地成本机 ZIP 后**直接进导入向导**(拉取即导入)。
|
|
87
|
+
// 文案必须说清后半程,否则用户以为只是比对差异(2026-10-04 用户报告)。
|
|
88
|
+
'library.pulling': '正在拉取并导入…',
|
|
89
|
+
// 「下载」是另一条路:同样先拉取落地,但不进向导,而是交给浏览器下载到「下载」目录。
|
|
90
|
+
'library.downloadTitle': '下载远端快照',
|
|
91
|
+
'library.downloading': '正在拉取并下载…',
|
|
92
|
+
|
|
93
|
+
'import.consult.unavailable': '暂时无法生成咨询报告(不影响继续导入)。',
|
|
94
|
+
'import.picker.title': '选择要导入的内容',
|
|
95
|
+
'import.picker.hint': '不勾选的条目不会被导入、也不会进快照;随时可以回到这一步修改。',
|
|
96
|
+
} as const;
|
|
97
|
+
|
|
98
|
+
export const en: Record<keyof typeof zh, string> = {
|
|
99
|
+
'export.hint': 'Exports the recommended sections by default (portable, no device-specific data).',
|
|
100
|
+
'export.encrypt': 'Encrypt backup',
|
|
101
|
+
'export.encryptHint': 'Encrypt the entire backup file with a password (AES-256-GCM). The password is used once and never written into the backup or any config file; it is required to unlock the backup on import.',
|
|
102
|
+
'export.password': 'Backup encryption password',
|
|
103
|
+
'export.passwordConfirm': 'Confirm password',
|
|
104
|
+
'export.passwordMismatch': 'Passwords do not match',
|
|
105
|
+
'export.passwordRequired': 'An encryption password is required when encrypting the backup',
|
|
106
|
+
'export.includeSecrets': 'Export secrets',
|
|
107
|
+
'export.includeSecretsHint': 'Write the real secrets (credential values) into the backup. Secrets must be stored encrypted: checking this also checks \u201cEncrypt backup\u201d; unchecking \u201cEncrypt backup\u201d unchecks this.',
|
|
108
|
+
'export.run': 'Start Export',
|
|
109
|
+
'export.download': 'Download backup file',
|
|
110
|
+
'export.saved': 'Saved to downloads: {name}',
|
|
111
|
+
'export.selectionWarnings': 'Device-specific sections may not apply on another machine:',
|
|
112
|
+
'export.fileName': 'Custom file name',
|
|
113
|
+
'export.fileNameHint': 'Leave empty to auto-name (dsh-config-<date>.zip); no need to type .zip — it is appended automatically. Letters, digits, spaces, - _ . only.',
|
|
114
|
+
'export.fileNameInvalid': 'Invalid file name: letters, digits, spaces, - _ . only, no path separators.',
|
|
115
|
+
'export.note': 'Note',
|
|
116
|
+
'export.notePlaceholder': 'e.g. Full backup before migration / 2026-08 archive',
|
|
117
|
+
'export.noteHint': 'The note is shown in the local backup list (and travels with the config backup) so you can tell exports apart.',
|
|
118
|
+
'export.compositionTitle': 'This export',
|
|
119
|
+
'export.compositionHint': 'Estimated from the current selection (read-only, zero writes)',
|
|
120
|
+
'export.compositionPartial': '{sections} {sections, plural, section|sections} · {units} {units, plural, item|items} read · ~{size} (includes sections not read yet; the real total is no less)',
|
|
121
|
+
'export.compositionEmpty': 'Nothing selected to export',
|
|
122
|
+
// —— Content picker (Phase 1: per-item export selection) ——
|
|
123
|
+
'picker.title': 'Choose what to export',
|
|
124
|
+
'picker.search': 'Search sections or items…',
|
|
125
|
+
'picker.selectAll': 'Select all',
|
|
126
|
+
'picker.selectNone': 'Select none',
|
|
127
|
+
'picker.expand': 'Expand',
|
|
128
|
+
'picker.collapse': 'Collapse',
|
|
129
|
+
'picker.partial': 'Partial',
|
|
130
|
+
'picker.blankSession': 'New Session',
|
|
131
|
+
'picker.highRisk': 'High risk',
|
|
132
|
+
'picker.highRiskHint': 'This section comes from a public repository without official review: selecting it installs plugins / writes files / injects global instructions on this machine. A rollback snapshot is taken before import, so the risk stays yours to confirm.',
|
|
133
|
+
'picker.locked': 'Bundle',
|
|
134
|
+
'picker.lockedHint': 'Must be exported together with its group (e.g. a pnpm patch declaration and its patch file); clearing either clears the whole group.',
|
|
135
|
+
'picker.selectedOf': '{selected}/{total} selected',
|
|
136
|
+
'picker.fileCount': '{count} {count, plural, file|files}',
|
|
137
|
+
'picker.summary': 'Exporting {sections} {sections, plural, section|sections} · {units} {units, plural, item|items} · ~{size}',
|
|
138
|
+
'picker.loading': 'Reading exportable items…',
|
|
139
|
+
'picker.loadingItems': 'Reading items…',
|
|
140
|
+
'picker.loadingSection': 'Loading…',
|
|
141
|
+
'picker.empty': 'No matching sections or items',
|
|
142
|
+
'picker.sessionWorkspaceLinked': 'Session and workspace selection are linked: checking a session also checks the workspace that owns it; unchecking a workspace unchecks its sessions',
|
|
143
|
+
'picker.unitsUnavailable': 'Item lists failed to load for some sections; those will be exported as a whole.',
|
|
144
|
+
'picker.sectionLoadFailed': 'Load failed · exported as a whole',
|
|
145
|
+
'picker.deviceSpecific': 'Device-specific',
|
|
146
|
+
'picker.sensitive': 'Sensitive',
|
|
147
|
+
'picker.showAll': 'Show all ({count})',
|
|
148
|
+
'picker.summaryImport': '{sections} {sections, plural, section|sections} · {units} {units, plural, item|items}',
|
|
149
|
+
// —— Plugin tree embedded in the Extensions group (plugin → list entry / data dirs / large files) ——
|
|
150
|
+
'picker.pluginRoot': 'Plugins',
|
|
151
|
+
'picker.pluginLeafPlugin': 'Plugin list entry',
|
|
152
|
+
'picker.pluginLeafConfig': 'Data dir (config)',
|
|
153
|
+
'picker.pluginLeafAssets': 'Large files (wallpapers / databases)',
|
|
154
|
+
'picker.pluginAreaUnread': 'Not read yet',
|
|
155
|
+
'picker.pluginAreaAbsent': 'No content',
|
|
156
|
+
'picker.bucketPlugins': 'Other entries of the plugins section (patch lines / pnpm-workspace.yaml)',
|
|
157
|
+
'picker.bucketLooseFiles': 'Config not attributable to a plugin (~/.dsh root)',
|
|
158
|
+
'picker.bucketHint': 'These entries have no provable plugin ownership — we never guess; expand to tick them one by one.',
|
|
159
|
+
'picker.groupHint.extensions': 'Only provable ownership is listed (built-in source table + plugins that declare dsh.dataDirs); config without a package name stays under "unowned".',
|
|
160
|
+
// Export catalog group titles (mirror of ui/types.ts EXPORT_GROUPS; it decides the order)
|
|
161
|
+
'group.general': 'General',
|
|
162
|
+
'group.ai': 'AI',
|
|
163
|
+
'group.extensions': 'Extensions',
|
|
164
|
+
'group.mcp': 'MCP / Tools',
|
|
165
|
+
'group.customization': 'Customization',
|
|
166
|
+
'group.automation': 'Automation',
|
|
167
|
+
'group.workspace': 'Workspace',
|
|
168
|
+
'group.ui': 'UI',
|
|
169
|
+
'group.optional': 'Optional Data',
|
|
170
|
+
'import.nothingSelected': 'Nothing selected',
|
|
171
|
+
'import.excludedByUser': '{count} deselected (not imported, not snapshotted)',
|
|
172
|
+
'import.consult.hint': 'Read-only analysis: review the verdict and its evidence first, then choose what to import.',
|
|
173
|
+
'consult.title': 'Pre-migration consultation',
|
|
174
|
+
'library.pullTitle': 'Pull remote snapshot',
|
|
175
|
+
// "Pull" is not a read-only preview: the host stages the snapshot as a local ZIP and goes
|
|
176
|
+
// straight into the import wizard (pull-then-import), so the text must say so.
|
|
177
|
+
'library.pulling': 'Pulling and importing…',
|
|
178
|
+
'library.downloadTitle': 'Download remote snapshot',
|
|
179
|
+
'library.downloading': 'Pulling and downloading…',
|
|
180
|
+
|
|
181
|
+
'import.consult.unavailable': 'The consultation report is unavailable right now (importing can still continue).',
|
|
182
|
+
'import.picker.title': 'Choose what to import',
|
|
183
|
+
'import.picker.hint': 'Unchecked items are neither imported nor snapshotted; you can come back to this step anytime.',
|
|
184
|
+
};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Manager 字典分域 · 外部 agent 导入(Claude Code / Hermes / Cursor / Codex / Copilot / Antigravity)。
|
|
3
|
+
*
|
|
4
|
+
* tech-debt #22(2026-11 拆分):本文件只承载该域键值;聚合与键顺序由 ../locales.ts 编排。
|
|
5
|
+
* 约束:zh 文案逐字保留、en 一键一镜像(`Record<keyof typeof zh, string>` 编译期校验),
|
|
6
|
+
* 键集合由 src/core/engine-locale.test.ts 的既有键冻结指纹兜底。本文件零依赖、零 import。
|
|
7
|
+
*/
|
|
8
|
+
export const zh = {
|
|
9
|
+
// ---------- 外部 agent 导入(2026-10-04:Claude Code / Hermes / Cursor / Codex / Copilot / Antigravity) ----------
|
|
10
|
+
// t16(GUI 静态资产):**契约在先** —— 文案覆盖全部冻结来源(配置类 6 + 会话类 24)与全部 skip 码;
|
|
11
|
+
// t17 的组件只做 key → 文案映射(禁止渲染裸机器码),因此这里必须逐码覆盖,缺一个即「用户看见机器码」。
|
|
12
|
+
'foreign.source.title': '从其它 agent 导入',
|
|
13
|
+
'foreign.source.hint': '读取本机已装的其它 agent 配置,先看清将导入什么,再交给既有的导入向导(分析只读,零写入)。',
|
|
14
|
+
'foreign.source.loading': '正在检测本机配置…',
|
|
15
|
+
'foreign.source.empty': '未检测到任何可导入的其它 agent 配置。',
|
|
16
|
+
'foreign.source.unknown': '未识别的来源。',
|
|
17
|
+
// 来源显示名(与 registry 的 labelKey 同源,不得借用 SectionId 名字)
|
|
18
|
+
'foreign.source.claude-code': 'Claude Code',
|
|
19
|
+
'foreign.source.hermes': 'Hermes',
|
|
20
|
+
'foreign.source.cursor': 'Cursor',
|
|
21
|
+
'foreign.source.codex': 'Codex CLI',
|
|
22
|
+
'foreign.source.copilot': 'GitHub Copilot CLI',
|
|
23
|
+
'foreign.source.antigravity': 'Google Antigravity',
|
|
24
|
+
// 会话类来源(档 B,2026-10-05;顺序 = ForeignSourceId union)
|
|
25
|
+
'foreign.source.gemini': 'Gemini CLI',
|
|
26
|
+
'foreign.source.reasonix': 'Reasonix',
|
|
27
|
+
'foreign.source.opencode': 'OpenCode',
|
|
28
|
+
'foreign.source.mimocode': 'MimoCode',
|
|
29
|
+
'foreign.source.zcode': 'ZCode',
|
|
30
|
+
'foreign.source.grokbuild': 'Grok Build',
|
|
31
|
+
'foreign.source.openclaw': 'OpenClaw',
|
|
32
|
+
'foreign.source.pi': 'Pi',
|
|
33
|
+
'foreign.source.kimi': 'Kimi CLI',
|
|
34
|
+
'foreign.source.kilocode': 'Kilo Code',
|
|
35
|
+
'foreign.source.qoder': 'Qoder',
|
|
36
|
+
'foreign.source.chatgpt': 'ChatGPT',
|
|
37
|
+
'foreign.source.workbuddy': 'WorkBuddy',
|
|
38
|
+
'foreign.source.qwen': '千问办公',
|
|
39
|
+
'foreign.source.continue': 'Continue',
|
|
40
|
+
'foreign.source.cline': 'Cline',
|
|
41
|
+
'foreign.source.goose': 'Goose',
|
|
42
|
+
'foreign.source.dsh4': 'DSH 会话日志(V4 代次)',
|
|
43
|
+
'foreign.source.zed': 'Zed',
|
|
44
|
+
'foreign.source.crush': 'Crush',
|
|
45
|
+
'foreign.source.teleagent': 'TeleAgent',
|
|
46
|
+
'foreign.source.trae': 'Trae',
|
|
47
|
+
'foreign.source.vibe': 'Vibe',
|
|
48
|
+
'foreign.source.dsh': 'DSH 会话日志(V0-V3 代次)',
|
|
49
|
+
// 导入过程(复用既有向导:宿主把外部配置翻译成临时 bundle 后走同一条流水线)
|
|
50
|
+
'foreign.action.import': '开始导入',
|
|
51
|
+
'foreign.action.refresh': '重新检测',
|
|
52
|
+
'foreign.importFailed': '导入失败:{reason}',
|
|
53
|
+
'foreign.previewTitle': '将导入的内容',
|
|
54
|
+
'foreign.previewSections': '包含分区:{sections}',
|
|
55
|
+
'foreign.previewDryRun': '只读预览:不会写入任何配置。',
|
|
56
|
+
// F-3:任何输入变化都作废上一次的产包结果(照 dsh-movein 的 resetPreview 语义),
|
|
57
|
+
// 并留下可见反馈 —— 否则用户会以为结果被静默吞掉。
|
|
58
|
+
'foreign.previewReset': '来源已变化:上一次的产包结果作废,请重新「开始导入」。',
|
|
59
|
+
// 三类已知有损(F-5)的**卡片 chrome**(标题 / 导语 / 适用性徽章);逐条文案在
|
|
60
|
+
// src/ui/i18n.ts(由 src/ui/foreign-view.ts 的 foreignLossyRows 渲染)。
|
|
61
|
+
'foreign.lossy.title': '已知有损',
|
|
62
|
+
'foreign.lossy.hint': '下面三条是「外部配置 → bundle → 导入」这条流水线的既有行为:都不阻断导入,兼容性评分也不会为它们给出原因。',
|
|
63
|
+
'foreign.lossy.applies': '本包适用',
|
|
64
|
+
'foreign.lossy.notApplies': '本包不涉及',
|
|
65
|
+
'foreign.credentialRefs': '需补录凭据 {count} 项(值未带出)',
|
|
66
|
+
'foreign.credentialRefsNone': '无需补录凭据',
|
|
67
|
+
// 未迁移内容(机器码 → 文案;键名 = 'foreign.skip.<机器码>',缺键即编译期红灯)
|
|
68
|
+
'foreign.skipped': '未迁移 {count} 项',
|
|
69
|
+
'foreign.skip.unsupported-hooks': 'settings 的 hooks:DSH 无对等结构,未迁移',
|
|
70
|
+
'foreign.skip.unsupported-commands': '斜杠命令:与 DSH 提示词不是同一语义,本次未迁移',
|
|
71
|
+
'foreign.skip.credentials-not-migrated': '凭据字段只记录名字,值不读取也不迁移',
|
|
72
|
+
'foreign.skip.skill-missing-file': '技能目录缺少 SKILL.md,未迁移',
|
|
73
|
+
'foreign.skip.skill-invalid-frontmatter': '技能 frontmatter 非法(缺 name/description 或不是合法 YAML),DSH 会静默丢弃,故未迁移',
|
|
74
|
+
'foreign.skip.skill-invalid-name': '技能名含非法字符或路径穿越,未迁移',
|
|
75
|
+
'foreign.skip.mcp-server-empty': 'MCP 条目既无 command 也无 url,未迁移',
|
|
76
|
+
'foreign.skip.mcp-type-sse-coerced': 'MCP type=sse:按带 url 的 http 处理',
|
|
77
|
+
'foreign.skip.mcp-credential-redacted': 'MCP 值里发现凭据字段:值已丢弃,只保留字段名与引用名',
|
|
78
|
+
'foreign.skip.source-unreadable': '外部文件读不到、超限或解析失败',
|
|
79
|
+
'foreign.skip.source-empty-file': '配置文件存在但为空(0 字节):如实上报,不产出空分区',
|
|
80
|
+
'foreign.skip.source-location-overridden': '配置位置被环境变量覆盖,按覆盖后的位置读取',
|
|
81
|
+
'foreign.skip.session-cwd-derived': '会话记录里没有 cwd:按源侧目录名推导出工作目录,且该目录在本机确实存在(推不出来的一律按「缺少 cwd」跳过)',
|
|
82
|
+
'foreign.skip.source-needs-explicit-path': '该来源没有自动探测位置:必须显式提供导出文件路径(自动探测永远不会命中)',
|
|
83
|
+
'foreign.skip.session-format-version-unknown': '本机 DSH 会话格式版本未知:不猜版本,整批会话未迁移',
|
|
84
|
+
'foreign.skip.session-format-unsupported': '本机 DSH 会话格式版本不受支持,该会话未迁移',
|
|
85
|
+
'foreign.skip.session-missing-cwd': '会话记录缺少 cwd,无法归位到工作区',
|
|
86
|
+
'foreign.skip.session-unsafe-id': '会话文件名不能作为安全路径段,未迁移',
|
|
87
|
+
'foreign.skip.session-empty': '会话没有任何可迁移的事件',
|
|
88
|
+
'foreign.skip.session-unparsable': '会话存在解析不出来的行,未迁移',
|
|
89
|
+
'foreign.skip.unsupported-session-record': '该类型的会话记录本版不迁移',
|
|
90
|
+
'foreign.skip.session-id-conflict': '同 id 会话已存在:不覆盖,跳过并保留本机既有的那条',
|
|
91
|
+
'foreign.skip.skill-id-conflict': '技能重名:先到先得,其余跳过',
|
|
92
|
+
'foreign.skip.sessions-not-migrated': '该来源的对话存储形态本版不迁移(只报告,不产出会话分区)',
|
|
93
|
+
'foreign.skip.memory-report-only': '记忆文件只报告、不导入(正文不进备份包)',
|
|
94
|
+
'foreign.skip.skill-category-flattened': '技能带分类层级:已压平为 DSH 的单层技能目录',
|
|
95
|
+
'foreign.skip.legacy-rules-file': '旧式规则文件:DSH 无对等结构,只报告',
|
|
96
|
+
'foreign.skip.instructions-merged': '多份指令源被合并为一个全局指令文件',
|
|
97
|
+
'foreign.skip.instructions-override-selected': '命中更高优先级的指令文件(override),按它导入',
|
|
98
|
+
// 冲突语义(用户决策:同 id 不覆盖、跳过并报码)
|
|
99
|
+
'foreign.conflict.policy': '同 id 冲突不覆盖本机内容:跳过并逐条报告',
|
|
100
|
+
} as const;
|
|
101
|
+
|
|
102
|
+
export const en: Record<keyof typeof zh, string> = {
|
|
103
|
+
// ---------- Importing from other agents (2026-10-04) ----------
|
|
104
|
+
'foreign.source.title': 'Import from another agent',
|
|
105
|
+
'foreign.source.hint': 'Read the other agents installed on this machine, review what will be imported, then hand it to the existing import wizard (analysis is read-only, zero writes).',
|
|
106
|
+
'foreign.source.loading': 'Detecting local configuration…',
|
|
107
|
+
'foreign.source.empty': 'No importable configuration from another agent was detected.',
|
|
108
|
+
'foreign.source.unknown': 'Unrecognised source.',
|
|
109
|
+
'foreign.source.claude-code': 'Claude Code',
|
|
110
|
+
'foreign.source.hermes': 'Hermes',
|
|
111
|
+
'foreign.source.cursor': 'Cursor',
|
|
112
|
+
'foreign.source.codex': 'Codex CLI',
|
|
113
|
+
'foreign.source.copilot': 'GitHub Copilot CLI',
|
|
114
|
+
'foreign.source.antigravity': 'Google Antigravity',
|
|
115
|
+
// Conversation sources (cohort B, 2026-10-05): same order as the ForeignSourceId union
|
|
116
|
+
'foreign.source.gemini': 'Gemini CLI',
|
|
117
|
+
'foreign.source.reasonix': 'Reasonix',
|
|
118
|
+
'foreign.source.opencode': 'OpenCode',
|
|
119
|
+
'foreign.source.mimocode': 'MimoCode',
|
|
120
|
+
'foreign.source.zcode': 'ZCode',
|
|
121
|
+
'foreign.source.grokbuild': 'Grok Build',
|
|
122
|
+
'foreign.source.openclaw': 'OpenClaw',
|
|
123
|
+
'foreign.source.pi': 'Pi',
|
|
124
|
+
'foreign.source.kimi': 'Kimi CLI',
|
|
125
|
+
'foreign.source.kilocode': 'Kilo Code',
|
|
126
|
+
'foreign.source.qoder': 'Qoder',
|
|
127
|
+
'foreign.source.chatgpt': 'ChatGPT',
|
|
128
|
+
'foreign.source.workbuddy': 'WorkBuddy',
|
|
129
|
+
'foreign.source.qwen': 'Qwen Work',
|
|
130
|
+
'foreign.source.continue': 'Continue',
|
|
131
|
+
'foreign.source.cline': 'Cline',
|
|
132
|
+
'foreign.source.goose': 'Goose',
|
|
133
|
+
'foreign.source.dsh4': 'DSH session logs (V4)',
|
|
134
|
+
'foreign.source.zed': 'Zed',
|
|
135
|
+
'foreign.source.crush': 'Crush',
|
|
136
|
+
'foreign.source.teleagent': 'TeleAgent',
|
|
137
|
+
'foreign.source.trae': 'Trae',
|
|
138
|
+
'foreign.source.vibe': 'Vibe',
|
|
139
|
+
'foreign.source.dsh': 'DSH session logs (V0-V3)',
|
|
140
|
+
'foreign.action.import': 'Start import',
|
|
141
|
+
'foreign.action.refresh': 'Detect again',
|
|
142
|
+
'foreign.importFailed': 'Import failed: {reason}',
|
|
143
|
+
'foreign.previewTitle': 'What will be imported',
|
|
144
|
+
'foreign.previewSections': 'Sections included: {sections}',
|
|
145
|
+
'foreign.previewDryRun': 'Read-only preview: nothing is written.',
|
|
146
|
+
'foreign.previewReset': 'The source changed: the last preview was discarded — start the import again.',
|
|
147
|
+
'foreign.lossy.title': 'Known lossy behaviour',
|
|
148
|
+
'foreign.lossy.hint': 'These three behaviours are built into the "external config → bundle → import" pipeline: none of them blocks the import, and the compatibility score never explains them.',
|
|
149
|
+
'foreign.lossy.applies': 'Applies here',
|
|
150
|
+
'foreign.lossy.notApplies': 'Not applicable here',
|
|
151
|
+
'foreign.credentialRefs': '{count} {count, plural, credential|credentials} to re-enter (values never travel)',
|
|
152
|
+
'foreign.credentialRefsNone': 'No credentials to enter',
|
|
153
|
+
'foreign.skipped': '{count} {count, plural, item|items} not migrated',
|
|
154
|
+
'foreign.skip.unsupported-hooks': 'settings hooks: DSH has no equivalent, not migrated',
|
|
155
|
+
'foreign.skip.unsupported-commands': 'Slash commands: not the same thing as DSH prompts, not migrated this round',
|
|
156
|
+
'foreign.skip.credentials-not-migrated': 'Credential fields: only the names are recorded; the values are never read or migrated',
|
|
157
|
+
'foreign.skip.skill-missing-file': 'Skill directory has no SKILL.md, not migrated',
|
|
158
|
+
'foreign.skip.skill-invalid-frontmatter': 'Skill frontmatter is invalid (missing name/description or not valid YAML) and DSH would silently drop it, so it was not migrated',
|
|
159
|
+
'foreign.skip.skill-invalid-name': 'Skill name has illegal characters or path traversal, not migrated',
|
|
160
|
+
'foreign.skip.mcp-server-empty': 'MCP entry has neither command nor url, not migrated',
|
|
161
|
+
'foreign.skip.mcp-type-sse-coerced': 'MCP type=sse: treated as http with a url',
|
|
162
|
+
'foreign.skip.mcp-credential-redacted': 'Credential field found in an MCP value: the value was dropped, only the field name and reference name are kept',
|
|
163
|
+
'foreign.skip.source-unreadable': 'External file unreadable, over the size limit, or failed to parse',
|
|
164
|
+
'foreign.skip.source-empty-file': 'Config file exists but is empty (0 bytes): reported as-is, no empty section is produced',
|
|
165
|
+
'foreign.skip.source-location-overridden': 'Config location overridden by an environment variable; the overridden location was used',
|
|
166
|
+
'foreign.skip.session-cwd-derived': 'The session record has no cwd: the working directory was derived from the source-side path and verified to exist on this machine (anything unprovable is skipped as a missing cwd)',
|
|
167
|
+
'foreign.skip.source-needs-explicit-path': 'This source has no auto-detected location: you must supply the export file path explicitly (auto-detection never matches)',
|
|
168
|
+
'foreign.skip.session-format-version-unknown': 'This DSH build reports no session format version: the version is never guessed, so no session was migrated',
|
|
169
|
+
'foreign.skip.session-format-unsupported': 'This DSH build does not support that session format version, so the session was not migrated',
|
|
170
|
+
'foreign.skip.session-missing-cwd': 'Session record has no cwd, so it cannot be placed under a workspace',
|
|
171
|
+
'foreign.skip.session-unsafe-id': 'Session file name is not a safe path segment, not migrated',
|
|
172
|
+
'foreign.skip.session-empty': 'Session has no migratable events',
|
|
173
|
+
'foreign.skip.session-unparsable': 'Session has lines that cannot be parsed, not migrated',
|
|
174
|
+
'foreign.skip.unsupported-session-record': 'This kind of session record is not migrated in this version',
|
|
175
|
+
'foreign.skip.session-id-conflict': 'A session with the same id already exists: it is skipped without overwriting, and the local one is kept',
|
|
176
|
+
'foreign.skip.skill-id-conflict': 'Duplicate skill name: first one wins, the rest are skipped',
|
|
177
|
+
'foreign.skip.sessions-not-migrated': 'This source stores conversations in a form this version does not migrate (reported only; no sessions section is produced)',
|
|
178
|
+
'foreign.skip.memory-report-only': 'Memory files are reported only, never imported (their text does not enter the bundle)',
|
|
179
|
+
'foreign.skip.skill-category-flattened': 'Skill carried category levels: flattened into DSH\'s single-level skill folders',
|
|
180
|
+
'foreign.skip.legacy-rules-file': 'Legacy rules file: DSH has no equivalent, reported only',
|
|
181
|
+
'foreign.skip.instructions-merged': 'Several instruction sources were merged into one global instruction file',
|
|
182
|
+
'foreign.skip.instructions-override-selected': 'A higher-priority instruction file (override) was found and is the one imported',
|
|
183
|
+
'foreign.conflict.policy': 'Same-id conflicts never overwrite local content: skipped and listed in the report',
|
|
184
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Manager 字典分域 · 导入兼容性评分(Workbench Rebuild)。
|
|
3
|
+
*
|
|
4
|
+
* tech-debt #22(2026-11 拆分):本文件只承载该域键值;聚合与键顺序由 ../locales.ts 编排。
|
|
5
|
+
* 约束:zh 文案逐字保留、en 一键一镜像(`Record<keyof typeof zh, string>` 编译期校验),
|
|
6
|
+
* 键集合由 src/core/engine-locale.test.ts 的既有键冻结指纹兜底。本文件零依赖、零 import。
|
|
7
|
+
*/
|
|
8
|
+
export const zh = {
|
|
9
|
+
// —— 导入兼容性(Workbench Rebuild)——
|
|
10
|
+
'import.compatibility.sections': '{count} 个分区',
|
|
11
|
+
'import.compatibility.plugins': '已装 {installed} · 待装 {toInstall}',
|
|
12
|
+
'import.compatibility.paths': '{count} 项路径处理',
|
|
13
|
+
'import.compatibility.secrets': '{count} 项密钥补录',
|
|
14
|
+
'import.compatibility.score.excellent': '优秀',
|
|
15
|
+
'import.compatibility.score.good': '良好',
|
|
16
|
+
'import.compatibility.score.partial': '部分兼容',
|
|
17
|
+
'import.compatibility.score.unsupported': '不支持',
|
|
18
|
+
'import.compatibility.sectionsTitle': '备份包含的分区',
|
|
19
|
+
} as const;
|
|
20
|
+
|
|
21
|
+
export const en: Record<keyof typeof zh, string> = {
|
|
22
|
+
// —— Import compatibility (Workbench Rebuild) ——
|
|
23
|
+
'import.compatibility.sections': '{count} {count, plural, section|sections}',
|
|
24
|
+
'import.compatibility.plugins': 'installed {installed} · to install {toInstall}',
|
|
25
|
+
'import.compatibility.paths': '{count} path {count, plural, issue|issues}',
|
|
26
|
+
'import.compatibility.secrets': '{count} {count, plural, secret|secrets} to re-enter',
|
|
27
|
+
'import.compatibility.score.excellent': 'Excellent',
|
|
28
|
+
'import.compatibility.score.good': 'Good',
|
|
29
|
+
'import.compatibility.score.partial': 'Partial',
|
|
30
|
+
'import.compatibility.score.unsupported': 'Unsupported',
|
|
31
|
+
'import.compatibility.sectionsTitle': 'Sections in this backup',
|
|
32
|
+
};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Manager 字典分域 · 导入(计划、执行、冲突与导入向导)。
|
|
3
|
+
*
|
|
4
|
+
* tech-debt #22(2026-11 拆分):本文件只承载该域键值;聚合与键顺序由 ../locales.ts 编排。
|
|
5
|
+
* 约束:zh 文案逐字保留、en 一键一镜像(`Record<keyof typeof zh, string>` 编译期校验),
|
|
6
|
+
* 键集合由 src/core/engine-locale.test.ts 的既有键冻结指纹兜底。本文件零依赖、零 import。
|
|
7
|
+
*/
|
|
8
|
+
export const zh = {
|
|
9
|
+
// —— 导入 ——
|
|
10
|
+
'import.stage.select': '选择',
|
|
11
|
+
'import.stage.analyze': '分析',
|
|
12
|
+
'import.stage.decide': '预览与决策',
|
|
13
|
+
'import.stage.confirm': '确认',
|
|
14
|
+
'import.stage.execute': '执行',
|
|
15
|
+
'import.stage.done': '完成',
|
|
16
|
+
'import.stepper.label': '第 {current} 步,共 {total} 步:{label}',
|
|
17
|
+
'import.select.title': '选择备份文件',
|
|
18
|
+
'import.select.hint': '选择本机导出的 dsh-config-*.zip 备份文件开始导入。分析阶段只读,不会修改任何配置。',
|
|
19
|
+
'import.select.browse': '选择 ZIP 文件',
|
|
20
|
+
'import.select.reselect': '重新选择',
|
|
21
|
+
'import.select.cancel': '取消选择',
|
|
22
|
+
'import.select.file': '已选择:{name}',
|
|
23
|
+
'import.compatibility.title': '兼容性',
|
|
24
|
+
'import.compatibility.score': '兼容性评分:{score}',
|
|
25
|
+
'import.preview.title': '导入预览',
|
|
26
|
+
'import.preview.willChange': '将变更 {count} 项',
|
|
27
|
+
'import.preview.unchanged': '已一致跳过 {count} 项',
|
|
28
|
+
'import.preview.settings': '设置更新 {count}',
|
|
29
|
+
'import.preview.plugins': '插件待安装 {count}',
|
|
30
|
+
'import.preview.mcp': 'MCP 新增 {count}',
|
|
31
|
+
'import.preview.prompts': '提示词 {count}',
|
|
32
|
+
'import.preview.paths': '路径映射 {count}',
|
|
33
|
+
'import.preview.rebase': '已自动重定基(备份来自另一台机器的基础路径):{from} → {to};这一步不需要手工映射',
|
|
34
|
+
'import.preview.secrets': '密钥待补录 {count}',
|
|
35
|
+
'import.preview.conflicts': '冲突 {count}',
|
|
36
|
+
'import.preview.restart': '导入后需重启 DSH 生效',
|
|
37
|
+
'import.confirm.execute': '确认导入',
|
|
38
|
+
'import.confirm.warning': '导入会修改当前 DSH 配置,执行前自动创建快照。',
|
|
39
|
+
'import.confirm.warningNoRollback': '导入会修改当前 DSH 配置,执行前自动创建快照;已取消整体回滚 —— 单项失败会继续,已写入内容不回退。',
|
|
40
|
+
'import.confirm.encrypted': '将用备份密码解密并恢复 {count} 个凭据。',
|
|
41
|
+
'import.rollbackOnError': '失败时整体回滚(推荐)',
|
|
42
|
+
'import.log.title': '导入日志',
|
|
43
|
+
'import.log.empty': '等待命令输出…',
|
|
44
|
+
'import.log.newOutput': '↓ 新输出',
|
|
45
|
+
// 日志表头计数(把 500 行流水压成「成功/跳过/警告/失败」四个数)
|
|
46
|
+
'import.log.counts': '成功 {ok} · 跳过 {skip} · 警告 {warn} · 失败 {fail}',
|
|
47
|
+
'import.log.filterProblems': '只看问题',
|
|
48
|
+
'import.log.filterAll': '显示全部',
|
|
49
|
+
'import.log.problemsEmpty': '本次没有失败或警告的项',
|
|
50
|
+
// 结果页固定操作栏的收尾动作(替代原先埋在报告卡底部、被布局裁掉的「完成」)
|
|
51
|
+
'import.done': '完成',
|
|
52
|
+
'import.skipCurrent': '跳过当前插件',
|
|
53
|
+
'import.skipPending': '正在跳过…',
|
|
54
|
+
'import.retrySkipped': '重试失败/跳过的项 ({count})',
|
|
55
|
+
'import.secrets.title': '补录密钥',
|
|
56
|
+
'import.secrets.hint': '以下凭据未随备份导出(安全设计)。如需在目标 DSH 使用,请手动补录;留空将跳过。',
|
|
57
|
+
'import.secrets.optional': '(可选)',
|
|
58
|
+
'import.secrets.required': '(必需)',
|
|
59
|
+
'import.secrets.none': '无需补录密钥',
|
|
60
|
+
'import.decrypt.badge': '加密备份',
|
|
61
|
+
'import.decryptArchive.title': '解锁加密备份',
|
|
62
|
+
'import.decryptArchive.hint': '此备份已整体加密(整个文件被密码保护)。输入导出时设置的密码即可解密并继续导入——备份内的加密凭据也会用同一密码自动恢复,全程只需输入这一次密码;密码仅本次使用,绝不落盘。',
|
|
63
|
+
'import.decryptArchive.passwordPlaceholder': '输入备份加密密码',
|
|
64
|
+
'import.decryptArchive.unlock': '解锁并继续',
|
|
65
|
+
'import.decrypt.previewHint': '加密备份:凭据已由解锁密码自动恢复,无需再次输入密码。',
|
|
66
|
+
'import.conflicts.title': '解决冲突',
|
|
67
|
+
'import.conflicts.hint': '以下配置项在目标 DSH 已存在且与备份不同,请逐项决策。',
|
|
68
|
+
'import.conflicts.keepCurrent': '保留当前',
|
|
69
|
+
'import.conflicts.useImported': '使用备份',
|
|
70
|
+
'import.conflicts.review': '稍后决定',
|
|
71
|
+
'import.conflicts.severityError': '错误',
|
|
72
|
+
'import.conflicts.detailCurrent': '当前',
|
|
73
|
+
'import.conflicts.detailImported': '备份',
|
|
74
|
+
'import.conflicts.empty': '无冲突项',
|
|
75
|
+
'import.conflicts.unresolved': '还有 {count} 项未决策',
|
|
76
|
+
'import.conflicts.keepCurrentAll': '全部保留当前配置',
|
|
77
|
+
'import.conflicts.useImportedAll': '全部使用备份配置',
|
|
78
|
+
'import.paths.title': '路径映射',
|
|
79
|
+
'import.paths.hint': '备份中的绝对路径在目标机器可能不存在,请为每条路径指定新位置(留空将跳过该路径)。',
|
|
80
|
+
'import.paths.old': '原路径',
|
|
81
|
+
'import.paths.new': '新路径',
|
|
82
|
+
// 路径来源徽章:此前直接渲染 core 的枚举字面量(kind:missing / platformMismatch),
|
|
83
|
+
// 用户读成「源路径不存在」——missing 的真实语义是「需为本机指定新位置」(core 不做存在性探测)。
|
|
84
|
+
'import.paths.kind.missing': '需指定新位置',
|
|
85
|
+
'import.paths.kind.platformMismatch': '跨平台路径',
|
|
86
|
+
'import.paths.kind.homeMismatch': '基础路径不同',
|
|
87
|
+
'import.paths.unresolved': '还有 {count} 条路径未映射(留空将跳过该路径,可以继续)',
|
|
88
|
+
'import.paths.empty': '无需映射路径',
|
|
89
|
+
// 「选择本机路径」弹窗(第③项):浏览器拿不到本机真实路径,目录列举走宿主只读端点
|
|
90
|
+
'import.paths.browse': '选择本机路径',
|
|
91
|
+
'import.paths.picker.title': '选择本机路径',
|
|
92
|
+
'import.paths.picker.up': '上一层',
|
|
93
|
+
'import.paths.picker.home': '主目录',
|
|
94
|
+
'import.paths.picker.thisPc': '此电脑',
|
|
95
|
+
'import.paths.picker.useCurrent': '使用当前目录',
|
|
96
|
+
'import.paths.picker.empty': '这个目录里没有可进入的项',
|
|
97
|
+
'import.paths.picker.truncated': '只显示前 {count} 项',
|
|
98
|
+
'import.paths.picker.notFound': '这个路径不存在(已为你打开上一级)',
|
|
99
|
+
'import.paths.picker.denied': '没有读取这个目录的权限',
|
|
100
|
+
'import.paths.picker.notAbsolute': '请填绝对路径(如 D:\\ 或 /)',
|
|
101
|
+
'import.paths.picker.failed': '读取这个目录失败',
|
|
102
|
+
} as const;
|
|
103
|
+
|
|
104
|
+
export const en: Record<keyof typeof zh, string> = {
|
|
105
|
+
'import.stage.select': 'Select',
|
|
106
|
+
'import.stage.analyze': 'Analyze',
|
|
107
|
+
'import.stage.decide': 'Preview & decide',
|
|
108
|
+
'import.stage.confirm': 'Confirm',
|
|
109
|
+
'import.stage.execute': 'Execute',
|
|
110
|
+
'import.stage.done': 'Done',
|
|
111
|
+
'import.stepper.label': 'Step {current} of {total}: {label}',
|
|
112
|
+
'import.select.title': 'Select Backup File',
|
|
113
|
+
'import.select.hint': 'Pick a dsh-config-*.zip backup exported from DSH to begin. Analysis is read-only and changes nothing.',
|
|
114
|
+
'import.select.browse': 'Choose ZIP file',
|
|
115
|
+
'import.select.reselect': 'Reselect',
|
|
116
|
+
'import.select.cancel': 'Cancel selection',
|
|
117
|
+
'import.select.file': 'Selected: {name}',
|
|
118
|
+
'import.compatibility.title': 'Compatibility',
|
|
119
|
+
'import.compatibility.score': 'Compatibility score: {score}',
|
|
120
|
+
'import.preview.title': 'Import Preview',
|
|
121
|
+
'import.preview.willChange': '{count} {count, plural, item|items} will change',
|
|
122
|
+
'import.preview.unchanged': '{count} {count, plural, item|items} already identical (skipped)',
|
|
123
|
+
'import.preview.settings': '{count} settings {count, plural, update|updates}',
|
|
124
|
+
'import.preview.plugins': '{count} {count, plural, plugin|plugins} to install',
|
|
125
|
+
'import.preview.mcp': '{count} MCP {count, plural, server|servers} added',
|
|
126
|
+
'import.preview.prompts': '{count} {count, plural, prompt|prompts}',
|
|
127
|
+
'import.preview.paths': '{count} path {count, plural, mapping|mappings} needed',
|
|
128
|
+
'import.preview.rebase': 'Base path rebased automatically (the backup came from a machine with a different DSH base path): {from} -> {to}; no manual mapping needed',
|
|
129
|
+
'import.preview.secrets': '{count} {count, plural, secret|secrets} to re-enter',
|
|
130
|
+
'import.preview.conflicts': '{count} {count, plural, conflict|conflicts}',
|
|
131
|
+
'import.preview.restart': 'A DSH restart is required after import',
|
|
132
|
+
'import.confirm.execute': 'Confirm Import',
|
|
133
|
+
'import.confirm.warning': 'Import modifies the current DSH configuration; a snapshot is taken first.',
|
|
134
|
+
'import.confirm.warningNoRollback': 'Import modifies the current DSH configuration; a snapshot is taken first. Bulk rollback is off — a failure does not stop the rest, and writes are not reverted.',
|
|
135
|
+
'import.confirm.encrypted': 'The backup password will decrypt and restore {count} {count, plural, credential|credentials}.',
|
|
136
|
+
'import.rollbackOnError': 'Roll back everything on failure (recommended)',
|
|
137
|
+
'import.log.title': 'Import Log',
|
|
138
|
+
'import.log.empty': 'Waiting for command output…',
|
|
139
|
+
'import.log.newOutput': '↓ New output',
|
|
140
|
+
'import.log.counts': '{ok} ok · {skip} skipped · {warn} warned · {fail} failed',
|
|
141
|
+
'import.log.filterProblems': 'Problems only',
|
|
142
|
+
'import.log.filterAll': 'Show all',
|
|
143
|
+
'import.log.problemsEmpty': 'No failed or warned items in this import',
|
|
144
|
+
'import.done': 'Done',
|
|
145
|
+
'import.skipCurrent': 'Skip current plugin',
|
|
146
|
+
'import.skipPending': 'Skipping…',
|
|
147
|
+
'import.retrySkipped': 'Retry failed/skipped items ({count})',
|
|
148
|
+
'import.secrets.title': 'Re-enter Secrets',
|
|
149
|
+
'import.secrets.hint': 'These credentials were not exported with the backup (security by design). Enter them manually to use them here; leave blank to skip.',
|
|
150
|
+
'import.secrets.optional': '(optional)',
|
|
151
|
+
'import.secrets.required': '(required)',
|
|
152
|
+
'import.secrets.none': 'No secrets required',
|
|
153
|
+
'import.decrypt.badge': 'encrypted backup',
|
|
154
|
+
'import.decryptArchive.title': 'Unlock Encrypted Backup',
|
|
155
|
+
'import.decryptArchive.hint': 'This backup is fully encrypted (the whole file is password-protected). Enter the password set at export time to decrypt and continue — encrypted credentials inside are restored with the same password, so this is the only password prompt. It is used once and never written to disk.',
|
|
156
|
+
'import.decryptArchive.passwordPlaceholder': 'Enter backup encryption password',
|
|
157
|
+
'import.decryptArchive.unlock': 'Unlock & Continue',
|
|
158
|
+
'import.decrypt.previewHint': 'Encrypted backup: credentials are restored automatically by the unlock password — no further password prompt.',
|
|
159
|
+
'import.conflicts.title': 'Resolve Conflicts',
|
|
160
|
+
'import.conflicts.hint': 'These items already exist on this machine and differ from the backup. Decide per item.',
|
|
161
|
+
'import.conflicts.keepCurrent': 'Keep current',
|
|
162
|
+
'import.conflicts.useImported': 'Use backup',
|
|
163
|
+
'import.conflicts.review': 'Decide later',
|
|
164
|
+
'import.conflicts.severityError': 'Error',
|
|
165
|
+
'import.conflicts.detailCurrent': 'Current',
|
|
166
|
+
'import.conflicts.detailImported': 'Backup',
|
|
167
|
+
'import.conflicts.empty': 'No conflicts',
|
|
168
|
+
'import.conflicts.unresolved': '{count} {count, plural, item|items} unresolved',
|
|
169
|
+
'import.conflicts.keepCurrentAll': 'Keep all current',
|
|
170
|
+
'import.conflicts.useImportedAll': 'Use all backup',
|
|
171
|
+
'import.paths.title': 'Path Mapping',
|
|
172
|
+
'import.paths.hint': 'Absolute paths in the backup may not exist on this machine. Map each path to a new location (leave blank to skip).',
|
|
173
|
+
'import.paths.old': 'Original path',
|
|
174
|
+
'import.paths.new': 'New path',
|
|
175
|
+
'import.paths.kind.missing': 'Set a new location',
|
|
176
|
+
'import.paths.kind.platformMismatch': 'Cross-platform path',
|
|
177
|
+
'import.paths.kind.homeMismatch': 'Different base path',
|
|
178
|
+
'import.paths.unresolved': '{count} {count, plural, path|paths} unmapped (blank = skip that path, you can continue)',
|
|
179
|
+
'import.paths.empty': 'No paths to map',
|
|
180
|
+
'import.paths.browse': 'Choose a local path',
|
|
181
|
+
'import.paths.picker.title': 'Choose a local path',
|
|
182
|
+
'import.paths.picker.up': 'Up one level',
|
|
183
|
+
'import.paths.picker.home': 'Home folder',
|
|
184
|
+
'import.paths.picker.thisPc': 'This PC',
|
|
185
|
+
'import.paths.picker.useCurrent': 'Use this folder',
|
|
186
|
+
'import.paths.picker.empty': 'Nothing to open in this folder',
|
|
187
|
+
'import.paths.picker.truncated': 'Showing the first {count} entries',
|
|
188
|
+
'import.paths.picker.notFound': 'That path does not exist (opened its parent instead)',
|
|
189
|
+
'import.paths.picker.denied': 'No permission to read this folder',
|
|
190
|
+
'import.paths.picker.notAbsolute': 'Enter an absolute path (e.g. D:\\ or /)',
|
|
191
|
+
'import.paths.picker.failed': 'Could not read this folder',
|
|
192
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Manager 字典分域 · 导入 / 同步后的收尾清单。
|
|
3
|
+
*
|
|
4
|
+
* tech-debt #22(2026-11 拆分):本文件只承载该域键值;聚合与键顺序由 ../locales.ts 编排。
|
|
5
|
+
* 约束:zh 文案逐字保留、en 一键一镜像(`Record<keyof typeof zh, string>` 编译期校验),
|
|
6
|
+
* 键集合由 src/core/engine-locale.test.ts 的既有键冻结指纹兜底。本文件零依赖、零 import。
|
|
7
|
+
*/
|
|
8
|
+
export const zh = {
|
|
9
|
+
// —— 导入/同步后收尾清单(P0-① / P2-⑪)——
|
|
10
|
+
'nextSteps.title': '接下来需要处理',
|
|
11
|
+
'nextSteps.done': '全部完成,无需额外处理',
|
|
12
|
+
'nextSteps.restart.hint': '需重启 DSH 后生效({count}):',
|
|
13
|
+
'nextSteps.secrets.hint': '未随备份导出、需在本机补录的凭据({count}):',
|
|
14
|
+
'nextSteps.unresolved.hint': '未成功应用({count}),可用下方按钮重试:',
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
export const en: Record<keyof typeof zh, string> = {
|
|
18
|
+
// —— Sync status facts (Workbench Rebuild) ——
|
|
19
|
+
// Import/sync next-steps checklist (P0-① / P2-⑪)
|
|
20
|
+
'nextSteps.title': 'Next steps',
|
|
21
|
+
'nextSteps.done': 'All done — nothing else to handle',
|
|
22
|
+
'nextSteps.restart.hint': 'Take effect after restarting DSH ({count}):',
|
|
23
|
+
'nextSteps.secrets.hint': 'Not exported with the backup — re-enter on this machine ({count}):',
|
|
24
|
+
'nextSteps.unresolved.hint': 'Not applied ({count}) — retry with the button below:',
|
|
25
|
+
};
|