Skip to content

Commit

Permalink
Add newsletter text to locale files
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreAguido authored and Rokt33r committed Nov 20, 2020
1 parent cfdc170 commit 9e9d5df
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 3 deletions.
2 changes: 1 addition & 1 deletion homepage/components/organisms/HeroSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const HeroSection = () => {
fontSize={[3]}
fontWeight={'normal'}
>
Stay up to date with our latest news and products
{t('newsletter.title')}
</Text>
<SubscribeNewsLettersForm />
</Box>
Expand Down
6 changes: 4 additions & 2 deletions homepage/components/organisms/SubscribeNewsLettersForm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState, useCallback, FormEvent, ChangeEvent } from 'react'
import ky from 'ky-universal'
import { useTranslation } from 'react-i18next'

import styled from '../../lib/styled'
import { SpaceProps, space } from 'styled-system'
Expand Down Expand Up @@ -28,6 +29,7 @@ const SubscribeNewsLettersForm = () => {
const [status, setStatus] = useState<Status>('idle')
const [errorMessage, setErrorMessage] = useState<string | null>(null)
const [email, setEmail] = useState('')
const { t } = useTranslation()

const subscribe = useCallback(
async (event: FormEvent<HTMLFormElement>) => {
Expand Down Expand Up @@ -64,7 +66,7 @@ const SubscribeNewsLettersForm = () => {
<>
{status === 'done' ? (
<FlexBox justifyContent='center' mt={2}>
<Text as='p'>Thanks for the subscription!</Text>
<Text as='p'>{t('newsletter.subscribed')}</Text>
</FlexBox>
) : (
<>
Expand All @@ -85,7 +87,7 @@ const SubscribeNewsLettersForm = () => {
fontSize={1}
disabled={status === 'sending'}
>
Subscribe
{t('newsletter.buttonText')}
</Button>
</div>
</form>
Expand Down
5 changes: 5 additions & 0 deletions homepage/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export default {
subtitle:
"Boost Note is an intuitive and stylish markdown editor. It's fully open-source, and used by 1 million developers!",
},
newsletter: {
// title: 'Also, please join our newsletter to get the latest news and update notes.',
// buttonText: 'Subscribe',
// subscribed: 'Thanks for the subscription!'
},
boostHub: {
// title: 'Boost Hub, the team version of Boost Note',
// description1: 'We’ve developed a collaborative workspace app called “Boost Hub” for developer teams.',
Expand Down
5 changes: 5 additions & 0 deletions homepage/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export default {
subtitle:
"Boost Note is an intuitive and stylish markdown editor. It's fully open-source, and used by 1 million developers!",
},
newsletter: {
title: 'Also, please join our newsletter to get the latest news and update notes.',
buttonText: 'Subscribe',
subscribed: 'Thanks for the subscription!'
},
boostHub: {
title: 'Boost Hub, the team version of Boost Note',
description1: 'We’ve developed a collaborative workspace app called “Boost Hub” for developer teams.',
Expand Down
5 changes: 5 additions & 0 deletions homepage/locales/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ export default {
// subtitle:
// "Boost Note is an intuitive and stylish markdown editor. It's fully open-source, and used by 1 million developers!",
},
newsletter: {
// title: 'Also, please join our newsletter to get the latest news and update notes.',
// buttonText: 'Subscribe',
// subscribed: 'Thanks for the subscription!'
},
boostHub: {
// title: 'Boost Hub, the team version of Boost Note',
// description1: 'We’ve developed a collaborative workspace app called “Boost Hub” for developer teams.',
Expand Down
5 changes: 5 additions & 0 deletions homepage/locales/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export default {
subtitle:
"Boost Note is an intuitive and stylish markdown editor. It's fully open-source, and used by 1 million developers!",
},
newsletter: {
// title: 'Also, please join our newsletter to get the latest news and update notes.',
// buttonText: 'Subscribe',
// subscribed: 'Thanks for the subscription!'
},
boostHub: {
// title: 'Boost Hub, the team version of Boost Note',
// description1: 'We’ve developed a collaborative workspace app called “Boost Hub” for developer teams.',
Expand Down
5 changes: 5 additions & 0 deletions homepage/locales/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export default {
// subtitle:
// "Boost Note is an intuitive and stylish markdown editor. It's fully open-source, and used by 1 million developers!",
},
newsletter: {
// title: 'Also, please join our newsletter to get the latest news and update notes.',
// buttonText: 'Subscribe',
// subscribed: 'Thanks for the subscription!'
},
boostHub: {
// title: 'Boost Hub, the team version of Boost Note',
// description1: 'We’ve developed a collaborative workspace app called “Boost Hub” for developer teams.',
Expand Down
5 changes: 5 additions & 0 deletions homepage/locales/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export default {
// subtitle:
// "Boost Note is an intuitive and stylish markdown editor. It's fully open-source, and used by 1 million developers!",
},
newsletter: {
// title: 'Also, please join our newsletter to get the latest news and update notes.',
// buttonText: 'Subscribe',
// subscribed: 'Thanks for the subscription!'
},
boostHub: {
// title: 'Boost Hub, the team version of Boost Note',
// description1: 'We’ve developed a collaborative workspace app called “Boost Hub” for developer teams.',
Expand Down
5 changes: 5 additions & 0 deletions homepage/locales/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export default {
subtitle:
'Een intuïtieve en stijlvolle markdown notitie-app voor ontwikkelaars. Volledig open-source.',
},
newsletter: {
// title: 'Also, please join our newsletter to get the latest news and update notes.',
// buttonText: 'Subscribe',
// subscribed: 'Thanks for the subscription!'
},
boostHub: {
title: 'Kent u Boost Hub al?',
description:
Expand Down
5 changes: 5 additions & 0 deletions homepage/locales/pt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export default {
// subtitle:
// "Boost Note is an intuitive and stylish markdown editor. It's fully open-source, and used by 1 million developers!",
},
newsletter: {
// title: 'Also, please join our newsletter to get the latest news and update notes.',
// buttonText: 'Subscribe',
// subscribed: 'Thanks for the subscription!'
},
boostHub: {
// title: 'Boost Hub, the team version of Boost Note',
// description1: 'We’ve developed a collaborative workspace app called “Boost Hub” for developer teams.',
Expand Down
5 changes: 5 additions & 0 deletions homepage/locales/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export default {
// subtitle:
// "Boost Note is an intuitive and stylish markdown editor. It's fully open-source, and used by 1 million developers!",
},
newsletter: {
// title: 'Also, please join our newsletter to get the latest news and update notes.',
// buttonText: 'Subscribe',
// subscribed: 'Thanks for the subscription!'
},
boostHub: {
// title: 'Boost Hub, the team version of Boost Note',
// description1: 'We’ve developed a collaborative workspace app called “Boost Hub” for developer teams.',
Expand Down
5 changes: 5 additions & 0 deletions homepage/locales/vn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export default {
subtitle:
"Boost Note is an intuitive and stylish markdown editor. It's fully open-source, and used by 1 million developers!",
},
newsletter: {
// title: 'Also, please join our newsletter to get the latest news and update notes.',
// buttonText: 'Subscribe',
// subscribed: 'Thanks for the subscription!'
},
boostHub: {
// title: 'Boost Hub, the team version of Boost Note',
// description1: 'We’ve developed a collaborative workspace app called “Boost Hub” for developer teams.',
Expand Down
5 changes: 5 additions & 0 deletions homepage/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export default {
// subtitle:
// "Boost Note is an intuitive and stylish markdown editor. It's fully open-source, and used by 1 million developers!",
},
newsletter: {
// title: 'Also, please join our newsletter to get the latest news and update notes.',
// buttonText: 'Subscribe',
// subscribed: 'Thanks for the subscription!'
},
boostHub: {
// title: 'Boost Hub, the team version of Boost Note',
// description1: 'We’ve developed a collaborative workspace app called “Boost Hub” for developer teams.',
Expand Down

0 comments on commit 9e9d5df

Please sign in to comment.