Chore/kill yalc with fire (#629)

* init

* more shifting

* Move @babel dependencies up to workspace root

* Begin updating dependent libraries to use sync'd webpack builds w/ watches

* Commit changes before a long weekend

* Split packages into platform and extensions

* Consolidate how/where we specify file/module type entrypoints

* Make it possible to pass in extensions as App props

* Resolve viewer's modules

* Target for UMD bundle

* Add Webpack Stylus loader

* Provide WebPack build options for microscopy, vtk, and ui

* Better entrypoint for extensions

* Push changes up to switch PCs

* Fix ESM symlink build for Viewers

* Shift docs to root

* Specify additional lerna config props

* Begin providing basic readme info

* Rename example extension folder

* Shift links to bottom of doc

* First attempt at a netlify deploy preview

* Attempt to fix deploy preview build

* push workspace enabled to initial command; remove second yarn install; use npx to call gitbook cli commands

* Try to use global gitbook-cli

* Export node_modules path

* More agressive with modifying PATH

* Follow deploy log output advice

* try again to set bin path

* Try swapping bash with a new shell

* Try bash -l instead of exec bash

* Annd let's try again

* and again

* We may have figured it out johnny, boy

* We need to pull cornerstone-wado-image-loader files from hoisted node_modules

* Attempt to fix ticks/escapes

* Change copy syntax; try running tests on viewers from root for circleci

* Lower version to match circleci image

* Try alternative jest-canvas-mock location and version file syntax

* Run version command instead of calling node directly

* Try alternative jest transform

* Set path and enable workspaces

* Add codecov flags

* Use cpx so our copying finishes?

* Get all platform unit tests to run

* Run and report individually and in parallel

* Try once relying on codecov yaml to split w/ flags

* Add projects to split by flags

* Generate separate reports

* Trigger codecov after everything has finished running; these may not support flags

* Use recommended flags from issue comments for codecov

* Fix typo

* Remove clear flag

* Shift back to calling codecov from root

* Generate example for codecov issue

* Try fixing paths

* Simplify

* Try using codecov orb

* Bump circleci version

* Upload core and viewer

* Use full string paths

* Remove individual codecov calls

* Fix dir

* Combine files before upload

* Escape anchors

* tryfix syntax

* Escape string literal

* Combine lines to reduce path

* long paths

* Use home alias

* Fix filename

* Try to see the contents of our cat'd file

* Also upload `core`

* Try running with aliased folder

* Fix path; split PR and Merge unit tests into separate jobs

* Set default threshold

* Fix typo

* Changing to scoped package names

* Adding note

* Catch more updates

* chore(release): publish %s [skip ci]

 - @ohif/extension-cornerstone@0.0.39-alpha.0
 - @ohif/extension-dicom-html@0.0.4-alpha.0
 - @ohif/extension-dicom-microscopy@0.0.9-alpha.0
 - @ohif/extension-dicom-pdf@0.0.8-alpha.0
 - @ohif/extension-vtk@0.1.4-alpha.0
 - @ohif/core@0.11.1-alpha.0
 - @ohif/i18n@0.2.3-alpha.0
 - @ohif/ui@0.2.18-alpha.0
 - @ohif/viewer@0.0.22-alpha.0

* Clean up primary readme

* Support for dev and dev:* commands

* Shift build command; satisfy default PWA build

* Remove old scripts

* Clean up UI to set webpack scripts

* Tidy up project links

* Clean duplicate code in UI project

* Update UI project's docs

* Clean up ui and i18n config

* Reduce duplicate code in `@ohif/core`

* Fix @ohif/ui versions

* bump @ohif/core versions

* Redux testkit dep

* Remove unused/duplicate config files for projects/packages

* ohif-core --> @ohif/core

* Safer publish command

* chore(release): publish %s [skip ci]

 - @ohif/extension-cornerstone@0.0.39-alpha.1
 - @ohif/extension-dicom-html@0.0.4-alpha.1
 - @ohif/extension-dicom-microscopy@0.0.9-alpha.1
 - @ohif/extension-dicom-pdf@0.0.8-alpha.1
 - @ohif/extension-vtk@0.1.4-alpha.1
 - @ohif/core@0.11.1-alpha.1
 - @ohif/i18n@0.2.3-alpha.1
 - @ohif/ui@0.2.18-alpha.1
 - @ohif/viewer@0.0.22-alpha.1

* test version bump

* Add global prettier config

* chore(release): publish %s [skip ci]

 - @ohif/viewer@0.0.22-alpha.2

* test lerna publish

* Update package.jsons

* Fix build scripts

* catch changes

* chore(release): publish %s [skip ci]

 - @ohif/extension-cornerstone@0.0.39-alpha.2
 - @ohif/extension-dicom-html@0.0.4-alpha.2
 - @ohif/extension-dicom-microscopy@0.0.9-alpha.2
 - @ohif/extension-dicom-pdf@0.0.8-alpha.2
 - @ohif/extension-vtk@0.1.4-alpha.2
 - @ohif/core@0.11.1-alpha.2
 - @ohif/i18n@0.2.3-alpha.2
 - @ohif/ui@0.2.18-alpha.2
 - @ohif/viewer@0.0.22-alpha.3

* fix eslint issues caused by eslint 6 and our react-app config

* Publish with canary tag

* chore(release): publish %s [skip ci]

 - @ohif/extension-cornerstone@0.0.39-alpha.3
 - @ohif/extension-dicom-html@0.0.4-alpha.3
 - @ohif/extension-dicom-microscopy@0.0.9-alpha.3
 - @ohif/extension-dicom-pdf@0.0.8-alpha.3
 - @ohif/extension-vtk@0.1.4-alpha.3
 - @ohif/core@0.11.1-alpha.3
 - @ohif/i18n@0.2.3-alpha.3
 - @ohif/ui@0.2.18-alpha.3
 - @ohif/viewer@0.0.22-alpha.4

* chore(release): publish %s [skip ci]

 - @ohif/extension-cornerstone@0.0.39-alpha.4
 - @ohif/extension-dicom-html@0.0.4-alpha.4
 - @ohif/extension-dicom-microscopy@0.0.9-alpha.4
 - @ohif/extension-dicom-pdf@0.0.8-alpha.4
 - @ohif/extension-vtk@0.1.4-alpha.4
 - @ohif/core@0.11.1-alpha.4
 - @ohif/i18n@0.2.3-alpha.4
 - @ohif/ui@0.2.18-alpha.4
 - @ohif/viewer@0.0.22-alpha.5

* Simplify build

* chore(release): publish %s [skip ci]

 - @ohif/extension-cornerstone@0.0.39-alpha.5
 - @ohif/extension-dicom-html@0.0.4-alpha.5
 - @ohif/extension-dicom-microscopy@0.0.9-alpha.5
 - @ohif/extension-dicom-pdf@0.0.8-alpha.5
 - @ohif/extension-vtk@0.1.4-alpha.5
 - @ohif/core@0.11.1-alpha.5
 - @ohif/i18n@0.2.3-alpha.5
 - @ohif/ui@0.2.18-alpha.5
 - @ohif/viewer@0.0.22-alpha.6

* chore(release): publish %s [skip ci]

 - @ohif/extension-cornerstone@0.0.39-alpha.6
 - @ohif/extension-dicom-html@0.0.4-alpha.6
 - @ohif/extension-dicom-microscopy@0.0.9-alpha.6
 - @ohif/extension-dicom-pdf@0.0.8-alpha.6
 - @ohif/extension-vtk@0.1.4-alpha.6
 - @ohif/core@0.11.1-alpha.6
 - @ohif/i18n@0.2.3-alpha.6
 - @ohif/ui@0.2.18-alpha.6
 - @ohif/viewer@0.0.22-alpha.7

* Split version and publish

* chore(release): publish %s [skip ci]

 - @ohif/extension-cornerstone@0.0.39-alpha.7
 - @ohif/extension-dicom-html@0.0.4-alpha.7
 - @ohif/extension-dicom-microscopy@0.0.9-alpha.7
 - @ohif/extension-dicom-pdf@0.0.8-alpha.7
 - @ohif/extension-vtk@0.1.4-alpha.7
 - @ohif/core@0.11.1-alpha.7
 - @ohif/i18n@0.2.3-alpha.7
 - @ohif/ui@0.2.18-alpha.7
 - @ohif/viewer@0.0.22-alpha.8

* Try simplify netlify build

* react-viewerbase --> @ohif/ui

* add test for stylus loader

* Try new way to specify publish path

* Use an output folder that won't be ignored

* Try move command

* fiddle with paths

* Dig for some information

* Make sure we're in root for our commands

* Remove discovery

* Setup script-tag example

* Fix typo

* Move config folder

* Update cornerstone extension to use shared/root webpack configs

* capture changes

* Update extension webpack configs

* Don't check in docz output

* Fix babel runtime resolution issue

* Simplify ui build steps

* Push in progress

* Shift directories

* Get viewer dev path to work

* Fix viewer commonjs build

* Fix build pwa config for viewers

* Make sure our package specific command can be called from root

* Update notes

* Fix imports and misc. merge notes

* Bump wado-image-loader version

* Switch up commands to remove webworkers copy

* Fix CI config

* Fix more broken package references

* Add react-dropzone

* Persist so e2e test can use

* Fix lockfile

* Use cypress orb to simplify CI

* Fix config

* Try again

* Install yarn latest for orb

* Install yarn a different way

* Wait on correct port

* Run tests in viewer project

* Fix cypress config

* Make Cypress happier - use default location

* Simplify e2e testing

* Capture UI changes since fork

* Catch core up

* Grab latest deps after merge

* Fix broken import

* Make sure cornerstone-wado-image-loader resolves to 3+

* Note regarding orbs

* Fix refresh on 404 routes

* Fix odd error for cornerstone-wado-image-loader

* Different target for UMD

* Simplify dev script

* Try to get fancy with netlify output

* Let's do it again

* Try to fix measurementTools issue

* See if we can get our lerna magic to work on merge to monorepo branch
This commit is contained in:
Danny Brown authored and GitHub committed 2019-08-13 15:36:46 -04:00
1 parent cac911f08e
commit 08ff214ea6
919 files changed
+45652 -52097

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
const path = require('path');
const merge = require('webpack-merge');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
//
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-development
mode: 'development',
});
};
+39
View File
@@ -0,0 +1,39 @@
const merge = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-production
mode: 'production',
devtool: 'source-map',
stats: {
colors: true,
hash: true,
timings: true,
assets: true,
chunks: false,
chunkModules: false,
modules: false,
children: false,
warnings: true,
},
optimization: {
minimize: true,
sideEffects: true,
},
output: {
path: ROOT_DIR,
library: 'ohifI18n',
libraryTarget: 'umd',
filename: pkg.main,
},
});
};
+61
View File
@@ -0,0 +1,61 @@
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.2.3-alpha.7](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.2.3-alpha.6...@ohif/i18n@0.2.3-alpha.7) (2019-08-08)
**Note:** Version bump only for package @ohif/i18n
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.2.3-alpha.6](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.2.3-alpha.5...@ohif/i18n@0.2.3-alpha.6) (2019-08-08)
**Note:** Version bump only for package @ohif/i18n
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.2.3-alpha.5](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.2.3-alpha.4...@ohif/i18n@0.2.3-alpha.5) (2019-08-08)
**Note:** Version bump only for package @ohif/i18n
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.2.3-alpha.4](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.2.3-alpha.3...@ohif/i18n@0.2.3-alpha.4) (2019-08-08)
**Note:** Version bump only for package @ohif/i18n
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.2.3-alpha.3](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.2.3-alpha.2...@ohif/i18n@0.2.3-alpha.3) (2019-08-08)
**Note:** Version bump only for package @ohif/i18n
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.2.3-alpha.2](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.2.3-alpha.1...@ohif/i18n@0.2.3-alpha.2) (2019-08-07)
**Note:** Version bump only for package @ohif/i18n
## [0.2.3-alpha.1](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.2.3-alpha.0...@ohif/i18n@0.2.3-alpha.1) (2019-08-07)
**Note:** Version bump only for package @ohif/i18n
## 0.2.3-alpha.0 (2019-08-05)
**Note:** Version bump only for package @ohif/i18n
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 Open Health Imaging Foundation
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.
+4
View File
@@ -0,0 +1,4 @@
# @ohif/i18n
More information available at
[OHIF Docs](https://docs.ohif.org/essentials/translating.html).
+1
View File
@@ -0,0 +1 @@
module.exports = require("../../babel.config.js");
+52
View File
@@ -0,0 +1,52 @@
{
"name": "@ohif/i18n",
"version": "0.2.3-alpha.7",
"description": "Internationalization library for The OHIF Viewer",
"author": "OHIF",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/index.umd.js",
"module": "src/index.js",
"engines": {
"node": ">=8",
"npm": ">=5"
},
"files": [
"dist",
"README.md"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"dev": "webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev:i18n": "yarn run dev",
"build": "webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"prepublishOnly": "yarn run build",
"pullTranslations": "./pullTranslations.sh",
"test:unit": "echo 'platform/i18n: missing unit tests'",
"test:unit:ci": "echo 'platform/i18n: missing unit tests'"
},
"peerDependencies": {
"i18next": "^17.0.3",
"i18next-browser-languagedetector": "^3.0.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-i18next": "^10.11.0"
},
"dependencies": {
"@babel/runtime": "^7.5.5",
"classnames": "^2.2.6",
"i18next-locize-backend": "^2.0.0",
"locize-editor": "^2.0.0",
"locize-lastused": "^1.1.0",
"rollup-plugin-json": "^4.0.0"
},
"devDependencies": {
"i18next": "^15.1.3",
"i18next-browser-languagedetector": "^3.0.1",
"locize-cli": "^4.8.0",
"react-i18next": "^10.11.0"
}
}
+6
View File
@@ -0,0 +1,6 @@
rm -rf src/locales/
mkdir -p src/locales/
cd src/locales/
npx locize --config-path ../../.locize download --ver latest
cd ../../
node ./writeLocaleIndexFiles.js
+24
View File
@@ -0,0 +1,24 @@
const debugMode = !!(
process.env.NODE_ENV !== 'production' && process.env.REACT_APP_I18N_DEBUG
);
const detectionOptions = {
// order and from where user language should be detected
order: ['querystring', 'cookie', 'localStorage', 'navigator', 'htmlTag', 'path', 'subdomain'],
// keys or params to lookup language from
lookupQuerystring: 'lng',
lookupCookie: 'i18next',
lookupLocalStorage: 'i18nextLng',
lookupFromPathIndex: 0,
lookupFromSubdomainIndex: 0,
// cache user language on
caches: ['localStorage', 'cookie'],
excludeCacheFor: ['cimode'], // languages to not persist (cookie, localStorage)
// optional htmlTag with lang attribute, the default is:
htmlTag: document.documentElement
};
export { debugMode, detectionOptions };
+8
View File
@@ -0,0 +1,8 @@
import { debugMode } from './config';
export default (message, level = 'log') => {
if (debugMode) {
// eslint-disable-next-line
console[level]('@ohif/i18n: ', message);
}
};
+140
View File
@@ -0,0 +1,140 @@
import i18n from 'i18next';
import Backend from 'i18next-locize-backend';
import LastUsed from 'locize-lastused';
import Editor from 'locize-editor';
import LanguageDetector from 'i18next-browser-languagedetector';
import { initReactI18next } from 'react-i18next';
import customDebug from './debugger';
import pkg from '../package.json';
import { debugMode, detectionOptions } from './config';
// Note: The index.js files inside src/locales are dynamically generated
// by the pullTranslations.sh script
import locales from './locales';
function addLocales(newLocales) {
customDebug(`Adding locales ${newLocales}`, 'info');
let resourceBundle = [];
Object.keys(newLocales).map(key => {
Object.keys(newLocales[key]).map(namespace => {
const locale = newLocales[key][namespace];
resourceBundle.push({ key, namespace, locale });
i18n.addResourceBundle(key, namespace, locale, true, true);
});
});
customDebug(`Locales added successfully`, 'info');
customDebug(resourceBundle, 'info');
}
// Note: Developers can add the API key to use the in-context editor.
// DO NOT commit the API key
const config = (window.config && window.config.i18n) || {};
const locizeOptions = {
projectId: config.LOCIZE_PROJECTID,
apiKey: config.LOCIZE_API_KEY,
referenceLng: 'en-US',
fallbacklng: 'en-US',
};
const envUseLocize = !!config.USE_LOCIZE;
const envApiKeyAvailable = !!config.LOCIZE_API_KEY;
function initI18n(
detection = detectionOptions,
useLocize = envUseLocize,
apiKeyAvailable = envApiKeyAvailable
) {
let initialized;
if (useLocize) {
customDebug(`Using Locize for translation files`, 'info');
initialized = i18n
// i18next-locize-backend
// loads translations from your project, saves new keys to it (saveMissing: true)
// https://github.com/locize/i18next-locize-backend
.use(Backend)
// locize-lastused
// sets a timestamp of last access on every translation segment on locize
// -> safely remove the ones not being touched for weeks/months
// https://github.com/locize/locize-lastused
.use(LastUsed)
// locize-editor
// InContext Editor of locize ?locize=true to show it
// https://github.com/locize/locize-editor
.use(Editor)
// detect user language
// learn more: https://github.com/i18next/i18next-browser-languageDetector
.use(LanguageDetector)
// pass the i18n instance to react-i18next.
.use(initReactI18next)
// init i18next
// for all options read: https://www.i18next.com/overview/configuration-options
.init({
fallbackLng: 'en-US',
saveMissing: apiKeyAvailable,
debug: debugMode,
keySeparator: false,
interpolation: {
escapeValue: false, // not needed for react as it escapes by default
},
detection,
backend: locizeOptions,
locizeLastUsed: locizeOptions,
editor: {
...locizeOptions,
onEditorSaved: async (lng, ns) => {
// reload that namespace in given language
await i18n.reloadResources(lng, ns);
// trigger an event on i18n which triggers a rerender
// based on bindI18n below in react options
i18n.emit('editorSaved');
},
},
react: {
useSuspense: false, // TODO: Was seeing weird errors without this
wait: true,
bindI18n: 'languageChanged editorSaved',
},
});
} else {
customDebug(`Using local translation files`, 'info');
initialized = i18n
// detect user language
// learn more: https://github.com/i18next/i18next-browser-languageDetector
.use(LanguageDetector)
// pass the i18n instance to react-i18next.
.use(initReactI18next)
// init i18next
// for all options read: https://www.i18next.com/overview/configuration-options
.init({
fallbackLng: 'en-US',
resources: locales,
debug: debugMode,
keySeparator: false,
interpolation: {
escapeValue: false, // not needed for react as it escapes by default
},
detection,
react: {
wait: true,
},
});
}
return initialized.then(function(t) {
i18n.T = t;
customDebug(`T function available.`, 'info');
});
}
customDebug(`version ${pkg.version} loaded.`, 'info');
i18n.initializing = initI18n();
i18n.initI18n = initI18n;
i18n.addLocales = addLocales;
export default i18n;
@@ -0,0 +1,42 @@
{
"Acquired": "Acquired",
"Angle": "Angle",
"Axial": "Axial",
"Bidirectional": "Bidirectional",
"Brush": "Brush",
"CINE": "CINE",
"Cancel": "Cancel",
"Circle": "Circle",
"Clear": "Clear",
"Coronal": "Coronal",
"Crosshairs": "Crosshairs",
"Ellipse": "Ellipse",
"Elliptical": "Elliptical",
"Flip H": "Flip H",
"Flip V": "Flip V",
"Freehand": "Freehand",
"Invert": "Invert",
"Layout": "$t(Common:Layout)",
"Length": "Length",
"Levels": "Levels",
"Magnify": "Magnify",
"Manual": "Manual",
"Measurements": "Measurements",
"More": "$t(Common:More)",
"Next": "$t(Common:Next)",
"Pan": "Pan",
"Play": "$t(Common:Play)",
"Previous": "$t(Common:Previous)",
"Probe": "Probe",
"ROI Window": "ROI Window",
"Rectangle": "Rectangle",
"Reset": "$t(Common:Reset)",
"Reset to Defaults": "$t(Common:Reset) to Defaults",
"Rotate Right": "Rotate Right",
"Sagittal": "Sagittal",
"Save": "Save",
"Stack Scroll": "Stack Scroll",
"Stop": "$t(Common:Stop)",
"Themes": "Themes",
"Zoom": "Zoom"
}
@@ -0,0 +1,8 @@
{
"Next image": "$t(Common:Play) $t(Common:Image)",
"Play / Stop": "$t(Common:Play) / $t(Common:Stop)",
"Previous image": "$t(Common:Previous) $t(Common:Image)",
"Skip to first image": "Skip to first $t(Common:Image)",
"Skip to last image": "Skip, to last $t(Common:Image)",
"fps": "fps"
}
@@ -0,0 +1,15 @@
{
"Image": "Image",
"Layout": "Layout",
"Measurements": "Measurements",
"More": "More",
"Next": "Next",
"Play": "Play",
"Previous": "Previous",
"Reset": "Reset",
"RowsPerPage": "rows per page",
"Series": "Series",
"Show": "Show",
"Stop": "Stop",
"StudyDate": "Study Date"
}
@@ -0,0 +1,8 @@
{
"About": "About",
"Back to Viewer": "Back to Viewer",
"INVESTIGATIONAL USE ONLY": "INVESTIGATIONAL USE ONLY",
"Options": "Options",
"Preferences": "Preferences",
"Study list": "Study list"
}
@@ -0,0 +1,9 @@
{
"Criteria nonconformities": "Criteria nonconformities",
"Delete": "Delete",
"Description": "Description",
"MAX": "MAX",
"NonTargets": "NonTargets",
"Relabel": "Relabel",
"Targets": "Targets"
}
@@ -0,0 +1,10 @@
{
"AccessionNumber": "Accession #",
"Empty": "Empty",
"MRN": "MRN",
"Modality": "Modality",
"PatientName": "Patient Name",
"StudyDate": "Study Date",
"StudyDescription": "Description",
"StudyList": "Study List"
}
@@ -0,0 +1,6 @@
{
"Cancel": "$t(Buttons:Cancel)",
"Reset to Defaults": "$t(Buttons:Reset to Defaults)",
"Save": "$t(Buttons:Save)",
"User Preferences": "User Preferences"
}
+19
View File
@@ -0,0 +1,19 @@
import Buttons from "./Buttons.json";
import CineDialog from "./CineDialog.json";
import Common from "./Common.json";
import Header from "./Header.json";
import MeasurementTable from "./MeasurementTable.json";
import StudyList from "./StudyList.json";
import UserPreferencesModal from "./UserPreferencesModal.json";
export default {
'en-US': {
Buttons,
CineDialog,
Common,
Header,
MeasurementTable,
StudyList,
UserPreferencesModal,
}
};
+42
View File
@@ -0,0 +1,42 @@
{
"Acquired": "Adquirido",
"Angle": "Ángulo",
"Axial": "Axial",
"Bidirectional": "Bidireccional",
"Brush": "Cepillo",
"CINE": "CINE",
"Cancel": "Cancelar",
"Circle": "Círculo",
"Clear": "Limpiar",
"Coronal": "Coronal",
"Crosshairs": "Punto de mira",
"Ellipse": "Elipse",
"Elliptical": "Elíptico",
"Flip H": "Espejo H",
"Flip V": "Espejo V",
"Freehand": "Mano alzada",
"Invert": "Invertir",
"Layout": "$t(Common:Layout)",
"Length": "Longitud",
"Levels": "Niveles",
"Magnify": "Aumentar",
"Manual": "Manual",
"Measurements": "Mediciones",
"More": "$t(Common:More)",
"Next": "$t(Common:Next)",
"Pan": "Mover",
"Play": "$t(Common:Play)",
"Previous": "$t(Common:Previous)",
"Probe": "Probar",
"ROI Window": "Ventana ROI",
"Rectangle": "Rectángulo",
"Reset": "$t(Common:Reset)",
"Reset to Defaults": "$t(Common:Reset) por defecto",
"Rotate Right": "Rotar ->",
"Sagittal": "Sagital",
"Save": "Guardar",
"Stack Scroll": "Scroll en pila",
"Stop": "$t(Common:Stop)",
"Themes": "Temas",
"Zoom": "Zoom"
}
@@ -0,0 +1,8 @@
{
"Next image": " $t(Common:Image) $t(Common:Next)",
"Play / Stop": "$t(Common:Play) / Stop",
"Previous image": "$t(Common:Image) $t(Common:Previous)",
"Skip to first image": "Ir a la primera $t(Common:Image)",
"Skip to last image": "Ir a la última $t(Common:Image)",
"fps": "imágenes/seg."
}
+15
View File
@@ -0,0 +1,15 @@
{
"Image": "Imagen",
"Layout": "Disposición",
"Measurements": "Medidas",
"More": "Más",
"Next": "Siguiente",
"Play": "Play",
"Previous": "Anterior",
"Reset": "Resetear",
"RowsPerPage": "filas por página",
"Series": "Secuencia",
"Show": "Mostrar",
"Stop": "Detener",
"StudyDate": "Fecha de estudo"
}
+8
View File
@@ -0,0 +1,8 @@
{
"About": "Acerca de",
"Back to Viewer": "Volver al visor",
"INVESTIGATIONAL USE ONLY": "SOLO USO PARA INVESTIGACIÓN",
"Options": "Opciones",
"Preferences": "Preferencias",
"Study list": "Lista de estudios"
}
@@ -0,0 +1,9 @@
{
"Criteria nonconformities": "Criterios disconformes",
"Delete": "Borrar",
"Description": "Descripción",
"MAX": "Máximo",
"NonTargets": "No objetivos",
"Relabel": "Re-etiquetar",
"Targets": "Objetivos"
}
@@ -0,0 +1,10 @@
{
"AccessionNumber": "Número de Adhesión",
"Empty": "vacío",
"MRN": "MRN",
"Modality": "Modalidad",
"PatientName": "Nombre del paciente",
"StudyDate": "Fetcha de estudio",
"StudyDescription": "Descripción",
"StudyList": "Lista de Estudio"
}
@@ -0,0 +1,6 @@
{
"Cancel": "$t(Buttons:Cancel)",
"Reset to Defaults": "$t(Buttons:Reset to Defaults)",
"Save": "$t(Buttons:Save)",
"User Preferences": "Preferencias de Usuario"
}
+19
View File
@@ -0,0 +1,19 @@
import Buttons from "./Buttons.json";
import CineDialog from "./CineDialog.json";
import Common from "./Common.json";
import Header from "./Header.json";
import MeasurementTable from "./MeasurementTable.json";
import StudyList from "./StudyList.json";
import UserPreferencesModal from "./UserPreferencesModal.json";
export default {
'es': {
Buttons,
CineDialog,
Common,
Header,
MeasurementTable,
StudyList,
UserPreferencesModal,
}
};
+15
View File
@@ -0,0 +1,15 @@
import en_US from './en-US/';
import es from './es/';
import nl from './nl/';
import pt_BR from './pt-BR/';
import vi from './vi/';
import zh from './zh/';
export default {
...en_US,
...es,
...nl,
...pt_BR,
...vi,
...zh,
};
@@ -0,0 +1,6 @@
{
"Circle": "Cirkel",
"More": "Meer",
"Pan": "Pan",
"Zoom": "Inzoomen"
}
+3
View File
@@ -0,0 +1,3 @@
{
"More": "Meer"
}
+7
View File
@@ -0,0 +1,7 @@
{
"About": "Over",
"INVESTIGATIONAL USE ONLY": "ALLEEN VOOR ONDERZOEK",
"Options": "Opties",
"Preferences": "Voorkeuren",
"Study list": "Studie Overzicht"
}
+11
View File
@@ -0,0 +1,11 @@
import Buttons from "./Buttons.json";
import Common from "./Common.json";
import Header from "./Header.json";
export default {
'nl': {
Buttons,
Common,
Header,
}
};
@@ -0,0 +1,42 @@
{
"Acquired": "Adquirido",
"Angle": "Ângulo",
"Axial": "Axial",
"Bidirectional": "Bidirecional",
"Brush": "Pincel",
"CINE": "CINE",
"Cancel": "Cancelar",
"Circle": "Círculo",
"Clear": "Limpar",
"Coronal": "Coronal",
"Crosshairs": "Localizador",
"Ellipse": "Elipse",
"Elliptical": "Elíptico",
"Flip H": "Inverter H",
"Flip V": "Inverter V",
"Freehand": "Desenho livre",
"Invert": "Inverter",
"Layout": "Layout",
"Length": "Tamanho",
"Levels": "Níveis",
"Magnify": "Ampliar",
"Manual": "Manual",
"Measurements": "Medidas",
"More": "Mais",
"Next": "Próximo",
"Pan": "Arrastar",
"Play": "Tocar",
"Previous": "Anterior",
"Probe": "Prova",
"ROI Window": "Janela ROI",
"Rectangle": "Retângulo",
"Reset": "Resetar",
"Reset to Defaults": "Restaurar para o Padrão",
"Rotate Right": "Girar à direita",
"Sagittal": "Sagital",
"Save": "Salvar",
"Stack Scroll": "Navegar Stacks",
"Stop": "Parar",
"Themes": "Temas",
"Zoom": "Zoom"
}
@@ -0,0 +1,8 @@
{
"Next image": "Próxima imagem",
"Play / Stop": "Tocar / Parar",
"Previous image": "Imagem Anterior",
"Skip to first image": "Pular para a primeira imagem",
"Skip to last image": "Pular para a última imagem",
"fps": "fps"
}
@@ -0,0 +1,10 @@
{
"Image": "Imagem",
"Layout": "Layout",
"More": "Mais",
"Next": "Próximo",
"Play": "Play",
"Previous": "Anterior",
"Reset": "Reset",
"Stop": "Stop"
}
@@ -0,0 +1,8 @@
{
"About": "Quem somos",
"Back to Viewer": "Voltar para o Viewer",
"INVESTIGATIONAL USE ONLY": "APENAS PARA USO INVESTIGATIVO",
"Options": "Opções",
"Preferences": "Preferências",
"Study list": "Lista de estudos"
}
@@ -0,0 +1,6 @@
{
"Cancel": "Cancelar",
"Reset to Defaults": "Restaurar Default",
"Save": "Salvar",
"User Preferences": "Preferências do Usuário"
}
+15
View File
@@ -0,0 +1,15 @@
import Buttons from "./Buttons.json";
import CineDialog from "./CineDialog.json";
import Common from "./Common.json";
import Header from "./Header.json";
import UserPreferencesModal from "./UserPreferencesModal.json";
export default {
'pt-BR': {
Buttons,
CineDialog,
Common,
Header,
UserPreferencesModal,
}
};
+42
View File
@@ -0,0 +1,42 @@
{
"Acquired": "Đã lấy",
"Angle": "Góc",
"Axial": "Trục",
"Bidirectional": "Hai hướng",
"Brush": "Bút lông",
"CINE": "Duyệt tự động",
"Cancel": "Hủy bỏ",
"Circle": "Vòng tròn",
"Clear": "Xóa",
"Coronal": "Mặt phẳng vành",
"Crosshairs": "Vị trí tương quan",
"Ellipse": "Đo Elip",
"Elliptical": "Elip",
"Flip H": "Lật ngang",
"Flip V": "Lật dọc",
"Freehand": "Bằng tay",
"Invert": "Ảnh dương bản",
"Layout": "$t(Common:Layout)",
"Length": "Thước đo chiều dài",
"Levels": "Độ sáng",
"Magnify": "Phóng đại một phần",
"Manual": "Thủ công",
"Measurements": "Đo lường",
"More": "$t(Common:More)",
"Next": "$t(Common:Next)",
"Pan": "Di chuyển",
"Play": "$t(Common:Play)",
"Previous": "$t(Common:Previous)",
"Probe": "Thông tin điểm ảnh",
"ROI Window": "ROI Window",
"Rectangle": "Đo chữ nhật",
"Reset": "$t(Common:Reset)",
"Reset to Defaults": "$t(Common:Reset) đến mặc định",
"Rotate Right": "Xoay phải",
"Sagittal": "Mặt phẳng đứng dọc",
"Save": "Lưu",
"Stack Scroll": "Duyệt",
"Stop": "$t(Common:Stop)",
"Themes": "Giao diện",
"Zoom": "Thu phóng"
}
@@ -0,0 +1,8 @@
{
"Next image": "$t(Common:Play) $t(Common:Image)",
"Play / Stop": "$t(Common:Play) / $t(Common:Stop)",
"Previous image": "$t(Common:Previous) $t(Common:Image)",
"Skip to first image": "Bỏ qua đến đầu $t(Common:Image)",
"Skip to last image": "Bỏ qua đến cuối $t(Common:Image)",
"fps": "fps"
}
+15
View File
@@ -0,0 +1,15 @@
{
"Image": "Ảnh",
"Layout": "Cách bố trí",
"Measurements": "Đo lường",
"More": "Thêm",
"Next": "Tiếp theo",
"Play": "Phát",
"Previous": "Về sau",
"Reset": "Đặt lại",
"RowsPerPage": "trên 1 trang",
"Series": "Tập ảnh",
"Show": "Hiển thị",
"Stop": "Dừng",
"StudyDate": "Ngày chụp"
}
+8
View File
@@ -0,0 +1,8 @@
{
"About": "Về chúng tôi",
"Back to Viewer": "Ảnh vừa xem",
"INVESTIGATIONAL USE ONLY": "Chỉ dùng cho nghiên cứu",
"Options": "Lựa chọn",
"Preferences": "Thiết lập",
"Study list": "Danh sách"
}
@@ -0,0 +1,10 @@
{
"AccessionNumber": "Mã phiểu",
"Empty": "Rỗng",
"MRN": "Mã Bệnh nhân",
"Modality": "Thiết bị",
"PatientName": "Tên Bệnh nhân",
"StudyDate": "Ngày chụp",
"StudyDescription": "Diễn giải",
"StudyList": "Danh sách"
}
@@ -0,0 +1,6 @@
{
"Cancel": "$t(Buttons:Cancel)",
"Reset to Defaults": "$t(Buttons:Reset to Defaults)",
"Save": "$t(Buttons:Save)",
"User Preferences": "Thiết lập theo người dùng"
}
+17
View File
@@ -0,0 +1,17 @@
import Buttons from "./Buttons.json";
import CineDialog from "./CineDialog.json";
import Common from "./Common.json";
import Header from "./Header.json";
import StudyList from "./StudyList.json";
import UserPreferencesModal from "./UserPreferencesModal.json";
export default {
'vi': {
Buttons,
CineDialog,
Common,
Header,
StudyList,
UserPreferencesModal,
}
};
+42
View File
@@ -0,0 +1,42 @@
{
"Acquired": "已获取",
"Angle": "角度",
"Axial": "轴状面",
"Bidirectional": "双向",
"Brush": "橡皮擦",
"CINE": "播放动画",
"Cancel": "取消",
"Circle": "圆",
"Clear": "清除",
"Coronal": "冠状面",
"Crosshairs": "十字线",
"Ellipse": "椭圆",
"Elliptical": "椭圆的",
"Flip H": "左右翻转",
"Flip V": "上下翻转",
"Freehand": "自由画线",
"Invert": "灰度反转",
"Layout": "显示窗口",
"Length": "长度",
"Levels": "层级",
"Magnify": "放大镜",
"Manual": "手动",
"Measurements": "测量",
"More": "更多",
"Next": "下一个",
"Pan": "移动",
"Play": "播放",
"Previous": "上一个",
"Probe": "探针",
"ROI Window": "选择对比度",
"Rectangle": "矩形",
"Reset": "复原",
"Reset to Defaults": "返回默认",
"Rotate Right": "顺时针旋转",
"Sagittal": "矢状面",
"Save": "保存",
"Stack Scroll": "滑动切换图层",
"Stop": "停止",
"Themes": "主题",
"Zoom": "放大"
}
@@ -0,0 +1,8 @@
{
"Next image": "下一个图像",
"Play / Stop": "播放/停止",
"Previous image": "上一个图像",
"Skip to first image": "跳转到第一个图像",
"Skip to last image": "跳转到最后一个图像",
"fps": "帧率"
}
+15
View File
@@ -0,0 +1,15 @@
{
"Image": "图像",
"Layout": "显示窗口",
"Measurements": "测量值",
"More": "更多",
"Next": "下一个",
"Play": "播放",
"Previous": "上一个",
"Reset": "复原",
"RowsPerPage": "每页条数",
"Series": "序列",
"Show": "显示",
"Stop": "停止",
"StudyDate": "时间"
}
+8
View File
@@ -0,0 +1,8 @@
{
"About": "关于",
"Back to Viewer": "返回视图",
"INVESTIGATIONAL USE ONLY": "研究用途",
"Options": "选项",
"Preferences": "偏好",
"Study list": "研究列表"
}
@@ -0,0 +1,9 @@
{
"Criteria nonconformities": "不合标准",
"Delete": "删除",
"Description": "描述",
"MAX": "最大",
"NonTargets": "非靶向",
"Relabel": "重新标记",
"Targets": "靶向"
}
@@ -0,0 +1,8 @@
{
"Empty": "无",
"Modality": "成像设备",
"PatientName": "患者姓名",
"StudyDate": "检查日期",
"StudyDescription": "描述",
"StudyList": "检查列表"
}
@@ -0,0 +1,6 @@
{
"Cancel": "取消",
"Reset to Defaults": "返回默认",
"Save": "保存",
"User Preferences": "用户偏好"
}
+19
View File
@@ -0,0 +1,19 @@
import Buttons from "./Buttons.json";
import CineDialog from "./CineDialog.json";
import Common from "./Common.json";
import Header from "./Header.json";
import MeasurementTable from "./MeasurementTable.json";
import StudyList from "./StudyList.json";
import UserPreferencesModal from "./UserPreferencesModal.json";
export default {
'zh': {
Buttons,
CineDialog,
Common,
Header,
MeasurementTable,
StudyList,
UserPreferencesModal,
}
};
+92
View File
@@ -0,0 +1,92 @@
const path = require('path');
const fs = require('fs');
const directoryPath = path.join(__dirname, 'src', 'locales');
const { lstatSync, readdirSync } = require('fs');
const { join } = require('path');
const isDirectory = source => lstatSync(source).isDirectory();
const getDirectories = source =>
readdirSync(source)
.map(name => join(source, name))
.filter(isDirectory);
const getJSONFiles = source =>
readdirSync(source)
.filter(name => name.includes('.json'))
.map(name => join(source, name))
.filter(a => !isDirectory(a));
const directories = getDirectories(directoryPath);
function writeFile(filepath, name, content) {
fs.writeFile(path.join(filepath, name), content, err => {
if (err) throw err;
});
}
// For each language directory
const languages = [];
directories.forEach(directory => {
const language = path.basename(directory);
languages.push(language);
const name = 'index.js';
// Create one file (index.js) inside the language folder
// For each namespace
let content = '';
const files = getJSONFiles(directory);
const namespaces = files.map(file => path.basename(file, '.json'));
files.forEach(file => {
const filename = path.basename(file);
const namespace = path.basename(file, '.json');
content += `import ${namespace} from "./${filename}";\n`;
});
content += '\n';
let exportLines = `export default { \n '${language}': {\n`;
namespaces.forEach(namespace => {
exportLines += ` ${namespace},\n`;
});
exportLines += ' }\n};';
content += exportLines;
// If the file {namespace}.json is present,
// create a file to import the namespace and
// export all of the namespaces for the language
// e.g.
// import namespace from './{namespace}.json';
// export { namespace1, namespace2, ... }
writeFile(directory, name, content);
});
let fileContent = '';
const languageVariables = languages.map(language => {
const languageVariable = language.replace('-', '_');
fileContent += `import ${languageVariable} from './${language}/';\n`;
return languageVariable;
});
fileContent += '\n';
fileContent += 'export default {\n';
languageVariables.forEach(language => {
fileContent += ` ...${language},\n`;
});
fileContent += '};';
// Create one file (index.js) inside the locales folder
// which exports each of the languages
// e.g.
// import language1 from './{language1}/'
// import language2 from './{language2}/'
//
// export { language1, language2 }
writeFile(directoryPath, 'index.js', fileContent);