mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-07 09:23:00 +02:00
Remove obsolete translation strings
This commit is contained in:
@@ -465,8 +465,6 @@
|
||||
|
||||
"panel.viewPanel.mediaInsert": "Continue in the media dashboard to select the image you want to insert.",
|
||||
|
||||
"commands.article.notification.noTaxonomy": "No {0} configured.",
|
||||
"commands.article.quickPick.placeholder": "Select your {0} to insert.",
|
||||
"commands.article.setDate.error": "Something failed while parsing the date format. Check your \"{0}\" setting.",
|
||||
"commands.article.updateSlug.error": "Failed to rename file: {0}",
|
||||
|
||||
@@ -638,7 +636,6 @@
|
||||
"helpers.questions.contentTitle.titleInput.warning": "You did not specify a title for your content.",
|
||||
"helpers.questions.selectContentFolder.quickPick.title": "Select a folder",
|
||||
"helpers.questions.selectContentFolder.quickPick.placeholder": "Select where you want to create your content",
|
||||
"helpers.questions.selectContentFolder.quickPick.noFolders.warning": "No page folders were configured.",
|
||||
"helpers.questions.selectContentFolder.quickPick.noSelection.warning": "You didn't select a place where you wanted to create your content.",
|
||||
"helpers.questions.selectContentType.noContentType.warning": "No content types found. Please create a content type first.",
|
||||
"helpers.questions.selectContentType.quickPick.title": "Content type",
|
||||
|
||||
@@ -33,80 +33,6 @@ import * as l10n from '@vscode/l10n';
|
||||
import { LocalizationKey } from '../localization';
|
||||
|
||||
export class Article {
|
||||
/**
|
||||
* Insert taxonomy
|
||||
*
|
||||
* @param type
|
||||
*/
|
||||
public static async insert(type: TaxonomyType) {
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
if (!editor) {
|
||||
return;
|
||||
}
|
||||
|
||||
const article = ArticleHelper.getCurrent();
|
||||
|
||||
if (!article) {
|
||||
return;
|
||||
}
|
||||
|
||||
let options: vscode.QuickPickItem[] = [];
|
||||
const matterProp: string = type === TaxonomyType.Tag ? 'tags' : 'categories';
|
||||
|
||||
// Add the selected options to the options array
|
||||
if (article.data[matterProp]) {
|
||||
const propData = article.data[matterProp];
|
||||
if (propData && propData.length > 0) {
|
||||
options = [...propData]
|
||||
.filter((p) => p)
|
||||
.map(
|
||||
(p) =>
|
||||
({
|
||||
label: p,
|
||||
picked: true
|
||||
} as vscode.QuickPickItem)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Add all the known options to the selection list
|
||||
const crntOptions = (await TaxonomyHelper.get(type)) || [];
|
||||
if (crntOptions && crntOptions.length > 0) {
|
||||
for (const crntOpt of crntOptions) {
|
||||
if (!options.find((o) => o.label === crntOpt)) {
|
||||
options.push({
|
||||
label: crntOpt
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (options.length === 0) {
|
||||
Notifications.info(
|
||||
l10n.t(
|
||||
LocalizationKey.commandsArticleNotificationNoTaxonomy,
|
||||
type === TaxonomyType.Tag ? 'tags' : 'categories'
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const selectedOptions = await vscode.window.showQuickPick(options, {
|
||||
placeHolder: l10n.t(
|
||||
LocalizationKey.commandsArticleQuickPickPlaceholder,
|
||||
type === TaxonomyType.Tag ? 'tags' : 'categories'
|
||||
),
|
||||
canPickMany: true,
|
||||
ignoreFocusOut: true
|
||||
});
|
||||
|
||||
if (selectedOptions) {
|
||||
article.data[matterProp] = selectedOptions.map((o) => o.label);
|
||||
}
|
||||
|
||||
ArticleHelper.update(editor, article);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the article date
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,7 @@ export const ActionMenuButton: React.FunctionComponent<IActionMenuButtonProps> =
|
||||
return (
|
||||
<Menu.Button
|
||||
ref={ref || null}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
onClick={(e: React.MouseEvent<HTMLButtonElement>) => e.stopPropagation()}
|
||||
disabled={disabled}
|
||||
className={`group inline-flex justify-center text-sm font-medium ${getColors(
|
||||
'text-vulcan-400 hover:text-vulcan-600 dark:text-gray-400 dark:hover:text-whisper-600',
|
||||
|
||||
@@ -142,9 +142,7 @@ export class Questions {
|
||||
} else if (folders.length === 1) {
|
||||
selectedFolder = folders[0].title;
|
||||
} else {
|
||||
Notifications.warning(
|
||||
l10n.t(LocalizationKey.helpersQuestionsSelectContentFolderQuickPickNoFoldersWarning)
|
||||
);
|
||||
// When no page folders are found, the welcome dashboard is shown
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1480,14 +1480,6 @@ export enum LocalizationKey {
|
||||
* Continue in the media dashboard to select the image you want to insert.
|
||||
*/
|
||||
panelViewPanelMediaInsert = 'panel.viewPanel.mediaInsert',
|
||||
/**
|
||||
* No {0} configured.
|
||||
*/
|
||||
commandsArticleNotificationNoTaxonomy = 'commands.article.notification.noTaxonomy',
|
||||
/**
|
||||
* Select your {0} to insert.
|
||||
*/
|
||||
commandsArticleQuickPickPlaceholder = 'commands.article.quickPick.placeholder',
|
||||
/**
|
||||
* Something failed while parsing the date format. Check your "{0}" setting.
|
||||
*/
|
||||
@@ -2092,10 +2084,6 @@ export enum LocalizationKey {
|
||||
* Select where you want to create your content
|
||||
*/
|
||||
helpersQuestionsSelectContentFolderQuickPickPlaceholder = 'helpers.questions.selectContentFolder.quickPick.placeholder',
|
||||
/**
|
||||
* No page folders were configured.
|
||||
*/
|
||||
helpersQuestionsSelectContentFolderQuickPickNoFoldersWarning = 'helpers.questions.selectContentFolder.quickPick.noFolders.warning',
|
||||
/**
|
||||
* You didn't select a place where you wanted to create your content.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user