From: Jan Provaznik <jprovazn(a)redhat.com>
---
src/app/models/deployment.rb | 10 ++++++----
src/config/locales/en.yml | 4 ++++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/app/models/deployment.rb b/src/app/models/deployment.rb
index 2ec6f6f..63a0262 100644
--- a/src/app/models/deployment.rb
+++ b/src/app/models/deployment.rb
@@ -241,8 +241,8 @@ class Deployment < ActiveRecord::Base
:source => self,
:event_time => DateTime.now,
:status_code => 'deployment_launch_match',
- :summary => "Attempting to launch this deployment on provider account
"\
- "#{account.name}"
+ :summary => I18n.t('deployments.events.launch_attempt',
+ :account => account.name)
)
else
if errs.any?
@@ -767,7 +767,8 @@ class Deployment < ActiveRecord::Base
:source => self,
:event_time => DateTime.now,
:status_code => self.state,
- :summary => "State changed to #{self.state}"
+ :summary => I18n.t('deployments.events.state_changed',
+ :state => self.state)
)
end
end
@@ -785,7 +786,8 @@ class Deployment < ActiveRecord::Base
:source => self,
:event_time => DateTime.now,
:status_code => 'deployment_launch_failed',
- :summary => "Failed to launch deployment: #{$!.message}"
+ :summary => I18n.t('deployments.errors.launch_failed',
+ :msg => $!.message)
)
update_attribute(:state, STATE_FAILED)
cleanup_failed_launch
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 56d5486..19053e7 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -411,6 +411,10 @@ en:
not_valid_deployable_xml: "seems to be not valid Deployable XML: %{msg}"
match_not_found: "Unable to find a suitable Provider Account to host the
Deployment. Check the quota of the Provider Accounts and the status of the Images."
match_not_found_with_errors: "Match not found: %{errors}"
+ launch_failed: "Failed to launch deployment: %{msg}"
+ events:
+ launch_attempt: "Attempting to launch this deployment on provider account
%{account}"
+ state_changed: "State changed to %{state}"
preset_filters:
all_deployments: All Deployments
other_than_stopped: "Non-stopped Deployments"
--
1.7.11.4