mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-07-06 01:41:48 +02:00
Localization updates
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import * as React from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import './LabelField.css';
|
||||
import * as l10n from '@vscode/l10n';
|
||||
import { LocalizationKey } from '../../localization';
|
||||
|
||||
export interface ILabelFieldProps {
|
||||
id: string;
|
||||
@@ -17,7 +19,7 @@ export const LabelField: React.FunctionComponent<ILabelFieldProps> = ({
|
||||
<label className="autoform__label" htmlFor={id}>
|
||||
{label}
|
||||
{required && (
|
||||
<span title="Required field" className="autoform__label__required">
|
||||
<span title={l10n.t(LocalizationKey.fieldRequired)} className="autoform__label__required">
|
||||
*
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -2,6 +2,8 @@ import { Ref } from 'react';
|
||||
import * as React from 'react';
|
||||
import { HTMLFieldProps, connectField, filterDOMProps } from 'uniforms';
|
||||
import { LabelField } from './LabelField';
|
||||
import * as l10n from '@vscode/l10n';
|
||||
import { LocalizationKey } from '../../localization';
|
||||
|
||||
export type UnknownFieldProps = HTMLFieldProps<
|
||||
string,
|
||||
@@ -27,7 +29,7 @@ function UnknownField({
|
||||
<div {...filterDOMProps(props)}>
|
||||
<LabelField label={label} id={id} required={props.required} />
|
||||
|
||||
<div className={`text-[var(--vscode-errorForeground)]`}>Unknown field</div>
|
||||
<div className={`text-[var(--vscode-errorForeground)]`}>{l10n.t(LocalizationKey.fieldUnknown)}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user