Adopt l10n for simple-browser (#165529)

For #164438
This commit is contained in:
Matt Bierner
2022-11-04 11:15:23 -07:00
committed by GitHub
parent 10dc1a34b5
commit 3ca015cebd
4 changed files with 10 additions and 21 deletions

View File

@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import { SimpleBrowserManager } from './simpleBrowserManager';
import { SimpleBrowserView } from './simpleBrowserView';
@@ -13,8 +12,6 @@ declare class URL {
hostname: string;
}
const localize = nls.loadMessageBundle();
const openApiCommand = 'simpleBrowser.api.open';
const showCommand = 'simpleBrowser.show';
@@ -48,8 +45,8 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(vscode.commands.registerCommand(showCommand, async (url?: string) => {
if (!url) {
url = await vscode.window.showInputBox({
placeHolder: localize('simpleBrowser.show.placeholder', "https://example.com"),
prompt: localize('simpleBrowser.show.prompt', "Enter url to visit")
placeHolder: vscode.l10n.t("https://example.com"),
prompt: vscode.l10n.t("Enter url to visit")
});
}
@@ -84,7 +81,7 @@ export function activate(context: vscode.ExtensionContext) {
}
}, {
schemes: ['http', 'https'],
label: localize('openTitle', "Open in simple browser"),
label: vscode.l10n.t("Open in simple browser"),
}));
}