Adopt l10n for gulp (#165543)

For #164438
This commit is contained in:
Matt Bierner 2022-11-04 12:34:59 -07:00 committed by GitHub
parent 20a4164cc4
commit 6ef8bb8a6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 13 deletions

View file

@ -16,9 +16,7 @@
"compile": "gulp compile-extension:gulp",
"watch": "gulp watch-extension:gulp"
},
"dependencies": {
"vscode-nls": "^5.2.0"
},
"dependencies": {},
"devDependencies": {
"@types/node": "16.x"
},

View file

@ -7,9 +7,7 @@ import * as path from 'path';
import * as fs from 'fs';
import * as cp from 'child_process';
import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle();
type AutoDetect = 'on' | 'off';
@ -80,8 +78,8 @@ function getOutputChannel(): vscode.OutputChannel {
}
function showError() {
vscode.window.showWarningMessage(localize('gulpTaskDetectError', 'Problem finding gulp tasks. See the output for more information.'),
localize('gulpShowOutput', 'Go to output')).then((choice) => {
vscode.window.showWarningMessage(vscode.l10n.t("Problem finding gulp tasks. See the output for more information."),
vscode.l10n.t("Go to output")).then((choice) => {
if (choice !== undefined) {
_channel.show(true);
}
@ -256,7 +254,7 @@ class FolderDetector {
if (err.stdout) {
channel.appendLine(err.stdout);
}
channel.appendLine(localize('execFailed', 'Auto detecting gulp for folder {0} failed with error: {1}', this.workspaceFolder.name, err.error ? err.error.toString() : 'unknown'));
channel.appendLine(vscode.l10n.t("Auto detecting gulp for folder {0} failed with error: {1}', this.workspaceFolder.name, err.error ? err.error.toString() : 'unknown"));
showError();
return emptyTasks;
}

View file

@ -6,8 +6,3 @@
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
vscode-nls@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.2.0.tgz#3cb6893dd9bd695244d8a024bdf746eea665cc3f"
integrity sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng==