Skip to content

[survey_accounts]Add French Language To Survey Accounts#10696

Closed
GeorgeMurad wants to merge 7 commits into
aces:mainfrom
GeorgeMurad:SurveyAccuntsTranslationIssues
Closed

[survey_accounts]Add French Language To Survey Accounts#10696
GeorgeMurad wants to merge 7 commits into
aces:mainfrom
GeorgeMurad:SurveyAccuntsTranslationIssues

Conversation

@GeorgeMurad

@GeorgeMurad GeorgeMurad commented Jun 26, 2026

Copy link
Copy Markdown
Contributor
  • French language was missing under the survey accounts module.

Testing instructions (if applicable)

  1. Steps to regenerate and verify locally:
msgfmt --use-fuzzy \
  -o modules/survey_accounts/locale/fr_CA/LC_MESSAGES/survey_accounts.mo \
  modules/survey_accounts/locale/fr_CA/LC_MESSAGES/survey_accounts.po
npx i18next-conv \
  -l UNUSED \
  -t modules/survey_accounts/locale/fr_CA/LC_MESSAGES/survey_accounts.json \
  -s modules/survey_accounts/locale/fr_CA/LC_MESSAGES/survey_accounts.po \
  --compatibilityJSON v4
target=survey_accounts npm run compile
  1. Make sure the language_code fr_CA is added to the language table.
  2. Test the French language under the Survey Accounts module.

Link(s) to related issue(s)

priyavrat7 and others added 3 commits June 23, 2026 12:54
**Situation:**
In the LORIS `user_accounts` module (`edit_user` interface), clicking
the "Reject User" button triggers an immediate AJAX call to reject the
account. There is no confirmation dialog, making it extremely easy for
an administrator to accidentally reject a user with a misclick.

**Task:**
My objective was to introduce a confirmation step before executing the
rejection AJAX call, ensuring a better and safer user experience. The
implementation needed to adhere strictly to modern LORIS framework
standards, specifically utilizing the SweetAlert2 library.

**Action:**
- **Refactored Legacy Code:** Converted the plain jQuery script
`modules/user_accounts/js/rejectUser.js` into a modern proper source
file at `modules/user_accounts/jsx/rejectUser.js`.
- **Integrated SweetAlert2:** Used modern Webpack imports (`import swal
from 'sweetalert2';`) to implement a `swal.fire()` confirmation modal
with a 'warning' type, standardizing the UI with other LORIS modules.
- **Updated Webpack Entry Point:** Registered the new `rejectUser` file
in `webpack.config.ts` under the `user_accounts` entry.
- **Compiled Bundle:** Built the new asset via `npm run compile`,
resulting in a self-contained Webpack JS bundle that replaces the old
jQuery file.

**Result:**
Administrators can now see SweetAlert2 warning dialog when attempting to
reject a user. The AJAX call is correctly blocked until the user
explicitly clicks "Yes, reject user!", completely preventing accidental
rejections and fixes aces#10474.

<img width="1706" height="972" alt="image"
src="https://github.com/user-attachments/assets/686cbb68-072d-4d50-80d7-f7e91a9e7e51"
/>
…s#10685)

## Brief summary of changes
The dataquery TestPlan specifies that queries should only be able to be
pinned by users with "Data Query Tool: Admin dataquery queries"
permission.
- [x] Have you updated related documentation?

#### Testing instructions (if applicable)

1. Verify the TestPlan

#### Link(s) to related issue(s)

* Resolves [10602](aces#10602).

Co-authored-by: Michael Lapadula <michael.lapadula@mcin.ca>
## Brief summary of changes
No notifications were being sent out because the "Active_to" condition
in the query for users to be notified had the opposite logic than it
should (it was checking users who have already had their access expired
instead of users who are still active).

- [ ] Have you updated related documentation?

#### Testing instructions (if applicable)

1. Create a user and grant the user each permission from the
my_preferences page. Make sure the user is active and does not have an
active_to date set
2. Test each operation that sends notifications to make sure the
notifications are properly sent
3. Edit the user to have an active_to date set before now
4. Make sure the notifications are not sent
5. Edit the user to have an active_to date set after now
6. Make sure the notifications are sent
7. Remove all of the notification settings from my_preferences page
8. Make sure that the notifications are not  sent

#### Link(s) to related issue(s)

* Resolves aces#10588
@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: survey_accounts PR or issue related to the survey_accounts module Multilingual Any tasks related to making LORIS multilingual labels Jun 26, 2026
@GeorgeMurad GeorgeMurad force-pushed the SurveyAccuntsTranslationIssues branch from 3d67b9e to fe6eedb Compare June 26, 2026 14:56
@github-actions github-actions Bot added Module: user_accounts PR or issue related to the user_accounts module Module: dataquery PR or issue related to (new) dataquery module labels Jun 26, 2026
@GeorgeMurad

Copy link
Copy Markdown
Contributor Author

Closing this PR because it has been recreated against the 29.0-release branch: #10697.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language: Javascript PR or issue that update Javascript code Language: PHP PR or issue that update PHP code Module: dataquery PR or issue related to (new) dataquery module Module: survey_accounts PR or issue related to the survey_accounts module Module: user_accounts PR or issue related to the user_accounts module Multilingual Any tasks related to making LORIS multilingual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants