diff --git a/components/BitcoinOperation.tsx b/components/BitcoinOperation.tsx index 53058b5..ed8d9f4 100644 --- a/components/BitcoinOperation.tsx +++ b/components/BitcoinOperation.tsx @@ -1,4 +1,5 @@ import React from 'react' +import { useTranslation } from 'next-i18next'; import Headline from './Headline' import LearnMore from './LearnMore' @@ -12,19 +13,21 @@ import { } from '../constants/strings' const BitcoinOperation = ({}) => { + const { t } = useTranslation('home') + return (
- { SETLIFE_OPERATES } + { t(SETLIFE_OPERATES) } - { ON_A_BITCOIN_STANDARD } + { t(ON_A_BITCOIN_STANDARD) }
- +
diff --git a/components/BudgetTimelineForm.tsx b/components/BudgetTimelineForm.tsx index 51508b3..4ca2263 100644 --- a/components/BudgetTimelineForm.tsx +++ b/components/BudgetTimelineForm.tsx @@ -1,6 +1,7 @@ import { useEffect, useState } from 'react' import Slider from 'rc-slider' import 'rc-slider/assets/index.css' +import { useTranslation } from 'next-i18next'; import Paragraph from './Paragraph' @@ -34,6 +35,7 @@ const BudgetTimelineForm = ({ setTimeline, defaultBudget, }: BudgetTimelineFormProps) => { + const { t } = useTranslation('consultation') const [minBudgetValue, setMinBudgetValue] = useState(defaultBudget[0]) const [maxBudgetValue, setMaxBudgetValue] = useState(defaultBudget[1]) @@ -109,7 +111,7 @@ const BudgetTimelineForm = ({ ] return timelineTypes.map(timeline => { return ( -
addTimelineValue(timeline.name)}> +
addTimelineValue(t(timeline.name))}>
) @@ -134,20 +136,20 @@ const BudgetTimelineForm = ({
<> - {PROJECT_WITH_PROPOSED_BUDGETS} + {t(PROJECT_WITH_PROPOSED_BUDGETS)} - {SERVICE_PACKAGES} + {` ${t(SERVICE_PACKAGES, { ns: 'common' })} `} - {TO_GET_A_SENSE} + {t(TO_GET_A_SENSE)} - {SELECT_AN_ESTIMATED_BUDGET_RANGE_FOR_YOUR_PROJECT} + {t(SELECT_AN_ESTIMATED_BUDGET_RANGE_FOR_YOUR_PROJECT)}
- {MIN} + {t(MIN)} {formatAmount(minBudgetValue)} @@ -155,7 +157,7 @@ const BudgetTimelineForm = ({
- {MAX} + {t(MAX)} {formatAmount(maxBudgetValue)} @@ -190,7 +192,7 @@ const BudgetTimelineForm = ({
- {DESCRIBE_ANY_TIMELINE_AND_BUDGET_CONSTRAINTS_FOR_YOUR_PROJECT} + {t(DESCRIBE_ANY_TIMELINE_AND_BUDGET_CONSTRAINTS_FOR_YOUR_PROJECT)}
{ renderTimelineTypes() } diff --git a/components/ContactInformation.tsx b/components/ContactInformation.tsx index da0985b..458dc3a 100644 --- a/components/ContactInformation.tsx +++ b/components/ContactInformation.tsx @@ -1,4 +1,5 @@ import { useEffect, useState } from 'react' +import { useTranslation } from 'next-i18next'; import Headline from './Headline' @@ -29,6 +30,8 @@ const ContactInformation = ({ setContactInformationError }: ContactInformationProps) => { + const { t } = useTranslation('consultation') + const [name, setName] = useState('') const [email, setEmail] = useState('') const [phoneNumber, setPhoneNumber] = useState('') @@ -63,7 +66,7 @@ const ContactInformation = ({ const renderInputs = () => { const basicInformationFields = [ { - name: NAME, + name: t(NAME), value: name, error: nameError, onChange: (nameInput: any) => { @@ -72,7 +75,7 @@ const ContactInformation = ({ } }, { - name: EMAIL, + name: t(EMAIL, { 'ns': 'common' }), value: email, error: emailError, onChange: (emailInput: any) => { @@ -81,7 +84,7 @@ const ContactInformation = ({ } }, { - name: PHONE_NUMBER, + name: t(PHONE_NUMBER), value: phoneNumber, onChange: (phoneNumberInput: any) => { setPhoneNumber(validNumber.exec(phoneNumberInput) @@ -115,7 +118,7 @@ const ContactInformation = ({ {input.error && ( - { INVALID } { input.name } + { t(INVALID) } { input.name } )}
@@ -168,7 +171,7 @@ const ContactInformation = ({ checked={clientType == client.name} onChange={() => {}} /> - { client.name } + { t(client.name) }
) @@ -185,12 +188,12 @@ const ContactInformation = ({ color='primary' variant='alternative' > - {THIS_PROJECT_IS_FOR + '*'} + {t(THIS_PROJECT_IS_FOR) + '*'} { renderClientTypes() } {clientTypeError && ( - { PLEASE_SELECT_AT_LEAST_ONE_OPTION } + { t(PLEASE_SELECT_AT_LEAST_ONE_OPTION) } )}
diff --git a/components/ContributorInquiryForm.tsx b/components/ContributorInquiryForm.tsx index abf201e..e6b4942 100644 --- a/components/ContributorInquiryForm.tsx +++ b/components/ContributorInquiryForm.tsx @@ -1,5 +1,6 @@ import React, { useEffect, useRef, useState } from 'react' import { useRouter } from 'next/router' +import { useTranslation } from 'next-i18next'; import { getS3 } from '../utilities/s3' import { validEmail } from '../utilities/validations' @@ -24,6 +25,7 @@ import { } from '../constants/strings'; const ContributorInquiryForm = ({}) => { + const { t } = useTranslation('inquiry') const [email, setEmail] = useState('') const [linkToWork, setLinkToWork] = useState('') @@ -107,13 +109,13 @@ const ContributorInquiryForm = ({}) => { const renderInputs = () => { const basicInformationFields = [ { - name: EMAIL, + name: t(EMAIL, { 'ns': 'common' }), value: email, setValue: setEmail, type: 'email' }, { - name: LINK_TO_YOUR_WORK, + name: t(LINK_TO_YOUR_WORK), value: linkToWork, setValue: setLinkToWork, type: 'text' @@ -153,7 +155,7 @@ const ContributorInquiryForm = ({}) => {
- {PLEASE_FILL_OUT_CONTRIBUTE_FORM} + {t(PLEASE_FILL_OUT_CONTRIBUTE_FORM)}
@@ -172,7 +174,7 @@ const ContributorInquiryForm = ({}) => { { submitCVName ? submitCVName - : SUBMIT_CV + : t(SUBMIT_CV) }
@@ -209,7 +211,7 @@ const ContributorInquiryForm = ({}) => {
setOpenMoreDetails(true)}> - {ADD_MORE_DETAILS} + {t(ADD_MORE_DETAILS)}