VTK extension - i18n implementation.

This commit is contained in:
romulo bordezani committed 2019-06-10 19:33:15 -03:00
commit fe4db3b2c5
11 files changed
+188 -149

No files matched your search

+3 -2
View File
@@ -17,9 +17,9 @@
"prepublishOnly": "npm run build"
},
"peerDependencies": {
"i18next": "^15.1.3",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"i18next": "^15.1.3",
"react-i18next": "^10.11.0"
},
"devDependencies": {
@@ -51,7 +51,8 @@
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-peer-deps-external": "^2.2.0",
"rollup-plugin-postcss": "^2.0.3",
"rollup-plugin-url": "^2.1.0"
"rollup-plugin-url": "^2.1.0",
"i18next-browser-languagedetector": "^3.0.1"
},
"husky": {
"hooks": {
+2
View File
@@ -1,5 +1,6 @@
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LngDetector from 'i18next-browser-languagedetector';
const currentLanguage = process.env.REACT_APP_LANG || 'en-US';
const debugMode = !!(
@@ -63,6 +64,7 @@ function addLocales(context) {
let translate;
i18n
.use(LngDetector)
.use(initReactI18next)
.init({
resources: getLocales(),
@@ -1,5 +1,5 @@
{
"INVESTIGATIONAL USE ONLY": "Preferences",
"INVESTIGATIONAL USE ONLY": "INVESTIGATIONAL USE ONLY",
"Options": "Options",
"About": "About",
"Preferences": "Preferences",
+5
View File
@@ -2404,6 +2404,11 @@ husky@^1.3.1:
run-node "^1.0.0"
slash "^2.0.0"
i18next-browser-languagedetector@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/i18next-browser-languagedetector/-/i18next-browser-languagedetector-3.0.1.tgz#a47c43176e8412c91e808afb7c6eb5367649aa8e"
integrity sha512-WFjPLNPWl62uu07AHY2g+KsC9qz0tyMq+OZEB/H7N58YKL/JLiCz9U709gaR20Mule/Ppn+uyfVx5REJJjn1HA==
i18next@^15.1.3:
version "15.1.3"
resolved "https://registry.yarnpkg.com/i18next/-/i18next-15.1.3.tgz#f1984cbee0e3cb00cff9008b037264289ce8840a"