@codingame/monaco-vscode-keybindings-service-override 7.1.0 → 7.1.1

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.
@@ -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 { onDidChangeFullscreen, isFullscreen } from 'vscode/vscode/vs/base/browser/browser';
4
4
  import { BrowserFeatures, KeyboardSupport } from 'vscode/vscode/vs/base/browser/canIUse';
5
5
  import { onDidRegisterWindow, addDisposableListener, EventType, trackFocus, getWindow } from 'vscode/vscode/vs/base/browser/dom';
@@ -46,64 +46,37 @@ import { OutputBuilder, KeybindingIO } from '../common/keybindingIO.js';
46
46
  import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
47
47
 
48
48
  var WorkbenchKeybindingService_1;
49
- const _moduleId = "vs/workbench/services/keybinding/browser/keybindingService";
50
49
  function isValidContributedKeyBinding(keyBinding, rejects) {
51
50
  if (!keyBinding) {
52
- rejects.push(( localizeWithPath(_moduleId, 0, "expected non-empty value.")));
51
+ rejects.push(( localize(3503, "expected non-empty value.")));
53
52
  return false;
54
53
  }
55
54
  if (typeof keyBinding.command !== 'string') {
56
- rejects.push(( localizeWithPath(
57
- _moduleId,
58
- 1,
55
+ rejects.push(( localize(
56
+ 3504,
59
57
  "property `{0}` is mandatory and must be of type `string`",
60
58
  'command'
61
59
  )));
62
60
  return false;
63
61
  }
64
62
  if (keyBinding.key && typeof keyBinding.key !== 'string') {
65
- rejects.push(( localizeWithPath(
66
- _moduleId,
67
- 2,
68
- "property `{0}` can be omitted or must be of type `string`",
69
- 'key'
70
- )));
63
+ rejects.push(( localize(3505, "property `{0}` can be omitted or must be of type `string`", 'key')));
71
64
  return false;
72
65
  }
73
66
  if (keyBinding.when && typeof keyBinding.when !== 'string') {
74
- rejects.push(( localizeWithPath(
75
- _moduleId,
76
- 2,
77
- "property `{0}` can be omitted or must be of type `string`",
78
- 'when'
79
- )));
67
+ rejects.push(( localize(3505, "property `{0}` can be omitted or must be of type `string`", 'when')));
80
68
  return false;
81
69
  }
82
70
  if (keyBinding.mac && typeof keyBinding.mac !== 'string') {
83
- rejects.push(( localizeWithPath(
84
- _moduleId,
85
- 2,
86
- "property `{0}` can be omitted or must be of type `string`",
87
- 'mac'
88
- )));
71
+ rejects.push(( localize(3505, "property `{0}` can be omitted or must be of type `string`", 'mac')));
89
72
  return false;
90
73
  }
91
74
  if (keyBinding.linux && typeof keyBinding.linux !== 'string') {
92
- rejects.push(( localizeWithPath(
93
- _moduleId,
94
- 2,
95
- "property `{0}` can be omitted or must be of type `string`",
96
- 'linux'
97
- )));
75
+ rejects.push(( localize(3505, "property `{0}` can be omitted or must be of type `string`", 'linux')));
98
76
  return false;
99
77
  }
100
78
  if (keyBinding.win && typeof keyBinding.win !== 'string') {
101
- rejects.push(( localizeWithPath(
102
- _moduleId,
103
- 2,
104
- "property `{0}` can be omitted or must be of type `string`",
105
- 'win'
106
- )));
79
+ rejects.push(( localize(3505, "property `{0}` can be omitted or must be of type `string`", 'win')));
107
80
  return false;
108
81
  }
109
82
  return true;
@@ -113,38 +86,33 @@ const keybindingType = {
113
86
  default: { command: '', key: '' },
114
87
  properties: {
115
88
  command: {
116
- description: ( localizeWithPath(
117
- _moduleId,
118
- 3,
119
- 'Identifier of the command to run when keybinding is triggered.'
120
- )),
89
+ description: ( localize(3506, 'Identifier of the command to run when keybinding is triggered.')),
121
90
  type: 'string'
122
91
  },
123
92
  args: {
124
- description: ( localizeWithPath(_moduleId, 4, "Arguments to pass to the command to execute."))
93
+ description: ( localize(3507, "Arguments to pass to the command to execute."))
125
94
  },
126
95
  key: {
127
- description: ( localizeWithPath(
128
- _moduleId,
129
- 5,
96
+ description: ( localize(
97
+ 3508,
130
98
  'Key or key sequence (separate keys with plus-sign and sequences with space, e.g. Ctrl+O and Ctrl+L L for a chord).'
131
99
  )),
132
100
  type: 'string'
133
101
  },
134
102
  mac: {
135
- description: ( localizeWithPath(_moduleId, 6, 'Mac specific key or key sequence.')),
103
+ description: ( localize(3509, 'Mac specific key or key sequence.')),
136
104
  type: 'string'
137
105
  },
138
106
  linux: {
139
- description: ( localizeWithPath(_moduleId, 7, 'Linux specific key or key sequence.')),
107
+ description: ( localize(3510, 'Linux specific key or key sequence.')),
140
108
  type: 'string'
141
109
  },
142
110
  win: {
143
- description: ( localizeWithPath(_moduleId, 8, 'Windows specific key or key sequence.')),
111
+ description: ( localize(3511, 'Windows specific key or key sequence.')),
144
112
  type: 'string'
145
113
  },
146
114
  when: {
147
- description: ( localizeWithPath(_moduleId, 9, 'Condition when the key is active.')),
115
+ description: ( localize(3512, 'Condition when the key is active.')),
148
116
  type: 'string'
149
117
  },
150
118
  }
@@ -153,7 +121,7 @@ const keybindingsExtPoint = ExtensionsRegistry.registerExtensionPoint({
153
121
  extensionPoint: 'keybindings',
154
122
  deps: [commandsExtensionPoint],
155
123
  jsonSchema: {
156
- description: ( localizeWithPath(_moduleId, 10, "Contributes keybindings.")),
124
+ description: ( localize(3513, "Contributes keybindings.")),
157
125
  oneOf: [
158
126
  keybindingType,
159
127
  {
@@ -535,9 +503,8 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
535
503
  }
536
504
  }
537
505
  if (rejects.length > 0) {
538
- collector.error(( localizeWithPath(
539
- _moduleId,
540
- 11,
506
+ collector.error(( localize(
507
+ 3514,
541
508
  "Invalid `contributes.{0}`: {1}",
542
509
  keybindingsExtPoint.name,
543
510
  rejects.join('\n')
@@ -627,7 +594,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
627
594
  static _getAllCommandsAsComment(boundCommands) {
628
595
  const unboundCommands = getAllUnboundCommands(boundCommands);
629
596
  const pretty = unboundCommands.sort().join('\n// - ');
630
- return '// ' + ( localizeWithPath(_moduleId, 12, "Here are other available commands: ")) + '\n// - ' + pretty;
597
+ return '// ' + ( localize(3515, "Here are other available commands: ")) + '\n// - ' + pretty;
631
598
  }
632
599
  mightProducePrintableCharacter(event) {
633
600
  if (event.ctrlKey || event.metaKey || event.altKey) {
@@ -752,7 +719,7 @@ class KeybindingsJsonSchema {
752
719
  this.schema = {
753
720
  id: KeybindingsJsonSchema.schemaId,
754
721
  type: 'array',
755
- title: ( localizeWithPath(_moduleId, 13, "Keybindings configuration")),
722
+ title: ( localize(3516, "Keybindings configuration")),
756
723
  allowTrailingCommas: true,
757
724
  allowComments: true,
758
725
  definitions: {
@@ -776,7 +743,7 @@ class KeybindingsJsonSchema {
776
743
  'type': 'string',
777
744
  'enum': this.commandsEnum,
778
745
  'enumDescriptions': this.commandsEnumDescriptions,
779
- 'description': ( localizeWithPath(_moduleId, 14, "Name of the command to execute")),
746
+ 'description': ( localize(3517, "Name of the command to execute")),
780
747
  },
781
748
  'commandType': {
782
749
  'anyOf': [
@@ -787,7 +754,7 @@ class KeybindingsJsonSchema {
787
754
  'type': 'string',
788
755
  'enum': this.removalCommandsEnum,
789
756
  'enumDescriptions': this.commandsEnumDescriptions,
790
- 'description': ( localizeWithPath(_moduleId, 15, "Name of the command to remove keyboard shortcut for")),
757
+ 'description': ( localize(3518, "Name of the command to remove keyboard shortcut for")),
791
758
  },
792
759
  {
793
760
  'type': 'string'
@@ -805,7 +772,7 @@ class KeybindingsJsonSchema {
805
772
  'properties': {
806
773
  'key': {
807
774
  'type': 'string',
808
- 'description': ( localizeWithPath(_moduleId, 16, "Key or key sequence (separated by space)")),
775
+ 'description': ( localize(3519, "Key or key sequence (separated by space)")),
809
776
  },
810
777
  'command': {
811
778
  'anyOf': [
@@ -817,9 +784,8 @@ class KeybindingsJsonSchema {
817
784
  'not': {
818
785
  'type': 'array'
819
786
  },
820
- 'errorMessage': ( localizeWithPath(
821
- _moduleId,
822
- 17,
787
+ 'errorMessage': ( localize(
788
+ 3520,
823
789
  "Incorrect type. Expected \"{0}\". The field 'command' does not support running multiple commands. Use command 'runCommands' to pass it multiple commands to run.",
824
790
  'string'
825
791
  ))
@@ -835,10 +801,10 @@ class KeybindingsJsonSchema {
835
801
  },
836
802
  'when': {
837
803
  'type': 'string',
838
- 'description': ( localizeWithPath(_moduleId, 18, "Condition when the key is active."))
804
+ 'description': ( localize(3521, "Condition when the key is active."))
839
805
  },
840
806
  'args': {
841
- 'description': ( localizeWithPath(_moduleId, 19, "Arguments to pass to the command to execute."))
807
+ 'description': ( localize(3522, "Arguments to pass to the command to execute."))
842
808
  }
843
809
  },
844
810
  '$ref': '#/definitions/commandsSchemas'
@@ -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 { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
4
4
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
5
5
  import { KeymapInfo } from '../common/keymapInfo.js';
@@ -36,7 +36,6 @@ function __variableDynamicImportRuntime0__(path) {
36
36
  })
37
37
  }
38
38
  }
39
- const _moduleId = "vs/workbench/services/keybinding/browser/keyboardLayoutService";
40
39
  class BrowserKeyboardMapperFactoryBase extends Disposable {
41
40
  get activeKeymap() {
42
41
  return this._activeKeymapInfo;
@@ -493,12 +492,12 @@ const keyboardConfiguration = {
493
492
  'id': 'keyboard',
494
493
  'order': 15,
495
494
  'type': 'object',
496
- 'title': ( localizeWithPath(_moduleId, 0, "Keyboard")),
495
+ 'title': ( localize(3523, "Keyboard")),
497
496
  'properties': {
498
497
  'keyboard.layout': {
499
498
  'type': 'string',
500
499
  'default': 'autodetect',
501
- 'description': ( localizeWithPath(_moduleId, 1, "Control the keyboard layout used in web."))
500
+ 'description': ( localize(3524, "Control the keyboard layout used in web."))
502
501
  }
503
502
  }
504
503
  };