diff --git a/Makefile b/Makefile index d47586306d0..fa052930c4d 100755 --- a/Makefile +++ b/Makefile @@ -177,10 +177,17 @@ locales: npx i18next-conv -l ja -s modules/media/locale/ja/LC_MESSAGES/media.po -t modules/media/locale/ja/LC_MESSAGES/media.json npx i18next-conv -l hi -s modules/media/locale/hi/LC_MESSAGES/media.po -t modules/media/locale/hi/LC_MESSAGES/media.json msgfmt -o modules/module_manager/locale/ja/LC_MESSAGES/module_manager.mo modules/module_manager/locale/ja/LC_MESSAGES/module_manager.po + msgfmt -o modules/mri_violations/locale/es/LC_MESSAGES/mri_violations.mo modules/mri_violations/locale/es/LC_MESSAGES/mri_violations.po + msgfmt -o modules/mri_violations/locale/fr/LC_MESSAGES/mri_violations.mo modules/mri_violations/locale/fr/LC_MESSAGES/mri_violations.po msgfmt -o modules/module_manager/locale/hi/LC_MESSAGES/module_manager.mo modules/module_manager/locale/hi/LC_MESSAGES/module_manager.po npx i18next-conv -l hi -s modules/module_manager/locale/hi/LC_MESSAGES/module_manager.po -t modules/module_manager/locale/hi/LC_MESSAGES/module_manager.json npx i18next-conv -l ja -s modules/module_manager/locale/ja/LC_MESSAGES/module_manager.po -t modules/module_manager/locale/ja/LC_MESSAGES/module_manager.json msgfmt -o modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.mo modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.po + msgfmt -o modules/mri_violations/locale/hi/LC_MESSAGES/mri_violations.mo modules/mri_violations/locale/hi/LC_MESSAGES/mri_violations.po + npx i18next-conv -l es -s modules/mri_violations/locale/es/LC_MESSAGES/mri_violations.po -t modules/mri_violations/locale/es/LC_MESSAGES/mri_violations.json + npx i18next-conv -l fr -s modules/mri_violations/locale/fr/LC_MESSAGES/mri_violations.po -t modules/mri_violations/locale/fr/LC_MESSAGES/mri_violations.json + npx i18next-conv -l ja -s modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.po -t modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.json + npx i18next-conv -l hi -s modules/mri_violations/locale/hi/LC_MESSAGES/mri_violations.po -t modules/mri_violations/locale/hi/LC_MESSAGES/mri_violations.json msgfmt -o modules/my_preferences/locale/hi/LC_MESSAGES/my_preferences.mo modules/my_preferences/locale/hi/LC_MESSAGES/my_preferences.po npx i18next-conv -l ja -s modules/my_preferences/locale/ja/LC_MESSAGES/my_preferences.po -t modules/my_preferences/locale/ja/LC_MESSAGES/my_preferences.json --compatibilityJSON v4 npx i18next-conv -l hi -s modules/my_preferences/locale/hi/LC_MESSAGES/my_preferences.po -t modules/my_preferences/locale/hi/LC_MESSAGES/my_preferences.json --compatibilityJSON v4 @@ -239,7 +246,9 @@ login: modules/login/locale/ja/LC_MESSAGES/login.mo module_manager: modules/module_manager/locale/ja/LC_MESSAGES/module_manager.mo modules/module_manager/locale/hi/LC_MESSAGES/module_manager.mo target=module_manager npm run compile -mri_violations: modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.mo +mri_violations: + msgfmt -o modules/mri_violations/locale/hi/LC_MESSAGES/mri_violations.mo modules/mri_violations/locale/hi/LC_MESSAGES/mri_violations.po + npx i18next-conv -l hi -s modules/mri_violations/locale/hi/LC_MESSAGES/mri_violations.po -t modules/mri_violations/locale/hi/LC_MESSAGES/mri_violations.json target=mri_violations npm run compile issue_tracker: diff --git a/locale/es/LC_MESSAGES/loris.po b/locale/es/LC_MESSAGES/loris.po index 623e20b44cb..62c9f22a27a 100644 --- a/locale/es/LC_MESSAGES/loris.po +++ b/locale/es/LC_MESSAGES/loris.po @@ -239,6 +239,12 @@ msgstr "Scan hecho" msgid "Language" msgstr "Lenguaje" +msgid "Access denied" +msgstr "Acceso denegado" + +msgid "No." +msgstr "número" + msgid "Are you sure?" msgstr "Estás seguro?" diff --git a/locale/fr/LC_MESSAGES/loris.po b/locale/fr/LC_MESSAGES/loris.po index 0c41024c664..2dc4add7926 100644 --- a/locale/fr/LC_MESSAGES/loris.po +++ b/locale/fr/LC_MESSAGES/loris.po @@ -241,6 +241,12 @@ msgstr "Scan complété" msgid "Language" msgstr "Langue" +msgid "Access denied" +msgstr "Accès refusé" + +msgid "No." +msgstr "Nombre" + msgid "Are you sure?" msgstr "Es-tu sûr?" diff --git a/locale/hi/LC_MESSAGES/loris.po b/locale/hi/LC_MESSAGES/loris.po index 3234248c808..503bb891aad 100644 --- a/locale/hi/LC_MESSAGES/loris.po +++ b/locale/hi/LC_MESSAGES/loris.po @@ -314,6 +314,9 @@ msgstr "विवरण देखें" msgid "Ethnicity" msgstr "जातीयता" +msgid "Access denied" +msgstr "पहुँच अस्वीकृत" + msgid "Previous" msgstr "पिछला" diff --git a/locale/ja/LC_MESSAGES/loris.po b/locale/ja/LC_MESSAGES/loris.po index eaa1f393a48..3ecbc295230 100644 --- a/locale/ja/LC_MESSAGES/loris.po +++ b/locale/ja/LC_MESSAGES/loris.po @@ -58,6 +58,7 @@ msgstr "私の好み" #: modules/user_accounts/php/module.class.inc:53 msgid "Admin" msgstr "行政上の" + #: modules/acknowledgements/php/module.class.inc:54 #: modules/api_docs/php/module.class.inc:66 #: modules/battery_manager/php/module.class.inc:55 @@ -297,6 +298,12 @@ msgstr "言語" msgid "Ethnicity" msgstr "民族" +msgid "Access denied" +msgstr "アクセスが拒否されました" + +msgid "No." +msgstr "番号" + msgid "Are You Sure?" msgstr "本気ですか?" diff --git a/locale/loris.pot b/locale/loris.pot index b1e668f3f08..78e70d0b56d 100644 --- a/locale/loris.pot +++ b/locale/loris.pot @@ -294,6 +294,12 @@ msgstr "" msgid "Language" msgstr "" +msgid "Access denied" +msgstr "" + +msgid "No." +msgstr "" + msgid "Ethnicity" msgstr "" diff --git a/modules/mri_violations/jsx/mriViolationsIndex.js b/modules/mri_violations/jsx/mriViolationsIndex.js index 9008bf7617c..8ba86f9c275 100644 --- a/modules/mri_violations/jsx/mriViolationsIndex.js +++ b/modules/mri_violations/jsx/mriViolationsIndex.js @@ -3,12 +3,19 @@ import FilterableDataTable from 'FilterableDataTable'; import React, {useEffect, useState} from 'react'; import PropTypes from 'prop-types'; import ProtocolModal from './protocolModal.js'; +import i18n from 'I18nSetup'; +import {withTranslation} from 'react-i18next'; + +import hiStrings from '../locale/hi/LC_MESSAGES/mri_violations.json'; +import jaStrings from '../locale/ja/LC_MESSAGES/mri_violations.json'; +import frStrings from '../locale/fr/LC_MESSAGES/mri_violations.json'; +import esStrings from '../locale/es/LC_MESSAGES/mri_violations.json'; /** * Entry point for the MRI Violatons module. * - * @param {object} props - React Component properties - * @return {JSX} + * @param {object} props - React Component properties + * @return {JSX} */ function MRIViolationsIndex(props) { const [fieldOptions, setFieldOptions] = useState({}); @@ -17,33 +24,39 @@ function MRIViolationsIndex(props) { const [isError, setIsError] = useState(false); const [data, setData] = useState([]); const mapper = columnMapper(fieldOptions); - const violationsModal = (violationModal !== false) ? - setViolationModal(false)} - URL={props.ModuleURL} - SeriesUID={violationModal.SeriesUID} - Type={violationModal.ViolationType} - /> : null; + const {t} = props; - useEffect(() => { - fetch(props.dataURL) - .then((res) => res.json()) - .then( - (result) => { - setIsLoaded(true); - setData(result.Data); - if (setFieldOptions) { - setFieldOptions(result.fieldOptions); - } - }, - (error) => { - setIsError(true); - } - ); - }, []); + const violationsModal = + violationModal !== false ? ( + setViolationModal(false)} + URL={props.ModuleURL} + SeriesUID={violationModal.SeriesUID} + Type={violationModal.ViolationType} + /> + ) : null; + + useEffect( + () => { + fetch(props.dataURL) + .then((res) => res.json()) + .then( + (result) => { + setIsLoaded(true); + setData(result.Data); + if (setFieldOptions) { + setFieldOptions(result.fieldOptions); + } + }, + (error) => { + setIsError(true); + }, + ); + }, [] + ); /** - * onResolutionUpdate + * OnResolutionUpdate * Callback executed when the resolution * status is updated * @@ -52,34 +65,37 @@ function MRIViolationsIndex(props) { */ const onResolutionUpdate = (value, hashname) => { if (value) { - fetch(props.ModuleURL + '/resolve', { - method: 'POST', - mode: 'same-origin', - cache: 'no-cache', - body: JSON.stringify({ - value: value, - hash: hashname, - }), - }).then(() => { + fetch( + props.ModuleURL + '/resolve', { + method: 'POST', + mode: 'same-origin', + cache: 'no-cache', + body: JSON.stringify({ + value: value, + hash: hashname, + }), + }).then(() => { // Update the Resolution Status const filtersData = filters(fieldOptions); - const resolutionStatusfilterIndex = filtersData - .findIndex( - (filter) => filter.label === 'Resolution Status' - ); - const hashfilterIndex = filtersData - .findIndex((filter) => filter.label === 'hash'); - const dataIndex = data - .findIndex((row) => row[hashfilterIndex] === hashname); + const resolutionStatusfilterIndex = filtersData.findIndex( + (filter) => + filter.label === t('Resolution Status', {ns: 'mri_violations'}), + ); + const hashfilterIndex = filtersData.findIndex( + (filter) => filter.label === 'hash', + ); + const dataIndex = data.findIndex( + (row) => row[hashfilterIndex] === hashname, + ); const dataCopy = data.map((row) => row.slice()); dataCopy[dataIndex][resolutionStatusfilterIndex] = value; setData(dataCopy); // Add animation on the updated row - const row = document.getElementById( - `select-resolution-${hashname}` - ).closest('tr'); + const row = document + .getElementById(`select-resolution-${hashname}`) + .closest('tr'); row.classList.add('highlighted'); setTimeout(() => { @@ -96,95 +112,128 @@ function MRIViolationsIndex(props) { * @param {function} setPage - a callback to set the current page * @return {function} a formatter callback which uses mapper for data mapping */ - const formatColumn = ( - mapper, - setPage, - ) => { + const formatColumn = (mapper, setPage) => { const Mapper = function(column, cell, rowData) { cell = mapper(column, cell); const hashname = rowData.hash; + const labelTypeOfProblem = t('Type of Problem', {ns: 'mri_violations'}); + const labelProtocolViolation = t('Protocol Violation', { + ns: 'mri_violations', + }); + const labelCouldNotIdentifyScanType = t('Could not identify scan type', { + ns: 'mri_violations', + }); + const labelResolutionStatus = t('Resolution Status', { + ns: 'mri_violations', + }); + const labelSelectResolution = t('Select Resolution', { + ns: 'mri_violations', + }); + const labelImageFile = t('Image File', {ns: 'mri_violations'}); + const labelSeriesDescriptionOrScanType = t( + 'Series Description or Scan Type', + {ns: 'mri_violations'}, + ); // Create the mapping between rowHeaders and rowData in a row object. let fontColor = {color: '#FFFFFF'}; let resolutionStatusStyle; let resolutionStatus; - if (column === 'Type of Problem' && cell === 'Protocol Violation') { + if ( + (column === 'Type of Problem' || column === labelTypeOfProblem) && + (cell === 'Protocol Violation' || cell === labelProtocolViolation) + ) { return ( - setPage({ - ViolationType: 'protocolcheck', - PatientName: rowData['Patient Name'], - SeriesUID: rowData['Series UID'], - TarchiveID: rowData['TarchiveID'], - CandID: rowData.CandId, - }) - }>Protocol Violation + + setPage({ + ViolationType: 'protocolcheck', + PatientName: rowData[t('Patient Name', {ns: 'mri_violations'}) + ], + SeriesUID: rowData[t('Series UID', {ns: 'mri_violations'})], + TarchiveID: rowData[t('TarchiveID', {ns: 'mri_violations'})], + CandID: rowData.CandID, + }) + } + > + {labelProtocolViolation} + ); } if ( - column === 'Type of Problem' && - cell === 'Could not identify scan type' + (column === 'Type of Problem' || column === labelTypeOfProblem) && + (cell === 'Could not identify scan type' || + cell === labelCouldNotIdentifyScanType) ) { - const seriesDescription = rowData[ - 'Series Description or Scan Type' - ]; + const seriesDescription = rowData[labelSeriesDescriptionOrScanType]; return ( - setPage({ - ViolationType: 'protocolviolation', - PatientName: rowData['Patient Name'], - SeriesUID: rowData['Series UID'], - TarchiveID: rowData['TarchiveId'], - CandID: rowData.CandID, - PSCID: rowData.PSCID, - TimeRun: rowData['Time Run'], - SeriesDescription: seriesDescription, - })} - >Could not identify scan type + + setPage({ + ViolationType: 'protocolviolation', + PatientName: rowData[t('Patient Name', {ns: 'mri_violations'}) + ], + SeriesUID: rowData[t('Series UID', {ns: 'mri_violations'})], + TarchiveID: rowData[t('TarchiveID', {ns: 'mri_violations'})], + CandID: rowData.CandID, + PSCID: rowData.PSCID, + TimeRun: rowData[t('Time Run', {ns: 'mri_violations'})], + SeriesDescription: seriesDescription, + }) + } + > + {labelCouldNotIdentifyScanType} + ); } - if (column === 'Resolution Status') { - switch (rowData['Resolution Status']) { + if (column === 'Resolution Status' || column === labelResolutionStatus) { + switch (rowData[labelResolutionStatus]) { case 'unresolved': fontColor = {color: '#000000'}; - resolutionStatus = 'Unresolved'; + resolutionStatus = t('Unresolved', {ns: 'mri_violations'}); break; case 'reran': resolutionStatusStyle = 'label-success'; - resolutionStatus = 'Reran'; + resolutionStatus = t('Reran', {ns: 'mri_violations'}); break; case 'emailed': resolutionStatusStyle = 'label-info'; - resolutionStatus = 'Emailed site/pending'; + resolutionStatus = t('Emailed site/pending', { + ns: 'mri_violations', + }); break; case 'rejected': resolutionStatusStyle = 'label-danger'; - resolutionStatus = 'Rejected'; + resolutionStatus = t('Rejected', {ns: 'mri_violations'}); break; case 'inserted': resolutionStatusStyle = 'label-warning'; - resolutionStatus = 'Inserted'; + resolutionStatus = t('Inserted', {ns: 'mri_violations'}); break; case 'other': resolutionStatusStyle = 'label-primary'; - resolutionStatus = 'Other'; + resolutionStatus = t('Other', {ns: 'mri_violations'}); break; case 'inserted_flag': resolutionStatusStyle = 'label-default'; - resolutionStatus = 'Inserted with flag'; + resolutionStatus = t('Inserted with flag', { + ns: 'mri_violations', + }); break; } return ( @@ -193,7 +242,7 @@ function MRIViolationsIndex(props) { ); } - if (column === 'Select Resolution') { + if (column === 'Select Resolution' || column === labelSelectResolution) { return ( ); } - if (column === 'Image File') { + if (column === 'Image File' || column === labelImageFile) { let log; - if (rowData['Type of Problem'] === 'Could not identify scan type') { + if (rowData[labelTypeOfProblem] === 'Could not identify scan type') { log = 1; - } else if (rowData['Type of Problem'] === 'Protocol Violation') { + } else if (rowData[labelTypeOfProblem] === 'Protocol Violation') { log = 2; } else { log = 3; } - let url = loris.BaseURL + - '/brainbrowser/?minc_id=' + - log + - 'l' + - rowData.JoinID; + let url = + loris.BaseURL + + '/brainbrowser/?minc_id=' + + log + + 'l' + + rowData.JoinID; return ( - {cell} + + {cell} + ); } - return ({cell}); + return {cell}; }; return Mapper; }; @@ -259,107 +325,129 @@ function MRIViolationsIndex(props) { } return [ { - label: 'Patient Name', show: true, filter: { + label: t('Patient Name', {ns: 'mri_violations'}), + show: true, + filter: { name: 'patientName', type: 'text', }, }, { - label: 'Project', show: true, filter: { + label: t('Project', {ns: 'loris', count: 1}), + show: true, + filter: { name: 'project', type: 'select', options: fieldoptions.projects, }, }, { - label: 'Cohort', show: true, filter: { + label: t('Cohort', {ns: 'loris', count: 1}), + show: true, + filter: { name: 'cohort', type: 'select', options: fieldoptions.cohorts, }, }, { - label: 'Site', show: true, filter: { + label: t('Site', {ns: 'loris', count: 1}), + show: true, + filter: { name: 'site', type: 'select', options: fieldoptions.sites, }, }, { - label: 'Time Run', show: true, filter: { + label: t('Time Run', {ns: 'mri_violations'}), + show: true, + filter: { name: 'timeRun', type: 'datetime', }, }, { - label: 'Image File', show: true, filter: { + label: t('Image File', {ns: 'mri_violations'}), + show: true, + filter: { name: 'mincFile', type: 'text', }, }, { - label: 'Series Description or Scan Type', show: true, filter: { + label: t('Series Description or Scan Type', {ns: 'mri_violations'}), + show: true, + filter: { name: 'seriesOrType', type: 'text', }, }, { - label: 'Type of Problem', show: true, filter: { + label: t('Type of Problem', {ns: 'mri_violations'}), + show: true, + filter: { name: 'typeOfProblem', type: 'select', options: problemtypes, }, }, { - label: 'Resolution Status', show: true, filter: { + label: t('Resolution Status', {ns: 'mri_violations'}), + show: true, + filter: { name: 'resolutionStatus', type: 'select', options: { - 'unresolved': 'Unresolved', - 'reran': 'Reran', - 'emailed': 'emailed site/pending', - 'inserted': 'Inserted', - 'rejected': 'Rejected', - 'inserted_flag': 'Inserted with flag', - 'other': 'Other', + unresolved: t('Unresolved', {ns: 'mri_violations'}), + reran: t('Reran', {ns: 'mri_violations'}), + emailed: t('Emailed site/pending', {ns: 'mri_violations'}), + inserted: t('Inserted', {ns: 'mri_violations'}), + rejected: t('Rejected', {ns: 'mri_violations'}), + inserted_flag: t('Inserted with flag', {ns: 'mri_violations'}), + other: t('Other', {ns: 'mri_violations'}), }, }, }, { - label: 'Series UID', show: false, filter: { + label: t('Series UID', {ns: 'mri_violations'}), + show: false, + filter: { name: 'seriesUID', type: 'text', }, }, - {label: 'hash', show: false}, - {label: 'JoinID', show: false}, - {label: 'TarchiveID', show: false}, - {label: 'CandID', show: false}, - {label: 'PSCID', show: false}, + {label: t('hash', {ns: 'mri_violations'}), show: false}, + {label: t('JoinID', {ns: 'mri_violations'}), show: false}, + {label: t('TarchiveID', {ns: 'mri_violations'}), show: false}, + {label: t('DCCID', {ns: 'loris'}), show: false}, + {label: t('PSCID', {ns: 'loris'}), show: false}, // Add fake column for resolution dropdown - {label: 'Select Resolution', show: true}, + {label: t('Select Resolution', {ns: 'mri_violations'}), show: true}, ]; }; return (
{violationsModal} - {!isLoaded ? - : - isError ? -

An error occurred while loading the page.

: - - } + {!isLoaded ? ( + + ) : isError ? ( +

+ {t('An error occurred while loading the page.', { + ns: 'loris', + })} +

+ ) : ( + + )}
); } @@ -368,6 +456,7 @@ MRIViolationsIndex.propTypes = { ModuleURL: PropTypes.string, SeriesUID: PropTypes.string, dataURL: PropTypes.string, + t: PropTypes.func, }; /** @@ -401,13 +490,19 @@ function columnMapper(fieldOptions) { } window.addEventListener('load', () => { - ReactDOM.createRoot( - document.getElementById('lorisworkspace') - ).render( - , ); }); - diff --git a/modules/mri_violations/jsx/protocolModal.js b/modules/mri_violations/jsx/protocolModal.js index 8e3d542d1c5..b4466495471 100644 --- a/modules/mri_violations/jsx/protocolModal.js +++ b/modules/mri_violations/jsx/protocolModal.js @@ -3,7 +3,7 @@ import StaticDataTable from 'StaticDataTable'; import React, {useEffect, useState} from 'react'; import PropTypes from 'prop-types'; - +import {withTranslation} from 'react-i18next'; /** * A Modal popup to display a protocol violation of any @@ -13,16 +13,18 @@ import PropTypes from 'prop-types'; * @return {JSX} */ function ProtocolModal(props) { + const {t} = props; switch (props.Type) { case 'protocolviolation': - return ; + return ; case 'protocolcheck': - return ; + return ; default: return null; } } ProtocolModal.propTypes = { Type: PropTypes.string, + t: PropTypes.func, }; /** @@ -38,6 +40,7 @@ ProtocolModal.propTypes = { function ProtocolViolationModal(props) { const [data, setData] = useState([]); const [protocols, setMRIProtocols] = useState([]); + const {t} = props; useEffect(() => { fetch(props.URL + '?format=json' + @@ -57,42 +60,43 @@ function ProtocolViolationModal(props) { let violations = []; - let title = 'Violations for SeriesUID ' + props.SeriesUID; + let title = t('Violations for SeriesUID', {ns: 'mri_violations'}) + + ' ' + props.SeriesUID; for (const violation of data) { - title = 'Violations for ' + violation[4]; + title = t('Violations for', {ns: 'mri_violations'}) + ' ' + violation[4]; violations.push(
-
CandID
+
{t('DCCID', {ns: 'loris'})}
{violation[0]}
-
PSCID
+
{t('PSCID', {ns: 'loris'})}
{violation[1]}
-
Time Run
+
{t('Time Run', {ns: 'mri_violations'})}
{violation[2]}
-
Series Description
+
{t('Series Description', {ns: 'mri_violations'})}
{violation[3]}
-
Image Location
+
{t('Image Location', {ns: 'mri_violations'})}
{violation[4]}
-
Patient Name
+
{t('Patient Name', {ns: 'mri_violations'})}
{violation[5]}
-
Series UID
+
{t('Series UID', {ns: 'mri_violations'})}
{props.SeriesUID}
-
Echo Time
+
{t('Echo Time', {ns: 'mri_violations'})}
{violation[8]}
@@ -100,21 +104,21 @@ function ProtocolViolationModal(props) { - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -166,23 +170,23 @@ function ProtocolViolationModal(props) {
Protocol GroupTRTETISlice ThicknessXspaceYspaceZspaceXstepYstepZstepTimeImage TypePhase Encoding DirectionEcho Number{t('Protocol Group', {ns: 'mri_violations'})}{t('TR', {ns: 'mri_violations'})}{t('TE', {ns: 'mri_violations'})}{t('TI', {ns: 'mri_violations'})}{t('Slice Thickness', {ns: 'mri_violations'})}{t('Xspace', {ns: 'mri_violations'})}{t('Yspace', {ns: 'mri_violations'})}{t('Zspace', {ns: 'mri_violations'})}{t('Xstep', {ns: 'mri_violations'})}{t('Ystep', {ns: 'mri_violations'})}{t('Zstep', {ns: 'mri_violations'})}{t('Time', {ns: 'mri_violations'})}{t('Image Type', {ns: 'mri_violations'})}{t('Phase Encoding Direction', {ns: 'mri_violations'})}{t('Echo Number', {ns: 'mri_violations'})}
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -204,7 +208,7 @@ function ProtocolViolationModal(props) {
Center NameScanner IDScan TypeTR RangeTE RangeTI RangeSlice Thickness RangeXspace RangeYspace RangeZspace RangeXstep RangeYstep RangeZstep RangeTime RangeImage TypePhase Encoding DirectionEcho Number{t('Center Name', {ns: 'mri_violations'})}{t('Scanner ID', {ns: 'mri_violations'})}{t('Scan Type', {ns: 'mri_violations'})}{t('TR Range', {ns: 'mri_violations'})}{t('TE Range', {ns: 'mri_violations'})}{t('TI Range', {ns: 'mri_violations'})}{t('Slice Thickness Range', {ns: 'mri_violations'})}{t('Xspace Range', {ns: 'mri_violations'})}{t('Yspace Range', {ns: 'mri_violations'})}{t('Zspace Range', {ns: 'mri_violations'})}{t('Xstep Range', {ns: 'mri_violations'})}{t('Ystep Range', {ns: 'mri_violations'})}{t('Zstep Range', {ns: 'mri_violations'})}{t('Time Range', {ns: 'mri_violations'})}{t('Image Type', {ns: 'mri_violations'})}{t('Phase Encoding Direction', {ns: 'mri_violations'})}{t('Echo Number', {ns: 'mri_violations'})}
{protocol['ScannerID']} {protocol['ScanType']} - Series Description Regex: + {t('Series Description Regex:', {ns: 'mri_violations'})} {protocol['series_description_regex']} @@ -244,9 +248,9 @@ function ProtocolViolationModal(props) { show={true} width="90%" title={title}> -

Image Protocol

+

{t('Image Protocol', {ns: 'mri_violations'})}

{violations} -

Study Protocols

+

{t('Study Protocols', {ns: 'mri_violations'})}

{protocolgroups} ; } @@ -254,6 +258,7 @@ ProtocolViolationModal.propTypes = { URL: PropTypes.string, SeriesUID: PropTypes.string, onClose: PropTypes.func, + t: PropTypes.func, }; /** @@ -268,6 +273,7 @@ ProtocolViolationModal.propTypes = { */ function ProtocolCheckViolationModal(props) { const [data, setData] = useState([]); + const {t} = props; useEffect(() => { fetch(props.URL + '?format=json' + '&violationtype=protocolcheck' + @@ -286,12 +292,20 @@ function ProtocolCheckViolationModal(props) { return -

Scan Problems

- +

{t('Scan Problems', {ns: 'mri_violations'})}

+ @@ -301,5 +315,7 @@ ProtocolCheckViolationModal.propTypes = { URL: PropTypes.string, SeriesUID: PropTypes.string, onClose: PropTypes.func, + t: PropTypes.func, }; -export default ProtocolModal; + +export default withTranslation(['mri_violations', 'loris'])(ProtocolModal); diff --git a/modules/mri_violations/locale/es/LC_MESSAGES/mri_violations.po b/modules/mri_violations/locale/es/LC_MESSAGES/mri_violations.po new file mode 100644 index 00000000000..f8797766b29 --- /dev/null +++ b/modules/mri_violations/locale/es/LC_MESSAGES/mri_violations.po @@ -0,0 +1,214 @@ +# Default LORIS strings to be translated (English). +# Copy this to a language specific file and add translations to the +# new file. +# Copyright (C) 2025 +# This file is distributed under the same license as the LORIS package. +# Dave MacFarlane , 2025. +# +msgid "" +msgstr "" +"Project-Id-Version: LORIS 27\n" +"Report-Msgid-Bugs-To: https://github.com/aces/Loris/issues\n" +"POT-Creation-Date: 2025-04-08 14:37-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "MRI Violated Scans" +msgstr "Escaneos de resonancia magnética violados" + +msgid "Violations for SeriesUID" +msgstr "Infracciones para SeriesUID" + +msgid "Violations for" +msgstr "Violaciones por" + +msgid "Time Run" +msgstr "Ejecución del tiempo" + +msgid "Series Description" +msgstr "Descripción de la serie" + +msgid "Image Location" +msgstr "Ubicación de la imagen" + +msgid "Patient Name" +msgstr "Nombre del paciente" + +msgid "Series UID" +msgstr "UID de serie" + +msgid "Echo Time" +msgstr "Tiempo de eco" + +msgid "Protocol Group" +msgstr "Grupo de protocolo" + +msgid "TR" +msgstr "TR" + +msgid "TE" +msgstr "TE" + +msgid "TI" +msgstr "TI" + +msgid "Slice Thickness" +msgstr "Grosor de la rebanada" + +msgid "Xspace" +msgstr "espacio x" + +msgid "Yspace" +msgstr "Yespacio" + +msgid "Zspace" +msgstr "Espacio Z" + +msgid "Xstep" +msgstr "xpaso" + +msgid "Ystep" +msgstr "Y paso" + +msgid "Zstep" +msgstr "Zpaso" + +msgid "Time" +msgstr "Tiempo" + +msgid "Image Type" +msgstr "Tipo de imagen" + +msgid "Phase Encoding Direction" +msgstr "Dirección de codificación de fase" + +msgid "Echo Number" +msgstr "Número de eco" + +msgid "Image Protocol" +msgstr "Protocolo de imagen" + +msgid "Study Protocols" +msgstr "Protocolos de estudio" + +msgid "Scan Problems" +msgstr "Problemas de escaneo" + +msgid "Scan Type" +msgstr "Tipo de escaneo" + +msgid "Severity" +msgstr "Gravedad" + +msgid "Header" +msgstr "Encabezamiento" + +msgid "Value" +msgstr "Valor" + +msgid "Valid Values" +msgstr "Valores válidos" + +msgid "Protocol Violation" +msgstr "Violación del protocolo" + +msgid "Could not identify scan type" +msgstr "No se pudo identificar el tipo de escaneo." + +msgid "Series Description or Scan Type" +msgstr "Descripción de la serie o tipo de escaneo" + +msgid "Resolution Status" +msgstr "Estado de resolución" + +msgid "Unresolved" +msgstr "Irresoluto" + +msgid "Reran" +msgstr "reran" + +msgid "Emailed site/pending" +msgstr "Sitio enviado por correo electrónico/pendiente" + +msgid "Inserted" +msgstr "Insertado" + +msgid "Rejected" +msgstr "Rechazado" + +msgid "Inserted with flag" +msgstr "Insertado con bandera" + +msgid "Other" +msgstr "Otro" + +msgid "Type of Problem" +msgstr "Tipo de problema" + +msgid "Select Resolution" +msgstr "Seleccionar resolución" + +msgid "Image File" +msgstr "Archivo de imagen" + +msgid "Must submit data in JSON format" +msgstr "Debe enviar los datos en formato JSON." + +msgid "Can not implement filter on a resource type that has no centers." +msgstr "No se puede implementar un filtro en un tipo de recurso que no tenga centros." + +msgid "hash" +msgstr "picadillo" + +msgid "JoinID" +msgstr "UnirseID" + +msgid "TarchiveID" +msgstr "ID de archivo" + +msgid "Center Name" +msgstr "Nombre del centro" + +msgid "Scanner ID" +msgstr "ID del escáner" + +msgid "TR Range" +msgstr "Gama TR" + +msgid "TE Range" +msgstr "LA GAMA" + +msgid "TI Range" +msgstr "Rango TI" + +msgid "Slice Thickness Range" +msgstr "Rango de espesor de rebanada" + +msgid "Xspace Range" +msgstr "Gama Xspace" + +msgid "Yspace Range" +msgstr "Gama Yspace" + +msgid "Zspace Range" +msgstr "Gama Zspace" + +msgid "Xstep Range" +msgstr "Gama Xstep" + +msgid "Ystep Range" +msgstr "Rango de paso Y" + +msgid "Zstep Range" +msgstr "Rango de paso Z" + +msgid "Time Range" +msgstr "Rango de tiempo" + +msgid "Can not implement filter on a resource type that has no projects." +msgstr "No se puede implementar un filtro en un tipo de recurso que no tenga proyectos." diff --git a/modules/mri_violations/locale/fr/LC_MESSAGES/mri_violations.po b/modules/mri_violations/locale/fr/LC_MESSAGES/mri_violations.po new file mode 100644 index 00000000000..4a8a8903f77 --- /dev/null +++ b/modules/mri_violations/locale/fr/LC_MESSAGES/mri_violations.po @@ -0,0 +1,214 @@ +# Default LORIS strings to be translated (English). +# Copy this to a language specific file and add translations to the +# new file. +# Copyright (C) 2025 +# This file is distributed under the same license as the LORIS package. +# Dave MacFarlane , 2025. +# +msgid "" +msgstr "" +"Project-Id-Version: LORIS 27\n" +"Report-Msgid-Bugs-To: https://github.com/aces/Loris/issues\n" +"POT-Creation-Date: 2025-04-08 14:37-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "MRI Violated Scans" +msgstr "MRI Scans violés" + +msgid "Violations for SeriesUID" +msgstr "Violations pour SeriesUID" + +msgid "Violations for" +msgstr "Violations pour" + +msgid "Time Run" +msgstr "Temps d'exécution" + +msgid "Series Description" +msgstr "Description de la série" + +msgid "Image Location" +msgstr "Emplacement de l'image" + +msgid "Patient Name" +msgstr "Nom du patient" + +msgid "Series UID" +msgstr "UID de la série" + +msgid "Echo Time" +msgstr "Temps d'écho" + +msgid "Protocol Group" +msgstr "Groupe de protocole" + +msgid "TR" +msgstr "TR" + +msgid "TE" +msgstr "TE" + +msgid "TI" +msgstr "TI" + +msgid "Slice Thickness" +msgstr "Épaisseur de tranche" + +msgid "Xspace" +msgstr "Xespace" + +msgid "Yspace" +msgstr "Yspace" + +msgid "Zspace" +msgstr "EspaceZ" + +msgid "Xstep" +msgstr "Xétape" + +msgid "Ystep" +msgstr "Étape Y" + +msgid "Zstep" +msgstr "Zétape" + +msgid "Time" +msgstr "Temps" + +msgid "Image Type" +msgstr "Type d'image" + +msgid "Phase Encoding Direction" +msgstr "Direction de codage de phase" + +msgid "Echo Number" +msgstr "Numéro d'écho" + +msgid "Image Protocol" +msgstr "Protocole d'image" + +msgid "Study Protocols" +msgstr "Protocoles d'étude" + +msgid "Scan Problems" +msgstr "Problèmes de numérisation" + +msgid "Scan Type" +msgstr "Type de numérisation" + +msgid "Severity" +msgstr "Gravité" + +msgid "Header" +msgstr "En-tête" + +msgid "Value" +msgstr "Valeur" + +msgid "Valid Values" +msgstr "Valeurs valides" + +msgid "Protocol Violation" +msgstr "Violation du protocole" + +msgid "Could not identify scan type" +msgstr "Type de numérisation non identifié" + +msgid "Series Description or Scan Type" +msgstr "Description de la série ou type de numérisation" + +msgid "Resolution Status" +msgstr "Statut de résolution" + +msgid "Unresolved" +msgstr "Non résolu" + +msgid "Reran" +msgstr "Réexécuter" + +msgid "Emailed site/pending" +msgstr "Site envoyé par courriel/en attente" + +msgid "Inserted" +msgstr "Inséré" + +msgid "Rejected" +msgstr "Rejeté" + +msgid "Inserted with flag" +msgstr "Inséré avec un drapeau" + +msgid "Other" +msgstr "Autre" + +msgid "Type of Problem" +msgstr "Type de problème" + +msgid "Select Resolution" +msgstr "Sélectionnez la résolution" + +msgid "Image File" +msgstr "Fichier image" + +msgid "Must submit data in JSON format" +msgstr "Les données doivent être soumises au format JSON." + +msgid "Can not implement filter on a resource type that has no centers." +msgstr "Impossible d'appliquer un filtre à un type de ressource sans centre." + +msgid "hash" +msgstr "hacher" + +msgid "JoinID" +msgstr "ID de jointure" + +msgid "TarchiveID" +msgstr "TarchiveID" + +msgid "Center Name" +msgstr "Nom du centre" + +msgid "Scanner ID" +msgstr "ID du scanner" + +msgid "TR Range" +msgstr "Gamme TR" + +msgid "TE Range" +msgstr "LA GAMME" + +msgid "TI Range" +msgstr "Gamme TI" + +msgid "Slice Thickness Range" +msgstr "Plage d'épaisseur de tranche" + +msgid "Xspace Range" +msgstr "Gamme Xspace" + +msgid "Yspace Range" +msgstr "Gamme Yspace" + +msgid "Zspace Range" +msgstr "Gamme Zspace" + +msgid "Xstep Range" +msgstr "Gamme Xstep" + +msgid "Ystep Range" +msgstr "Plage Ystep" + +msgid "Zstep Range" +msgstr "Plage de pas Z" + +msgid "Time Range" +msgstr "Plage de temps" + +msgid "Can not implement filter on a resource type that has no projects." +msgstr "Impossible d'appliquer un filtre à un type de ressource qui ne comporte aucun projet." diff --git a/modules/mri_violations/locale/hi/LC_MESSAGES/mri_violations.po b/modules/mri_violations/locale/hi/LC_MESSAGES/mri_violations.po new file mode 100644 index 00000000000..448e92ea393 --- /dev/null +++ b/modules/mri_violations/locale/hi/LC_MESSAGES/mri_violations.po @@ -0,0 +1,214 @@ +# Default LORIS strings to be translated (English). +# Copy this to a language specific file and add translations to the +# new file. +# Copyright (C) 2025 +# This file is distributed under the same license as the LORIS package. +# Dave MacFarlane , 2025. +# +msgid "" +msgstr "" +"Project-Id-Version: LORIS 27\n" +"Report-Msgid-Bugs-To: https://github.com/aces/Loris/issues\n" +"POT-Creation-Date: 2025-04-08 14:37-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: hi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "MRI Violated Scans" +msgstr "एमआरआई उल्लंघन स्कैन" + +msgid "Violations for SeriesUID" +msgstr "सीरीज़UID के लिए उल्लंघन" + +msgid "Violations for" +msgstr "के लिए उल्लंघन" + +msgid "Time Run" +msgstr "चलने का समय" + +msgid "Series Description" +msgstr "श्रृंखला विवरण" + +msgid "Image Location" +msgstr "छवि स्थान" + +msgid "Patient Name" +msgstr "मरीज़ का नाम" + +msgid "Series UID" +msgstr "श्रृंखला UID" + +msgid "Echo Time" +msgstr "इको समय" + +msgid "Protocol Group" +msgstr "प्रोटोकॉल समूह" + +msgid "TR" +msgstr "टीआर" + +msgid "TE" +msgstr "टीई" + +msgid "TI" +msgstr "टीआई" + +msgid "Slice Thickness" +msgstr "स्लाइस की मोटाई" + +msgid "Xspace" +msgstr "एक्स स्पेस" + +msgid "Yspace" +msgstr "वाई स्पेस" + +msgid "Zspace" +msgstr "ज़ेड स्पेस" + +msgid "Xstep" +msgstr "एक्स स्टेप" + +msgid "Ystep" +msgstr "वाई स्टेप" + +msgid "Zstep" +msgstr "ज़ेड स्टेप" + +msgid "Time" +msgstr "समय" + +msgid "Image Type" +msgstr "छवि प्रकार" + +msgid "Phase Encoding Direction" +msgstr "फेज एन्कोडिंग दिशा" + +msgid "Echo Number" +msgstr "इको संख्या" + +msgid "Image Protocol" +msgstr "छवि प्रोटोकॉल" + +msgid "Study Protocols" +msgstr "अध्ययन प्रोटोकॉल" + +msgid "Scan Problems" +msgstr "स्कैन समस्याएँ" + +msgid "Scan Type" +msgstr "स्कैन प्रकार" + +msgid "Severity" +msgstr "गंभीरता" + +msgid "Header" +msgstr "शीर्षक" + +msgid "Value" +msgstr "मान" + +msgid "Valid Values" +msgstr "मान्य मान" + +msgid "Protocol Violation" +msgstr "प्रोटोकॉल उल्लंघन" + +msgid "Could not identify scan type" +msgstr "स्कैन प्रकार की पहचान नहीं हो सकी" + +msgid "Series Description or Scan Type" +msgstr "श्रृंखला विवरण या स्कैन प्रकार" + +msgid "Resolution Status" +msgstr "समाधान स्थिति" + +msgid "Unresolved" +msgstr "अनसुलझा" + +msgid "Reran" +msgstr "पुनः चलाया गया" + +msgid "Emailed site/pending" +msgstr "साइट को ईमेल किया/लंबित" + +msgid "Inserted" +msgstr "डाला गया" + +msgid "Rejected" +msgstr "अस्वीकृत" + +msgid "Inserted with flag" +msgstr "फ्लैग के साथ डाला गया" + +msgid "Other" +msgstr "अन्य" + +msgid "Type of Problem" +msgstr "समस्या का प्रकार" + +msgid "Select Resolution" +msgstr "समाधान चुनें" + +msgid "Image File" +msgstr "छवि फ़ाइल" + +msgid "Must submit data in JSON format" +msgstr "डेटा JSON प्रारूप में जमा करना आवश्यक है" + +msgid "Can not implement filter on a resource type that has no centers." +msgstr "ऐसे संसाधन प्रकार पर फ़िल्टर लागू नहीं किया जा सकता जिसमें कोई केंद्र नहीं हैं।" + +msgid "hash" +msgstr "हैश" + +msgid "JoinID" +msgstr "जॉइनआईडी" + +msgid "TarchiveID" +msgstr "टार्चिवआईडी" + +msgid "Center Name" +msgstr "केंद्र का नाम" + +msgid "Scanner ID" +msgstr "स्कैनर आईडी" + +msgid "TR Range" +msgstr "टीआर रेंज" + +msgid "TE Range" +msgstr "सीमा" + +msgid "TI Range" +msgstr "टीआई रेंज" + +msgid "Slice Thickness Range" +msgstr "स्लाइस मोटाई रेंज" + +msgid "Xspace Range" +msgstr "एक्सस्पेस रेंज" + +msgid "Yspace Range" +msgstr "वाईस्पेस रेंज" + +msgid "Zspace Range" +msgstr "ज़ेडस्पेस रेंज" + +msgid "Xstep Range" +msgstr "एक्सस्टेप रेंज" + +msgid "Ystep Range" +msgstr "यस्टेप रेंज" + +msgid "Zstep Range" +msgstr "ज़स्टेप रेंज" + +msgid "Time Range" +msgstr "समय सीमा" + +msgid "Can not implement filter on a resource type that has no projects." +msgstr "ऐसे संसाधन प्रकार पर फ़िल्टर लागू नहीं किया जा सकता जिसमें कोई परियोजना नहीं है." diff --git a/modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.po b/modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.po index c39ffc52fe2..a689f4be06f 100644 --- a/modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.po +++ b/modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.po @@ -21,10 +21,198 @@ msgstr "" msgid "MRI Violated Scans" msgstr "MRI違反スキャン" - msgid "Violated scan" msgstr "違反スキャン" -msgid "Violated scans" -msgstr "違反スキャン" +msgid "Violations for SeriesUID" +msgstr "SeriesUIDの違反" + +msgid "Violations for" +msgstr "違反行為" + +msgid "Time Run" +msgstr "タイムラン" + +msgid "Series Description" +msgstr "シリーズ説明" + +msgid "Image Location" +msgstr "画像の場所" + +msgid "Patient Name" +msgstr "患者名" + +msgid "Series UID" +msgstr "シリーズUID" + +msgid "Echo Time" +msgstr "エコータイム" + +msgid "Protocol Group" +msgstr "プロトコルグループ" + +msgid "TR" +msgstr "TR" + +msgid "TE" +msgstr "TE" + +msgid "TI" +msgstr "TI" + +msgid "Slice Thickness" +msgstr "スライスの厚さ" + +msgid "Xspace" +msgstr "エックススペース" + +msgid "Yspace" +msgstr "ワイスペース" + +msgid "Zspace" +msgstr "Zspace" + +msgid "Xstep" +msgstr "エクスステップ" + +msgid "Ystep" +msgstr "ワイステップ" + +msgid "Zstep" +msgstr "ゼットステップ" + +msgid "Time" +msgstr "時間" + +msgid "Image Type" +msgstr "画像の種類" + +msgid "Phase Encoding Direction" +msgstr "位相エンコード方向" + +msgid "Echo Number" +msgstr "エコー番号" + +msgid "Image Protocol" +msgstr "画像プロトコル" + +msgid "Study Protocols" +msgstr "研究プロトコル" + +msgid "Scan Problems" +msgstr "スキャンの問題" + +msgid "Scan Type" +msgstr "スキャンタイプ" + +msgid "Severity" +msgstr "重大度" + +msgid "Header" +msgstr "ヘッダ" + +msgid "Value" +msgstr "価値" + +msgid "Valid Values" +msgstr "有効な値" + +msgid "Protocol Violation" +msgstr "プロトコル違反" + +msgid "Could not identify scan type" +msgstr "スキャンの種類を識別できませんでした" + +msgid "Series Description or Scan Type" +msgstr "シリーズの説明またはスキャンタイプ" + +msgid "Resolution Status" +msgstr "解決ステータス" + +msgid "Unresolved" +msgstr "未解決" + +msgid "Reran" +msgstr "リラン" + +msgid "Emailed site/pending" +msgstr "メールを送信したサイト/保留中" + +msgid "Inserted" +msgstr "挿入された" + +msgid "Rejected" +msgstr "拒否されました" + +msgid "Inserted with flag" +msgstr "フラグ付きで挿入" + +msgid "Other" +msgstr "他の" + +msgid "Type of Problem" +msgstr "問題の種類" + +msgid "Select Resolution" +msgstr "解像度の選択" + +msgid "Image File" +msgstr "画像ファイル" + +msgid "Must submit data in JSON format" +msgstr "データはJSON形式で送信する必要があります" + +msgid "Can not implement filter on a resource type that has no centers." +msgstr "センターのないリソース タイプにフィルターを実装することはできません." + +msgid "hash" +msgstr "ハッシュ" + +msgid "JoinID" +msgstr "参加ID" + +msgid "TarchiveID" +msgstr "アーカイブID" + +msgid "Center Name" +msgstr "センター名" + +msgid "Scanner ID" +msgstr "スキャナID" + +msgid "TR Range" +msgstr "TR範囲" + +msgid "TE Range" +msgstr "THE レンジ" + +msgid "TI Range" +msgstr "TI 範囲" + +msgid "Slice Thickness Range" +msgstr "スライス厚さ範囲" + +msgid "Xspace Range" +msgstr "Xspace 範囲" + +msgid "Yspace Range" +msgstr "Yspace 範囲" + +msgid "Zspace Range" +msgstr "Zspace 範囲" + +msgid "Xstep Range" +msgstr "Xstep 範囲" + +msgid "Ystep Range" +msgstr "Yステップ範囲" + +msgid "Zstep Range" +msgstr "Zstep 範囲" + +msgid "Time Range" +msgstr "時間範囲" + +msgid "Can not implement filter on a resource type that has no projects." +msgstr "プロジェクトがないリソース タイプにフィルターを実装することはできません。" diff --git a/modules/mri_violations/locale/mri_violations.pot b/modules/mri_violations/locale/mri_violations.pot index bd5bc3cb494..936951f4ffb 100644 --- a/modules/mri_violations/locale/mri_violations.pot +++ b/modules/mri_violations/locale/mri_violations.pot @@ -27,3 +27,207 @@ msgstr "" msgid "Violated scans" msgstr "" +msgid "Violations for SeriesUID" +msgstr "" + +msgid "Violations for" +msgstr "" + +msgid "Time Run" +msgstr "" + +msgid "Series Description" +msgstr "" + +msgid "Image Location" +msgstr "" + +msgid "Patient Name" +msgstr "" + +msgid "Series UID" +msgstr "" + +msgid "Echo Time" +msgstr "" + +msgid "Protocol Group" +msgstr "" + +msgid "TR" +msgstr "" + +msgid "TE" +msgstr "" + +msgid "TI" +msgstr "" + +msgid "Slice Thickness" +msgstr "" + +msgid "Xspace" +msgstr "" + +msgid "Yspace" +msgstr "" + +msgid "Zspace" +msgstr "" + +msgid "Xstep" +msgstr "" + +msgid "Ystep" +msgstr "" + +msgid "Zstep" +msgstr "" + +msgid "Time" +msgstr "" + +msgid "Image Type" +msgstr "" + +msgid "Phase Encoding Direction" +msgstr "" + +msgid "Echo Number" +msgstr "" + +msgid "Image Protocol" +msgstr "" + +msgid "Study Protocols" +msgstr "" + +msgid "Scan Problems" +msgstr "" + +msgid "Scan Type" +msgstr "" + +msgid "Severity" +msgstr "" + +msgid "Header" +msgstr "" + +msgid "Value" +msgstr "" + +msgid "Valid Values" +msgstr "" + +msgid "Protocol Violation" +msgstr "" + +msgid "Could not identify scan type" +msgstr "" + +msgid "Series Description or Scan Type" +msgstr "" + +msgid "Resolution Status" +msgstr "" + +msgid "Unresolved" +msgstr "" + +msgid "Reran" +msgstr "" + +msgid "Emailed site/pending" +msgstr "" + +msgid "Inserted" +msgstr "" + +msgid "Rejected" +msgstr "" + +msgid "Inserted with flag" +msgstr "" + +msgid "Other" +msgstr "" + +msgid "Type of Problem" +msgstr "" + +msgid "Select Resolution" +msgstr "" + +msgid "Image File" +msgstr "" + +msgid "Must submit data in JSON format" +msgstr "" + +msgid "Can not implement filter on a resource type that has no centers." +msgstr "" + +msgid "Can not implement filter on a resource type that has no projects." +msgstr "" + +msgid "hash" +msgstr "" + +msgid "JoinID" +msgstr "" + +msgid "TarchiveID" +msgstr "" + +msgid "Center Name" +msgstr "" + +msgid "Scanner ID" +msgstr "" + +msgid "Scan Type" +msgstr "" + +msgid "TR Range" +msgstr "" + +msgid "TE Range" +msgstr "" + +msgid "TI Range" +msgstr "" + +msgid "Slice Thickness Range" +msgstr "" + +msgid "Xspace Range" +msgstr "" + +msgid "Yspace Range" +msgstr "" + +msgid "Zspace Range" +msgstr "" + +msgid "Xstep Range" +msgstr "" + +msgid "Ystep Range" +msgstr "" + +msgid "Zstep Range" +msgstr "" + +msgid "Time Range" +msgstr "" + +msgid "Image Type" +msgstr "" + +msgid "Phase Encoding Direction" +msgstr "" + +msgid "Echo Number" +msgstr "" + diff --git a/modules/mri_violations/php/resolve.class.inc b/modules/mri_violations/php/resolve.class.inc index 3264e0fc835..d614a898567 100644 --- a/modules/mri_violations/php/resolve.class.inc +++ b/modules/mri_violations/php/resolve.class.inc @@ -1,8 +1,9 @@ hasAnyPermission( [ @@ -37,17 +38,25 @@ class Resolve extends \NDB_Page * * @return ResponseInterface */ - public function handle(ServerRequestInterface $request) : ResponseInterface + public function handle(ServerRequestInterface $request): ResponseInterface { $user = $request->getAttribute("user"); if (!$this->_hasAccess($user)) { - return new \LORIS\Http\Response\JSON\Forbidden("Access denied"); + return new \LORIS\Http\Response\JSON\Forbidden( + dgettext( + 'loris', + "Access denied" + ) + ); } $requestdata = json_decode((string) $request->getBody(), true); if (!is_array($requestdata)) { return new \LORIS\Http\Response\JSON\BadRequest( - "Must submit data in JSON format" + dgettext( + 'loris', + "Must submit data in JSON format" + ) ); } @@ -80,7 +89,7 @@ class Resolve extends \NDB_Page // Not modified $response = $response->withStatus(304); } - } else if ($val !== 'unresolved') { + } elseif ($val !== 'unresolved') { // no need to insert to DB for Unresolved value. // Base of the insert @@ -154,4 +163,3 @@ class Resolve extends \NDB_Page return $response; } } - diff --git a/modules/mri_violations/php/usercentermatchornull.class.inc b/modules/mri_violations/php/usercentermatchornull.class.inc index 8459e5ee855..8278d7ab6bc 100644 --- a/modules/mri_violations/php/usercentermatchornull.class.inc +++ b/modules/mri_violations/php/usercentermatchornull.class.inc @@ -20,7 +20,7 @@ class UserCenterMatchOrNull implements \LORIS\Data\Filter * * @return bool */ - public function filter(\User $user, \Loris\Data\DataInstance $resource) : bool + public function filter(\User $user, \Loris\Data\DataInstance $resource): bool { // phan only understands method_exists on simple variables. // Assigning to a variable is the a workaround @@ -37,7 +37,10 @@ class UserCenterMatchOrNull implements \LORIS\Data\Filter return true; } throw new \LorisException( - "Can not implement filter on a resource type that has no centers." + dgettext( + 'mri_violations', + "Can not implement filter on a resource type that has no centers." + ) ); } } diff --git a/modules/mri_violations/php/usercentermatchornulloranypermission.class.inc b/modules/mri_violations/php/usercentermatchornulloranypermission.class.inc index 3518a8b0190..a3fbce96899 100644 --- a/modules/mri_violations/php/usercentermatchornulloranypermission.class.inc +++ b/modules/mri_violations/php/usercentermatchornulloranypermission.class.inc @@ -30,7 +30,7 @@ class UserCenterMatchOrNullOrAnyPermission implements \LORIS\Data\Filter * * @return bool */ - public function filter(\User $user, \Loris\Data\DataInstance $resource) : bool + public function filter(\User $user, \Loris\Data\DataInstance $resource): bool { // phan only understands method_exists on simple variables. // Assigning to a variable is the a workaround @@ -51,7 +51,10 @@ class UserCenterMatchOrNullOrAnyPermission implements \LORIS\Data\Filter return true; } throw new \LorisException( - "Can not implement filter on a resource type that has no centers." + dgettext( + 'loris', + "Can not implement filter on a resource type that has no centers." + ) ); } } diff --git a/modules/mri_violations/php/userprojectmatchornull.class.inc b/modules/mri_violations/php/userprojectmatchornull.class.inc index d1699704133..105f65b5571 100644 --- a/modules/mri_violations/php/userprojectmatchornull.class.inc +++ b/modules/mri_violations/php/userprojectmatchornull.class.inc @@ -12,6 +12,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 * @link https://www.github.com/aces/Loris/ */ + namespace LORIS\mri_violations; /** @@ -40,7 +41,7 @@ class UserProjectMatchOrNull implements \LORIS\Data\Filter * * @return bool true if the user has a project in common with the data */ - public function filter(\User $user, \Loris\Data\DataInstance $resource) : bool + public function filter(\User $user, \Loris\Data\DataInstance $resource): bool { // phan only understands method_exists on simple variables. // Assigning to a variable is the a workaround @@ -57,7 +58,10 @@ class UserProjectMatchOrNull implements \LORIS\Data\Filter return true; } throw new \LorisException( - "Can not implement filter on a resource type that has no projects." + dgettext( + 'loris', + "Can not implement filter on a resource type that has no projects." + ) ); } }