From b2ebc9d487f35e91e18fc8e26c8163c58dcf34d3 Mon Sep 17 00:00:00 2001 From: Ashton South Date: Fri, 22 Nov 2024 11:28:28 -0500 Subject: [PATCH] change messages to say launcher instead of script --- .../app/controllers/launchers_controller.rb | 10 +++++----- .../_edit_fixed_field.html.erb | 2 +- .../views/projects/_launcher_buttons.html.erb | 2 +- apps/dashboard/config/locales/en.yml | 16 ++++++++-------- .../test/system/project_manager_test.rb | 8 ++++---- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/apps/dashboard/app/controllers/launchers_controller.rb b/apps/dashboard/app/controllers/launchers_controller.rb index a4465a6490..750b3fa19a 100644 --- a/apps/dashboard/app/controllers/launchers_controller.rb +++ b/apps/dashboard/app/controllers/launchers_controller.rb @@ -29,8 +29,8 @@ def create default_script_created = @launcher.create_default_script if @launcher.save - notice_messages = [I18n.t('dashboard.jobs_scripts_created')] - notice_messages << I18n.t('dashboard.jobs_scripts_default_created') if default_script_created + notice_messages = [I18n.t('dashboard.jobs_launchers_created')] + notice_messages << I18n.t('dashboard.jobs_launchers_default_created') if default_script_created redirect_to project_path(params[:project_id]), notice: notice_messages.join(' ') else redirect_to project_path(params[:project_id]), alert: @launcher.errors[:save].last @@ -45,7 +45,7 @@ def edit # DELETE /projects/:project_id/launchers/:id def destroy if @launcher.destroy - redirect_to project_path(params[:project_id]), notice: I18n.t('dashboard.jobs_scripts_deleted') + redirect_to project_path(params[:project_id]), notice: I18n.t('dashboard.jobs_launchers_deleted') else redirect_to project_path(params[:project_id]), alert: @launcher.errors[:destroy].last end @@ -57,7 +57,7 @@ def save @launcher.update(save_launcher_params[:launcher]) if @launcher.save - redirect_to project_path(params[:project_id]), notice: I18n.t('dashboard.jobs_scripts_updated') + redirect_to project_path(params[:project_id]), notice: I18n.t('dashboard.jobs_launchers_updated') else redirect_to project_path(params[:project_id]), alert: @launcher.errors[:save].last end @@ -69,7 +69,7 @@ def submit opts = submit_launcher_params[:launcher].to_h.symbolize_keys if (job_id = @launcher.submit(opts)) - redirect_to(project_path(params[:project_id]), notice: I18n.t('dashboard.jobs_scripts_submitted', job_id: job_id)) + redirect_to(project_path(params[:project_id]), notice: I18n.t('dashboard.jobs_launchers_submitted', job_id: job_id)) else redirect_to(project_path(params[:project_id]), alert: @launcher.errors[:submit].last) end diff --git a/apps/dashboard/app/views/launchers/editable_form_fields/_edit_fixed_field.html.erb b/apps/dashboard/app/views/launchers/editable_form_fields/_edit_fixed_field.html.erb index a2670ec631..13d8caa940 100644 --- a/apps/dashboard/app/views/launchers/editable_form_fields/_edit_fixed_field.html.erb +++ b/apps/dashboard/app/views/launchers/editable_form_fields/_edit_fixed_field.html.erb @@ -7,6 +7,6 @@
data-fixed-toggler="<%= field_id %>"> - +
diff --git a/apps/dashboard/app/views/projects/_launcher_buttons.html.erb b/apps/dashboard/app/views/projects/_launcher_buttons.html.erb index 380bf89db6..f756298b5a 100644 --- a/apps/dashboard/app/views/projects/_launcher_buttons.html.erb +++ b/apps/dashboard/app/views/projects/_launcher_buttons.html.erb @@ -50,7 +50,7 @@ id: "delete_#{launcher.id}", class: "btn btn-danger launcher-button", title: delete_title, - data: { confirm: I18n.t('dashboard.jobs_scripts_delete_script_confirmation') }, + data: { confirm: I18n.t('dashboard.jobs_launchers_delete_script_confirmation') }, method: :delete) do %> <%= I18n.t('dashboard.delete') %> diff --git a/apps/dashboard/config/locales/en.yml b/apps/dashboard/config/locales/en.yml index cbe6599f2f..d1ade2a844 100644 --- a/apps/dashboard/config/locales/en.yml +++ b/apps/dashboard/config/locales/en.yml @@ -253,14 +253,14 @@ en: jobs_project_job_deleted: "Successfully deleted job %{job_id}" jobs_project_job_not_deleted: "Cannot delete job %{job_id}" - jobs_scripts_created: "Script successfully created!" - jobs_scripts_default_created: "A 'hello_world.sh' was also added to this project." - jobs_scripts_updated: "Script manifest updated!" - jobs_scripts_not_found: "Cannot find script %{script_id}" - jobs_scripts_deleted: "Script successfully deleted!" - jobs_scripts_submitted: "Successfully submitted job %{job_id}." - jobs_scripts_delete_script_confirmation: "Delete all contents of script?" - jobs_scripts_fixed_field: "Fixed Value" + jobs_launchers_created: "Launcher successfully created!" + jobs_launchers_default_created: "A 'hello_world.sh' was also added to this project." + jobs_launchers_updated: "Launcher manifest updated!" + jobs_launchers_not_found: "Cannot find Launcher %{launcher_id}" + jobs_launchers_deleted: "Launcher successfully deleted!" + jobs_launchers_submitted: "Successfully submitted job %{job_id}." + jobs_launchers_delete_script_confirmation: "Delete all contents of launcher?" + jobs_launchers_fixed_field: "Fixed Value" settings_updated: "Settings updated" settings_invalid_request: "Invalid settings submitted" diff --git a/apps/dashboard/test/system/project_manager_test.rb b/apps/dashboard/test/system/project_manager_test.rb index ed7f29d649..540f213cce 100644 --- a/apps/dashboard/test/system/project_manager_test.rb +++ b/apps/dashboard/test/system/project_manager_test.rb @@ -257,7 +257,7 @@ def add_auto_environment_variable(project_id, launcher_id, save: true) required: false HEREDOC - success_message = I18n.t('dashboard.jobs_scripts_created') + success_message = I18n.t('dashboard.jobs_launchers_created') assert_selector('.alert-success', text: "Close\n#{success_message}") assert_equal(expected_yml, File.read("#{dir}/projects/#{project_id}/.ondemand/launchers/#{launcher_id}/form.yml")) @@ -312,7 +312,7 @@ def add_auto_environment_variable(project_id, launcher_id, save: true) required: true HEREDOC - success_message = I18n.t('dashboard.jobs_scripts_created') + success_message = I18n.t('dashboard.jobs_launchers_created') assert_selector('.alert-success', text: "Close\n#{success_message}") assert_equal(expected_yml, File.read("#{dir}/projects/#{project_id}/.ondemand/launchers/#{launcher_id}/form.yml")) end @@ -563,7 +563,7 @@ def add_auto_environment_variable(project_id, launcher_id, save: true) # correctly saves click_on(I18n.t('dashboard.save')) - success_message = I18n.t('dashboard.jobs_scripts_updated') + success_message = I18n.t('dashboard.jobs_launchers_updated') assert_selector('.alert-success', text: "Close\n#{success_message}") assert_current_path project_path(project_id) @@ -654,7 +654,7 @@ def add_auto_environment_variable(project_id, launcher_id, save: true) # correctly saves click_on(I18n.t('dashboard.save')) - success_message = I18n.t('dashboard.jobs_scripts_updated') + success_message = I18n.t('dashboard.jobs_launchers_updated') assert_selector('.alert-success', text: "Close\n#{success_message}") assert_current_path project_path(project_id)