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
@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.

@@ -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
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
@racostas racostas self-requested a review September 12, 2025 05:04
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.

LGTM.

@racostas racostas added Passed manual tests PR has been successfully tested by at least one peer and removed State: Needs work PR awaiting additional work by the author to proceed labels Sep 12, 2025
@racostas
Copy link
Contributor

this one is ready to be merged @driusan

@driusan
Copy link
Collaborator

driusan commented Sep 12, 2025

I added Japanese translations and the "Edit Description" feature doesn't work when the user's language is set to Japanese.. however, it still works in English, so I think this can be merged and I'll make an issue and see if I can find out why.

But I just realized that it's not clear what the "override" function should do on multilingual instances anyways since we only have one override per field (not per language).

@driusan driusan merged commit becf1c1 into aces:main Sep 12, 2025
20 checks passed
driusan pushed a commit to driusan/Loris that referenced this pull request Sep 12, 2025
Builds on aces#9938 to add the translation strings for Japanese.
driusan added a commit that referenced this pull request Sep 12, 2025
Builds on #9938 to add the translation strings for Japanese.
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 Passed manual tests PR has been successfully tested by at least one peer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants