diff --git a/extensions/git/src/main.ts b/extensions/git/src/main.ts index f75ed0fef00..d4eddb1ce80 100644 --- a/extensions/git/src/main.ts +++ b/extensions/git/src/main.ts @@ -5,6 +5,8 @@ 'use strict'; +import * as nls from 'vscode-nls'; +const localize = nls.config(process.env.VSCODE_NLS_CONFIG)(); import { ExtensionContext, workspace, window, Disposable, commands, Uri } from 'vscode'; import { findGit, Git, IGit } from './git'; import { Model } from './model'; @@ -16,9 +18,6 @@ import { AutoFetcher } from './autofetch'; import { Askpass } from './askpass'; import { toDisposable } from './util'; import TelemetryReporter from 'vscode-extension-telemetry'; -import * as nls from 'vscode-nls'; - -const localize = nls.config(process.env.VSCODE_NLS_CONFIG)(); async function init(context: ExtensionContext, disposables: Disposable[]): Promise { const { name, version, aiKey } = require(context.asAbsolutePath('./package.json')) as { name: string, version: string, aiKey: string }; diff --git a/extensions/markdown/src/extension.ts b/extensions/markdown/src/extension.ts index c175ffaf939..5e9095c5104 100644 --- a/extensions/markdown/src/extension.ts +++ b/extensions/markdown/src/extension.ts @@ -5,6 +5,8 @@ 'use strict'; +import * as nls from 'vscode-nls'; +const localize = nls.loadMessageBundle(); import * as vscode from 'vscode'; import * as path from 'path'; import TelemetryReporter from 'vscode-extension-telemetry'; @@ -15,8 +17,6 @@ import { ExtensionContentSecurityPolicyArbiter, PreviewSecuritySelector } from ' import { MDDocumentContentProvider, getMarkdownUri, isMarkdownFile } from './previewContentProvider'; import { TableOfContentsProvider } from './tableOfContentsProvider'; import { Logger } from "./logger"; -import * as nls from 'vscode-nls'; -const localize = nls.loadMessageBundle(); interface IPackageInfo { name: string; diff --git a/extensions/merge-conflict/src/extension.ts b/extensions/merge-conflict/src/extension.ts index 33c996955db..3168d67ab42 100644 --- a/extensions/merge-conflict/src/extension.ts +++ b/extensions/merge-conflict/src/extension.ts @@ -3,6 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as nls from 'vscode-nls'; +nls.config(process.env.VSCODE_NLS_CONFIG)(); import * as vscode from 'vscode'; import MergeConflictServices from './services'; diff --git a/extensions/php/src/phpMain.ts b/extensions/php/src/phpMain.ts index dbf3d4462e5..96f3c3bd1f1 100644 --- a/extensions/php/src/phpMain.ts +++ b/extensions/php/src/phpMain.ts @@ -4,15 +4,14 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import * as nls from 'vscode-nls'; +nls.config({ locale: vscode.env.language }); import PHPCompletionItemProvider from './features/completionItemProvider'; import PHPHoverProvider from './features/hoverProvider'; import PHPSignatureHelpProvider from './features/signatureHelpProvider'; import PHPValidationProvider from './features/validationProvider'; import * as vscode from 'vscode'; -import * as nls from 'vscode-nls'; -nls.config({ locale: vscode.env.language }); - export function activate(context: vscode.ExtensionContext): any { let validator = new PHPValidationProvider(context.workspaceState);