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

pull/51031/head
Oliver Eyton-Williams 2023-07-20 17:12:43 +02:00 committed by GitHub
parent a8dc3aa350
commit 60393de145
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -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",

View File

@ -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 = () => {