Skip to content

Survey accounts translation issues#10697

Open
GeorgeMurad wants to merge 5 commits into
aces:29.0-releasefrom
GeorgeMurad:SurveyAccuntsTranslationIssues
Open

Survey accounts translation issues#10697
GeorgeMurad wants to merge 5 commits into
aces:29.0-releasefrom
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)

@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 added the 29.0.0 - Bugs Issues found during the release testing for 29.0.0 label Jun 29, 2026
@driusan driusan changed the title Survey accunts translation issues Survey accounts translation issues Jun 29, 2026
Comment thread modules/survey_accounts/locale/fr/LC_MESSAGES/survey_accounts.po
Comment thread modules/survey_accounts/locale/fr_CA/LC_MESSAGES/survey_accounts.po Outdated
Comment thread modules/survey_accounts/jsx/surveyAccountsIndex.js Outdated
Comment thread modules/survey_accounts/jsx/surveyAccountsIndex.js Outdated
@HachemJ

HachemJ commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

I am not sure how to include it in terms of code review on GitHub but I would suggest to also change the french locale directory name from fr_CA to fr for the same reason as my previous review comments.

@GeorgeMurad

Copy link
Copy Markdown
Contributor Author

Yes make sense, I will update it soon. Thanks!

Comment thread modules/survey_accounts/php/addsurvey.class.inc Outdated
return ['Email' => dgettext(
'survey_accounts',
'Email is not valid.'
'The email address is not valid.'

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 agree with the change but it implies the following line in the hindi locale to be changed since it uses the old version of the string 'Email is not valid.'

Image

@GeorgeMurad

Copy link
Copy Markdown
Contributor Author

let me know when you finish reviewing as I am currently updating the PR.

Comment thread modules/survey_accounts/jsx/surveyAccountsIndex.js Outdated
Comment thread modules/survey_accounts/jsx/surveyAccountsIndex.js Outdated
Comment thread modules/survey_accounts/jsx/surveyAccountsIndex.js Outdated
Comment thread modules/survey_accounts/jsx/surveyAccountsIndex.js Outdated
@HachemJ

HachemJ commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

let me know when you finish reviewing as I am currently updating the PR.

@GeorgeMurad I will. It's not done yet but you can start changing some stuff I already mentioned if you agree.

)
);
$this->addBasicText("Email", "Email address");
$this->addBasicText("Email", dgettext('survey_accounts', 'Email address'));

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 would suggest this change

Suggested change
$this->addBasicText("Email", dgettext('survey_accounts', 'Email address'));
$this->addBasicText("Email", dgettext('loris', 'Email address'));

Same reason as https://github.com/aces/Loris/pull/10697/changes#r3501043380

If you do, please remove Email address from this module's french locale as well as the .pot file since it will be using the loris namespace that already has the translations.

Comment on lines +80 to +83
'Created' => dgettext("survey_accounts", "Created"),
'Sent' => dgettext("survey_accounts", "Sent"),
'In Progress' => dgettext("survey_accounts", "In Progress"),
'Complete' => dgettext("survey_accounts", "Complete"),

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 suggest reverting for the same reason.

Suggested change
'Created' => dgettext("survey_accounts", "Created"),
'Sent' => dgettext("survey_accounts", "Sent"),
'In Progress' => dgettext("survey_accounts", "In Progress"),
'Complete' => dgettext("survey_accounts", "Complete"),
'Created' => dgettext("loris", "Created"),
'Sent' => dgettext("loris", "Sent"),
'In Progress' => dgettext("loris", "In Progress"),
'Complete' => dgettext("loris", "Complete"),

If you do revert, all 4 to remove from the module's french locale as well as the .pot file of that module.

Comment on lines +335 to +339
$this->addBasicText("CandID", dgettext('survey_accounts', 'DCCID'));
$this->addBasicText("PSCID", dgettext('survey_accounts', 'PSCID'));
$this->addSelect(
"VL",
dgettext('survey_accounts', 'Visit Label'),

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.

Suggested change
$this->addBasicText("CandID", dgettext('survey_accounts', 'DCCID'));
$this->addBasicText("PSCID", dgettext('survey_accounts', 'PSCID'));
$this->addSelect(
"VL",
dgettext('survey_accounts', 'Visit Label'),
$this->addBasicText("CandID", dgettext('loris', 'DCCID'));
$this->addBasicText("PSCID", dgettext('loris', 'PSCID'));
$this->addSelect(
"VL",
dgettext('loris', 'Visit Label'),

If you do revert, all 3 (DCCID, PSCID and Visit Label) to remove from the module's french locale as well as the .pot file of that module.

"Test_name",
"Instrument",
dcngettext(
'survey_accounts',

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.

This should be changed if you apply my suggestions on removing Instrument from this module's locale translation files.

Suggested change
'survey_accounts',
'loris',

return [
'Test_name' => "Instrument ".
'Test_name' => dcngettext(
'survey_accounts',

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.

This should be changed if you apply my suggestions on removing Instrument from this module's locale translation files.

Suggested change
'survey_accounts',
'loris',

@GeorgeMurad

Copy link
Copy Markdown
Contributor Author

Please review again, and let me know what is still missing, thanks a lot!

return ['Email' => dgettext(
'survey_accounts',
'The email address is not valid.'
'Email is not valid.'

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.

You might still be making changes but make sure in the case where you keep that version to omit every instance of 'The email address is not valid.' for example still present in all of these files (after pulling your latest commit 'apply new updates')

Image

Also not sure if you should be using single or double quotes for these.

@HachemJ

HachemJ commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Please review again, and let me know what is still missing, thanks a lot!

@GeorgeMurad I just finished please check the latest changes I suggested and I will re review when you are ready. I checked your latest commit 'apply new updates' and there are still some things missing.

echo json_encode(
[
'error_msg' => dgettext('loris', 'Visit').' '. $_REQUEST['VL'].' '.
'error_msg' => dgettext('survey_accounts', 'Visit').' '.

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.

Same reason as previous comments.

Suggested change
'error_msg' => dgettext('survey_accounts', 'Visit').' '.
'error_msg' => dgettext('loris', 'Visit').' '.

@GeorgeMurad

Copy link
Copy Markdown
Contributor Author

Great, I will make the changes soon.

'error_msg' => dgettext('loris', 'Instrument').' '. $_REQUEST['TN']
.' ' .dgettext(
'error_msg' => dcngettext(
'survey_accounts',

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.

Same reason as previous comments.

Suggested change
'survey_accounts',
'loris',

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: survey_accounts PR or issue related to the survey_accounts module Multilingual Any tasks related to making LORIS multilingual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants