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

@@ -4,14 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import { Utils } from 'vscode-uri';
import { Command } from '../commandManager';
import { createUriListSnippet, getParentDocumentUri, imageFileExtensions } from '../languageFeatures/dropIntoEditor';
import { coalesce } from '../util/arrays';
import { Schemes } from '../util/schemes';
const localize = nls.loadMessageBundle();
export class InsertLinkFromWorkspace implements Command {
@@ -27,8 +25,8 @@ export class InsertLinkFromWorkspace implements Command {
canSelectFiles: true,
canSelectFolders: false,
canSelectMany: true,
openLabel: localize('insertLink.openLabel', "Insert link"),
title: localize('insertLink.title', "Insert link"),
openLabel: vscode.l10n.t("Insert link"),
title: vscode.l10n.t("Insert link"),
defaultUri: getDefaultUri(activeEditor.document),
});
@@ -50,10 +48,10 @@ export class InsertImageFromWorkspace implements Command {
canSelectFolders: false,
canSelectMany: true,
filters: {
[localize('insertImage.imagesLabel', "Images")]: Array.from(imageFileExtensions)
[vscode.l10n.t("Images")]: Array.from(imageFileExtensions)
},
openLabel: localize('insertImage.openLabel', "Insert image"),
title: localize('insertImage.title', "Insert image"),
openLabel: vscode.l10n.t("Insert image"),
title: vscode.l10n.t("Insert image"),
defaultUri: getDefaultUri(activeEditor.document),
});