Skip to content

Conversation

SKADE2303
Copy link
Collaborator

This PR is responsible for translating the module module_manager 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 module_manager tab to see translated web page.

@github-actions github-actions bot added Language: Javascript PR or issue that update Javascript code Module: module_manager PR or issue related to module_manager module labels Sep 9, 2025
@SKADE2303 SKADE2303 added Event: GSOC PR or issue accepted for Google Summer of Code Multilingual Any tasks related to making LORIS multilingual labels Sep 9, 2025
@SKADE2303 SKADE2303 requested a review from racostas September 9, 2025 12:37
Makefile Outdated
msgfmt -o modules/brainbrowser/locale/ja/LC_MESSAGES/brainbrowser.mo modules/brainbrowser/locale/ja/LC_MESSAGES/brainbrowser.po
msgfmt -o modules/bvl_feedback/locale/ja/LC_MESSAGES/bvl_feedback.mo modules/bvl_feedback/locale/ja/LC_MESSAGES/bvl_feedback.po
msgfmt -o modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.mo modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.po
npx i18next-conv -l hi -s modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.po -t modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.json
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the difference between this and line 76/77?

text: 'Updated ' + name + ' status! ' +
'To apply changes the interface must be reloaded. Proceed?',
title: t('Success!', {ns: 'module_manager'}),
text: t('Updated', {ns: 'module_manager'}) +
Copy link
Collaborator

Choose a reason for hiding this comment

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

String concatenation is not the right way to handle variables because the location of the variable (name) in the sentence changes between languages.

It looks like i18next supports format strings that should be used instead: https://www.i18next.com/translation-function/formatting

@racostas racostas added the State: Needs work PR awaiting additional work by the author to proceed label Sep 12, 2025
@SKADE2303 SKADE2303 removed the State: Needs work PR awaiting additional work by the author to proceed label Sep 19, 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.

Can we try to have this other two as well? If in other PR already please link here.

image

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