fix(client): translate navigation warnings (#51026)

This commit is contained in:
Oliver Eyton-Williams
2023-07-20 10:12:43 -05:00
committed by GitHub
parent a8dc3aa350
commit 60393de145
2 changed files with 4 additions and 3 deletions
@@ -544,7 +544,8 @@
"iframe-alert": "Normally this link would bring you to another website! It works. This is a link to: {{externalLink}}",
"iframe-form-submit-alert": "Normally this form would be submitted! It works. This will be submitted to: {{externalLink}}",
"document-notfound": "document not found",
"slow-load-msg": "Looks like this is taking longer than usual, please try refreshing the page."
"slow-load-msg": "Looks like this is taking longer than usual, please try refreshing the page.",
"navigation-warning": "If you leave this page, you will lose your progress. Are you sure?"
},
"icons": {
"gold-cup": "Gold Cup",
@@ -348,13 +348,13 @@ class ShowExam extends Component<ShowExamProps, ShowExamState> {
stopWindowClose = (event: Event) => {
event.preventDefault();
alert('stop!');
alert(this.props.t('misc.navigation-warning'));
};
stopBrowserBack = (event: Event) => {
event.preventDefault();
window.history.forward();
alert('stop!');
alert(this.props.t('misc.navigation-warning'));
};
runExam = () => {