diff --git a/app/assets/javascripts/editor/editor.js.erb b/app/assets/javascripts/editor/editor.js.erb index 2c8a5d56..7eb8962e 100644 --- a/app/assets/javascripts/editor/editor.js.erb +++ b/app/assets/javascripts/editor/editor.js.erb @@ -59,7 +59,9 @@ configureEditors: function () { confirmResetActiveFile: function (event) { event.preventDefault(); - if (confirm($('#start-over-active-file').data('message-confirm'))) { + let message = $('#start-over-active-file').data('message-confirm'); + message = message.replace('%{filename}', CodeOceanEditor.active_file.filename.replace(/#$/,'')) + if (confirm(message)) { this.resetCode(true); // delete only active file } }, diff --git a/config/locales/de.yml b/config/locales/de.yml index 0d8cceaf..bea81dbd 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -280,7 +280,7 @@ de: collapse_action_sidebar: Aktions-Leiste Einklappen collapse_output_sidebar: Ausgabe-Leiste Einklappen confirm_start_over: Wollen Sie wirklich von vorne anfangen? Ihr kompletter Fortschritt wird entfernt. Diese Aktion kann nicht rückgängig gemacht werden. - confirm_start_over_active_file: Wollen Sie wirklich den Inhalt dieser Datei löschen? Diese Aktion kann nicht rückgängig gemacht werden. + confirm_start_over_active_file: Wollen Sie wirklich den Inhalt der ausgewählten Datei '%{filename}' löschen? Diese Aktion kann nicht rückgängig gemacht werden. confirm_submit: Wollen Sie Ihren Code wirklich zur Bewertung abgeben? create_file: Neue Datei depleted: Alle Ausführungsausgebungen sind momentan in Benutzung. Probiere es später nochmal. diff --git a/config/locales/en.yml b/config/locales/en.yml index abcde81f..4ca6dcb6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -280,7 +280,7 @@ en: collapse_action_sidebar: Collapse Action Sidebar collapse_output_sidebar: Collapse Output Sidebar confirm_start_over: Do you really want to start over? Your complete progress will be reset. You cannot undo this action. - confirm_start_over_active_file: Do you really want to reset this file? You cannot undo this action. + confirm_start_over_active_file: Do you really want to reset the active file '%{filename}'? You cannot undo this action. confirm_submit: Do you really want to submit your code for grading? create_file: New File depleted: All execution environments are busy. Please try again later.