[PATCH conductor] Cleanup rename CatalogEntrie to Deployables locale files & strings

Tomas Hrcka thrcka at redhat.com
Mon Dec 5 14:53:53 UTC 2011


---
 src/app/controllers/catalogs_controller.rb         |    4 +-
 src/app/controllers/deployables_controller.rb      |   16 ++++++------
 src/app/views/deployables/_from_url.html.haml      |   10 ++++----
 src/app/views/deployables/_list.html.haml          |    2 +-
 src/app/views/deployables/_new.html.haml           |    6 ++--
 .../views/deployables/_new_from_image.html.haml    |    6 ++--
 .../views/deployables/_section_header.html.haml    |    4 +-
 src/app/views/deployables/_upload.html.haml        |   10 ++++----
 src/app/views/deployables/edit.html.haml           |    2 +-
 src/app/views/deployables/show.html.haml           |    4 +-
 src/config/locales/en.yml                          |   26 ++++++++++----------
 11 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/src/app/controllers/catalogs_controller.rb b/src/app/controllers/catalogs_controller.rb
index c530a6a..17a5a85 100644
--- a/src/app/controllers/catalogs_controller.rb
+++ b/src/app/controllers/catalogs_controller.rb
@@ -42,8 +42,8 @@ class CatalogsController < ApplicationController
     save_breadcrumb(catalogs_path(@catalog), @catalog.name)
     @header = [
       { :name => '', :sortable => false },
-      { :name => t("catalog_entries.index.name"), :sort_attr => :name },
-      { :name => t('catalog_entries.index.deployable_xml'), :sortable => false }
+      { :name => t("deployables.index.name"), :sort_attr => :name },
+      { :name => t('deployables.index.deployable_xml'), :sortable => false }
     ]
   end
 
diff --git a/src/app/controllers/deployables_controller.rb b/src/app/controllers/deployables_controller.rb
index fcc5a51..48f68f4 100644
--- a/src/app/controllers/deployables_controller.rb
+++ b/src/app/controllers/deployables_controller.rb
@@ -105,14 +105,14 @@ class DeployablesController < ApplicationController
 
     begin
       @deployable.transaction do
-        raise t("catalog_entries.flash.error.no_catalog") if @selected_catalogs.empty?
+        raise t("deployables.flash.error.no_catalog") if @selected_catalogs.empty?
         @deployable.save!
         @selected_catalogs.each do |cid|
           catalog = Catalog.find(cid)
           require_privilege(Privilege::MODIFY, catalog)
           CatalogEntry.create!(:catalog_id => cid, :deploayble_id => @deployable.id)
         end
-        flash[:notice] = t "catalog_entries.flash.notice.added"
+        flash[:notice] = t "deployables.flash.notice.added"
         if params[:edit_xml]
           redirect_to edit_catalog_deployable_path @selected_catalogs.first.id, @deployable.id, :edit_xml =>true
         else
@@ -120,8 +120,8 @@ class DeployablesController < ApplicationController
         end
       end
     rescue => e
-      flash[:warning]= t('catalog_entries.flash.warning.create_failed', :message => e.message)
-      flash[:warning]= t('catalog_entries.flash.warning.not_valid') if @deployable.errors.has_key?(:xml)
+      flash[:warning]= t('deployables.flash.warning.create_failed', :message => e.message)
+      flash[:warning]= t('deployables.flash.warning.not_valid') if @deployable.errors.has_key?(:xml)
       if params[:create_from_image].present?
         load_catalogs
         @image = Aeolus::Image::Warehouse::Image.find(params[:create_from_image])
@@ -148,7 +148,7 @@ class DeployablesController < ApplicationController
     params[:deployable].delete(:owner_id) if params[:deployable]
 
     if @deployable.update_attributes(params[:deployable])
-      flash[:notice] = t"catalog_entries.flash.notice.updated"
+      flash[:notice] = t"deployables.flash.notice.updated"
       redirect_to catalog_deployable_path(params[:catalog_id], @deployable)
     else
       render :action => 'edit'
@@ -207,9 +207,9 @@ class DeployablesController < ApplicationController
   def set_header
     @header = [
       { :name => 'checkbox', :class => 'checkbox', :sortable => false },
-      { :name => t("catalog_entries.index.name"), :sort_attr => :name },
+      { :name => t("deployables.index.name"), :sort_attr => :name },
       { :name => t("catalogs.index.catalog_name"), :sortable => false },
-      { :name => t("catalog_entries.index.deployable_xml"), :sortable => :url }
+      { :name => t("deployables.index.deployable_xml"), :sortable => :url }
     ]
   end
 
@@ -224,7 +224,7 @@ class DeployablesController < ApplicationController
         response
       end
     rescue RestClient::Exception, SocketError, URI::InvalidURIError
-      flash[:error] = t('catalog_entries.flash.warning.not_valid_or_reachable', :url => url)
+      flash[:error] = t('deployables.flash.warning.not_valid_or_reachable', :url => url)
       nil
     end
   end
diff --git a/src/app/views/deployables/_from_url.html.haml b/src/app/views/deployables/_from_url.html.haml
index d351ecb..9a80239 100644
--- a/src/app/views/deployables/_from_url.html.haml
+++ b/src/app/views/deployables/_from_url.html.haml
@@ -3,23 +3,23 @@
     = render 'layouts/error_messages', :object => @deployable
   %fieldset
     %p
-      = form.label :catalog_id, t('catalog_entries.form.catalog')
+      = form.label :catalog_id, t('deployables.form.catalog')
       %span.text_instead_input= @catalog.name
       .clear
   %fieldset
     %p
-      = form.label :name, t('catalog_entries.index.name')
+      = form.label :name, t('deployables.index.name')
       = form.text_field :name, :class => 'em long'
     %p
-      = form.label :description, t('catalog_entries.form.description')
+      = form.label :description, t('deployables.form.description')
       = form.text_area :description, :class => 'long'
   %fieldset
     %p
-      = label_tag :url, t('catalog_entries.form.deployable_xml_url')
+      = label_tag :url, t('deployables.form.deployable_xml_url')
       = text_field_tag :url
     %p
       = check_box_tag(:edit_xml, true, false)
-      = label_tag :edit_xml, t('catalog_entries.form.edit_xml_after_save')
+      = label_tag :edit_xml, t('deployables.form.edit_xml_after_save')
 
   %fieldset.align-center
     = link_to t('cancel'), catalog_path(@catalog), :class => 'button danger'
diff --git a/src/app/views/deployables/_list.html.haml b/src/app/views/deployables/_list.html.haml
index 55bf664..9342cfb 100644
--- a/src/app/views/deployables/_list.html.haml
+++ b/src/app/views/deployables/_list.html.haml
@@ -4,7 +4,7 @@
 
   .content
     - content_for :form_header do
-      %li= restful_submit_tag t("catalog_entries.show.delete"), "destroy", multi_destroy_catalog_deployables_path(@catalog), 'DELETE', :id => 'delete_button', :class => 'button danger'
+      %li= restful_submit_tag t("deployables.show.delete"), "destroy", multi_destroy_catalog_deployables_path(@catalog), 'DELETE', :id => 'delete_button', :class => 'button danger'
 
     - content_for :filter_controls do
       %li
diff --git a/src/app/views/deployables/_new.html.haml b/src/app/views/deployables/_new.html.haml
index a1d1589..46d9d3f 100644
--- a/src/app/views/deployables/_new.html.haml
+++ b/src/app/views/deployables/_new.html.haml
@@ -2,7 +2,7 @@
 
 %section.admin-content-section
   %header
-    %h2=t'catalog_entries.new.add_catalog_entry'
+    %h2=t'deployables.new.add_catalog_entry'
 
 %section.admin-content-section.image-upload
   %p.description=t'.choose_option_to_upload'
@@ -10,9 +10,9 @@
   %nav#image-upload-tabs.faceted
     %ul.tabs
       %li
-        = link_to t('catalog_entries.new.upload'), new_catalog_deployable_path(@catalog), :id => "upload", :class => "#{'selected' if @form_option == 'upload'}"
+        = link_to t('deployables.new.upload'), new_catalog_deployable_path(@catalog), :id => "upload", :class => "#{'selected' if @form_option == 'upload'}"
       %li
-        = link_to t('catalog_entries.new.from_url'), new_catalog_deployable_path(@catalog, :from_url => true), :id => "from_url", :class => "#{'selected' if @form_option == 'from_url'}"
+        = link_to t('deployables.new.from_url'), new_catalog_deployable_path(@catalog, :from_url => true), :id => "from_url", :class => "#{'selected' if @form_option == 'from_url'}"
 
     .form_option
       = render :partial => @form_option
diff --git a/src/app/views/deployables/_new_from_image.html.haml b/src/app/views/deployables/_new_from_image.html.haml
index 2e1b285..30fe255 100644
--- a/src/app/views/deployables/_new_from_image.html.haml
+++ b/src/app/views/deployables/_new_from_image.html.haml
@@ -12,7 +12,7 @@
         %p= t('.description', :name => @image.name)
         %fieldset
           %div
-            = form.label :name, t('catalog_entries.new.hw_profile')
+            = form.label :name, t('deployables.new.hw_profile')
             = select_tag :hardware_profile, options_from_collection_for_select(@hw_profiles, :id, :name, params[:hardware_profile])
             .clear
           %div
@@ -32,8 +32,8 @@
             .clear
       .centered
         %fieldset.align-center
-          = link_to "#{t'catalog_entries.form.cancel'}", catalogs_path, :class => 'button danger'
-          = submit_tag "#{t'catalog_entries.form.save'}", :name => 'save', :class => 'button primary', :id => 'save_button'
+          = link_to "#{t'deployables.form.cancel'}", catalogs_path, :class => 'button danger'
+          = submit_tag "#{t'deployables.form.save'}", :name => 'save', :class => 'button primary', :id => 'save_button'
 
 :javascript
     $(document).ready(function(){
diff --git a/src/app/views/deployables/_section_header.html.haml b/src/app/views/deployables/_section_header.html.haml
index ed41a09..eb942c3 100644
--- a/src/app/views/deployables/_section_header.html.haml
+++ b/src/app/views/deployables/_section_header.html.haml
@@ -1,4 +1,4 @@
 %header.admin-page-header
-  %h1{:class => controller.controller_name}=t'catalog_entries.index.catalog_entries'
+  %h1{:class => controller.controller_name}=t'deployables.index.catalog_entries'
   #obj_actions.button-group
-    = link_to "#{t'catalog_entries.new_catalog_entry'}", new_catalog_deployable_url(@catalog), :class => 'button primary', :id => 'new_catalog_entry_button'
+    = link_to "#{t'deployables.new_catalog_entry'}", new_catalog_deployable_url(@catalog), :class => 'button primary', :id => 'new_catalog_entry_button'
diff --git a/src/app/views/deployables/_upload.html.haml b/src/app/views/deployables/_upload.html.haml
index 6afaa8f..c933d54 100644
--- a/src/app/views/deployables/_upload.html.haml
+++ b/src/app/views/deployables/_upload.html.haml
@@ -3,23 +3,23 @@
     = render 'layouts/error_messages', :object => @deployable
   %fieldset
     %p
-      = label_tag :catalog_id, t('catalog_entries.form.catalog')
+      = label_tag :catalog_id, t('deployables.form.catalog')
       %span.text_instead_input= @catalog.name
       .clear
   %fieldset
     %p
-      = form.label :name, t('catalog_entries.index.name')
+      = form.label :name, t('deployables.index.name')
       = form.text_field :name, :class => 'em long'
     %p
-      = form.label :description, t('catalog_entries.form.description')
+      = form.label :description, t('deployables.form.description')
       = form.text_area :description, :class => 'long'
     %p
-      = form.label :xml, t('catalog_entries.form.choose_xml')
+      = form.label :xml, t('deployables.form.choose_xml')
       = form.file_field :xml
   %fieldset
     %p
       = check_box_tag(:edit_xml, true, false)
-      = label_tag :edit_xml, t('catalog_entries.form.edit_xml_after_save')
+      = label_tag :edit_xml, t('deployables.form.edit_xml_after_save')
 
   %fieldset.align-center
     = link_to t('cancel'), catalog_path(@catalog), :class => 'button danger'
diff --git a/src/app/views/deployables/edit.html.haml b/src/app/views/deployables/edit.html.haml
index 942f422..e7afe16 100644
--- a/src/app/views/deployables/edit.html.haml
+++ b/src/app/views/deployables/edit.html.haml
@@ -8,7 +8,7 @@
 
 %section.admin-content-section.user
   %header
-    %h2=t'catalog_entries.edit.editing_catalog_entry'
+    %h2=t'deployables.edit.editing_catalog_entry'
 
   .content
     = form_for @deployable, :url => catalog_deployable_path(@catalog, @deployable), :html => { :method => :put, :class => 'generic' } do |f|
diff --git a/src/app/views/deployables/show.html.haml b/src/app/views/deployables/show.html.haml
index 6a8576a..ae97ef5 100644
--- a/src/app/views/deployables/show.html.haml
+++ b/src/app/views/deployables/show.html.haml
@@ -3,8 +3,8 @@
   %h1{:class => controller.controller_name}= @deployable.name
   #obj_actions.button-container
     .button-group
-      = button_to t('catalog_entries.show.delete'), catalog_deployable_path(@catalog, @deployable), :method => 'delete', :confirm => "#{t'catalog_entries.show.confirm_delete'}", :class => 'button danger', :id => 'delete'
-      = link_to t('catalog_entries.show.edit'), edit_catalog_deployable_path(@catalog, @deployable), :class => 'button', :id => 'edit_button'
+      = button_to t('.delete'), catalog_deployable_path(@catalog, @deployable), :method => 'delete', :confirm => "#{t'.confirm_delete'}", :class => 'button danger', :id => 'delete'
+      = link_to t('.edit'), edit_catalog_deployable_path(@catalog, @deployable), :class => 'button', :id => 'edit_button'
 
     = link_to t('deployments.overview.launch'), launch_new_deployments_path(:deployable_id => @deployable.id, :pool_id => @catalog.pool), :id => :launch_deployment
 
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 2819ce6..b143838 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -588,15 +588,15 @@ en:
         provider_accounts_not_removed: "Could not remove these Provider Accounts"
         select_to_add_accounts: "You must select at least one Provider Account to add."
         select_to_remove_accounts: "You must select at least one Provider Account to remove."
-  catalog_entries:
-    new_catalog_entry: New Catalog Entry
+  deployables:
+    new_catalog_entry: New Deployable
     index:
-      catalog_entry: Catalog Entry
-      catalog_entries: Catalog Entries
+      catalog_entry: Deployable
+      deployables: Deployables
       name: Name
       deployable_xml: Deployable XML
     new:
-      add_catalog_entry: Add New Catalog Entry
+      add_catalog_entry: Add New Deployable
       choose_option_to_upload: Choose one of the following options to upload deployable XML file
       upload: Upload
       from_url: From URL
@@ -638,20 +638,20 @@ en:
       ram: RAM
       arch: ARCH
     edit:
-      editing_catalog_entry: Editing Catalog Entry
+      editing_catalog_entry: Editing Deployable
     list:
-      catalog_entries_list: Catalog Entries List
+      deployables_list: Deployables List
     flash:
       warning:
-        not_valid_or_reachable: "Catalog entry XML file is either invalid or no longer reachable at %{url}"
+        not_valid_or_reachable: "Deployable XML file is either invalid or no longer reachable at %{url}"
         not_valid: "Deployable XML file doesn't resolve valid XML"
-        failed: Catalog entry was not created.
+        failed: Deployable was not created.
       notice:
-        added: Catalog entry added.
-        updated: Catalog entry updated successfully!
-        deleted: Catalog entry deleted.
+        added: Deployable added.
+        updated: Deployable updated successfully!
+        deleted: Deployable deleted.
     preset_filters:
-      all_catalog_entries: All Catalog Entries
+      all_deployables: All Deployables
   catalogs:
     catalogs: Catalogs
     new_catalog: New Catalog
-- 
1.7.6.4




More information about the aeolus-devel mailing list