Adopt l10n for markdown extension (#165448)

For #164438

Also makes our eslint rules understand `vscode.l10n.t(`
This commit is contained in:
Matt Bierner
2022-11-04 01:49:49 -07:00
committed by GitHub
parent e764c5b816
commit cd29f751eb
12 changed files with 62 additions and 78 deletions

View File

@@ -5,7 +5,6 @@
import * as vscode from 'vscode';
import { BaseLanguageClient, LanguageClientOptions, NotebookDocumentSyncRegistrationType } from 'vscode-languageclient';
import * as nls from 'vscode-nls';
import { IMdParser } from '../markdownEngine';
import * as proto from './protocol';
import { looksLikeMarkdownPath, markdownFileExtensions } from '../util/file';
@@ -13,7 +12,6 @@ import { VsCodeMdWorkspace } from './workspace';
import { FileWatcherManager } from './fileWatchingManager';
import { IDisposable } from '../util/dispose';
const localize = nls.loadMessageBundle();
export type LanguageClientConstructor = (name: string, description: string, clientOptions: LanguageClientOptions) => BaseLanguageClient;
@@ -64,7 +62,7 @@ export async function startClient(factory: LanguageClientConstructor, parser: IM
},
};
const client = factory('markdown', localize('markdownServer.name', 'Markdown Language Server'), clientOptions);
const client = factory('markdown', vscode.l10n.t("Markdown Language Server"), clientOptions);
client.registerProposedFeatures();