[PATCH conductor 2/3] Translated deployment event messages
jprovazn at redhat.com
jprovazn at redhat.com
Thu Sep 6 11:02:35 UTC 2012
From: Jan Provaznik <jprovazn at 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 72df450..7dbd3e1 100644
--- a/src/app/models/deployment.rb
+++ b/src/app/models/deployment.rb
@@ -245,8 +245,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?
@@ -771,7 +771,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
@@ -789,7 +790,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 8c966c0..662dd70 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
More information about the aeolus-devel
mailing list