Files
vscode-extension-samples/i18n-sample/src/extension.ts
Nick Chen ff96d2a669 Initial version of i18n-sample
To keep things simple, this doesn't use the nls-dev package. I think this demystifies a lot of things when you see what is actually going on behind the scenes.
2017-11-06 14:36:22 +01:00

28 lines
958 B
TypeScript

/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import * as nls from 'vscode-nls';
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)();
import * as vscode from 'vscode';
import { sayByeCommand } from './command/sayBye';
export function activate(context: vscode.ExtensionContext) {
const helloCmd = vscode.commands.registerCommand('extension.sayHello', () => {
const message = localize('sayHello.text', 'Hello')
vscode.window.showInformationMessage(message);
});
const byeCmd = vscode.commands.registerCommand(
'extension.sayBye',
sayByeCommand
);
context.subscriptions.push(helloCmd, byeCmd);
}
export function deactivate() {
}