Skip to content

Commit

Permalink
fix: misuse of gettext in JS
Browse files Browse the repository at this point in the history
  • Loading branch information
shadinaif committed Apr 10, 2023
1 parent 4a210a8 commit e667807
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lti_consumer/static/js/xblock_lti_consumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,20 @@ function LtiConsumerXBlock(runtime, element) {

function renderPIIConsentPromptIfRequired(onSuccess, showCancelButton=true) {
if (askToSendUsername && askToSendEmail) {
msg = "Click OK to have your username and e-mail address sent to a 3rd party application.";
msg = gettext("Click OK to have your username and e-mail address sent to a 3rd party application.");
} else if (askToSendUsername) {
msg = "Click OK to have your username sent to a 3rd party application.";
msg = gettext("Click OK to have your username sent to a 3rd party application.");
} else if (askToSendEmail) {
msg = "Click OK to have your e-mail address sent to a 3rd party application.";
msg = gettext("Click OK to have your e-mail address sent to a 3rd party application.");
} else {
onSuccess("OK");
return;
}

if (showCancelButton) {
msg += "\n\nClick Cancel to return to this page without sending your information.";
msg += "\n\n" + gettext("Click Cancel to return to this page without sending your information.");
}

msg = gettext(msg);
$.when(confirmDialog(msg, $(this), showCancelButton)).then(onSuccess);
}

Expand Down

0 comments on commit e667807

Please sign in to comment.