diff options
author | Blaster4385 <venkateshchaturvedi12@gmail.com> | 2022-08-20 21:54:49 +0530 |
---|---|---|
committer | Blaster4385 <venkateshchaturvedi12@gmail.com> | 2022-08-20 21:59:42 +0530 |
commit | da56108f1dc51dbde756dd0f4cd3c96452aa0d18 (patch) | |
tree | 1e34bb9fdce552195a9cf0846ff9c080afa9aa6e /client | |
parent | 1926a54d1f7b8bc1ed690aaf8e3b679b41edce7b (diff) |
IDK
Diffstat (limited to 'client')
-rw-r--r-- | client/src/components/Gender/Gender.jsx | 6 | ||||
-rw-r--r-- | client/src/components/LanguageSelect/locales/en/translation.json | 13 | ||||
-rw-r--r-- | client/src/components/LanguageSelect/locales/hi/translation.json | 45 | ||||
-rw-r--r-- | client/src/pages/Enrollment/Address/Address.jsx | 14 | ||||
-rw-r--r-- | client/src/pages/Update/FormOne/FormOne.jsx | 12 | ||||
-rw-r--r-- | client/src/pages/Update/Otp/Otp.jsx | 8 | ||||
-rw-r--r-- | client/src/pages/Update/Update.jsx | 10 |
7 files changed, 74 insertions, 34 deletions
diff --git a/client/src/components/Gender/Gender.jsx b/client/src/components/Gender/Gender.jsx index 9b302a2..74100f7 100644 --- a/client/src/components/Gender/Gender.jsx +++ b/client/src/components/Gender/Gender.jsx @@ -14,7 +14,7 @@ const Gender = ({ formData, setFormData }) => { return ( <div className={styles.formone__gender}> <LabelCard - id="Male" + id="male" name="gender" title={t('MALE')} value={formData?.gender} @@ -28,7 +28,7 @@ const Gender = ({ formData, setFormData }) => { image={`${process.env.PUBLIC_URL}/assets/images/male.svg`} /> <LabelCard - id="Female" + id="female" name="gender" value={formData?.gender} title={t('FEMALE')} @@ -42,7 +42,7 @@ const Gender = ({ formData, setFormData }) => { image={`${process.env.PUBLIC_URL}/assets/images/female.svg`} /> <LabelCard - id="Other" + id="other" name="gender" value={formData?.gender} title={t('OTHER')} diff --git a/client/src/components/LanguageSelect/locales/en/translation.json b/client/src/components/LanguageSelect/locales/en/translation.json index 254b3db..3b4383b 100644 --- a/client/src/components/LanguageSelect/locales/en/translation.json +++ b/client/src/components/LanguageSelect/locales/en/translation.json @@ -62,6 +62,7 @@ "PLEASE_SELECT_YOUR_GENDER": "Please select your gender", "PLEASE_ENTER_YOUR_MOBILE_NUMBER": "Please enter your mobile number", "PLEASE_ENTER_VALID_MOBILE_NUMBER": "Please enter valid mobile number", + "PLEASE_SELECT_YOUR_DOB": "Please select your birth date", "PLEASE_ENTER_YOUR_EMAIL": "Please enter your email", "PLEASE_ENTER_VALID_EMAIL": "Please enter valid email", "PLEASE_SELECT_YOUR_COUNTRY": "Please select your country", @@ -83,5 +84,15 @@ "BIOMETRIC": "Biometric", "PLEASE_TAKE_THE_PICTURE_OF_THE_PROOF_OF_IDENTITY": "Please take the picture of the Proof of Identity", "PLEASE_TAKE_THE_PICTURE_OF_THE_PROOF_OF_ADDRESS": "Please take the picture of the Proof of Identity", - "PLEASE_TAKE_THE_PICTURE_OF_THE_PROOF_OF_DATE_OF_BIRTH": "Please take the picture of the Proof of Date of Birth" + "PLEASE_TAKE_THE_PICTURE_OF_THE_PROOF_OF_DATE_OF_BIRTH": "Please take the picture of the Proof of Date of Birth", + "PLEASE_CAPTURE_PHOTOGRAPH": "Please capture photograph", + "SCAN_YOUR_DOCUMENT": "Scan your document", + "INCORRECT_OTP": "Incorrect OTP!", + "OTP_VERIFIED!": "OTP verified!", + "PROVIDE_AADHAAR_NUMBER": "Provide Aadhaar Number", + "SUBMIT": "Submit", + "ENTER_YOUR_AADHAAR_NUMBER": "Enter your Aadhaar Number", + "ENTER_OTP": "Enter OTP", + "PLEASE_VERIFY_OTP": "Please verify OTP", + "USER_ALREADY_EXISTS": "User already exists" } diff --git a/client/src/components/LanguageSelect/locales/hi/translation.json b/client/src/components/LanguageSelect/locales/hi/translation.json index a5ce358..801d46c 100644 --- a/client/src/components/LanguageSelect/locales/hi/translation.json +++ b/client/src/components/LanguageSelect/locales/hi/translation.json @@ -8,7 +8,7 @@ "FULL_NAME": "पूरा नाम", "ENTER_YOUR_FULL_NAME": "अपना पूरा नाम भरें", "MALE": "पुरुष", - "FEMALE": "मादा", + "FEMALE": "महिला", "OTHER": "अन्य", "DATE_OF_BIRTH": "जन्म की तारीख", "MOBILE": "मोबाइल", @@ -27,16 +27,16 @@ "AREA_LOCALITY": "क्षेत्र / इलाका", "ENTER_YOUR_AREA_LOCALITY": "अपना क्षेत्र / इलाका दर्ज करें", "POST_OFFICE": "डाकघर", - "ENTER_YOUR_AREA_POST_OFFICE": "अपना क्षेत्र डाकघर दर्ज करें", - "LANDMARK": "लैंडमार्क", - "ENTER_ANY_NEAREST_LANDMARK": "कोई भी निकटतम लैंडमार्क दर्ज करें", + "ENTER_YOUR_AREA_POST_OFFICE": "अपने क्षेत्र का डाकघर दर्ज करें", + "LANDMARK": "सीमाचिह्न", + "ENTER_ANY_NEAREST_LANDMARK": "कोई भी निकटतम सीमाचिह्न दर्ज करें", "PINCODE": "पिनकोड", - "ENTER_YOUR_AREA_PINCODE": "अपना क्षेत्र पिनकोड दर्ज करें", - "CAPTURE": "कैप्चर", - "RESET": "रीसेट", + "ENTER_YOUR_AREA_PINCODE": "अपने क्षेत्र का पिनकोड दर्ज करें", + "CAPTURE": "खींचे", + "RESET": "हटायें", "PLEASE_LOOK_INTO_THE_CAMERA": "कृपया कैमरे में देखें", - "CLICK_CAPTURE_TO_CAPTURE_THE_PHOTO": "फ़ोटो कैप्चर करने के लिए कैप्चर करें क्लिक करें", - "CLICK_RESET_TO_REMOVE_THE_CAPTURED_PHOTO": "कैप्चर की गई फ़ोटो को निकालने के लिए रीसेट करें क्लिक करें", + "CLICK_CAPTURE_TO_CAPTURE_THE_PHOTO": "फ़ोटो खींचने के लिए खींचे पर क्लिक करें", + "CLICK_RESET_TO_REMOVE_THE_CAPTURED_PHOTO": "खींची गई फ़ोटो को हटाने के लिए रीसेट करें क्लिक करें", "PROOF_OF_IDENTITY": "पहचान का प्रमाण", "PROOF_OF_ADDRESS": "पते का प्रमाण", "PROOF_OF_DOB": "जन्म तिथि का प्रमाण", @@ -57,16 +57,23 @@ "RESEND": "फिर से भेजें", "VERIFY_OTP": "ओटीपी की पुष्टि करें", "PLEASE_SELECT_YOUR_RESIDENCY": "कृपया अपना निवास चुनें", + "PLEASE_ENTER_YOUR_NAME": "कृपया अपना नाम दर्ज करें", + "PLEASE_ENTER_VALID_NAME": "कृपया मान्य नाम दर्ज करें", + "PLEASE_SELECT_YOUR_GENDER": "कृपया अपना लिंग चुनें", + "PLEASE_ENTER_YOUR_MOBILE_NUMBER": "कृपया अपना मोबाइल नंबर दर्ज करें", + "PLEASE_ENTER_VALID_MOBILE_NUMBER": "कृपया मान्य मोबाइल नंबर दर्ज करें", + "PLEASE_SELECT_YOUR_DOB": "कृपया अपनी जन्मतिथि चुनें", + "PLEASE_ENTER_YOUR_EMAIL": "कृपया अपना ईमेल दर्ज करें", "PLEASE_ENTER_VALID_EMAIL": "कृपया मान्य ईमेल दर्ज करें", "PLEASE_SELECT_YOUR_COUNTRY": "कृपया अपना देश चुनें", "PLEASE_SELECT_YOUR_STATE": "कृपया अपना राज्य चुनें", "PLEASE_SELECT_YOUR_DISTRICT": "कृपया अपना जिला चुनें", - "PLEASE_ENTER_YOUR_VILLAGE": "कृपया अपने गांव में प्रवेश करें", + "PLEASE_ENTER_YOUR_VILLAGE": "कृपया अपना गांव दर्ज करें", "PLEASE_ENTER_YOUR_HOUSE_NUMBER": "कृपया अपने घर का नंबर दर्ज करें", - "PLEASE_ENTER_YOUR_STREET": "कृपया अपनी गली में प्रवेश करें", + "PLEASE_ENTER_YOUR_STREET": "कृपया अपनी गली दर्ज करें", "PLEASE_ENTER_YOUR_LOCALITY": "कृपया अपना इलाका दर्ज करें", - "PLEASE_ENTER_YOUR_AREA_POST_OFFICE": "कृपया अपने क्षेत्र के डाकघर में प्रवेश करें", - "PLEASE_ENTER_NEAREST_LANDMARK": "कृपया निकटतम लैंडमार्क दर्ज करें", + "PLEASE_ENTER_YOUR_AREA_POST_OFFICE": "कृपया अपने क्षेत्र का डाकघर दर्ज करें", + "PLEASE_ENTER_NEAREST_LANDMARK": "कृपया निकटतम सीमाचिह्न दर्ज करें", "PLEASE_ENTER_YOUR_AREA_PINCODE": "कृपया अपने क्षेत्र का पिनकोड दर्ज करें", "PLEASE_ENTER_VALID_PINCODE": "कृपया मान्य पिनकोड दर्ज करें", "I_HEREBY_CONFIRM_THE_IDENTITY_AND_ADDRESS": "मैं ___________ की पहचान और पते को सत्य, सही और सटीक होने की पुष्टि करता हूं", @@ -77,5 +84,15 @@ "BIOMETRIC": "बायोमेट्रिक", "PLEASE_TAKE_THE_PICTURE_OF_THE_PROOF_OF_IDENTITY": "कृपया पहचान प्रमाण पत्र की तस्वीर लें", "PLEASE_TAKE_THE_PICTURE_OF_THE_PROOF_OF_ADDRESS": "कृपया पते के प्रमाण की तस्वीर लें", - "PLEASE_TAKE_THE_PICTURE_OF_THE_PROOF_OF_DATE_OF_BIRTH": "कृपया जन्मतिथि के प्रमाण की तस्वीर लें" + "PLEASE_TAKE_THE_PICTURE_OF_THE_PROOF_OF_DATE_OF_BIRTH": "कृपया जन्मतिथि के प्रमाण की तस्वीर लें", + "PLEASE_CAPTURE_PHOTOGRAPH": "कृपया फोटो खींचे", + "SCAN_YOUR_DOCUMENT": "अपना दस्तावेज़ स्कैन करें", + "INCORRECT_OTP": "गलत ऑट्पी!", + "OTP_VERIFIED!": "ऑट्पी सत्यापित कर दिया गया है!", + "PROVIDE_AADHAAR_NUMBER": "आधार नंबर प्रदान करें", + "ENTER_YOUR_AADHAAR_NUMBER": "आधार नंबर दर्ज करें", + "SUBMIT": "प्रस्तुत करें", + "ENTER_OTP": "ओटीपी दर्ज करें", + "PLEASE_VERIFY_OTP": "कृपया ओटीपी सत्यापित करें", + "USER_ALREADY_EXISTS": "उपयोगकर्ता पहले से मौजूद है" } diff --git a/client/src/pages/Enrollment/Address/Address.jsx b/client/src/pages/Enrollment/Address/Address.jsx index 3d1c520..6bf4044 100644 --- a/client/src/pages/Enrollment/Address/Address.jsx +++ b/client/src/pages/Enrollment/Address/Address.jsx @@ -52,7 +52,7 @@ const Address = () => { <Input id="houseNo" label={t('HOUSE_NUMBER_APARTMENT')} - value={userData.houseNo} + value={userData.address.houseNo} type="text" onChange={(e) => { setUserData({ @@ -68,7 +68,7 @@ const Address = () => { <Input id="town" label={t('VILLAGE_TOWN')} - value={userData.village} + value={userData.address.village} type="text" onChange={(e) => { setUserData({ @@ -105,7 +105,7 @@ const Address = () => { <Input id="street" label={t('STREET_ROAD')} - value={userData.street} + value={userData.address.street} type="text" onChange={(e) => { setUserData({ @@ -121,7 +121,7 @@ const Address = () => { <Input id="postOffice" label={t('POST_OFFICE')} - value={userData.postOffice} + value={userData.address.postOffice} type="text" onChange={(e) => { setUserData({ @@ -158,7 +158,7 @@ const Address = () => { <Input id="locality" label={t('AREA_LOCALITY')} - value={userData.locality} + value={userData.address.locality} type="text" onChange={(e) => { setUserData({ @@ -174,7 +174,7 @@ const Address = () => { <Input id="pincode" label={t('PINCODE')} - value={userData.pincode} + value={userData.address.pincode} type="text" onChange={(e) => { setUserData({ @@ -190,7 +190,7 @@ const Address = () => { <Input id="landmark" label={t('LANDMARK')} - value={userData.landmark} + value={userData.address.landmark} type="text" onChange={(e) => { setUserData({ diff --git a/client/src/pages/Update/FormOne/FormOne.jsx b/client/src/pages/Update/FormOne/FormOne.jsx index e0b1ca0..d5fb8ba 100644 --- a/client/src/pages/Update/FormOne/FormOne.jsx +++ b/client/src/pages/Update/FormOne/FormOne.jsx @@ -18,7 +18,17 @@ const FormOne = () => { } useEffect(() => { - document.getElementById(`${userData.gender}`).checked = 'checked' + switch (userData.gender) { + case 'Male': + document.getElementById('male').checked = 'checked' + break + case 'Female': + document.getElementById('female').checked = 'checked' + break + case 'Other': + document.getElementById('other').checked = 'checked' + break + } }, [userData.gender]) return ( diff --git a/client/src/pages/Update/Otp/Otp.jsx b/client/src/pages/Update/Otp/Otp.jsx index 2728ba3..31d8096 100644 --- a/client/src/pages/Update/Otp/Otp.jsx +++ b/client/src/pages/Update/Otp/Otp.jsx @@ -43,13 +43,13 @@ const Otp = () => { } return ( <> - <Header subheading="Update" /> + <Header subheading={`${t('UPDATE')}`} /> <div className={styles.subheading__container}> - <h3 className={styles.subheading}> Enter OTP </h3> + <h3 className={styles.subheading}> {t('ENTER_OTP')} </h3> <Input type="text" id="aadhaarNumber" - placeholder="Enter One Time Password" + placeholder={`${t('ENTER_OTP')}`} /> <Grid container columnSpacing={10} justifyContent="center"> <Grid item> @@ -60,7 +60,7 @@ const Otp = () => { variant="contained" onClick={() => {}} > - Verify OTP + {t('VERIFY_OTP')} </Button> </Grid> </Grid> diff --git a/client/src/pages/Update/Update.jsx b/client/src/pages/Update/Update.jsx index 63343f1..2ef98ec 100644 --- a/client/src/pages/Update/Update.jsx +++ b/client/src/pages/Update/Update.jsx @@ -5,23 +5,25 @@ import Input from '../../components/Input/Input' import { Grid, Button } from '@mui/material' import { userContext } from '../../context/User' import { useNavigate } from 'react-router-dom' +import { useTranslation } from 'react-i18next' const Update = () => { const { aadhaarNumber, setAadhaarNumber } = userContext() const navigate = useNavigate() + const { t } = useTranslation() return ( <> - <Header subheading="Update" /> + <Header subheading={`${t('UPDATE')}`} /> <div className={styles.subheading__container}> - <h3 className={styles.subheading}> Provide Aadhaar Number (UID): </h3> + <h3 className={styles.subheading}> {t('PROVIDE_AADHAAR_NUMBER')} </h3> <Input type="text" id="aadhaarNumber" value={aadhaarNumber} onChange={(e) => setAadhaarNumber(e.target.value)} - placeholder="Enter your Aadhaar Number" + placeholder={`${t('ENTER_YOUR_AADHAAR_NUMBER')}`} required /> <Grid container columnSpacing={10} justifyContent="center"> @@ -35,7 +37,7 @@ const Update = () => { navigate('/update/otp') }} > - Submit + {t('SUBMIT')} </Button> </Grid> </Grid> |