fix(i18n): Add and update i18n Translation for Toolbar Tool Names (#5392)

This commit is contained in:
毛知劲 | LIS/PACS/RIS 产品负责人 authored and GitHub committed 2025-09-25 10:22:02 -04:00
1 parent add69e5e4f
commit 7783d0f558
51 files changed
+1058 -558

No files matched your search

+44 -39
View File
@@ -1,4 +1,5 @@
import { toolGroupIds } from './initToolGroups';
import i18n from 'i18next';
const setToolActiveToolbar = {
commandName: 'setToolActiveToolbar',
@@ -41,8 +42,8 @@ const toolbarButtons = [
uiType: 'ohif.modalityLoadBadge',
props: {
icon: 'Status',
label: 'Status',
tooltip: 'Status',
label: i18n.t('Buttons:Status'),
tooltip: i18n.t('Buttons:Status'),
evaluate: {
name: 'evaluate.modalityLoadBadge',
hideWhenDisabled: true,
@@ -54,7 +55,7 @@ const toolbarButtons = [
uiType: 'ohif.colorbar',
props: {
type: 'tool',
label: 'Colorbar',
label: i18n.t('Buttons:Colorbar'),
},
},
{
@@ -62,8 +63,8 @@ const toolbarButtons = [
uiType: 'ohif.navigationComponent',
props: {
icon: 'Navigation',
label: 'Navigation',
tooltip: 'Navigate between segments/measurements and manage their visibility',
label: i18n.t('Buttons:Navigation'),
tooltip: i18n.t('Buttons:Navigate between segments/measurements and manage their visibility'),
evaluate: {
name: 'evaluate.navigationComponent',
hideWhenDisabled: true,
@@ -75,8 +76,8 @@ const toolbarButtons = [
uiType: 'ohif.windowLevelMenuEmbedded',
props: {
icon: 'WindowLevel',
label: 'Window Level',
tooltip: 'Adjust window/level presets and customize image contrast settings',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
evaluate: {
name: 'evaluate.windowLevelMenuEmbedded',
hideWhenDisabled: true,
@@ -88,8 +89,8 @@ const toolbarButtons = [
uiType: 'ohif.trackingStatus',
props: {
icon: 'TrackingStatus',
label: 'Tracking Status',
tooltip: 'View and manage tracking status of measurements and annotations',
label: i18n.t('Buttons:Tracking Status'),
tooltip: i18n.t('Buttons:View and manage tracking status of measurements and annotations'),
evaluate: {
name: 'evaluate.trackingStatus',
hideWhenDisabled: true,
@@ -101,8 +102,8 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-length',
label: 'Length',
tooltip: 'Length Tool',
label: i18n.t('Buttons:Length'),
tooltip: i18n.t('Buttons:Length Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -112,8 +113,8 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-bidirectional',
label: 'Bidirectional',
tooltip: 'Bidirectional Tool',
label: i18n.t('Buttons:Bidirectional'),
tooltip: i18n.t('Buttons:Bidirectional Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -123,8 +124,8 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-annotate',
label: 'Arrow Annotate',
tooltip: 'Arrow Annotate Tool',
label: i18n.t('Buttons:Arrow Annotate'),
tooltip: i18n.t('Buttons:Arrow Annotate Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -134,8 +135,8 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-ellipse',
label: 'Ellipse',
tooltip: 'Ellipse Tool',
label: i18n.t('Buttons:Ellipse'),
tooltip: i18n.t('Buttons:Ellipse Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -145,7 +146,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-zoom',
label: 'Zoom',
label: i18n.t('Buttons:Zoom'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -155,7 +156,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-window-level',
label: 'Window Level',
label: i18n.t('Buttons:Window Level'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -165,7 +166,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-crosshair',
label: 'Crosshairs',
label: i18n.t('Buttons:Crosshairs'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -175,7 +176,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-move',
label: 'Pan',
label: i18n.t('Buttons:Pan'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -185,13 +186,13 @@ const toolbarButtons = [
uiType: 'ohif.toolBoxButton',
props: {
icon: 'tool-create-threshold',
label: 'Rectangle ROI Threshold',
label: i18n.t('Buttons:Rectangle ROI Threshold'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstone.segmentation',
{
name: 'evaluate.cornerstoneTool',
disabledText: 'Select the PT Axial to enable this tool',
disabledText: i18n.t('Buttons:Select the PT Axial to enable this tool'),
},
],
options: 'tmtv.RectangleROIThresholdOptions',
@@ -203,11 +204,11 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-brush',
label: 'Brush',
label: i18n.t('Buttons:Brush'),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['CircularBrush', 'SphereBrush'],
disabledText: 'Create new segmentation to enable this tool.',
disabledText: i18n.t('Buttons:Create new segmentation to enable this tool.'),
},
options: [
{
@@ -242,7 +243,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-eraser',
label: 'Eraser',
label: i18n.t('Buttons:Eraser'),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['CircularEraser', 'SphereEraser'],
@@ -280,7 +281,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-threshold',
label: 'Threshold Tool',
label: i18n.t('Buttons:Threshold Tool'),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush'],
@@ -364,8 +365,10 @@ const toolbarButtons = [
uiType: 'ohif.dataOverlayMenu',
props: {
icon: 'ViewportViews',
label: 'Data Overlay',
tooltip: 'Configure data overlay options and manage foreground/background display sets',
label: i18n.t('Buttons:Data Overlay'),
tooltip: i18n.t(
'Buttons:Configure data overlay options and manage foreground/background display sets'
),
evaluate: 'evaluate.dataOverlayMenu',
},
},
@@ -374,8 +377,10 @@ const toolbarButtons = [
uiType: 'ohif.orientationMenu',
props: {
icon: 'OrientationSwitch',
label: 'Orientation',
tooltip: 'Change viewport orientation between axial, sagittal, coronal and reformat planes',
label: i18n.t('Buttons:Orientation'),
tooltip: i18n.t(
'Buttons:Change viewport orientation between axial, sagittal, coronal and reformat planes'
),
evaluate: {
name: 'evaluate.orientationMenu',
// hideWhenDisabled: true,
@@ -387,8 +392,8 @@ const toolbarButtons = [
uiType: 'ohif.windowLevelMenu',
props: {
icon: 'WindowLevel',
label: 'Window Level',
tooltip: 'Adjust window/level presets and customize image contrast settings',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
evaluate: 'evaluate.windowLevelMenu',
},
},
@@ -397,8 +402,8 @@ const toolbarButtons = [
uiType: 'ohif.voiManualControlMenu',
props: {
icon: 'WindowLevelAdvanced',
label: 'Advanced Window Level',
tooltip: 'Advanced window/level settings with manual controls and presets',
label: i18n.t('Buttons:Advanced Window Level'),
tooltip: i18n.t('Buttons:Advanced window/level settings with manual controls and presets'),
evaluate: 'evaluate.voiManualControlMenu',
},
},
@@ -407,8 +412,8 @@ const toolbarButtons = [
uiType: 'ohif.thresholdMenu',
props: {
icon: 'Threshold',
label: 'Threshold',
tooltip: 'Image threshold settings',
label: i18n.t('Buttons:Threshold'),
tooltip: i18n.t('Buttons:Image threshold settings'),
evaluate: {
name: 'evaluate.thresholdMenu',
hideWhenDisabled: true,
@@ -420,8 +425,8 @@ const toolbarButtons = [
uiType: 'ohif.opacityMenu',
props: {
icon: 'Opacity',
label: 'Opacity',
tooltip: 'Image opacity settings',
label: i18n.t('Buttons:Opacity'),
tooltip: i18n.t('Buttons:Image opacity settings'),
evaluate: {
name: 'evaluate.opacityMenu',
hideWhenDisabled: true,