Skip to content

Conversation

SKADE2303
Copy link
Collaborator

@SKADE2303 SKADE2303 commented Jul 30, 2025

This PR is responsible for translating the module dictionary 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 dictionary 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: 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 Jul 30, 2025
@SKADE2303 SKADE2303 force-pushed the TranslateDataDictionary branch from 1d6075a to 966b7e7 Compare July 30, 2025 18:42
@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: dictionary PR or issue related to (new) dictionary module Module: electrophysiology_browser PR or issue related to electrophysiology_browser module Module: examiner PR or issue related to examiner module labels Jul 30, 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: 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 Jul 30, 2025
@SKADE2303 SKADE2303 changed the title [datadict] Translate data_dictionary [dictionary] Translate dictionary module Jul 30, 2025
@SKADE2303 SKADE2303 force-pushed the TranslateDataDictionary branch from 966b7e7 to 1e042ae Compare July 30, 2025 18:46
@github-actions github-actions bot added the Module: dictionary PR or issue related to (new) dictionary module label Jul 30, 2025
@SKADE2303 SKADE2303 removed the Module: datadict PR or issue related to (old) datadict module label Jul 30, 2025
@SKADE2303 SKADE2303 requested a review from racostas July 30, 2025 18:58
@racostas racostas added the Needs formatting PR requires formatting fixes to meet our coding standards (PHPCS, phan, etc.) label Aug 5, 2025
@SKADE2303 SKADE2303 marked this pull request as ready for review August 11, 2025 13:49
Copy link
Collaborator

@driusan driusan left a comment

Choose a reason for hiding this comment

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

A lot of these are ambiguous which namespace they should be in because many dictionary terms are shared with the dataquery module, but I commented on the ones that should almost certainly be moved.

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

Choose a reason for hiding this comment

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

This is in in the loris namespace

@@ -224,7 +231,7 @@ class DataDictIndex extends Component {
let options = this.state.data.fieldOptions;
let fields = [
{
label: 'Module',
label: t('Module', {ns: 'dictionary'}),
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should probably be in the loris namespace instead of the dictionary namespace as it's a common loris term but is currently not there.

'session': 'Session',
'project': 'Project',
'candidate': t('Candidate', {ns: 'dictionary'}),
'session': t('Session', {ns: 'dictionary'}),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Session should also probably be in the loris namespace but is currently missing. Candidate is currently there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should I change the namespace now and remove it from the .po and .pot file right now and later add them as part of loris.pot in a new PR?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, or just move them in this PR.

@@ -317,7 +324,7 @@ class DataDictIndex extends Component {
},
},
{
label: 'Cohorts',
label: t('Cohorts', {ns: 'dictionary'}),
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

},
},
},
{
label: 'Visits',
label: t('Visits', {ns: 'dictionary'}),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see this in the loris namespace currently but I'd be surprised if it wasn't in other modules as well.

@racostas racostas added State: Needs work PR awaiting additional work by the author to proceed and removed Needs formatting PR requires formatting fixes to meet our coding standards (PHPCS, phan, etc.) labels Aug 27, 2025
@SKADE2303 SKADE2303 force-pushed the TranslateDataDictionary branch from 38ef29c to 52173be Compare August 30, 2025 13:34
@SKADE2303 SKADE2303 removed the State: Needs work PR awaiting additional work by the author to proceed label Sep 1, 2025
locale/loris.pot Outdated
msgid "Visits"
msgstr ""

msgid "Cohorts"
Copy link
Contributor

Choose a reason for hiding this comment

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

since we have already Cohort in singular, I would move the plural version just right after the singular one.


msgid "Many"
msgstr ""

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need this extra empty lines at the end of this file.

Copy link
Contributor

@racostas racostas left a comment

Choose a reason for hiding this comment

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

some translations seems to be missiong.
image

Please take a look, Thanks.

@racostas racostas added the State: Needs work PR awaiting additional work by the author to proceed label Sep 2, 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: dictionary PR or issue related to (new) dictionary 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