diff --git a/components/auth/footer.tsx b/components/auth/footer.tsx index 87ac74f..34c9405 100644 --- a/components/auth/footer.tsx +++ b/components/auth/footer.tsx @@ -22,7 +22,7 @@ const AuthFooterInner: React.FC = props => { } return ( -
= props => { Hi, {props.me.username} , -
+ ) } diff --git a/components/form/admin/self.notifications.tab.tsx b/components/form/admin/self.notifications.tab.tsx index f625d12..8b6c8b9 100644 --- a/components/form/admin/self.notifications.tab.tsx +++ b/components/form/admin/self.notifications.tab.tsx @@ -67,6 +67,7 @@ export const SelfNotificationsTab: React.FC = props => { message: 'Please provide a Template', }, ]} + extra={'You can also use MJML to create your email templates'} > diff --git a/components/form/admin/submission.values.tsx b/components/form/admin/submission.values.tsx index 0da506a..bf86584 100644 --- a/components/form/admin/submission.values.tsx +++ b/components/form/admin/submission.values.tsx @@ -1,6 +1,7 @@ import {Descriptions, Table} from 'antd' import {ColumnsType} from 'antd/lib/table/interface' import React from 'react' +import {useTranslation} from 'react-i18next' import { AdminPagerSubmissionEntryFieldQueryData, AdminPagerSubmissionEntryQueryData, @@ -13,9 +14,11 @@ interface Props { } export const SubmissionValues: React.FC = props => { + const { t } = useTranslation() + const columns: ColumnsType = [ { - title: 'Field', + title: t('submission:field'), render: (row: AdminPagerSubmissionEntryFieldQueryData) => { if (row.field) { @@ -26,7 +29,7 @@ export const SubmissionValues: React.FC = props => { } }, { - title: 'Value', + title: t('submission:value'), render: row => { try { const data = JSON.parse(row.value) @@ -41,11 +44,11 @@ export const SubmissionValues: React.FC = props => { return (
- - {props.submission.geoLocation.country} - {props.submission.geoLocation.city} - {props.submission.device.type} - {props.submission.device.name} + + {props.submission.geoLocation.country} + {props.submission.geoLocation.city} + {props.submission.device.type} + {props.submission.device.name} = ({field, form}) => { + const { t } = useTranslation() + return (
e ? e.format('YYYY-MM-DD') : undefined} @@ -18,7 +21,7 @@ export const DateType: React.FC = ({field, form}) => { /> e.format('YYYY-MM-DD')} @@ -28,7 +31,7 @@ export const DateType: React.FC = ({field, form}) => { e.format('YYYY-MM-DD')} diff --git a/components/form/admin/types/dropdown.type.tsx b/components/form/admin/types/dropdown.type.tsx index f819c17..520d06b 100644 --- a/components/form/admin/types/dropdown.type.tsx +++ b/components/form/admin/types/dropdown.type.tsx @@ -1,12 +1,15 @@ import {Button, Col, Form, Input, Row} from 'antd' import React from 'react' +import {useTranslation} from 'react-i18next' import {AdminFieldTypeProps} from './type.props' export const DropdownType: React.FC = props => { + const { t } = useTranslation() + return (
@@ -26,7 +29,7 @@ export const DropdownType: React.FC = props => { sm: { offset: index === 0 ? 0 : 6 }, }} labelCol={{ span: 6 }} - label={index === 0 ? 'Options' : ''} + label={index === 0 ? t('type:dropdown.options') : ''} key={field.key} > @@ -36,7 +39,7 @@ export const DropdownType: React.FC = props => { name={[field.name, 'title']} style={{marginBottom: 0}} > - +
@@ -45,15 +48,15 @@ export const DropdownType: React.FC = props => { name={[field.name, 'value']} style={{marginBottom: 0}} rules={[ - { required: true, message: 'Please provide a value' } + { required: true, message: t('validation:valueRequired') } ]} > - + @@ -69,7 +72,8 @@ export const DropdownType: React.FC = props => { + > + {t('type:dropdown.addOption')} ) diff --git a/components/form/admin/types/email.type.tsx b/components/form/admin/types/email.type.tsx index cb84dfa..e26ceb2 100644 --- a/components/form/admin/types/email.type.tsx +++ b/components/form/admin/types/email.type.tsx @@ -1,15 +1,18 @@ import {Form, Input} from 'antd' import React from 'react' +import {useTranslation} from 'react-i18next' import {AdminFieldTypeProps} from './type.props' export const EmailType: React.FC = props => { + const { t } = useTranslation() + return (
diff --git a/components/form/admin/types/hidden.type.tsx b/components/form/admin/types/hidden.type.tsx index cf4ef7d..f908562 100644 --- a/components/form/admin/types/hidden.type.tsx +++ b/components/form/admin/types/hidden.type.tsx @@ -1,12 +1,15 @@ import {Form, Input} from 'antd' import React from 'react' +import {useTranslation} from 'react-i18next' import {AdminFieldTypeProps} from './type.props' export const HiddenType: React.FC = props => { + const { t } = useTranslation() + return (
diff --git a/components/form/admin/types/link.type.tsx b/components/form/admin/types/link.type.tsx index 1a473ab..d44ca0d 100644 --- a/components/form/admin/types/link.type.tsx +++ b/components/form/admin/types/link.type.tsx @@ -1,15 +1,18 @@ import {Form, Input} from 'antd' import React from 'react' +import {useTranslation} from 'react-i18next' import {AdminFieldTypeProps} from './type.props' export const LinkType: React.FC = props => { + const { t } = useTranslation() + return (
diff --git a/components/form/admin/types/number.type.tsx b/components/form/admin/types/number.type.tsx index 431de03..c843049 100644 --- a/components/form/admin/types/number.type.tsx +++ b/components/form/admin/types/number.type.tsx @@ -1,12 +1,15 @@ import {Form, InputNumber} from 'antd' import React from 'react' +import {useTranslation} from 'react-i18next' import {AdminFieldTypeProps} from './type.props' export const NumberType: React.FC = props => { + const { t } = useTranslation() + return (
diff --git a/components/form/admin/types/radio.type.tsx b/components/form/admin/types/radio.type.tsx index 2411d4a..6d6c727 100644 --- a/components/form/admin/types/radio.type.tsx +++ b/components/form/admin/types/radio.type.tsx @@ -1,12 +1,15 @@ import {Button, Col, Form, Input, Row} from 'antd' import React from 'react' +import {useTranslation} from 'react-i18next' import {AdminFieldTypeProps} from './type.props' export const RadioType: React.FC = props => { + const { t } = useTranslation() + return (
diff --git a/components/form/admin/types/rating.type.tsx b/components/form/admin/types/rating.type.tsx index a7faa91..e0efbfc 100644 --- a/components/form/admin/types/rating.type.tsx +++ b/components/form/admin/types/rating.type.tsx @@ -1,13 +1,16 @@ import {Form, Rate} from 'antd' import React from 'react' +import {useTranslation} from 'react-i18next' import {AdminFieldTypeProps} from './type.props' export const RatingType: React.FC = props => { + const { t } = useTranslation() + // TODO add ratings return (
= props => { + const { t } = useTranslation() + return ( diff --git a/components/form/admin/types/textarea.type.tsx b/components/form/admin/types/textarea.type.tsx index 7da2b64..c43b2e8 100644 --- a/components/form/admin/types/textarea.type.tsx +++ b/components/form/admin/types/textarea.type.tsx @@ -1,12 +1,15 @@ import {Form, Input} from 'antd' import React from 'react' +import {useTranslation} from 'react-i18next' import {AdminFieldTypeProps} from './type.props' export const TextareaType: React.FC = props => { + const { t } = useTranslation() + return (
diff --git a/components/form/admin/types/yes_no.type.tsx b/components/form/admin/types/yes_no.type.tsx index 411adc8..5f2bce1 100644 --- a/components/form/admin/types/yes_no.type.tsx +++ b/components/form/admin/types/yes_no.type.tsx @@ -1,13 +1,16 @@ import {Form, Input} from 'antd' import React from 'react' +import {useTranslation} from 'react-i18next' import {AdminFieldTypeProps} from './type.props' export const YesNoType: React.FC = props => { + const { t } = useTranslation() + // TODO add switch return (
diff --git a/i18n.ts b/i18n.ts index de7ecf1..2cc37e0 100644 --- a/i18n.ts +++ b/i18n.ts @@ -3,10 +3,7 @@ import detector from "i18next-browser-languagedetector" import {initReactI18next} from "react-i18next" import {resources} from './locales' -export const languages = [ - 'de', - 'en', -] +export const languages = Object.keys(resources) i18n .use(detector) diff --git a/locales/cn/index.ts b/locales/cn/index.ts new file mode 100644 index 0000000..4f059b9 --- /dev/null +++ b/locales/cn/index.ts @@ -0,0 +1 @@ +export const cn = {} diff --git a/locales/de/index.ts b/locales/de/index.ts new file mode 100644 index 0000000..b18ef03 --- /dev/null +++ b/locales/de/index.ts @@ -0,0 +1 @@ +export const de = {} diff --git a/locales/en/admin.ts b/locales/en/admin.ts index e58a03c..8976505 100644 --- a/locales/en/admin.ts +++ b/locales/en/admin.ts @@ -3,4 +3,6 @@ export const admin = { users: 'Users', forms: 'Forms', submissions: 'Submissions', + profile: 'Profile', + username: 'Username', } diff --git a/locales/en/common.ts b/locales/en/common.ts index d6b935d..db5fd5f 100644 --- a/locales/en/common.ts +++ b/locales/en/common.ts @@ -4,5 +4,4 @@ export const common = { register: "Create Account", recover: 'Lost Password', admin: "Admin", - 'mandatory-fields-missing': 'Mandatory fields missing', } diff --git a/locales/en/form.ts b/locales/en/form.ts index c18a092..671e48e 100644 --- a/locales/en/form.ts +++ b/locales/en/form.ts @@ -2,4 +2,31 @@ export const form = { building: 'Building Form', submitted: 'Thank you for your submission!', restart: 'Restart Form', + loading: 'Loading Form', + mange: 'Edit Form "{{title}}"', + new: 'New Form', + created: 'Form Created', + creationError: 'Could not create form', + create: 'Create new form', + createNow: 'Save', + baseData: 'Base Data', + updated: 'Form updated', + updateError: 'Could not update form', + updateNow: 'Save', + design: 'Design', + startPage: 'Start Page', + endPage: 'End Page', + confirmDelete: 'Are you sure delete this form with all submissions?', + deleted: 'Form deleted', + deleteError: 'could not delete form', + deleteNow: 'Delete Now!', + row: { + isLive: 'Live', + title: 'Title', + admin: 'Owner', + language: 'Language', + created: 'Created', + lastModified: 'Last Modified', + menu: '' + } } diff --git a/locales/en/index.ts b/locales/en/index.ts index 1ac9bfe..1c26d90 100644 --- a/locales/en/index.ts +++ b/locales/en/index.ts @@ -2,8 +2,11 @@ import {admin} from './admin' import {common} from './common' import {form} from './form' import {login} from './login' +import {profile} from './profile' import {register} from './register' import {statistic} from './statistic' +import {submission} from './submission' +import {user} from './user' import {validation} from './validation' export const en = { @@ -11,7 +14,10 @@ export const en = { common, form, login, + profile, register, statistic, + submission, + user, validation, } diff --git a/locales/en/profile.ts b/locales/en/profile.ts new file mode 100644 index 0000000..573d162 --- /dev/null +++ b/locales/en/profile.ts @@ -0,0 +1,10 @@ +export const profile = { + updated: 'Profile updated', + updateError: 'Could not update Profile', + updateNow: 'Save', + language: 'Language', + email: 'Email', + username: 'Username', + firstName: 'First Name', + lastName: 'Last Name', +} diff --git a/locales/en/submission.ts b/locales/en/submission.ts new file mode 100644 index 0000000..1cec51f --- /dev/null +++ b/locales/en/submission.ts @@ -0,0 +1,16 @@ +export const submission = { + progress: 'Progress', + created: 'Created', + lastModified: 'Last Change', + submission: 'Submission', + add: 'Add Submission', + edit: 'Edit', + field: 'Field', + value: 'Value', + country: 'Country', + city: 'City', + device: { + type: 'Device Type', + name: 'Device Name', + } +} diff --git a/locales/en/type.ts b/locales/en/type.ts new file mode 100644 index 0000000..ef3620e --- /dev/null +++ b/locales/en/type.ts @@ -0,0 +1,42 @@ +export const type = { + date: { + default: 'Default Date', + min: 'Min Date', + max: 'Max Date', + }, + dropdown: { + default: 'Default Value', + options: 'Options', + titlePlaceholder: 'Title', + valuePlaceholder: 'Value', + removeOption: 'Remove', + addOption: 'Add Option', + }, + email: { + default: 'Default Email', + }, + hidden: { + default: 'Default Value', + }, + link: { + default: 'Default Link', + }, + number: { + default: 'Default Number', + }, + radio: { + default: 'Default Value', + }, + rating: { + default: 'Default Value', + }, + text: { + default: 'Default Value', + }, + textarea: { + default: 'Default Value', + }, + yes_no: { + default: 'Default Value', + }, +} diff --git a/locales/en/user.ts b/locales/en/user.ts new file mode 100644 index 0000000..6af8223 --- /dev/null +++ b/locales/en/user.ts @@ -0,0 +1,18 @@ +export const user = { + confirmDelete: 'Are you sure delete this user?', + deleted: 'User deleted', + deleteError: 'could not delete user', + deleteNow: 'Delete Now!', + loading: 'Loading User', + mange: 'Edit User "{{email}}"', + row: { + roles: 'Role', + email: 'Email', + created: 'Created', + menu: '' + }, + updated: 'Form updated', + updateError: 'Could not update form', + updateNow: 'Save', + baseData: 'Base Data', +} diff --git a/locales/en/validation.ts b/locales/en/validation.ts index 847d272..a7cf08a 100644 --- a/locales/en/validation.ts +++ b/locales/en/validation.ts @@ -1,3 +1,9 @@ export const validation = { - 'invalid-email': 'Must be a valid email!', + invalidEmail: 'Must be a valid email!', + mandatoryFieldsMissing: 'Mandatory fields missing', + usernameRequired: 'Please provide a Username', + emailRequired: 'Please provide an Email', + languageRequired: 'Please select a Language', + valueRequired: 'Please provide a Value', + invalidUrl: 'Must be a valid URL', } diff --git a/locales/es/index.ts b/locales/es/index.ts new file mode 100644 index 0000000..7dfbabd --- /dev/null +++ b/locales/es/index.ts @@ -0,0 +1 @@ +export const es = {} diff --git a/locales/fr/index.ts b/locales/fr/index.ts new file mode 100644 index 0000000..dbdcd6c --- /dev/null +++ b/locales/fr/index.ts @@ -0,0 +1 @@ +export const fr = {} diff --git a/locales/index.ts b/locales/index.ts index ee817ab..5d375c9 100644 --- a/locales/index.ts +++ b/locales/index.ts @@ -1,5 +1,15 @@ +import {cn} from './cn' +import {de} from './de' import {en} from './en' +import {es} from './es' +import {fr} from './fr' +import {it} from './it' export const resources = { + cn, + de, en, + es, + fr, + it, } diff --git a/locales/it/index.ts b/locales/it/index.ts new file mode 100644 index 0000000..2cd66df --- /dev/null +++ b/locales/it/index.ts @@ -0,0 +1 @@ +export const it = {} diff --git a/pages/admin/forms/[id]/index.tsx b/pages/admin/forms/[id]/index.tsx index dda590e..bf45a75 100644 --- a/pages/admin/forms/[id]/index.tsx +++ b/pages/admin/forms/[id]/index.tsx @@ -98,21 +98,19 @@ const Index: NextPage = () => { form.setFieldsValue(next) setFields(next.form.fields) - message.success('Form Updated') + message.success(t('form:updated')) } catch (e) { console.error('failed to save', e) - message.error('Could not save Form') + message.error(t('form:updateError')) } setSaving(false) } - - return ( { href={'/admin/forms/[id]/submissions'} as={`/admin/forms/${router.query.id}/submissions`} > - + , , + >{t('form:updateNow')}, ]} style={{paddingTop: 0}} > @@ -142,7 +136,8 @@ const Index: NextPage = () => { form={form} onFinish={save} onFinishFailed={errors => { - message.error('Required fields are missing') + // TODO process errors + message.error(t('validation:mandatoryFieldsMissing')) }} labelCol={{ xs: { span: 24 }, @@ -163,8 +158,8 @@ const Index: NextPage = () => { onChangeFields={setFields} form={form} /> - - + + { fields={fields} form={form} /> - - + + diff --git a/pages/admin/forms/[id]/submissions.tsx b/pages/admin/forms/[id]/submissions.tsx index ec93384..c71b715 100644 --- a/pages/admin/forms/[id]/submissions.tsx +++ b/pages/admin/forms/[id]/submissions.tsx @@ -47,7 +47,7 @@ const Submissions: NextPage = () => { const columns:ColumnsType = [ { - title: 'Progress', + title: t('submission:progress'), render: (row: AdminPagerSubmissionEntryQueryData) => { let status: any = 'active' @@ -63,12 +63,12 @@ const Submissions: NextPage = () => { } }, { - title: 'Created', + title: t('submission:created'), dataIndex: 'created', render: date => }, { - title: 'Last Change', + title: t('submission:lastModified'), dataIndex: 'lastModified', render: date => }, @@ -82,7 +82,7 @@ const Submissions: NextPage = () => { breadcrumbs={[ { href: '/admin', name: t('admin:home') }, { href: '/admin/forms', name: t('admin:forms') }, - { href: '/admin/forms/[id]', name: loading || !form ? 'Loading Form' : `Edit Form "${form.title}"`, as: `/admin/forms/${router.query.id}` }, + { href: '/admin/forms/[id]', name: loading || !form ? t('form:loading') : t('form:mange', { title: form.title }), as: `/admin/forms/${router.query.id}` }, ]} padded={false} extra={[ @@ -91,18 +91,14 @@ const Submissions: NextPage = () => { href={'/admin/forms/[id]'} as={`/admin/forms/${router.query.id}`} > - + , , + >{t('submission:add')}, ]} >
{ const save = async (formData: AdminFormQueryData) => { setSaving(true) - console.log('try to save form!', formData) try { const next = (await create({ variables: cleanInput(formData), })).data - message.success('Form Created') + message.success(t('form:created')) router.replace('/admin/forms/[id]', `/admin/forms/${next.form.id}`) } catch (e) { console.error('failed to save', e) - message.error('Could not save Form') + message.error(t('form:creationError')) } setSaving(false) @@ -46,7 +45,7 @@ const Create: NextPage = () => { return ( { key={'create'} onClick={form.submit} type={'primary'} - > - Save - , + >{t('form:createNow')}, ]} style={{paddingTop: 0}} > @@ -67,7 +64,8 @@ const Create: NextPage = () => { form={form} onFinish={save} onFinishFailed={errors => { - message.error('Required fields are missing') + // TODO process errors + message.error(t('validation:mandatoryFieldsMissing')) }} labelCol={{ xs: { span: 24 }, @@ -81,33 +79,7 @@ const Create: NextPage = () => { - {/* - - */} - - {/* - - - - - - */} + diff --git a/pages/admin/forms/index.tsx b/pages/admin/forms/index.tsx index 1aeea4c..08dd7c3 100644 --- a/pages/admin/forms/index.tsx +++ b/pages/admin/forms/index.tsx @@ -59,24 +59,24 @@ const Index: NextPage = () => { setEntries(next) } - message.success('form deleted') + message.success(t('form:deleted')) } catch (e) { - message.error('could not delete form') + message.error(t('form:deleteError')) } } const columns: ColumnsType = [ { - title: 'Live', + title: t('form:row.isLive'), dataIndex: 'isLive', render: live => }, { - title: 'Title', + title: t('form:row.title'), dataIndex: 'title', }, { - title: 'Owner', + title: t('form:row.admin'), dataIndex: 'admin', render: user => ( @@ -87,20 +87,21 @@ const Index: NextPage = () => { ) }, { - title: 'Language', + title: t('form:row.language'), dataIndex: 'language', }, { - title: 'Created', + title: t('form:row.created'), dataIndex: 'created', render: date => }, { - title: 'Last Change', + title: t('form:row.lastModified'), dataIndex: 'lastModified', render: date => }, { + title: t('form:row.menu'), align: 'right', render: row => { return ( @@ -122,9 +123,9 @@ const Index: NextPage = () => { deleteForm(row)} - okText={'Delete now!'} + okText={t('form:deleteNow')} okButtonProps={{ danger: true }} > @@ -160,9 +161,7 @@ const Index: NextPage = () => { > + >{t('form:new')} , ]} > diff --git a/pages/admin/profile.tsx b/pages/admin/profile.tsx index f03cfe0..0064de6 100644 --- a/pages/admin/profile.tsx +++ b/pages/admin/profile.tsx @@ -4,6 +4,7 @@ import {useForm} from 'antd/lib/form/Form' import {NextPage} from 'next' import {useRouter} from 'next/router' import React, {useState} from 'react' +import {useTranslation} from 'react-i18next' import {cleanInput} from '../../components/clean.input' import Structure from '../../components/structure' import { @@ -20,6 +21,7 @@ import {AdminUserQueryData} from '../../graphql/query/admin.user.query' import {languages} from '../../i18n' const Profile: NextPage = () => { + const { t } = useTranslation() const router = useRouter() const [form] = useForm() const [saving, setSaving] = useState(false) @@ -42,10 +44,10 @@ const Profile: NextPage = () => { form.setFieldsValue(next) - message.success('Profile Updated') + message.success(t('profile:updated')) } catch (e) { console.error('failed to save', e) - message.error('Could not save Profile') + message.error(t('profile:updateError')) } setSaving(false) @@ -55,26 +57,25 @@ const Profile: NextPage = () => { return ( - Save - , + >{t('profile:updateNow')}, ]} >
{ - message.error('Required fields are missing') + // TODO process errors + message.error(t('validation:mandatoryFieldsMissing')) }} labelCol={{ xs: { span: 24 }, @@ -88,12 +89,12 @@ const Profile: NextPage = () => { @@ -101,16 +102,16 @@ const Profile: NextPage = () => { @@ -118,12 +119,12 @@ const Profile: NextPage = () => { @@ -133,14 +134,14 @@ const Profile: NextPage = () => { diff --git a/pages/admin/users/[id]/index.tsx b/pages/admin/users/[id]/index.tsx index 0fe5387..7485688 100644 --- a/pages/admin/users/[id]/index.tsx +++ b/pages/admin/users/[id]/index.tsx @@ -42,10 +42,10 @@ const Index: NextPage = () => { form.setFieldsValue(next) - message.success('User Updated') + message.success(t('user:updated')) } catch (e) { console.error('failed to save', e) - message.error('Could not save User') + message.error(t('user:updateError')) } setSaving(false) @@ -54,7 +54,7 @@ const Index: NextPage = () => { return ( { key={'save'} onClick={form.submit} type={'primary'} - > - Save - , + >{t('user:updateNow')}, ]} style={{paddingTop: 0}} > @@ -75,7 +73,8 @@ const Index: NextPage = () => { form={form} onFinish={save} onFinishFailed={errors => { - message.error('Required fields are missing') + // TODO process errors + message.error(t('validation:mandatoryFieldsMissing')) }} labelCol={{ xs: { span: 24 }, @@ -91,7 +90,7 @@ const Index: NextPage = () => { diff --git a/pages/admin/users/index.tsx b/pages/admin/users/index.tsx index 229222f..5abd563 100644 --- a/pages/admin/users/index.tsx +++ b/pages/admin/users/index.tsx @@ -57,28 +57,29 @@ const Index: NextPage = () => { } else { setEntries(next) } - message.success('user deleted') + message.success(t('user:deleted')) } catch (e) { - message.error('could not delete user') + message.error(t('user:deleteError')) } } const columns: ColumnsType = [ { - title: 'Role', + title: t('user:row.roles'), dataIndex: 'roles', render: roles => }, { - title: 'Email', + title: t('user:row.email'), render: row => {row.email} }, { - title: 'Created', + title: t('user:row.created'), dataIndex: 'created', render: date => }, { + title: t('user:row.menu'), align: 'right', render: row => { return ( @@ -91,9 +92,9 @@ const Index: NextPage = () => { deleteUser(row)} - okText={'Delete now!'} + okText={t('user:deleteNow')} okButtonProps={{ danger: true }} > diff --git a/pages/login/index.tsx b/pages/login/index.tsx index e509d82..ca0f956 100644 --- a/pages/login/index.tsx +++ b/pages/login/index.tsx @@ -41,7 +41,7 @@ const Index: NextPage = () => { } const failed = () => { - message.error(t('mandatory-fields-missing')) + message.error(t('validation:mandatoryFieldsMissing')) } return ( diff --git a/pages/register.tsx b/pages/register.tsx index 2b8b6b4..d9c2410 100644 --- a/pages/register.tsx +++ b/pages/register.tsx @@ -44,7 +44,7 @@ const Register: NextPage = () => { } const failed = () => { - message.error(t('mandatory-fields-missing')) + message.error(t('validation:mandatoryFieldsMissing')) } return ( @@ -86,7 +86,7 @@ const Register: NextPage = () => { name="email" rules={[ { required: true, message: t('register:email-required') }, - { type: 'email', message: t('validation:invalid-email') } + { type: 'email', message: t('validation:invalidEmail') } ]} >