Skip to content

[login] Add dropdown translation in login summary statistics - #11012

Open
HachemJ wants to merge 3 commits into
aces:29.0-releasefrom
HachemJ:FixDropdownInLoginSummaryStatisticsNotTranslated
Open

[login] Add dropdown translation in login summary statistics#11012
HachemJ wants to merge 3 commits into
aces:29.0-releasefrom
HachemJ:FixDropdownInLoginSummaryStatisticsNotTranslated

Conversation

@HachemJ

@HachemJ HachemJ commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Brief summary of changes

This PR translates the project dropdown in the Login Summary Statistics page and the CSV text copied to the clipboard when using the export button.

Testing instructions (if applicable)

  1. git checkout HachemJ/FixDropdownInLoginSummaryStatisticsNotTranslated
  2. delete project/locale
  3. copy raisinbread/locale into project/locale
  4. run make dev (make sure it ran the msgfmt --use-fuzzy -o table.mo table.po commands)
  5. Go to the Login page (log out first if you are currently logged in).
  6. Switch the language to French, Hindi or Japanese.
  7. Verify that the Project dropdown is translated.
  8. Select each project from the dropdown and verify that the statistics update correctly.
  9. Click the Copy CSV button.
Untitled 21
  1. Paste the copied content and verify that the CSV headers (Project, Statistic, Value), project names, and statistic labels are translated correctly.

Link(s) to related issue(s)

@github-actions github-actions Bot added RaisinBread PR or issue introducing/requiring improvements to the Raidinbread dataset Language: PHP PR or issue that update PHP code Language: Javascript PR or issue that update Javascript code Module: login PR or issue related to login module Multilingual Any tasks related to making LORIS multilingual labels Jul 25, 2026
@HachemJ HachemJ added the 29.0.0 - Bugs Issues found during the release testing for 29.0.0 label Jul 25, 2026
@driusan

driusan commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

@skarya22 can you review this?

Comment thread modules/login/php/summary_statistics.class.inc Outdated
Comment thread raisinbread/locale/fr/LC_MESSAGES/login_summary_statistics.po Outdated
Comment thread raisinbread/locale/hi/LC_MESSAGES/login_summary_statistics.po Outdated
Comment thread raisinbread/locale/ja/LC_MESSAGES/login_summary_statistics.po Outdated
Comment thread raisinbread/locale/login_summary_statistics.pot Outdated
Comment thread modules/login/php/summary_statistics.class.inc
Comment thread modules/login/jsx/summaryStatistics.js Outdated
@skarya22 skarya22 assigned HachemJ and unassigned skarya22 Jul 28, 2026
@skarya22 skarya22 added the State: Needs work PR awaiting additional work by the author to proceed label Jul 28, 2026
@HachemJ HachemJ removed the State: Needs work PR awaiting additional work by the author to proceed label Jul 28, 2026
@HachemJ
HachemJ requested a review from skarya22 July 28, 2026 18:11
Comment on lines +15 to +42
msgid "EEG Recording"
msgid_plural "EEG Recordings"
msgstr[0] ""

msgid "Female Participant"
msgid_plural "Female Participants"
msgstr[0] ""

msgid "Instrument"
msgid_plural "Instruments"
msgstr[0] ""

msgid "Male Participant"
msgid_plural "Male Participants"
msgstr[0] ""

msgid "Scan"
msgid_plural "Scans"
msgstr[0] ""

msgid "Site"
msgid_plural "Sites"
msgstr[0] ""

msgid "Visit"
msgid_plural "Visits"
msgstr[0] ""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am realizing that these fields are added through SQL queries at /SQL/Login_Summary_Statistics, and can be overwritten by projects through the project/tools/Login_Summary_Statistics folder.

However, if a project adds queries, to translate them, they would have to override this file in the project folder, causing them to have to copy the whole login module to the project.

Instead, we should move the translations to SQL like in #10513

Let me know if this makes sense -- since these fields are technically generated through SQL I think their translations should be too so that projects can override them easily.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@skarya22 You don't need to override the whole module to update the translation strings. project/locale/ takes precedent over the module.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah I see, then @HachemJ we can leave it as is! This would be easier then

@skarya22 skarya22 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@skarya22 skarya22 added the Passed manual tests PR has been successfully tested by at least one peer label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

29.0.0 - Bugs Issues found during the release testing for 29.0.0 Language: Javascript PR or issue that update Javascript code Language: PHP PR or issue that update PHP code Module: login PR or issue related to login module Multilingual Any tasks related to making LORIS multilingual Passed manual tests PR has been successfully tested by at least one peer RaisinBread PR or issue introducing/requiring improvements to the Raidinbread dataset

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants