fix: versionCount was broken & other i18n improvements (#1450)
This commit is contained in:
@@ -51,6 +51,8 @@ const SortableMultiValueLabel = SortableHandle((props) => <components.MultiValue
|
||||
const SortableSelect = SortableContainer(Select) as React.ComponentClass<SelectProps<Value, true> & SortableContainerProps>;
|
||||
|
||||
const ReactSelect: React.FC<Props> = (props) => {
|
||||
const { t, i18n } = useTranslation();
|
||||
|
||||
const {
|
||||
className,
|
||||
showError = false,
|
||||
@@ -58,7 +60,7 @@ const ReactSelect: React.FC<Props> = (props) => {
|
||||
onChange,
|
||||
value,
|
||||
disabled = false,
|
||||
placeholder,
|
||||
placeholder = t('general:selectValue'),
|
||||
isSearchable = true,
|
||||
isClearable,
|
||||
isMulti,
|
||||
@@ -66,8 +68,6 @@ const ReactSelect: React.FC<Props> = (props) => {
|
||||
filterOption = undefined,
|
||||
} = props;
|
||||
|
||||
const { i18n } = useTranslation();
|
||||
|
||||
const classes = [
|
||||
className,
|
||||
'react-select',
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Props } from './types';
|
||||
|
||||
import './index.scss';
|
||||
|
||||
const baseClass = 'condition-value-text';
|
||||
|
||||
const Text: React.FC<Props> = ({ onChange, value }) => (
|
||||
<input
|
||||
placeholder="Enter a value"
|
||||
className={baseClass}
|
||||
type="text"
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
value={value || ''}
|
||||
/>
|
||||
);
|
||||
const Text: React.FC<Props> = ({ onChange, value }) => {
|
||||
const { t } = useTranslation('general');
|
||||
return (
|
||||
<input
|
||||
placeholder={t('enterAValue')}
|
||||
className={baseClass}
|
||||
type="text"
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
value={value || ''}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default Text;
|
||||
|
||||
@@ -111,7 +111,7 @@ const Login: React.FC = () => {
|
||||
required
|
||||
/>
|
||||
<Link to={`${admin}/forgot`}>
|
||||
{t('forgotPassword')}
|
||||
{t('forgotPasswordQuestion')}
|
||||
</Link>
|
||||
<FormSubmit>{t('login')}</FormSubmit>
|
||||
</Form>
|
||||
|
||||
@@ -177,7 +177,7 @@ const Versions: React.FC<Props> = ({ collection, global }) => {
|
||||
<Eyebrow />
|
||||
<Gutter className={`${baseClass}__wrap`}>
|
||||
<header className={`${baseClass}__header`}>
|
||||
<div className={`${baseClass}__intro`}>Showing versions for:</div>
|
||||
<div className={`${baseClass}__intro`}>{t('showingVersionsFor')}</div>
|
||||
{useIDLabel && (
|
||||
<IDLabel id={doc?.id} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user