@codingame/monaco-vscode-update-service-override 27.0.0 → 28.0.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.
- package/package.json +2 -2
- package/vscode/src/vs/platform/update/common/update.config.contribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownSettingRenderer.js +14 -14
- package/vscode/src/vs/workbench/contrib/update/browser/releaseNotesEditor.js +6 -6
- package/vscode/src/vs/workbench/contrib/update/browser/update.contribution.js +15 -15
- package/vscode/src/vs/workbench/contrib/update/browser/update.js +44 -44
- package/vscode/src/vs/workbench/contrib/update/browser/updateStatusBarEntry.js +41 -41
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-update-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "28.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - update service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "28.0.1"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -9,7 +9,7 @@ const configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
|
9
9
|
configurationRegistry.registerConfiguration({
|
|
10
10
|
id: "update",
|
|
11
11
|
order: 15,
|
|
12
|
-
title: ( localize(
|
|
12
|
+
title: ( localize(2484, "Update")),
|
|
13
13
|
type: "object",
|
|
14
14
|
properties: {
|
|
15
15
|
"update.mode": {
|
|
@@ -18,18 +18,18 @@ configurationRegistry.registerConfiguration({
|
|
|
18
18
|
default: "default",
|
|
19
19
|
scope: ConfigurationScope.APPLICATION,
|
|
20
20
|
description: ( localize(
|
|
21
|
-
|
|
21
|
+
2485,
|
|
22
22
|
"Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."
|
|
23
23
|
)),
|
|
24
24
|
tags: ["usesOnlineServices"],
|
|
25
|
-
enumDescriptions: [( localize(
|
|
26
|
-
|
|
25
|
+
enumDescriptions: [( localize(2486, "Disable updates.")), ( localize(
|
|
26
|
+
2487,
|
|
27
27
|
"Disable automatic background update checks. Updates will be available if you manually check for updates."
|
|
28
28
|
)), ( localize(
|
|
29
|
-
|
|
29
|
+
2488,
|
|
30
30
|
"Check for updates only on startup. Disable automatic background update checks."
|
|
31
31
|
)), ( localize(
|
|
32
|
-
|
|
32
|
+
2489,
|
|
33
33
|
"Enable automatic update checks. Code will check for updates automatically and periodically."
|
|
34
34
|
))],
|
|
35
35
|
policy: {
|
|
@@ -40,29 +40,29 @@ configurationRegistry.registerConfiguration({
|
|
|
40
40
|
description: {
|
|
41
41
|
key: "updateMode",
|
|
42
42
|
value: ( localize(
|
|
43
|
-
|
|
43
|
+
2485,
|
|
44
44
|
"Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."
|
|
45
45
|
))
|
|
46
46
|
},
|
|
47
47
|
enumDescriptions: [{
|
|
48
48
|
key: "none",
|
|
49
|
-
value: ( localize(
|
|
49
|
+
value: ( localize(2486, "Disable updates."))
|
|
50
50
|
}, {
|
|
51
51
|
key: "manual",
|
|
52
52
|
value: ( localize(
|
|
53
|
-
|
|
53
|
+
2487,
|
|
54
54
|
"Disable automatic background update checks. Updates will be available if you manually check for updates."
|
|
55
55
|
))
|
|
56
56
|
}, {
|
|
57
57
|
key: "start",
|
|
58
58
|
value: ( localize(
|
|
59
|
-
|
|
59
|
+
2488,
|
|
60
60
|
"Check for updates only on startup. Disable automatic background update checks."
|
|
61
61
|
))
|
|
62
62
|
}, {
|
|
63
63
|
key: "default",
|
|
64
64
|
value: ( localize(
|
|
65
|
-
|
|
65
|
+
2489,
|
|
66
66
|
"Enable automatic update checks. Code will check for updates automatically and periodically."
|
|
67
67
|
))
|
|
68
68
|
}]
|
|
@@ -74,11 +74,11 @@ configurationRegistry.registerConfiguration({
|
|
|
74
74
|
default: "default",
|
|
75
75
|
scope: ConfigurationScope.APPLICATION,
|
|
76
76
|
description: ( localize(
|
|
77
|
-
|
|
77
|
+
2485,
|
|
78
78
|
"Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."
|
|
79
79
|
)),
|
|
80
80
|
deprecationMessage: ( localize(
|
|
81
|
-
|
|
81
|
+
2490,
|
|
82
82
|
"This setting is deprecated, please use '{0}' instead.",
|
|
83
83
|
"update.mode"
|
|
84
84
|
))
|
|
@@ -87,9 +87,9 @@ configurationRegistry.registerConfiguration({
|
|
|
87
87
|
type: "boolean",
|
|
88
88
|
default: true,
|
|
89
89
|
scope: ConfigurationScope.APPLICATION,
|
|
90
|
-
title: ( localize(
|
|
90
|
+
title: ( localize(2491, "Enable Background Updates")),
|
|
91
91
|
description: ( localize(
|
|
92
|
-
|
|
92
|
+
2492,
|
|
93
93
|
"Enable to download and install new VS Code versions in the background."
|
|
94
94
|
)),
|
|
95
95
|
included: isWindows && !isWeb
|
|
@@ -99,7 +99,7 @@ configurationRegistry.registerConfiguration({
|
|
|
99
99
|
default: true,
|
|
100
100
|
scope: ConfigurationScope.APPLICATION,
|
|
101
101
|
description: ( localize(
|
|
102
|
-
|
|
102
|
+
2493,
|
|
103
103
|
"Show Release Notes after an update. The Release Notes are fetched from a Microsoft online service."
|
|
104
104
|
)),
|
|
105
105
|
tags: ["usesOnlineServices"]
|
|
@@ -109,12 +109,12 @@ configurationRegistry.registerConfiguration({
|
|
|
109
109
|
enum: ["hidden", "actionable", "detailed"],
|
|
110
110
|
default: "detailed",
|
|
111
111
|
scope: ConfigurationScope.APPLICATION,
|
|
112
|
-
description: ( localize(
|
|
113
|
-
enumDescriptions: [( localize(
|
|
114
|
-
|
|
112
|
+
description: ( localize(2494, "Controls the visibility of the update status bar entry.")),
|
|
113
|
+
enumDescriptions: [( localize(2495, "The status bar entry is never shown.")), ( localize(
|
|
114
|
+
2496,
|
|
115
115
|
"The status bar entry is shown when an action is required (e.g., download, install, or restart)."
|
|
116
116
|
)), ( localize(
|
|
117
|
-
|
|
117
|
+
2497,
|
|
118
118
|
"The status bar entry is shown for all update states including progress."
|
|
119
119
|
))]
|
|
120
120
|
}
|
|
@@ -123,11 +123,11 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
123
123
|
}
|
|
124
124
|
viewInSettingsMessage(settingId, alreadyDisplayed) {
|
|
125
125
|
if (alreadyDisplayed) {
|
|
126
|
-
return localize(
|
|
126
|
+
return localize(9938, "View in Settings");
|
|
127
127
|
} else {
|
|
128
128
|
const displayName = settingKeyToDisplayFormat(settingId);
|
|
129
129
|
return localize(
|
|
130
|
-
|
|
130
|
+
9939,
|
|
131
131
|
"View \"{0}: {1}\" in Settings",
|
|
132
132
|
displayName.category,
|
|
133
133
|
displayName.label
|
|
@@ -137,7 +137,7 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
137
137
|
restorePreviousSettingMessage(settingId) {
|
|
138
138
|
const displayName = settingKeyToDisplayFormat(settingId);
|
|
139
139
|
return localize(
|
|
140
|
-
|
|
140
|
+
9940,
|
|
141
141
|
"Restore value of \"{0}: {1}\"",
|
|
142
142
|
displayName.category,
|
|
143
143
|
displayName.label
|
|
@@ -152,14 +152,14 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
152
152
|
if (this.isAlreadySet(setting, booleanValue)) {
|
|
153
153
|
if (booleanValue) {
|
|
154
154
|
return localize(
|
|
155
|
-
|
|
155
|
+
9941,
|
|
156
156
|
"\"{0}: {1}\" is already enabled",
|
|
157
157
|
displayName.category,
|
|
158
158
|
displayName.label
|
|
159
159
|
);
|
|
160
160
|
} else {
|
|
161
161
|
return localize(
|
|
162
|
-
|
|
162
|
+
9942,
|
|
163
163
|
"\"{0}: {1}\" is already disabled",
|
|
164
164
|
displayName.category,
|
|
165
165
|
displayName.label
|
|
@@ -167,16 +167,16 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
if (booleanValue) {
|
|
170
|
-
return localize(
|
|
170
|
+
return localize(9943, "Enable \"{0}: {1}\"", displayName.category, displayName.label);
|
|
171
171
|
} else {
|
|
172
|
-
return localize(
|
|
172
|
+
return localize(9944, "Disable \"{0}: {1}\"", displayName.category, displayName.label);
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
stringSettingMessage(setting, stringValue) {
|
|
176
176
|
const displayName = settingKeyToDisplayFormat(setting.key);
|
|
177
177
|
if (this.isAlreadySet(setting, stringValue)) {
|
|
178
178
|
return localize(
|
|
179
|
-
|
|
179
|
+
9945,
|
|
180
180
|
"\"{0}: {1}\" is already set to \"{2}\"",
|
|
181
181
|
displayName.category,
|
|
182
182
|
displayName.label,
|
|
@@ -184,7 +184,7 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
184
184
|
);
|
|
185
185
|
}
|
|
186
186
|
return localize(
|
|
187
|
-
|
|
187
|
+
9946,
|
|
188
188
|
"Set \"{0}: {1}\" to \"{2}\"",
|
|
189
189
|
displayName.category,
|
|
190
190
|
displayName.label,
|
|
@@ -195,7 +195,7 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
195
195
|
const displayName = settingKeyToDisplayFormat(setting.key);
|
|
196
196
|
if (this.isAlreadySet(setting, numberValue)) {
|
|
197
197
|
return localize(
|
|
198
|
-
|
|
198
|
+
9947,
|
|
199
199
|
"\"{0}: {1}\" is already set to {2}",
|
|
200
200
|
displayName.category,
|
|
201
201
|
displayName.label,
|
|
@@ -203,7 +203,7 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
203
203
|
);
|
|
204
204
|
}
|
|
205
205
|
return localize(
|
|
206
|
-
|
|
206
|
+
9948,
|
|
207
207
|
"Set \"{0}: {1}\" to {2}",
|
|
208
208
|
displayName.category,
|
|
209
209
|
displayName.label,
|
|
@@ -212,7 +212,7 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
212
212
|
}
|
|
213
213
|
renderSetting(setting, newValue) {
|
|
214
214
|
const href = this.settingToUriString(setting.key, newValue);
|
|
215
|
-
const title = ( localize(
|
|
215
|
+
const title = ( localize(9949, "View or change setting"));
|
|
216
216
|
return `<code tabindex="0"><a href="${href}" class="codesetting" title="${title}" aria-role="button"><svg width="14" height="14" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M9.1 4.4L8.6 2H7.4l-.5 2.4-.7.3-2-1.3-.9.8 1.3 2-.2.7-2.4.5v1.2l2.4.5.3.8-1.3 2 .8.8 2-1.3.8.3.4 2.3h1.2l.5-2.4.8-.3 2 1.3.8-.8-1.3-2 .3-.8 2.3-.4V7.4l-2.4-.5-.3-.8 1.3-2-.8-.8-2 1.3-.7-.2zM9.4 1l.5 2.4L12 2.1l2 2-1.4 2.1 2.4.4v2.8l-2.4.5L14 12l-2 2-2.1-1.4-.5 2.4H6.6l-.5-2.4L4 13.9l-2-2 1.4-2.1L1 9.4V6.6l2.4-.5L2.1 4l2-2 2.1 1.4.4-2.4h2.8zm.6 7c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zM8 9c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1z"/></svg>
|
|
217
217
|
<span class="separator"></span>
|
|
218
218
|
<span class="setting-name">${setting.key}</span>
|
|
@@ -290,8 +290,8 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
290
290
|
class: undefined,
|
|
291
291
|
enabled: true,
|
|
292
292
|
id: "copySettingId",
|
|
293
|
-
tooltip: ( localize(
|
|
294
|
-
label: ( localize(
|
|
293
|
+
tooltip: ( localize(9950, "Copy Setting ID")),
|
|
294
|
+
label: ( localize(9950, "Copy Setting ID")),
|
|
295
295
|
run: () => {
|
|
296
296
|
this._clipboardService.writeText(settingId);
|
|
297
297
|
}
|
|
@@ -114,7 +114,7 @@ let ReleaseNotesManager = class ReleaseNotesManager extends Disposable {
|
|
|
114
114
|
base
|
|
115
115
|
};
|
|
116
116
|
const html = await this.renderBody(this._lastMeta);
|
|
117
|
-
const title = ( localize(
|
|
117
|
+
const title = ( localize(14453, "Release Notes: {0}", version));
|
|
118
118
|
const activeEditorPane = this._editorService.activeEditorPane;
|
|
119
119
|
if (this._currentReleaseNotes) {
|
|
120
120
|
this._currentReleaseNotes.setWebviewTitle(title);
|
|
@@ -174,7 +174,7 @@ let ReleaseNotesManager = class ReleaseNotesManager extends Disposable {
|
|
|
174
174
|
const versionLabel = match[1].replace(/\./g, "_");
|
|
175
175
|
const baseUrl = "https://code.visualstudio.com/raw";
|
|
176
176
|
const url = `${baseUrl}/v${versionLabel}.md`;
|
|
177
|
-
const unassigned = ( localize(
|
|
177
|
+
const unassigned = ( localize(14454, "unassigned"));
|
|
178
178
|
const escapeMdHtml = text => {
|
|
179
179
|
return escape(text).replace(/\\/g, "\\\\");
|
|
180
180
|
};
|
|
@@ -630,7 +630,7 @@ let ReleaseNotesManager = class ReleaseNotesManager extends Disposable {
|
|
|
630
630
|
|
|
631
631
|
const label = document.createElement('label');
|
|
632
632
|
label.htmlFor = 'showReleaseNotes';
|
|
633
|
-
label.textContent = '${( localize(
|
|
633
|
+
label.textContent = '${( localize(14455, "Show release notes after an update"))}';
|
|
634
634
|
container.appendChild(label);
|
|
635
635
|
|
|
636
636
|
const beforeElement = document.querySelector("body > h1")?.nextElementSibling;
|
|
@@ -726,17 +726,17 @@ let ReleaseNotesManager = class ReleaseNotesManager extends Disposable {
|
|
|
726
726
|
switch (state.type) {
|
|
727
727
|
case StateType.AvailableForDownload:
|
|
728
728
|
return {
|
|
729
|
-
label: ( localize(
|
|
729
|
+
label: ( localize(14456, "Download Update")),
|
|
730
730
|
commandId: "update.downloadNow"
|
|
731
731
|
};
|
|
732
732
|
case StateType.Downloaded:
|
|
733
733
|
return {
|
|
734
|
-
label: ( localize(
|
|
734
|
+
label: ( localize(14457, "Install Update")),
|
|
735
735
|
commandId: "update.install"
|
|
736
736
|
};
|
|
737
737
|
case StateType.Ready:
|
|
738
738
|
return {
|
|
739
|
-
label: ( localize(
|
|
739
|
+
label: ( localize(14458, "Restart to Update")),
|
|
740
740
|
commandId: "update.restart"
|
|
741
741
|
};
|
|
742
742
|
default:
|
|
@@ -35,8 +35,8 @@ class ShowReleaseNotesAction extends Action2 {
|
|
|
35
35
|
super({
|
|
36
36
|
id: ShowCurrentReleaseNotesActionId,
|
|
37
37
|
title: {
|
|
38
|
-
...( localize2(
|
|
39
|
-
mnemonicTitle: ( localize(
|
|
38
|
+
...( localize2(14459, "Show Release Notes")),
|
|
39
|
+
mnemonicTitle: ( localize(14460, "Show &&Release Notes"))
|
|
40
40
|
},
|
|
41
41
|
category: {
|
|
42
42
|
value: product.nameShort,
|
|
@@ -62,7 +62,7 @@ class ShowReleaseNotesAction extends Action2 {
|
|
|
62
62
|
await openerService.open(( URI.parse(productService.releaseNotesUrl)));
|
|
63
63
|
} else {
|
|
64
64
|
throw ( new Error(( localize(
|
|
65
|
-
|
|
65
|
+
14461,
|
|
66
66
|
"This version of {0} does not have release notes online",
|
|
67
67
|
productService.nameLong
|
|
68
68
|
))));
|
|
@@ -75,10 +75,10 @@ class ShowCurrentReleaseNotesFromCurrentFileAction extends Action2 {
|
|
|
75
75
|
super({
|
|
76
76
|
id: ShowCurrentReleaseNotesFromCurrentFileActionId,
|
|
77
77
|
title: {
|
|
78
|
-
...( localize2(
|
|
79
|
-
mnemonicTitle: ( localize(
|
|
78
|
+
...( localize2(14462, "Open Current File as Release Notes")),
|
|
79
|
+
mnemonicTitle: ( localize(14460, "Show &&Release Notes"))
|
|
80
80
|
},
|
|
81
|
-
category: ( localize2(
|
|
81
|
+
category: ( localize2(14463, "Developer")),
|
|
82
82
|
f1: true
|
|
83
83
|
});
|
|
84
84
|
}
|
|
@@ -88,7 +88,7 @@ class ShowCurrentReleaseNotesFromCurrentFileAction extends Action2 {
|
|
|
88
88
|
try {
|
|
89
89
|
await showReleaseNotesInEditor(instantiationService, productService.version, true);
|
|
90
90
|
} catch (err) {
|
|
91
|
-
throw ( new Error(( localize(
|
|
91
|
+
throw ( new Error(( localize(14464, "Cannot open the current file as Release Notes"))));
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -100,7 +100,7 @@ class CheckForUpdateAction extends Action2 {
|
|
|
100
100
|
constructor() {
|
|
101
101
|
super({
|
|
102
102
|
id: "update.checkForUpdate",
|
|
103
|
-
title: ( localize2(
|
|
103
|
+
title: ( localize2(14465, "Check for Updates...")),
|
|
104
104
|
category: {
|
|
105
105
|
value: product.nameShort,
|
|
106
106
|
original: product.nameShort
|
|
@@ -118,7 +118,7 @@ class DownloadUpdateAction extends Action2 {
|
|
|
118
118
|
constructor() {
|
|
119
119
|
super({
|
|
120
120
|
id: "update.downloadUpdate",
|
|
121
|
-
title: ( localize2(
|
|
121
|
+
title: ( localize2(14466, "Download Update")),
|
|
122
122
|
category: {
|
|
123
123
|
value: product.nameShort,
|
|
124
124
|
original: product.nameShort
|
|
@@ -135,7 +135,7 @@ class InstallUpdateAction extends Action2 {
|
|
|
135
135
|
constructor() {
|
|
136
136
|
super({
|
|
137
137
|
id: "update.installUpdate",
|
|
138
|
-
title: ( localize2(
|
|
138
|
+
title: ( localize2(14467, "Install Update")),
|
|
139
139
|
category: {
|
|
140
140
|
value: product.nameShort,
|
|
141
141
|
original: product.nameShort
|
|
@@ -152,7 +152,7 @@ class RestartToUpdateAction extends Action2 {
|
|
|
152
152
|
constructor() {
|
|
153
153
|
super({
|
|
154
154
|
id: "update.restartToUpdate",
|
|
155
|
-
title: ( localize2(
|
|
155
|
+
title: ( localize2(14468, "Restart to Update")),
|
|
156
156
|
category: {
|
|
157
157
|
value: product.nameShort,
|
|
158
158
|
original: product.nameShort
|
|
@@ -175,7 +175,7 @@ class DownloadAction extends Action2 {
|
|
|
175
175
|
constructor() {
|
|
176
176
|
super({
|
|
177
177
|
id: DownloadAction.ID,
|
|
178
|
-
title: ( localize2(
|
|
178
|
+
title: ( localize2(14469, "Download {0}", product.nameLong)),
|
|
179
179
|
precondition: IsWebContext,
|
|
180
180
|
f1: true,
|
|
181
181
|
menu: [{
|
|
@@ -204,7 +204,7 @@ if (isWindows) {
|
|
|
204
204
|
constructor() {
|
|
205
205
|
super({
|
|
206
206
|
id: "_update.applyupdate",
|
|
207
|
-
title: ( localize2(
|
|
207
|
+
title: ( localize2(14470, "Apply Update...")),
|
|
208
208
|
category: Categories.Developer,
|
|
209
209
|
f1: true,
|
|
210
210
|
precondition: ( CONTEXT_UPDATE_STATE.isEqualTo(StateType.Idle))
|
|
@@ -214,13 +214,13 @@ if (isWindows) {
|
|
|
214
214
|
const updateService = accessor.get(IUpdateService);
|
|
215
215
|
const fileDialogService = accessor.get(IFileDialogService);
|
|
216
216
|
const updatePath = await fileDialogService.showOpenDialog({
|
|
217
|
-
title: ( localize(
|
|
217
|
+
title: ( localize(14471, "Apply Update")),
|
|
218
218
|
filters: [{
|
|
219
219
|
name: "Setup",
|
|
220
220
|
extensions: ["exe"]
|
|
221
221
|
}],
|
|
222
222
|
canSelectFiles: true,
|
|
223
|
-
openLabel: mnemonicButtonLabel(( localize(
|
|
223
|
+
openLabel: mnemonicButtonLabel(( localize(14472, "&&Update")))
|
|
224
224
|
});
|
|
225
225
|
if (!updatePath || !updatePath[0]) {
|
|
226
226
|
return;
|
|
@@ -53,7 +53,7 @@ async function openLatestReleaseNotesInBrowser(accessor) {
|
|
|
53
53
|
await openerService.open(uri);
|
|
54
54
|
} else {
|
|
55
55
|
throw ( new Error(( localize(
|
|
56
|
-
|
|
56
|
+
14473,
|
|
57
57
|
"This version of {0} does not have release notes online",
|
|
58
58
|
productService.nameLong
|
|
59
59
|
))));
|
|
@@ -76,7 +76,7 @@ function appendUpdateMenuItems(menuId, group) {
|
|
|
76
76
|
group,
|
|
77
77
|
command: {
|
|
78
78
|
id: "update.check",
|
|
79
|
-
title: ( localize(
|
|
79
|
+
title: ( localize(14474, "Check for Updates..."))
|
|
80
80
|
},
|
|
81
81
|
when: ( CONTEXT_UPDATE_STATE.isEqualTo(StateType.Idle))
|
|
82
82
|
});
|
|
@@ -84,7 +84,7 @@ function appendUpdateMenuItems(menuId, group) {
|
|
|
84
84
|
group,
|
|
85
85
|
command: {
|
|
86
86
|
id: "update.checking",
|
|
87
|
-
title: ( localize(
|
|
87
|
+
title: ( localize(14475, "Checking for Updates...")),
|
|
88
88
|
precondition: ( ContextKeyExpr.false())
|
|
89
89
|
},
|
|
90
90
|
when: ( CONTEXT_UPDATE_STATE.isEqualTo(StateType.CheckingForUpdates))
|
|
@@ -93,7 +93,7 @@ function appendUpdateMenuItems(menuId, group) {
|
|
|
93
93
|
group,
|
|
94
94
|
command: {
|
|
95
95
|
id: "update.downloadNow",
|
|
96
|
-
title: ( localize(
|
|
96
|
+
title: ( localize(14476, "Download Update (1)"))
|
|
97
97
|
},
|
|
98
98
|
when: ( CONTEXT_UPDATE_STATE.isEqualTo(StateType.AvailableForDownload))
|
|
99
99
|
});
|
|
@@ -101,7 +101,7 @@ function appendUpdateMenuItems(menuId, group) {
|
|
|
101
101
|
group,
|
|
102
102
|
command: {
|
|
103
103
|
id: "update.downloading",
|
|
104
|
-
title: ( localize(
|
|
104
|
+
title: ( localize(14477, "Downloading Update...")),
|
|
105
105
|
precondition: ( ContextKeyExpr.false())
|
|
106
106
|
},
|
|
107
107
|
when: ( CONTEXT_UPDATE_STATE.isEqualTo(StateType.Downloading))
|
|
@@ -110,7 +110,7 @@ function appendUpdateMenuItems(menuId, group) {
|
|
|
110
110
|
group,
|
|
111
111
|
command: {
|
|
112
112
|
id: "update.install",
|
|
113
|
-
title: ( localize(
|
|
113
|
+
title: ( localize(14478, "Install Update... (1)"))
|
|
114
114
|
},
|
|
115
115
|
when: ( CONTEXT_UPDATE_STATE.isEqualTo(StateType.Downloaded))
|
|
116
116
|
});
|
|
@@ -118,7 +118,7 @@ function appendUpdateMenuItems(menuId, group) {
|
|
|
118
118
|
group,
|
|
119
119
|
command: {
|
|
120
120
|
id: "update.updating",
|
|
121
|
-
title: ( localize(
|
|
121
|
+
title: ( localize(14479, "Installing Update...")),
|
|
122
122
|
precondition: ( ContextKeyExpr.false())
|
|
123
123
|
},
|
|
124
124
|
when: ( CONTEXT_UPDATE_STATE.isEqualTo(StateType.Updating))
|
|
@@ -128,7 +128,7 @@ function appendUpdateMenuItems(menuId, group) {
|
|
|
128
128
|
order: 2,
|
|
129
129
|
command: {
|
|
130
130
|
id: "update.restart",
|
|
131
|
-
title: ( localize(
|
|
131
|
+
title: ( localize(14480, "Restart to Update (1)"))
|
|
132
132
|
},
|
|
133
133
|
when: ( CONTEXT_UPDATE_STATE.isEqualTo(StateType.Ready))
|
|
134
134
|
});
|
|
@@ -180,12 +180,12 @@ let ProductContribution = class ProductContribution {
|
|
|
180
180
|
if (shouldShowReleaseNotes && !environmentService.skipReleaseNotes && releaseNotesUrl && lastVersion && currentVersion && isMajorMinorUpdate(lastVersion, currentVersion)) {
|
|
181
181
|
showReleaseNotesInEditor(instantiationService, productService.version, false).then(undefined, () => {
|
|
182
182
|
notificationService.prompt(Severity.Info, ( localize(
|
|
183
|
-
|
|
183
|
+
14481,
|
|
184
184
|
"Welcome to {0} v{1}! Would you like to read the Release Notes?",
|
|
185
185
|
productService.nameLong,
|
|
186
186
|
productService.version
|
|
187
187
|
)), [{
|
|
188
|
-
label: ( localize(
|
|
188
|
+
label: ( localize(14482, "Release Notes")),
|
|
189
189
|
run: () => {
|
|
190
190
|
const uri = ( URI.parse(releaseNotesUrl));
|
|
191
191
|
openerService.open(uri);
|
|
@@ -253,14 +253,14 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
253
253
|
this.notificationService.notify({
|
|
254
254
|
severity: Severity.Info,
|
|
255
255
|
message: ( localize(
|
|
256
|
-
|
|
256
|
+
14483,
|
|
257
257
|
"Updates are disabled because you are running the user-scope installation of {0} as Administrator.",
|
|
258
258
|
this.productService.nameLong
|
|
259
259
|
)),
|
|
260
260
|
actions: {
|
|
261
261
|
primary: [toAction({
|
|
262
262
|
id: "",
|
|
263
|
-
label: ( localize(
|
|
263
|
+
label: ( localize(14484, "Learn More")),
|
|
264
264
|
run: () => this.openerService.open("https://aka.ms/vscode-windows-setup")
|
|
265
265
|
})]
|
|
266
266
|
},
|
|
@@ -302,13 +302,13 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
302
302
|
}
|
|
303
303
|
let badge = undefined;
|
|
304
304
|
if (state.type === StateType.AvailableForDownload || state.type === StateType.Downloaded || state.type === StateType.Ready) {
|
|
305
|
-
badge = ( new NumberBadge(1, () => ( localize(
|
|
305
|
+
badge = ( new NumberBadge(1, () => ( localize(14485, "New {0} update available.", this.productService.nameShort))));
|
|
306
306
|
} else if (state.type === StateType.CheckingForUpdates) {
|
|
307
|
-
badge = ( new ProgressBadge(() => ( localize(
|
|
307
|
+
badge = ( new ProgressBadge(() => ( localize(14486, "Checking for {0} updates...", this.productService.nameShort))));
|
|
308
308
|
} else if (state.type === StateType.Downloading || state.type === StateType.Overwriting) {
|
|
309
|
-
badge = ( new ProgressBadge(() => ( localize(
|
|
309
|
+
badge = ( new ProgressBadge(() => ( localize(14487, "Downloading {0} update...", this.productService.nameShort))));
|
|
310
310
|
} else if (state.type === StateType.Updating) {
|
|
311
|
-
badge = ( new ProgressBadge(() => ( localize(
|
|
311
|
+
badge = ( new ProgressBadge(() => ( localize(14488, "Updating {0}...", this.productService.nameShort))));
|
|
312
312
|
}
|
|
313
313
|
this.badgeDisposable.clear();
|
|
314
314
|
if (badge) {
|
|
@@ -329,11 +329,11 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
329
329
|
this.notificationService.notify({
|
|
330
330
|
severity: Severity.Error,
|
|
331
331
|
message: error,
|
|
332
|
-
source: ( localize(
|
|
332
|
+
source: ( localize(14489, "Update Service"))
|
|
333
333
|
});
|
|
334
334
|
}
|
|
335
335
|
onUpdateNotAvailable() {
|
|
336
|
-
this.dialogService.info(( localize(
|
|
336
|
+
this.dialogService.info(( localize(14490, "There are currently no updates available.")));
|
|
337
337
|
}
|
|
338
338
|
onUpdateAvailable(update) {
|
|
339
339
|
if (!this.shouldShowNotification()) {
|
|
@@ -343,14 +343,14 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
343
343
|
if (!productVersion) {
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
346
|
-
this.notificationService.prompt(Severity.Info, ( localize(
|
|
347
|
-
label: ( localize(
|
|
346
|
+
this.notificationService.prompt(Severity.Info, ( localize(14491, "There is an available update.")), [{
|
|
347
|
+
label: ( localize(14492, "Download Update")),
|
|
348
348
|
run: () => this.updateService.downloadUpdate(true)
|
|
349
349
|
}, {
|
|
350
|
-
label: ( localize(
|
|
350
|
+
label: ( localize(14493, "Later")),
|
|
351
351
|
run: () => {}
|
|
352
352
|
}, {
|
|
353
|
-
label: ( localize(
|
|
353
|
+
label: ( localize(14482, "Release Notes")),
|
|
354
354
|
run: () => {
|
|
355
355
|
this.instantiationService.invokeFunction(accessor => showReleaseNotes(accessor, productVersion));
|
|
356
356
|
}
|
|
@@ -373,18 +373,18 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
373
373
|
return;
|
|
374
374
|
}
|
|
375
375
|
this.notificationService.prompt(Severity.Info, ( localize(
|
|
376
|
-
|
|
376
|
+
14494,
|
|
377
377
|
"There's an update available: {0} {1}",
|
|
378
378
|
this.productService.nameLong,
|
|
379
379
|
productVersion
|
|
380
380
|
)), [{
|
|
381
|
-
label: ( localize(
|
|
381
|
+
label: ( localize(14495, "Install Update")),
|
|
382
382
|
run: () => this.updateService.applyUpdate()
|
|
383
383
|
}, {
|
|
384
|
-
label: ( localize(
|
|
384
|
+
label: ( localize(14493, "Later")),
|
|
385
385
|
run: () => {}
|
|
386
386
|
}, {
|
|
387
|
-
label: ( localize(
|
|
387
|
+
label: ( localize(14482, "Release Notes")),
|
|
388
388
|
run: () => {
|
|
389
389
|
this.instantiationService.invokeFunction(accessor => showReleaseNotes(accessor, productVersion));
|
|
390
390
|
}
|
|
@@ -397,33 +397,33 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
397
397
|
const handle = this.overwriteNotificationHandle;
|
|
398
398
|
this.overwriteNotificationHandle = undefined;
|
|
399
399
|
handle.progress.done();
|
|
400
|
-
handle.updateMessage(( localize(
|
|
400
|
+
handle.updateMessage(( localize(14496, "The newer update is ready to install.")));
|
|
401
401
|
handle.updateActions({
|
|
402
402
|
primary: [toAction({
|
|
403
403
|
id: "update.restartToUpdate",
|
|
404
|
-
label: ( localize(
|
|
404
|
+
label: ( localize(14497, "Restart to Update")),
|
|
405
405
|
run: () => this.updateService.quitAndInstall()
|
|
406
406
|
})]
|
|
407
407
|
});
|
|
408
408
|
} else if ((isWindows && this.productService.target !== "user") || this.shouldShowNotification()) {
|
|
409
409
|
const actions = [{
|
|
410
|
-
label: ( localize(
|
|
410
|
+
label: ( localize(14498, "Update Now")),
|
|
411
411
|
run: () => this.updateService.quitAndInstall()
|
|
412
412
|
}, {
|
|
413
|
-
label: ( localize(
|
|
413
|
+
label: ( localize(14493, "Later")),
|
|
414
414
|
run: () => {}
|
|
415
415
|
}];
|
|
416
416
|
const productVersion = state.update.productVersion;
|
|
417
417
|
if (productVersion) {
|
|
418
418
|
actions.push({
|
|
419
|
-
label: ( localize(
|
|
419
|
+
label: ( localize(14482, "Release Notes")),
|
|
420
420
|
run: () => {
|
|
421
421
|
this.instantiationService.invokeFunction(accessor => showReleaseNotes(accessor, productVersion));
|
|
422
422
|
}
|
|
423
423
|
});
|
|
424
424
|
}
|
|
425
425
|
this.notificationService.prompt(Severity.Info, ( localize(
|
|
426
|
-
|
|
426
|
+
14499,
|
|
427
427
|
"Restart {0} to apply the latest update.",
|
|
428
428
|
this.productService.nameLong
|
|
429
429
|
)), actions, {
|
|
@@ -440,10 +440,10 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
440
440
|
severity: Severity.Info,
|
|
441
441
|
sticky: true,
|
|
442
442
|
message: ( localize(
|
|
443
|
-
|
|
443
|
+
14500,
|
|
444
444
|
"We found a newer update available and have started to download it. We'll let you know as soon as it's ready to install."
|
|
445
445
|
)),
|
|
446
|
-
source: ( localize(
|
|
446
|
+
source: ( localize(14489, "Update Service"))
|
|
447
447
|
});
|
|
448
448
|
this.overwriteNotificationHandle.progress.infinite();
|
|
449
449
|
}
|
|
@@ -496,7 +496,7 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
496
496
|
order: 1,
|
|
497
497
|
command: {
|
|
498
498
|
id: "update.showUpdateReleaseNotes",
|
|
499
|
-
title: ( localize(
|
|
499
|
+
title: ( localize(14501, "Show Update Release Notes"))
|
|
500
500
|
},
|
|
501
501
|
when: ( ContextKeyExpr.and(( CONTEXT_UPDATE_STATE.isEqualTo(StateType.Ready)), MAJOR_MINOR_UPDATE_AVAILABLE))
|
|
502
502
|
});
|
|
@@ -522,7 +522,7 @@ let SwitchProductQualityContribution = class SwitchProductQualityContribution ex
|
|
|
522
522
|
constructor() {
|
|
523
523
|
super({
|
|
524
524
|
id: commandId,
|
|
525
|
-
title: isSwitchingToInsiders ? ( localize(
|
|
525
|
+
title: isSwitchingToInsiders ? ( localize(14502, "Switch to Insiders Version...")) : ( localize(14503, "Switch to Stable Version...")),
|
|
526
526
|
precondition: IsWebContext,
|
|
527
527
|
menu: {
|
|
528
528
|
id: MenuId.GlobalActivity,
|
|
@@ -560,15 +560,15 @@ let SwitchProductQualityContribution = class SwitchProductQualityContribution ex
|
|
|
560
560
|
}
|
|
561
561
|
const res = await dialogService.confirm({
|
|
562
562
|
type: "info",
|
|
563
|
-
message: ( localize(
|
|
563
|
+
message: ( localize(14504, "Changing the version requires a reload to take effect")),
|
|
564
564
|
detail: newQuality === "insider" ? ( localize(
|
|
565
|
-
|
|
565
|
+
14505,
|
|
566
566
|
"Press the reload button to switch to the Insiders version of VS Code."
|
|
567
567
|
)) : ( localize(
|
|
568
|
-
|
|
568
|
+
14506,
|
|
569
569
|
"Press the reload button to switch to the Stable version of VS Code."
|
|
570
570
|
)),
|
|
571
|
-
primaryButton: ( localize(
|
|
571
|
+
primaryButton: ( localize(14507, "&&Reload"))
|
|
572
572
|
});
|
|
573
573
|
if (res.confirmed) {
|
|
574
574
|
const promises = [];
|
|
@@ -598,18 +598,18 @@ let SwitchProductQualityContribution = class SwitchProductQualityContribution ex
|
|
|
598
598
|
} = await dialogService.prompt({
|
|
599
599
|
type: Severity.Info,
|
|
600
600
|
message: ( localize(
|
|
601
|
-
|
|
601
|
+
14508,
|
|
602
602
|
"Choose the settings sync service to use after changing the version"
|
|
603
603
|
)),
|
|
604
604
|
detail: ( localize(
|
|
605
|
-
|
|
605
|
+
14509,
|
|
606
606
|
"The Insiders version of VS Code will synchronize your settings, keybindings, extensions, snippets and UI State using separate insiders settings sync service by default."
|
|
607
607
|
)),
|
|
608
608
|
buttons: [{
|
|
609
|
-
label: ( localize(
|
|
609
|
+
label: ( localize(14510, "&&Insiders")),
|
|
610
610
|
run: () => "insiders"
|
|
611
611
|
}, {
|
|
612
|
-
label: ( localize(
|
|
612
|
+
label: ( localize(14511, "&&Stable (current)")),
|
|
613
613
|
run: () => "stable"
|
|
614
614
|
}],
|
|
615
615
|
cancelButton: true
|
|
@@ -27,7 +27,7 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
27
27
|
UpdateStatusBarEntryContribution_1 = this;
|
|
28
28
|
}
|
|
29
29
|
static {
|
|
30
|
-
this.NAME = ( localize(
|
|
30
|
+
this.NAME = ( localize(14512, "Update Status"));
|
|
31
31
|
}
|
|
32
32
|
constructor(
|
|
33
33
|
updateService,
|
|
@@ -80,8 +80,8 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
80
80
|
case StateType.CheckingForUpdates:
|
|
81
81
|
this.updateStatusBarEntry({
|
|
82
82
|
name: UpdateStatusBarEntryContribution_1.NAME,
|
|
83
|
-
text: ( localize(
|
|
84
|
-
ariaLabel: ( localize(
|
|
83
|
+
text: ( localize(14513, "$(sync~spin) Checking for updates...")),
|
|
84
|
+
ariaLabel: ( localize(14514, "Checking for updates")),
|
|
85
85
|
tooltip: this.getCheckingTooltip(),
|
|
86
86
|
command: ShowTooltipCommand
|
|
87
87
|
});
|
|
@@ -89,8 +89,8 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
89
89
|
case StateType.AvailableForDownload:
|
|
90
90
|
this.updateStatusBarEntry({
|
|
91
91
|
name: UpdateStatusBarEntryContribution_1.NAME,
|
|
92
|
-
text: ( localize(
|
|
93
|
-
ariaLabel: ( localize(
|
|
92
|
+
text: ( localize(14515, "$(circle-filled) Update available, click to download.")),
|
|
93
|
+
ariaLabel: ( localize(14516, "Update available, click to download.")),
|
|
94
94
|
tooltip: this.getAvailableTooltip(state.update),
|
|
95
95
|
command: "update.downloadNow"
|
|
96
96
|
});
|
|
@@ -99,7 +99,7 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
99
99
|
this.updateStatusBarEntry({
|
|
100
100
|
name: UpdateStatusBarEntryContribution_1.NAME,
|
|
101
101
|
text: this.getDownloadingText(state),
|
|
102
|
-
ariaLabel: ( localize(
|
|
102
|
+
ariaLabel: ( localize(14517, "Downloading update")),
|
|
103
103
|
tooltip: this.getDownloadingTooltip(state),
|
|
104
104
|
command: ShowTooltipCommand
|
|
105
105
|
});
|
|
@@ -107,8 +107,8 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
107
107
|
case StateType.Downloaded:
|
|
108
108
|
this.updateStatusBarEntry({
|
|
109
109
|
name: UpdateStatusBarEntryContribution_1.NAME,
|
|
110
|
-
text: ( localize(
|
|
111
|
-
ariaLabel: ( localize(
|
|
110
|
+
text: ( localize(14518, "$(circle-filled) Update downloaded, click to install.")),
|
|
111
|
+
ariaLabel: ( localize(14519, "Update downloaded, click to install.")),
|
|
112
112
|
tooltip: this.getReadyToInstallTooltip(state.update),
|
|
113
113
|
command: "update.install"
|
|
114
114
|
});
|
|
@@ -126,8 +126,8 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
126
126
|
{
|
|
127
127
|
this.updateStatusBarEntry({
|
|
128
128
|
name: UpdateStatusBarEntryContribution_1.NAME,
|
|
129
|
-
text: ( localize(
|
|
130
|
-
ariaLabel: ( localize(
|
|
129
|
+
text: ( localize(14520, "$(circle-filled) Update is ready, click to restart.")),
|
|
130
|
+
ariaLabel: ( localize(14521, "Update is ready, click to restart.")),
|
|
131
131
|
tooltip: this.getRestartToUpdateTooltip(state.update),
|
|
132
132
|
command: "update.restart"
|
|
133
133
|
});
|
|
@@ -136,8 +136,8 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
136
136
|
case StateType.Overwriting:
|
|
137
137
|
this.updateStatusBarEntry({
|
|
138
138
|
name: UpdateStatusBarEntryContribution_1.NAME,
|
|
139
|
-
text: ( localize(
|
|
140
|
-
ariaLabel: ( localize(
|
|
139
|
+
text: ( localize(14522, "$(sync~spin) Downloading update...")),
|
|
140
|
+
ariaLabel: ( localize(14523, "Downloading a newer update")),
|
|
141
141
|
tooltip: this.getOverwritingTooltip(state),
|
|
142
142
|
command: ShowTooltipCommand
|
|
143
143
|
});
|
|
@@ -156,10 +156,10 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
156
156
|
element: token => {
|
|
157
157
|
const store = this.createTooltipDisposableStore(token);
|
|
158
158
|
const container = $(".update-status-tooltip");
|
|
159
|
-
this.appendHeader(container, ( localize(
|
|
159
|
+
this.appendHeader(container, ( localize(14524, "Checking for Updates")), store);
|
|
160
160
|
this.appendProductInfo(container);
|
|
161
161
|
const message = append(container, $(".progress-details"));
|
|
162
|
-
message.textContent = ( localize(
|
|
162
|
+
message.textContent = ( localize(14525, "Checking for updates, please wait..."));
|
|
163
163
|
return container;
|
|
164
164
|
}
|
|
165
165
|
};
|
|
@@ -169,7 +169,7 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
169
169
|
element: token => {
|
|
170
170
|
const store = this.createTooltipDisposableStore(token);
|
|
171
171
|
const container = $(".update-status-tooltip");
|
|
172
|
-
this.appendHeader(container, ( localize(
|
|
172
|
+
this.appendHeader(container, ( localize(14526, "Update Available")), store);
|
|
173
173
|
this.appendProductInfo(container, update);
|
|
174
174
|
this.appendWhatsIncluded(container);
|
|
175
175
|
return container;
|
|
@@ -184,14 +184,14 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
184
184
|
) {
|
|
185
185
|
if (downloadedBytes !== undefined && totalBytes !== undefined && totalBytes > 0) {
|
|
186
186
|
return localize(
|
|
187
|
-
|
|
187
|
+
14527,
|
|
188
188
|
"$(sync~spin) Downloading update: {0} / {1} • {2}%",
|
|
189
189
|
formatBytes(downloadedBytes),
|
|
190
190
|
formatBytes(totalBytes),
|
|
191
191
|
getProgressPercent(downloadedBytes, totalBytes) ?? 0
|
|
192
192
|
);
|
|
193
193
|
} else {
|
|
194
|
-
return localize(
|
|
194
|
+
return localize(14528, "$(sync~spin) Downloading update...");
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
getDownloadingTooltip(state) {
|
|
@@ -199,7 +199,7 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
199
199
|
element: token => {
|
|
200
200
|
const store = this.createTooltipDisposableStore(token);
|
|
201
201
|
const container = $(".update-status-tooltip");
|
|
202
|
-
this.appendHeader(container, ( localize(
|
|
202
|
+
this.appendHeader(container, ( localize(14529, "Downloading Update")), store);
|
|
203
203
|
this.appendProductInfo(container, state.update);
|
|
204
204
|
const {
|
|
205
205
|
downloadedBytes,
|
|
@@ -219,16 +219,16 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
219
219
|
const speed = computeDownloadSpeed(state);
|
|
220
220
|
if (speed !== undefined && speed > 0) {
|
|
221
221
|
const speedInfo = append(container, $(".speed-info"));
|
|
222
|
-
speedInfo.textContent = ( localize(
|
|
222
|
+
speedInfo.textContent = ( localize(14530, "{0}/s", formatBytes(speed)));
|
|
223
223
|
}
|
|
224
224
|
const timeRemaining = computeDownloadTimeRemaining(state);
|
|
225
225
|
if (timeRemaining !== undefined && timeRemaining > 0) {
|
|
226
226
|
const timeRemainingNode = append(container, $(".time-remaining"));
|
|
227
|
-
timeRemainingNode.textContent = `~${formatTimeRemaining(timeRemaining)} ${( localize(
|
|
227
|
+
timeRemainingNode.textContent = `~${formatTimeRemaining(timeRemaining)} ${( localize(14531, "remaining"))}`;
|
|
228
228
|
}
|
|
229
229
|
} else {
|
|
230
230
|
const message = append(container, $(".progress-details"));
|
|
231
|
-
message.textContent = ( localize(
|
|
231
|
+
message.textContent = ( localize(14532, "Downloading, please wait..."));
|
|
232
232
|
}
|
|
233
233
|
return container;
|
|
234
234
|
}
|
|
@@ -239,7 +239,7 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
239
239
|
element: token => {
|
|
240
240
|
const store = this.createTooltipDisposableStore(token);
|
|
241
241
|
const container = $(".update-status-tooltip");
|
|
242
|
-
this.appendHeader(container, ( localize(
|
|
242
|
+
this.appendHeader(container, ( localize(14533, "Update is Ready to Install")), store);
|
|
243
243
|
this.appendProductInfo(container, update);
|
|
244
244
|
this.appendWhatsIncluded(container);
|
|
245
245
|
return container;
|
|
@@ -251,7 +251,7 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
251
251
|
element: token => {
|
|
252
252
|
const store = this.createTooltipDisposableStore(token);
|
|
253
253
|
const container = $(".update-status-tooltip");
|
|
254
|
-
this.appendHeader(container, ( localize(
|
|
254
|
+
this.appendHeader(container, ( localize(14534, "Update Installed")), store);
|
|
255
255
|
this.appendProductInfo(container, update);
|
|
256
256
|
this.appendWhatsIncluded(container);
|
|
257
257
|
return container;
|
|
@@ -266,9 +266,9 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
266
266
|
) {
|
|
267
267
|
const percentage = getProgressPercent(currentProgress, maxProgress);
|
|
268
268
|
if (percentage !== undefined) {
|
|
269
|
-
return localize(
|
|
269
|
+
return localize(14535, "$(sync~spin) Installing update: {0}%", percentage);
|
|
270
270
|
} else {
|
|
271
|
-
return localize(
|
|
271
|
+
return localize(14536, "$(sync~spin) Installing update...");
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
getUpdatingTooltip(state) {
|
|
@@ -276,7 +276,7 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
276
276
|
element: token => {
|
|
277
277
|
const store = this.createTooltipDisposableStore(token);
|
|
278
278
|
const container = $(".update-status-tooltip");
|
|
279
|
-
this.appendHeader(container, ( localize(
|
|
279
|
+
this.appendHeader(container, ( localize(14537, "Installing Update")), store);
|
|
280
280
|
this.appendProductInfo(container, state.update);
|
|
281
281
|
const {
|
|
282
282
|
currentProgress,
|
|
@@ -293,7 +293,7 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
293
293
|
percentageSpan.textContent = `${percentage}%`;
|
|
294
294
|
} else {
|
|
295
295
|
const message = append(container, $(".progress-details"));
|
|
296
|
-
message.textContent = ( localize(
|
|
296
|
+
message.textContent = ( localize(14538, "Installing update, please wait..."));
|
|
297
297
|
}
|
|
298
298
|
return container;
|
|
299
299
|
}
|
|
@@ -304,10 +304,10 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
304
304
|
element: token => {
|
|
305
305
|
const store = this.createTooltipDisposableStore(token);
|
|
306
306
|
const container = $(".update-status-tooltip");
|
|
307
|
-
this.appendHeader(container, ( localize(
|
|
307
|
+
this.appendHeader(container, ( localize(14539, "Downloading Newer Update")), store);
|
|
308
308
|
this.appendProductInfo(container, state.update);
|
|
309
309
|
const message = append(container, $(".progress-details"));
|
|
310
|
-
message.textContent = ( localize(
|
|
310
|
+
message.textContent = ( localize(14540, "A newer update was released. Downloading, please wait..."));
|
|
311
311
|
return container;
|
|
312
312
|
}
|
|
313
313
|
};
|
|
@@ -330,7 +330,7 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
330
330
|
})));
|
|
331
331
|
actionBar.push([toAction({
|
|
332
332
|
id: "update.openSettings",
|
|
333
|
-
label: ( localize(
|
|
333
|
+
label: ( localize(14541, "Update Settings")),
|
|
334
334
|
class: ThemeIcon.asClassName(Codicon.gear),
|
|
335
335
|
run: () => this.runCommandAndClose("workbench.action.openSettings", "@id:update*")
|
|
336
336
|
})], {
|
|
@@ -350,23 +350,23 @@ let UpdateStatusBarEntryContribution = class UpdateStatusBarEntryContribution ex
|
|
|
350
350
|
if (productVersion) {
|
|
351
351
|
const currentVersion = append(details, $(".product-version"));
|
|
352
352
|
const currentCommitId = this.productService.commit?.substring(0, 7);
|
|
353
|
-
currentVersion.textContent = currentCommitId ? ( localize(
|
|
353
|
+
currentVersion.textContent = currentCommitId ? ( localize(14542, "Current Version: {0} ({1})", productVersion, currentCommitId)) : ( localize(14543, "Current Version: {0}", productVersion));
|
|
354
354
|
}
|
|
355
355
|
const version = update?.productVersion;
|
|
356
356
|
if (version) {
|
|
357
357
|
const latestVersion = append(details, $(".product-version"));
|
|
358
358
|
const updateCommitId = update.version?.substring(0, 7);
|
|
359
|
-
latestVersion.textContent = updateCommitId ? ( localize(
|
|
359
|
+
latestVersion.textContent = updateCommitId ? ( localize(14544, "Latest Version: {0} ({1})", version, updateCommitId)) : ( localize(14545, "Latest Version: {0}", version));
|
|
360
360
|
}
|
|
361
361
|
const releaseDate = update?.timestamp ?? tryParseDate(this.productService.date);
|
|
362
362
|
if (typeof releaseDate === "number" && releaseDate > 0) {
|
|
363
363
|
const releaseDateNode = append(details, $(".product-release-date"));
|
|
364
|
-
releaseDateNode.textContent = ( localize(
|
|
364
|
+
releaseDateNode.textContent = ( localize(14546, "Released {0}", formatDate(releaseDate)));
|
|
365
365
|
}
|
|
366
366
|
const releaseNotesVersion = version ?? productVersion;
|
|
367
367
|
if (releaseNotesVersion) {
|
|
368
368
|
const link = append(details, $("a.release-notes-link"));
|
|
369
|
-
link.textContent = ( localize(
|
|
369
|
+
link.textContent = ( localize(14547, "Release Notes"));
|
|
370
370
|
link.href = "#";
|
|
371
371
|
link.addEventListener("click", e => {
|
|
372
372
|
e.preventDefault();
|
|
@@ -426,28 +426,28 @@ function formatTimeRemaining(seconds) {
|
|
|
426
426
|
const hours = seconds / 3600;
|
|
427
427
|
if (hours >= 1) {
|
|
428
428
|
const formattedHours = formatDecimal(hours);
|
|
429
|
-
return formattedHours === "1" ? ( localize(
|
|
429
|
+
return formattedHours === "1" ? ( localize(14548, "{0} hour", formattedHours)) : ( localize(14549, "{0} hours", formattedHours));
|
|
430
430
|
}
|
|
431
431
|
const minutes = Math.floor(seconds / 60);
|
|
432
432
|
if (minutes >= 1) {
|
|
433
|
-
return localize(
|
|
433
|
+
return localize(14550, "{0} min", minutes);
|
|
434
434
|
}
|
|
435
|
-
return localize(
|
|
435
|
+
return localize(14551, "{0}s", seconds);
|
|
436
436
|
}
|
|
437
437
|
function formatBytes(bytes) {
|
|
438
438
|
if (bytes < 1024) {
|
|
439
|
-
return localize(
|
|
439
|
+
return localize(14552, "{0} B", bytes);
|
|
440
440
|
}
|
|
441
441
|
const kb = bytes / 1024;
|
|
442
442
|
if (kb < 1024) {
|
|
443
|
-
return localize(
|
|
443
|
+
return localize(14553, "{0} KB", formatDecimal(kb));
|
|
444
444
|
}
|
|
445
445
|
const mb = kb / 1024;
|
|
446
446
|
if (mb < 1024) {
|
|
447
|
-
return localize(
|
|
447
|
+
return localize(14554, "{0} MB", formatDecimal(mb));
|
|
448
448
|
}
|
|
449
449
|
const gb = mb / 1024;
|
|
450
|
-
return localize(
|
|
450
|
+
return localize(14555, "{0} GB", formatDecimal(gb));
|
|
451
451
|
}
|
|
452
452
|
function formatDecimal(value) {
|
|
453
453
|
const rounded = Math.round(value * 10) / 10;
|