Skip to content

Conversation

SKADE2303
Copy link
Collaborator

This PR is responsible for translating the module document_repository to different languages. Currently only 'Hindi' language is supported but other languages can be added as required.

Testing instructions (if applicable)

  1. Run 'make dev' to load changes
  2. Change language_preference to Hindi in my_preferences Tab
  3. Go to document_repository tab to see translated web page.

@github-actions github-actions bot added Language: PHP PR or issue that update PHP code Language: Javascript PR or issue that update Javascript code Module: statistics PR or issue related to statistics module Module: acknowledgements PR or issue related to acknowledgements module Module: battery_manager PR or issue related to battery_manager module Module: behavioural_qc PR or issue related behavioural_qc module Module: candidate_list PR or issue related to candidate_list module Module: conflict_resolver PR or issue related to conflict_resolver module Module: datadict PR or issue related to (old) datadict module Module: dictionary PR or issue related to (new) dictionary module Module: document_repository PR or issue related to documen_repository module Module: electrophysiology_browser PR or issue related to electrophysiology_browser module Module: examiner PR or issue related to examiner module Module: genomic_browser PR or issue related to genomic_browser module Module: imaging_browser PR or issue related to imaging_browser module Module: media PR or issue related to media module Module: server_processes_manager PR or issue related to the server_processes_manger Module: survey_accounts PR or issue related to the survey_accounts module Module: user_accounts PR or issue related to the user_accounts module Module: dicom_archive PR or issue related to dicom_archive module labels Aug 11, 2025
@SKADE2303 SKADE2303 removed Language: PHP PR or issue that update PHP code Module: statistics PR or issue related to statistics module Module: acknowledgements PR or issue related to acknowledgements module Module: battery_manager PR or issue related to battery_manager module Module: behavioural_qc PR or issue related behavioural_qc module Module: candidate_list PR or issue related to candidate_list module Module: conflict_resolver PR or issue related to conflict_resolver module Module: datadict PR or issue related to (old) datadict module Module: dictionary PR or issue related to (new) dictionary module Module: electrophysiology_browser PR or issue related to electrophysiology_browser module labels Aug 11, 2025
@SKADE2303 SKADE2303 added Event: GSOC PR or issue accepted for Google Summer of Code Multilingual Any tasks related to making LORIS multilingual and removed Module: imaging_browser PR or issue related to imaging_browser module Module: media PR or issue related to media module Module: server_processes_manager PR or issue related to the server_processes_manger Module: survey_accounts PR or issue related to the survey_accounts module Module: user_accounts PR or issue related to the user_accounts module Module: dicom_archive PR or issue related to dicom_archive module labels Aug 11, 2025
@SKADE2303 SKADE2303 force-pushed the TranslateDocumentRepository branch from 1365ea0 to dc2ff91 Compare August 11, 2025 13:58
@racostas racostas self-requested a review August 12, 2025 14:47
// Data loading error
if (this.state.error) {
return <h3>An error occured while loading the page.</h3>;
return <h3>{t('An error occured while loading the page.',
{ns: 'document_repository'})}</h3>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is in the loris namespace?

// If error occurs, return a message.
// XXX: Replace this with a UI component for 500 errors.
if (this.state.error) {
return <h3>An error occured while loading the page.</h3>;
return <h3>{t('An error occured while loading the page.',
{ns: 'document_repository'})}</h3>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong namespace here too?

// Data loading error
if (this.state.error) {
return <h3>An error occured while loading the page.</h3>;
return <h3>{t('An error occured while loading the page.',
{ns: 'document_repository'})}</h3>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loris string

@@ -107,7 +112,7 @@ class DocEditForm extends React.Component {
/>
<SelectElement
name="forSite"
label="Site"
label={t('Site', {ns: 'document_repository'})}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loris namespace

@@ -116,35 +121,36 @@ class DocEditForm extends React.Component {
/>
<SelectElement
name="instrument"
label="Instrument"
label={t('Instrument', {ns: 'document_repository'})}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if it currently exists in the loris namespace but "Instrument" is a common loris term that should be in that namespace.

options={this.state.data.instruments}
onUserInput={this.setFormData}
value={this.state.docData.instrument}
/>
<TextboxElement
name="pscid"
label="PSCID"
label={t('PSCID', {ns: 'document_repository'})}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loris namespace

onUserInput={this.setFormData}
disable = {true}
value={this.state.docData.pscid}
/>
<TextboxElement
name="visitLabel"
label="Visit Label"
label={t('Visit Label', {ns: 'document_repository'})}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loris namespace

if (this.state.error) {
return <h3>An error occured while loading the page.</h3>;
return <h3>{t('An error occured while loading the page.',
{ns: 'document_repository'})}</h3>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loris namespace

options={this.state.data.fieldOptions.fileCategories}
onUserInput={this.setFormData}
required={true}
value={this.state.formData.category}
/>
<SearchableDropdown
name="forSite"
label="Site"
placeHolder="Search for site"
label={t('Site', {ns: 'document_repository'})}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loris namespace

@@ -124,40 +129,41 @@ class DocUploadForm extends Component {
/>
<SelectElement
name="instrument"
label="Instrument"
label={t('Instrument', {ns: 'document_repository'})}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loris namespace

options={this.state.data.fieldOptions.instruments}
onUserInput={this.setFormData}
value={this.state.formData.instrument}
/>
<TextboxElement
name="pscid"
label="PSCID"
label={t('PSCID', {ns: 'document_repository'})}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loris namespace

onUserInput={this.setFormData}
value={this.state.formData.pscid}
/>
<TextboxElement
name="visitLabel"
label="Visit Label"
label={t('Visit Label', {ns: 'document_repository'})}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loris namespace

@racostas racostas added the State: Needs work PR awaiting additional work by the author to proceed label Aug 26, 2025
@racostas
Copy link
Contributor

Hi @SKADE2303, please address @driusan comments, This are the same issues we disused in #9941. Correct me if I'm wrong but I think to remember we also had a meeting about it. This namespace issue have to be addressed in most of all PRs sent. Please take a careful look to each one again. Thank you.

@SKADE2303 SKADE2303 added State: Needs work PR awaiting additional work by the author to proceed and removed State: Needs work PR awaiting additional work by the author to proceed labels Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Event: GSOC PR or issue accepted for Google Summer of Code Language: Javascript PR or issue that update Javascript code Module: document_repository PR or issue related to documen_repository module Multilingual Any tasks related to making LORIS multilingual State: Needs work PR awaiting additional work by the author to proceed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants