- implement i18n

- translation dynamic for sections
- added articles for SEO
This commit is contained in:
Amruth Pillai
2020-07-16 08:42:19 +05:30
parent b7c565de79
commit a7657b4a5c
74 changed files with 2373 additions and 586 deletions

View File

@ -1,13 +1,20 @@
import React, { memo } from 'react';
import { useTranslation } from 'react-i18next';
import Heading from '../../../shared/Heading';
import Input from '../../../shared/Input';
const Objective = () => {
const Objective = ({ name }) => {
const { t } = useTranslation();
return (
<section>
<Heading>Objective</Heading>
<Heading>{name}</Heading>
<Input type="textarea" label="Objective" path="objective.body" />
<Input
type="textarea"
label={t('shared.forms.summary')}
path="objective.body"
/>
</section>
);
};

View File

@ -1,45 +1,80 @@
import React, { memo } from 'react';
import { useTranslation } from 'react-i18next';
import Heading from '../../../shared/Heading';
import Input from '../../../shared/Input';
import PhotoUpload from '../../../shared/PhotoUpload';
const Profile = () => {
const Profile = ({ name }) => {
const { t } = useTranslation();
return (
<section>
<Heading>Profile</Heading>
<Heading>{name}</Heading>
<PhotoUpload />
<div className="grid grid-cols-2 gap-6">
<Input name="firstName" label="First Name" path="profile.firstName" />
<Input name="lastName" label="Last Name" path="profile.lastName" />
<Input
name="firstName"
label={t('builder.profile.firstName')}
path="profile.firstName"
/>
<Input
name="lastName"
label={t('builder.profile.lastName')}
path="profile.lastName"
/>
</div>
<Input name="subtitle" label="Subtitle" path="profile.subtitle" />
<Input
name="subtitle"
label={t('shared.forms.subtitle')}
path="profile.subtitle"
/>
<hr />
<Input
name="addressLine1"
label="Address Line 1"
label={t('builder.profile.address.line1')}
path="profile.address.line1"
/>
<Input
name="addressLine2"
label="Address Line 2"
label={t('builder.profile.address.line2')}
path="profile.address.line2"
/>
<div className="grid grid-cols-2 gap-6">
<Input name="city" label="City" path="profile.address.city" />
<Input name="pincode" label="Pincode" path="profile.address.pincode" />
<Input
name="city"
label={t('builder.profile.address.city')}
path="profile.address.city"
/>
<Input
name="pincode"
label={t('builder.profile.address.pincode')}
path="profile.address.pincode"
/>
</div>
<hr />
<Input name="phone" label="Phone Number" path="profile.phone" />
<Input name="website" label="Website" path="profile.website" />
<Input name="email" label="Email Address" path="profile.email" />
<Input
name="phone"
label={t('shared.forms.phone')}
path="profile.phone"
/>
<Input
name="website"
label={t('shared.forms.website')}
path="profile.website"
/>
<Input
name="email"
label={t('shared.forms.email')}
path="profile.email"
/>
</section>
);
};