Merge branch 'master' of https://github.com/OHIF/Viewers into feature/i18n-basics
# Conflicts: # extensions/ohif-vtk-extension/package.json # extensions/ohif-vtk-extension/rollup.config.js # extensions/ohif-vtk-extension/yarn.lock # package.json # src/App.js # src/components/Header/Header.js # yarn.lock
This commit is contained in:
commit
0753e9ec3c
47 files changed
+740
-6555
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ohif-i18n",
|
||||
"version": "0.0.1",
|
||||
"name": "@ohif/i18n",
|
||||
"version": "0.0.2",
|
||||
"description": "OHIF extension for internationalization",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -17,6 +17,8 @@
|
||||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.0.0",
|
||||
"react-dom": "^16.0.0",
|
||||
"i18next": "^15.1.3",
|
||||
"react-i18next": "^10.11.0"
|
||||
},
|
||||
@@ -35,8 +37,12 @@
|
||||
"eslint-plugin-promise": "^4.0.1",
|
||||
"eslint-plugin-react": "^7.11.1",
|
||||
"husky": "^1.3.1",
|
||||
"i18next": "^15.1.3",
|
||||
"lint-staged": "^8.1.0",
|
||||
"prettier": "^1.15.3",
|
||||
"react": "^16.0.0",
|
||||
"react-dom": "^16.0.0",
|
||||
"react-i18next": "^10.11.0",
|
||||
"rollup": "^1.1.2",
|
||||
"rollup-plugin-babel": "^4.2.0",
|
||||
"rollup-plugin-commonjs": "^9.2.0",
|
||||
@@ -67,6 +73,9 @@
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.2.0",
|
||||
"classnames": "^2.2.6"
|
||||
|
||||
@@ -15,6 +15,8 @@ const globals = {
|
||||
'react-redux': 'ReactRedux',
|
||||
'react-resize-detector': 'ReactResizeDetector',
|
||||
'prop-types': 'PropTypes',
|
||||
'i18next': 'i18next',
|
||||
'react-i18next': 'react-i18next',
|
||||
};
|
||||
|
||||
export default {
|
||||
@@ -26,12 +28,14 @@ export default {
|
||||
name: 'ohif-i18n',
|
||||
sourcemap: true,
|
||||
globals,
|
||||
exports: 'named',
|
||||
},
|
||||
{
|
||||
file: pkg.module,
|
||||
format: 'es',
|
||||
sourcemap: true,
|
||||
globals,
|
||||
exports: 'named',
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
@@ -55,5 +59,5 @@ export default {
|
||||
include: ['node_modules/**', '.yalc/**'],
|
||||
}),
|
||||
],
|
||||
external: Object.keys(pkg.peerDependencies || {}),
|
||||
external: Object.keys(pkg.peerDependencies || {})
|
||||
};
|
||||
@@ -1,12 +1,10 @@
|
||||
import i18n from 'i18next';
|
||||
import {
|
||||
initReactI18next,
|
||||
withTranslation,
|
||||
I18nextProvider,
|
||||
} from 'react-i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
|
||||
const currentLanguage = process.env.APP_LANG || 'en-US';
|
||||
const debugMode = process.env.I18N_DEBUG || false;
|
||||
const currentLanguage = process.env.REACT_APP_LANG || 'en-US';
|
||||
const debugMode = !!(
|
||||
process.env.NODE_ENV !== 'production' && process.env.REACT_APP_I18N_DEBUG
|
||||
);
|
||||
|
||||
function getDefaultLanguage() {
|
||||
const mainLanguage = currentLanguage.match(/(.*.)(-)/);
|
||||
@@ -90,5 +88,5 @@ i18n
|
||||
translate = t;
|
||||
});
|
||||
|
||||
export { translate as t, withTranslation, I18nextProvider, addLocales };
|
||||
export { translate as t, addLocales };
|
||||
export default i18n;
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"preferences": "Preferences",
|
||||
"options": "Options",
|
||||
"about": "About",
|
||||
"back_to_viewer": "Back to Viewer",
|
||||
"study_list": "Study list",
|
||||
"research_use": "INVESTIGATIONAL USE ONLY"
|
||||
"INVESTIGATIONAL USE ONLY": "Preferences",
|
||||
"Options": "Options",
|
||||
"About": "About",
|
||||
"Preferences": "Preferences",
|
||||
"Study list": "Study list",
|
||||
"Back to Viewer": "Back to Viewer"
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"research_use": "INVESTIGATIONAL PURPOSES ONLY"
|
||||
"About": "Info"
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
{
|
||||
"options": "Options",
|
||||
"about": "About"
|
||||
"About": "About"
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"research_use": "SOLO USO DE DESAROLLO"
|
||||
"INVESTIGATIONAL USE ONLY": "SOLO USO DE DESAROLLO"
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"research_use": "SOLO USO DE INVESTIGACIÓN",
|
||||
"options": "Opciones",
|
||||
"about": "Sobre",
|
||||
"preferences": "Preferencias",
|
||||
"study_list": "Lista de estudio"
|
||||
"INVESTIGATIONAL USE ONLY": "SOLO USO DE INVESTIGACIÓN",
|
||||
"Options": "Opciones",
|
||||
"About": "Sobre",
|
||||
"Preferences": "Preferencias",
|
||||
"Study list": "Lista de estudio",
|
||||
"Back to Viewer": "Back to Viewer"
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"Opciones": "Elecciones"
|
||||
"INVESTIGATIONAL USE ONLY": "SOLO USO DE INVESTIGACIÓN"
|
||||
}
|
||||
@@ -680,7 +680,7 @@
|
||||
"@babel/plugin-transform-react-jsx-self" "^7.0.0"
|
||||
"@babel/plugin-transform-react-jsx-source" "^7.0.0"
|
||||
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.2.0":
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1":
|
||||
version "7.4.5"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.5.tgz#582bb531f5f9dc67d2fcb682979894f75e253f12"
|
||||
integrity sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ==
|
||||
@@ -2381,6 +2381,13 @@ html-comment-regex@^1.1.0:
|
||||
resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7"
|
||||
integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==
|
||||
|
||||
html-parse-stringify2@2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/html-parse-stringify2/-/html-parse-stringify2-2.0.1.tgz#dc5670b7292ca158b7bc916c9a6735ac8872834a"
|
||||
integrity sha1-3FZwtyksoVi3vJFsmmc1rIhyg0o=
|
||||
dependencies:
|
||||
void-elements "^2.0.1"
|
||||
|
||||
husky@^1.3.1:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/husky/-/husky-1.3.1.tgz#26823e399300388ca2afff11cfa8a86b0033fae0"
|
||||
@@ -2397,6 +2404,13 @@ husky@^1.3.1:
|
||||
run-node "^1.0.0"
|
||||
slash "^2.0.0"
|
||||
|
||||
i18next@^15.1.3:
|
||||
version "15.1.3"
|
||||
resolved "https://registry.yarnpkg.com/i18next/-/i18next-15.1.3.tgz#f1984cbee0e3cb00cff9008b037264289ce8840a"
|
||||
integrity sha512-hN2DZLoRSY2h/RYeNqth5XxV4N1ekKGSJDCGhFmmuXkOCAfK5CkUG4VBv9OBXrvf93xApv0KKBVrb0zJP31EKg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.3.1"
|
||||
|
||||
iconv-lite@^0.4.24:
|
||||
version "0.4.24"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
||||
@@ -3139,7 +3153,7 @@ log-update@^2.3.0:
|
||||
cli-cursor "^2.0.0"
|
||||
wrap-ansi "^3.0.1"
|
||||
|
||||
loose-envify@^1.0.0, loose-envify@^1.4.0:
|
||||
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
||||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
||||
@@ -4056,7 +4070,7 @@ promise.series@^0.2.0:
|
||||
resolved "https://registry.yarnpkg.com/promise.series/-/promise.series-0.2.0.tgz#2cc7ebe959fc3a6619c04ab4dbdc9e452d864bbd"
|
||||
integrity sha1-LMfr6Vn8OmYZwEq029yeRS2GS70=
|
||||
|
||||
prop-types@^15.7.2:
|
||||
prop-types@^15.6.2, prop-types@^15.7.2:
|
||||
version "15.7.2"
|
||||
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
|
||||
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
|
||||
@@ -4125,11 +4139,39 @@ randomfill@^1.0.3:
|
||||
randombytes "^2.0.5"
|
||||
safe-buffer "^5.1.0"
|
||||
|
||||
react-dom@^16.0.0:
|
||||
version "16.8.6"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f"
|
||||
integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
prop-types "^15.6.2"
|
||||
scheduler "^0.13.6"
|
||||
|
||||
react-i18next@^10.11.0:
|
||||
version "10.11.0"
|
||||
resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-10.11.0.tgz#a6854e556d3aff9f5f161b4aa871d43cfff6bd9b"
|
||||
integrity sha512-jmxLZK8mf+KxG3RUIiu/COperTq1c7+iHNsna7LODOYEYaoj6EXFuchOytnB80GoUOb0JC1csT37Zp+U5nPQqQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.3.1"
|
||||
html-parse-stringify2 "2.0.1"
|
||||
|
||||
react-is@^16.8.1:
|
||||
version "16.8.6"
|
||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16"
|
||||
integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==
|
||||
|
||||
react@^16.0.0:
|
||||
version "16.8.6"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe"
|
||||
integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
prop-types "^15.6.2"
|
||||
scheduler "^0.13.6"
|
||||
|
||||
read-pkg-up@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be"
|
||||
@@ -4494,6 +4536,14 @@ sax@~1.2.4:
|
||||
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
|
||||
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
|
||||
|
||||
scheduler@^0.13.6:
|
||||
version "0.13.6"
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889"
|
||||
integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
semver-compare@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
|
||||
@@ -5075,6 +5125,11 @@ vendors@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.3.tgz#a6467781abd366217c050f8202e7e50cc9eef8c0"
|
||||
integrity sha512-fOi47nsJP5Wqefa43kyWSg80qF+Q3XA6MUkgi7Hp1HQaKDQW4cQrK2D0P7mmbFtsV1N89am55Yru/nyEwRubcw==
|
||||
|
||||
void-elements@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec"
|
||||
integrity sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=
|
||||
|
||||
which@^1.2.10, which@^1.2.9:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
|
||||
|
||||
Reference in new issue
Block a user