From ee164b9e683bd8bb17e494776e51a4d76b9012cd Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Sat, 30 Apr 2016 14:17:37 +0200 Subject: [PATCH] Fix I18n for request success message --- app/assets/javascripts/editor.js.erb | 2 +- app/views/exercises/_request_comment_dialogcontent.html.slim | 2 +- config/locales/de.yml | 1 + config/locales/en.yml | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/editor.js.erb b/app/assets/javascripts/editor.js.erb index 0180124e..097c0250 100644 --- a/app/assets/javascripts/editor.js.erb +++ b/app/assets/javascripts/editor.js.erb @@ -1160,7 +1160,7 @@ $(function() { } }).done(function() { hideSpinner(); - $.flash.success({ text: 'Request for comments sent!' }) + $.flash.success({ text: $('#askForCommentsButton').data('message-success') }) }).error(ajaxError); $('#comment-modal').modal('hide'); diff --git a/app/views/exercises/_request_comment_dialogcontent.html.slim b/app/views/exercises/_request_comment_dialogcontent.html.slim index 330501f9..4fc34dcd 100644 --- a/app/views/exercises/_request_comment_dialogcontent.html.slim +++ b/app/views/exercises/_request_comment_dialogcontent.html.slim @@ -1,4 +1,4 @@ h5 = t('exercises.implement.comment.question') textarea.form-control#question(style='resize:none;') p = '' -button#askForCommentsButton.btn.btn-block.btn-primary(type='button') =t('exercises.implement.comment.request') \ No newline at end of file +button#askForCommentsButton.btn.btn-block.btn-primary(type='button' data-message-success=t('exercises.editor.request_for_comments_sent')) =t('exercises.implement.comment.request') \ No newline at end of file diff --git a/config/locales/de.yml b/config/locales/de.yml index c0fa726a..adf82f4b 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -210,6 +210,7 @@ de: timeout: 'Ausführung gestoppt. Ihr Code hat die erlaubte Ausführungszeit von %{permitted_execution_time} Sekunden überschritten.' tooltips: save: Ihr Code wird automatisch gespeichert, wann immer Sie eine Datei herunterladen, ausführen oder testen. Explizites Speichern ist also selten notwendig. + request_for_comments_sent: "Kommentaranfrage gesendet." editor_file_tree: file_root: Dateien file_form: diff --git a/config/locales/en.yml b/config/locales/en.yml index 41b65c96..562141c4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -210,6 +210,7 @@ en: timeout: 'Execution stopped. Your code exceeded the permitted execution time of %{permitted_execution_time} seconds.' tooltips: save: Your code is automatically saved whenever you download, run, or test it. Therefore, explicitly saving is rarely necessary. + request_for_comments_sent: "Request for comments sent." editor_file_tree: file_root: Files file_form: