diff --git a/Makefile b/Makefile index ae8037c67e6..d94499ab9c3 100755 --- a/Makefile +++ b/Makefile @@ -125,6 +125,8 @@ locales: msgfmt -o modules/help_editor/locale/ja/LC_MESSAGES/help_editor.mo modules/help_editor/locale/ja/LC_MESSAGES/help_editor.po msgfmt -o modules/imaging_browser/locale/ja/LC_MESSAGES/imaging_browser.mo modules/imaging_browser/locale/ja/LC_MESSAGES/imaging_browser.po npx i18next-conv -l ja -s modules/imaging_browser/locale/ja/LC_MESSAGES/imaging_browser.po -t modules/imaging_browser/locale/ja/LC_MESSAGES/imaging_browser.json --compatibilityJSON v4 + msgfmt -o modules/imaging_browser/locale/hi/LC_MESSAGES/imaging_browser.mo modules/imaging_browser/locale/hi/LC_MESSAGES/imaging_browser.po + npx i18next-conv -l hi -s modules/imaging_browser/locale/hi/LC_MESSAGES/imaging_browser.po -t modules/imaging_browser/locale/hi/LC_MESSAGES/imaging_browser.json --compatibilityJSON v4 msgfmt -o modules/imaging_qc/locale/ja/LC_MESSAGES/imaging_qc.mo modules/imaging_qc/locale/ja/LC_MESSAGES/imaging_qc.po msgfmt -o modules/imaging_uploader/locale/ja/LC_MESSAGES/imaging_uploader.mo modules/imaging_uploader/locale/ja/LC_MESSAGES/imaging_uploader.po msgfmt -o modules/instrument_builder/locale/ja/LC_MESSAGES/instrument_builder.mo modules/instrument_builder/locale/ja/LC_MESSAGES/instrument_builder.po diff --git a/locale/hi/LC_MESSAGES/loris.po b/locale/hi/LC_MESSAGES/loris.po index e19c9f495a2..2366bc85ac0 100644 --- a/locale/hi/LC_MESSAGES/loris.po +++ b/locale/hi/LC_MESSAGES/loris.po @@ -148,6 +148,24 @@ msgstr "उन्नत फ़िल्टर दिखाएँ" msgid "Hide Advanced Filters" msgstr "उन्नत फ़िल्टर छिपाएँ" +msgid "Pass" +msgstr "पास" + +msgid "Fail" +msgstr "फेल" + +msgid "True" +msgstr "सत्य" + +msgid "False" +msgstr "असत्य" + +msgid "Selected" +msgstr "चयनित" + +msgid "selected" +msgstr "चयनित" + # Common swal labels msgid "Cancel" msgstr "रद्द करें" @@ -241,6 +259,12 @@ msgstr "सहेजें" msgid "Reset" msgstr "रीसेट करें" +msgid "Previous" +msgstr "पिछला" + +msgid "Next" +msgstr "अगला" + # Data table strings msgid "{{pageCount}} rows displayed of {{totalCount}}." msgstr "{{totalCount}} में से {{pageCount}} पंक्तियाँ प्रदर्शित" @@ -275,6 +299,9 @@ msgstr "दृश्य" msgid "NEW" msgstr "नया" +msgid "New" +msgstr "नया" + msgid "Updated" msgstr "अद्यतन किया गया" @@ -327,9 +354,6 @@ msgstr "कोई विशेष अक्षर आवश्यक नही msgid "We suggest using a password manager to generate one for you." msgstr "हम सुझाव देते हैं कि आपके लिए पासवर्ड बनाने हेतु पासवर्ड मैनेजर का उपयोग करें।" -msgid "Total" -msgstr "कुल" - msgid "Error!" msgstr "त्रुटि!" @@ -337,6 +361,9 @@ msgstr "त्रुटि!" msgid "Not Started" msgstr "शुरू नहीं हुआ" +msgid "Total" +msgstr "कुल" + msgid "Screening" msgstr "जांच" @@ -352,9 +379,6 @@ msgstr "विषय" msgid "Recycling Bin" msgstr "रिसाइक्लिंग बिन" -msgid "Pass" -msgstr "उत्तीर्ण" - msgid "Failure" msgstr "विफलता" diff --git a/locale/loris.pot b/locale/loris.pot index 139852bb837..012f907c22f 100644 --- a/locale/loris.pot +++ b/locale/loris.pot @@ -1,4 +1,4 @@ -# Default LORIS strings to be translated (English). +# Default LORIS strings to be translated (English) # Copy this to a language specific file and add translations to the # new file. # Copyright (C) 2025 @@ -147,6 +147,24 @@ msgstr "" msgid "Hide Advanced Filters" msgstr "" +msgid "Pass" +msgstr "" + +msgid "Fail" +msgstr "" + +msgid "True" +msgstr "" + +msgid "False" +msgstr "" + +msgid "Selected" +msgstr "" + +msgid "selected" +msgstr "" + # Common swal labels msgid "OK" msgstr "" @@ -243,6 +261,12 @@ msgstr "" msgid "Ethnicity" msgstr "" +msgid "Previous" +msgstr "" + +msgid "Next" +msgstr "" + msgid "Save" msgstr "" @@ -283,6 +307,9 @@ msgstr "" msgid "NEW" msgstr "" +msgid "New" +msgstr "" + msgid "Updated" msgstr "" @@ -334,6 +361,7 @@ msgstr "" msgid "We suggest using a password manager to generate one for you." msgstr "" + msgid "Total" msgstr "" @@ -365,9 +393,6 @@ msgstr "" msgid "Recycling Bin" msgstr "" -msgid "Pass" -msgstr "" - msgid "Failure" msgstr "" diff --git a/modules/imaging_browser/jsx/CandidateScanQCSummaryWidget.js b/modules/imaging_browser/jsx/CandidateScanQCSummaryWidget.js index 72a6ca8e2ef..eecd025171c 100644 --- a/modules/imaging_browser/jsx/CandidateScanQCSummaryWidget.js +++ b/modules/imaging_browser/jsx/CandidateScanQCSummaryWidget.js @@ -70,13 +70,13 @@ function CandidateScanQCSummaryWidget(props) { {ns: 'imaging_browser'})}

- {t('Different shades represent different modalities. ' - + 'Only native modalities are displayed in results.', + {t('Different shades represent different modalities.'+ + ' Only native modalities are displayed in results.', {ns: 'imaging_browser'})}

- {t('Hover over any visit to see detailed modality breakdown for visit, ' - + 'click to go to imaging browser.', {ns: 'imaging_browser'})} + {t('Hover over any visit to see detailed modality breakdown for visit,'+ + ' click to go to imaging browser.', {ns: 'imaging_browser'})}

; } diff --git a/modules/imaging_browser/jsx/ImagePanel.js b/modules/imaging_browser/jsx/ImagePanel.js index f6059c642dc..e5167b7b1de 100644 --- a/modules/imaging_browser/jsx/ImagePanel.js +++ b/modules/imaging_browser/jsx/ImagePanel.js @@ -6,7 +6,9 @@ import React, {Component} from 'react'; import PropTypes from 'prop-types'; - +import {withTranslation} from 'react-i18next'; +import i18n from 'I18nSetup'; +import hiStrings from '../locale/hi/LC_MESSAGES/imaging_browser.json'; /** * Image panel header component */ @@ -25,14 +27,15 @@ class ImagePanelHeader extends Component { * @return {JSX} - React markup for the component */ render() { + const {t} = this.props; let QCStatusLabel; - if (this.props.QCStatus === 'Pass') { + if (this.props.QCStatus === t('Pass', {ns: 'loris'})) { QCStatusLabel = - {this.props.QCStatus} + {t('Pass', {ns: 'loris'})} ; - } else if (this.props.QCStatus === 'Fail') { + } else if (this.props.QCStatus === t('Fail', {ns: 'loris'})) { QCStatusLabel = - {this.props.QCStatus} + {t('Fail', {ns: 'loris'})} ; } @@ -65,7 +68,7 @@ class ImagePanelHeader extends Component { className="btn btn-default btn-xs dropdown-toggle" onClick={this.props.onToggleHeaders} aria-expanded={this.props.HeadersExpanded}> - Header Info + {t('Header Info', {ns: 'imaging_browser'})} @@ -97,8 +100,12 @@ ImagePanelHeader.propTypes = { FileID: PropTypes.string, Filename: PropTypes.string, Expanded: PropTypes.bool, + t: PropTypes.func, }; +const TranslatedImagePanelHeader = withTranslation( + ['imaging_browser'])(ImagePanelHeader); + /** * Image panel headers table component */ @@ -117,6 +124,8 @@ class ImagePanelHeadersTable extends Component { * @return {JSX} - React markup for the component */ render() { + i18n.addResourceBundle('hi', 'imaging_browser', hiStrings); + const {t} = this.props; let inversionTime = null; if (this.props.HeaderInfo.InversionTime !== '0.00') { inversionTime = this.props.HeaderInfo.InversionTime + ' ms'; @@ -137,13 +146,15 @@ class ImagePanelHeadersTable extends Component { "> - Series Instance UID + {t('Series Instance UID', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.SeriesUID} - Voxel Size + {t('Voxel Size', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.XStep === '' ? ' ' : 'X: ' + this.props.HeaderInfo.XStep + ' mm, '} @@ -152,74 +163,89 @@ class ImagePanelHeadersTable extends Component { {this.props.HeaderInfo.ZStep === '' ? ' ' : 'Z: ' + this.props.HeaderInfo.ZStep + ' mm '} - Output Type + {t('Output Type', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.OutputType} - Protocol + {t('Protocol', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.AcquisitionProtocol} - Acquisition Date + {t('Acquisition Date', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.AcquisitionDate} - Inserted Date + {t('Inserted Date', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.InsertedDate} - Series Number + {t('Series Number', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.SeriesNumber} - Series Description + {t('Series Description', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.SeriesDescription} - Slice Thick + {t('Slice Thick', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.SliceThickness} mm - TR + {t('TR', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.RepetitionTime} ms - TE + {t('TE', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.EchoTime} ms - TI + {t('TI', + {ns: 'imaging_browser'})} {inversionTime} - Phase Encoding Direction + {t('Phase Encoding Direction', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.PhaseEncodingDirection} - Image Type + {t('Image Type', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.ImageType} - Echo Number + {t('Echo Number', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.EchoNumber} - Number of volumes + {t('Number of volumes', + {ns: 'imaging_browser'})} {numVolumes} {this.props.HeaderInfo.ProcessingPipeline ? - Processing Pipeline + {t('Processing Pipeline', + {ns: 'imaging_browser'})} : null} {this.props.HeaderInfo.ProcessingPipeline ? @@ -227,7 +253,8 @@ class ImagePanelHeadersTable extends Component { : null} {this.props.HeaderInfo.ProcDate ? - Processing Pipeline Date + {t('Processing Pipeline Date', + {ns: 'imaging_browser'})} : null } {this.props.HeaderInfo.ProcDate ? @@ -237,18 +264,21 @@ class ImagePanelHeadersTable extends Component { {this.props.HeaderInfo.ProcessingPipeline === 'DTIPrepPipeline' ? - Number of rejected directions + {t('Number of rejected directions', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.TotalRejected} - Number of Interlace correlations + {t('Number of Interlace correlations', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.InterlaceRejected} - Number of Gradient-wise correlations + {t('Number of Gradient-wise correlations', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.IntergradientRejected} @@ -258,7 +288,8 @@ class ImagePanelHeadersTable extends Component { {this.props.HeaderInfo.ProcessingPipeline === 'DTIPrepPipeline' ? - Number of Slicewise correlations + {t('Number of Slicewise correlations', + {ns: 'imaging_browser'})} {this.props.HeaderInfo.SlicewiseRejected} @@ -272,8 +303,11 @@ class ImagePanelHeadersTable extends Component { } ImagePanelHeadersTable.propTypes = { HeaderInfo: PropTypes.object, + t: PropTypes.func, }; +const TranslatedImagePanelHeadersTable = withTranslation( + ['imaging_browser'])(ImagePanelHeadersTable); /** * Image quality control dropdown component @@ -293,6 +327,7 @@ class ImageQCDropdown extends Component { * @return {JSX} - React markup for the component */ render() { + i18n.addResourceBundle('hi', 'imaging_browser', hiStrings); let label = ; if (this.props.url) { label =