[PATCH conductor] BZ-795902-Provide Unique Names for Cloud Resource Cluster

Tomáš Hrčka thrcka at redhat.com
Tue Mar 13 11:52:18 UTC 2012


https://bugzilla.redhat.com/show_bug.cgi?id=795902
---
 src/app/controllers/provider_realms_controller.rb  |    2 +-
 src/app/controllers/providers_controller.rb        |    2 +-
 src/app/helpers/provider_realms_helper.rb          |    2 +-
 src/app/views/provider_realms/_mapping.html.haml   |    2 +-
 .../views/provider_realms/_properties.html.haml    |    4 ++--
 src/app/views/provider_realms/show.html.haml       |    4 ++--
 src/config/locales/activerecord/en.yml             |   18 +++++++++---------
 src/config/locales/en.yml                          |   10 ++++++++--
 8 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/src/app/controllers/provider_realms_controller.rb b/src/app/controllers/provider_realms_controller.rb
index bf9f9a4..f4ad966 100644
--- a/src/app/controllers/provider_realms_controller.rb
+++ b/src/app/controllers/provider_realms_controller.rb
@@ -62,7 +62,7 @@ class ProviderRealmsController < ApplicationController
   def load_realms
     @header = [
       {:name => '', :sortable => false},
-      {:name => t("realms.index.realm_name"), :sort_attr => :name},
+      {:name => t("provider_realms.name"), :sort_attr => :name},
     ]
     @realms = Realm.apply_filters(:preset_filter_id => params[:provider_realms_preset_filter], :search_filter => params[:provider_realms_search])
   end
diff --git a/src/app/controllers/providers_controller.rb b/src/app/controllers/providers_controller.rb
index 1192a38..e276813 100644
--- a/src/app/controllers/providers_controller.rb
+++ b/src/app/controllers/providers_controller.rb
@@ -260,7 +260,7 @@ class ProvidersController < ApplicationController
     #TODO add links to real data for history,properties,permissions
     @tabs = [{:name => t('connectivity'), :view => 'edit', :id => 'connectivity'},
              {:name => t('accounts'), :view => 'provider_accounts/list', :id => 'accounts', :count => @provider.provider_accounts.count},
-             {:name => t('realm_s'), :view => 'provider_realms/list', :id => 'realms', :count => @realms.count},
+             {:name => t('provider_realms.provider_realms'), :view => 'provider_realms/list', :id => 'realms', :count => @realms.count},
              #{:name => 'Roles & Permissions', :view => @view, :id => 'roles', :count => @provider.permissions.count},
     ]
     add_permissions_tab(@provider, "edit_")
diff --git a/src/app/helpers/provider_realms_helper.rb b/src/app/helpers/provider_realms_helper.rb
index 9c36f0b..3f0c477 100644
--- a/src/app/helpers/provider_realms_helper.rb
+++ b/src/app/helpers/provider_realms_helper.rb
@@ -16,7 +16,7 @@
 module ProviderRealmsHelper
   def provider_realms_header
     [
-      {:name => t("realms.index.realm_name"), :sort_attr => :name},
+      {:name => t("provider_realms.name"), :sort_attr => :name},
       {:name => t("realms.index.realm_availability")}
     ]
   end
diff --git a/src/app/views/provider_realms/_mapping.html.haml b/src/app/views/provider_realms/_mapping.html.haml
index f83f709..800fac9 100644
--- a/src/app/views/provider_realms/_mapping.html.haml
+++ b/src/app/views/provider_realms/_mapping.html.haml
@@ -13,7 +13,7 @@
         %td= realm.name
 
 - unless @provider_accounts.empty?
-  %h2= t('realms.mapping.provider_accounts_mapped_to_realm', :name=> "#{@realm.name}")
+  %h2= t('provider_realms.show.provider_accounts_mapped', :name=> "#{@realm.name}")
   %table.flat.checkbox_table
     - @provider_accounts.each do |account|
       %tr{:class => cycle('nostripe','stripe')}
diff --git a/src/app/views/provider_realms/_properties.html.haml b/src/app/views/provider_realms/_properties.html.haml
index 051c8aa..11fd639 100644
--- a/src/app/views/provider_realms/_properties.html.haml
+++ b/src/app/views/provider_realms/_properties.html.haml
@@ -2,11 +2,11 @@
   %thead
     %tr
       %th.show
-        =t 'realms.properties.realm_details'
+        =t 'provider_realms.show.details'
       %th.show
   %tbody
     %tr
       %td
-        %label= t'realms.properties.realm_name'
+        %label= t'provider_realms.name'
       %td
         = @realm.name
diff --git a/src/app/views/provider_realms/show.html.haml b/src/app/views/provider_realms/show.html.haml
index 0248619..5e73088 100644
--- a/src/app/views/provider_realms/show.html.haml
+++ b/src/app/views/provider_realms/show.html.haml
@@ -4,7 +4,7 @@
   #obj_actions.button_container
     .return_to
       = t('return_to')
-      = link_to t('provider_realms'), edit_provider_path(@realm.provider, :details_tab =>  'realms', :only_tab =>  true), :id =>  'back_to_provider_realms_button'
+      = link_to t('provider_realms.provider_realms'), edit_provider_path(@realm.provider, :details_tab =>  'realms', :only_tab =>  true), :id =>  'back_to_provider_realms_button'
 - unless @realm.available
   %section.admin-content-section
     %header.align-center
@@ -19,7 +19,7 @@
 
 %section.admin-content-section.realm_mapping
   %header
-    %h2= t'realms.show.realm_mapping'
+    %h2= t'provider_realms.show.mapping'
 
   .content
     = render :partial => 'mapping'
diff --git a/src/config/locales/activerecord/en.yml b/src/config/locales/activerecord/en.yml
index 3e8839f..3ac086f 100644
--- a/src/config/locales/activerecord/en.yml
+++ b/src/config/locales/activerecord/en.yml
@@ -11,7 +11,7 @@ en:
       deployable: "Deployable"
       deployment: "Deployment"
       event: "Event"
-      frontend_realm: "Frontend Realm"
+      frontend_realm: "Realm"
       hardware_profile_property: "Hardware Profile Property"
       hardware_profile: "Hardware Profile"
       hook: "Hook"
@@ -30,8 +30,8 @@ en:
       provider_type: "Provider Type"
       provider: "Provider"
       quota: "Quota"
-      realm_backend_target: "Realm Backend Target"
-      realm: "Realm"
+      realm_backend_target: "Provider Realm Backend Target"
+      realm: "Provider Realm"
       role: "Role"
       session: "Session"
       task: "Task"
@@ -91,13 +91,13 @@ en:
         pool_family_id: "Pool Family"
       deployment:
         name: "Name"
-        realm_id: "Realm"
+        realm_id: "Provider Realm"
         owner_id: "Owner"
         pool_id: "Pool"
         lock_version: "Lock Version"
         created_at: "Created At"
         updated_at: "Updated At"
-        frontend_realm_id: "Frontend Realm"
+        frontend_realm_id: "Realm"
         deployable_xml: "Deployable Xml"
         scheduled_for_deletion: "Scheduled For Deletion"
         uuid: "Uuid"
@@ -172,7 +172,7 @@ en:
         external_key: "External Key"
         name: "Name"
         hardware_profile_id: "Hardware Profile"
-        frontend_realm_id: "Frontend Realm"
+        frontend_realm_id: "Realm"
         owner_id: "Owner"
         pool_id: "Pool"
         provider_account_id: "Provider Account"
@@ -281,9 +281,9 @@ en:
         created_at: "Created At"
         updated_at: "Updated At"
       realm_backend_target:
-        realm_or_provider_id: "Realm Or Provider"
-        realm_or_provider_type: "Realm Or Provider Type"
-        frontend_realm_id: "Frontend Realm"
+        realm_or_provider_id: "Provider Realm Or Provider"
+        realm_or_provider_type: "Provider Realm Or Provider Type"
+        frontend_realm_id: "Realm"
       realm:
         external_key: "External Key"
         name: "Name"
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 58d57a0..9b372dc 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -559,7 +559,7 @@ en:
     list:
       delete_selected: Delete Selected
     mapping:
-      mapping_realm: Add mapping to realm
+      mapping_realm: Add mapping to provider realm
       mapping_provider: Add mapping to provider
       realm_mapped_providers: "Realm %{name} is mapped to providers:"
       realm_mapped_realms: "Realm %{name} is mapped to realms:"
@@ -593,6 +593,13 @@ en:
         more_not_deleted: "Could not delete these Realms:"
     preset_filters:
       all_realms: "All Realms"
+  provider_realms:
+    provider_realms: Provider Realms
+    name: Provider Realm Name
+    show:
+      mapping: Provider Realm Mapping
+      details: Provider Realm Details
+      provider_accounts_mapped: Provider Accounts mapped to Provider Realm %{name}
   pool_families:
     pool_families: Pool Families
     pool_family: Pool Family
@@ -1297,4 +1304,3 @@ en:
     provider_realms: Provider Realms
     deployables: Deployables
     deployments: Deployments
-  provider_realms: Provider Realms
-- 
1.7.1




More information about the aeolus-devel mailing list