@codingame/monaco-vscode-workspace-trust-service-override 1.83.1 → 1.83.3-next.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-workspace-trust-service-override",
3
- "version": "1.83.1",
3
+ "version": "1.83.3-next.0",
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.1",
21
+ "vscode": "npm:@codingame/monaco-vscode-api@1.83.3-next.0",
22
22
  "monaco-editor": "0.44.0"
23
23
  }
24
24
  }
@@ -2,7 +2,7 @@ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.e
2
2
  import './media/workspaceTrustEditor.css.js';
3
3
  import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
4
4
  import { Disposable, MutableDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
5
- import { localize } from 'monaco-editor/esm/vs/nls.js';
5
+ import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
6
6
  import { registerAction2, Action2 } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
7
7
  import { Extensions as Extensions$1 } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
8
8
  import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
@@ -83,40 +83,22 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
83
83
  this._register(this.workspaceTrustRequestService.onDidInitiateOpenFilesTrustRequest(async () => {
84
84
  const markdownDetails = [
85
85
  this.workspaceContextService.getWorkbenchState() !== 1 ?
86
- ( localize(
87
- 'openLooseFileWorkspaceDetails',
88
- "You are trying to open untrusted files in a workspace which is trusted."
89
- )) :
90
- ( localize(
91
- 'openLooseFileWindowDetails',
92
- "You are trying to open untrusted files in a window which is trusted."
93
- )),
94
- ( localize(
95
- 'openLooseFileLearnMore',
96
- "If you don't want to open untrusted files, we recommend to open them in Restricted Mode in a new window as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more."
97
- ))
86
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'openLooseFileWorkspaceDetails', "You are trying to open untrusted files in a workspace which is trusted.") :
87
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'openLooseFileWindowDetails', "You are trying to open untrusted files in a window which is trusted."),
88
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'openLooseFileLearnMore', "If you don't want to open untrusted files, we recommend to open them in Restricted Mode in a new window as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more.")
98
89
  ];
99
90
  await this.dialogService.prompt({
100
91
  type: Severity.Info,
101
92
  message: this.workspaceContextService.getWorkbenchState() !== 1 ?
102
- ( localize(
103
- 'openLooseFileWorkspaceMesssage',
104
- "Do you want to allow untrusted files in this workspace?"
105
- )) :
106
- ( localize(
107
- 'openLooseFileWindowMesssage',
108
- "Do you want to allow untrusted files in this window?"
109
- )),
93
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'openLooseFileWorkspaceMesssage', "Do you want to allow untrusted files in this workspace?") :
94
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'openLooseFileWindowMesssage', "Do you want to allow untrusted files in this window?"),
110
95
  buttons: [
111
96
  {
112
- label: ( localize({ key: 'open', comment: ['&& denotes a mnemonic'] }, "&&Open")),
97
+ label: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', { key: 'open', comment: ['&& denotes a mnemonic'] }, "&&Open"),
113
98
  run: ({ checkboxChecked }) => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(1 , !!checkboxChecked)
114
99
  },
115
100
  {
116
- label: ( localize(
117
- { key: 'newWindow', comment: ['&& denotes a mnemonic'] },
118
- "Open in &&Restricted Mode"
119
- )),
101
+ label: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', { key: 'newWindow', comment: ['&& denotes a mnemonic'] }, "Open in &&Restricted Mode"),
120
102
  run: ({ checkboxChecked }) => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(2 , !!checkboxChecked)
121
103
  }
122
104
  ],
@@ -124,10 +106,7 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
124
106
  run: () => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(3 )
125
107
  },
126
108
  checkbox: {
127
- label: ( localize(
128
- 'openLooseFileWorkspaceCheckbox',
129
- "Remember my decision for all workspaces"
130
- )),
109
+ label: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'openLooseFileWorkspaceCheckbox', "Remember my decision for all workspaces"),
131
110
  checked: false
132
111
  },
133
112
  custom: {
@@ -138,31 +117,16 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
138
117
  }));
139
118
  this._register(this.workspaceTrustRequestService.onDidInitiateWorkspaceTrustRequest(async (requestOptions) => {
140
119
  const message = this.useWorkspaceLanguage ?
141
- ( localize(
142
- 'workspaceTrust',
143
- "Do you trust the authors of the files in this workspace?"
144
- )) :
145
- ( localize('folderTrust', "Do you trust the authors of the files in this folder?"));
146
- const defaultDetails = ( localize(
147
- 'immediateTrustRequestMessage',
148
- "A feature you are trying to use may be a security risk if you do not trust the source of the files or folders you currently have open."
149
- ));
120
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspaceTrust', "Do you trust the authors of the files in this workspace?") :
121
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'folderTrust', "Do you trust the authors of the files in this folder?");
122
+ const defaultDetails = localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'immediateTrustRequestMessage', "A feature you are trying to use may be a security risk if you do not trust the source of the files or folders you currently have open.");
150
123
  const details = requestOptions?.message ?? defaultDetails;
151
124
  const buttons = requestOptions?.buttons ?? [
152
- { label: this.useWorkspaceLanguage ? ( localize(
153
- { key: 'grantWorkspaceTrustButton', comment: ['&& denotes a mnemonic'] },
154
- "&&Trust Workspace & Continue"
155
- )) : ( localize(
156
- { key: 'grantFolderTrustButton', comment: ['&& denotes a mnemonic'] },
157
- "&&Trust Folder & Continue"
158
- )), type: 'ContinueWithTrust' },
159
- { label: ( localize(
160
- { key: 'manageWorkspaceTrustButton', comment: ['&& denotes a mnemonic'] },
161
- "&&Manage"
162
- )), type: 'Manage' }
125
+ { label: this.useWorkspaceLanguage ? localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', { key: 'grantWorkspaceTrustButton', comment: ['&& denotes a mnemonic'] }, "&&Trust Workspace & Continue") : localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', { key: 'grantFolderTrustButton', comment: ['&& denotes a mnemonic'] }, "&&Trust Folder & Continue"), type: 'ContinueWithTrust' },
126
+ { label: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', { key: 'manageWorkspaceTrustButton', comment: ['&& denotes a mnemonic'] }, "&&Manage"), type: 'Manage' }
163
127
  ];
164
128
  if (!( buttons.some(b => b.type === 'Cancel'))) {
165
- buttons.push({ label: ( localize('cancelWorkspaceTrustButton', "Cancel")), type: 'Cancel' });
129
+ buttons.push({ label: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'cancelWorkspaceTrustButton', "Cancel"), type: 'Cancel' });
166
130
  }
167
131
  const { result } = await this.dialogService.prompt({
168
132
  type: Severity.Info,
@@ -171,10 +135,9 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
171
135
  icon: Codicon.shield,
172
136
  markdownDetails: [
173
137
  { markdown: ( new MarkdownString(details)) },
174
- { markdown: ( new MarkdownString(( localize(
175
- 'immediateTrustRequestLearnMore',
176
- "If you don't trust the authors of these files, we do not recommend continuing as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more."
177
- )))) }
138
+ { markdown: ( new MarkdownString(
139
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'immediateTrustRequestLearnMore', "If you don't trust the authors of these files, we do not recommend continuing as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more.")
140
+ )) }
178
141
  ]
179
142
  },
180
143
  buttons: ( buttons.filter(b => b.type !== 'Cancel').map(button => {
@@ -273,15 +236,9 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
273
236
  if (!( addedFoldersTrustInfo.map(info => info.trusted)).every(trusted => trusted)) {
274
237
  const { confirmed } = await this.dialogService.confirm({
275
238
  type: Severity.Info,
276
- message: ( localize(
277
- 'addWorkspaceFolderMessage',
278
- "Do you trust the authors of the files in this folder?"
279
- )),
280
- detail: ( localize(
281
- 'addWorkspaceFolderDetail',
282
- "You are adding files that are not currently trusted to a trusted workspace. Do you trust the authors of these new files?"
283
- )),
284
- cancelButton: ( localize('no', 'No')),
239
+ message: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'addWorkspaceFolderMessage', "Do you trust the authors of the files in this folder?"),
240
+ detail: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'addWorkspaceFolderDetail', "You are adding files that are not currently trusted to a trusted workspace. Do you trust the authors of these new files?"),
241
+ cancelButton: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'no', 'No'),
285
242
  custom: { icon: Codicon.shield }
286
243
  });
287
244
  await this.workspaceTrustManagementService.setUrisTrust(( addedFoldersTrustInfo.map(i => i.uri)), confirmed);
@@ -309,51 +266,21 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
309
266
  console.warn('AI generated workspace trust dialog contents not available.');
310
267
  }
311
268
  const title = titleString ?? (this.useWorkspaceLanguage ?
312
- ( localize(
313
- 'workspaceTrust',
314
- "Do you trust the authors of the files in this workspace?"
315
- )) :
316
- ( localize('folderTrust', "Do you trust the authors of the files in this folder?")));
269
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspaceTrust', "Do you trust the authors of the files in this workspace?") :
270
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'folderTrust', "Do you trust the authors of the files in this folder?"));
317
271
  let checkboxText;
318
272
  const workspaceIdentifier = toWorkspaceIdentifier(this.workspaceContextService.getWorkspace());
319
273
  const isSingleFolderWorkspace = isSingleFolderWorkspaceIdentifier(workspaceIdentifier);
320
274
  const isEmptyWindow = isEmptyWorkspaceIdentifier(workspaceIdentifier);
321
275
  if (!isAiGeneratedWorkspace && this.workspaceTrustManagementService.canSetParentFolderTrust()) {
322
276
  const name = basename(dirname(workspaceIdentifier.uri));
323
- checkboxText = ( localize(
324
- 'checkboxString',
325
- "Trust the authors of all files in the parent folder '{0}'",
326
- name
327
- ));
277
+ checkboxText = localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'checkboxString', "Trust the authors of all files in the parent folder '{0}'", name);
328
278
  }
329
- this.doShowModal(title, { label: trustOption ?? ( localize(
330
- { key: 'trustOption', comment: ['&& denotes a mnemonic'] },
331
- "&&Yes, I trust the authors"
332
- )), sublabel: isSingleFolderWorkspace ? ( localize('trustFolderOptionDescription', "Trust folder and enable all features")) : ( localize(
333
- 'trustWorkspaceOptionDescription',
334
- "Trust workspace and enable all features"
335
- )) }, { label: dontTrustOption ?? ( localize(
336
- { key: 'dontTrustOption', comment: ['&& denotes a mnemonic'] },
337
- "&&No, I don't trust the authors"
338
- )), sublabel: isSingleFolderWorkspace ? ( localize('dontTrustFolderOptionDescription', "Browse folder in restricted mode")) : ( localize(
339
- 'dontTrustWorkspaceOptionDescription',
340
- "Browse workspace in restricted mode"
341
- )) }, [
279
+ this.doShowModal(title, { label: trustOption ?? localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', { key: 'trustOption', comment: ['&& denotes a mnemonic'] }, "&&Yes, I trust the authors"), sublabel: isSingleFolderWorkspace ? localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'trustFolderOptionDescription', "Trust folder and enable all features") : localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'trustWorkspaceOptionDescription', "Trust workspace and enable all features") }, { label: dontTrustOption ?? localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', { key: 'dontTrustOption', comment: ['&& denotes a mnemonic'] }, "&&No, I don't trust the authors"), sublabel: isSingleFolderWorkspace ? localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'dontTrustFolderOptionDescription', "Browse folder in restricted mode") : localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'dontTrustWorkspaceOptionDescription', "Browse workspace in restricted mode") }, [
342
280
  !isSingleFolderWorkspace ?
343
- ( localize(
344
- 'workspaceStartupTrustDetails',
345
- "{0} provides features that may automatically execute files in this workspace.",
346
- this.productService.nameShort
347
- )) :
348
- ( localize(
349
- 'folderStartupTrustDetails',
350
- "{0} provides features that may automatically execute files in this folder.",
351
- this.productService.nameShort
352
- )),
353
- learnMoreString ?? ( localize(
354
- 'startupTrustRequestLearnMore',
355
- "If you don't trust the authors of these files, we recommend to continue in restricted mode as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more."
356
- )),
281
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspaceStartupTrustDetails', "{0} provides features that may automatically execute files in this workspace.", this.productService.nameShort) :
282
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'folderStartupTrustDetails', "{0} provides features that may automatically execute files in this folder.", this.productService.nameShort),
283
+ learnMoreString ?? localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'startupTrustRequestLearnMore', "If you don't trust the authors of these files, we recommend to continue in restricted mode as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more."),
357
284
  !isEmptyWindow ?
358
285
  `\`${this.labelService.getWorkspaceLabel(workspaceIdentifier, { verbose: 2 })}\`` : '',
359
286
  ], checkboxText);
@@ -469,11 +396,11 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
469
396
  }
470
397
  const actions = [
471
398
  {
472
- label: ( localize('restrictedModeBannerManage', "Manage")),
399
+ label: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'restrictedModeBannerManage', "Manage"),
473
400
  href: 'command:' + MANAGE_TRUST_COMMAND_ID
474
401
  },
475
402
  {
476
- label: ( localize('restrictedModeBannerLearnMore', "Learn More")),
403
+ label: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'restrictedModeBannerLearnMore', "Learn More"),
477
404
  href: 'https://aka.ms/vscode-workspace-trust'
478
405
  }
479
406
  ];
@@ -493,39 +420,21 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
493
420
  getBannerItemAriaLabels() {
494
421
  switch (this.workspaceContextService.getWorkbenchState()) {
495
422
  case 1 :
496
- return ( localize(
497
- 'restrictedModeBannerAriaLabelWindow',
498
- "Restricted Mode is intended for safe code browsing. Trust this window to enable all features. Use navigation keys to access banner actions."
499
- ));
423
+ return localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'restrictedModeBannerAriaLabelWindow', "Restricted Mode is intended for safe code browsing. Trust this window to enable all features. Use navigation keys to access banner actions.");
500
424
  case 2 :
501
- return ( localize(
502
- 'restrictedModeBannerAriaLabelFolder',
503
- "Restricted Mode is intended for safe code browsing. Trust this folder to enable all features. Use navigation keys to access banner actions."
504
- ));
425
+ return localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'restrictedModeBannerAriaLabelFolder', "Restricted Mode is intended for safe code browsing. Trust this folder to enable all features. Use navigation keys to access banner actions.");
505
426
  case 3 :
506
- return ( localize(
507
- 'restrictedModeBannerAriaLabelWorkspace',
508
- "Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features. Use navigation keys to access banner actions."
509
- ));
427
+ return localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'restrictedModeBannerAriaLabelWorkspace', "Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features. Use navigation keys to access banner actions.");
510
428
  }
511
429
  }
512
430
  getBannerItemMessages() {
513
431
  switch (this.workspaceContextService.getWorkbenchState()) {
514
432
  case 1 :
515
- return ( localize(
516
- 'restrictedModeBannerMessageWindow',
517
- "Restricted Mode is intended for safe code browsing. Trust this window to enable all features."
518
- ));
433
+ return localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'restrictedModeBannerMessageWindow', "Restricted Mode is intended for safe code browsing. Trust this window to enable all features.");
519
434
  case 2 :
520
- return ( localize(
521
- 'restrictedModeBannerMessageFolder',
522
- "Restricted Mode is intended for safe code browsing. Trust this folder to enable all features."
523
- ));
435
+ return localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'restrictedModeBannerMessageFolder', "Restricted Mode is intended for safe code browsing. Trust this folder to enable all features.");
524
436
  case 3 :
525
- return ( localize(
526
- 'restrictedModeBannerMessageWorkspace',
527
- "Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features."
528
- ));
437
+ return localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'restrictedModeBannerMessageWorkspace', "Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features.");
529
438
  }
530
439
  }
531
440
  get bannerSetting() {
@@ -546,54 +455,30 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
546
455
  let toolTip;
547
456
  switch (this.workspaceContextService.getWorkbenchState()) {
548
457
  case 1 : {
549
- ariaLabel = trusted ? ( localize('status.ariaTrustedWindow', "This window is trusted.")) :
550
- ( localize(
551
- 'status.ariaUntrustedWindow',
552
- "Restricted Mode: Some features are disabled because this window is not trusted."
553
- ));
458
+ ariaLabel = trusted ? localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'status.ariaTrustedWindow', "This window is trusted.") :
459
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'status.ariaUntrustedWindow', "Restricted Mode: Some features are disabled because this window is not trusted.");
554
460
  toolTip = trusted ? ariaLabel : {
555
- value: ( localize(
556
- { key: 'status.tooltipUntrustedWindow2', comment: ['[abc]({n}) are links. Only translate `features are disabled` and `window is not trusted`. Do not change brackets and parentheses or {n}'] },
557
- "Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [window is not trusted]({1}).",
558
- `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
559
- `command:${MANAGE_TRUST_COMMAND_ID}`
560
- )),
461
+ value: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', { key: 'status.tooltipUntrustedWindow2', comment: ['[abc]({n}) are links. Only translate `features are disabled` and `window is not trusted`. Do not change brackets and parentheses or {n}'] }, "Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [window is not trusted]({1}).", `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`, `command:${MANAGE_TRUST_COMMAND_ID}`),
561
462
  isTrusted: true,
562
463
  supportThemeIcons: true
563
464
  };
564
465
  break;
565
466
  }
566
467
  case 2 : {
567
- ariaLabel = trusted ? ( localize('status.ariaTrustedFolder', "This folder is trusted.")) :
568
- ( localize(
569
- 'status.ariaUntrustedFolder',
570
- "Restricted Mode: Some features are disabled because this folder is not trusted."
571
- ));
468
+ ariaLabel = trusted ? localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'status.ariaTrustedFolder', "This folder is trusted.") :
469
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'status.ariaUntrustedFolder', "Restricted Mode: Some features are disabled because this folder is not trusted.");
572
470
  toolTip = trusted ? ariaLabel : {
573
- value: ( localize(
574
- { key: 'status.tooltipUntrustedFolder2', comment: ['[abc]({n}) are links. Only translate `features are disabled` and `folder is not trusted`. Do not change brackets and parentheses or {n}'] },
575
- "Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [folder is not trusted]({1}).",
576
- `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
577
- `command:${MANAGE_TRUST_COMMAND_ID}`
578
- )),
471
+ value: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', { key: 'status.tooltipUntrustedFolder2', comment: ['[abc]({n}) are links. Only translate `features are disabled` and `folder is not trusted`. Do not change brackets and parentheses or {n}'] }, "Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [folder is not trusted]({1}).", `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`, `command:${MANAGE_TRUST_COMMAND_ID}`),
579
472
  isTrusted: true,
580
473
  supportThemeIcons: true
581
474
  };
582
475
  break;
583
476
  }
584
477
  case 3 : {
585
- ariaLabel = trusted ? ( localize('status.ariaTrustedWorkspace', "This workspace is trusted.")) :
586
- ( localize(
587
- 'status.ariaUntrustedWorkspace',
588
- "Restricted Mode: Some features are disabled because this workspace is not trusted."
589
- ));
478
+ ariaLabel = trusted ? localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'status.ariaTrustedWorkspace', "This workspace is trusted.") :
479
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'status.ariaUntrustedWorkspace', "Restricted Mode: Some features are disabled because this workspace is not trusted.");
590
480
  toolTip = trusted ? ariaLabel : {
591
- value: ( localize(
592
- { key: 'status.tooltipUntrustedWorkspace2', comment: ['[abc]({n}) are links. Only translate `features are disabled` and `workspace is not trusted`. Do not change brackets and parentheses or {n}'] },
593
- "Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [workspace is not trusted]({1}).",
594
- `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
595
- `command:${MANAGE_TRUST_COMMAND_ID}`
596
- )),
481
+ value: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', { key: 'status.tooltipUntrustedWorkspace2', comment: ['[abc]({n}) are links. Only translate `features are disabled` and `workspace is not trusted`. Do not change brackets and parentheses or {n}'] }, "Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [workspace is not trusted]({1}).", `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`, `command:${MANAGE_TRUST_COMMAND_ID}`),
597
482
  isTrusted: true,
598
483
  supportThemeIcons: true
599
484
  };
@@ -601,7 +486,7 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
601
486
  }
602
487
  }
603
488
  return {
604
- name: ( localize('status.WorkspaceTrust', "Workspace Trust")),
489
+ name: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'status.WorkspaceTrust', "Workspace Trust"),
605
490
  text: trusted ? `$(shield)` : `$(shield) ${text}`,
606
491
  ariaLabel: ariaLabel,
607
492
  tooltip: toolTip,
@@ -633,16 +518,16 @@ WorkspaceTrustUXHandler = ( __decorate([
633
518
  ], WorkspaceTrustUXHandler));
634
519
  ( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(WorkspaceTrustRequestHandler, 2 );
635
520
  ( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(WorkspaceTrustUXHandler, 3 );
636
- ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(WorkspaceTrustEditor, WorkspaceTrustEditor.ID, ( localize('workspaceTrustEditor', "Workspace Trust Editor"))), [
521
+ ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(WorkspaceTrustEditor, WorkspaceTrustEditor.ID, localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspaceTrustEditor', "Workspace Trust Editor")), [
637
522
  ( new SyncDescriptor(WorkspaceTrustEditorInput))
638
523
  ]);
639
524
  const CONFIGURE_TRUST_COMMAND_ID = 'workbench.trust.configure';
640
- const WORKSPACES_CATEGORY = { value: ( localize('workspacesCategory', "Workspaces")), original: 'Workspaces' };
525
+ const WORKSPACES_CATEGORY = { value: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspacesCategory', "Workspaces"), original: 'Workspaces' };
641
526
  registerAction2(class extends Action2 {
642
527
  constructor() {
643
528
  super({
644
529
  id: CONFIGURE_TRUST_COMMAND_ID,
645
- title: { original: 'Configure Workspace Trust Settings', value: ( localize('configureWorkspaceTrustSettings', "Configure Workspace Trust Settings")) },
530
+ title: { original: 'Configure Workspace Trust Settings', value: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'configureWorkspaceTrustSettings', "Configure Workspace Trust Settings") },
646
531
  precondition: ( ContextKeyExpr.and(WorkspaceTrustContext.IsEnabled, ( ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true)))),
647
532
  category: WORKSPACES_CATEGORY,
648
533
  f1: true
@@ -656,7 +541,7 @@ registerAction2(class extends Action2 {
656
541
  constructor() {
657
542
  super({
658
543
  id: MANAGE_TRUST_COMMAND_ID,
659
- title: { original: 'Manage Workspace Trust', value: ( localize('manageWorkspaceTrust', "Manage Workspace Trust")) },
544
+ title: { original: 'Manage Workspace Trust', value: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'manageWorkspaceTrust', "Manage Workspace Trust") },
660
545
  precondition: ( ContextKeyExpr.and(WorkspaceTrustContext.IsEnabled, ( ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true)))),
661
546
  category: WORKSPACES_CATEGORY,
662
547
  f1: true,
@@ -677,97 +562,53 @@ registerAction2(class extends Action2 {
677
562
  [WORKSPACE_TRUST_ENABLED]: {
678
563
  type: 'boolean',
679
564
  default: true,
680
- description: ( localize(
681
- 'workspace.trust.description',
682
- "Controls whether or not Workspace Trust is enabled within VS Code."
683
- )),
565
+ description: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.description', "Controls whether or not Workspace Trust is enabled within VS Code."),
684
566
  tags: [WORKSPACE_TRUST_SETTING_TAG],
685
567
  scope: 1 ,
686
568
  },
687
569
  [WORKSPACE_TRUST_STARTUP_PROMPT]: {
688
570
  type: 'string',
689
571
  default: 'once',
690
- description: ( localize(
691
- 'workspace.trust.startupPrompt.description',
692
- "Controls when the startup prompt to trust a workspace is shown."
693
- )),
572
+ description: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.startupPrompt.description', "Controls when the startup prompt to trust a workspace is shown."),
694
573
  tags: [WORKSPACE_TRUST_SETTING_TAG],
695
574
  scope: 1 ,
696
575
  enum: ['always', 'once', 'never'],
697
576
  enumDescriptions: [
698
- ( localize(
699
- 'workspace.trust.startupPrompt.always',
700
- "Ask for trust every time an untrusted workspace is opened."
701
- )),
702
- ( localize(
703
- 'workspace.trust.startupPrompt.once',
704
- "Ask for trust the first time an untrusted workspace is opened."
705
- )),
706
- ( localize(
707
- 'workspace.trust.startupPrompt.never',
708
- "Do not ask for trust when an untrusted workspace is opened."
709
- )),
577
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.startupPrompt.always', "Ask for trust every time an untrusted workspace is opened."),
578
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.startupPrompt.once', "Ask for trust the first time an untrusted workspace is opened."),
579
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.startupPrompt.never', "Do not ask for trust when an untrusted workspace is opened."),
710
580
  ]
711
581
  },
712
582
  [WORKSPACE_TRUST_BANNER]: {
713
583
  type: 'string',
714
584
  default: 'untilDismissed',
715
- description: ( localize(
716
- 'workspace.trust.banner.description',
717
- "Controls when the restricted mode banner is shown."
718
- )),
585
+ description: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.banner.description', "Controls when the restricted mode banner is shown."),
719
586
  tags: [WORKSPACE_TRUST_SETTING_TAG],
720
587
  scope: 1 ,
721
588
  enum: ['always', 'untilDismissed', 'never'],
722
589
  enumDescriptions: [
723
- ( localize(
724
- 'workspace.trust.banner.always',
725
- "Show the banner every time an untrusted workspace is open."
726
- )),
727
- ( localize(
728
- 'workspace.trust.banner.untilDismissed',
729
- "Show the banner when an untrusted workspace is opened until dismissed."
730
- )),
731
- ( localize(
732
- 'workspace.trust.banner.never',
733
- "Do not show the banner when an untrusted workspace is open."
734
- )),
590
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.banner.always', "Show the banner every time an untrusted workspace is open."),
591
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.banner.untilDismissed', "Show the banner when an untrusted workspace is opened until dismissed."),
592
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.banner.never', "Do not show the banner when an untrusted workspace is open."),
735
593
  ]
736
594
  },
737
595
  [WORKSPACE_TRUST_UNTRUSTED_FILES]: {
738
596
  type: 'string',
739
597
  default: 'prompt',
740
- markdownDescription: ( localize(
741
- 'workspace.trust.untrustedFiles.description',
742
- "Controls how to handle opening untrusted files in a trusted workspace. This setting also applies to opening files in an empty window which is trusted via `#{0}#`.",
743
- WORKSPACE_TRUST_EMPTY_WINDOW
744
- )),
598
+ markdownDescription: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.untrustedFiles.description', "Controls how to handle opening untrusted files in a trusted workspace. This setting also applies to opening files in an empty window which is trusted via `#{0}#`.", WORKSPACE_TRUST_EMPTY_WINDOW),
745
599
  tags: [WORKSPACE_TRUST_SETTING_TAG],
746
600
  scope: 1 ,
747
601
  enum: ['prompt', 'open', 'newWindow'],
748
602
  enumDescriptions: [
749
- ( localize(
750
- 'workspace.trust.untrustedFiles.prompt',
751
- "Ask how to handle untrusted files for each workspace. Once untrusted files are introduced to a trusted workspace, you will not be prompted again."
752
- )),
753
- ( localize(
754
- 'workspace.trust.untrustedFiles.open',
755
- "Always allow untrusted files to be introduced to a trusted workspace without prompting."
756
- )),
757
- ( localize(
758
- 'workspace.trust.untrustedFiles.newWindow',
759
- "Always open untrusted files in a separate window in restricted mode without prompting."
760
- )),
603
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.untrustedFiles.prompt', "Ask how to handle untrusted files for each workspace. Once untrusted files are introduced to a trusted workspace, you will not be prompted again."),
604
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.untrustedFiles.open', "Always allow untrusted files to be introduced to a trusted workspace without prompting."),
605
+ localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.untrustedFiles.newWindow', "Always open untrusted files in a separate window in restricted mode without prompting."),
761
606
  ]
762
607
  },
763
608
  [WORKSPACE_TRUST_EMPTY_WINDOW]: {
764
609
  type: 'boolean',
765
610
  default: true,
766
- markdownDescription: ( localize(
767
- 'workspace.trust.emptyWindow.description',
768
- "Controls whether or not the empty window is trusted by default within VS Code. When used with `#{0}#`, you can enable the full functionality of VS Code without prompting in an empty window.",
769
- WORKSPACE_TRUST_UNTRUSTED_FILES
770
- )),
611
+ markdownDescription: localizeWithPath('vs/workbench/contrib/workspace/browser/workspace.contribution', 'workspace.trust.emptyWindow.description', "Controls whether or not the empty window is trusted by default within VS Code. When used with `#{0}#`, you can enable the full functionality of VS Code without prompting in an empty window.", WORKSPACE_TRUST_UNTRUSTED_FILES),
771
612
  tags: [WORKSPACE_TRUST_SETTING_TAG],
772
613
  scope: 1
773
614
  }