mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
onboard built-in debug extensions to l10n (#166300)
This commit is contained in:
committed by
GitHub
parent
0537f30d96
commit
fd7e27f9d3
@@ -149,9 +149,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"vscode-nls": "^5.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "16.x"
|
||||
},
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as util from 'util';
|
||||
import * as nls from 'vscode-nls';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
const PATTERN = 'listening on.* (https?://\\S+|[0-9]+)'; // matches "listening on port 3000" or "Now listening on: https://localhost:5001"
|
||||
const URI_PORT_FORMAT = 'http://localhost:%s';
|
||||
@@ -135,7 +132,7 @@ class ServerReadyDetector extends vscode.Disposable {
|
||||
// verify that format does not contain '%s'
|
||||
const format = args.uriFormat || '';
|
||||
if (format.indexOf('%s') >= 0) {
|
||||
const errMsg = localize('server.ready.nocapture.error', "Format uri ('{0}') uses a substitution placeholder but pattern did not capture anything.", format);
|
||||
const errMsg = vscode.l10n.t("Format uri ('{0}') uses a substitution placeholder but pattern did not capture anything.", format);
|
||||
vscode.window.showErrorMessage(errMsg, { modal: true }).then(_ => undefined);
|
||||
return;
|
||||
}
|
||||
@@ -146,7 +143,7 @@ class ServerReadyDetector extends vscode.Disposable {
|
||||
// verify that format only contains a single '%s'
|
||||
const s = format.split('%s');
|
||||
if (s.length !== 2) {
|
||||
const errMsg = localize('server.ready.placeholder.error', "Format uri ('{0}') must contain exactly one substitution placeholder.", format);
|
||||
const errMsg = vscode.l10n.t("Format uri ('{0}') must contain exactly one substitution placeholder.", format);
|
||||
vscode.window.showErrorMessage(errMsg, { modal: true }).then(_ => undefined);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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==
|
||||
|
||||
Reference in New Issue
Block a user