diff --git a/gatsby-config.js b/gatsby-config.js index b013620..352c8c2 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -79,5 +79,14 @@ module.exports = { includeInDevelopment: false, }, }, + { + resolve: 'gatsby-plugin-intl', + options: { + path: `${__dirname}/src/intl`, + languages: ['en'], + defaultLanguage: 'en', + redirect: false, + }, + }, ], }; diff --git a/package.json b/package.json index fd5e3ab..65d9e4a 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "@modus/react-idle": "^1.1.1", "classnames": "2.2.6", "gatsby": "2.32", + "gatsby-plugin-intl": "^0.3.3", "lazysizes": "^5.3.2", "lodash.get": "4.4.2", "prop-types": "^15.7.2", @@ -55,4 +56,4 @@ "node-sass": "^4.14.1", "prettier": "1.19.1" } -} \ No newline at end of file +} diff --git a/src/components/AnimatedWords/index.js b/src/components/AnimatedWords/index.js index 346f0b7..6325adc 100644 --- a/src/components/AnimatedWords/index.js +++ b/src/components/AnimatedWords/index.js @@ -1,5 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; +import { FormattedMessage } from 'gatsby-plugin-intl'; import s from './styles.module.scss'; const DELAY_TIME = 3; @@ -24,7 +25,7 @@ const AnimatedWords = ({ words }) => ( {words.map((word, idx, arr) => ( - {word} + ))} diff --git a/src/components/ContactHero/index.js b/src/components/ContactHero/index.js index 7ecf408..cbce9c6 100644 --- a/src/components/ContactHero/index.js +++ b/src/components/ContactHero/index.js @@ -1,23 +1,33 @@ import React from 'react'; + +import PropTypes from 'prop-types'; +import { injectIntl, FormattedMessage } from 'gatsby-plugin-intl'; import PrimaryButton from '../PrimaryButton'; import s from './styles.module.scss'; -const ContactHero = () => ( +const ContactHero = ({ intl }) => (
- Ready to collaborate with Modus? + + + +

- Whether you have a new project, idea, or just want to see a sketch come to life we are here to - help your dreams become reality. Multi-disciplinary teams are ready to assist you on any - project type. Just hit us up! +

- - + +
); -export default ContactHero; +ContactHero.propTypes = { + intl: PropTypes.shape({ + formatMessage: PropTypes.func, + }), +}; + +export default injectIntl(ContactHero); diff --git a/src/components/Footer/index.js b/src/components/Footer/index.js index 6c5235a..e50b1fc 100644 --- a/src/components/Footer/index.js +++ b/src/components/Footer/index.js @@ -1,7 +1,9 @@ import React from 'react'; import { Link } from 'gatsby'; +import { FormattedMessage } from 'gatsby-plugin-intl'; import ContactHero from '../ContactHero'; import Logo from '../Logo'; + import s from './styles.module.scss'; const YEAR = new Date().getFullYear(); @@ -20,7 +22,7 @@ const Footer = () => ( Modus Create - . All rights reserved. +
diff --git a/src/components/Header/index.js b/src/components/Header/index.js index d276ee6..910fef7 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -1,19 +1,21 @@ import React from 'react'; +import { FormattedMessage } from 'gatsby-plugin-intl'; import CloudinaryImage from '../LazyImage'; import AnimatedWords from '../AnimatedWords'; import Logo from '../Logo'; + import s from './styles.module.scss'; const WORDS = [ - 'Line of Code', - 'Problem', - 'Persona', - 'Sketch', - 'Pixel', - 'Test', - 'Deployment', - 'Release', - 'Integration', + 'header.animated.line', + 'header.animated.problem', + 'header.animated.persona', + 'header.animated.sketch', + 'header.animated.pixel', + 'header.animated.test', + 'header.animated.deployment', + 'header.animated.release', + 'header.animated.integration', ]; const Header = () => ( @@ -22,14 +24,13 @@ const Header = () => (

-

Changing the world

+

- One + - At A Time + -

Open source community driven experiments

- +

(
-

Project Overview

+

{project.description}
- More Labs +
{data.listing && data.listing.edges.map(({ node }) => ( diff --git a/src/intl/en.json b/src/intl/en.json new file mode 100644 index 0000000..c30a1d2 --- /dev/null +++ b/src/intl/en.json @@ -0,0 +1,45 @@ +{ + "contactHero": { + "title1": "Ready to ", + "title2": " collaborate ", + "title3": " with Modus?", + "subTitle": "Whether you have a new project, idea, or just want to see a sketch come to life we are here to help your dreams become reality. Multi-disciplinary teams are ready to assist you on any project type. Just hit us up!", + "emailUsButton": "Email Us", + "callUsButton": "Call us now" + }, + "footer": { + "rightsReserved": ". All rights reserved." + }, + "header": { + "introHeader": "Changing the world", + "heading1": "One", + "heading2": "At A Time", + "outroHeader": "Open source community driven experiments", + "animated": { + "line": "Line of Code", + "problem": "Problem", + "persona": "Persona", + "sketch": "Sketch", + "pixel": "Pixel", + "test": "Test", + "deployment": "Deployment", + "release": "Release", + "integration": "Integration" + } + }, + "overview": { + "title": "Project Overview", + "subTitle1": "Technology", + "subTitle2": "Tags" + }, + "team": { + "title": "Team" + }, + "projects": { + "title": "More Labs" + }, + "notFoundPage": { + "title": "NOT FOUND", + "subTitle": "You just hit a route that doesn't exist... the sadness." + } +} \ No newline at end of file diff --git a/src/pages/404.js b/src/pages/404.js index 46fa721..fd5df17 100644 --- a/src/pages/404.js +++ b/src/pages/404.js @@ -1,10 +1,12 @@ import React from 'react'; +import { FormattedMessage } from 'gatsby-plugin-intl'; + import Layout from '../components/layout/Home'; const NotFoundPage = () => ( -

NOT FOUND

-

You just hit a route that doesn't exist... the sadness.

+

+

);