Update translate

This commit is contained in:
Gregory Lirent 2024-04-20 22:52:08 +03:00
parent f2f096d8a5
commit 7c08f846a5
Signed by: lirent
GPG Key ID: F616BE337EFFEE77

View File

@ -54,7 +54,7 @@ const dateFormatter = v => {
return `${year}-${month}-${day}T${hour}:${minute}`; return `${year}-${month}-${day}T${hour}:${minute}`;
}; };
const registrationTokenFilters = [<BooleanInput source="valid" alwaysOn />]; const registrationTokenFilters = [<BooleanInput label="resources.registration_tokens.fields.valid" source="valid" alwaysOn />];
export const RegistrationTokenList = props => ( export const RegistrationTokenList = props => (
<List <List
@ -65,11 +65,12 @@ export const RegistrationTokenList = props => (
perPage={500} perPage={500}
> >
<Datagrid rowClick="edit"> <Datagrid rowClick="edit">
<TextField source="token" sortable={false} /> <TextField label="resources.registration_tokens.fields.token" source="token" sortable={false} />
<NumberField source="uses_allowed" sortable={false} /> <NumberField label="resources.registration_tokens.fields.uses_allowed" source="uses_allowed" sortable={false} />
<NumberField source="pending" sortable={false} /> <NumberField label="resources.registration_tokens.fields.pending" source="pending" sortable={false} />
<NumberField source="completed" sortable={false} /> <NumberField label="resources.registration_tokens.fields.completed" source="completed" sortable={false} />
<DateField <DateField
label="resources.registration_tokens.fields.expiry_time"
source="expiry_time" source="expiry_time"
showTime showTime
options={date_format} options={date_format}
@ -90,23 +91,29 @@ export const RegistrationTokenCreate = props => (
} }
> >
<TextInput <TextInput
label="resources.registration_tokens.fields.token"
source="token" source="token"
autoComplete="off" autoComplete="off"
validate={validateToken} validate={validateToken}
resettable resettable
/> />
<NumberInput <NumberInput
label="resources.registration_tokens.fields.length"
source="length" source="length"
validate={validateLength} validate={validateLength}
helperText="resources.registration_tokens.helper.length" helperText="resources.registration_tokens.helper.length"
step={1} step={1}
/> />
<NumberInput <NumberInput
label="resources.registration_tokens.fields.uses_allowed"
source="uses_allowed" source="uses_allowed"
validate={validateUsesAllowed} validate={validateUsesAllowed}
step={1} step={1}
/> />
<DateTimeInput source="expiry_time" parse={dateParser} /> <DateTimeInput
label="resources.registration_tokens.fields.expiry_time"
source="expiry_time"
parse={dateParser} />
</SimpleForm> </SimpleForm>
</Create> </Create>
); );
@ -114,15 +121,17 @@ export const RegistrationTokenCreate = props => (
export const RegistrationTokenEdit = props => ( export const RegistrationTokenEdit = props => (
<Edit {...props}> <Edit {...props}>
<SimpleForm> <SimpleForm>
<TextInput source="token" disabled /> <TextInput label="resources.registration_tokens.fields.token" source="token" disabled />
<NumberInput source="pending" disabled /> <NumberInput label="resources.registration_tokens.fields.pending" source="pending" disabled />
<NumberInput source="completed" disabled /> <NumberInput label="resources.registration_tokens.fields.completed" source="completed" disabled />
<NumberInput <NumberInput
label="resources.registration_tokens.fields.uses_allowed"
source="uses_allowed" source="uses_allowed"
validate={validateUsesAllowed} validate={validateUsesAllowed}
step={1} step={1}
/> />
<DateTimeInput <DateTimeInput
label="resources.registration_tokens.fields.expiry_time"
source="expiry_time" source="expiry_time"
parse={dateParser} parse={dateParser}
format={dateFormatter} format={dateFormatter}