From d252b99a0eb739e277b7453c99ac78c592ed2e03 Mon Sep 17 00:00:00 2001 From: Dylan Griffith Date: Tue, 30 Apr 2019 14:49:26 +1000 Subject: [PATCH] Internationalize errors CheckUninstallProgressService --- .../applications/check_uninstall_progress_service.rb | 8 ++++---- locale/gitlab.pot | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/services/clusters/applications/check_uninstall_progress_service.rb b/app/services/clusters/applications/check_uninstall_progress_service.rb index 022cc754af9..12245ec90c3 100644 --- a/app/services/clusters/applications/check_uninstall_progress_service.rb +++ b/app/services/clusters/applications/check_uninstall_progress_service.rb @@ -17,7 +17,7 @@ module Clusters rescue Kubeclient::HttpError => e log_error(e) - app.make_errored!("Kubernetes error: #{e.error_code}") + app.make_errored!(_('Kubernetes error: %{error_code}') % { error_code: e.error_code }) end private @@ -25,18 +25,18 @@ module Clusters def on_success app.destroy! rescue StandardError => e - app.make_errored!("Application uninstalled but failed to destroy: #{e.message}") + app.make_errored!(_('Application uninstalled but failed to destroy: %{error_message}') % { error_message: e.message }) ensure remove_installation_pod end def on_failed - app.make_errored!("Operation failed. Check pod logs for #{pod_name} for more details.") + app.make_errored!(_('Operation failed. Check pod logs for %{pod_name} for more details.') % { pod_name: pod_name }) end def check_timeout if timed_out? - app.make_errored!("Operation timed out. Check pod logs for #{pod_name} for more details.") + app.make_errored!(_('Operation timed out. Check pod logs for %{pod_name} for more details.') % { pod_name: pod_name }) else WaitForUninstallAppWorker.perform_in(WaitForUninstallAppWorker::INTERVAL, app.name, app.id) end diff --git a/locale/gitlab.pot b/locale/gitlab.pot index c8b583575c8..3d56efa9834 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -942,6 +942,9 @@ msgstr "" msgid "Application settings saved successfully" msgstr "" +msgid "Application uninstalled but failed to destroy: %{error_message}" +msgstr "" + msgid "Application was successfully destroyed." msgstr "" @@ -6274,6 +6277,12 @@ msgstr "" msgid "Opens in a new window" msgstr "" +msgid "Operation failed. Check pod logs for %{pod_name} for more details." +msgstr "" + +msgid "Operation timed out. Check pod logs for %{pod_name} for more details." +msgstr "" + msgid "Operations" msgstr ""