Skip to content

Commit

Permalink
i18n: Add translations for new registration flow
Browse files Browse the repository at this point in the history
  • Loading branch information
sashko9807 committed Nov 1, 2023
1 parent f6e278a commit f536a7d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 14 deletions.
6 changes: 5 additions & 1 deletion public/locales/bg/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@
"individual": "Личен",
"corporate": "Организация"
},
"registration": {
"register": {
"individual": "Регистрация като физическо лице",
"individual-subtitle": "Дарения от този профил, ще се извършват от физическо лице ",
"corporate": "Регистрация като юридическо лице",
"corporate-subtitle": "Дарения от този профил, ще се извършват от името на организацията, която представлявате",
"success": "Регистрацията беше успешна",
"corporate-subtitle-success": "Член от екипа на Podkrepi.bg, ще се свърже с вас, за да потвърдим самоличността на компанията, която представлявате"
}
Expand Down
1 change: 1 addition & 0 deletions public/locales/bg/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"email": "Имейл"
},
"cta": {
"more-information": "Повече информация",
"read-more": "Прочетете още",
"see-profile": "Вижте профил",
"question": "Имате въпрос?"
Expand Down
10 changes: 9 additions & 1 deletion public/locales/en/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@
"corporate": "Organization"
},
"registration": {
"success-title": "Registration successfull",
"success": "Registration successfull",
"corporate-subtitle-success": "Member of Podkrepi.bg, will contact you, to verify the corporation you represent"
},
"register": {
"individual": "Register as individual",
"individual-subtitle": "Donations made by this account, will be done by the individual",
"corporate": "Register as corporation",
"corporate-subtitle": "Donations made by this account, will be done by the represented company",
"success": "Registration successfull",
"corporate-subtitle-success": "Member of Podkrepi.bg, will contact you, to verify the corporation you represent"
}
}
4 changes: 3 additions & 1 deletion public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"continue-with": "Continue with",
"changePassword": "Change your password",
"forgottenPassword": "Forgotten password?",
"go-back": "Go back"
"go-back": "Go back",
"go-back-to-index": "Go back to index page"
},
"meta": {
"title": "Podkrepi.bg"
Expand Down Expand Up @@ -97,6 +98,7 @@
"targetCampaignId": "Target campaign"
},
"cta": {
"more-information": "More information",
"read-more": "Read more",
"see-profile": "See profile",
"question": "Have a question?"
Expand Down
33 changes: 22 additions & 11 deletions src/components/client/auth/register/RegisterPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export default function RegisterPage({ providers }: RegisterPageProps) {
}
if (values.type === AccountType.CORPORATE && isRegistrationSuccessfull) {
setLoading(false)
console.log(`here`)
router.replace({ query: { ...router.query, type: values.type, success: true } })
return
}
Expand Down Expand Up @@ -125,9 +124,24 @@ export default function RegisterPage({ providers }: RegisterPageProps) {
</RadioGroup>
{profileType === AccountType.INDIVIDUAL && (
<>
<Typography sx={{ paddingTop: 1, px: 1 }}>
Регистриране на профил на физическо лице
</Typography>
<Typography sx={{ paddingTop: 1, px: 1 }}>{t('auth:register.individual')}</Typography>
<Tooltip title={t('auth:register.individual-subtitle')} sx={{ padding: 0 }}>
<Button
startIcon={<InfoIcon style={{ width: 20 }} />}
sx={{
paddingTop: 0,
textTransform: 'lowercase',
textDecoration: 'underline',
color: 'black',
'&:hover': {
backgroundColor: '#FFF',
color: 'black',
textDecoration: 'underline',
},
}}>
{t('common:cta.more-information')}
</Button>
</Tooltip>
<ProvidersList providers={providers} />
<Divider
sx={{
Expand All @@ -149,16 +163,13 @@ export default function RegisterPage({ providers }: RegisterPageProps) {
)}
{profileType === AccountType.CORPORATE && (
<>
<Typography sx={{ paddingTop: 1, px: 1 }}>
Регистриране на профил на юридическо лице
</Typography>
<Tooltip
title="Даренията от този профил ще са от името на организацията"
sx={{ padding: 0 }}>
<Typography sx={{ paddingTop: 1, px: 1 }}>{t('auth:register.corporate')}</Typography>
<Tooltip title={t('auth:register.corporate-subtitle')} sx={{ padding: 0 }}>
<Button
startIcon={<InfoIcon style={{ width: 20 }} />}
sx={{
paddingTop: 0,
marginBottom: 2,
textTransform: 'lowercase',
textDecoration: 'underline',
color: 'black',
Expand All @@ -168,7 +179,7 @@ export default function RegisterPage({ providers }: RegisterPageProps) {
textDecoration: 'underline',
},
}}>
Повече информация
{t('common:cta.more-information')}
</Button>
</Tooltip>
<CorporateRegisterForm onSubmit={onSubmit} loading={loading} />
Expand Down

0 comments on commit f536a7d

Please sign in to comment.