@codingame/monaco-vscode-dialogs-service-override 7.1.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/browser/parts/dialogs/dialogHandler.js +5 -7
- package/vscode/src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution.js +2 -3
- package/vscode/src/vs/workbench/contrib/welcomeDialog/browser/welcomeWidget.js +2 -3
- package/vscode/src/vs/workbench/services/dialogs/browser/abstractFileDialogService.js +18 -21
- package/vscode/src/vs/workbench/services/dialogs/browser/fileDialogService.js +15 -22
- package/vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.js +24 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-dialogs-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@8.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { AbstractDialogHandler } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
|
|
4
4
|
import { ILayoutService } from 'vscode/vscode/vs/platform/layout/browser/layoutService.service';
|
|
5
5
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
@@ -17,7 +17,6 @@ import { defaultButtonStyles, defaultCheckboxStyles, defaultInputBoxStyles, defa
|
|
|
17
17
|
import { ResultKind } from 'vscode/vscode/vs/platform/keybinding/common/keybindingResolver';
|
|
18
18
|
|
|
19
19
|
var BrowserDialogHandler_1;
|
|
20
|
-
const _moduleId = "vs/workbench/browser/parts/dialogs/dialogHandler";
|
|
21
20
|
let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHandler {
|
|
22
21
|
static { BrowserDialogHandler_1 = this; }
|
|
23
22
|
static { this.ALLOWABLE_COMMANDS = [
|
|
@@ -58,9 +57,8 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
|
|
|
58
57
|
}
|
|
59
58
|
async about() {
|
|
60
59
|
const detailString = (useAgo) => {
|
|
61
|
-
return (
|
|
62
|
-
|
|
63
|
-
0,
|
|
60
|
+
return ( localize(
|
|
61
|
+
5640,
|
|
64
62
|
"Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
|
|
65
63
|
this.productService.version || 'Unknown',
|
|
66
64
|
this.productService.commit || 'Unknown',
|
|
@@ -71,8 +69,8 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
|
|
|
71
69
|
const detail = detailString(true);
|
|
72
70
|
const detailToCopy = detailString(false);
|
|
73
71
|
const { button } = await this.doShow(Severity$1.Info, this.productService.nameLong, [
|
|
74
|
-
(
|
|
75
|
-
(
|
|
72
|
+
( localize(5641, "&&Copy")),
|
|
73
|
+
( localize(5642, "OK"))
|
|
76
74
|
], detail, 1);
|
|
77
75
|
if (button === 0) {
|
|
78
76
|
this.clipboardService.writeText(detailToCopy);
|
|
@@ -16,12 +16,11 @@ import { WelcomeWidget } from './welcomeWidget.js';
|
|
|
16
16
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
17
17
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
18
18
|
import { Extensions as Extensions$1, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
19
|
-
import {
|
|
19
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
20
20
|
import { applicationConfigurationNodeBase } from 'vscode/vscode/vs/workbench/common/configuration';
|
|
21
21
|
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
22
22
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
23
23
|
|
|
24
|
-
const _moduleId = "vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution";
|
|
25
24
|
const configurationKey = 'workbench.welcome.experimental.dialog';
|
|
26
25
|
let WelcomeDialogContribution = class WelcomeDialogContribution extends Disposable {
|
|
27
26
|
constructor(storageService, environmentService, configurationService, contextService, codeEditorService, instantiationService, commandService, telemetryService, openerService, editorService) {
|
|
@@ -90,7 +89,7 @@ configurationRegistry.registerConfiguration({
|
|
|
90
89
|
type: 'boolean',
|
|
91
90
|
default: false,
|
|
92
91
|
tags: ['experimental'],
|
|
93
|
-
description: (
|
|
92
|
+
description: ( localize(1895, "When enabled, a welcome widget is shown in the editor"))
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
});
|
|
@@ -9,7 +9,7 @@ import { mnemonicButtonLabel } from 'vscode/vscode/vs/base/common/labels';
|
|
|
9
9
|
import { defaultButtonStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
|
|
10
10
|
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
11
11
|
import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
12
|
-
import {
|
|
12
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
13
13
|
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
14
14
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
15
15
|
import { parseLinkedText } from 'vscode/vscode/vs/base/common/linkedText';
|
|
@@ -29,7 +29,6 @@ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
|
29
29
|
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
30
30
|
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
31
31
|
|
|
32
|
-
const _moduleId = "vs/workbench/contrib/welcomeDialog/browser/welcomeWidget";
|
|
33
32
|
class WelcomeWidget extends Disposable {
|
|
34
33
|
constructor(_editor, instantiationService, commandService, telemetryService, openerService) {
|
|
35
34
|
super();
|
|
@@ -72,7 +71,7 @@ class WelcomeWidget extends Disposable {
|
|
|
72
71
|
}
|
|
73
72
|
async buildWidgetContent(title, message, buttonText, buttonAction) {
|
|
74
73
|
const actionBar = this._register(( (new ActionBar(this.element, {}))));
|
|
75
|
-
const action = this._register(( (new Action('dialog.close', (
|
|
74
|
+
const action = this._register(( (new Action('dialog.close', ( localize(5643, "Close Dialog")), ThemeIcon.asClassName(Codicon.dialogClose), true, async () => {
|
|
76
75
|
this._hide();
|
|
77
76
|
}))));
|
|
78
77
|
actionBar.push(action, { icon: true, label: false });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { isWorkspaceToOpen, isFileToOpen } from 'vscode/vscode/vs/platform/window/common/window';
|
|
4
4
|
import { ConfirmResult, getFileNamesMessage } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
|
|
5
5
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
@@ -30,7 +30,6 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
|
|
|
30
30
|
import { EditorOpenSource } from 'vscode/vscode/vs/platform/editor/common/editor';
|
|
31
31
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
32
32
|
|
|
33
|
-
const _moduleId = "vs/workbench/services/dialogs/browser/abstractFileDialogService";
|
|
34
33
|
let AbstractFileDialogService = class AbstractFileDialogService {
|
|
35
34
|
constructor(hostService, contextService, historyService, environmentService, instantiationService, configurationService, fileService, openerService, dialogService, languageService, workspacesService, labelService, pathService, commandService, editorService, codeEditorService, logService) {
|
|
36
35
|
this.hostService = hostService;
|
|
@@ -121,19 +120,17 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
121
120
|
return ConfirmResult.DONT_SAVE;
|
|
122
121
|
}
|
|
123
122
|
let message;
|
|
124
|
-
let detail = (
|
|
123
|
+
let detail = ( localize(5624, "Your changes will be lost if you don't save them."));
|
|
125
124
|
if (fileNamesOrResources.length === 1) {
|
|
126
|
-
message = (
|
|
127
|
-
|
|
128
|
-
1,
|
|
125
|
+
message = ( localize(
|
|
126
|
+
5625,
|
|
129
127
|
"Do you want to save the changes you made to {0}?",
|
|
130
128
|
typeof fileNamesOrResources[0] === 'string' ? fileNamesOrResources[0] : basename(fileNamesOrResources[0])
|
|
131
129
|
));
|
|
132
130
|
}
|
|
133
131
|
else {
|
|
134
|
-
message = (
|
|
135
|
-
|
|
136
|
-
2,
|
|
132
|
+
message = ( localize(
|
|
133
|
+
5626,
|
|
137
134
|
"Do you want to save the changes to the following {0} files?",
|
|
138
135
|
fileNamesOrResources.length
|
|
139
136
|
));
|
|
@@ -146,12 +143,12 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
146
143
|
buttons: [
|
|
147
144
|
{
|
|
148
145
|
label: fileNamesOrResources.length > 1 ?
|
|
149
|
-
(
|
|
150
|
-
(
|
|
146
|
+
( localize(5627, "&&Save All")) :
|
|
147
|
+
( localize(5628, "&&Save")),
|
|
151
148
|
run: () => ConfirmResult.SAVE
|
|
152
149
|
},
|
|
153
150
|
{
|
|
154
|
-
label: (
|
|
151
|
+
label: ( localize(5629, "Do&&n't Save")),
|
|
155
152
|
run: () => ConfirmResult.DONT_SAVE
|
|
156
153
|
}
|
|
157
154
|
],
|
|
@@ -165,7 +162,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
165
162
|
return schema === Schemas.untitled ? [Schemas.file] : (schema !== Schemas.file ? [schema, Schemas.file] : [schema]);
|
|
166
163
|
}
|
|
167
164
|
async pickFileFolderAndOpenSimplified(schema, options, preferNewWindow) {
|
|
168
|
-
const title = (
|
|
165
|
+
const title = ( localize(5630, 'Open File or Folder'));
|
|
169
166
|
const availableFileSystems = this.addFileSchemaIfNeeded(schema);
|
|
170
167
|
const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: true, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });
|
|
171
168
|
if (uri) {
|
|
@@ -183,7 +180,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
183
180
|
}
|
|
184
181
|
}
|
|
185
182
|
async pickFileAndOpenSimplified(schema, options, preferNewWindow) {
|
|
186
|
-
const title = (
|
|
183
|
+
const title = ( localize(5631, 'Open File'));
|
|
187
184
|
const availableFileSystems = this.addFileSchemaIfNeeded(schema);
|
|
188
185
|
const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: false, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });
|
|
189
186
|
if (uri) {
|
|
@@ -200,7 +197,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
200
197
|
this.workspacesService.addRecentlyOpened([{ fileUri: uri, label: this.labelService.getUriLabel(uri) }]);
|
|
201
198
|
}
|
|
202
199
|
async pickFolderAndOpenSimplified(schema, options) {
|
|
203
|
-
const title = (
|
|
200
|
+
const title = ( localize(5632, 'Open Folder'));
|
|
204
201
|
const availableFileSystems = this.addFileSchemaIfNeeded(schema, true);
|
|
205
202
|
const uri = await this.pickResource({ canSelectFiles: false, canSelectFolders: true, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });
|
|
206
203
|
if (uri) {
|
|
@@ -208,8 +205,8 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
208
205
|
}
|
|
209
206
|
}
|
|
210
207
|
async pickWorkspaceAndOpenSimplified(schema, options) {
|
|
211
|
-
const title = (
|
|
212
|
-
const filters = [{ name: (
|
|
208
|
+
const title = ( localize(5633, 'Open Workspace from File'));
|
|
209
|
+
const filters = [{ name: ( localize(5634, 'Workspace')), extensions: [WORKSPACE_EXTENSION] }];
|
|
213
210
|
const availableFileSystems = this.addFileSchemaIfNeeded(schema, true);
|
|
214
211
|
const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: false, canSelectMany: false, defaultUri: options.defaultUri, title, filters, availableFileSystems });
|
|
215
212
|
if (uri) {
|
|
@@ -220,7 +217,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
220
217
|
if (!options.availableFileSystems) {
|
|
221
218
|
options.availableFileSystems = this.addFileSchemaIfNeeded(schema);
|
|
222
219
|
}
|
|
223
|
-
options.title = (
|
|
220
|
+
options.title = ( localize(5635, 'Save As'));
|
|
224
221
|
const uri = await this.saveRemoteResource(options);
|
|
225
222
|
if (uri) {
|
|
226
223
|
this.addFileToRecentlyOpened(uri);
|
|
@@ -271,7 +268,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
271
268
|
getPickFileToSaveDialogOptions(defaultUri, availableFileSystems) {
|
|
272
269
|
const options = {
|
|
273
270
|
defaultUri,
|
|
274
|
-
title: (
|
|
271
|
+
title: ( localize(5636, "Save As")),
|
|
275
272
|
availableFileSystems
|
|
276
273
|
};
|
|
277
274
|
const ext = defaultUri ? extname(defaultUri) : undefined;
|
|
@@ -298,10 +295,10 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
298
295
|
matchingFilter = { name: trim(ext, '.').toUpperCase(), extensions: [trim(ext, '.')] };
|
|
299
296
|
}
|
|
300
297
|
options.filters = coalesce([
|
|
301
|
-
{ name: (
|
|
298
|
+
{ name: ( localize(5637, "All Files")), extensions: ['*'] },
|
|
302
299
|
matchingFilter,
|
|
303
300
|
...registeredLanguageFilters,
|
|
304
|
-
{ name: (
|
|
301
|
+
{ name: ( localize(5638, "No Extension")), extensions: [''] }
|
|
305
302
|
]);
|
|
306
303
|
return options;
|
|
307
304
|
}
|
|
@@ -4,7 +4,7 @@ import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
|
4
4
|
import { AbstractFileDialogService } from './abstractFileDialogService.js';
|
|
5
5
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
6
6
|
import { memoize } from 'vscode/vscode/vs/base/common/decorators';
|
|
7
|
-
import {
|
|
7
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
8
8
|
import { getMediaOrTextMime } from 'vscode/vscode/vs/base/common/mime';
|
|
9
9
|
import { basename } from 'vscode/vscode/vs/base/common/resources';
|
|
10
10
|
import { getActiveWindow, triggerDownload, triggerUpload } from 'vscode/vscode/vs/base/browser/dom';
|
|
@@ -15,7 +15,6 @@ import { Iterable } from 'vscode/vscode/vs/base/common/iterator';
|
|
|
15
15
|
import { WebFileSystemAccess } from 'vscode/vscode/vs/platform/files/browser/webFileSystemAccess';
|
|
16
16
|
import { EmbeddedCodeEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget';
|
|
17
17
|
|
|
18
|
-
const _moduleId = "vs/workbench/services/dialogs/browser/fileDialogService";
|
|
19
18
|
class FileDialogService extends AbstractFileDialogService {
|
|
20
19
|
get fileSystemProvider() {
|
|
21
20
|
return this.fileService.getProvider(Schemas.file);
|
|
@@ -28,11 +27,9 @@ class FileDialogService extends AbstractFileDialogService {
|
|
|
28
27
|
if (this.shouldUseSimplified(schema)) {
|
|
29
28
|
return super.pickFileFolderAndOpenSimplified(schema, options, false);
|
|
30
29
|
}
|
|
31
|
-
throw ( (new Error(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"Can't open folders, try adding a folder to the workspace instead."
|
|
35
|
-
))));
|
|
30
|
+
throw ( (new Error(
|
|
31
|
+
localize(1888, "Can't open folders, try adding a folder to the workspace instead.")
|
|
32
|
+
)));
|
|
36
33
|
}
|
|
37
34
|
addFileSchemaIfNeeded(schema, isFolder) {
|
|
38
35
|
return (schema === Schemas.untitled) ? [Schemas.file]
|
|
@@ -72,11 +69,9 @@ class FileDialogService extends AbstractFileDialogService {
|
|
|
72
69
|
if (this.shouldUseSimplified(schema)) {
|
|
73
70
|
return super.pickFolderAndOpenSimplified(schema, options);
|
|
74
71
|
}
|
|
75
|
-
throw ( (new Error(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"Can't open folders, try adding a folder to the workspace instead."
|
|
79
|
-
))));
|
|
72
|
+
throw ( (new Error(
|
|
73
|
+
localize(1888, "Can't open folders, try adding a folder to the workspace instead.")
|
|
74
|
+
)));
|
|
80
75
|
}
|
|
81
76
|
async pickWorkspaceAndOpen(options) {
|
|
82
77
|
options.availableFileSystems = this.getWorkspaceAvailableFileSystems(options);
|
|
@@ -87,9 +82,8 @@ class FileDialogService extends AbstractFileDialogService {
|
|
|
87
82
|
if (this.shouldUseSimplified(schema)) {
|
|
88
83
|
return super.pickWorkspaceAndOpenSimplified(schema, options);
|
|
89
84
|
}
|
|
90
|
-
throw ( (new Error(
|
|
91
|
-
|
|
92
|
-
1,
|
|
85
|
+
throw ( (new Error(localize(
|
|
86
|
+
1889,
|
|
93
87
|
"Can't open workspaces, try adding a folder to the workspace instead."
|
|
94
88
|
))));
|
|
95
89
|
}
|
|
@@ -191,17 +185,17 @@ class FileDialogService extends AbstractFileDialogService {
|
|
|
191
185
|
}
|
|
192
186
|
const buttons = [
|
|
193
187
|
{
|
|
194
|
-
label: (
|
|
188
|
+
label: ( localize(1890, "&&Open Remote...")),
|
|
195
189
|
run: async () => { await this.commandService.executeCommand('workbench.action.remote.showMenu'); }
|
|
196
190
|
},
|
|
197
191
|
{
|
|
198
|
-
label: (
|
|
192
|
+
label: ( localize(1891, "&&Learn More")),
|
|
199
193
|
run: async () => { await this.openerService.open('https://aka.ms/VSCodeWebLocalFileSystemAccess'); }
|
|
200
194
|
}
|
|
201
195
|
];
|
|
202
196
|
if (context === 'open') {
|
|
203
197
|
buttons.push({
|
|
204
|
-
label: (
|
|
198
|
+
label: ( localize(1892, "Open &&Files...")),
|
|
205
199
|
run: async () => {
|
|
206
200
|
const files = await triggerUpload();
|
|
207
201
|
if (files) {
|
|
@@ -221,10 +215,9 @@ class FileDialogService extends AbstractFileDialogService {
|
|
|
221
215
|
}
|
|
222
216
|
await this.dialogService.prompt({
|
|
223
217
|
type: Severity$1.Warning,
|
|
224
|
-
message: (
|
|
225
|
-
detail: (
|
|
226
|
-
|
|
227
|
-
6,
|
|
218
|
+
message: ( localize(1893, "Opening Local Folders is Unsupported")),
|
|
219
|
+
detail: ( localize(
|
|
220
|
+
1894,
|
|
228
221
|
"Your browser doesn't support opening local folders.\nYou can either open single files or open a remote repository."
|
|
229
222
|
)),
|
|
230
223
|
buttons
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { basename, joinPath, toLocalResource, extname, dirname, addTrailingPathSeparator, removeTrailingPathSeparator, extUriIgnorePathCase, relativePath, hasTrailingPathSeparator, isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
4
4
|
import { deepClone } from 'vscode/vscode/vs/base/common/objects';
|
|
5
5
|
import { FileKind } from 'vscode/vscode/vs/platform/files/common/files';
|
|
@@ -33,11 +33,10 @@ import { IPathService } from 'vscode/vscode/vs/workbench/services/path/common/pa
|
|
|
33
33
|
import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
34
34
|
import { getActiveDocument } from 'vscode/vscode/vs/base/browser/dom';
|
|
35
35
|
|
|
36
|
-
const _moduleId = "vs/workbench/services/dialogs/browser/simpleFileDialog";
|
|
37
36
|
var OpenLocalFileCommand;
|
|
38
37
|
( ((function(OpenLocalFileCommand) {
|
|
39
38
|
OpenLocalFileCommand.ID = 'workbench.action.files.openLocalFile';
|
|
40
|
-
OpenLocalFileCommand.LABEL = (
|
|
39
|
+
OpenLocalFileCommand.LABEL = ( localize(10097, "Open Local File..."));
|
|
41
40
|
function handler() {
|
|
42
41
|
return accessor => {
|
|
43
42
|
const dialogService = accessor.get(IFileDialogService);
|
|
@@ -49,7 +48,7 @@ var OpenLocalFileCommand;
|
|
|
49
48
|
var SaveLocalFileCommand;
|
|
50
49
|
( ((function(SaveLocalFileCommand) {
|
|
51
50
|
SaveLocalFileCommand.ID = 'workbench.action.files.saveLocalFile';
|
|
52
|
-
SaveLocalFileCommand.LABEL = (
|
|
51
|
+
SaveLocalFileCommand.LABEL = ( localize(10098, "Save Local File..."));
|
|
53
52
|
function handler() {
|
|
54
53
|
return accessor => {
|
|
55
54
|
const editorService = accessor.get(IEditorService);
|
|
@@ -65,7 +64,7 @@ var SaveLocalFileCommand;
|
|
|
65
64
|
var OpenLocalFolderCommand;
|
|
66
65
|
( ((function(OpenLocalFolderCommand) {
|
|
67
66
|
OpenLocalFolderCommand.ID = 'workbench.action.files.openLocalFolder';
|
|
68
|
-
OpenLocalFolderCommand.LABEL = (
|
|
67
|
+
OpenLocalFolderCommand.LABEL = ( localize(10099, "Open Local Folder..."));
|
|
69
68
|
function handler() {
|
|
70
69
|
return accessor => {
|
|
71
70
|
const dialogService = accessor.get(IFileDialogService);
|
|
@@ -77,7 +76,7 @@ var OpenLocalFolderCommand;
|
|
|
77
76
|
var OpenLocalFileFolderCommand;
|
|
78
77
|
( ((function(OpenLocalFileFolderCommand) {
|
|
79
78
|
OpenLocalFileFolderCommand.ID = 'workbench.action.files.openLocalFileFolder';
|
|
80
|
-
OpenLocalFileFolderCommand.LABEL = (
|
|
79
|
+
OpenLocalFileFolderCommand.LABEL = ( localize(10100, "Open Local..."));
|
|
81
80
|
function handler() {
|
|
82
81
|
return accessor => {
|
|
83
82
|
const dialogService = accessor.get(IFileDialogService);
|
|
@@ -180,9 +179,8 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
180
179
|
}
|
|
181
180
|
}
|
|
182
181
|
if ((this.scheme !== Schemas.file) && !this.fileService.hasProvider(defaultUri)) {
|
|
183
|
-
this.notificationService.info((
|
|
184
|
-
|
|
185
|
-
4,
|
|
182
|
+
this.notificationService.info(( localize(
|
|
183
|
+
10101,
|
|
186
184
|
'File system provider for {0} is not available.',
|
|
187
185
|
(defaultUri.toString())
|
|
188
186
|
)));
|
|
@@ -256,7 +254,7 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
256
254
|
this.filePickBox.ok = true;
|
|
257
255
|
if ((this.scheme !== Schemas.file) && this.options && this.options.availableFileSystems && (this.options.availableFileSystems.length > 1) && (this.options.availableFileSystems.indexOf(Schemas.file) > -1)) {
|
|
258
256
|
this.filePickBox.customButton = true;
|
|
259
|
-
this.filePickBox.customLabel = (
|
|
257
|
+
this.filePickBox.customLabel = ( localize(10102, 'Show Local'));
|
|
260
258
|
let action;
|
|
261
259
|
if (isSave) {
|
|
262
260
|
action = SaveLocalFileCommand;
|
|
@@ -550,7 +548,7 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
550
548
|
return (await this.updateItems(valueUri)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
|
|
551
549
|
}
|
|
552
550
|
else if (this.endsWithSlash(value)) {
|
|
553
|
-
this.filePickBox.validationMessage = (
|
|
551
|
+
this.filePickBox.validationMessage = ( localize(10103, 'The path does not exist.'));
|
|
554
552
|
this.badPath = value;
|
|
555
553
|
return UpdateResult.InvalidPath;
|
|
556
554
|
}
|
|
@@ -707,7 +705,7 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
707
705
|
prompt.ignoreFocusOut = true;
|
|
708
706
|
prompt.ok = true;
|
|
709
707
|
prompt.customButton = true;
|
|
710
|
-
prompt.customLabel = (
|
|
708
|
+
prompt.customLabel = ( localize(10104, 'Cancel'));
|
|
711
709
|
prompt.value = this.pathFromUri(uri);
|
|
712
710
|
let isResolving = false;
|
|
713
711
|
return (
|
|
@@ -737,7 +735,7 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
737
735
|
}
|
|
738
736
|
async validate(uri) {
|
|
739
737
|
if (uri === undefined) {
|
|
740
|
-
this.filePickBox.validationMessage = (
|
|
738
|
+
this.filePickBox.validationMessage = ( localize(10105, 'Please enter a valid path.'));
|
|
741
739
|
return Promise.resolve(false);
|
|
742
740
|
}
|
|
743
741
|
let stat;
|
|
@@ -750,39 +748,36 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
750
748
|
}
|
|
751
749
|
if (this.requiresTrailing) {
|
|
752
750
|
if (stat && stat.isDirectory) {
|
|
753
|
-
this.filePickBox.validationMessage = (
|
|
751
|
+
this.filePickBox.validationMessage = ( localize(10106, 'The folder already exists. Please use a new file name.'));
|
|
754
752
|
return Promise.resolve(false);
|
|
755
753
|
}
|
|
756
754
|
else if (stat) {
|
|
757
|
-
const message = (
|
|
758
|
-
|
|
759
|
-
10,
|
|
755
|
+
const message = ( localize(
|
|
756
|
+
10107,
|
|
760
757
|
'{0} already exists. Are you sure you want to overwrite it?',
|
|
761
758
|
basename(uri)
|
|
762
759
|
));
|
|
763
760
|
return this.yesNoPrompt(uri, message);
|
|
764
761
|
}
|
|
765
762
|
else if (!(isValidBasename(basename(uri), this.isWindows))) {
|
|
766
|
-
this.filePickBox.validationMessage = (
|
|
763
|
+
this.filePickBox.validationMessage = ( localize(10108, 'Please enter a valid file name.'));
|
|
767
764
|
return Promise.resolve(false);
|
|
768
765
|
}
|
|
769
766
|
else if (!statDirname) {
|
|
770
|
-
const message = (
|
|
771
|
-
|
|
772
|
-
12,
|
|
767
|
+
const message = ( localize(
|
|
768
|
+
10109,
|
|
773
769
|
'The folder {0} does not exist. Would you like to create it?',
|
|
774
770
|
basename(dirname(uri))
|
|
775
771
|
));
|
|
776
772
|
return this.yesNoPrompt(uri, message);
|
|
777
773
|
}
|
|
778
774
|
else if (!statDirname.isDirectory) {
|
|
779
|
-
this.filePickBox.validationMessage = (
|
|
775
|
+
this.filePickBox.validationMessage = ( localize(10110, 'Please enter a path that exists.'));
|
|
780
776
|
return Promise.resolve(false);
|
|
781
777
|
}
|
|
782
778
|
else if (statDirname.readonly) {
|
|
783
|
-
this.filePickBox.validationMessage = (
|
|
784
|
-
|
|
785
|
-
14,
|
|
779
|
+
this.filePickBox.validationMessage = ( localize(
|
|
780
|
+
10111,
|
|
786
781
|
'This folder cannot be used as a save destination. Please choose another folder'
|
|
787
782
|
));
|
|
788
783
|
return Promise.resolve(false);
|
|
@@ -790,19 +785,19 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
790
785
|
}
|
|
791
786
|
else {
|
|
792
787
|
if (!stat) {
|
|
793
|
-
this.filePickBox.validationMessage = (
|
|
788
|
+
this.filePickBox.validationMessage = ( localize(10111, 'Please enter a path that exists.'));
|
|
794
789
|
return Promise.resolve(false);
|
|
795
790
|
}
|
|
796
791
|
else if (uri.path === '/' && this.isWindows) {
|
|
797
|
-
this.filePickBox.validationMessage = (
|
|
792
|
+
this.filePickBox.validationMessage = ( localize(10112, 'Please start the path with a drive letter.'));
|
|
798
793
|
return Promise.resolve(false);
|
|
799
794
|
}
|
|
800
795
|
else if (stat.isDirectory && !this.allowFolderSelection) {
|
|
801
|
-
this.filePickBox.validationMessage = (
|
|
796
|
+
this.filePickBox.validationMessage = ( localize(10113, 'Please select a file.'));
|
|
802
797
|
return Promise.resolve(false);
|
|
803
798
|
}
|
|
804
799
|
else if (!stat.isDirectory && !this.allowFileSelection) {
|
|
805
|
-
this.filePickBox.validationMessage = (
|
|
800
|
+
this.filePickBox.validationMessage = ( localize(10114, 'Please select a folder.'));
|
|
806
801
|
return Promise.resolve(false);
|
|
807
802
|
}
|
|
808
803
|
}
|