Skip to content

Commit 6ae59f1

Browse files
committed
Feature(i18n): better i18n support
* better i18n support * better immutable support * upgrade dependencies Fixes #328
1 parent 82f3e2f commit 6ae59f1

File tree

165 files changed

+3482
-4531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+3482
-4531
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
environment:
2-
nodejs_version: "10"
2+
nodejs_version: "11"
33

44
install:
55
- ps: Install-Product node $env:nodejs_version

.babelrc

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
{
22
"presets": [
33
"@babel/preset-env",
4-
"@babel/preset-react"
4+
"@babel/preset-react",
5+
"@babel/preset-typescript"
56
],
6-
"env": {
7-
"development": {
8-
"plugins": [
9-
"react-hot-loader/babel"
10-
]
11-
}
12-
},
137
"plugins": [
8+
[
9+
"@babel/plugin-proposal-class-properties",
10+
{
11+
"loose": true,
12+
}
13+
],
14+
"@babel/plugin-syntax-dynamic-import",
15+
"@babel/plugin-transform-runtime",
16+
"react-hot-loader/babel",
1417
[
1518
"prismjs",
1619
{
@@ -37,7 +40,6 @@
3740
"theme": "default",
3841
"css": true
3942
}
40-
],
41-
"@babel/plugin-syntax-dynamic-import"
43+
]
4244
]
4345
}

.circleci/config.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,22 @@ jobs:
99
build:
1010
working_directory: ~
1111
docker:
12-
- image: circleci/node:10
12+
- image: circleci/node:11
1313
steps:
1414
- checkout
15-
- run:
16-
name: Install System Dependencies
17-
command: sudo apt-get update && sudo apt-get install gcc make libpng12-dev nasm -y
1815
- run:
1916
name: Install Docker client
2017
command: |
2118
set -x
22-
VER="18.06.1-ce"
23-
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
24-
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
19+
VER="18.09.1"
20+
curl -L -o /tmp/docker.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
21+
tar -xz -C /tmp -f /tmp/docker.tgz
2522
sudo cp -r /tmp/docker/* /usr/bin
2623
- run:
2724
name: Install Docker Compose
2825
command: |
2926
set -x
30-
VER="1.22.0"
27+
VER="1.23.2"
3128
curl -L https://github.com/docker/compose/releases/download/$VER/docker-compose-`uname -s`-`uname -m` > /tmp/docker-compose
3229
sudo cp /tmp/docker-compose /usr/local/bin/docker-compose
3330
sudo chmod +x /usr/local/bin/docker-compose

.dockerignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@ coverage/
3131
.coveralls.yml
3232

3333
# Misc
34-
.awcache/
34+
__mocks__/
35+
.circleci/
3536
.github/
3637
node_modules/
3738
dist/
39+
.appveyor.yml
40+
.*lintrc*
41+
.*lintignore*
3842
yarn.lock

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ coverage/
3131
.coveralls.yml
3232

3333
# Misc
34-
.awcache/
3534
node_modules/
3635
dist/
3736

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG PORT=${PORT}
55
WORKDIR /usr/src/app
66
COPY . /usr/src/app/
77

8-
RUN apk add --no-cache --update make gcc g++ libc-dev libpng-dev automake autoconf libtool nasm
8+
RUN apk add --no-cache --update make gcc libc-dev libpng-dev automake autoconf libtool nasm
99
RUN yarn install
1010
RUN yarn build
1111

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
* [x] [react](https://facebook.github.io/react/) - a JavaScript library for building user interfaces
3737
* [x] [react-hot-loader 4](https://github.com/gaearon/react-hot-loader) - hot module reload!
3838
* [x] [react-router 4](https://github.com/ReactTraining/react-router) - declarative routing for React
39-
* [x] [react-redux](https://github.com/reactjs/react-redux) - the official react bindings for [redux 4](https://github.com/reactjs/redux) (a predictable state container for js apps)
39+
* [x] [react-redux 6](https://github.com/reactjs/react-redux) - the official react bindings for [redux 4](https://github.com/reactjs/redux) (a predictable state container for js apps)
4040
* [x] [react-saga](https://github.com/redux-saga/redux-saga/) - make redux asynchronous flows easy to read, write and test, the replacement for [redux-thunk](https://github.com/reduxjs/redux-thunk)
41-
* [x] [connected-react-router](https://github.com/supasate/connected-react-router) - a redux binding for react-router 4, the replacement for [react-router-redux v5](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-redux)
41+
* [x] [connected-react-router 6](https://github.com/supasate/connected-react-router) - a redux binding for react-router 4, the replacement for [react-router-redux v5](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-redux)
4242
* [x] [react-loadable](https://github.com/jamiebuilds/react-loadable) - better user experience for dynamic loading components
4343
* [x] [react-i18next](https://github.com/i18next/react-i18next) - internationalization for react done right
4444
* [x] [immutable.js](https://github.com/facebook/immutable-js/) - persistent Immutable data structures for react redux state management
@@ -106,7 +106,7 @@ On development (with hot reload):
106106
yarn dev
107107
```
108108

109-
On production (with uglify-js and other optimazitions):
109+
On production (with [terser](https://github.com/terser-js/terser) and other optimazitions):
110110

111111
```bash
112112
yarn prod

__mocks__/react-i18next.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const NamespacesConsumer = ({ children }: any) => children((k: string) => k, { i18n: {} });
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"header": {
3+
"react": "React",
4+
"dropdown": "Dropdown",
5+
"notfound": "404"
6+
},
7+
"footer": {
8+
"title": "Footer Content",
9+
"content": "You can use rows and columns here to organize your footer content.",
10+
"links": "Links",
11+
"linkOne": "Link 1",
12+
"linkTwo": "Link 2",
13+
"linkThree": "Link 3",
14+
"linkFour": "Link 4",
15+
"moreLinks": "More Links"
16+
},
17+
"dropdown": {
18+
"parallax": "Parallax"
19+
}
20+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"title": "Home Page",
3+
"carousel": {
4+
"focusButtonText": "Focus me!",
5+
"firstPanelTitle": "First Panel",
6+
"secondPanelTitle": "Second Panel",
7+
"thirdPanelTitle": "Third Panel",
8+
"fourthPanelTitle": "Fourth Panel",
9+
"firstPanelDescription": "This is your first panel, try to swipe it!",
10+
"secondPanelDescription": "This is your second panel, try to swipe it!",
11+
"thirdPanelDescription": "This is your third panel, try to swipe it!",
12+
"fourthPanelDescription": "This is your fourth panel, try to swipe it!",
13+
"tooltipText": "Click me! >. <",
14+
"toastText": "I am a toast!"
15+
},
16+
"pushpin": {
17+
"green": "Green",
18+
"blue": "Blue",
19+
"orange": "Orange",
20+
"red": "Red",
21+
"purple": "Purple",
22+
"cyan": "Cyan",
23+
"linkOne": "Link 1",
24+
"linkTwo": "Link 2"
25+
}
26+
}

0 commit comments

Comments
 (0)