@@ -73,20 +75,20 @@ const AboutModal = ({ buildNumber, versionNumber, commitHash }) => {
);
return (
- {renderRowTitle('Important Links')}
+ {renderRowTitle(t('Important links'))}
- Visit the forum
+ {t('Visit the forum')}
- Report an issue
+ {t('Report an issue')}
@@ -94,50 +96,50 @@ const AboutModal = ({ buildNumber, versionNumber, commitHash }) => {
href="https://ohif.org/"
showIcon={true}
>
- More details
+ {t('More details')}
- {renderRowTitle('Version Information')}
+ {renderRowTitle(t('Version information'))}
{/*
*/}
{buildNumber && (
)}
{commitHash && (
)}
diff --git a/platform/ui/src/components/DateRange/DateRange.tsx b/platform/ui/src/components/DateRange/DateRange.tsx
index 93d81bef18..b93016731d 100644
--- a/platform/ui/src/components/DateRange/DateRange.tsx
+++ b/platform/ui/src/components/DateRange/DateRange.tsx
@@ -1,6 +1,7 @@
import React, { useState, useCallback } from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
+import { useTranslation } from 'react-i18next';
/** REACT DATES */
import { DateRangePicker, isInclusivelyBeforeDay } from 'react-dates';
@@ -8,27 +9,6 @@ import 'react-dates/initialize';
import 'react-dates/lib/css/_datepicker.css';
import './DateRange.css';
-const today = moment();
-const lastWeek = moment().subtract(7, 'day');
-const lastMonth = moment().subtract(1, 'month');
-const studyDatePresets = [
- {
- text: 'Today',
- start: today,
- end: today,
- },
- {
- text: 'Last 7 days',
- start: lastWeek,
- end: today,
- },
- {
- text: 'Last 30 days',
- start: lastMonth,
- end: today,
- },
-];
-
const renderYearsOptions = () => {
const currentYear = moment().year();
const options = [];
@@ -52,6 +32,27 @@ const DateRange = props => {
const { id, onChange, startDate, endDate } = props;
const [focusedInput, setFocusedInput] = useState(null);
const renderYearsOptionsCallback = useCallback(renderYearsOptions, []);
+ const { t } = useTranslation('DatePicker');
+ const today = moment();
+ const lastWeek = moment().subtract(7, 'day');
+ const lastMonth = moment().subtract(1, 'month');
+ const studyDatePresets = [
+ {
+ text: t('Today'),
+ start: today,
+ end: today,
+ },
+ {
+ text: t('Last 7 days'),
+ start: lastWeek,
+ end: today,
+ },
+ {
+ text: t('Last 30 days'),
+ start: lastMonth,
+ end: today,
+ },
+ ];
const renderDatePresets = () => {
return (
@@ -149,11 +150,11 @@ const DateRange = props => {
/** OPTIONAL */
renderCalendarInfo={renderDatePresets}
renderMonthElement={renderMonthElement}
- startDatePlaceholderText={'Start Date'}
- endDatePlaceholderText={'End Date'}
+ startDatePlaceholderText={t('Start Date')}
+ endDatePlaceholderText={t('End Date')}
phrases={{
- closeDatePicker: 'Close',
- clearDates: 'Clear dates',
+ closeDatePicker: t('Close'),
+ clearDates: t('Clear dates'),
}}
isOutsideRange={day => !isInclusivelyBeforeDay(day, moment())}
hideKeyboardShortcutsPanel={true}
diff --git a/platform/ui/src/components/HotkeysPreferences/HotkeysPreferences.tsx b/platform/ui/src/components/HotkeysPreferences/HotkeysPreferences.tsx
index 52cd2da07f..2b9b1eb02d 100644
--- a/platform/ui/src/components/HotkeysPreferences/HotkeysPreferences.tsx
+++ b/platform/ui/src/components/HotkeysPreferences/HotkeysPreferences.tsx
@@ -30,7 +30,7 @@ const HotkeysPreferences = ({
const splitedHotkeys = splitHotkeyDefinitionsAndCreateTuples(visibleHotkeys);
if (!Object.keys(hotkeyDefinitions).length) {
- return 'No hotkey definitions';
+ return t('No hotkeys found');
}
const onHotkeyChangeHandler = (id, definition) => {
diff --git a/platform/ui/src/components/InputLabelWrapper/InputLabelWrapper.tsx b/platform/ui/src/components/InputLabelWrapper/InputLabelWrapper.tsx
index 73172da58c..904b06904e 100644
--- a/platform/ui/src/components/InputLabelWrapper/InputLabelWrapper.tsx
+++ b/platform/ui/src/components/InputLabelWrapper/InputLabelWrapper.tsx
@@ -1,7 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
-import { useTranslation } from 'react-i18next';
import Icon from '../Icon';
@@ -21,8 +20,6 @@ const InputLabelWrapper = ({
className,
children,
}) => {
- const { t } = useTranslation('StudyList');
-
const onClickHandler = e => {
if (!isSortable) {
return;
@@ -40,7 +37,7 @@ const InputLabelWrapper = ({
onKeyDown={onClickHandler}
tabIndex="0"
>
- {t(label)}
+ {label}
{isSortable && (
{
- const { t } = useTranslation('StudyList');
-
return (
{children}
@@ -19,7 +16,7 @@ const StudyListExpandedRow = ({ seriesTableColumns, seriesTableDataSource, child
{Object.keys(seriesTableColumns).map(columnKey => {
- return {t(seriesTableColumns[columnKey])};
+ return {seriesTableColumns[columnKey]};
})}
diff --git a/platform/ui/src/components/StudyListFilter/StudyListFilter.tsx b/platform/ui/src/components/StudyListFilter/StudyListFilter.tsx
index 8abe1d37c8..8db3d8393f 100644
--- a/platform/ui/src/components/StudyListFilter/StudyListFilter.tsx
+++ b/platform/ui/src/components/StudyListFilter/StudyListFilter.tsx
@@ -78,7 +78,7 @@ const StudyListFilter = ({
variant="h6"
className="text-primary-light"
>
- {t('Studies')}
+ {t('Number of studies')}
diff --git a/platform/ui/src/components/StudyListPagination/StudyListPagination.tsx b/platform/ui/src/components/StudyListPagination/StudyListPagination.tsx
index de9067c23b..969af69815 100644
--- a/platform/ui/src/components/StudyListPagination/StudyListPagination.tsx
+++ b/platform/ui/src/components/StudyListPagination/StudyListPagination.tsx
@@ -43,7 +43,7 @@ const StudyListPagination = ({ onChangePage, currentPage, perPage, onChangePerPa
hideSelectedOptions={true}
onChange={onSelectedRange}
/>
-