Skip to content

[statistics] Retrieve sex list with getSexList instead of hardcoded strings#11005

Open
HachemJ wants to merge 1 commit into
aces:29.0-releasefrom
HachemJ:RetrieveSexListFromDbInStatistics
Open

[statistics] Retrieve sex list with getSexList instead of hardcoded strings#11005
HachemJ wants to merge 1 commit into
aces:29.0-releasefrom
HachemJ:RetrieveSexListFromDbInStatistics

Conversation

@HachemJ

@HachemJ HachemJ commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Brief summary of changes

This PR replaces the hardcoded sex labels in the Statistics module with values retrieved from \Utility::getSexList(). The retrieved values are translated using dgettext within the utility function, eliminating the need for the corresponding hardcoded entries in the loris translation files.

Testing instructions (if applicable)

  1. git checkout HachemJ/RetrieveSexListFromDbInStatistics
  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 'Reports' -> 'Statistics'
  6. Switch the language to 'French'
  7. Go to the 'Statistiques démographiques' tab
  8. Confirm that the translated sex labels are displayed correctly throughout the Statistics module.

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 Module: statistics PR or issue related to statistics module Multilingual Any tasks related to making LORIS multilingual labels Jul 24, 2026
@HachemJ HachemJ added the 29.0.0 - Bugs Issues found during the release testing for 29.0.0 label Jul 24, 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: PHP PR or issue that update PHP code Module: statistics PR or issue related to statistics module Multilingual Any tasks related to making LORIS multilingual RaisinBread PR or issue introducing/requiring improvements to the Raidinbread dataset

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant