@dsh-workbench/shared 1.0.0 → 1.1.0
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/dist/contract/protocol/bundle-install.d.ts +9 -0
- package/dist/contract/protocol/market-index.d.ts +1 -0
- package/dist/contract/protocol/market-index.js +1 -0
- package/dist/contract/unit-declaration.d.ts +11 -5
- package/dist/contract/unit-declaration.js +42 -12
- package/dist/contract/unit.d.ts +15 -1
- package/dist/contract/unit.js +8 -0
- package/dist/contract/workbench-contract.d.ts +1 -1
- package/dist/host/provision.d.ts +1 -1
- package/dist/host/provision.js +8 -2
- package/dist/host/supply-index.d.ts +4 -1
- package/dist/host/supply-index.js +18 -12
- package/dist/i18n/en.js +53 -31
- package/dist/i18n/index.d.ts +55 -33
- package/dist/i18n/zh.d.ts +54 -32
- package/dist/i18n/zh.js +54 -32
- package/dist/lib/dsh-client.d.ts +3 -1
- package/package.json +1 -1
- package/src/contract/__tests__/unit-declaration.test.ts +33 -1
- package/src/contract/protocol/bundle-install.ts +11 -0
- package/src/contract/protocol/market-index.ts +1 -0
- package/src/contract/unit-declaration.ts +52 -16
- package/src/contract/unit.ts +19 -1
- package/src/contract/workbench-contract.ts +3 -1
- package/src/host/__tests__/provision.test.ts +2 -0
- package/src/host/__tests__/supply-index.test.ts +42 -6
- package/src/host/provision.ts +6 -2
- package/src/host/supply-index.ts +40 -11
- package/src/i18n/en.ts +53 -31
- package/src/i18n/zh.ts +54 -32
- package/src/lib/dsh-client.ts +3 -1
- package/src/testing/__tests__/declaration.test.ts +6 -3
package/src/host/provision.ts
CHANGED
|
@@ -15,6 +15,8 @@ export const PROVISION_ACTIONS = [
|
|
|
15
15
|
'update-plugin',
|
|
16
16
|
'uninstall-plugin',
|
|
17
17
|
'update-workbench',
|
|
18
|
+
'migrate-workbench',
|
|
19
|
+
'dismiss-followup',
|
|
18
20
|
] as const satisfies readonly ProvisionAction[];
|
|
19
21
|
|
|
20
22
|
export const DEPENDENCY_ACTIONS = ['update-dependency'] as const satisfies readonly ProvisionAction[];
|
|
@@ -37,7 +39,8 @@ export function provisionTargetOf(action: ProvisionAction): ProvisionTarget {
|
|
|
37
39
|
if (action === 'install-bundle' || action === 'install-version') return 'spec';
|
|
38
40
|
if (action === 'remove-bundle') return 'name';
|
|
39
41
|
if (action === 'update-plugin' || action === 'uninstall-plugin') return 'name';
|
|
40
|
-
if (action === 'update-workbench') return 'name';
|
|
42
|
+
if (action === 'update-workbench' || action === 'migrate-workbench') return 'name';
|
|
43
|
+
if (action === 'dismiss-followup') return 'id';
|
|
41
44
|
if (action === 'cancel-install') return 'requestId';
|
|
42
45
|
return 'unit';
|
|
43
46
|
}
|
|
@@ -81,7 +84,8 @@ function requestOf(action: ProvisionAction, value: string): ProvisionRequest {
|
|
|
81
84
|
if (action === 'install-bundle' || action === 'install-version') return { action, spec: value };
|
|
82
85
|
if (action === 'remove-bundle') return { action, name: value };
|
|
83
86
|
if (action === 'update-plugin' || action === 'uninstall-plugin') return { action, name: value };
|
|
84
|
-
if (action === 'update-workbench') return { action, name: value };
|
|
87
|
+
if (action === 'update-workbench' || action === 'migrate-workbench') return { action, name: value };
|
|
88
|
+
if (action === 'dismiss-followup') return { action, id: value };
|
|
85
89
|
if (action === 'cancel-install') return { action, requestId: value };
|
|
86
90
|
return { action, unit: value };
|
|
87
91
|
}
|
package/src/host/supply-index.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type { ExtensionNeed, LibNeed, Need, SupplySource } from '../contract/needs.js';
|
|
2
|
+
import { npmRegistryOf } from './plugin-source.js';
|
|
2
3
|
|
|
3
4
|
export interface SupplyDeclaration {
|
|
4
5
|
readonly id: string;
|
|
5
6
|
readonly needs?: readonly Need[];
|
|
6
7
|
}
|
|
7
8
|
|
|
9
|
+
export interface SupplyIndexOptions {
|
|
10
|
+
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
11
|
+
}
|
|
12
|
+
|
|
8
13
|
export interface SupplyEntry {
|
|
9
14
|
readonly key: string;
|
|
10
15
|
readonly kind: 'extension' | 'lib';
|
|
@@ -81,16 +86,28 @@ function keyOf(kind: 'extension' | 'lib', pkg: string): string {
|
|
|
81
86
|
return `${kind}:${pkg}`;
|
|
82
87
|
}
|
|
83
88
|
|
|
84
|
-
function
|
|
89
|
+
function registryAddressOf(
|
|
90
|
+
source: Extract<SupplySource, { kind: 'npm' }>,
|
|
91
|
+
env: Readonly<Record<string, string | undefined>>,
|
|
92
|
+
): string | undefined {
|
|
93
|
+
const resolved = npmRegistryOf(source, env);
|
|
94
|
+
return resolved.ok ? resolved.value : undefined;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function sourceCompatible(
|
|
98
|
+
left: SupplySource,
|
|
99
|
+
right: SupplySource,
|
|
100
|
+
env: Readonly<Record<string, string | undefined>>,
|
|
101
|
+
): boolean {
|
|
85
102
|
if (left.kind !== right.kind) return false;
|
|
86
103
|
if (left.kind === 'npm' && right.kind === 'npm') {
|
|
87
104
|
if (text(left.package) !== '' && text(right.package) !== '' && text(left.package) !== text(right.package)) {
|
|
88
105
|
return false;
|
|
89
106
|
}
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
return
|
|
107
|
+
const l = registryAddressOf(left, env);
|
|
108
|
+
const r = registryAddressOf(right, env);
|
|
109
|
+
if (l !== undefined && r !== undefined) return l === r;
|
|
110
|
+
return text(left.registryEnv) === text(right.registryEnv);
|
|
94
111
|
}
|
|
95
112
|
if (left.kind === 'git' && right.kind === 'git') return text(left.url) === text(right.url);
|
|
96
113
|
if (left.kind === 'local' && right.kind === 'local') {
|
|
@@ -99,11 +116,15 @@ function sourceCompatible(left: SupplySource, right: SupplySource): boolean {
|
|
|
99
116
|
return false;
|
|
100
117
|
}
|
|
101
118
|
|
|
102
|
-
function sourcesCompatible(
|
|
119
|
+
function sourcesCompatible(
|
|
120
|
+
left: readonly SupplySource[],
|
|
121
|
+
right: readonly SupplySource[],
|
|
122
|
+
env: Readonly<Record<string, string | undefined>>,
|
|
123
|
+
): boolean {
|
|
103
124
|
if (left.length !== right.length) return false;
|
|
104
125
|
return left.every((source, index) => {
|
|
105
126
|
const other = right[index];
|
|
106
|
-
return other !== undefined && sourceCompatible(source, other);
|
|
127
|
+
return other !== undefined && sourceCompatible(source, other, env);
|
|
107
128
|
});
|
|
108
129
|
}
|
|
109
130
|
|
|
@@ -120,13 +141,17 @@ function mergedSource(left: SupplySource, right: SupplySource): SupplySource {
|
|
|
120
141
|
return left;
|
|
121
142
|
}
|
|
122
143
|
|
|
123
|
-
function mergeSources(
|
|
144
|
+
function mergeSources(
|
|
145
|
+
entry: MutableEntry,
|
|
146
|
+
sources: readonly SupplySource[],
|
|
147
|
+
env: Readonly<Record<string, string | undefined>>,
|
|
148
|
+
): boolean {
|
|
124
149
|
if (!entry.declared) {
|
|
125
150
|
entry.declared = true;
|
|
126
151
|
entry.sources = [...sources];
|
|
127
152
|
return true;
|
|
128
153
|
}
|
|
129
|
-
if (!sourcesCompatible(entry.sources, sources)) {
|
|
154
|
+
if (!sourcesCompatible(entry.sources, sources, env)) {
|
|
130
155
|
entry.conflicted = true;
|
|
131
156
|
return false;
|
|
132
157
|
}
|
|
@@ -150,7 +175,11 @@ function addDeclarer(entry: MutableEntry, unit: string, commands: readonly strin
|
|
|
150
175
|
for (const command of commands) if (!entry.commands.includes(command)) entry.commands.push(command);
|
|
151
176
|
}
|
|
152
177
|
|
|
153
|
-
export function buildSupplyIndex(
|
|
178
|
+
export function buildSupplyIndex(
|
|
179
|
+
declarations: readonly SupplyDeclaration[],
|
|
180
|
+
options: SupplyIndexOptions = {},
|
|
181
|
+
): SupplyIndex {
|
|
182
|
+
const env = options.env ?? {};
|
|
154
183
|
const entries = new Map<string, MutableEntry>();
|
|
155
184
|
const byName = new Map<string, MutableEntry>();
|
|
156
185
|
const conflicts: SupplyConflict[] = [];
|
|
@@ -186,7 +215,7 @@ export function buildSupplyIndex(declarations: readonly SupplyDeclaration[]): Su
|
|
|
186
215
|
} else {
|
|
187
216
|
addDeclarer(entry, declaration.id, []);
|
|
188
217
|
}
|
|
189
|
-
const same = mergeSources(entry, need.sources ?? []);
|
|
218
|
+
const same = mergeSources(entry, need.sources ?? [], env);
|
|
190
219
|
if (!same) {
|
|
191
220
|
conflicts.push({
|
|
192
221
|
kind: 'source-mismatch',
|
package/src/i18n/en.ts
CHANGED
|
@@ -134,14 +134,14 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
134
134
|
'panels.market.update': 'Update',
|
|
135
135
|
'panels.market.swapSlow': 'Not swapped yet — maybe a slow or failed download. Press Update again; if it stays like this, restart dsh.',
|
|
136
136
|
'panels.market.removeSlow': 'Not removed yet — maybe a slow network or an uninstall that did not finish. Check again in a moment; if it stays like this, restart dsh.',
|
|
137
|
-
'panels.market.updateNoChange': '
|
|
137
|
+
'panels.market.updateNoChange': 'Update failed: still {from}. The newest on the registry is {latest} — press Update again.',
|
|
138
138
|
'panels.market.updateUnknownVersion': '(unknown)',
|
|
139
|
-
'panels.market.updateGone': '
|
|
140
|
-
'panels.market.updateRestored': '
|
|
139
|
+
'panels.market.updateGone': 'Update failed: the module is gone after the update.',
|
|
140
|
+
'panels.market.updateRestored': 'Update failed: the new version could not be found after the update, so {version} was put back.',
|
|
141
141
|
'panels.market.updateBehind': 'Installed {installed}, but the newest on the registry is {latest} — not the latest; you can update once more.',
|
|
142
|
-
'panels.market.selfUpdateFailed': '
|
|
142
|
+
'panels.market.selfUpdateFailed': 'Workbench update failed: {reason}',
|
|
143
143
|
'panels.market.selfUpdateUnknown': 'the outside process left no reason (see ~/.dsh/workbench/self-update.log)',
|
|
144
|
-
'panels.market.selfUpdateRolledBack': '
|
|
144
|
+
'panels.market.selfUpdateRolledBack': 'Workbench update failed; rolled back to {version}.',
|
|
145
145
|
'panels.market.uninstall': 'Uninstall',
|
|
146
146
|
'panels.market.uninstallLabel': 'Uninstall {name}',
|
|
147
147
|
'panels.market.installing': 'Installing…',
|
|
@@ -165,9 +165,27 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
165
165
|
'panels.market.empty': 'No modules available',
|
|
166
166
|
'panels.market.sectionPlugins': 'Installed opencli plugins',
|
|
167
167
|
'panels.market.moduleOutdated': 'update available',
|
|
168
|
+
'panels.market.updateNeedsWorkbench': 'this version needs a newer workbench first',
|
|
169
|
+
'panels.market.updateIncompatible': 'the new version does not match this workbench, so it cannot be installed now',
|
|
168
170
|
'panels.market.moduleRefused': 'This module does not match this workbench, so it cannot be used for now.',
|
|
169
171
|
'panels.market.moduleRestartHint': 'restart dsh once to bring it up',
|
|
170
172
|
'panels.market.pendingRestart': 'restart required',
|
|
173
|
+
'panels.market.pendingFollowUp': 'old data to migrate',
|
|
174
|
+
'panels.market.migrationHint': 'old sessions and projects are not merged yet',
|
|
175
|
+
'panels.market.migrateAction': 'Migrate old data',
|
|
176
|
+
'panels.market.migrating': 'Migrating…',
|
|
177
|
+
'panels.market.migrateConfirmTitle': 'Migrate old data?',
|
|
178
|
+
'panels.market.migrateConfirmDetail': 'Quit dsh web / Desktop first. Only missing data is added; nothing is overwritten.',
|
|
179
|
+
'panels.market.migrateConfirmAck': "I've quit dsh web / Desktop",
|
|
180
|
+
'panels.market.migrateConfirmYes': 'Start migration',
|
|
181
|
+
'panels.market.migrateDone': 'Migration complete: {added} projects added; restart the workbench and dsh web to see them.',
|
|
182
|
+
'panels.market.dismissFollowUp': "Don't remind me",
|
|
183
|
+
'panels.market.dismissing': 'Dismissing…',
|
|
184
|
+
'panels.market.dismissFollowUpTitle': 'Stop reminding about this?',
|
|
185
|
+
'panels.market.dismissFollowUpDetail': "The reminder will be hidden from the market, but old data will not be migrated or deleted. Old sessions and projects stay in the old directory and won't appear in the new version; you can still run dsh-workbench migrate later.",
|
|
186
|
+
'panels.market.dismissFollowUpAck': "I understand the old data won't appear automatically",
|
|
187
|
+
'panels.market.dismissFollowUpYes': "Don't remind me",
|
|
188
|
+
'panels.market.dismissed': 'No longer reminded; old data stays in the old directory and can still be migrated with dsh-workbench migrate.',
|
|
171
189
|
'panels.market.workbenchName': 'Workbench',
|
|
172
190
|
'panels.market.pluginBroken': 'This plugin install is broken: it cannot be identified. Uninstall it first, then ask the agent to reinstall it by package name.',
|
|
173
191
|
'panels.market.restartNeeded': 'The new version is installed — restart once to pick it up.',
|
|
@@ -254,7 +272,7 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
254
272
|
'panels.market.add.exampleTitle': 'Examples',
|
|
255
273
|
'panels.market.add.exampleFill': 'Fill in an example',
|
|
256
274
|
'panels.market.add.registryLabel': 'Source',
|
|
257
|
-
'panels.market.add.registryProfile': "This
|
|
275
|
+
'panels.market.add.registryProfile': "This workbench's registry",
|
|
258
276
|
'panels.market.add.registryPnpm': "pnpm's own registry",
|
|
259
277
|
'panels.market.add.check': 'Check',
|
|
260
278
|
'panels.market.add.checking': 'Checking…',
|
|
@@ -275,12 +293,16 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
275
293
|
'panels.market.tabs': 'The two faces of the module market',
|
|
276
294
|
'panels.tab.discover': 'Discover',
|
|
277
295
|
'panels.discover.loading': 'Reading the index',
|
|
296
|
+
'panels.discover.slowHint': 'Slow to load: finish any authorization prompt, or switch sources.',
|
|
278
297
|
'panels.discover.lead': 'Browse modules from an index source; install and go.',
|
|
279
298
|
'panels.discover.addSource': 'Add',
|
|
280
299
|
'panels.discover.addingSource': 'Adding…',
|
|
281
300
|
'panels.discover.addFirstSource': 'Add index source',
|
|
282
301
|
'panels.discover.removeSource': 'Remove',
|
|
283
302
|
'panels.discover.removeSourceNamed': 'Remove {url}',
|
|
303
|
+
'panels.discover.useSource': 'Use',
|
|
304
|
+
'panels.discover.useSourceNamed': 'Use {label}',
|
|
305
|
+
'panels.discover.sourceCurrent': 'In use',
|
|
284
306
|
'panels.discover.refresh': 'Refresh',
|
|
285
307
|
'panels.discover.search': 'Search modules',
|
|
286
308
|
'panels.discover.all': 'All',
|
|
@@ -292,8 +314,8 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
292
314
|
'panels.discover.sourcePlaceholder': 'https://example.com/index.json or git@git.example.com:wb/market.git',
|
|
293
315
|
'panels.discover.sourceRef': 'Branch',
|
|
294
316
|
'panels.discover.sourcePath': 'Index file',
|
|
295
|
-
'panels.discover.sourceLocal': 'Local
|
|
296
|
-
'panels.discover.sourceLocalHint': 'Leave empty to
|
|
317
|
+
'panels.discover.sourceLocal': 'Local copy folder (optional)',
|
|
318
|
+
'panels.discover.sourceLocalHint': 'Leave empty to keep it in ~/.dsh/workbench/market-index/.',
|
|
297
319
|
'panels.discover.save': 'Save and refresh',
|
|
298
320
|
'panels.discover.cancel': 'Cancel',
|
|
299
321
|
'panels.discover.retry': 'Retry',
|
|
@@ -306,9 +328,9 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
306
328
|
'panels.discover.missingIndex': 'This repository has no {path} yet.',
|
|
307
329
|
'panels.discover.initTitle': 'Initialize this repository as a module market index?',
|
|
308
330
|
'panels.discover.initCta': 'Initialize market index',
|
|
309
|
-
'panels.discover.initWhat': 'It will write market.json and README.md on {branch}, commit once, and push. Modules you publish from this workbench will commit their
|
|
331
|
+
'panels.discover.initWhat': 'It will write market.json and README.md on {branch}, commit once, and push. Modules you publish from this workbench will commit their build files under packages/<unit>/. The repository stays owned by its owner.',
|
|
310
332
|
'panels.discover.initBranch': 'Branch',
|
|
311
|
-
'panels.discover.initBranchHint': 'The index and
|
|
333
|
+
'panels.discover.initBranchHint': 'The index and build files go to this branch; an empty repository gets it created.',
|
|
312
334
|
'panels.discover.initBranchBad': 'Use only letters, digits, dots, underscores, slashes, or dashes in a branch name.',
|
|
313
335
|
'panels.discover.initOk': 'Initialize',
|
|
314
336
|
'panels.discover.initBusy': 'Initializing…',
|
|
@@ -412,12 +434,12 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
412
434
|
'panels.market.add.doneApplied': 'Installed and live.',
|
|
413
435
|
'panels.market.add.doneRestart': 'Installed — restart once to pick it up.',
|
|
414
436
|
'panels.market.add.restartWhy': 'Why this needs a restart: {reason}',
|
|
415
|
-
'panels.market.add.restartWhy.no-hmr': 'this configuration only
|
|
437
|
+
'panels.market.add.restartWhy.no-hmr': 'this configuration is only read at startup, so a restart is needed',
|
|
416
438
|
'panels.market.add.restartWhy.package-moved':
|
|
417
439
|
'an installed package now resolves to another directory, or the change replaced something dsh itself provides',
|
|
418
440
|
'panels.market.add.restartWhy.host-module': 'the change reaches modules dsh itself loaded',
|
|
419
|
-
'panels.market.add.restartWhy.unmanaged-plugin': 'the change reaches a plugin running
|
|
420
|
-
'panels.market.add.restartWhy.module-comparison': 'dsh could not
|
|
441
|
+
'panels.market.add.restartWhy.unmanaged-plugin': 'the change reaches a plugin that is running but not on the install list',
|
|
442
|
+
'panels.market.add.restartWhy.module-comparison': 'dsh could not confirm that the running plugin is the copy installed on this machine',
|
|
421
443
|
'panels.market.add.cancelled': 'Cancelled.',
|
|
422
444
|
'panels.market.add.failed': "Didn't work: {reason}",
|
|
423
445
|
'panels.market.add.removed': 'It has been removed.',
|
|
@@ -427,10 +449,10 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
427
449
|
'panels.market.add.removedRestart': 'Removed — restart once to finish.',
|
|
428
450
|
'panels.market.add.remove': 'Remove it',
|
|
429
451
|
'panels.market.add.problem.invalidSpec': "That is not a spec we accept: it cannot be empty or start with a dash.",
|
|
430
|
-
'panels.market.add.problem.alreadyInstalled': 'That package is already in
|
|
452
|
+
'panels.market.add.problem.alreadyInstalled': 'That package is already in this workbench (add @version to switch versions).',
|
|
431
453
|
'panels.market.add.problem.notFound': 'No such package on that source. Try another name or version.',
|
|
432
454
|
'panels.market.add.problem.notAPackage': 'There is no package at that location. Pick a folder that contains a package.json.',
|
|
433
|
-
'panels.market.add.problem.notABundle': 'It is an npm package, but not a dsh plugin (
|
|
455
|
+
'panels.market.add.problem.notABundle': 'It is an npm package, but not a dsh plugin (dsh cannot find what to load inside it).',
|
|
434
456
|
'panels.market.add.problem.network': 'The source is unreachable. Check the network and retry.',
|
|
435
457
|
'panels.market.add.problem.unknown': 'The check did not pass (reason unknown). Open the install details for the raw output, or retry.',
|
|
436
458
|
'panels.market.add.reason.invalidSpec': 'the spec is not accepted',
|
|
@@ -438,7 +460,7 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
438
460
|
'panels.market.add.reason.notBundle': 'it is not a dsh plugin package',
|
|
439
461
|
'panels.market.add.reason.notRemovable': 'it ships with the installation and cannot be removed',
|
|
440
462
|
'panels.market.add.reason.bundleInUse': 'something is still using it',
|
|
441
|
-
'panels.market.add.reason.stopProfile': 'this configuration
|
|
463
|
+
'panels.market.add.reason.stopProfile': 'this configuration needs a restart, so stop the workbench first',
|
|
442
464
|
'panels.market.add.reason.staleApproval': 'the scripts to allow changed — start over',
|
|
443
465
|
'panels.market.add.reason.operationError': 'pnpm failed (see the install output)',
|
|
444
466
|
'panels.market.add.reason.buildBlocked': 'pnpm blocked install scripts',
|
|
@@ -468,8 +490,8 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
468
490
|
'blocker.forbidden.titleGeneric': 'No access',
|
|
469
491
|
'blocker.forbidden.hint': 'You are signed in, but this project/repo is not permitted for your account.',
|
|
470
492
|
'blocker.forbidden.open': 'Open permissions page',
|
|
471
|
-
'blocker.timeout.hint': 'The
|
|
472
|
-
'blocker.exec.hint': 'Make sure opencli is installed and
|
|
493
|
+
'blocker.timeout.hint': 'The background browser may not have started; retrying usually helps.',
|
|
494
|
+
'blocker.exec.hint': 'Make sure opencli is installed and runs from your terminal (which opencli).',
|
|
473
495
|
'blocker.unknown.title': 'Something went wrong',
|
|
474
496
|
'panels.reading': 'Reading the panel setup…',
|
|
475
497
|
'panels.cardBroken': 'This module will not render: {unit} ({reason})',
|
|
@@ -483,7 +505,7 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
483
505
|
'env.elapsed': 'Waiting {seconds}s',
|
|
484
506
|
'env.stepFailed.install': 'install failed',
|
|
485
507
|
'env.stepFailed.path': 'installed but not found',
|
|
486
|
-
'env.stepFailed.shell': '
|
|
508
|
+
'env.stepFailed.shell': 'cannot reach the command line',
|
|
487
509
|
'env.toolchain.ok': 'Looks good',
|
|
488
510
|
'env.toolchain.warn': 'Almost ready',
|
|
489
511
|
'env.opencli.ok': 'Ready',
|
|
@@ -500,10 +522,10 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
500
522
|
'env.fix.title': 'How to fix it',
|
|
501
523
|
'env.fix.why': 'The workbench uses its own background tool (installed separately from the one in your terminal), and it is not set up on this machine yet.',
|
|
502
524
|
'env.fix.whyPath': 'The background tool is installed, but this environment cannot find it \u2014 usually a PATH or shell-session issue.',
|
|
503
|
-
'env.fix.whyShell': 'The workbench
|
|
525
|
+
'env.fix.whyShell': 'The workbench cannot reach the command line on this machine, so it cannot fetch data \u2014 you cannot install this from here; someone needs to fix the background environment.',
|
|
504
526
|
'env.fix.step': 'Run this in a terminal, then hit Retry:',
|
|
505
527
|
'env.fix.stepPath': 'Open a new terminal window (or make sure npm\u2019s global bin directory is on PATH), then hit Retry.',
|
|
506
|
-
'env.fix.stepShell': 'Restart the workbench (or dsh); if it keeps happening, the
|
|
528
|
+
'env.fix.stepShell': 'Restart the workbench (or dsh); if it keeps happening, the workbench still cannot reach the command line.',
|
|
507
529
|
'env.fix.permission': 'Permission denied: rerun with sudo, or point npm\u2019s global directory at your home.',
|
|
508
530
|
'env.fix.network': 'Network unreachable: check your network or proxy, then retry.',
|
|
509
531
|
'env.fix.details': 'Details (for troubleshooting)',
|
|
@@ -532,9 +554,9 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
532
554
|
'env.warm.done': 'Ready ({n} sites)',
|
|
533
555
|
'env.warm.short': 'Could not sign in early this time \u2014 nothing breaks; the first read fills it in',
|
|
534
556
|
'env.unit.failed': 'This module cannot start',
|
|
535
|
-
'env.unit.failedHint': 'It failed while
|
|
536
|
-
'env.unit.unchecked': 'Cannot check: no
|
|
537
|
-
'env.unit.uncheckedHint': 'The module is not the problem \u2014 the
|
|
557
|
+
'env.unit.failedHint': 'It failed while starting up; other modules are unaffected.',
|
|
558
|
+
'env.unit.unchecked': 'Cannot check: no command line',
|
|
559
|
+
'env.unit.uncheckedHint': 'The module is not the problem \u2014 the workbench cannot reach the command line. Restart the workbench.',
|
|
538
560
|
'adapterSet.not-configured': 'No adapter set configured; using the default.',
|
|
539
561
|
'adapterSet.no-profile': 'No profile found, so the adapter set cannot load; using the default.',
|
|
540
562
|
'adapterSet.malformed': 'An adapter set must be a package name (for example @acme/adapters-set); using the default.',
|
|
@@ -581,7 +603,7 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
581
603
|
'sidebarEdition.official': 'Official',
|
|
582
604
|
'sidebarEdition.officialHint': 'Matches dsh exactly and stays stable: search, view options, show more, archive, add workspace — no waiting for us to catch up. Pick it to keep things simple.',
|
|
583
605
|
'sidebarEdition.custom': 'Custom',
|
|
584
|
-
'sidebarEdition.customHint': 'Built for multi-project work: one project per dropdown, recency-first sessions,
|
|
606
|
+
'sidebarEdition.customHint': 'Built for multi-project work: one project per dropdown, recency-first sessions, long names scroll, edges fade, DIY new session. Easier when you juggle projects.',
|
|
585
607
|
'sidebarEdition.saving': 'Configuring…',
|
|
586
608
|
'sidebarEdition.reloadRequired': 'Saved. Reload the page to apply — no workbench restart needed.',
|
|
587
609
|
'sidebarEdition.reload': 'Reload page',
|
|
@@ -612,26 +634,26 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
612
634
|
'record.act.halt': 'Halt',
|
|
613
635
|
'approval.record.site': 'Site',
|
|
614
636
|
'approval.record.what': 'Records',
|
|
615
|
-
'approval.record.lands': '
|
|
637
|
+
'approval.record.lands': 'Saves to',
|
|
616
638
|
'approval.record.noUrl': 'no site given (this call gets refused)',
|
|
617
639
|
'approval.record.oneAction': 'one action',
|
|
618
640
|
'approval.record.noSwitch': 'it will not switch you back (the leftbar footer shows the state)',
|
|
619
|
-
'approval.longTask.what': '
|
|
641
|
+
'approval.longTask.what': 'Task to stop',
|
|
620
642
|
'approval.longTask.signal':
|
|
621
|
-
'stopping only sends an interrupt signal
|
|
643
|
+
'stopping only sends an interrupt signal \u2014 wrapping up the run is up to the module',
|
|
622
644
|
'approval.publish.module': 'Module',
|
|
623
645
|
'approval.publish.target': 'Target',
|
|
624
646
|
'approval.publish.version': 'Version',
|
|
625
647
|
'approval.publish.author': 'Author',
|
|
626
|
-
'approval.publish.authorMissing': 'unsigned
|
|
648
|
+
'approval.publish.authorMissing': 'unsigned',
|
|
627
649
|
'approval.publish.registry': 'Registry',
|
|
628
650
|
'approval.publish.repo': 'Repository',
|
|
629
651
|
'approval.publish.branch': 'Branch',
|
|
630
652
|
'approval.publish.defaultBranch': 'default branch',
|
|
631
|
-
'approval.publish.artifacts': '
|
|
653
|
+
'approval.publish.artifacts': 'Build files',
|
|
632
654
|
'approval.publish.index': 'Index',
|
|
633
655
|
'approval.publish.commits': 'Commits',
|
|
634
|
-
'approval.publish.twoCommits': '
|
|
656
|
+
'approval.publish.twoCommits': 'build files + market.json in 2 commits, one push',
|
|
635
657
|
'approval.publish.reading': 'Reading…',
|
|
636
658
|
'approval.publish.changelog': 'Changelog for {version}',
|
|
637
659
|
'approval.publish.changelogMissing': 'No changelog entry for {version}; publishing will be blocked',
|
package/src/i18n/zh.ts
CHANGED
|
@@ -133,14 +133,14 @@ export const zh = {
|
|
|
133
133
|
'panels.market.update': '更新',
|
|
134
134
|
'panels.market.swapSlow': '还没换上:可能网慢或没装上。再点一次「更新」;一直这样就把 dsh 重启一遍。',
|
|
135
135
|
'panels.market.removeSlow': '还没卸掉:可能网慢或卸载没走完。等一下再看;一直这样就把 dsh 重启一遍。',
|
|
136
|
-
'panels.market.updateNoChange': '
|
|
136
|
+
'panels.market.updateNoChange': '更新失败:还是 {from};源上最新是 {latest},可以再点一次「更新」。',
|
|
137
137
|
'panels.market.updateUnknownVersion': '(问不到)',
|
|
138
|
-
'panels.market.updateGone': '
|
|
139
|
-
'panels.market.updateRestored': '
|
|
138
|
+
'panels.market.updateGone': '更新失败:更新后找不到这个模块。',
|
|
139
|
+
'panels.market.updateRestored': '更新失败:更新后找不到新版本,已把 {version} 装回去。',
|
|
140
140
|
'panels.market.updateBehind': '装上了 {installed},但源上最新是 {latest} —— 没更到最新,可以再点一次。',
|
|
141
|
-
'panels.market.selfUpdateFailed': '
|
|
141
|
+
'panels.market.selfUpdateFailed': '工作台更新失败:{reason}',
|
|
142
142
|
'panels.market.selfUpdateUnknown': '外部进程没留下原因(看 ~/.dsh/workbench/self-update.log)',
|
|
143
|
-
'panels.market.selfUpdateRolledBack': '
|
|
143
|
+
'panels.market.selfUpdateRolledBack': '工作台更新失败,已回滚到 {version}。',
|
|
144
144
|
'panels.market.uninstall': '卸载',
|
|
145
145
|
'panels.market.uninstallLabel': '卸载 {name}',
|
|
146
146
|
'panels.market.installing': '正在安装…',
|
|
@@ -162,9 +162,27 @@ export const zh = {
|
|
|
162
162
|
'panels.market.empty': '暂无可用模块',
|
|
163
163
|
'panels.market.sectionPlugins': '已安装 opencli 插件',
|
|
164
164
|
'panels.market.moduleOutdated': '有新版',
|
|
165
|
+
'panels.market.updateNeedsWorkbench': '新版本要先把工作台升级才能用',
|
|
166
|
+
'panels.market.updateIncompatible': '新版本和当前的工作台不匹配,暂时不能更新',
|
|
165
167
|
'panels.market.moduleRefused': '模块版本与工作台不匹配,暂时无法使用',
|
|
166
168
|
'panels.market.moduleRestartHint': '重启后生效',
|
|
167
169
|
'panels.market.pendingRestart': '重启后生效',
|
|
170
|
+
'panels.market.pendingFollowUp': '旧数据待迁移',
|
|
171
|
+
'panels.market.migrationHint': '旧会话和项目还没搬过来',
|
|
172
|
+
'panels.market.migrateAction': '迁移旧数据',
|
|
173
|
+
'panels.market.migrating': '正在迁移…',
|
|
174
|
+
'panels.market.migrateConfirmTitle': '迁移旧数据?',
|
|
175
|
+
'panels.market.migrateConfirmDetail': '先退出 dsh web / Desktop。迁移只补缺、不覆盖;旧目录保留。',
|
|
176
|
+
'panels.market.migrateConfirmAck': '我已经退出 dsh web / Desktop',
|
|
177
|
+
'panels.market.migrateConfirmYes': '开始迁移',
|
|
178
|
+
'panels.market.migrateDone': '迁移完成:补了 {added} 个项目;重启工作台和 dsh web 后出现。',
|
|
179
|
+
'panels.market.dismissFollowUp': '不再提醒',
|
|
180
|
+
'panels.market.dismissing': '正在收起…',
|
|
181
|
+
'panels.market.dismissFollowUpTitle': '不再提醒这件事?',
|
|
182
|
+
'panels.market.dismissFollowUpDetail': '提示会从模块市场收起,但不会迁移或删除旧数据。旧会话和项目仍留在旧目录,新版本里看不到;以后需要时仍可运行 dsh-workbench migrate。',
|
|
183
|
+
'panels.market.dismissFollowUpAck': '我知道旧数据不会自动出现',
|
|
184
|
+
'panels.market.dismissFollowUpYes': '不再提醒',
|
|
185
|
+
'panels.market.dismissed': '已不再提醒;旧数据仍在旧目录,需要时仍可运行 dsh-workbench migrate。',
|
|
168
186
|
'panels.market.workbenchName': '工作台',
|
|
169
187
|
'panels.market.pluginBroken': '这份插件装坏了:认不出它是什么。可以先卸载,再让 agent 按包名重装一次。',
|
|
170
188
|
'panels.market.restartNeeded': '新版装好了,重启一次才生效。',
|
|
@@ -251,7 +269,7 @@ export const zh = {
|
|
|
251
269
|
'panels.market.add.exampleTitle': '示例',
|
|
252
270
|
'panels.market.add.exampleFill': '填入示例',
|
|
253
271
|
'panels.market.add.registryLabel': '安装源',
|
|
254
|
-
'panels.market.add.registryProfile': '
|
|
272
|
+
'panels.market.add.registryProfile': '这份工作台配的源',
|
|
255
273
|
'panels.market.add.registryPnpm': 'pnpm 自己配的源',
|
|
256
274
|
'panels.market.add.check': '预检',
|
|
257
275
|
'panels.market.add.checking': '正在预检…',
|
|
@@ -272,12 +290,16 @@ export const zh = {
|
|
|
272
290
|
'panels.market.tabs': '模块市场的两个面',
|
|
273
291
|
'panels.tab.discover': '发现',
|
|
274
292
|
'panels.discover.loading': '正在读取索引',
|
|
293
|
+
'panels.discover.slowHint': '读取较慢:如有授权提示,先完成它,或换一个索引源。',
|
|
275
294
|
'panels.discover.lead': '从索引源浏览模块;装上就能用。',
|
|
276
295
|
'panels.discover.addSource': '添加',
|
|
277
296
|
'panels.discover.addingSource': '正在添加…',
|
|
278
297
|
'panels.discover.addFirstSource': '添加索引源',
|
|
279
298
|
'panels.discover.removeSource': '移除',
|
|
280
299
|
'panels.discover.removeSourceNamed': '移除 {url}',
|
|
300
|
+
'panels.discover.useSource': '使用',
|
|
301
|
+
'panels.discover.useSourceNamed': '使用 {label}',
|
|
302
|
+
'panels.discover.sourceCurrent': '当前使用',
|
|
281
303
|
'panels.discover.refresh': '刷新',
|
|
282
304
|
'panels.discover.search': '搜索模块',
|
|
283
305
|
'panels.discover.all': '全部',
|
|
@@ -289,8 +311,8 @@ export const zh = {
|
|
|
289
311
|
'panels.discover.sourcePlaceholder': 'https://example.com/index.json 或 git@git.example.com:wb/market.git',
|
|
290
312
|
'panels.discover.sourceRef': '分支',
|
|
291
313
|
'panels.discover.sourcePath': '索引文件',
|
|
292
|
-
'panels.discover.sourceLocal': '
|
|
293
|
-
'panels.discover.sourceLocalHint': '
|
|
314
|
+
'panels.discover.sourceLocal': '本地副本目录(可选)',
|
|
315
|
+
'panels.discover.sourceLocalHint': '不填就放到 ~/.dsh/workbench/market-index/。',
|
|
294
316
|
'panels.discover.save': '保存并刷新',
|
|
295
317
|
'panels.discover.cancel': '取消',
|
|
296
318
|
'panels.discover.retry': '重试',
|
|
@@ -303,9 +325,9 @@ export const zh = {
|
|
|
303
325
|
'panels.discover.missingIndex': '仓库里还没有索引文件 {path}',
|
|
304
326
|
'panels.discover.initTitle': '把这个仓库初始化成模块市场索引?',
|
|
305
327
|
'panels.discover.initCta': '初始化成市场索引',
|
|
306
|
-
'panels.discover.initWhat': '会在 {branch} 分支写 market.json 与 README.md
|
|
328
|
+
'panels.discover.initWhat': '会在 {branch} 分支写 market.json 与 README.md,提交一次并推上去;之后从这个工作台发布的模块会把打包好的文件提交到 packages/<unit>/。仓库的写权限归它的所有者。',
|
|
307
329
|
'panels.discover.initBranch': '分支',
|
|
308
|
-
'panels.discover.initBranchHint': '
|
|
330
|
+
'panels.discover.initBranchHint': '索引和打包文件都发到这个分支;空仓库会新建它。',
|
|
309
331
|
'panels.discover.initBranchBad': '分支名只能用字母、数字、点、下划线、斜杠或短横线',
|
|
310
332
|
'panels.discover.initOk': '初始化',
|
|
311
333
|
'panels.discover.initBusy': '正在初始化…',
|
|
@@ -409,11 +431,11 @@ export const zh = {
|
|
|
409
431
|
'panels.market.add.doneApplied': '装好了,已经生效。',
|
|
410
432
|
'panels.market.add.doneRestart': '装好了,重启一次才生效。',
|
|
411
433
|
'panels.market.add.restartWhy': '为什么这一版要重启:{reason}',
|
|
412
|
-
'panels.market.add.restartWhy.no-hmr': '
|
|
434
|
+
'panels.market.add.restartWhy.no-hmr': '这份配置只在启动时读一次,改了得重启',
|
|
413
435
|
'panels.market.add.restartWhy.package-moved': '某个已经装着的包换到了新的目录,或者这一下换掉了 dsh 自己提供的那份',
|
|
414
436
|
'panels.market.add.restartWhy.host-module': '这一下动到了 dsh 自己加载的模块',
|
|
415
|
-
'panels.market.add.restartWhy.unmanaged-plugin': '
|
|
416
|
-
'panels.market.add.restartWhy.module-comparison': 'dsh
|
|
437
|
+
'panels.market.add.restartWhy.unmanaged-plugin': '这一下动到了没登记过、正在运行的插件',
|
|
438
|
+
'panels.market.add.restartWhy.module-comparison': 'dsh 没法确认正在跑的插件就是这台机器上装好的那一份',
|
|
417
439
|
'panels.market.add.cancelled': '已取消。',
|
|
418
440
|
'panels.market.add.failed': '没成功:{reason}',
|
|
419
441
|
'panels.market.add.removed': '已经移除了。',
|
|
@@ -423,10 +445,10 @@ export const zh = {
|
|
|
423
445
|
'panels.market.add.removedRestart': '卸掉了,重启一次才彻底生效。',
|
|
424
446
|
'panels.market.add.remove': '移除它',
|
|
425
447
|
'panels.market.add.problem.invalidSpec': '这个写法不认:不能是空的,也不能以横杠开头。',
|
|
426
|
-
'panels.market.add.problem.alreadyInstalled': '
|
|
448
|
+
'panels.market.add.problem.alreadyInstalled': '这个包已经在这份工作台里了(要换版本请带上 @版本)。',
|
|
427
449
|
'panels.market.add.problem.notFound': '源上没有这个包。换个包名或版本再试。',
|
|
428
450
|
'panels.market.add.problem.notAPackage': '这个位置没有包。选一个包含 package.json 的目录。',
|
|
429
|
-
'panels.market.add.problem.notABundle': '它是一个 npm 包,但不是 dsh
|
|
451
|
+
'panels.market.add.problem.notABundle': '它是一个 npm 包,但不是 dsh 插件包(dsh 在里面找不到该加载什么)。',
|
|
430
452
|
'panels.market.add.problem.network': '源连不上。检查网络后重试。',
|
|
431
453
|
'panels.market.add.problem.unknown': '预检没通过(原因未知)。展开安装详情看原始输出,或重试。',
|
|
432
454
|
'panels.market.add.reason.invalidSpec': '写法不认',
|
|
@@ -434,7 +456,7 @@ export const zh = {
|
|
|
434
456
|
'panels.market.add.reason.notBundle': '它不是一个 dsh 插件包',
|
|
435
457
|
'panels.market.add.reason.notRemovable': '它是安装自带的组合包,不能卸',
|
|
436
458
|
'panels.market.add.reason.bundleInUse': '还有东西在用它,卸不掉',
|
|
437
|
-
'panels.market.add.reason.stopProfile': '
|
|
459
|
+
'panels.market.add.reason.stopProfile': '这份配置改了要重启,得先停掉工作台',
|
|
438
460
|
'panels.market.add.reason.staleApproval': '要允许的安装脚本已经变了,重新来一次',
|
|
439
461
|
'panels.market.add.reason.operationError': 'pnpm 执行出错(详情见安装输出)',
|
|
440
462
|
'panels.market.add.reason.buildBlocked': 'pnpm 拦下了安装脚本',
|
|
@@ -457,15 +479,15 @@ export const zh = {
|
|
|
457
479
|
'blocker.market.open': '去模块市场',
|
|
458
480
|
'blocker.login.title': '需要登录 {platform}',
|
|
459
481
|
'blocker.login.titleGeneric': '需要登录',
|
|
460
|
-
'blocker.login.hint': '
|
|
482
|
+
'blocker.login.hint': '工作台借你浏览器里的登录状态;登录一次就行,之后不用再登。',
|
|
461
483
|
'blocker.login.go': '去登录',
|
|
462
484
|
'blocker.login.manual': '在终端执行该插件的登录命令(见插件的文档),按提示完成登录后重试。',
|
|
463
485
|
'blocker.forbidden.title': '没有权限访问 {platform}',
|
|
464
486
|
'blocker.forbidden.titleGeneric': '没有权限',
|
|
465
487
|
'blocker.forbidden.hint': '账号已登录,但没有这个项目/仓库的权限;申请之后再试。',
|
|
466
488
|
'blocker.forbidden.open': '打开权限页',
|
|
467
|
-
'blocker.timeout.hint': '
|
|
468
|
-
'blocker.exec.hint': '确认 opencli
|
|
489
|
+
'blocker.timeout.hint': '后台浏览器没起来,重试一次通常就好。',
|
|
490
|
+
'blocker.exec.hint': '确认 opencli 已经装好、在终端里能直接运行(which opencli)。',
|
|
469
491
|
'blocker.unknown.title': '出了点问题',
|
|
470
492
|
'panels.reading': '正在读取面板配置…',
|
|
471
493
|
'panels.cardBroken': '这个模块起不来:{unit}({reason})',
|
|
@@ -479,7 +501,7 @@ export const zh = {
|
|
|
479
501
|
'env.elapsed': '已等待 {seconds} 秒',
|
|
480
502
|
'env.stepFailed.install': '装不上',
|
|
481
503
|
'env.stepFailed.path': '装了但还找不到',
|
|
482
|
-
'env.stepFailed.shell': '
|
|
504
|
+
'env.stepFailed.shell': '连不上命令行',
|
|
483
505
|
'env.toolchain.ok': '正常',
|
|
484
506
|
'env.toolchain.warn': '还没完全准备好',
|
|
485
507
|
'env.opencli.ok': '已就绪',
|
|
@@ -496,10 +518,10 @@ export const zh = {
|
|
|
496
518
|
'env.fix.title': '怎么解决',
|
|
497
519
|
'env.fix.why': '工作台用它自己那份后台工具(与你在终端里那套分开装,互不影响),这台机器上还没装好它。',
|
|
498
520
|
'env.fix.whyPath': '后台工具装上了,但当前环境还找不到它 —— 通常是 PATH 或终端会话的问题。',
|
|
499
|
-
'env.fix.whyShell': '
|
|
521
|
+
'env.fix.whyShell': '工作台拿不到这台机器的命令行,所以取不了数据 —— 这一步你装不了,需要有人处理后台环境。',
|
|
500
522
|
'env.fix.step': '在终端里运行下面这条命令,装好之后点「重试」:',
|
|
501
523
|
'env.fix.stepPath': '新开一个终端窗口(或确认 npm 的全局 bin 目录在 PATH 里),然后点「重试」。',
|
|
502
|
-
'env.fix.stepShell': '重启一次工作台(或 dsh
|
|
524
|
+
'env.fix.stepShell': '重启一次工作台(或 dsh);如果反复出现,说明工作台还是拿不到命令行。',
|
|
503
525
|
'env.fix.permission': '权限不够:在命令前加 sudo 重跑,或先把 npm 的全局目录配到你的用户目录。',
|
|
504
526
|
'env.fix.network': '网络不通:检查网络或代理设置后重试。',
|
|
505
527
|
'env.fix.details': '详细输出(排障用)',
|
|
@@ -528,9 +550,9 @@ export const zh = {
|
|
|
528
550
|
'env.warm.done': '已就绪({n} 个站点)',
|
|
529
551
|
'env.warm.short': '这次没提前连上 —— 不影响用,第一次取数会自己补',
|
|
530
552
|
'env.unit.failed': '这个模块起不来',
|
|
531
|
-
'env.unit.failedHint': '
|
|
532
|
-
'env.unit.unchecked': '
|
|
533
|
-
'env.unit.uncheckedHint': '
|
|
553
|
+
'env.unit.failedHint': '它自己启动时报了错,别的模块不受影响。',
|
|
554
|
+
'env.unit.unchecked': '检测不了:拿不到命令行',
|
|
555
|
+
'env.unit.uncheckedHint': '不是这个模块的问题,是工作台拿不到命令行 —— 重启一次工作台再试。',
|
|
534
556
|
'adapterSet.not-configured': '没配置适配器集合,用默认的。',
|
|
535
557
|
'adapterSet.no-profile': '找不到 profile,没法加载适配器集合;先用默认的。',
|
|
536
558
|
'adapterSet.malformed': '适配器集合要写包名(如 @acme/adapters-set);先用默认的。',
|
|
@@ -577,7 +599,7 @@ export const zh = {
|
|
|
577
599
|
'sidebarEdition.official': '官方',
|
|
578
600
|
'sidebarEdition.officialHint': '跟 dsh 官方一致、最稳:搜索、视图选项、显示更多、归档、添加工作区都齐,升级也不等我们适配。想省心就选它。',
|
|
579
601
|
'sidebarEdition.custom': '自定义',
|
|
580
|
-
'sidebarEdition.customHint': '
|
|
602
|
+
'sidebarEdition.customHint': '为多项目工作流做的:项目下拉一屏一个项目,会话按最近更新排,名字自动滚动、两侧渐隐,工坊 DIY 新会话。项目多时更顺手。',
|
|
581
603
|
'sidebarEdition.saving': '配置中…',
|
|
582
604
|
'sidebarEdition.reloadRequired': '已写入。刷新页面后生效(不用重启工作台)。',
|
|
583
605
|
'sidebarEdition.reload': '刷新页面',
|
|
@@ -608,25 +630,25 @@ export const zh = {
|
|
|
608
630
|
'record.act.halt': '停',
|
|
609
631
|
'approval.record.site': '站点',
|
|
610
632
|
'approval.record.what': '录制功能',
|
|
611
|
-
'approval.record.lands': '
|
|
633
|
+
'approval.record.lands': '保存到',
|
|
612
634
|
'approval.record.noUrl': '没给站点地址(这次会被当场拒)',
|
|
613
635
|
'approval.record.oneAction': '一次操作',
|
|
614
636
|
'approval.record.noSwitch': '录完不会替你切回来(左栏底部会亮一条状态)',
|
|
615
|
-
'approval.longTask.what': '
|
|
616
|
-
'approval.longTask.signal': '停了只是让工作台发出中断信号 ——
|
|
637
|
+
'approval.longTask.what': '要停的那次任务',
|
|
638
|
+
'approval.longTask.signal': '停了只是让工作台发出中断信号 —— 这次任务怎么收尾由模块自己负责',
|
|
617
639
|
'approval.publish.module': '模块',
|
|
618
640
|
'approval.publish.target': '目标',
|
|
619
641
|
'approval.publish.version': '版本',
|
|
620
642
|
'approval.publish.author': '作者',
|
|
621
|
-
'approval.publish.authorMissing': '
|
|
643
|
+
'approval.publish.authorMissing': '未署名',
|
|
622
644
|
'approval.publish.registry': '源',
|
|
623
645
|
'approval.publish.repo': '仓库',
|
|
624
646
|
'approval.publish.branch': '分支',
|
|
625
647
|
'approval.publish.defaultBranch': '默认分支',
|
|
626
|
-
'approval.publish.artifacts': '
|
|
648
|
+
'approval.publish.artifacts': '打包文件',
|
|
627
649
|
'approval.publish.index': '索引',
|
|
628
650
|
'approval.publish.commits': '提交',
|
|
629
|
-
'approval.publish.twoCommits': '
|
|
651
|
+
'approval.publish.twoCommits': '打包文件 + market.json 两次提交,一次推送',
|
|
630
652
|
'approval.publish.reading': '读取中…',
|
|
631
653
|
'approval.publish.changelog': '{version} 的更新日志',
|
|
632
654
|
'approval.publish.changelogMissing': '这一版还没有更新日志({version}),发布会被拦下',
|
package/src/lib/dsh-client.ts
CHANGED
|
@@ -130,11 +130,13 @@ export interface DshSlots {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
|
-
* dsh
|
|
133
|
+
* dsh 的语言服务:按命名空间注册字典,再取回那个命名空间的文案函数;
|
|
134
|
+
* `resolveText` 按当前语言取一份字面量(字符串原样返回,映射按语言回退链取)。
|
|
134
135
|
*/
|
|
135
136
|
export interface DshLocale {
|
|
136
137
|
register(namespace: string, dictionaries: Record<string, Record<string, string>>): () => void;
|
|
137
138
|
bind(namespace: string): Translate;
|
|
139
|
+
resolveText?(text: string | Readonly<Record<string, string | undefined>>): string;
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
/**
|