Commit d252b99a authored by Dylan Griffith's avatar Dylan Griffith Committed by Stan Hu

Internationalize errors CheckUninstallProgressService

parent f84fae13
...@@ -17,7 +17,7 @@ module Clusters ...@@ -17,7 +17,7 @@ module Clusters
rescue Kubeclient::HttpError => e rescue Kubeclient::HttpError => e
log_error(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 end
private private
...@@ -25,18 +25,18 @@ module Clusters ...@@ -25,18 +25,18 @@ module Clusters
def on_success def on_success
app.destroy! app.destroy!
rescue StandardError => e 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 ensure
remove_installation_pod remove_installation_pod
end end
def on_failed 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 end
def check_timeout def check_timeout
if timed_out? 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 else
WaitForUninstallAppWorker.perform_in(WaitForUninstallAppWorker::INTERVAL, app.name, app.id) WaitForUninstallAppWorker.perform_in(WaitForUninstallAppWorker::INTERVAL, app.name, app.id)
end end
......
...@@ -942,6 +942,9 @@ msgstr "" ...@@ -942,6 +942,9 @@ msgstr ""
msgid "Application settings saved successfully" msgid "Application settings saved successfully"
msgstr "" msgstr ""
msgid "Application uninstalled but failed to destroy: %{error_message}"
msgstr ""
msgid "Application was successfully destroyed." msgid "Application was successfully destroyed."
msgstr "" msgstr ""
...@@ -6274,6 +6277,12 @@ msgstr "" ...@@ -6274,6 +6277,12 @@ msgstr ""
msgid "Opens in a new window" msgid "Opens in a new window"
msgstr "" 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" msgid "Operations"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment