On 10/24/2011 06:01 PM, jzigmund(a)redhat.com wrote:
From: Jozef Zigmund<jzigmund(a)redhat.com>
---
.../controllers/provider_accounts_controller.rb | 2 +-
.../views/provider_accounts/_credentials.html.haml | 2 +-
src/app/views/provider_accounts/_history.html.haml | 2 +-
src/app/views/provider_accounts/_list.html.haml | 4 ++--
.../views/provider_accounts/_permissions.html.haml | 2 +-
.../views/provider_accounts/_properties.html.haml | 20 ++++++++++----------
.../provider_accounts/_provider_form.html.haml | 8 ++++----
.../_provider_selection.html.haml | 8 ++++----
src/app/views/provider_accounts/_rhevm.html.haml | 2 +-
.../provider_accounts/_section_header.html.haml | 4 ++--
src/app/views/provider_accounts/edit.html.haml | 12 ++++++------
src/app/views/provider_accounts/new.html.haml | 8 ++++----
src/app/views/provider_accounts/show.html.haml | 12 ++++++------
13 files changed, 43 insertions(+), 43 deletions(-)
diff --git a/src/app/controllers/provider_accounts_controller.rb
b/src/app/controllers/provider_accounts_controller.rb
index b286696..548aa5d 100644
--- a/src/app/controllers/provider_accounts_controller.rb
+++ b/src/app/controllers/provider_accounts_controller.rb
@@ -33,7 +33,7 @@ class ProviderAccountsController< ApplicationController
end
def show
- @tab_captions = ['Properties', 'Credentials', 'History',
'Permissions']
+ @tab_captions = [t('provider_accounts.tab_captions.properties'),
t('provider_accounts.tab_captions.credentials'),
t('provider_accounts.tab_captions.history'),
t('provider_accounts.tab_captions.permissions')]
@provider_account = ProviderAccount.find(params[:id])
@provider = Provider.find(params[:provider_id])
@account_id = @provider_account.credentials_hash['account_id']
diff --git a/src/app/views/provider_accounts/_credentials.html.haml
b/src/app/views/provider_accounts/_credentials.html.haml
index 9d31c8d..6551f88 100644
--- a/src/app/views/provider_accounts/_credentials.html.haml
+++ b/src/app/views/provider_accounts/_credentials.html.haml
@@ -1,3 +1,3 @@
%h3
- Credentials for
+ =t 'provider_accounts.credentials.credentials_for'
= @account.name
diff --git a/src/app/views/provider_accounts/_history.html.haml
b/src/app/views/provider_accounts/_history.html.haml
index 429320a..9877c8b 100644
--- a/src/app/views/provider_accounts/_history.html.haml
+++ b/src/app/views/provider_accounts/_history.html.haml
@@ -1,3 +1,3 @@
%h3
- History for
+ =t'provider_accounts.history.history_for'
= @account.name
diff --git a/src/app/views/provider_accounts/_list.html.haml
b/src/app/views/provider_accounts/_list.html.haml
index 153eded..4cd9f02 100644
--- a/src/app/views/provider_accounts/_list.html.haml
+++ b/src/app/views/provider_accounts/_list.html.haml
@@ -1,7 +1,7 @@
.content
- content_for :form_header do
- %li= restful_submit_tag "Delete Selected", "destroy",
multi_destroy_provider_provider_accounts_path(@provider), 'DELETE', :id =>
'delete_button', :class => 'button danger'
- %li= link_to "New Account", new_provider_provider_account_path(@provider),
:id => 'new_provider_account', :class => 'button'
+ %li= restful_submit_tag t('delete'), "destroy",
multi_destroy_provider_provider_accounts_path(@provider), 'DELETE', :id =>
'delete_button', :class => 'button danger'
+ %li= link_to t('provider_accounts.new_provider_account'),
new_provider_provider_account_path(@provider), :id => 'new_provider_account',
:class => 'button'
= filter_table(provider_accounts_header, @provider_accounts) do |account|
%tr{:class => cycle('nostripe','stripe')}
diff --git a/src/app/views/provider_accounts/_permissions.html.haml
b/src/app/views/provider_accounts/_permissions.html.haml
index 92ad7a5..ba93552 100644
--- a/src/app/views/provider_accounts/_permissions.html.haml
+++ b/src/app/views/provider_accounts/_permissions.html.haml
@@ -1,3 +1,3 @@
%h3
- Permissions for
+ = t'provider_accounts.permissions.permissions_for'
= @account.name
diff --git a/src/app/views/provider_accounts/_properties.html.haml
b/src/app/views/provider_accounts/_properties.html.haml
index cda06e9..445e870 100644
--- a/src/app/views/provider_accounts/_properties.html.haml
+++ b/src/app/views/provider_accounts/_properties.html.haml
@@ -2,40 +2,40 @@
%thead
%tr
%th.show
- Properties for
+ =t'provider_accounts.properties.properties_for'
= @provider_account.name
%th.show
%tbody
%tr
%td
- %label Running instances quota:
+ %label=t'provider_accounts.properties.running_instances_quota'
%td
- = @provider_account.quota.maximum_running_instances or 'unlimited'
+ = @provider_account.quota.maximum_running_instances or t('unlimited')
- if @account_id
%tr
%td
- = label_tag "Account number:"
+ = label_tag t('provider_accounts.properties.account_number')
%td
= @account_id
%tr
%td
- %label Config Server:
+ %label=t'provider_accounts.properties.config_server'
%td
- missing_config_server = @provider_account.config_server.nil?
%span#config_server
- = missing_config_server ? "None" :
@provider_account.config_server.base_url
+ = missing_config_server ? t('provider_accounts.properties.none') :
@provider_account.config_server.base_url
%span#config_server_control
- if missing_config_server
[
- = link_to 'Add', new_config_server_url +
"?provider_account_id=#{(a)provider_account.id}"
+ = link_to t('add'), new_config_server_url +
"?provider_account_id=#{(a)provider_account.id}"
]
- else
[
- = link_to 'Edit',
edit_config_server_path((a)provider_account.config_server)
+ = link_to t('edit'),
edit_config_server_path((a)provider_account.config_server)
]
[
- = link_to 'Test',
test_config_server_path((a)provider_account.config_server)
+ = link_to t('provider_accounts.properties.test'),
test_config_server_path((a)provider_account.config_server)
]
[
- = link_to 'Delete',
config_server_path((a)provider_account.config_server), :method => 'delete',
:confirm => "Are you sure you want to delete this config server?"
+ = link_to t('delete'),
config_server_path((a)provider_account.config_server), :method => 'delete',
:confirm => t('provider_accounts.properties.sure_to_delete')
]
diff --git a/src/app/views/provider_accounts/_provider_form.html.haml
b/src/app/views/provider_accounts/_provider_form.html.haml
index 93b6222..9c6b1f3 100644
--- a/src/app/views/provider_accounts/_provider_form.html.haml
+++ b/src/app/views/provider_accounts/_provider_form.html.haml
@@ -1,6 +1,6 @@
%fieldset
%p
- = label :provider_account, "Account Name"
+ = label :provider_account, t('provider_accounts.index.provider_name')
= text_field :provider_account, :label, :class => 'em long'
- CredentialDefinition::CREDENTIAL_DEFINITIONS_ORDER.each do |cred_order|
- @provider_account.all_credentials((a)provider).each do |cred|
@@ -17,8 +17,8 @@
%fieldset
%p
- = label_tag "Quota"
- = text_field :quota, :maximum_running_instances, :title =>
t('provider_accounts.form.quota_instances'), :value =>
@quota.maximum_running_instances || "unlimited", :id =>
"quota_instances"
+ = label_tag t("quotas.quota")
+ = text_field :quota, :maximum_running_instances, :title =>
t('provider_accounts.form.quota_instances'), :value =>
@quota.maximum_running_instances || t('provider_accounts.properties.unlimited'),
:id => "quota_instances"
(
%button.linkbutton.nospace{ :type => 'button', :onclick =>
"set_unlimited_quota(\"quota_instances\");" }<>
= t('provider_accounts.form.unlimited_quota')
@@ -26,5 +26,5 @@
:javascript
function set_unlimited_quota(elem_id) {
- $("#" + elem_id)[0].value = "unlimited";
+ $("#" + elem_id)[0].value =
t('provider_accounts.properties.unlimited');
}
diff --git a/src/app/views/provider_accounts/_provider_selection.html.haml
b/src/app/views/provider_accounts/_provider_selection.html.haml
index 34d4f10..5353a18 100644
--- a/src/app/views/provider_accounts/_provider_selection.html.haml
+++ b/src/app/views/provider_accounts/_provider_selection.html.haml
@@ -1,16 +1,16 @@
%fieldset#provider_type
%p
- = label_tag "Provider"
+ = label_tag t('providers.provider')
= select(:provider_account, :provider_id, options_for_select((a)providers.map{ |p|
[p.name, p.id] }, :selected => @provider.id))
- = restful_submit_tag "Choose",
'set_selected_provider',set_selected_provider_provider_provider_accounts_path(@provider),
'GET', :class => 'button pill'
+ = restful_submit_tag t('choose'),
'set_selected_provider',set_selected_provider_provider_provider_accounts_path(@provider),
'GET', :class => 'button pill'
%p
- = label_tag "Cloud type: "
+ = label_tag t('provider_accounts.provider_selection.cloud_type')
= @provider.provider_type.name
.clear
- unless @provider.provider_type.deltacloud_driver.nil?
= render :partial => "provider_form", :locals => {
:provider_type => @provider.provider_type}
- else
- = flash.now[:warning] = "You don't have any provider yet"
+ = flash.now[:warning] = t('provider_accounts.flash.warning.no_provider')
:javascript
$(document).ready(function(){
diff --git a/src/app/views/provider_accounts/_rhevm.html.haml
b/src/app/views/provider_accounts/_rhevm.html.haml
index dd86c72..c9d69e3 100644
--- a/src/app/views/provider_accounts/_rhevm.html.haml
+++ b/src/app/views/provider_accounts/_rhevm.html.haml
@@ -1,2 +1,2 @@
%fieldset.clear
- Login form for RHEV-M (not implemented yet)
+ =t'provider_accounts.rhevm.login_form'
diff --git a/src/app/views/provider_accounts/_section_header.html.haml
b/src/app/views/provider_accounts/_section_header.html.haml
index 5ef520a..08f2993 100644
--- a/src/app/views/provider_accounts/_section_header.html.haml
+++ b/src/app/views/provider_accounts/_section_header.html.haml
@@ -1,5 +1,5 @@
%header.page-header
- %h1{:class => controller.controller_name} Provider Accounts
+ %h1{:class =>
controller.controller_name}=t'provider_accounts.index,provider_accounts'
I think there should be a dot (.) after provider_acocunts.index, not a coma.
#obj_actions.button-group
- = link_to 'New Provider Account', new_provider_account_url, :class =>
'button primary', :id => 'new_provider_account_button'
+ = link_to t('provider_accounts.new.new_provider_account'),
new_provider_account_url, :class => 'button primary', :id =>
'new_provider_account_button'
.corner
diff --git a/src/app/views/provider_accounts/edit.html.haml
b/src/app/views/provider_accounts/edit.html.haml
index 318cb3f..4c69543 100644
--- a/src/app/views/provider_accounts/edit.html.haml
+++ b/src/app/views/provider_accounts/edit.html.haml
@@ -1,15 +1,15 @@
= render :partial => 'layouts/admin_nav'
%header.admin-page-header
%h1
- Account:
+ =t'provider_accounts.edit.account'
= @provider_account.name
#obj_actions
- Return to:
- = link_to "Cloud Providers", edit_provider_path(@provider, :details_tab
=> 'accounts'), :class => 'rounded-link'
+ =t'return_to'
+ = link_to t('provider_accounts.new.cloud_providers'),
edit_provider_path(@provider, :details_tab => 'accounts'), :class =>
'rounded-link'
%section.admin-content-section
%header
- %h2.settings Settings
+ %h2.settings=t'settings.settings'
.content
- unless @providers.empty?
@@ -17,5 +17,5 @@
= render :partial => "form", :locals => { :form => f }
%fieldset.options
.button-group
- = f.submit 'Save Changes', :class => "button pill",
:id => 'save'
- = link_to "Delete Account",
provider_provider_account_path(@provider, @provider_account), :method =>
'delete', :confirm => "Are you sure you want to delete?", :class
=> 'button pill danger'
+ = f.submit t('save'), :class => "button pill", :id
=> 'save'
+ = link_to t('provider_accounts.edit.delete_account'),
provider_provider_account_path(@provider, @provider_account), :method =>
'delete', :confirm => "Are you sure you want to delete?", :class
=> 'button pill danger'
diff --git a/src/app/views/provider_accounts/new.html.haml
b/src/app/views/provider_accounts/new.html.haml
index 565d771..70dfa38 100644
--- a/src/app/views/provider_accounts/new.html.haml
+++ b/src/app/views/provider_accounts/new.html.haml
@@ -1,9 +1,9 @@
= render :partial => 'layouts/admin_nav'
%header.admin-page-header
- %h1 New Provider Account
+ %h1=t'provider_accounts.new.new_provider_account'
#obj_actions
- Return to:
- = link_to "Cloud Providers", edit_provider_path(@provider, :details_tab
=> 'accounts'), :class => 'rounded-link'
+ = t'return_to'
+ = link_to t('provider_accounts.new.cloud_providers'),
edit_provider_path(@provider, :details_tab => 'accounts'), :class =>
'rounded-link'
%section.admin-content-section.provider_accounts
.content
@@ -11,4 +11,4 @@
= form_for([@provider, @provider_account], :html => {:multipart => true,
:class => 'generic'}) do |f|
= render :partial => "form", :locals => { :form => f }
%fieldset.options
- = f.submit 'Save', :class => "button pill", :id =>
'save'
+ = f.submit t('save'), :class => "button pill", :id =>
'save'
diff --git a/src/app/views/provider_accounts/show.html.haml
b/src/app/views/provider_accounts/show.html.haml
index ddcc86e..62e94a8 100644
--- a/src/app/views/provider_accounts/show.html.haml
+++ b/src/app/views/provider_accounts/show.html.haml
@@ -1,19 +1,19 @@
= render :partial => 'layouts/admin_nav'
%header.admin-page-header
%h1
- Account:
+ =t'provider_accounts.new.new_provider_account'
= @provider_account.name
#obj_actions
- Return to:
- = link_to "Cloud Providers", edit_provider_path(@provider, :details_tab
=> 'accounts'), :class => 'rounded-link'
+ =t'return_to'
+ = link_to t('provider_accounts.new.cloud_providers'),
edit_provider_path(@provider, :details_tab => 'accounts'), :class =>
'rounded-link'
%section.admin-content-section
%header
- %h2 Properties
+ %h2=t'properties'
.section-controls
#obj_actions.button-group
- = link_to "Edit", edit_provider_provider_account_path(@provider,
@provider_account), :class => "button pill", :title => "Edit
Provider Account"
- = link_to "Test Connection", provider_provider_account_path(@provider,
@provider_account, :test_account => true), :class => 'button pill'
+ = link_to t('edit'), edit_provider_provider_account_path(@provider,
@provider_account), :class => "button pill", :title => "Edit
Provider Account"
+ = link_to t('provider_accounts.show.test_connection'),
provider_provider_account_path(@provider, @provider_account, :test_account => true),
:class => 'button pill'
.content
= render :partial => 'properties'