-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(i18n): enhanced i18n support #3761
Changes from all commits
3740b4e
f0a31aa
b11d074
223f4d0
d1e9c83
cb885ea
8596553
ade461c
0439c88
77e6df5
63eafb0
65044f6
cf28936
38ffb5e
92d2ca0
c8f0f2c
3437fa0
35c3068
a86a40e
ab4064b
9856587
a76f99f
2f61bde
59991e1
79ed7be
d98a78a
71edb31
df036c3
621fc9a
69d8820
2a8bba6
3898899
6de8cfa
3ff837c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ import { id } from './id'; | |
import initToolGroups from './initToolGroups'; | ||
import moreTools from './moreTools'; | ||
import moreToolsMpr from './moreToolsMpr'; | ||
import i18n from 'i18next'; | ||
|
||
// Allow this mode by excluding non-imaging modalities such as SR, SEG | ||
// Also, SM is not a simple imaging modalities, so exclude it. | ||
|
@@ -63,7 +64,7 @@ function modeFactory() { | |
// We should not be. | ||
id, | ||
routeName: 'basic-test', | ||
displayName: 'Basic Test Mode', | ||
displayName: i18n.t('Modes:Basic Test Mode'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add |
||
/** | ||
* Lifecycle hooks | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { hotkeys } from '@ohif/core'; | ||
import i18n from 'i18next'; | ||
|
||
import { id } from './id'; | ||
import toolbarButtons from './toolbarButtons'; | ||
|
@@ -41,7 +42,7 @@ function modeFactory({ modeConfiguration }) { | |
// We should not be. | ||
id, | ||
routeName: 'microscopy', | ||
displayName: 'Microscopy', | ||
displayName: i18n.t('Modes:Microscopy'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add |
||
|
||
/** | ||
* Lifecycle hooks | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ import { hotkeys } from '@ohif/core'; | |
import { id } from './id'; | ||
import toolbarButtons from './toolbarButtons'; | ||
import initToolGroups from './initToolGroups'; | ||
import i18n from 'i18next'; | ||
|
||
const ohif = { | ||
layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout', | ||
|
@@ -44,7 +45,7 @@ function modeFactory({ modeConfiguration }) { | |
* Mode name, which is displayed in the viewer's UI in the workList, for the | ||
* user to select the mode. | ||
*/ | ||
displayName: 'Segmentation', | ||
displayName: i18n.t('Modes:Segmentation'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add |
||
/** | ||
* Runs when the Mode Route is mounted to the DOM. Usually used to initialize | ||
* Services and other resources. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ import { id } from './id.js'; | |
import initToolGroups, { toolGroupIds } from './initToolGroups.js'; | ||
import setCrosshairsConfiguration from './utils/setCrosshairsConfiguration.js'; | ||
import setFusionActiveVolume from './utils/setFusionActiveVolume.js'; | ||
import i18n from 'i18next'; | ||
|
||
const { MetadataProvider } = classes; | ||
|
||
|
@@ -38,7 +39,7 @@ function modeFactory({ modeConfiguration }) { | |
// We should not be. | ||
id, | ||
routeName: 'tmtv', | ||
displayName: 'Total Metabolic Tumor Volume', | ||
displayName: i18n.t('Modes:Total Metabolic Tumor Volume'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add |
||
/** | ||
* Lifecycle hooks | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"Context": "Context", | ||
"Error Message": "Error Message", | ||
"Something went wrong": "Something went wrong", | ||
"in": "in", | ||
"Sorry, something went wrong there. Try again.": "Sorry, something went wrong there. Try again.", | ||
"Stack Trace": "Stack Trace" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"Field can't be empty": "Field can't be empty", | ||
"Hotkey is already in use": "\"{{action}}\" is already using the \"{{pressedKeys}}\" shortcut.", | ||
"It's not possible to define only modifier keys (ctrl, alt and shift) as a shortcut": "It's not possible to define only modifier keys (ctrl, alt and shift) as a shortcut", | ||
"Shortcut combination is not allowed": "{{pressedKeys}} shortcut combination is not allowed" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"Basic Dev Viewer": "Basic Dev Viewer", | ||
"Basic Test Mode": "Basic Test Mode", | ||
"Basic Viewer": "Basic Viewer", | ||
"Microscopy": "Microscopy", | ||
"Segmentation": "Segmentation", | ||
"Total Metabolic Tumor Volume": "Total Metabolic Tumor Volume" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"Active": "Active", | ||
"Add new segmentation": "Add new segmentation", | ||
"Add segment": "Add segment", | ||
"Add segmentation": "Add segmentation", | ||
"Delete": "Delete", | ||
"Display inactive segmentations": "Display inactive segmentations", | ||
"Export DICOM SEG": "Export DICOM SEG", | ||
"Download DICOM SEG": "Download DICOM SEG", | ||
"Download DICOM RTSTRUCT": "Download DICOM RTSTRUCT", | ||
"Fill": "Fill", | ||
"Inactive segmentations": "Inactive segmentations", | ||
"Opacity": "Opacity", | ||
"Outline": "Outline", | ||
"Rename": "Rename", | ||
"Segmentation": "Segmentation", | ||
"Size": "Size" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"Tracked series": "{{trackedSeries}} Tracked series" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"Series is tracked": "Series is tracked", | ||
"Series is untracked": "Series is untracked", | ||
"Viewport": "Viewport" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"Copied": "Copied", | ||
"Failed to copy": "Failed to copy" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add
Basic Dev Viewer
to Modes.json.