Skip to content

Commit

Permalink
feat(gatsby-starter-intl): initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
3nvi committed Mar 27, 2020
1 parent bc5d4bd commit 2b3308f
Show file tree
Hide file tree
Showing 22 changed files with 18,595 additions and 0 deletions.
69 changes: 69 additions & 0 deletions packages/gatsby-starter-intl/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# dotenv environment variable files
.env*

# gatsby files
.cache/
public

# Mac files
.DS_Store

# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity
4 changes: 4 additions & 0 deletions packages/gatsby-starter-intl/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.cache
package.json
package-lock.json
public
7 changes: 7 additions & 0 deletions packages/gatsby-starter-intl/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"endOfLine": "lf",
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5"
}
22 changes: 22 additions & 0 deletions packages/gatsby-starter-intl/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2015 gatsbyjs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

11 changes: 11 additions & 0 deletions packages/gatsby-starter-intl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# `gatsby-starter-intl`

> TODO: description
## Usage

```
const gatsbyStarterIntl = require('gatsby-starter-intl');
// TODO: DEMONSTRATE API
```
7 changes: 7 additions & 0 deletions packages/gatsby-starter-intl/gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/

// You can delete this file if you're not using it
49 changes: 49 additions & 0 deletions packages/gatsby-starter-intl/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const resources = require("./i18n.json")

module.exports = {
siteMetadata: {
title: `Gatsby Starter Intl`,
description: `Kick off your next, great Gatsby i18n project with this starter. It extends gatsby-starter-default.`,
author: `@3nvi`,
},
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `gatsby-starter-intl`,
short_name: `starter`,
start_url: `/`,
background_color: `#663399`,
theme_color: `#663399`,
display: `minimal-ui`,
icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
},
},
`gatsby-plugin-sitemap`,
{
resolve: `@3nvi/gatsby-theme-intl`,
options: {
supportedLanguages: ["en", "el"],
defaultLanguage: "en",
i18nextConfig: {
resources,
},
},
},
`gatsby-plugin-netlify`,

// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
],
}
7 changes: 7 additions & 0 deletions packages/gatsby-starter-intl/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Implement Gatsby's Node APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/node-apis/
*/

// You can delete this file if you're not using it
7 changes: 7 additions & 0 deletions packages/gatsby-starter-intl/gatsby-ssr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/ssr-apis/
*/

// You can delete this file if you're not using it
36 changes: 36 additions & 0 deletions packages/gatsby-starter-intl/i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"en": {
"translation": {
"common": {
"goToHomePage": "Go back to the homepage",
"goToSecondPage": "Go to page 2"
},
"home": {
"greeting": "Hi people",
"details": "Welcome to your new Gatsby site.",
"prompt": "Now go build something great."
},
"secondPage": {
"greeting": "Hi from the second page",
"details": "Welcome to page 2"
}
}
},
"el": {
"translation": {
"common": {
"goToHomePage": "Πίσω στην αρχική",
"goToSecondPage": "2η σελίδα"
},
"home": {
"greeting": "Γεία σας",
"details": "Καλωσήλθατε στο νεο Gatsby site σας",
"prompt": "Πηγαίνετε τώρα να φτιάξετε κάτι σπουδαίοο."
},
"secondPage": {
"greeting": "Γειά απο τη 2η σελίδα",
"details": "Καλωσήλθατε στη 2η σελίδα"
}
}
}
}
Loading

0 comments on commit 2b3308f

Please sign in to comment.