Merge branch 'feature/i18n-basics' of github.com:romulobordezani/Viewers into feature/i18n-basics
This commit is contained in:
commit
59489ae3c6
27 files changed
+757
-206
No files matched your search
@@ -1 +1,54 @@
|
||||
# @ohif/extension-cornerstone
|
||||
|
||||
## Commands
|
||||
|
||||
This extensions includes the following `Commands` and `Command Definitions`. These can be registered with `@ohif/core`'s `CommandManager`. After registering the commands, they can be bound to `hotkeys` using the `HotkeysManager` and listed in the `UserPreferences` modal.
|
||||
|
||||
You can read more about [`Commands`](), [`Hotkeys`](), and the [`UserPreferences` Modal]() in their respective locations in the OHIF Viewer's documentation.
|
||||
|
||||
| Command Name | Description | Store Contexts |
|
||||
| ---------------------------- | ----------- | -------------- |
|
||||
| `rotateViewportCW` | | viewports |
|
||||
| `rotateViewportCCW` | | viewports |
|
||||
| `invertViewport` | | viewports |
|
||||
| `flipViewportVertical` | | viewports |
|
||||
| `flipViewportHorizontal` | | viewports |
|
||||
| `scaleUpViewport` | | viewports |
|
||||
| `scaleDownViewport` | | viewports |
|
||||
| `fitViewportToWindow` | | viewports |
|
||||
| `resetViewport` | | viewports |
|
||||
| clearAnnotations | TODO | |
|
||||
| next/previous Image | TODO | |
|
||||
| first/last Image | TODO | |
|
||||
| `nextViewportDisplaySet` | | none |
|
||||
| `previousViewportDisplaySet` | | none |
|
||||
|
||||
### TODO:
|
||||
|
||||
_SET TOOL_
|
||||
|
||||
- [] Default Tool
|
||||
- [] Set Zoom Tool
|
||||
- [] Set WWWC Tool
|
||||
- [] Set Pan Tool
|
||||
- [] Set Angle Measurement Tool
|
||||
- [] Set Stack Scroll Tool
|
||||
- [] Set Magnify Tool
|
||||
- [] Set Length Tool
|
||||
- [] Set Annotate Tool
|
||||
- [] Set Pixel Probe Tool
|
||||
- [] Set Elliptical ROI Tool
|
||||
- [] Set Rectangle ROI Tool
|
||||
|
||||
_OTHER_
|
||||
|
||||
- Show/Hide CINE
|
||||
- W/L Presets
|
||||
- W/L Presets config
|
||||
|
||||
<!--
|
||||
Links
|
||||
-->
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- prettier-ignore-end -->
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/i18n",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"description": "OHIF extension for internationalization",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -31,6 +31,12 @@ function getKeyForNameSpaces(key) {
|
||||
}
|
||||
|
||||
function getLocales() {
|
||||
const isWebpackEnv = typeof require.context === 'function';
|
||||
// require.context is exclusive from webpack, it's needed to escape inside jest
|
||||
if (!isWebpackEnv) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const context = require.context(`./locales`, true, /\.json$/);
|
||||
const locales = {};
|
||||
|
||||
@@ -85,10 +91,6 @@ customDebug(`version ${pkg.version} loaded.`, 'info');
|
||||
|
||||
initI18n();
|
||||
|
||||
export {
|
||||
translate as t,
|
||||
addLocales,
|
||||
initI18n
|
||||
};
|
||||
export { translate as t, addLocales, initI18n };
|
||||
|
||||
export default i18n;
|
||||
Reference in new issue
Block a user