feat(frontend/api): i18n support

This commit is contained in:
sct
2020-09-17 16:17:41 +00:00
parent 04252f88bb
commit 9131254f33
22 changed files with 929 additions and 118 deletions

View File

@@ -8,7 +8,8 @@
"build:next": "next build",
"build": "yarn build:next && yarn build:server",
"lint": "eslint \"./server/**/*.{ts,tsx}\" \"./src/**/*.{ts,tsx}\"",
"start": "NODE_ENV=production node dist/index.js"
"start": "NODE_ENV=production node dist/index.js",
"i18n:extract": "extract-messages -l=en,ja -o src/i18n/locale -d en --flat true './src/**/!(*.test).{ts,tsx}'"
},
"dependencies": {
"@svgr/webpack": "^5.4.0",
@@ -21,10 +22,13 @@
"express": "^4.17.1",
"express-openapi-validator": "^3.16.15",
"express-session": "^1.17.1",
"intl": "^1.2.5",
"lodash": "^4.17.20",
"next": "9.5.3",
"nookies": "^2.4.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-intl": "^5.8.1",
"react-spring": "^8.0.27",
"react-toast-notifications": "^2.4.0",
"react-transition-group": "^4.4.1",
@@ -36,6 +40,7 @@
"yamljs": "^0.3.0"
},
"devDependencies": {
"@babel/cli": "^7.11.6",
"@commitlint/cli": "^9.1.2",
"@commitlint/config-conventional": "^9.1.2",
"@types/body-parser": "^1.19.0",
@@ -52,14 +57,18 @@
"@types/yamljs": "^0.2.31",
"@typescript-eslint/eslint-plugin": "^4.0.0",
"@typescript-eslint/parser": "^3.10.1",
"babel-plugin-react-intl": "^8.2.2",
"babel-plugin-react-intl-auto": "^3.3.0",
"commitizen": "^4.2.1",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^7.8.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-formatjs": "^2.7.10",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-hooks": "^4.1.0",
"extract-react-intl-messages": "^4.1.1",
"husky": "^4.3.0",
"lint-staged": "^10.3.0",
"nodemon": "^2.0.4",