@codingame/monaco-vscode-configuration-service-override 7.1.0 → 8.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-configuration-service-override",
3
- "version": "7.1.0",
3
+ "version": "8.0.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,7 +26,7 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@7.1.0",
30
- "@codingame/monaco-vscode-files-service-override": "7.1.0"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@8.0.0",
30
+ "@codingame/monaco-vscode-files-service-override": "8.0.0"
31
31
  }
32
32
  }
@@ -1,8 +1,8 @@
1
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
1
+ import { localize } from 'vscode/vscode/vs/nls';
2
2
  import { deepClone } from 'vscode/vscode/vs/base/common/objects';
3
3
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
4
4
  import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
5
- import { Extensions as Extensions$1, configurationDefaultsSchemaId, ConfigurationScope, OVERRIDE_PROPERTY_REGEX, validateProperty, getDefaultValue } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
5
+ import { Extensions as Extensions$1, configurationDefaultsSchemaId, ConfigurationScope, OVERRIDE_PROPERTY_REGEX, validateProperty, parseScope, getAllConfigurationProperties, getDefaultValue } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
6
6
  import { Extensions } from 'vscode/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
7
7
  import { workspaceSettingsSchemaId, launchSchemaId, tasksSchemaId } from 'vscode/vscode/vs/workbench/services/configuration/common/configuration';
8
8
  import { isObject, isUndefined } from 'vscode/vscode/vs/base/common/types';
@@ -12,7 +12,6 @@ import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
12
12
  import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
13
13
  import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
14
14
 
15
- const _moduleId = "vs/workbench/api/common/configurationExtensionPoint";
16
15
  const jsonRegistry = ( (Registry.as(Extensions.JSONContribution)));
17
16
  const configurationRegistry = ( (Registry.as(Extensions$1.Configuration)));
18
17
  const configurationEntrySchema = {
@@ -20,32 +19,30 @@ const configurationEntrySchema = {
20
19
  defaultSnippets: [{ body: { title: '', properties: {} } }],
21
20
  properties: {
22
21
  title: {
23
- description: ( localizeWithPath(
24
- _moduleId,
25
- 0,
22
+ description: ( localize(
23
+ 3125,
26
24
  '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.'
27
25
  )),
28
26
  type: 'string'
29
27
  },
30
28
  order: {
31
- description: ( localizeWithPath(
32
- _moduleId,
33
- 1,
29
+ description: ( localize(
30
+ 3126,
34
31
  'When specified, gives the order of this category of settings relative to other categories.'
35
32
  )),
36
33
  type: 'integer'
37
34
  },
38
35
  properties: {
39
- description: ( localizeWithPath(_moduleId, 2, 'Description of the configuration properties.')),
36
+ description: ( localize(3127, 'Description of the configuration properties.')),
40
37
  type: 'object',
41
38
  propertyNames: {
42
39
  pattern: '\\S+',
43
- patternErrorMessage: ( localizeWithPath(_moduleId, 3, 'Property should not be empty.')),
40
+ patternErrorMessage: ( localize(3128, 'Property should not be empty.')),
44
41
  },
45
42
  additionalProperties: {
46
43
  anyOf: [
47
44
  {
48
- title: ( localizeWithPath(_moduleId, 4, 'Schema of the configuration property.')),
45
+ title: ( localize(3129, 'Schema of the configuration property.')),
49
46
  $ref: 'http://json-schema.org/draft-07/schema#'
50
47
  },
51
48
  {
@@ -56,40 +53,30 @@ const configurationEntrySchema = {
56
53
  enum: ['application', 'machine', 'window', 'resource', 'language-overridable', 'machine-overridable'],
57
54
  default: 'window',
58
55
  enumDescriptions: [
59
- ( localizeWithPath(
60
- _moduleId,
61
- 5,
62
- "Configuration that can be configured only in the user settings."
63
- )),
64
- ( localizeWithPath(
65
- _moduleId,
66
- 6,
56
+ ( localize(3130, "Configuration that can be configured only in the user settings.")),
57
+ ( localize(
58
+ 3131,
67
59
  "Configuration that can be configured only in the user settings or only in the remote settings."
68
60
  )),
69
- ( localizeWithPath(
70
- _moduleId,
71
- 7,
61
+ ( localize(
62
+ 3132,
72
63
  "Configuration that can be configured in the user, remote or workspace settings."
73
64
  )),
74
- ( localizeWithPath(
75
- _moduleId,
76
- 8,
65
+ ( localize(
66
+ 3133,
77
67
  "Configuration that can be configured in the user, remote, workspace or folder settings."
78
68
  )),
79
- ( localizeWithPath(
80
- _moduleId,
81
- 9,
69
+ ( localize(
70
+ 3134,
82
71
  "Resource configuration that can be configured in language specific settings."
83
72
  )),
84
- ( localizeWithPath(
85
- _moduleId,
86
- 10,
73
+ ( localize(
74
+ 3135,
87
75
  "Machine configuration that can be configured also in workspace or folder settings."
88
76
  ))
89
77
  ],
90
- markdownDescription: ( localizeWithPath(
91
- _moduleId,
92
- 11,
78
+ markdownDescription: ( localize(
79
+ 3136,
93
80
  "Scope in which the configuration is applicable. Available scopes are `application`, `machine`, `window`, `resource`, and `machine-overridable`."
94
81
  ))
95
82
  },
@@ -98,44 +85,41 @@ const configurationEntrySchema = {
98
85
  items: {
99
86
  type: 'string',
100
87
  },
101
- description: ( localizeWithPath(_moduleId, 12, 'Descriptions for enum values'))
88
+ description: ( localize(3137, 'Descriptions for enum values'))
102
89
  },
103
90
  markdownEnumDescriptions: {
104
91
  type: 'array',
105
92
  items: {
106
93
  type: 'string',
107
94
  },
108
- description: ( localizeWithPath(_moduleId, 13, 'Descriptions for enum values in the markdown format.'))
95
+ description: ( localize(3138, 'Descriptions for enum values in the markdown format.'))
109
96
  },
110
97
  enumItemLabels: {
111
98
  type: 'array',
112
99
  items: {
113
100
  type: 'string'
114
101
  },
115
- markdownDescription: ( localizeWithPath(
116
- _moduleId,
117
- 14,
102
+ markdownDescription: ( localize(
103
+ 3139,
118
104
  'Labels for enum values to be displayed in the Settings editor. When specified, the {0} values still show after the labels, but less prominently.',
119
105
  '`enum`'
120
106
  ))
121
107
  },
122
108
  markdownDescription: {
123
109
  type: 'string',
124
- description: ( localizeWithPath(_moduleId, 15, 'The description in the markdown format.'))
110
+ description: ( localize(3140, 'The description in the markdown format.'))
125
111
  },
126
112
  deprecationMessage: {
127
113
  type: 'string',
128
- description: ( localizeWithPath(
129
- _moduleId,
130
- 16,
114
+ description: ( localize(
115
+ 3141,
131
116
  'If set, the property is marked as deprecated and the given message is shown as an explanation.'
132
117
  ))
133
118
  },
134
119
  markdownDeprecationMessage: {
135
120
  type: 'string',
136
- description: ( localizeWithPath(
137
- _moduleId,
138
- 17,
121
+ description: ( localize(
122
+ 3142,
139
123
  'If set, the property is marked as deprecated and the given message is shown as an explanation in the markdown format.'
140
124
  ))
141
125
  },
@@ -143,29 +127,26 @@ const configurationEntrySchema = {
143
127
  type: 'string',
144
128
  enum: ['singlelineText', 'multilineText'],
145
129
  enumDescriptions: [
146
- ( localizeWithPath(_moduleId, 18, 'The value will be shown in an inputbox.')),
147
- ( localizeWithPath(_moduleId, 19, 'The value will be shown in a textarea.'))
130
+ ( localize(3143, 'The value will be shown in an inputbox.')),
131
+ ( localize(3144, 'The value will be shown in a textarea.'))
148
132
  ],
149
133
  default: 'singlelineText',
150
- description: ( localizeWithPath(
151
- _moduleId,
152
- 20,
134
+ description: ( localize(
135
+ 3145,
153
136
  'When specified, controls the presentation format of the string setting.'
154
137
  ))
155
138
  },
156
139
  order: {
157
140
  type: 'integer',
158
- description: ( localizeWithPath(
159
- _moduleId,
160
- 21,
141
+ description: ( localize(
142
+ 3146,
161
143
  '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
144
  ))
163
145
  },
164
146
  ignoreSync: {
165
147
  type: 'boolean',
166
- description: ( localizeWithPath(
167
- _moduleId,
168
- 22,
148
+ description: ( localize(
149
+ 3147,
169
150
  'When enabled, Settings Sync will not sync the user value of this configuration by default.'
170
151
  ))
171
152
  },
@@ -206,16 +187,25 @@ defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
206
187
  const addedDefaultConfigurations = ( (added.map(extension => {
207
188
  const overrides = deepClone(extension.value);
208
189
  for (const key of ( (Object.keys(overrides)))) {
190
+ const registeredPropertyScheme = registeredProperties[key];
191
+ if (registeredPropertyScheme?.disallowConfigurationDefault) {
192
+ extension.collector.warn(( localize(
193
+ 3148,
194
+ "Cannot register configuration defaults for '{0}'. This setting does not allow contributing configuration defaults.",
195
+ key
196
+ )));
197
+ delete overrides[key];
198
+ continue;
199
+ }
209
200
  if (!OVERRIDE_PROPERTY_REGEX.test(key)) {
210
- const registeredPropertyScheme = registeredProperties[key];
211
201
  if (registeredPropertyScheme?.scope && !allowedScopes.includes(registeredPropertyScheme.scope)) {
212
- extension.collector.warn(( localizeWithPath(
213
- _moduleId,
214
- 23,
202
+ extension.collector.warn(( localize(
203
+ 3149,
215
204
  "Cannot register configuration defaults for '{0}'. Only defaults for machine-overridable, window, resource and language overridable scoped settings are supported.",
216
205
  key
217
206
  )));
218
207
  delete overrides[key];
208
+ continue;
219
209
  }
220
210
  }
221
211
  }
@@ -228,7 +218,7 @@ const configurationExtPoint = ExtensionsRegistry.registerExtensionPoint({
228
218
  extensionPoint: 'configuration',
229
219
  deps: [defaultConfigurationExtPoint],
230
220
  jsonSchema: {
231
- description: ( localizeWithPath(_moduleId, 24, 'Contributes configuration settings.')),
221
+ description: ( localize(3150, 'Contributes configuration settings.')),
232
222
  oneOf: [
233
223
  configurationEntrySchema,
234
224
  {
@@ -251,24 +241,22 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
251
241
  }
252
242
  const seenProperties = ( (new Set()));
253
243
  function handleConfiguration(node, extension) {
254
- const configurations = [];
255
244
  const configuration = deepClone(node);
256
245
  if (configuration.title && (typeof configuration.title !== 'string')) {
257
- extension.collector.error(( localizeWithPath(_moduleId, 25, "'configuration.title' must be a string")));
246
+ extension.collector.error(( localize(3151, "'configuration.title' must be a string")));
258
247
  }
259
248
  validateProperties(configuration, extension);
260
249
  configuration.id = node.id || extension.description.identifier.value;
261
250
  configuration.extensionInfo = { id: extension.description.identifier.value, displayName: extension.description.displayName };
262
251
  configuration.restrictedProperties = extension.description.capabilities?.untrustedWorkspaces?.supported === 'limited' ? extension.description.capabilities?.untrustedWorkspaces.restrictedConfigurations : undefined;
263
252
  configuration.title = configuration.title || extension.description.displayName || extension.description.identifier.value;
264
- configurations.push(configuration);
265
- return configurations;
253
+ return configuration;
266
254
  }
267
255
  function validateProperties(configuration, extension) {
268
256
  const properties = configuration.properties;
269
257
  if (properties) {
270
258
  if (typeof properties !== 'object') {
271
- extension.collector.error(( localizeWithPath(_moduleId, 26, "'configuration.properties' must be an object")));
259
+ extension.collector.error(( localize(3152, "'configuration.properties' must be an object")));
272
260
  configuration.properties = {};
273
261
  }
274
262
  for (const key in properties) {
@@ -281,55 +269,22 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
281
269
  }
282
270
  if (( (seenProperties.has(key)))) {
283
271
  delete properties[key];
284
- extension.collector.warn(( localizeWithPath(
285
- _moduleId,
286
- 27,
287
- "Cannot register '{0}'. This property is already registered.",
288
- key
289
- )));
272
+ extension.collector.warn(( localize(3153, "Cannot register '{0}'. This property is already registered.", key)));
290
273
  continue;
291
274
  }
292
275
  if (!isObject(propertyConfiguration)) {
293
276
  delete properties[key];
294
- extension.collector.error(( localizeWithPath(
295
- _moduleId,
296
- 28,
297
- "configuration.properties property '{0}' must be an object",
298
- key
299
- )));
277
+ extension.collector.error(( localize(3154, "configuration.properties property '{0}' must be an object", key)));
300
278
  continue;
301
279
  }
302
280
  seenProperties.add(key);
303
- if (propertyConfiguration.scope) {
304
- if (( (propertyConfiguration.scope.toString())) === 'application') {
305
- propertyConfiguration.scope = ConfigurationScope.APPLICATION;
306
- }
307
- else if (( (propertyConfiguration.scope.toString())) === 'machine') {
308
- propertyConfiguration.scope = ConfigurationScope.MACHINE;
309
- }
310
- else if (( (propertyConfiguration.scope.toString())) === 'resource') {
311
- propertyConfiguration.scope = ConfigurationScope.RESOURCE;
312
- }
313
- else if (( (propertyConfiguration.scope.toString())) === 'machine-overridable') {
314
- propertyConfiguration.scope = ConfigurationScope.MACHINE_OVERRIDABLE;
315
- }
316
- else if (( (propertyConfiguration.scope.toString())) === 'language-overridable') {
317
- propertyConfiguration.scope = ConfigurationScope.LANGUAGE_OVERRIDABLE;
318
- }
319
- else {
320
- propertyConfiguration.scope = ConfigurationScope.WINDOW;
321
- }
322
- }
323
- else {
324
- propertyConfiguration.scope = ConfigurationScope.WINDOW;
325
- }
281
+ propertyConfiguration.scope = propertyConfiguration.scope ? parseScope(( (propertyConfiguration.scope.toString()))) : ConfigurationScope.WINDOW;
326
282
  }
327
283
  }
328
284
  const subNodes = configuration.allOf;
329
285
  if (subNodes) {
330
- extension.collector.error(( localizeWithPath(
331
- _moduleId,
332
- 29,
286
+ extension.collector.error(( localize(
287
+ 3155,
333
288
  "'configuration.allOf' is deprecated and should no longer be used. Instead, pass multiple configuration sections as an array to the 'configuration' contribution point."
334
289
  )));
335
290
  for (const node of subNodes) {
@@ -343,10 +298,10 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
343
298
  const configurations = [];
344
299
  const value = extension.value;
345
300
  if (Array.isArray(value)) {
346
- value.forEach(v => configurations.push(...handleConfiguration(v, extension)));
301
+ value.forEach(v => configurations.push(handleConfiguration(v, extension)));
347
302
  }
348
303
  else {
349
- configurations.push(...handleConfiguration(value, extension));
304
+ configurations.push(handleConfiguration(value, extension));
350
305
  }
351
306
  extensionConfigurations.set(extension.description.identifier, configurations);
352
307
  addedConfigurations.push(...configurations);
@@ -372,7 +327,7 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
372
327
  'folders': {
373
328
  minItems: 0,
374
329
  uniqueItems: true,
375
- description: ( localizeWithPath(_moduleId, 30, "List of folders to be loaded in the workspace.")),
330
+ description: ( localize(3156, "List of folders to be loaded in the workspace.")),
376
331
  items: {
377
332
  type: 'object',
378
333
  defaultSnippets: [{ body: { path: '$1' } }],
@@ -380,15 +335,14 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
380
335
  properties: {
381
336
  path: {
382
337
  type: 'string',
383
- description: ( localizeWithPath(
384
- _moduleId,
385
- 31,
338
+ description: ( localize(
339
+ 3157,
386
340
  "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
341
  ))
388
342
  },
389
343
  name: {
390
344
  type: 'string',
391
- description: ( localizeWithPath(_moduleId, 32, "An optional name for the folder. "))
345
+ description: ( localize(3158, "An optional name for the folder. "))
392
346
  }
393
347
  },
394
348
  required: ['path']
@@ -396,11 +350,11 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
396
350
  properties: {
397
351
  uri: {
398
352
  type: 'string',
399
- description: ( localizeWithPath(_moduleId, 33, "URI of the folder"))
353
+ description: ( localize(3159, "URI of the folder"))
400
354
  },
401
355
  name: {
402
356
  type: 'string',
403
- description: ( localizeWithPath(_moduleId, 32, "An optional name for the folder. "))
357
+ description: ( localize(3159, "An optional name for the folder. "))
404
358
  }
405
359
  },
406
360
  required: ['uri']
@@ -410,43 +364,39 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
410
364
  'settings': {
411
365
  type: 'object',
412
366
  default: {},
413
- description: ( localizeWithPath(_moduleId, 34, "Workspace settings")),
367
+ description: ( localize(3160, "Workspace settings")),
414
368
  $ref: workspaceSettingsSchemaId
415
369
  },
416
370
  'launch': {
417
371
  type: 'object',
418
372
  default: { configurations: [], compounds: [] },
419
- description: ( localizeWithPath(_moduleId, 35, "Workspace launch configurations")),
373
+ description: ( localize(3161, "Workspace launch configurations")),
420
374
  $ref: launchSchemaId
421
375
  },
422
376
  'tasks': {
423
377
  type: 'object',
424
378
  default: { version: '2.0.0', tasks: [] },
425
- description: ( localizeWithPath(_moduleId, 36, "Workspace task configurations")),
379
+ description: ( localize(3162, "Workspace task configurations")),
426
380
  $ref: tasksSchemaId
427
381
  },
428
382
  'extensions': {
429
383
  type: 'object',
430
384
  default: {},
431
- description: ( localizeWithPath(_moduleId, 37, "Workspace extensions")),
385
+ description: ( localize(3163, "Workspace extensions")),
432
386
  $ref: 'vscode://schemas/extensions'
433
387
  },
434
388
  'remoteAuthority': {
435
389
  type: 'string',
436
390
  doNotSuggest: true,
437
- description: ( localizeWithPath(_moduleId, 38, "The remote server where the workspace is located.")),
391
+ description: ( localize(3164, "The remote server where the workspace is located.")),
438
392
  },
439
393
  'transient': {
440
394
  type: 'boolean',
441
395
  doNotSuggest: true,
442
- description: ( localizeWithPath(
443
- _moduleId,
444
- 39,
445
- "A transient workspace will disappear when restarting or reloading."
446
- )),
396
+ description: ( localize(3165, "A transient workspace will disappear when restarting or reloading.")),
447
397
  }
448
398
  },
449
- errorMessage: ( localizeWithPath(_moduleId, 40, "Unknown workspace configuration property"))
399
+ errorMessage: ( localize(3166, "Unknown workspace configuration property"))
450
400
  });
451
401
  class SettingsTableRenderer extends Disposable {
452
402
  constructor() {
@@ -457,18 +407,12 @@ class SettingsTableRenderer extends Disposable {
457
407
  return !!manifest.contributes?.configuration;
458
408
  }
459
409
  render(manifest) {
460
- const configuration = manifest.contributes?.configuration;
461
- let properties = {};
462
- if (Array.isArray(configuration)) {
463
- configuration.forEach(config => {
464
- properties = { ...properties, ...config.properties };
465
- });
466
- }
467
- else if (configuration) {
468
- properties = configuration.properties;
469
- }
410
+ const configuration = manifest.contributes?.configuration
411
+ ? Array.isArray(manifest.contributes.configuration) ? manifest.contributes.configuration : [manifest.contributes.configuration]
412
+ : [];
413
+ const properties = getAllConfigurationProperties(configuration);
470
414
  const contrib = properties ? ( (Object.keys(properties))) : [];
471
- const headers = [( localizeWithPath(_moduleId, 41, "ID")), ( localizeWithPath(_moduleId, 42, "Description")), ( localizeWithPath(_moduleId, 43, "Default"))];
415
+ const headers = [( localize(3167, "ID")), ( localize(3168, "Description")), ( localize(3169, "Default"))];
472
416
  const rows = ( (contrib.sort((a, b) => a.localeCompare(b))
473
417
  .map(key => {
474
418
  return [
@@ -488,7 +432,7 @@ class SettingsTableRenderer extends Disposable {
488
432
  }
489
433
  ( (Registry.as(Extensions$2.ExtensionFeaturesRegistry))).registerExtensionFeature({
490
434
  id: 'configuration',
491
- label: ( localizeWithPath(_moduleId, 44, "Settings")),
435
+ label: ( localize(3170, "Settings")),
492
436
  access: {
493
437
  canToggle: false
494
438
  },
@@ -1,5 +1,5 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
- import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
2
+ import { localize, localize2 } from 'vscode/vscode/vs/nls';
3
3
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
4
4
  import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
5
5
  import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
@@ -21,7 +21,6 @@ import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/cont
21
21
  import { TEXT_FILE_EDITOR_ID } from 'vscode/vscode/vs/workbench/contrib/files/common/files';
22
22
  import Severity$1 from 'vscode/vscode/vs/base/common/severity';
23
23
 
24
- const _moduleId = "vs/workbench/contrib/workspaces/browser/workspaces.contribution";
25
24
  let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Disposable {
26
25
  constructor(contextService, notificationService, fileService, quickInputService, hostService, storageService) {
27
26
  super();
@@ -50,14 +49,13 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
50
49
  const neverShowAgain = { id: 'workspaces.dontPromptToOpen', scope: NeverShowAgainScope.WORKSPACE, isSecondary: true };
51
50
  if (workspaces.length === 1) {
52
51
  const workspaceFile = workspaces[0];
53
- this.notificationService.prompt(Severity$1.Info, ( localizeWithPath(
54
- _moduleId,
55
- 0,
52
+ this.notificationService.prompt(Severity$1.Info, ( localize(
53
+ 3171,
56
54
  "This folder contains a workspace file '{0}'. Do you want to open it? [Learn more]({1}) about workspace files.",
57
55
  workspaceFile,
58
56
  'https://go.microsoft.com/fwlink/?linkid=2025315'
59
57
  )), [{
60
- label: ( localizeWithPath(_moduleId, 1, "Open Workspace")),
58
+ label: ( localize(3172, "Open Workspace")),
61
59
  run: () => this.hostService.openWindow([{ workspaceUri: joinPath(folder, workspaceFile) }])
62
60
  }], {
63
61
  neverShowAgain,
@@ -65,15 +63,14 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
65
63
  });
66
64
  }
67
65
  else if (workspaces.length > 1) {
68
- this.notificationService.prompt(Severity$1.Info, ( localizeWithPath(
69
- _moduleId,
70
- 2,
66
+ this.notificationService.prompt(Severity$1.Info, ( localize(
67
+ 3173,
71
68
  "This folder contains multiple workspace files. Do you want to open one? [Learn more]({0}) about workspace files.",
72
69
  'https://go.microsoft.com/fwlink/?linkid=2025315'
73
70
  )), [{
74
- label: ( localizeWithPath(_moduleId, 3, "Select Workspace")),
71
+ label: ( localize(3174, "Select Workspace")),
75
72
  run: () => {
76
- this.quickInputService.pick(( (workspaces.map(workspace => ({ label: workspace })))), { placeHolder: ( localizeWithPath(_moduleId, 4, "Select a workspace to open")) }).then(pick => {
73
+ this.quickInputService.pick(( (workspaces.map(workspace => ({ label: workspace })))), { placeHolder: ( localize(3175, "Select a workspace to open")) }).then(pick => {
77
74
  if (pick) {
78
75
  this.hostService.openWindow([{ workspaceUri: joinPath(folder, pick.label) }]);
79
76
  }
@@ -99,7 +96,7 @@ registerAction2(class extends Action2 {
99
96
  constructor() {
100
97
  super({
101
98
  id: 'workbench.action.openWorkspaceFromEditor',
102
- title: ( localize2WithPath(_moduleId, 1, "Open Workspace")),
99
+ title: ( localize2(3175, "Open Workspace")),
103
100
  f1: false,
104
101
  menu: {
105
102
  id: MenuId.EditorContent,
@@ -118,7 +115,7 @@ registerAction2(class extends Action2 {
118
115
  if (contextService.getWorkbenchState() === WorkbenchState.WORKSPACE) {
119
116
  const workspaceConfiguration = contextService.getWorkspace().configuration;
120
117
  if (workspaceConfiguration && isEqual(workspaceConfiguration, uri)) {
121
- notificationService.info(( localizeWithPath(_moduleId, 5, "This workspace is already open.")));
118
+ notificationService.info(( localize(3176, "This workspace is already open.")));
122
119
  return;
123
120
  }
124
121
  }
@@ -30,14 +30,13 @@ import { distinct, delta, equals as equals$1 } from 'vscode/vscode/vs/base/commo
30
30
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
31
31
  import { IWorkbenchAssignmentService } from 'vscode/vscode/vs/workbench/services/assignment/common/assignmentService.service';
32
32
  import { isUndefined } from 'vscode/vscode/vs/base/common/types';
33
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
33
+ import { localize } from 'vscode/vscode/vs/nls';
34
34
  import { NullPolicyService } from 'vscode/vscode/vs/platform/policy/common/policy';
35
35
  import { IJSONEditingService } from 'vscode/vscode/vs/workbench/services/configuration/common/jsonEditing.service';
36
36
  import { workbenchConfigurationNodeBase } from 'vscode/vscode/vs/workbench/common/configuration';
37
37
  import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
38
38
  import { runWhenWindowIdle } from 'vscode/vscode/vs/base/browser/dom';
39
39
 
40
- const _moduleId = "vs/workbench/services/configuration/browser/configurationService";
41
40
  function getLocalUserConfigurationScopes(userDataProfile, hasRemote) {
42
41
  return (userDataProfile.isDefault || userDataProfile.useDefaultFlags?.settings)
43
42
  ? hasRemote ? LOCAL_MACHINE_SCOPES : undefined
@@ -1096,8 +1095,8 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
1096
1095
  } : workspaceSettingsSchema;
1097
1096
  const configDefaultsSchema = {
1098
1097
  type: 'object',
1099
- description: ( localizeWithPath(_moduleId, 0, 'Contribute defaults for configurations')),
1100
- properties: Object.assign({}, machineOverridableSettings.properties, windowSettings.properties, resourceSettings.properties),
1098
+ description: ( localize(3177, 'Contribute defaults for configurations')),
1099
+ properties: Object.assign({}, this.filterDefaultOverridableProperties(machineOverridableSettings.properties), this.filterDefaultOverridableProperties(windowSettings.properties), this.filterDefaultOverridableProperties(resourceSettings.properties)),
1101
1100
  patternProperties: {
1102
1101
  [OVERRIDE_PROPERTY_PATTERN]: {
1103
1102
  type: 'object',
@@ -1139,6 +1138,15 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
1139
1138
  });
1140
1139
  return result;
1141
1140
  }
1141
+ filterDefaultOverridableProperties(properties) {
1142
+ const result = {};
1143
+ Object.entries(properties).forEach(([key, value]) => {
1144
+ if (!value.disallowConfigurationDefault) {
1145
+ result[key] = value;
1146
+ }
1147
+ });
1148
+ return result;
1149
+ }
1142
1150
  };
1143
1151
  RegisterConfigurationSchemasContribution = ( (__decorate([
1144
1152
  ( (__param(0, IWorkspaceContextService))),
@@ -1190,7 +1198,7 @@ let UpdateExperimentalSettingsDefaults = class UpdateExperimentalSettingsDefault
1190
1198
  catch (error) { }
1191
1199
  }
1192
1200
  if (( (Object.keys(overrides))).length) {
1193
- this.configurationRegistry.registerDefaultConfigurations([{ overrides, source: ( localizeWithPath(_moduleId, 1, "Experiments")) }]);
1201
+ this.configurationRegistry.registerDefaultConfigurations([{ overrides }]);
1194
1202
  }
1195
1203
  }
1196
1204
  };
@@ -1207,7 +1215,7 @@ configurationRegistry.registerConfiguration({
1207
1215
  properties: {
1208
1216
  [APPLY_ALL_PROFILES_SETTING]: {
1209
1217
  'type': 'array',
1210
- description: ( localizeWithPath(_moduleId, 2, "Configure settings to be applied for all profiles.")),
1218
+ description: ( localize(3178, "Configure settings to be applied for all profiles.")),
1211
1219
  'default': [],
1212
1220
  'scope': ConfigurationScope.APPLICATION,
1213
1221
  additionalProperties: true,
@@ -1,5 +1,5 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
+ import { localize } from 'vscode/vscode/vs/nls';
3
3
  import { parse } from 'vscode/vscode/vs/base/common/json';
4
4
  import { setProperty } from 'vscode/vscode/vs/base/common/jsonEdit';
5
5
  import { Queue } from 'vscode/vscode/vs/base/common/async';
@@ -26,7 +26,6 @@ import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProf
26
26
  import { ErrorNoTelemetry } from 'vscode/vscode/vs/base/common/errors';
27
27
  import Severity$1 from 'vscode/vscode/vs/base/common/severity';
28
28
 
29
- const _moduleId = "vs/workbench/services/configuration/common/configurationEditing";
30
29
  var ConfigurationEditingErrorCode;
31
30
  ( ((function(ConfigurationEditingErrorCode) {
32
31
  ConfigurationEditingErrorCode[ConfigurationEditingErrorCode["ERROR_UNKNOWN_KEY"] = 0] = "ERROR_UNKNOWN_KEY";
@@ -126,9 +125,8 @@ let ConfigurationEditing = class ConfigurationEditing {
126
125
  if (error.fileOperationResult === FileOperationResult.FILE_MODIFIED_SINCE) {
127
126
  throw this.toConfigurationEditingError(ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_MODIFIED_SINCE, operation.target, operation);
128
127
  }
129
- throw ( (new ConfigurationEditingError(localizeWithPath(
130
- _moduleId,
131
- 0,
128
+ throw ( (new ConfigurationEditingError(localize(
129
+ 8713,
132
130
  "Error while writing to {0}. {1}",
133
131
  this.stringifyTarget(operation.target),
134
132
  error.message
@@ -188,8 +186,8 @@ let ConfigurationEditing = class ConfigurationEditing {
188
186
  }
189
187
  }
190
188
  onInvalidConfigurationError(error, operation) {
191
- const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localizeWithPath(_moduleId, 1, "Open Tasks Configuration"))
192
- : operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localizeWithPath(_moduleId, 2, "Open Launch Configuration"))
189
+ const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(8714, "Open Tasks Configuration"))
190
+ : operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(8715, "Open Launch Configuration"))
193
191
  : null;
194
192
  if (openStandAloneConfigurationActionLabel) {
195
193
  this.notificationService.prompt(Severity$1.Error, error.message, [{
@@ -199,18 +197,18 @@ let ConfigurationEditing = class ConfigurationEditing {
199
197
  }
200
198
  else {
201
199
  this.notificationService.prompt(Severity$1.Error, error.message, [{
202
- label: ( localizeWithPath(_moduleId, 3, "Open Settings")),
200
+ label: ( localize(8716, "Open Settings")),
203
201
  run: () => this.openSettings(operation)
204
202
  }]);
205
203
  }
206
204
  }
207
205
  onConfigurationFileDirtyError(error, operation, scopes) {
208
- const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localizeWithPath(_moduleId, 1, "Open Tasks Configuration"))
209
- : operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localizeWithPath(_moduleId, 2, "Open Launch Configuration"))
206
+ const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(8716, "Open Tasks Configuration"))
207
+ : operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(8716, "Open Launch Configuration"))
210
208
  : null;
211
209
  if (openStandAloneConfigurationActionLabel) {
212
210
  this.notificationService.prompt(Severity$1.Error, error.message, [{
213
- label: ( localizeWithPath(_moduleId, 4, "Save and Retry")),
211
+ label: ( localize(8717, "Save and Retry")),
214
212
  run: () => {
215
213
  const key = operation.key ? `${operation.workspaceStandAloneConfigurationKey}.${operation.key}` : operation.workspaceStandAloneConfigurationKey;
216
214
  this.writeConfiguration(operation.target, { key, value: operation.value }, { handleDirtyFile: 'save', scopes });
@@ -223,11 +221,11 @@ let ConfigurationEditing = class ConfigurationEditing {
223
221
  }
224
222
  else {
225
223
  this.notificationService.prompt(Severity$1.Error, error.message, [{
226
- label: ( localizeWithPath(_moduleId, 4, "Save and Retry")),
224
+ label: ( localize(8717, "Save and Retry")),
227
225
  run: () => this.writeConfiguration(operation.target, { key: operation.key, value: operation.value }, { handleDirtyFile: 'save', scopes })
228
226
  },
229
227
  {
230
- label: ( localizeWithPath(_moduleId, 3, "Open Settings")),
228
+ label: ( localize(8717, "Open Settings")),
231
229
  run: () => this.openSettings(operation)
232
230
  }]);
233
231
  }
@@ -265,98 +263,83 @@ let ConfigurationEditing = class ConfigurationEditing {
265
263
  }
266
264
  toErrorMessage(error, target, operation) {
267
265
  switch (error) {
268
- case ConfigurationEditingErrorCode.ERROR_POLICY_CONFIGURATION: return ( localizeWithPath(
269
- _moduleId,
270
- 5,
266
+ case ConfigurationEditingErrorCode.ERROR_POLICY_CONFIGURATION: return ( localize(
267
+ 8718,
271
268
  "Unable to write {0} because it is configured in system policy.",
272
269
  operation.key
273
270
  ));
274
- case ConfigurationEditingErrorCode.ERROR_UNKNOWN_KEY: return ( localizeWithPath(
275
- _moduleId,
276
- 6,
271
+ case ConfigurationEditingErrorCode.ERROR_UNKNOWN_KEY: return ( localize(
272
+ 8719,
277
273
  "Unable to write to {0} because {1} is not a registered configuration.",
278
274
  this.stringifyTarget(target),
279
275
  operation.key
280
276
  ));
281
- case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION: return ( localizeWithPath(
282
- _moduleId,
283
- 7,
277
+ case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION: return ( localize(
278
+ 8720,
284
279
  "Unable to write {0} to Workspace Settings. This setting can be written only into User settings.",
285
280
  operation.key
286
281
  ));
287
- case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_CONFIGURATION_MACHINE: return ( localizeWithPath(
288
- _moduleId,
289
- 8,
282
+ case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_CONFIGURATION_MACHINE: return ( localize(
283
+ 8721,
290
284
  "Unable to write {0} to Workspace Settings. This setting can be written only into User settings.",
291
285
  operation.key
292
286
  ));
293
- case ConfigurationEditingErrorCode.ERROR_INVALID_FOLDER_CONFIGURATION: return ( localizeWithPath(
294
- _moduleId,
295
- 9,
287
+ case ConfigurationEditingErrorCode.ERROR_INVALID_FOLDER_CONFIGURATION: return ( localize(
288
+ 8722,
296
289
  "Unable to write to Folder Settings because {0} does not support the folder resource scope.",
297
290
  operation.key
298
291
  ));
299
- case ConfigurationEditingErrorCode.ERROR_INVALID_USER_TARGET: return ( localizeWithPath(
300
- _moduleId,
301
- 10,
292
+ case ConfigurationEditingErrorCode.ERROR_INVALID_USER_TARGET: return ( localize(
293
+ 8723,
302
294
  "Unable to write to User Settings because {0} does not support for global scope.",
303
295
  operation.key
304
296
  ));
305
- case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_TARGET: return ( localizeWithPath(
306
- _moduleId,
307
- 11,
297
+ case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_TARGET: return ( localize(
298
+ 8724,
308
299
  "Unable to write to Workspace Settings because {0} does not support for workspace scope in a multi folder workspace.",
309
300
  operation.key
310
301
  ));
311
- case ConfigurationEditingErrorCode.ERROR_INVALID_FOLDER_TARGET: return ( localizeWithPath(
312
- _moduleId,
313
- 12,
302
+ case ConfigurationEditingErrorCode.ERROR_INVALID_FOLDER_TARGET: return ( localize(
303
+ 8725,
314
304
  "Unable to write to Folder Settings because no resource is provided."
315
305
  ));
316
- case ConfigurationEditingErrorCode.ERROR_INVALID_RESOURCE_LANGUAGE_CONFIGURATION: return ( localizeWithPath(
317
- _moduleId,
318
- 13,
306
+ case ConfigurationEditingErrorCode.ERROR_INVALID_RESOURCE_LANGUAGE_CONFIGURATION: return ( localize(
307
+ 8726,
319
308
  "Unable to write to Language Settings because {0} is not a resource language setting.",
320
309
  operation.key
321
310
  ));
322
- case ConfigurationEditingErrorCode.ERROR_NO_WORKSPACE_OPENED: return ( localizeWithPath(
323
- _moduleId,
324
- 14,
311
+ case ConfigurationEditingErrorCode.ERROR_NO_WORKSPACE_OPENED: return ( localize(
312
+ 8727,
325
313
  "Unable to write to {0} because no workspace is opened. Please open a workspace first and try again.",
326
314
  this.stringifyTarget(target)
327
315
  ));
328
316
  case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: {
329
317
  if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
330
- return ( localizeWithPath(
331
- _moduleId,
332
- 15,
318
+ return ( localize(
319
+ 8728,
333
320
  "Unable to write into the tasks configuration file. Please open it to correct errors/warnings in it and try again."
334
321
  ));
335
322
  }
336
323
  if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
337
- return ( localizeWithPath(
338
- _moduleId,
339
- 16,
324
+ return ( localize(
325
+ 8729,
340
326
  "Unable to write into the launch configuration file. Please open it to correct errors/warnings in it and try again."
341
327
  ));
342
328
  }
343
329
  switch (target) {
344
330
  case EditableConfigurationTarget.USER_LOCAL:
345
- return ( localizeWithPath(
346
- _moduleId,
347
- 17,
331
+ return ( localize(
332
+ 8730,
348
333
  "Unable to write into user settings. Please open the user settings to correct errors/warnings in it and try again."
349
334
  ));
350
335
  case EditableConfigurationTarget.USER_REMOTE:
351
- return ( localizeWithPath(
352
- _moduleId,
353
- 18,
336
+ return ( localize(
337
+ 8731,
354
338
  "Unable to write into remote user settings. Please open the remote user settings to correct errors/warnings in it and try again."
355
339
  ));
356
340
  case EditableConfigurationTarget.WORKSPACE:
357
- return ( localizeWithPath(
358
- _moduleId,
359
- 19,
341
+ return ( localize(
342
+ 8732,
360
343
  "Unable to write into workspace settings. Please open the workspace settings to correct errors/warnings in the file and try again."
361
344
  ));
362
345
  case EditableConfigurationTarget.WORKSPACE_FOLDER: {
@@ -367,9 +350,8 @@ let ConfigurationEditing = class ConfigurationEditing {
367
350
  workspaceFolderName = folder.name;
368
351
  }
369
352
  }
370
- return ( localizeWithPath(
371
- _moduleId,
372
- 20,
353
+ return ( localize(
354
+ 8733,
373
355
  "Unable to write into folder settings. Please open the '{0}' folder settings to correct errors/warnings in it and try again.",
374
356
  workspaceFolderName
375
357
  ));
@@ -380,36 +362,31 @@ let ConfigurationEditing = class ConfigurationEditing {
380
362
  }
381
363
  case ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_DIRTY: {
382
364
  if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
383
- return ( localizeWithPath(
384
- _moduleId,
385
- 21,
365
+ return ( localize(
366
+ 8734,
386
367
  "Unable to write into tasks configuration file because the file has unsaved changes. Please save it first and then try again."
387
368
  ));
388
369
  }
389
370
  if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
390
- return ( localizeWithPath(
391
- _moduleId,
392
- 22,
371
+ return ( localize(
372
+ 8735,
393
373
  "Unable to write into launch configuration file because the file has unsaved changes. Please save it first and then try again."
394
374
  ));
395
375
  }
396
376
  switch (target) {
397
377
  case EditableConfigurationTarget.USER_LOCAL:
398
- return ( localizeWithPath(
399
- _moduleId,
400
- 23,
378
+ return ( localize(
379
+ 8736,
401
380
  "Unable to write into user settings because the file has unsaved changes. Please save the user settings file first and then try again."
402
381
  ));
403
382
  case EditableConfigurationTarget.USER_REMOTE:
404
- return ( localizeWithPath(
405
- _moduleId,
406
- 24,
383
+ return ( localize(
384
+ 8737,
407
385
  "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."
408
386
  ));
409
387
  case EditableConfigurationTarget.WORKSPACE:
410
- return ( localizeWithPath(
411
- _moduleId,
412
- 25,
388
+ return ( localize(
389
+ 8738,
413
390
  "Unable to write into workspace settings because the file has unsaved changes. Please save the workspace settings file first and then try again."
414
391
  ));
415
392
  case EditableConfigurationTarget.WORKSPACE_FOLDER: {
@@ -420,9 +397,8 @@ let ConfigurationEditing = class ConfigurationEditing {
420
397
  workspaceFolderName = folder.name;
421
398
  }
422
399
  }
423
- return ( localizeWithPath(
424
- _moduleId,
425
- 26,
400
+ return ( localize(
401
+ 8739,
426
402
  "Unable to write into folder settings because the file has unsaved changes. Please save the '{0}' folder settings file first and then try again.",
427
403
  workspaceFolderName
428
404
  ));
@@ -433,48 +409,41 @@ let ConfigurationEditing = class ConfigurationEditing {
433
409
  }
434
410
  case ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_MODIFIED_SINCE:
435
411
  if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
436
- return ( localizeWithPath(
437
- _moduleId,
438
- 27,
412
+ return ( localize(
413
+ 8740,
439
414
  "Unable to write into tasks configuration file because the content of the file is newer."
440
415
  ));
441
416
  }
442
417
  if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
443
- return ( localizeWithPath(
444
- _moduleId,
445
- 28,
418
+ return ( localize(
419
+ 8741,
446
420
  "Unable to write into launch configuration file because the content of the file is newer."
447
421
  ));
448
422
  }
449
423
  switch (target) {
450
424
  case EditableConfigurationTarget.USER_LOCAL:
451
- return ( localizeWithPath(
452
- _moduleId,
453
- 29,
425
+ return ( localize(
426
+ 8742,
454
427
  "Unable to write into user settings because the content of the file is newer."
455
428
  ));
456
429
  case EditableConfigurationTarget.USER_REMOTE:
457
- return ( localizeWithPath(
458
- _moduleId,
459
- 30,
430
+ return ( localize(
431
+ 8743,
460
432
  "Unable to write into remote user settings because the content of the file is newer."
461
433
  ));
462
434
  case EditableConfigurationTarget.WORKSPACE:
463
- return ( localizeWithPath(
464
- _moduleId,
465
- 31,
435
+ return ( localize(
436
+ 8744,
466
437
  "Unable to write into workspace settings because the content of the file is newer."
467
438
  ));
468
439
  case EditableConfigurationTarget.WORKSPACE_FOLDER:
469
- return ( localizeWithPath(
470
- _moduleId,
471
- 32,
440
+ return ( localize(
441
+ 8745,
472
442
  "Unable to write into folder settings because the content of the file is newer."
473
443
  ));
474
444
  }
475
- case ConfigurationEditingErrorCode.ERROR_INTERNAL: return ( localizeWithPath(
476
- _moduleId,
477
- 33,
445
+ case ConfigurationEditingErrorCode.ERROR_INTERNAL: return ( localize(
446
+ 8746,
478
447
  "Unable to write to {0} because of an internal error.",
479
448
  this.stringifyTarget(target)
480
449
  ));
@@ -483,13 +452,13 @@ let ConfigurationEditing = class ConfigurationEditing {
483
452
  stringifyTarget(target) {
484
453
  switch (target) {
485
454
  case EditableConfigurationTarget.USER_LOCAL:
486
- return ( localizeWithPath(_moduleId, 34, "User Settings"));
455
+ return ( localize(8747, "User Settings"));
487
456
  case EditableConfigurationTarget.USER_REMOTE:
488
- return ( localizeWithPath(_moduleId, 35, "Remote User Settings"));
457
+ return ( localize(8748, "Remote User Settings"));
489
458
  case EditableConfigurationTarget.WORKSPACE:
490
- return ( localizeWithPath(_moduleId, 36, "Workspace Settings"));
459
+ return ( localize(8749, "Workspace Settings"));
491
460
  case EditableConfigurationTarget.WORKSPACE_FOLDER:
492
- return ( localizeWithPath(_moduleId, 37, "Folder Settings"));
461
+ return ( localize(8750, "Folder Settings"));
493
462
  default:
494
463
  return '';
495
464
  }
@@ -2,13 +2,12 @@ import { Queue } from 'vscode/vscode/vs/base/common/async';
2
2
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
3
3
  import { isUndefinedOrNull, isString } from 'vscode/vscode/vs/base/common/types';
4
4
  import { isCodeEditor, isDiffEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
5
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
5
+ import { localize } from 'vscode/vscode/vs/nls';
6
6
  import { ConfigurationTarget } from 'vscode/vscode/vs/platform/configuration/common/configuration';
7
7
  import { WorkbenchState } from 'vscode/vscode/vs/platform/workspace/common/workspace';
8
8
  import { EditorResourceAccessor, SideBySideEditor } from 'vscode/vscode/vs/workbench/common/editor';
9
9
  import { AbstractVariableResolverService } from 'vscode/vscode/vs/workbench/services/configurationResolver/common/variableResolver';
10
10
 
11
- const _moduleId = "vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService";
12
11
  class BaseConfigurationResolverService extends AbstractVariableResolverService {
13
12
  static { this.INPUT_OR_COMMAND_VARIABLES_PATTERN = /\${((input|command):(.*?))}/g; }
14
13
  constructor(context, envVariablesPromise, editorService, configurationService, commandService, workspaceContextService, quickInputService, labelService, pathService, extensionService) {
@@ -168,9 +167,8 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
168
167
  const commandId = (variableToCommandMap ? variableToCommandMap[name] : undefined) || name;
169
168
  result = await this.commandService.executeCommand(commandId, configuration);
170
169
  if (typeof result !== 'string' && !isUndefinedOrNull(result)) {
171
- throw ( (new Error(localizeWithPath(
172
- _moduleId,
173
- 0,
170
+ throw ( (new Error(localize(
171
+ 8751,
174
172
  "Cannot substitute command variable '{0}' because command did not return a result of type string.",
175
173
  commandId
176
174
  ))));
@@ -221,9 +219,8 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
221
219
  }
222
220
  showUserInput(variable, inputInfos) {
223
221
  if (!inputInfos) {
224
- return Promise.reject(( (new Error(( localizeWithPath(
225
- _moduleId,
226
- 1,
222
+ return Promise.reject(( (new Error(( localize(
223
+ 8752,
227
224
  "Variable '{0}' must be defined in an '{1}' section of the debug or task configuration.",
228
225
  variable,
229
226
  'inputs'
@@ -232,9 +229,8 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
232
229
  const info = inputInfos.filter(item => item.id === variable).pop();
233
230
  if (info) {
234
231
  const missingAttribute = (attrName) => {
235
- throw ( (new Error(localizeWithPath(
236
- _moduleId,
237
- 2,
232
+ throw ( (new Error(localize(
233
+ 8753,
238
234
  "Input variable '{0}' is of type '{1}' and must include '{2}'.",
239
235
  variable,
240
236
  info.type,
@@ -280,7 +276,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
280
276
  value: value
281
277
  };
282
278
  if (value === info.default) {
283
- item.description = ( localizeWithPath(_moduleId, 3, "(Default)"));
279
+ item.description = ( localize(8754, "(Default)"));
284
280
  picks.unshift(item);
285
281
  }
286
282
  else {
@@ -303,9 +299,8 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
303
299
  if (typeof result === 'string' || isUndefinedOrNull(result)) {
304
300
  return result;
305
301
  }
306
- throw ( (new Error(localizeWithPath(
307
- _moduleId,
308
- 4,
302
+ throw ( (new Error(localize(
303
+ 8755,
309
304
  "Cannot substitute input variable '{0}' because command '{1}' did not return a result of type string.",
310
305
  variable,
311
306
  info.command
@@ -313,17 +308,15 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
313
308
  });
314
309
  }
315
310
  default:
316
- throw ( (new Error(localizeWithPath(
317
- _moduleId,
318
- 5,
311
+ throw ( (new Error(localize(
312
+ 8756,
319
313
  "Input variable '{0}' can only be of type 'promptString', 'pickString', or 'command'.",
320
314
  variable
321
315
  ))));
322
316
  }
323
317
  }
324
- return Promise.reject(( (new Error(( localizeWithPath(
325
- _moduleId,
326
- 6,
318
+ return Promise.reject(( (new Error(( localize(
319
+ 8757,
327
320
  "Undefined input variable '{0}' encountered. Remove or define '{0}' to continue.",
328
321
  variable
329
322
  ))))));
@@ -1,5 +1,5 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
+ import { localize } from 'vscode/vscode/vs/nls';
3
3
  import { WORKSPACE_FILTER, hasWorkspaceFileExtension, WORKSPACE_EXTENSION, isSavedWorkspace, WorkbenchState, isUntitledWorkspace, toWorkspaceIdentifier, isWorkspaceIdentifier } from 'vscode/vscode/vs/platform/workspace/common/workspace';
4
4
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
5
5
  import { JSONEditingErrorCode } from '@codingame/monaco-vscode-base-service-override/vscode/vs/workbench/services/configuration/common/jsonEditing';
@@ -29,7 +29,6 @@ import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/use
29
29
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
30
30
  import Severity$1 from 'vscode/vscode/vs/base/common/severity';
31
31
 
32
- const _moduleId = "vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService";
33
32
  let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService extends Disposable {
34
33
  constructor(jsonEditingService, contextService, configurationService, notificationService, commandService, fileService, textFileService, workspacesService, environmentService, fileDialogService, dialogService, hostService, uriIdentityService, workspaceTrustManagementService, userDataProfilesService, userDataProfileService) {
35
34
  super();
@@ -56,8 +55,8 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService exte
56
55
  availableFileSystems.unshift(Schemas.vscodeRemote);
57
56
  }
58
57
  let workspacePath = await this.fileDialogService.showSaveDialog({
59
- saveLabel: mnemonicButtonLabel(( localizeWithPath(_moduleId, 0, "Save"))),
60
- title: ( localizeWithPath(_moduleId, 1, "Save Workspace")),
58
+ saveLabel: mnemonicButtonLabel(( localize(3179, "Save"))),
59
+ title: ( localize(3180, "Save Workspace")),
61
60
  filters: WORKSPACE_FILTER,
62
61
  defaultUri: joinPath(await this.fileDialogService.defaultWorkspacePath(), this.getNewWorkspaceName()),
63
62
  availableFileSystems
@@ -257,16 +256,15 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService exte
257
256
  }
258
257
  }
259
258
  onInvalidWorkspaceConfigurationFileError() {
260
- const message = ( localizeWithPath(
261
- _moduleId,
262
- 2,
259
+ const message = ( localize(
260
+ 3181,
263
261
  "Unable to write into workspace configuration file. Please open the file to correct errors/warnings in it and try again."
264
262
  ));
265
263
  this.askToOpenWorkspaceConfigurationFile(message);
266
264
  }
267
265
  askToOpenWorkspaceConfigurationFile(message) {
268
266
  this.notificationService.prompt(Severity$1.Error, message, [{
269
- label: ( localizeWithPath(_moduleId, 3, "Open Workspace Configuration")),
267
+ label: ( localize(3182, "Open Workspace Configuration")),
270
268
  run: () => this.commandService.executeCommand('workbench.action.openWorkspaceConfigFile')
271
269
  }]);
272
270
  }