mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-07-07 02:11:25 +02:00
Updated localization
This commit is contained in:
@@ -80,6 +80,7 @@ export const Item: React.FunctionComponent<IItemProps> = ({
|
||||
className={`group flex flex-col items-start content-start h-full w-full text-left shadow-md dark:shadow-none hover:shadow-xl border rounded bg-[var(--vscode-sideBar-background)] hover:bg-[var(--vscode-list-hoverBackground)] text-[var(--vscode-sideBarTitle-foreground)] border-[var(--frontmatter-border)]`}
|
||||
>
|
||||
<button
|
||||
title={escapedTitle ? l10n.t(LocalizationKey.commonOpenWithValue, escapedTitle) : l10n.t(LocalizationKey.commonOpen)}
|
||||
onClick={openFile}
|
||||
className={`relative h-36 w-full overflow-hidden border-b cursor-pointer border-[var(--frontmatter-border)]
|
||||
}`}
|
||||
@@ -131,7 +132,10 @@ export const Item: React.FunctionComponent<IItemProps> = ({
|
||||
onOpen={openFile}
|
||||
/>
|
||||
|
||||
<button onClick={openFile} className={`text-left block`}>
|
||||
<button
|
||||
title={escapedTitle ? l10n.t(LocalizationKey.commonOpenWithValue, escapedTitle) : l10n.t(LocalizationKey.commonOpen)}
|
||||
onClick={openFile}
|
||||
className={`text-left block`}>
|
||||
{
|
||||
titleHtml ? (
|
||||
<div dangerouslySetInnerHTML={{ __html: titleHtml }} />
|
||||
@@ -143,7 +147,10 @@ export const Item: React.FunctionComponent<IItemProps> = ({
|
||||
}
|
||||
</button>
|
||||
|
||||
<button onClick={openFile} className={`text-left block`}>
|
||||
<button
|
||||
title={escapedTitle ? l10n.t(LocalizationKey.commonOpenWithValue, escapedTitle) : l10n.t(LocalizationKey.commonOpen)}
|
||||
onClick={openFile}
|
||||
className={`text-left block`}>
|
||||
{
|
||||
descriptionHtml ? (
|
||||
<div dangerouslySetInnerHTML={{ __html: descriptionHtml }} />
|
||||
@@ -197,7 +204,9 @@ export const Item: React.FunctionComponent<IItemProps> = ({
|
||||
className={`px-5 cursor-pointer w-full text-left grid grid-cols-12 gap-x-4 sm:gap-x-6 xl:gap-x-8 py-2 border-b hover:bg-opacity-70 border-[var(--frontmatter-border)] hover:bg-[var(--vscode-sideBar-background)]`}
|
||||
>
|
||||
<div className="col-span-8 font-bold truncate flex items-center space-x-4">
|
||||
<button title={`Open: ${escapedTitle}`} onClick={openFile}>
|
||||
<button
|
||||
title={escapedTitle ? l10n.t(LocalizationKey.commonOpenWithValue, escapedTitle) : l10n.t(LocalizationKey.commonOpen)}
|
||||
onClick={openFile}>
|
||||
{escapedTitle}
|
||||
</button>
|
||||
|
||||
|
||||
@@ -358,7 +358,7 @@ export const Item: React.FunctionComponent<IItemProps> = ({
|
||||
} flex items-center justify-center`}
|
||||
>
|
||||
<button
|
||||
title="Insert image"
|
||||
title={l10n.t(LocalizationKey.dashboardMediaItemButtomInsertImage)}
|
||||
className={`h-1/3 text-white hover:text-[var(--vscode-button-background)]`}
|
||||
onClick={insertIntoArticle}
|
||||
>
|
||||
@@ -368,7 +368,7 @@ export const Item: React.FunctionComponent<IItemProps> = ({
|
||||
{viewData?.data?.position && mediaSnippets.length > 0 && (
|
||||
<div className={`h-full w-1/3 flex items-center justify-center`}>
|
||||
<button
|
||||
title="Insert snippet"
|
||||
title={l10n.t(LocalizationKey.dashboardMediaItemButtomInsertSnippet)}
|
||||
className={`h-1/3 text-white hover:text-[var(--vscode-button-background)]`}
|
||||
onClick={insertSnippet}
|
||||
>
|
||||
|
||||
@@ -3,6 +3,8 @@ import { useRecoilValue } from 'recoil';
|
||||
import { SettingsSelector } from '../../state';
|
||||
import { CogIcon } from '@heroicons/react/24/solid';
|
||||
import { NavigationType } from '../../models';
|
||||
import * as l10n from '@vscode/l10n';
|
||||
import { LocalizationKey } from '../../../localization';
|
||||
|
||||
export interface ISettingsLinkProps {
|
||||
onNavigate: (navigationType: NavigationType) => void;
|
||||
@@ -20,11 +22,11 @@ export const SettingsLink: React.FunctionComponent<ISettingsLinkProps> = ({
|
||||
return (
|
||||
<button
|
||||
className="flex items-center mr-4 hover:text-[var(--vscode-textLink-activeForeground)]"
|
||||
title={`Settings`}
|
||||
title={l10n.t(LocalizationKey.commonSettings)}
|
||||
onClick={() => onNavigate(NavigationType.Settings)}
|
||||
>
|
||||
<CogIcon className="h-4 w-4" />
|
||||
<span className='sr-only'>Settings</span>
|
||||
<span className='sr-only'>{l10n.t(LocalizationKey.commonSettings)}</span>
|
||||
</button>
|
||||
);
|
||||
};
|
||||
@@ -40,7 +40,7 @@ export const NewForm: React.FunctionComponent<INewFormProps> = ({
|
||||
<label htmlFor={`title`} className="block text-sm font-medium capitalize">
|
||||
{l10n.t(LocalizationKey.commonTitle)}
|
||||
{' '}
|
||||
<span className={`text-[var(--vscode-editorError-foreground)]`} title="Required field">
|
||||
<span className={`text-[var(--vscode-editorError-foreground)]`} title={l10n.t(LocalizationKey.fieldRequired)}>
|
||||
*
|
||||
</span>
|
||||
</label>
|
||||
@@ -72,7 +72,7 @@ export const NewForm: React.FunctionComponent<INewFormProps> = ({
|
||||
<label htmlFor={`snippet`} className="block text-sm font-medium capitalize">
|
||||
{l10n.t(LocalizationKey.dashboardSnippetsViewNewFormSnippetInputSnippetLabel)}
|
||||
{' '}
|
||||
<span className="text-[var(--vscode-editorError-foreground)]" title="Required field">
|
||||
<span className="text-[var(--vscode-editorError-foreground)]" title={l10n.t(LocalizationKey.fieldRequired)}>
|
||||
*
|
||||
</span>
|
||||
</label>
|
||||
|
||||
@@ -82,13 +82,13 @@ export const TaxonomyActions: React.FunctionComponent<ITaxonomyActionsProps> = (
|
||||
)}
|
||||
|
||||
<LinkButton
|
||||
title={`Tag content`}
|
||||
title={l10n.t(LocalizationKey.dashboardTaxonomyViewButtonTagTitle)}
|
||||
onClick={onTagging}>
|
||||
<div className='relative'>
|
||||
<TagIcon className={`w-4 h-4`} aria-hidden={true} />
|
||||
<PlusCircleIcon className={`w-3 h-3 absolute left-[-3px] bottom-[-4px] border-1 bg-[var(--vscode-editor-background)] rounded-full`} aria-hidden={true} />
|
||||
</div>
|
||||
<span className="sr-only">{l10n.t(LocalizationKey.commonEdit)}</span>
|
||||
<span className="sr-only">{l10n.t(LocalizationKey.dashboardTaxonomyViewButtonTagTitle)}</span>
|
||||
</LinkButton>
|
||||
|
||||
<LinkButton
|
||||
|
||||
@@ -143,6 +143,14 @@ export enum LocalizationKey {
|
||||
* Back
|
||||
*/
|
||||
commonBack = 'common.back',
|
||||
/**
|
||||
* Open
|
||||
*/
|
||||
commonOpen = 'common.open',
|
||||
/**
|
||||
* Open: {0}
|
||||
*/
|
||||
commonOpenWithValue = 'common.openWithValue',
|
||||
/**
|
||||
* Loading content
|
||||
*/
|
||||
@@ -675,6 +683,14 @@ export enum LocalizationKey {
|
||||
* Create new folder
|
||||
*/
|
||||
dashboardMediaFolderCreationFolderCreate = 'dashboard.media.folderCreation.folder.create',
|
||||
/**
|
||||
* Insert image
|
||||
*/
|
||||
dashboardMediaItemButtomInsertImage = 'dashboard.media.item.buttom.insert.image',
|
||||
/**
|
||||
* Insert snippet
|
||||
*/
|
||||
dashboardMediaItemButtomInsertSnippet = 'dashboard.media.item.buttom.insert.snippet',
|
||||
/**
|
||||
* Insert image for your "{0}" field
|
||||
*/
|
||||
@@ -979,6 +995,10 @@ export enum LocalizationKey {
|
||||
* Add {0} to taxonomy settings
|
||||
*/
|
||||
dashboardTaxonomyViewButtonAddTitle = 'dashboard.taxonomyView.button.add.title',
|
||||
/**
|
||||
* Tag content
|
||||
*/
|
||||
dashboardTaxonomyViewButtonTagTitle = 'dashboard.taxonomyView.button.tag.title',
|
||||
/**
|
||||
* Edit {0}
|
||||
*/
|
||||
@@ -1131,6 +1151,10 @@ export enum LocalizationKey {
|
||||
* Publish changes
|
||||
*/
|
||||
panelGitGitActionTitle = 'panel.git.gitAction.title',
|
||||
/**
|
||||
* Select branch
|
||||
*/
|
||||
panelGitGitActionBranchSelect = 'panel.git.gitAction.branch.select',
|
||||
/**
|
||||
* Commit message
|
||||
*/
|
||||
|
||||
@@ -128,7 +128,7 @@ export const GitAction: React.FunctionComponent<IGitActionProps> = ({
|
||||
|
||||
<button
|
||||
className='inline-flex items-center w-auto p-0 bg-inherit text-[var(--vscode-sideBarTitle-foreground)] hover:bg-inherit hover:text-[var(--vscode-sideBarTitle-foreground-hover)]'
|
||||
title='Select Branch'
|
||||
title={l10n.t(LocalizationKey.panelGitGitActionBranchSelect)}
|
||||
onClick={selectBranch}>
|
||||
<BranchIcon className='w-4 h-4' aria-hidden="true" />
|
||||
<span className='ml-1'>{crntBanch}</span>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import * as React from 'react';
|
||||
import { PencilIcon, ChevronUpDownIcon, TrashIcon } from '@heroicons/react/24/outline';
|
||||
import { SortableHandle, SortableElement } from 'react-sortable-hoc';
|
||||
import * as l10n from '@vscode/l10n';
|
||||
import { LocalizationKey } from '../../../localization';
|
||||
|
||||
export interface IJsonFieldRecordProps {
|
||||
id: number;
|
||||
index: number;
|
||||
@@ -30,20 +33,20 @@ export const JsonFieldRecord = SortableElement(
|
||||
|
||||
<div>
|
||||
<button
|
||||
title="Edit record"
|
||||
title={l10n.t(LocalizationKey.commonEdit)}
|
||||
className="json_data__list__button json_data__list__button_edit"
|
||||
onClick={() => onEdit(id)}
|
||||
>
|
||||
<PencilIcon className="json_data__list__button_icon" />
|
||||
<span className="sr-only">Edit</span>
|
||||
<span className="sr-only">{l10n.t(LocalizationKey.commonEdit)}</span>
|
||||
</button>
|
||||
<button
|
||||
title="Delete record"
|
||||
title={l10n.t(LocalizationKey.commonDelete)}
|
||||
className="json_data__list__button json_data__list__button_delete"
|
||||
onClick={() => onDelete(id)}
|
||||
>
|
||||
<TrashIcon className="json_data__list__button_icon" />
|
||||
<span className="sr-only">Delete</span>
|
||||
<span className="sr-only">{l10n.t(LocalizationKey.commonDelete)}</span>
|
||||
</button>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -3,6 +3,9 @@ import * as React from 'react';
|
||||
import { VsLabel } from '../VscodeComponents';
|
||||
import { JsonFieldRecord } from '.';
|
||||
import { SortableContainer, SortEnd } from 'react-sortable-hoc';
|
||||
import * as l10n from '@vscode/l10n';
|
||||
import { LocalizationKey } from '../../../localization';
|
||||
|
||||
export interface IJsonFieldRecordsProps {
|
||||
records: any[];
|
||||
selectedIndex: number | null;
|
||||
@@ -37,7 +40,7 @@ export const JsonFieldRecords = ({
|
||||
<span style={{ lineHeight: '16px' }}>Records</span>
|
||||
</div>
|
||||
|
||||
<button title="Add new record" className="json_data__list__button" onClick={onAdd}>
|
||||
<button title={l10n.t(LocalizationKey.commonAdd)} className="json_data__list__button" onClick={onAdd}>
|
||||
<PlusIcon style={{ width: '16px', height: '16px' }} />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user