On 10/26/2011 06:35 PM, jzigmund(a)redhat.com wrote:
From: Jozef Zigmund<jzigmund(a)redhat.com>
---
src/app/controllers/deployments_controller.rb | 8 ++++----
src/app/helpers/instances_helper.rb | 10 +++++-----
src/app/views/deployments/_launch_new.html.haml | 4 ++--
src/app/views/pools/_header_index.html.haml | 2 +-
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/app/controllers/deployments_controller.rb
b/src/app/controllers/deployments_controller.rb
index c1a5efb..e101386 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -166,10 +166,10 @@ class DeploymentsController< ApplicationController
@view = 'pretty_view_show'
end
#TODO add links to real data for history, permissions, services
- @tabs = [{:name => 'Instances', :view => @view, :id =>
'instances', :count => @deployment.instances.count},
+ @tabs = [{:name => t('instances.instances'), :view => @view, :id
=> 'instances', :count => @deployment.instances.count},
#{:name => 'Services', :view => @view, :id =>
'services'},
#{:name => 'History', :view => 'history', :id
=> 'history'},
- {:name => 'Properties', :view => 'properties', :id
=> 'properties'}
+ {:name => t('properties'), :view => 'properties',
:id => 'properties'}
#{:name => 'Permissions', :view => 'permissions',
:id => 'permissions'}
]
add_permissions_tab(@deployment)
@@ -276,13 +276,13 @@ class DeploymentsController< ApplicationController
begin
require_privilege(Privilege::USE,instance)
unless instance.valid_action?('stop')
- raise ActionError.new("stop is an invalid action.")
+ raise ActionError.new(t('deployments.errors.stop_invalid_action'))
end
#permissons check here
@task = instance.queue_action(current_user, 'stop')
unless @task
- raise ActionError.new("stop cannot be performed on this
instance.")
+ raise ActionError.new(t('deployments.errors.cannot_stop'))
end
Taskomatic.stop_instance(@task)
notices<< "#{t('deployments.deployment')}:
#{instance.deployment.name}, #{t('instances.instance')}: #{instance.name}:
#{t('deployments.flash.notice.stop')}"
diff --git a/src/app/helpers/instances_helper.rb b/src/app/helpers/instances_helper.rb
index 882d9ad..cfc18e6 100644
--- a/src/app/helpers/instances_helper.rb
+++ b/src/app/helpers/instances_helper.rb
@@ -24,11 +24,11 @@ module InstancesHelper
[
{:name => 'checkbox', :class => 'checkbox', :sortable
=> false },
{:name => '', :class => 'alert', :sortable => false
},
- {:name => 'Name', :sortable => false },
- {:name => 'Public Address', :sortable => false },
- {:name => 'State', :sortable => false },
- {:name => 'Provider', :sortable => false },
- {:name => 'Owner', :sortable => false }
+ {:name => t('instances.list.table.name'), :sortable => false },
+ {:name => t('instances.list.table.public_address'), :sortable =>
false },
+ {:name => t('instances.list.table.state'), :sortable => false },
+ {:name => t('instances.list.table.provider'), :sortable => false
},
+ {:name => t('instances.list.table.owner'), :sortable => false }
]
end
end
diff --git a/src/app/views/deployments/_launch_new.html.haml
b/src/app/views/deployments/_launch_new.html.haml
index e81990d..4d9e232 100644
--- a/src/app/views/deployments/_launch_new.html.haml
+++ b/src/app/views/deployments/_launch_new.html.haml
@@ -31,7 +31,7 @@
%p
%label{:for => 'catalog_entry_id'}
= t('catalog_entries.index.catalog_entry')
- = select_tag :catalog_entry_id, options_for_select([['Load definition from
URL', 'other']] + @catalog_entries.map {|d| [d.name, d.id]},
params[:catalog_entry_id])
+ = select_tag :catalog_entry_id,
options_for_select([[t('deployments.launch_new.load_definition'),
t('deployments.launch_new.other')]] + @catalog_entries.map {|d| [d.name, d.id]},
params[:catalog_entry_id])
You can use t('.load_definition') and t('.other') here.
%p#deployable-url-section
%label{:for => 'deployable_url'}
= t('deployables.index.deployable_url')
@@ -46,7 +46,7 @@
= select :deployment, :frontend_realm_id, @realms.map{|r| [r.name, r.id]},
:include_blank => true
%fieldset.options
- = submit_tag 'Next', :class => 'button', :id =>
"next_button"
+ = submit_tag t('deployments.launch_new.next'), :class =>
'button', :id => "next_button"
You can use t('.next') here.
:javascript
diff --git a/src/app/views/pools/_header_index.html.haml
b/src/app/views/pools/_header_index.html.haml
index cb50c16..ef03505 100644
--- a/src/app/views/pools/_header_index.html.haml
+++ b/src/app/views/pools/_header_index.html.haml
@@ -3,7 +3,7 @@
#obj_actions.button-container
.button-group
= pretty_filter_toggle(pools_path(:view => 'pretty'),
pools_path(:view => 'filter'))
- = link_to t('pools.index.new_pool'), new_pool_path, { :class =>
'button primary', :id => 'new_pool_button' }
+ = link_to t('pools.new_pool'), new_pool_path, { :class => 'button
primary', :id => 'new_pool_button' }
.corner
= render :partial => 'scoreboard_index'
ACK, see a few suggestions on how to make it more succinct inline.