update country with russian translation

This commit is contained in:
maxim 2025-02-19 14:46:09 +03:00
parent fbb3865ac1
commit fbf1b443fd
5 changed files with 18 additions and 11 deletions

View File

@ -14,5 +14,12 @@
"submit": "Отправить", "submit": "Отправить",
"create": "Создать", "create": "Создать",
"logout": "Выход" "logout": "Выход"
},
"country": {
"titles": {
"create": "Создать страну",
"edit": "Редактировать страну",
"show": "Показать страну"
}
} }
} }

View File

@ -15,7 +15,7 @@ export const CountryCreate = () => {
<Box component="form" sx={{display: 'flex', flexDirection: 'column'}} autoComplete="off"> <Box component="form" sx={{display: 'flex', flexDirection: 'column'}} autoComplete="off">
<TextField <TextField
{...register('code', { {...register('code', {
required: 'This field is required', required: 'Это поле является обязательным',
})} })}
error={!!(errors as any)?.code} error={!!(errors as any)?.code}
helperText={(errors as any)?.code?.message} helperText={(errors as any)?.code?.message}
@ -28,7 +28,7 @@ export const CountryCreate = () => {
/> />
<TextField <TextField
{...register('name', { {...register('name', {
required: 'This field is required', required: 'Это поле является обязательным',
})} })}
error={!!(errors as any)?.name} error={!!(errors as any)?.name}
helperText={(errors as any)?.name?.message} helperText={(errors as any)?.name?.message}

View File

@ -14,7 +14,7 @@ export const CountryEdit = () => {
<Box component="form" sx={{display: 'flex', flexDirection: 'column'}} autoComplete="off"> <Box component="form" sx={{display: 'flex', flexDirection: 'column'}} autoComplete="off">
<TextField <TextField
{...register('code', { {...register('code', {
required: 'This field is required', required: 'Это поле является обязательным',
})} })}
error={!!(errors as any)?.code} error={!!(errors as any)?.code}
helperText={(errors as any)?.code?.message} helperText={(errors as any)?.code?.message}
@ -22,12 +22,12 @@ export const CountryEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Code'} label={'Код'}
name="code" name="code"
/> />
<TextField <TextField
{...register('name', { {...register('name', {
required: 'This field is required', required: 'Это поле является обязательным',
})} })}
error={!!(errors as any)?.name} error={!!(errors as any)?.name}
helperText={(errors as any)?.name?.message} helperText={(errors as any)?.name?.message}
@ -35,7 +35,7 @@ export const CountryEdit = () => {
fullWidth fullWidth
InputLabelProps={{shrink: true}} InputLabelProps={{shrink: true}}
type="text" type="text"
label={'Name'} label={'Название'}
name="name" name="name"
/> />
</Box> </Box>

View File

@ -9,7 +9,7 @@ export const CountryList = () => {
() => [ () => [
{ {
field: 'code', field: 'code',
headerName: 'Code', headerName: 'Код',
type: 'string', type: 'string',
minWidth: 100, minWidth: 100,
display: 'flex', display: 'flex',
@ -18,14 +18,14 @@ export const CountryList = () => {
}, },
{ {
field: 'name', field: 'name',
headerName: 'Name', headerName: 'Название',
type: 'string', type: 'string',
minWidth: 100, minWidth: 100,
flex: 1, flex: 1,
}, },
{ {
field: 'actions', field: 'actions',
headerName: 'Actions', headerName: 'Действия',
align: 'right', align: 'right',
headerAlign: 'center', headerAlign: 'center',
minWidth: 120, minWidth: 120,

View File

@ -9,8 +9,8 @@ export const CountryShow = () => {
const record = data?.data const record = data?.data
const fields = [ const fields = [
{label: 'Code', data: 'code'}, {label: 'Код', data: 'code'},
{label: 'Name', data: 'name'}, {label: 'Название', data: 'name'},
] ]
return ( return (