@codingame/monaco-vscode-configuration-service-override 1.83.2 → 1.83.3
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/package.json +2 -2
- package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.js +42 -136
- package/vscode/src/vs/workbench/services/configuration/browser/configurationService.js +4 -10
- package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.js +42 -142
- package/vscode/src/vs/workbench/services/label/common/labelService.js +14 -45
- package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js +5 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-configuration-service-override",
|
|
3
|
-
"version": "1.83.
|
|
3
|
+
"version": "1.83.3",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.83.
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.83.3",
|
|
22
22
|
"monaco-editor": "0.44.0"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -15,39 +15,24 @@ const configurationEntrySchema = {
|
|
|
15
15
|
defaultSnippets: [{ body: { title: '', properties: {} } }],
|
|
16
16
|
properties: {
|
|
17
17
|
title: {
|
|
18
|
-
description: (
|
|
19
|
-
'vscode.extension.contributes.configuration.title',
|
|
20
|
-
'A title for the current category of settings. This label will be rendered in the Settings editor as a subheading. If the title is the same as the extension display name, then the category will be grouped under the main extension heading.'
|
|
21
|
-
)),
|
|
18
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'vscode.extension.contributes.configuration.title', 'A title for the current category of settings. This label will be rendered in the Settings editor as a subheading. If the title is the same as the extension display name, then the category will be grouped under the main extension heading.'),
|
|
22
19
|
type: 'string'
|
|
23
20
|
},
|
|
24
21
|
order: {
|
|
25
|
-
description: (
|
|
26
|
-
'vscode.extension.contributes.configuration.order',
|
|
27
|
-
'When specified, gives the order of this category of settings relative to other categories.'
|
|
28
|
-
)),
|
|
22
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'vscode.extension.contributes.configuration.order', 'When specified, gives the order of this category of settings relative to other categories.'),
|
|
29
23
|
type: 'integer'
|
|
30
24
|
},
|
|
31
25
|
properties: {
|
|
32
|
-
description: (
|
|
33
|
-
'vscode.extension.contributes.configuration.properties',
|
|
34
|
-
'Description of the configuration properties.'
|
|
35
|
-
)),
|
|
26
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'vscode.extension.contributes.configuration.properties', 'Description of the configuration properties.'),
|
|
36
27
|
type: 'object',
|
|
37
28
|
propertyNames: {
|
|
38
29
|
pattern: '\\S+',
|
|
39
|
-
patternErrorMessage: (
|
|
40
|
-
'vscode.extension.contributes.configuration.property.empty',
|
|
41
|
-
'Property should not be empty.'
|
|
42
|
-
)),
|
|
30
|
+
patternErrorMessage: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'vscode.extension.contributes.configuration.property.empty', 'Property should not be empty.'),
|
|
43
31
|
},
|
|
44
32
|
additionalProperties: {
|
|
45
33
|
anyOf: [
|
|
46
34
|
{
|
|
47
|
-
title: (
|
|
48
|
-
'vscode.extension.contributes.configuration.properties.schema',
|
|
49
|
-
'Schema of the configuration property.'
|
|
50
|
-
)),
|
|
35
|
+
title: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'vscode.extension.contributes.configuration.properties.schema', 'Schema of the configuration property.'),
|
|
51
36
|
$ref: 'http://json-schema.org/draft-07/schema#'
|
|
52
37
|
},
|
|
53
38
|
{
|
|
@@ -58,114 +43,65 @@ const configurationEntrySchema = {
|
|
|
58
43
|
enum: ['application', 'machine', 'window', 'resource', 'language-overridable', 'machine-overridable'],
|
|
59
44
|
default: 'window',
|
|
60
45
|
enumDescriptions: [
|
|
61
|
-
(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
)
|
|
65
|
-
(
|
|
66
|
-
|
|
67
|
-
"Configuration that can be configured only in the user settings or only in the remote settings."
|
|
68
|
-
)),
|
|
69
|
-
( nls.localize(
|
|
70
|
-
'scope.window.description',
|
|
71
|
-
"Configuration that can be configured in the user, remote or workspace settings."
|
|
72
|
-
)),
|
|
73
|
-
( nls.localize(
|
|
74
|
-
'scope.resource.description',
|
|
75
|
-
"Configuration that can be configured in the user, remote, workspace or folder settings."
|
|
76
|
-
)),
|
|
77
|
-
( nls.localize(
|
|
78
|
-
'scope.language-overridable.description',
|
|
79
|
-
"Resource configuration that can be configured in language specific settings."
|
|
80
|
-
)),
|
|
81
|
-
( nls.localize(
|
|
82
|
-
'scope.machine-overridable.description',
|
|
83
|
-
"Machine configuration that can be configured also in workspace or folder settings."
|
|
84
|
-
))
|
|
46
|
+
nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.application.description', "Configuration that can be configured only in the user settings."),
|
|
47
|
+
nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.machine.description', "Configuration that can be configured only in the user settings or only in the remote settings."),
|
|
48
|
+
nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.window.description', "Configuration that can be configured in the user, remote or workspace settings."),
|
|
49
|
+
nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.resource.description', "Configuration that can be configured in the user, remote, workspace or folder settings."),
|
|
50
|
+
nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.language-overridable.description', "Resource configuration that can be configured in language specific settings."),
|
|
51
|
+
nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.machine-overridable.description', "Machine configuration that can be configured also in workspace or folder settings.")
|
|
85
52
|
],
|
|
86
|
-
markdownDescription: (
|
|
87
|
-
'scope.description',
|
|
88
|
-
"Scope in which the configuration is applicable. Available scopes are `application`, `machine`, `window`, `resource`, and `machine-overridable`."
|
|
89
|
-
))
|
|
53
|
+
markdownDescription: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.description', "Scope in which the configuration is applicable. Available scopes are `application`, `machine`, `window`, `resource`, and `machine-overridable`.")
|
|
90
54
|
},
|
|
91
55
|
enumDescriptions: {
|
|
92
56
|
type: 'array',
|
|
93
57
|
items: {
|
|
94
58
|
type: 'string',
|
|
95
59
|
},
|
|
96
|
-
description:
|
|
60
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.enumDescriptions', 'Descriptions for enum values')
|
|
97
61
|
},
|
|
98
62
|
markdownEnumDescriptions: {
|
|
99
63
|
type: 'array',
|
|
100
64
|
items: {
|
|
101
65
|
type: 'string',
|
|
102
66
|
},
|
|
103
|
-
description: (
|
|
104
|
-
'scope.markdownEnumDescriptions',
|
|
105
|
-
'Descriptions for enum values in the markdown format.'
|
|
106
|
-
))
|
|
67
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.markdownEnumDescriptions', 'Descriptions for enum values in the markdown format.')
|
|
107
68
|
},
|
|
108
69
|
enumItemLabels: {
|
|
109
70
|
type: 'array',
|
|
110
71
|
items: {
|
|
111
72
|
type: 'string'
|
|
112
73
|
},
|
|
113
|
-
markdownDescription: (
|
|
114
|
-
'scope.enumItemLabels',
|
|
115
|
-
'Labels for enum values to be displayed in the Settings editor. When specified, the {0} values still show after the labels, but less prominently.',
|
|
116
|
-
'`enum`'
|
|
117
|
-
))
|
|
74
|
+
markdownDescription: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.enumItemLabels', 'Labels for enum values to be displayed in the Settings editor. When specified, the {0} values still show after the labels, but less prominently.', '`enum`')
|
|
118
75
|
},
|
|
119
76
|
markdownDescription: {
|
|
120
77
|
type: 'string',
|
|
121
|
-
description:
|
|
78
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.markdownDescription', 'The description in the markdown format.')
|
|
122
79
|
},
|
|
123
80
|
deprecationMessage: {
|
|
124
81
|
type: 'string',
|
|
125
|
-
description: (
|
|
126
|
-
'scope.deprecationMessage',
|
|
127
|
-
'If set, the property is marked as deprecated and the given message is shown as an explanation.'
|
|
128
|
-
))
|
|
82
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.deprecationMessage', 'If set, the property is marked as deprecated and the given message is shown as an explanation.')
|
|
129
83
|
},
|
|
130
84
|
markdownDeprecationMessage: {
|
|
131
85
|
type: 'string',
|
|
132
|
-
description: (
|
|
133
|
-
'scope.markdownDeprecationMessage',
|
|
134
|
-
'If set, the property is marked as deprecated and the given message is shown as an explanation in the markdown format.'
|
|
135
|
-
))
|
|
86
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.markdownDeprecationMessage', 'If set, the property is marked as deprecated and the given message is shown as an explanation in the markdown format.')
|
|
136
87
|
},
|
|
137
88
|
editPresentation: {
|
|
138
89
|
type: 'string',
|
|
139
90
|
enum: ['singlelineText', 'multilineText'],
|
|
140
91
|
enumDescriptions: [
|
|
141
|
-
(
|
|
142
|
-
|
|
143
|
-
'The value will be shown in an inputbox.'
|
|
144
|
-
)),
|
|
145
|
-
( nls.localize(
|
|
146
|
-
'scope.multilineText.description',
|
|
147
|
-
'The value will be shown in a textarea.'
|
|
148
|
-
))
|
|
92
|
+
nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.singlelineText.description', 'The value will be shown in an inputbox.'),
|
|
93
|
+
nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.multilineText.description', 'The value will be shown in a textarea.')
|
|
149
94
|
],
|
|
150
95
|
default: 'singlelineText',
|
|
151
|
-
description: (
|
|
152
|
-
'scope.editPresentation',
|
|
153
|
-
'When specified, controls the presentation format of the string setting.'
|
|
154
|
-
))
|
|
96
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.editPresentation', 'When specified, controls the presentation format of the string setting.')
|
|
155
97
|
},
|
|
156
98
|
order: {
|
|
157
99
|
type: 'integer',
|
|
158
|
-
description: (
|
|
159
|
-
'scope.order',
|
|
160
|
-
'When specified, gives the order of this setting relative to other settings within the same category. Settings with an order property will be placed before settings without this property set.'
|
|
161
|
-
))
|
|
100
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.order', 'When specified, gives the order of this setting relative to other settings within the same category. Settings with an order property will be placed before settings without this property set.')
|
|
162
101
|
},
|
|
163
102
|
ignoreSync: {
|
|
164
103
|
type: 'boolean',
|
|
165
|
-
description: (
|
|
166
|
-
'scope.ignoreSync',
|
|
167
|
-
'When enabled, Settings Sync will not sync the user value of this configuration by default.'
|
|
168
|
-
))
|
|
104
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'scope.ignoreSync', 'When enabled, Settings Sync will not sync the user value of this configuration by default.')
|
|
169
105
|
},
|
|
170
106
|
}
|
|
171
107
|
}
|
|
@@ -207,11 +143,7 @@ defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
207
143
|
if (!OVERRIDE_PROPERTY_REGEX.test(key)) {
|
|
208
144
|
const registeredPropertyScheme = registeredProperties[key];
|
|
209
145
|
if (registeredPropertyScheme?.scope && !allowedScopes.includes(registeredPropertyScheme.scope)) {
|
|
210
|
-
extension.collector.warn((
|
|
211
|
-
'config.property.defaultConfiguration.warning',
|
|
212
|
-
"Cannot register configuration defaults for '{0}'. Only defaults for machine-overridable, window, resource and language overridable scoped settings are supported.",
|
|
213
|
-
key
|
|
214
|
-
)));
|
|
146
|
+
extension.collector.warn(nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'config.property.defaultConfiguration.warning', "Cannot register configuration defaults for '{0}'. Only defaults for machine-overridable, window, resource and language overridable scoped settings are supported.", key));
|
|
215
147
|
delete overrides[key];
|
|
216
148
|
}
|
|
217
149
|
}
|
|
@@ -225,10 +157,7 @@ const configurationExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
225
157
|
extensionPoint: 'configuration',
|
|
226
158
|
deps: [defaultConfigurationExtPoint],
|
|
227
159
|
jsonSchema: {
|
|
228
|
-
description: (
|
|
229
|
-
'vscode.extension.contributes.configuration',
|
|
230
|
-
'Contributes configuration settings.'
|
|
231
|
-
)),
|
|
160
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'vscode.extension.contributes.configuration', 'Contributes configuration settings.'),
|
|
232
161
|
oneOf: [
|
|
233
162
|
configurationEntrySchema,
|
|
234
163
|
{
|
|
@@ -254,7 +183,7 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
254
183
|
const configurations = [];
|
|
255
184
|
const configuration = objects.deepClone(node);
|
|
256
185
|
if (configuration.title && (typeof configuration.title !== 'string')) {
|
|
257
|
-
extension.collector.error(
|
|
186
|
+
extension.collector.error(nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'invalid.title', "'configuration.title' must be a string"));
|
|
258
187
|
}
|
|
259
188
|
validateProperties(configuration, extension);
|
|
260
189
|
configuration.id = node.id || extension.description.identifier.value;
|
|
@@ -268,7 +197,7 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
268
197
|
const properties = configuration.properties;
|
|
269
198
|
if (properties) {
|
|
270
199
|
if (typeof properties !== 'object') {
|
|
271
|
-
extension.collector.error(
|
|
200
|
+
extension.collector.error(nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'invalid.properties', "'configuration.properties' must be an object"));
|
|
272
201
|
configuration.properties = {};
|
|
273
202
|
}
|
|
274
203
|
for (const key in properties) {
|
|
@@ -281,20 +210,12 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
281
210
|
}
|
|
282
211
|
if (( seenProperties.has(key))) {
|
|
283
212
|
delete properties[key];
|
|
284
|
-
extension.collector.warn((
|
|
285
|
-
'config.property.duplicate',
|
|
286
|
-
"Cannot register '{0}'. This property is already registered.",
|
|
287
|
-
key
|
|
288
|
-
)));
|
|
213
|
+
extension.collector.warn(nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'config.property.duplicate', "Cannot register '{0}'. This property is already registered.", key));
|
|
289
214
|
continue;
|
|
290
215
|
}
|
|
291
216
|
if (!isObject(propertyConfiguration)) {
|
|
292
217
|
delete properties[key];
|
|
293
|
-
extension.collector.error((
|
|
294
|
-
'invalid.property',
|
|
295
|
-
"configuration.properties property '{0}' must be an object",
|
|
296
|
-
key
|
|
297
|
-
)));
|
|
218
|
+
extension.collector.error(nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'invalid.property', "configuration.properties property '{0}' must be an object", key));
|
|
298
219
|
continue;
|
|
299
220
|
}
|
|
300
221
|
seenProperties.add(key);
|
|
@@ -325,10 +246,7 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
325
246
|
}
|
|
326
247
|
const subNodes = configuration.allOf;
|
|
327
248
|
if (subNodes) {
|
|
328
|
-
extension.collector.error((
|
|
329
|
-
'invalid.allOf',
|
|
330
|
-
"'configuration.allOf' is deprecated and should no longer be used. Instead, pass multiple configuration sections as an array to the 'configuration' contribution point."
|
|
331
|
-
)));
|
|
249
|
+
extension.collector.error(nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'invalid.allOf', "'configuration.allOf' is deprecated and should no longer be used. Instead, pass multiple configuration sections as an array to the 'configuration' contribution point."));
|
|
332
250
|
for (const node of subNodes) {
|
|
333
251
|
validateProperties(node, extension);
|
|
334
252
|
}
|
|
@@ -369,10 +287,7 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
|
|
369
287
|
'folders': {
|
|
370
288
|
minItems: 0,
|
|
371
289
|
uniqueItems: true,
|
|
372
|
-
description: (
|
|
373
|
-
'workspaceConfig.folders.description',
|
|
374
|
-
"List of folders to be loaded in the workspace."
|
|
375
|
-
)),
|
|
290
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'workspaceConfig.folders.description', "List of folders to be loaded in the workspace."),
|
|
376
291
|
items: {
|
|
377
292
|
type: 'object',
|
|
378
293
|
defaultSnippets: [{ body: { path: '$1' } }],
|
|
@@ -380,14 +295,11 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
|
|
380
295
|
properties: {
|
|
381
296
|
path: {
|
|
382
297
|
type: 'string',
|
|
383
|
-
description: (
|
|
384
|
-
'workspaceConfig.path.description',
|
|
385
|
-
"A file path. e.g. `/root/folderA` or `./folderA` for a relative path that will be resolved against the location of the workspace file."
|
|
386
|
-
))
|
|
298
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'workspaceConfig.path.description', "A file path. e.g. `/root/folderA` or `./folderA` for a relative path that will be resolved against the location of the workspace file.")
|
|
387
299
|
},
|
|
388
300
|
name: {
|
|
389
301
|
type: 'string',
|
|
390
|
-
description:
|
|
302
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'workspaceConfig.name.description', "An optional name for the folder. ")
|
|
391
303
|
}
|
|
392
304
|
},
|
|
393
305
|
required: ['path']
|
|
@@ -395,11 +307,11 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
|
|
395
307
|
properties: {
|
|
396
308
|
uri: {
|
|
397
309
|
type: 'string',
|
|
398
|
-
description:
|
|
310
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'workspaceConfig.uri.description', "URI of the folder")
|
|
399
311
|
},
|
|
400
312
|
name: {
|
|
401
313
|
type: 'string',
|
|
402
|
-
description:
|
|
314
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'workspaceConfig.name.description', "An optional name for the folder. ")
|
|
403
315
|
}
|
|
404
316
|
},
|
|
405
317
|
required: ['uri']
|
|
@@ -409,43 +321,37 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
|
|
409
321
|
'settings': {
|
|
410
322
|
type: 'object',
|
|
411
323
|
default: {},
|
|
412
|
-
description:
|
|
324
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'workspaceConfig.settings.description', "Workspace settings"),
|
|
413
325
|
$ref: workspaceSettingsSchemaId
|
|
414
326
|
},
|
|
415
327
|
'launch': {
|
|
416
328
|
type: 'object',
|
|
417
329
|
default: { configurations: [], compounds: [] },
|
|
418
|
-
description:
|
|
330
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'workspaceConfig.launch.description', "Workspace launch configurations"),
|
|
419
331
|
$ref: launchSchemaId
|
|
420
332
|
},
|
|
421
333
|
'tasks': {
|
|
422
334
|
type: 'object',
|
|
423
335
|
default: { version: '2.0.0', tasks: [] },
|
|
424
|
-
description:
|
|
336
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'workspaceConfig.tasks.description', "Workspace task configurations"),
|
|
425
337
|
$ref: tasksSchemaId
|
|
426
338
|
},
|
|
427
339
|
'extensions': {
|
|
428
340
|
type: 'object',
|
|
429
341
|
default: {},
|
|
430
|
-
description:
|
|
342
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'workspaceConfig.extensions.description', "Workspace extensions"),
|
|
431
343
|
$ref: 'vscode://schemas/extensions'
|
|
432
344
|
},
|
|
433
345
|
'remoteAuthority': {
|
|
434
346
|
type: 'string',
|
|
435
347
|
doNotSuggest: true,
|
|
436
|
-
description: (
|
|
437
|
-
'workspaceConfig.remoteAuthority',
|
|
438
|
-
"The remote server where the workspace is located."
|
|
439
|
-
)),
|
|
348
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'workspaceConfig.remoteAuthority', "The remote server where the workspace is located."),
|
|
440
349
|
},
|
|
441
350
|
'transient': {
|
|
442
351
|
type: 'boolean',
|
|
443
352
|
doNotSuggest: true,
|
|
444
|
-
description: (
|
|
445
|
-
'workspaceConfig.transient',
|
|
446
|
-
"A transient workspace will disappear when restarting or reloading."
|
|
447
|
-
)),
|
|
353
|
+
description: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'workspaceConfig.transient', "A transient workspace will disappear when restarting or reloading."),
|
|
448
354
|
}
|
|
449
355
|
},
|
|
450
|
-
errorMessage:
|
|
356
|
+
errorMessage: nls.localizeWithPath('vs/workbench/api/common/configurationExtensionPoint', 'unknownWorkspaceProperty', "Unknown workspace configuration property")
|
|
451
357
|
});
|
|
@@ -27,7 +27,7 @@ import { distinct, delta } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
|
27
27
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
28
28
|
import { IWorkbenchAssignmentService } from 'vscode/vscode/vs/workbench/services/assignment/common/assignmentService';
|
|
29
29
|
import { isUndefined } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
30
|
-
import {
|
|
30
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
31
31
|
import { NullPolicyService } from 'monaco-editor/esm/vs/platform/policy/common/policy.js';
|
|
32
32
|
import { IJSONEditingService } from 'vscode/vscode/vs/workbench/services/configuration/common/jsonEditing';
|
|
33
33
|
import { workbenchConfigurationNodeBase } from 'vscode/vscode/vs/workbench/common/configuration';
|
|
@@ -1045,10 +1045,7 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
|
|
|
1045
1045
|
} : workspaceSettingsSchema;
|
|
1046
1046
|
const configDefaultsSchema = {
|
|
1047
1047
|
type: 'object',
|
|
1048
|
-
description: (
|
|
1049
|
-
'configurationDefaults.description',
|
|
1050
|
-
'Contribute defaults for configurations'
|
|
1051
|
-
)),
|
|
1048
|
+
description: localizeWithPath('vs/workbench/services/configuration/browser/configurationService', 'configurationDefaults.description', 'Contribute defaults for configurations'),
|
|
1052
1049
|
properties: Object.assign({}, machineOverridableSettings.properties, windowSettings.properties, resourceSettings.properties),
|
|
1053
1050
|
patternProperties: {
|
|
1054
1051
|
[OVERRIDE_PROPERTY_PATTERN]: {
|
|
@@ -1129,7 +1126,7 @@ let UpdateExperimentalSettingsDefaults = class UpdateExperimentalSettingsDefault
|
|
|
1129
1126
|
catch (error) { }
|
|
1130
1127
|
}
|
|
1131
1128
|
if (( Object.keys(overrides)).length) {
|
|
1132
|
-
this.configurationRegistry.registerDefaultConfigurations([{ overrides, source: (
|
|
1129
|
+
this.configurationRegistry.registerDefaultConfigurations([{ overrides, source: localizeWithPath('vs/workbench/services/configuration/browser/configurationService', 'experimental', "Experiments") }]);
|
|
1133
1130
|
}
|
|
1134
1131
|
}
|
|
1135
1132
|
};
|
|
@@ -1145,10 +1142,7 @@ configurationRegistry.registerConfiguration({
|
|
|
1145
1142
|
properties: {
|
|
1146
1143
|
[APPLY_ALL_PROFILES_SETTING]: {
|
|
1147
1144
|
'type': 'array',
|
|
1148
|
-
description: (
|
|
1149
|
-
'setting description',
|
|
1150
|
-
"Configure settings to be applied for all profiles."
|
|
1151
|
-
)),
|
|
1145
|
+
description: localizeWithPath('vs/workbench/services/configuration/browser/configurationService', 'setting description', "Configure settings to be applied for all profiles."),
|
|
1152
1146
|
'default': [],
|
|
1153
1147
|
'scope': 1 ,
|
|
1154
1148
|
additionalProperties: true,
|
|
@@ -96,7 +96,7 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
96
96
|
if (error.fileOperationResult === 3 ) {
|
|
97
97
|
throw this.toConfigurationEditingError(10 , operation.target, operation);
|
|
98
98
|
}
|
|
99
|
-
throw new ConfigurationEditingError(nls.
|
|
99
|
+
throw new ConfigurationEditingError(nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'fsError', "Error while writing to {0}. {1}", this.stringifyTarget(operation.target), error.message), 13 );
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
applyEditsToBuffer(edit, model) {
|
|
@@ -152,8 +152,8 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
onInvalidConfigurationError(error, operation) {
|
|
155
|
-
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ?
|
|
156
|
-
: operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ?
|
|
155
|
+
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'openTasksConfiguration', "Open Tasks Configuration")
|
|
156
|
+
: operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'openLaunchConfiguration', "Open Launch Configuration")
|
|
157
157
|
: null;
|
|
158
158
|
if (openStandAloneConfigurationActionLabel) {
|
|
159
159
|
this.notificationService.prompt(Severity.Error, error.message, [{
|
|
@@ -163,18 +163,18 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
163
163
|
}
|
|
164
164
|
else {
|
|
165
165
|
this.notificationService.prompt(Severity.Error, error.message, [{
|
|
166
|
-
label:
|
|
166
|
+
label: nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'open', "Open Settings"),
|
|
167
167
|
run: () => this.openSettings(operation)
|
|
168
168
|
}]);
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
onConfigurationFileDirtyError(error, operation, scopes) {
|
|
172
|
-
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ?
|
|
173
|
-
: operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ?
|
|
172
|
+
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'openTasksConfiguration', "Open Tasks Configuration")
|
|
173
|
+
: operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'openLaunchConfiguration', "Open Launch Configuration")
|
|
174
174
|
: null;
|
|
175
175
|
if (openStandAloneConfigurationActionLabel) {
|
|
176
176
|
this.notificationService.prompt(Severity.Error, error.message, [{
|
|
177
|
-
label:
|
|
177
|
+
label: nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'saveAndRetry', "Save and Retry"),
|
|
178
178
|
run: () => {
|
|
179
179
|
const key = operation.key ? `${operation.workspaceStandAloneConfigurationKey}.${operation.key}` : operation.workspaceStandAloneConfigurationKey;
|
|
180
180
|
this.writeConfiguration(operation.target, { key, value: operation.value }, { handleDirtyFile: 'save', scopes });
|
|
@@ -187,11 +187,11 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
187
187
|
}
|
|
188
188
|
else {
|
|
189
189
|
this.notificationService.prompt(Severity.Error, error.message, [{
|
|
190
|
-
label:
|
|
190
|
+
label: nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'saveAndRetry', "Save and Retry"),
|
|
191
191
|
run: () => this.writeConfiguration(operation.target, { key: operation.key, value: operation.value }, { handleDirtyFile: 'save', scopes })
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
|
-
label:
|
|
194
|
+
label: nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'open', "Open Settings"),
|
|
195
195
|
run: () => this.openSettings(operation)
|
|
196
196
|
}]);
|
|
197
197
|
}
|
|
@@ -227,85 +227,30 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
227
227
|
}
|
|
228
228
|
toErrorMessage(error, target, operation) {
|
|
229
229
|
switch (error) {
|
|
230
|
-
case 12 : return (
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
)
|
|
235
|
-
case
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
));
|
|
241
|
-
case 1 : return ( nls.localize(
|
|
242
|
-
'errorInvalidWorkspaceConfigurationApplication',
|
|
243
|
-
"Unable to write {0} to Workspace Settings. This setting can be written only into User settings.",
|
|
244
|
-
operation.key
|
|
245
|
-
));
|
|
246
|
-
case 2 : return ( nls.localize(
|
|
247
|
-
'errorInvalidWorkspaceConfigurationMachine',
|
|
248
|
-
"Unable to write {0} to Workspace Settings. This setting can be written only into User settings.",
|
|
249
|
-
operation.key
|
|
250
|
-
));
|
|
251
|
-
case 3 : return ( nls.localize(
|
|
252
|
-
'errorInvalidFolderConfiguration',
|
|
253
|
-
"Unable to write to Folder Settings because {0} does not support the folder resource scope.",
|
|
254
|
-
operation.key
|
|
255
|
-
));
|
|
256
|
-
case 4 : return ( nls.localize(
|
|
257
|
-
'errorInvalidUserTarget',
|
|
258
|
-
"Unable to write to User Settings because {0} does not support for global scope.",
|
|
259
|
-
operation.key
|
|
260
|
-
));
|
|
261
|
-
case 5 : return ( nls.localize(
|
|
262
|
-
'errorInvalidWorkspaceTarget',
|
|
263
|
-
"Unable to write to Workspace Settings because {0} does not support for workspace scope in a multi folder workspace.",
|
|
264
|
-
operation.key
|
|
265
|
-
));
|
|
266
|
-
case 6 : return ( nls.localize(
|
|
267
|
-
'errorInvalidFolderTarget',
|
|
268
|
-
"Unable to write to Folder Settings because no resource is provided."
|
|
269
|
-
));
|
|
270
|
-
case 7 : return ( nls.localize(
|
|
271
|
-
'errorInvalidResourceLanguageConfiguration',
|
|
272
|
-
"Unable to write to Language Settings because {0} is not a resource language setting.",
|
|
273
|
-
operation.key
|
|
274
|
-
));
|
|
275
|
-
case 8 : return ( nls.localize(
|
|
276
|
-
'errorNoWorkspaceOpened',
|
|
277
|
-
"Unable to write to {0} because no workspace is opened. Please open a workspace first and try again.",
|
|
278
|
-
this.stringifyTarget(target)
|
|
279
|
-
));
|
|
230
|
+
case 12 : return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorPolicyConfiguration', "Unable to write {0} because it is configured in system policy.", operation.key);
|
|
231
|
+
case 0 : return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorUnknownKey', "Unable to write to {0} because {1} is not a registered configuration.", this.stringifyTarget(target), operation.key);
|
|
232
|
+
case 1 : return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorInvalidWorkspaceConfigurationApplication', "Unable to write {0} to Workspace Settings. This setting can be written only into User settings.", operation.key);
|
|
233
|
+
case 2 : return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorInvalidWorkspaceConfigurationMachine', "Unable to write {0} to Workspace Settings. This setting can be written only into User settings.", operation.key);
|
|
234
|
+
case 3 : return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorInvalidFolderConfiguration', "Unable to write to Folder Settings because {0} does not support the folder resource scope.", operation.key);
|
|
235
|
+
case 4 : return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorInvalidUserTarget', "Unable to write to User Settings because {0} does not support for global scope.", operation.key);
|
|
236
|
+
case 5 : return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorInvalidWorkspaceTarget', "Unable to write to Workspace Settings because {0} does not support for workspace scope in a multi folder workspace.", operation.key);
|
|
237
|
+
case 6 : return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorInvalidFolderTarget', "Unable to write to Folder Settings because no resource is provided.");
|
|
238
|
+
case 7 : return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorInvalidResourceLanguageConfiguration', "Unable to write to Language Settings because {0} is not a resource language setting.", operation.key);
|
|
239
|
+
case 8 : return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorNoWorkspaceOpened', "Unable to write to {0} because no workspace is opened. Please open a workspace first and try again.", this.stringifyTarget(target));
|
|
280
240
|
case 11 : {
|
|
281
241
|
if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
|
|
282
|
-
return (
|
|
283
|
-
'errorInvalidTaskConfiguration',
|
|
284
|
-
"Unable to write into the tasks configuration file. Please open it to correct errors/warnings in it and try again."
|
|
285
|
-
));
|
|
242
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorInvalidTaskConfiguration', "Unable to write into the tasks configuration file. Please open it to correct errors/warnings in it and try again.");
|
|
286
243
|
}
|
|
287
244
|
if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
|
|
288
|
-
return (
|
|
289
|
-
'errorInvalidLaunchConfiguration',
|
|
290
|
-
"Unable to write into the launch configuration file. Please open it to correct errors/warnings in it and try again."
|
|
291
|
-
));
|
|
245
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorInvalidLaunchConfiguration', "Unable to write into the launch configuration file. Please open it to correct errors/warnings in it and try again.");
|
|
292
246
|
}
|
|
293
247
|
switch (target) {
|
|
294
248
|
case 1 :
|
|
295
|
-
return (
|
|
296
|
-
'errorInvalidConfiguration',
|
|
297
|
-
"Unable to write into user settings. Please open the user settings to correct errors/warnings in it and try again."
|
|
298
|
-
));
|
|
249
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorInvalidConfiguration', "Unable to write into user settings. Please open the user settings to correct errors/warnings in it and try again.");
|
|
299
250
|
case 2 :
|
|
300
|
-
return (
|
|
301
|
-
'errorInvalidRemoteConfiguration',
|
|
302
|
-
"Unable to write into remote user settings. Please open the remote user settings to correct errors/warnings in it and try again."
|
|
303
|
-
));
|
|
251
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorInvalidRemoteConfiguration', "Unable to write into remote user settings. Please open the remote user settings to correct errors/warnings in it and try again.");
|
|
304
252
|
case 3 :
|
|
305
|
-
return (
|
|
306
|
-
'errorInvalidConfigurationWorkspace',
|
|
307
|
-
"Unable to write into workspace settings. Please open the workspace settings to correct errors/warnings in the file and try again."
|
|
308
|
-
));
|
|
253
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorInvalidConfigurationWorkspace', "Unable to write into workspace settings. Please open the workspace settings to correct errors/warnings in the file and try again.");
|
|
309
254
|
case 4 : {
|
|
310
255
|
let workspaceFolderName = '<<unknown>>';
|
|
311
256
|
if (operation.resource) {
|
|
@@ -314,11 +259,7 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
314
259
|
workspaceFolderName = folder.name;
|
|
315
260
|
}
|
|
316
261
|
}
|
|
317
|
-
return (
|
|
318
|
-
'errorInvalidConfigurationFolder',
|
|
319
|
-
"Unable to write into folder settings. Please open the '{0}' folder settings to correct errors/warnings in it and try again.",
|
|
320
|
-
workspaceFolderName
|
|
321
|
-
));
|
|
262
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorInvalidConfigurationFolder', "Unable to write into folder settings. Please open the '{0}' folder settings to correct errors/warnings in it and try again.", workspaceFolderName);
|
|
322
263
|
}
|
|
323
264
|
default:
|
|
324
265
|
return '';
|
|
@@ -326,33 +267,18 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
326
267
|
}
|
|
327
268
|
case 9 : {
|
|
328
269
|
if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
|
|
329
|
-
return (
|
|
330
|
-
'errorTasksConfigurationFileDirty',
|
|
331
|
-
"Unable to write into tasks configuration file because the file has unsaved changes. Please save it first and then try again."
|
|
332
|
-
));
|
|
270
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorTasksConfigurationFileDirty', "Unable to write into tasks configuration file because the file has unsaved changes. Please save it first and then try again.");
|
|
333
271
|
}
|
|
334
272
|
if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
|
|
335
|
-
return (
|
|
336
|
-
'errorLaunchConfigurationFileDirty',
|
|
337
|
-
"Unable to write into launch configuration file because the file has unsaved changes. Please save it first and then try again."
|
|
338
|
-
));
|
|
273
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorLaunchConfigurationFileDirty', "Unable to write into launch configuration file because the file has unsaved changes. Please save it first and then try again.");
|
|
339
274
|
}
|
|
340
275
|
switch (target) {
|
|
341
276
|
case 1 :
|
|
342
|
-
return (
|
|
343
|
-
'errorConfigurationFileDirty',
|
|
344
|
-
"Unable to write into user settings because the file has unsaved changes. Please save the user settings file first and then try again."
|
|
345
|
-
));
|
|
277
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorConfigurationFileDirty', "Unable to write into user settings because the file has unsaved changes. Please save the user settings file first and then try again.");
|
|
346
278
|
case 2 :
|
|
347
|
-
return (
|
|
348
|
-
'errorRemoteConfigurationFileDirty',
|
|
349
|
-
"Unable to write into remote user settings because the file has unsaved changes. Please save the remote user settings file first and then try again."
|
|
350
|
-
));
|
|
279
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorRemoteConfigurationFileDirty', "Unable to write into remote user settings because the file has unsaved changes. Please save the remote user settings file first and then try again.");
|
|
351
280
|
case 3 :
|
|
352
|
-
return (
|
|
353
|
-
'errorConfigurationFileDirtyWorkspace',
|
|
354
|
-
"Unable to write into workspace settings because the file has unsaved changes. Please save the workspace settings file first and then try again."
|
|
355
|
-
));
|
|
281
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorConfigurationFileDirtyWorkspace', "Unable to write into workspace settings because the file has unsaved changes. Please save the workspace settings file first and then try again.");
|
|
356
282
|
case 4 : {
|
|
357
283
|
let workspaceFolderName = '<<unknown>>';
|
|
358
284
|
if (operation.resource) {
|
|
@@ -361,11 +287,7 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
361
287
|
workspaceFolderName = folder.name;
|
|
362
288
|
}
|
|
363
289
|
}
|
|
364
|
-
return (
|
|
365
|
-
'errorConfigurationFileDirtyFolder',
|
|
366
|
-
"Unable to write into folder settings because the file has unsaved changes. Please save the '{0}' folder settings file first and then try again.",
|
|
367
|
-
workspaceFolderName
|
|
368
|
-
));
|
|
290
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorConfigurationFileDirtyFolder', "Unable to write into folder settings because the file has unsaved changes. Please save the '{0}' folder settings file first and then try again.", workspaceFolderName);
|
|
369
291
|
}
|
|
370
292
|
default:
|
|
371
293
|
return '';
|
|
@@ -373,56 +295,34 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
373
295
|
}
|
|
374
296
|
case 10 :
|
|
375
297
|
if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
|
|
376
|
-
return (
|
|
377
|
-
'errorTasksConfigurationFileModifiedSince',
|
|
378
|
-
"Unable to write into tasks configuration file because the content of the file is newer."
|
|
379
|
-
));
|
|
298
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorTasksConfigurationFileModifiedSince', "Unable to write into tasks configuration file because the content of the file is newer.");
|
|
380
299
|
}
|
|
381
300
|
if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
|
|
382
|
-
return (
|
|
383
|
-
'errorLaunchConfigurationFileModifiedSince',
|
|
384
|
-
"Unable to write into launch configuration file because the content of the file is newer."
|
|
385
|
-
));
|
|
301
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorLaunchConfigurationFileModifiedSince', "Unable to write into launch configuration file because the content of the file is newer.");
|
|
386
302
|
}
|
|
387
303
|
switch (target) {
|
|
388
304
|
case 1 :
|
|
389
|
-
return (
|
|
390
|
-
'errorConfigurationFileModifiedSince',
|
|
391
|
-
"Unable to write into user settings because the content of the file is newer."
|
|
392
|
-
));
|
|
305
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorConfigurationFileModifiedSince', "Unable to write into user settings because the content of the file is newer.");
|
|
393
306
|
case 2 :
|
|
394
|
-
return (
|
|
395
|
-
'errorRemoteConfigurationFileModifiedSince',
|
|
396
|
-
"Unable to write into remote user settings because the content of the file is newer."
|
|
397
|
-
));
|
|
307
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorRemoteConfigurationFileModifiedSince', "Unable to write into remote user settings because the content of the file is newer.");
|
|
398
308
|
case 3 :
|
|
399
|
-
return (
|
|
400
|
-
'errorConfigurationFileModifiedSinceWorkspace',
|
|
401
|
-
"Unable to write into workspace settings because the content of the file is newer."
|
|
402
|
-
));
|
|
309
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorConfigurationFileModifiedSinceWorkspace', "Unable to write into workspace settings because the content of the file is newer.");
|
|
403
310
|
case 4 :
|
|
404
|
-
return (
|
|
405
|
-
'errorConfigurationFileModifiedSinceFolder',
|
|
406
|
-
"Unable to write into folder settings because the content of the file is newer."
|
|
407
|
-
));
|
|
311
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorConfigurationFileModifiedSinceFolder', "Unable to write into folder settings because the content of the file is newer.");
|
|
408
312
|
}
|
|
409
|
-
case 13 : return (
|
|
410
|
-
'errorUnknown',
|
|
411
|
-
"Unable to write to {0} because of an internal error.",
|
|
412
|
-
this.stringifyTarget(target)
|
|
413
|
-
));
|
|
313
|
+
case 13 : return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'errorUnknown', "Unable to write to {0} because of an internal error.", this.stringifyTarget(target));
|
|
414
314
|
}
|
|
415
315
|
}
|
|
416
316
|
stringifyTarget(target) {
|
|
417
317
|
switch (target) {
|
|
418
318
|
case 1 :
|
|
419
|
-
return
|
|
319
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'userTarget', "User Settings");
|
|
420
320
|
case 2 :
|
|
421
|
-
return
|
|
321
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'remoteUserTarget', "Remote User Settings");
|
|
422
322
|
case 3 :
|
|
423
|
-
return
|
|
323
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'workspaceTarget', "Workspace Settings");
|
|
424
324
|
case 4 :
|
|
425
|
-
return
|
|
325
|
+
return nls.localizeWithPath('vs/workbench/services/configuration/common/configurationEditing', 'folderTarget', "Folder Settings");
|
|
426
326
|
default:
|
|
427
327
|
return '';
|
|
428
328
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
3
|
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
4
4
|
import { dispose, Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
5
5
|
import { sep, posix, win32 } from 'monaco-editor/esm/vs/base/common/path.js';
|
|
@@ -26,10 +26,7 @@ import { firstOrDefault } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
|
26
26
|
const resourceLabelFormattersExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
27
27
|
extensionPoint: 'resourceLabelFormatters',
|
|
28
28
|
jsonSchema: {
|
|
29
|
-
description: (
|
|
30
|
-
'vscode.extension.contributes.resourceLabelFormatters',
|
|
31
|
-
'Contributes resource label formatting rules.'
|
|
32
|
-
)),
|
|
29
|
+
description: localizeWithPath('vs/workbench/services/label/common/labelService', 'vscode.extension.contributes.resourceLabelFormatters', 'Contributes resource label formatting rules.'),
|
|
33
30
|
type: 'array',
|
|
34
31
|
items: {
|
|
35
32
|
type: 'object',
|
|
@@ -37,59 +34,35 @@ const resourceLabelFormattersExtPoint = ( ExtensionsRegistry.registerExtensionPo
|
|
|
37
34
|
properties: {
|
|
38
35
|
scheme: {
|
|
39
36
|
type: 'string',
|
|
40
|
-
description: (
|
|
41
|
-
'vscode.extension.contributes.resourceLabelFormatters.scheme',
|
|
42
|
-
'URI scheme on which to match the formatter on. For example "file". Simple glob patterns are supported.'
|
|
43
|
-
)),
|
|
37
|
+
description: localizeWithPath('vs/workbench/services/label/common/labelService', 'vscode.extension.contributes.resourceLabelFormatters.scheme', 'URI scheme on which to match the formatter on. For example "file". Simple glob patterns are supported.'),
|
|
44
38
|
},
|
|
45
39
|
authority: {
|
|
46
40
|
type: 'string',
|
|
47
|
-
description: (
|
|
48
|
-
'vscode.extension.contributes.resourceLabelFormatters.authority',
|
|
49
|
-
'URI authority on which to match the formatter on. Simple glob patterns are supported.'
|
|
50
|
-
)),
|
|
41
|
+
description: localizeWithPath('vs/workbench/services/label/common/labelService', 'vscode.extension.contributes.resourceLabelFormatters.authority', 'URI authority on which to match the formatter on. Simple glob patterns are supported.'),
|
|
51
42
|
},
|
|
52
43
|
formatting: {
|
|
53
|
-
description: (
|
|
54
|
-
'vscode.extension.contributes.resourceLabelFormatters.formatting',
|
|
55
|
-
"Rules for formatting uri resource labels."
|
|
56
|
-
)),
|
|
44
|
+
description: localizeWithPath('vs/workbench/services/label/common/labelService', 'vscode.extension.contributes.resourceLabelFormatters.formatting', "Rules for formatting uri resource labels."),
|
|
57
45
|
type: 'object',
|
|
58
46
|
properties: {
|
|
59
47
|
label: {
|
|
60
48
|
type: 'string',
|
|
61
|
-
description: (
|
|
62
|
-
'vscode.extension.contributes.resourceLabelFormatters.label',
|
|
63
|
-
"Label rules to display. For example: myLabel:/${path}. ${path}, ${scheme}, ${authority} and ${authoritySuffix} are supported as variables."
|
|
64
|
-
))
|
|
49
|
+
description: localizeWithPath('vs/workbench/services/label/common/labelService', 'vscode.extension.contributes.resourceLabelFormatters.label', "Label rules to display. For example: myLabel:/${path}. ${path}, ${scheme}, ${authority} and ${authoritySuffix} are supported as variables.")
|
|
65
50
|
},
|
|
66
51
|
separator: {
|
|
67
52
|
type: 'string',
|
|
68
|
-
description: (
|
|
69
|
-
'vscode.extension.contributes.resourceLabelFormatters.separator',
|
|
70
|
-
"Separator to be used in the uri label display. '/' or '\' as an example."
|
|
71
|
-
))
|
|
53
|
+
description: localizeWithPath('vs/workbench/services/label/common/labelService', 'vscode.extension.contributes.resourceLabelFormatters.separator', "Separator to be used in the uri label display. '/' or '\' as an example.")
|
|
72
54
|
},
|
|
73
55
|
stripPathStartingSeparator: {
|
|
74
56
|
type: 'boolean',
|
|
75
|
-
description: (
|
|
76
|
-
'vscode.extension.contributes.resourceLabelFormatters.stripPathStartingSeparator',
|
|
77
|
-
"Controls whether `${path}` substitutions should have starting separator characters stripped."
|
|
78
|
-
))
|
|
57
|
+
description: localizeWithPath('vs/workbench/services/label/common/labelService', 'vscode.extension.contributes.resourceLabelFormatters.stripPathStartingSeparator', "Controls whether `${path}` substitutions should have starting separator characters stripped.")
|
|
79
58
|
},
|
|
80
59
|
tildify: {
|
|
81
60
|
type: 'boolean',
|
|
82
|
-
description: (
|
|
83
|
-
'vscode.extension.contributes.resourceLabelFormatters.tildify',
|
|
84
|
-
"Controls if the start of the uri label should be tildified when possible."
|
|
85
|
-
))
|
|
61
|
+
description: localizeWithPath('vs/workbench/services/label/common/labelService', 'vscode.extension.contributes.resourceLabelFormatters.tildify', "Controls if the start of the uri label should be tildified when possible.")
|
|
86
62
|
},
|
|
87
63
|
workspaceSuffix: {
|
|
88
64
|
type: 'string',
|
|
89
|
-
description: (
|
|
90
|
-
'vscode.extension.contributes.resourceLabelFormatters.formatting.workspaceSuffix',
|
|
91
|
-
"Suffix appended to the workspace label."
|
|
92
|
-
))
|
|
65
|
+
description: localizeWithPath('vs/workbench/services/label/common/labelService', 'vscode.extension.contributes.resourceLabelFormatters.formatting.workspaceSuffix', "Suffix appended to the workspace label.")
|
|
93
66
|
}
|
|
94
67
|
}
|
|
95
68
|
}
|
|
@@ -268,10 +241,10 @@ let LabelService = class LabelService extends Disposable {
|
|
|
268
241
|
}
|
|
269
242
|
doGetWorkspaceLabel(workspaceUri, options) {
|
|
270
243
|
if (isUntitledWorkspace(workspaceUri, this.environmentService)) {
|
|
271
|
-
return (
|
|
244
|
+
return localizeWithPath('vs/workbench/services/label/common/labelService', 'untitledWorkspace', "Untitled (Workspace)");
|
|
272
245
|
}
|
|
273
246
|
if (isTemporaryWorkspace(workspaceUri)) {
|
|
274
|
-
return (
|
|
247
|
+
return localizeWithPath('vs/workbench/services/label/common/labelService', 'temporaryWorkspace', "Workspace");
|
|
275
248
|
}
|
|
276
249
|
let filename = basename(workspaceUri);
|
|
277
250
|
if (filename.endsWith(WORKSPACE_EXTENSION)) {
|
|
@@ -283,15 +256,11 @@ let LabelService = class LabelService extends Disposable {
|
|
|
283
256
|
label = filename;
|
|
284
257
|
break;
|
|
285
258
|
case 2 :
|
|
286
|
-
label = (
|
|
287
|
-
'workspaceNameVerbose',
|
|
288
|
-
"{0} (Workspace)",
|
|
289
|
-
this.getUriLabel(joinPath(dirname(workspaceUri), filename))
|
|
290
|
-
));
|
|
259
|
+
label = localizeWithPath('vs/workbench/services/label/common/labelService', 'workspaceNameVerbose', "{0} (Workspace)", this.getUriLabel(joinPath(dirname(workspaceUri), filename)));
|
|
291
260
|
break;
|
|
292
261
|
case 1 :
|
|
293
262
|
default:
|
|
294
|
-
label = (
|
|
263
|
+
label = localizeWithPath('vs/workbench/services/label/common/labelService', 'workspaceName', "{0} (Workspace)", filename);
|
|
295
264
|
break;
|
|
296
265
|
}
|
|
297
266
|
if (options?.verbose === 0 ) {
|
package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
3
|
import { WORKSPACE_FILTER, hasWorkspaceFileExtension, WORKSPACE_EXTENSION, isSavedWorkspace, isUntitledWorkspace, toWorkspaceIdentifier, isWorkspaceIdentifier, IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
4
4
|
import { IJSONEditingService } from 'vscode/vscode/vs/workbench/services/configuration/common/jsonEditing';
|
|
5
5
|
import { rewriteWorkspaceFileForNewLocation, IWorkspacesService } from 'vscode/vscode/vs/platform/workspaces/common/workspaces';
|
|
@@ -48,8 +48,8 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService {
|
|
|
48
48
|
availableFileSystems.unshift(Schemas.vscodeRemote);
|
|
49
49
|
}
|
|
50
50
|
let workspacePath = await this.fileDialogService.showSaveDialog({
|
|
51
|
-
saveLabel: mnemonicButtonLabel((
|
|
52
|
-
title: (
|
|
51
|
+
saveLabel: mnemonicButtonLabel(localizeWithPath('vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService', 'save', "Save")),
|
|
52
|
+
title: localizeWithPath('vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService', 'saveWorkspace', "Save Workspace"),
|
|
53
53
|
filters: WORKSPACE_FILTER,
|
|
54
54
|
defaultUri: joinPath(await this.fileDialogService.defaultWorkspacePath(), this.getNewWorkspaceName()),
|
|
55
55
|
availableFileSystems
|
|
@@ -247,15 +247,12 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
onInvalidWorkspaceConfigurationFileError() {
|
|
250
|
-
const message = (
|
|
251
|
-
'errorInvalidTaskConfiguration',
|
|
252
|
-
"Unable to write into workspace configuration file. Please open the file to correct errors/warnings in it and try again."
|
|
253
|
-
));
|
|
250
|
+
const message = localizeWithPath('vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService', 'errorInvalidTaskConfiguration', "Unable to write into workspace configuration file. Please open the file to correct errors/warnings in it and try again.");
|
|
254
251
|
this.askToOpenWorkspaceConfigurationFile(message);
|
|
255
252
|
}
|
|
256
253
|
askToOpenWorkspaceConfigurationFile(message) {
|
|
257
254
|
this.notificationService.prompt(Severity.Error, message, [{
|
|
258
|
-
label: (
|
|
255
|
+
label: localizeWithPath('vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService', 'openWorkspaceConfigurationFile', "Open Workspace Configuration"),
|
|
259
256
|
run: () => this.commandService.executeCommand('workbench.action.openWorkspaceConfigFile')
|
|
260
257
|
}]);
|
|
261
258
|
}
|