- Opacity
+ {t('Opacity')}
{
+ const { t } = useTranslation('SegmentationTable');
const { initialConfig } = segmentationConfig;
const [isMinimized, setIsMinimized] = useState(true);
return (
@@ -144,7 +148,7 @@ const SegmentationConfig = ({
'rotate-90 transform': !isMinimized,
})}
/>
- {'Inactive Segmentations'}
+ {t('Inactive segmentations')}
{!isMinimized && (
{
onSegmentationAdd();
},
@@ -56,7 +58,7 @@ function SegmentationDropDownRow({
...(!disableEditing
? [
{
- title: 'Rename',
+ title: t('Rename'),
onClick: () => {
onSegmentationEdit(activeSegmentation.id);
},
@@ -64,7 +66,7 @@ function SegmentationDropDownRow({
]
: []),
{
- title: 'Delete',
+ title: t('Delete'),
onClick: () => {
onSegmentationDelete(activeSegmentation.id);
},
@@ -72,7 +74,7 @@ function SegmentationDropDownRow({
...(!disableEditing
? [
{
- title: 'Export DICOM SEG',
+ title: t('Export DICOM SEG'),
onClick: () => {
storeSegmentation(activeSegmentation.id);
},
@@ -81,13 +83,13 @@ function SegmentationDropDownRow({
: []),
...[
{
- title: 'Download DICOM SEG',
+ title: t('Download DICOM SEG'),
onClick: () => {
onSegmentationDownload(activeSegmentation.id);
},
},
{
- title: 'Download DICOM RTSTRUCT',
+ title: t('Download DICOM RTSTRUCT'),
onClick: () => {
onSegmentationDownloadRTSS(activeSegmentation.id);
},
diff --git a/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupTable.tsx b/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupTable.tsx
index 295a7951441..2ea0bcb0014 100644
--- a/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupTable.tsx
+++ b/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupTable.tsx
@@ -6,6 +6,7 @@ import SegmentationDropDownRow from './SegmentationDropDownRow';
import NoSegmentationRow from './NoSegmentationRow';
import AddSegmentRow from './AddSegmentRow';
import SegmentationGroupSegment from './SegmentationGroupSegment';
+import { useTranslation } from 'react-i18next';
const SegmentationGroupTable = ({
segmentations,
@@ -70,11 +71,12 @@ const SegmentationGroupTable = ({
const activeSegmentation = segmentations?.find(
segmentation => segmentation.id === activeSegmentationId
);
+ const { t } = useTranslation('SegmentationTable');
return (
Date: Fri, 3 Nov 2023 14:30:33 +0500
Subject: [PATCH 05/29] StudyItem
---
.../i18n/src/locales/en-US/StudyItem.json | 3 +++
platform/i18n/src/locales/en-US/index.js | 2 ++
.../i18n/src/locales/test-LNG/StudyItem.json | 3 +++
platform/i18n/src/locales/test-LNG/index.js | 24 ++++++++++---------
.../ui/src/components/StudyItem/StudyItem.tsx | 4 +++-
5 files changed, 24 insertions(+), 12 deletions(-)
create mode 100644 platform/i18n/src/locales/en-US/StudyItem.json
create mode 100644 platform/i18n/src/locales/test-LNG/StudyItem.json
diff --git a/platform/i18n/src/locales/en-US/StudyItem.json b/platform/i18n/src/locales/en-US/StudyItem.json
new file mode 100644
index 00000000000..410b02966c5
--- /dev/null
+++ b/platform/i18n/src/locales/en-US/StudyItem.json
@@ -0,0 +1,3 @@
+{
+ "Tracked series": "Tracked series"
+}
diff --git a/platform/i18n/src/locales/en-US/index.js b/platform/i18n/src/locales/en-US/index.js
index f3291cbeb5a..5c20690dfa2 100644
--- a/platform/i18n/src/locales/en-US/index.js
+++ b/platform/i18n/src/locales/en-US/index.js
@@ -11,6 +11,7 @@ import MeasurementTable from './MeasurementTable.json';
import SegmentationTable from './SegmentationTable.json';
import SidePanel from './SidePanel.json';
import StudyBrowser from './StudyBrowser.json';
+import StudyItem from './StudyItem.json';
import StudyList from './StudyList.json';
import UserPreferencesModal from './UserPreferencesModal.json';
import ViewportDownloadForm from './ViewportDownloadForm.json';
@@ -31,6 +32,7 @@ export default {
SegmentationTable,
SidePanel,
StudyBrowser,
+ StudyItem,
StudyList,
UserPreferencesModal,
ViewportDownloadForm,
diff --git a/platform/i18n/src/locales/test-LNG/StudyItem.json b/platform/i18n/src/locales/test-LNG/StudyItem.json
new file mode 100644
index 00000000000..5b269802ca9
--- /dev/null
+++ b/platform/i18n/src/locales/test-LNG/StudyItem.json
@@ -0,0 +1,3 @@
+{
+ "Tracked series": "Test Tracked series"
+}
diff --git a/platform/i18n/src/locales/test-LNG/index.js b/platform/i18n/src/locales/test-LNG/index.js
index c5de659417f..4405b22a0b4 100644
--- a/platform/i18n/src/locales/test-LNG/index.js
+++ b/platform/i18n/src/locales/test-LNG/index.js
@@ -7,16 +7,17 @@ import ErrorBoundary from './ErrorBoundary.json';
import Header from './Header.json';
import HotkeysValidators from './HotkeysValidators.json';
import MeasurementTable from './MeasurementTable.json';
+import Modals from './Modals.json';
+import Modes from './Modes.json';
+import PatientInfo from './PatientInfo.json';
import SegmentationTable from './SegmentationTable.json';
+import SidePanel from './SidePanel.json';
+import StudyBrowser from './StudyBrowser.json';
+import StudyItem from './StudyItem.json';
import StudyList from './StudyList.json';
+import ToolTip from './ToolTip.json';
import UserPreferencesModal from './UserPreferencesModal.json';
import ViewportDownloadForm from './ViewportDownloadForm.json';
-import ToolTip from './ToolTip.json';
-import StudyBrowser from './StudyBrowser.json';
-import SidePanel from './SidePanel.json';
-import PatientInfo from './PatientInfo.json';
-import Modes from './Modes.json';
-import Modals from './Modals.json';
export default {
'test-LNG': {
@@ -29,15 +30,16 @@ export default {
Header,
HotkeysValidators,
MeasurementTable,
+ Modals,
+ Modes,
+ PatientInfo,
SegmentationTable,
+ SidePanel,
+ StudyBrowser,
+ StudyItem,
StudyList,
UserPreferencesModal,
ViewportDownloadForm,
ToolTip,
- StudyBrowser,
- PatientInfo,
- Modes,
- SidePanel,
- Modals,
},
};
diff --git a/platform/ui/src/components/StudyItem/StudyItem.tsx b/platform/ui/src/components/StudyItem/StudyItem.tsx
index f382bf652b0..3a435f5fffc 100644
--- a/platform/ui/src/components/StudyItem/StudyItem.tsx
+++ b/platform/ui/src/components/StudyItem/StudyItem.tsx
@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
+import { useTranslation } from 'react-i18next';
import Icon from '../Icon';
@@ -16,6 +17,7 @@ const StudyItem = ({
isActive,
onClick,
}) => {
+ const { t } = useTranslation('StudyItem');
return (
- {trackedSeries} Tracked Series
+ {`${t('Tracked series')}: ${trackedSeries}`}
)}
From cb885ead6d9ee406305a61fe6a844673c4fb976c Mon Sep 17 00:00:00 2001
From: Pavel