Skip to content

Commit a974fa2

Browse files
authored
Merge pull request #34 from wiziple/versions/0.2.5
Versions/0.2.5
2 parents 95d1ee8 + 4777903 commit a974fa2

File tree

12 files changed

+815
-477
lines changed

12 files changed

+815
-477
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ path | string | language JSON resource path
112112
languages | string[] | supported language keys
113113
defaultLanguage | string | default language when visiting `/page` instead of `ko/page`
114114
redirect | boolean | if the value is `true`, `/` or `/page-2` will be redirected to the user's preferred language router. e.g) `/ko` or `/ko/page-2`. Otherwise, the pages will render `defaultLangugage` language.
115-
redirectComponent | string (Optional) | additional component file path to be rendered on with a redirection component for SEO.
115+
redirectComponent | string (optional) | additional component file path to be rendered on with a redirection component for SEO.
116116

117117

118118
## Components

examples/gatsby-starter-default-intl/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
"version": "0.2.1",
66
"author": "Daewoong Moon <wiziple@gmail.com>",
77
"dependencies": {
8-
"gatsby": "2.8.4",
9-
"gatsby-image": "^2.1.2",
10-
"gatsby-plugin-intl": "^0.2.4",
11-
"gatsby-plugin-manifest": "^2.1.1",
12-
"gatsby-plugin-offline": "^2.1.1",
13-
"gatsby-plugin-react-helmet": "^3.0.12",
14-
"gatsby-plugin-sharp": "^2.1.3",
15-
"gatsby-source-filesystem": "^2.0.38",
16-
"gatsby-transformer-sharp": "^2.1.21",
8+
"gatsby": "^2.11.3",
9+
"gatsby-image": "^2.2.3",
10+
"gatsby-plugin-intl": "^0.2.5",
11+
"gatsby-plugin-manifest": "^2.2.0",
12+
"gatsby-plugin-offline": "^2.2.0",
13+
"gatsby-plugin-react-helmet": "^3.1.0",
14+
"gatsby-plugin-sharp": "^2.2.1",
15+
"gatsby-source-filesystem": "^2.1.1",
16+
"gatsby-transformer-sharp": "^2.2.0",
1717
"prop-types": "^15.7.2",
1818
"react": "^16.8.6",
1919
"react-dom": "^16.8.6",
2020
"react-helmet": "^5.2.1"
2121
},
2222
"devDependencies": {
23-
"prettier": "^1.17.1"
23+
"prettier": "^1.18.2"
2424
},
2525
"keywords": [
2626
"gatsby"

examples/gatsby-starter-default-intl/src/components/layout.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const Layout = ({ children, intl }) => (
4949

5050
Layout.propTypes = {
5151
children: PropTypes.node.isRequired,
52+
intl: PropTypes.object.isRequired,
5253
}
5354

5455
export default injectIntl(Layout)

examples/gatsby-starter-default-intl/src/components/seo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ SEO.defaultProps = {
8989
}
9090

9191
SEO.propTypes = {
92-
description: PropTypes.string,
9392
lang: PropTypes.string,
93+
description: PropTypes.string,
9494
meta: PropTypes.arrayOf(PropTypes.object),
9595
keywords: PropTypes.arrayOf(PropTypes.string),
9696
title: PropTypes.string.isRequired,

examples/gatsby-starter-default-intl/src/pages/404.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ import SEO from "../components/seo"
66

77
const NotFoundPage = ({ intl }) => (
88
<Layout>
9-
<SEO title={`404: ${intl.formatMessage({ id: "title" })}`} />
9+
<SEO
10+
lang={intl.locale}
11+
title={`404: ${intl.formatMessage({ id: "title" })}`}
12+
/>
1013
<h1>
1114
<FormattedMessage id="notfound.header" />
1215
</h1>

examples/gatsby-starter-default-intl/src/pages/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const IndexPage = ({ intl }) => {
88
return (
99
<Layout>
1010
<SEO
11+
lang={intl.locale}
1112
title={intl.formatMessage({ id: "title" })}
1213
keywords={[`gatsby`, `application`, `react`]}
1314
/>

examples/gatsby-starter-default-intl/src/pages/page-2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import SEO from "../components/seo"
66

77
const SecondPage = ({ intl }) => (
88
<Layout>
9-
<SEO title={intl.formatMessage({ id: "title_page2" })} />
9+
<SEO lang={intl.locale} title={intl.formatMessage({ id: "title_page2" })} />
1010
<h1>
1111
<FormattedMessage id="hello_page2" />
1212
</h1>

0 commit comments

Comments
 (0)