diff --git a/app/helpers/application_helper/button/collect_logs.rb b/app/helpers/application_helper/button/collect_logs.rb index 7c0d851979c..01046bab417 100644 --- a/app/helpers/application_helper/button/collect_logs.rb +++ b/app/helpers/application_helper/button/collect_logs.rb @@ -4,11 +4,9 @@ class ApplicationHelper::Button::CollectLogs < ApplicationHelper::Button::LogDep def disabled? @error_message = if !@record.started? - _('Cannot collect current logs unless the %{server} is started') % - {:server => ui_lookup(:table => 'miq_server')} + _('Cannot collect current logs unless the Server is started') elsif @record.log_collection_active_recently? - _('Log collection is already in progress for this %{server}') % - {:server => ui_lookup(:table => 'miq_server')} + _('Log collection is already in progress for this Server') elsif !@record.log_file_depot _('Log collection requires the Log Depot settings to be configured') end diff --git a/app/helpers/application_helper/button/iso_datastore_new.rb b/app/helpers/application_helper/button/iso_datastore_new.rb index 7d4b5040c00..c1d681cf0d9 100644 --- a/app/helpers/application_helper/button/iso_datastore_new.rb +++ b/app/helpers/application_helper/button/iso_datastore_new.rb @@ -1,8 +1,7 @@ class ApplicationHelper::Button::IsoDatastoreNew < ApplicationHelper::Button::ButtonNewDiscover def disabled? if no_ems_without_iso_datastores? - @error_message = _('No %{providers} are available to create an ISO Datastore on') % - {:providers => ui_lookup(:tables => 'ext_management_system')} + @error_message = _('No Providers are available to create an ISO Datastore on') end @error_message.present? end diff --git a/app/helpers/application_helper/button/storage_delete.rb b/app/helpers/application_helper/button/storage_delete.rb index 6191dddb7f7..95d5cdbf6eb 100644 --- a/app/helpers/application_helper/button/storage_delete.rb +++ b/app/helpers/application_helper/button/storage_delete.rb @@ -3,8 +3,7 @@ class ApplicationHelper::Button::StorageDelete < ApplicationHelper::Button::Basi def disabled? unless @record.vms_and_templates.empty? && @record.hosts.empty? - @error_message = _('Only %{storage} without VMs and Hosts can be removed') % - {:storage => ui_lookup(:table => 'storage')} + @error_message = _('Only Datastore without VMs and Hosts can be removed') end @error_message.present? end diff --git a/app/helpers/application_helper/button/storage_perf.rb b/app/helpers/application_helper/button/storage_perf.rb index 71828197546..5b0cfc85e94 100644 --- a/app/helpers/application_helper/button/storage_perf.rb +++ b/app/helpers/application_helper/button/storage_perf.rb @@ -3,8 +3,7 @@ class ApplicationHelper::Button::StoragePerf < ApplicationHelper::Button::Basic def disabled? unless @record.has_perf_data? - @error_message = _('No Capacity & Utilization data has been collected for this %{storage}') % - {:storage => ui_lookup(:table => 'storage')} + @error_message = _('No Capacity & Utilization data has been collected for this Datastore') end @error_message.present? end diff --git a/app/helpers/application_helper/button/volume_detach.rb b/app/helpers/application_helper/button/volume_detach.rb index a6342b59cfb..46fc60ed316 100644 --- a/app/helpers/application_helper/button/volume_detach.rb +++ b/app/helpers/application_helper/button/volume_detach.rb @@ -3,11 +3,7 @@ def disabled? if !@record.is_available?(:detach_volume) @error_message = @record.is_available_now_error_message(:detach_volume) elsif @record.number_of(:vms) == 0 - @error_message = _("%{model} \"%{name}\" is not attached to any %{instances}") % { - :model => ui_lookup(:table => 'cloud_volume'), - :name => @record.name, - :instances => ui_lookup(:tables => 'vm_cloud') - } + @error_message = _("Cloud Volume \"%{name}\" is not attached to any Instances") % {:name => @record.name} end @error_message.present? end diff --git a/app/helpers/application_helper/button/zone_collect_logs.rb b/app/helpers/application_helper/button/zone_collect_logs.rb index f2c84702301..1ddafad7ecd 100644 --- a/app/helpers/application_helper/button/zone_collect_logs.rb +++ b/app/helpers/application_helper/button/zone_collect_logs.rb @@ -4,13 +4,11 @@ class ApplicationHelper::Button::ZoneCollectLogs < ApplicationHelper::Button::Lo def disabled? @error_message = if !@record.any_started_miq_servers? - _('Cannot collect current logs unless there are started %{servers} in the Zone') % - {:servers => ui_lookup(:tables => 'miq_servers')} + _('Cannot collect current logs unless there are started Servers in the Zone') elsif !@record.log_file_depot _('This Zone do not have Log Depot settings configured, collection not allowed') elsif @record.log_collection_active_recently? - _('Log collection is already in progress for one or more %{servers} in this Zone') % - {:servers => ui_lookup(:tables => 'miq_servers')} + _('Log collection is already in progress for one or more Servers in this Zone') end @error_message.present? end diff --git a/app/helpers/auth_key_pair_cloud_helper/textual_summary.rb b/app/helpers/auth_key_pair_cloud_helper/textual_summary.rb index e3eadaf4580..51be5353825 100644 --- a/app/helpers/auth_key_pair_cloud_helper/textual_summary.rb +++ b/app/helpers/auth_key_pair_cloud_helper/textual_summary.rb @@ -20,12 +20,11 @@ def textual_fingerprint end def textual_vms - label = ui_lookup(:tables => "vm_cloud") num = @record.number_of(:vms) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _("Instances"), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "vm_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'instances') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Instances") end h end diff --git a/app/helpers/availability_zone_helper/textual_summary.rb b/app/helpers/availability_zone_helper/textual_summary.rb index 99a5fc80f9b..a8aa86ae5b7 100644 --- a/app/helpers/availability_zone_helper/textual_summary.rb +++ b/app/helpers/availability_zone_helper/textual_summary.rb @@ -18,23 +18,21 @@ def textual_group_availability_zone_totals # def textual_cloud_volumes - label = ui_lookup(:tables => "cloud_volume") num = @record.number_of(:cloud_volumes) - h = {:label => label, :icon => "pficon pficon-volume", :value => num} + h = {:label => _('Cloud Volumes'), :icon => "pficon pficon-volume", :value => num} if num > 0 && role_allows?(:feature => "cloud_volume_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'cloud_volumes') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Cloud Volumes") end h end def textual_instances - label = ui_lookup(:tables => "vm_cloud") num = @record.number_of(:vms) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Instances'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "vm_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'instances') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Instances") end h end diff --git a/app/helpers/cloud_network_helper/textual_summary.rb b/app/helpers/cloud_network_helper/textual_summary.rb index 19b2298c668..034ad2d0999 100644 --- a/app/helpers/cloud_network_helper/textual_summary.rb +++ b/app/helpers/cloud_network_helper/textual_summary.rb @@ -38,12 +38,11 @@ def textual_parent_ems_cloud end def textual_instances - label = ui_lookup(:tables => "vm_cloud") num = @record.number_of(:vms) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Instances'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "vm_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'instances') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _('Show all Instances') end h end diff --git a/app/helpers/cloud_object_store_container_helper/textual_summary.rb b/app/helpers/cloud_object_store_container_helper/textual_summary.rb index f9d929f2790..0f7bc59c3c7 100644 --- a/app/helpers/cloud_object_store_container_helper/textual_summary.rb +++ b/app/helpers/cloud_object_store_container_helper/textual_summary.rb @@ -28,21 +28,19 @@ def textual_ems def textual_cloud_tenant cloud_tenant = @record.cloud_tenant if @record.respond_to?(:cloud_tenant) - label = ui_lookup(:table => "cloud_tenant") - h = {:label => label, :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.nil? ? "None" : cloud_tenant.name)} + h = {:label => _('Cloud Tenant'), :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.nil? ? "None" : cloud_tenant.name)} if cloud_tenant && role_allows?(:feature => "cloud_tenant_show") - h[:title] = _("Show this Cloud Object Store's parent %{parent}") % {:parent => label} + h[:title] = _("Show this Cloud Object Store's parent Cloud Tenant") h[:link] = url_for_only_path(:controller => 'cloud_tenant', :action => 'show', :id => cloud_tenant) end h end def textual_cloud_object_store_objects - label = ui_lookup(:tables => "cloud_object_store_object") num = @record.number_of(:cloud_object_store_objects) - h = {:label => label, :icon => "ff ff-cloud-object-store", :value => num} + h = {:label => _('Cloud Object Store Objects'), :icon => "ff ff-cloud-object-store", :value => num} if num > 0 && role_allows?(:feature => "cloud_object_store_object_show_list") - h[:title] = _("Show this Cloud Object Store's child %{children}") % {:children => label} + h[:title] = _("Show this Cloud Object Store's child Cloud Object Store Objects") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'cloud_object_store_objects') end h diff --git a/app/helpers/cloud_object_store_object_helper/textual_summary.rb b/app/helpers/cloud_object_store_object_helper/textual_summary.rb index 22e994ef5bf..533142cbb52 100644 --- a/app/helpers/cloud_object_store_object_helper/textual_summary.rb +++ b/app/helpers/cloud_object_store_object_helper/textual_summary.rb @@ -35,10 +35,9 @@ def textual_etag def textual_cloud_tenant cloud_tenant = @record.cloud_tenant if @record.respond_to?(:cloud_tenant) - label = ui_lookup(:table => "cloud_tenant") - h = {:label => label, :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.nil? ? "None" : cloud_tenant.name)} + h = {:label => _('Cloud Tenant'), :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.nil? ? "None" : cloud_tenant.name)} if cloud_tenant && role_allows?(:feature => "cloud_tenant_show") - h[:title] = _("Show this Cloud Object's parent %{parent}") % {:parent => label} + h[:title] = _("Show this Cloud Object's parent Cloud Tenant") h[:link] = url_for_only_path(:controller => 'cloud_tenant', :action => 'show', :id => cloud_tenant) end h @@ -46,14 +45,13 @@ def textual_cloud_tenant def textual_cloud_object_store_container object_store_container = @record.cloud_object_store_container if @record.respond_to?(:cloud_object_store_container) - label = ui_lookup(:table => "cloud_object_store_container") h = { - :label => label, + :label => _('Cloud Object Store Container'), :icon => "ff ff-cloud-object-store", :value => (object_store_container.nil? ? "None" : object_store_container.key) } if object_store_container && role_allows?(:feature => "cloud_object_store_container_show") - h[:title] = _("Show this Cloud Object's parent %{parent}") % {:parent => label} + h[:title] = _("Show this Cloud Object's parent Cloud Object Store Container") h[:link] = url_for_only_path(:controller => 'cloud_object_store_container', :action => 'show', :id => object_store_container) diff --git a/app/helpers/cloud_subnet_helper/textual_summary.rb b/app/helpers/cloud_subnet_helper/textual_summary.rb index a9f7dec8a3a..f5ad28efb8a 100644 --- a/app/helpers/cloud_subnet_helper/textual_summary.rb +++ b/app/helpers/cloud_subnet_helper/textual_summary.rb @@ -67,12 +67,11 @@ def textual_parent_ems_cloud end def textual_instances - label = ui_lookup(:tables => "vm_cloud") num = @record.number_of(:vms) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Instances'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "vm_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'instances') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Instances") end h end diff --git a/app/helpers/cloud_tenant_helper/textual_summary.rb b/app/helpers/cloud_tenant_helper/textual_summary.rb index e20c94018e7..58d1565c1f7 100644 --- a/app/helpers/cloud_tenant_helper/textual_summary.rb +++ b/app/helpers/cloud_tenant_helper/textual_summary.rb @@ -25,23 +25,21 @@ def textual_group_quotas # Items # def textual_instances - label = ui_lookup(:tables => "vm_cloud") num = @record.number_of(:vms) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Instances'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "vm_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'instances') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Instances") end h end def textual_images - label = ui_lookup(:tables => "template_cloud") num = @record.number_of(:miq_templates) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Images'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "miq_template_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'images') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Images") end h end @@ -81,12 +79,11 @@ def textual_cloud_volume_snapshots end def textual_cloud_object_store_containers - label = ui_lookup(:tables => "cloud_object_store_container") num = @record.number_of(:cloud_object_store_containers) - h = {:label => label, :icon => "ff ff-cloud-object-store", :value => num} + h = {:label => _('Cloud Object Store Containers'), :icon => "ff ff-cloud-object-store", :value => num} if num > 0 && role_allows?(:feature => "cloud_object_store_container_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'cloud_object_store_containers') - h[:title] = _("Show all %{models}") % {:models => label} + h[:title] = _("Show all Cloud Object Store Containers") end h end diff --git a/app/helpers/cloud_volume_backup_helper/textual_summary.rb b/app/helpers/cloud_volume_backup_helper/textual_summary.rb index 04683ae1806..6287ebee22a 100644 --- a/app/helpers/cloud_volume_backup_helper/textual_summary.rb +++ b/app/helpers/cloud_volume_backup_helper/textual_summary.rb @@ -33,10 +33,9 @@ def textual_ems_storage def textual_cloud_tenant cloud_tenant = @record.try(:cloud_tenant) - label = ui_lookup(:table => "cloud_tenants") - h = {:label => label, :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.try(:name) || _("None"))} + h = {:label => _('Cloud Tenants'), :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.try(:name) || _("None"))} if cloud_tenant && role_allows?(:feature => "cloud_tenant_show") - h[:title] = _("Show this Backup's %{parent}") % {:parent => label} + h[:title] = _("Show this Backup's Cloud Tenants") h[:link] = url_for_only_path(:controller => 'cloud_tenant', :action => 'show', :id => cloud_tenant) end h diff --git a/app/helpers/cloud_volume_helper/textual_summary.rb b/app/helpers/cloud_volume_helper/textual_summary.rb index 9a10631b0ea..5b42810372d 100644 --- a/app/helpers/cloud_volume_helper/textual_summary.rb +++ b/app/helpers/cloud_volume_helper/textual_summary.rb @@ -35,14 +35,13 @@ def textual_ems def textual_availability_zone availability_zone = @record.availability_zone - label = ui_lookup(:table => "availability_zone") h = { - :label => label, + :label => _('Availability Zone'), :icon => "pficon pficon-zone", :value => (availability_zone.nil? ? _("None") : availability_zone.name) } if availability_zone && role_allows?(:feature => "availability_zone_show") - h[:title] = _("Show this Volume's %{availability_zone}") % {:availability_zone => label} + h[:title] = _("Show this Volume's Availability Zone") h[:link] = url_for_only_path(:controller => 'availability_zone', :action => 'show', :id => availability_zone) end h @@ -50,14 +49,13 @@ def textual_availability_zone def textual_base_snapshot base_snapshot = @record.base_snapshot if @record.respond_to?(:base_snapshot) - label = ui_lookup(:table => "base_snapshot") h = { - :label => label, + :label => _('Base Snapshot'), :icon => "fa fa-camera", :value => (base_snapshot.nil? ? _("None") : base_snapshot.name) } if base_snapshot && role_allows?(:feature => "cloud_volume_snapshot_show") - h[:title] = _("Show this Volume's %{parent}") % {:parent => label} + h[:title] = _("Show this Volume's Base Snapshot") h[:link] = url_for_only_path(:controller => 'cloud_volume_snapshot', :action => 'show', :id => base_snapshot) end h @@ -65,45 +63,39 @@ def textual_base_snapshot def textual_cloud_tenant cloud_tenant = @record.cloud_tenant if @record.respond_to?(:cloud_tenant) - label = ui_lookup(:table => "cloud_tenants") - h = {:label => label, :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.nil? ? _("None") : cloud_tenant.name)} + h = {:label => _('Cloud Tenants'), :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.nil? ? _("None") : cloud_tenant.name)} if cloud_tenant && role_allows?(:feature => "cloud_tenant_show") - h[:title] = _("Show this Volume's %{cloud_tenant}") % {:cloud_tenant => label} + h[:title] = _("Show this Volume's Cloud Tenants") h[:link] = url_for_only_path(:controller => 'cloud_tenant', :action => 'show', :id => cloud_tenant) end h end def textual_cloud_volume_snapshots - label = ui_lookup(:tables => "cloud_volume_snapshots") num = @record.number_of(:cloud_volume_snapshots) - h = {:label => label, :icon => "fa fa-camera", :value => num} + h = {:label => _('Cloud Volume Snapshots'), :icon => "fa fa-camera", :value => num} if num > 0 && role_allows?(:feature => "cloud_volume_snapshot_show_list") - label = ui_lookup(:tables => "cloud_volume_snapshots") - h[:title] = _("Show all %{models}") % {:models => label} + h[:title] = _("Show all Cloud Volume Snapshots") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'cloud_volume_snapshots') end h end def textual_cloud_volume_backups - label = ui_lookup(:tables => "cloud_volume_backup") num = @record.number_of(:cloud_volume_backups) - h = {:label => label, :icon => "pficon pficon-volume", :value => num} + h = {:label => _('Cloud Volume Backups'), :icon => "pficon pficon-volume", :value => num} if num > 0 && role_allows?(:feature => "cloud_volume_backup_show_list") - label = ui_lookup(:tables => "cloud_volume_backups") - h[:title] = _("Show all %{models}") % {:models => label} + h[:title] = _("Show all Cloud Volume Backups") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'cloud_volume_backups') end h end def textual_attachments - label = ui_lookup(:tables => "vm_cloud") num = @record.number_of(:attachments) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Instances'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "vm_show_list") - h[:title] = _("Show all attached %{models}") % {:models => label} + h[:title] = _("Show all attached Instances") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'instances') end h diff --git a/app/helpers/cloud_volume_snapshot_helper/textual_summary.rb b/app/helpers/cloud_volume_snapshot_helper/textual_summary.rb index 60f907e6258..816617d1b73 100644 --- a/app/helpers/cloud_volume_snapshot_helper/textual_summary.rb +++ b/app/helpers/cloud_volume_snapshot_helper/textual_summary.rb @@ -16,12 +16,10 @@ def textual_size end def textual_based_volumes - label = ui_lookup(:table => "based_volumes") num = @record.total_based_volumes - h = {:label => label, :icon => "pficon pficon-volume", :value => num} + h = {:label => _('Cloud Volumes Based on Snapshot'), :icon => "pficon pficon-volume", :value => num} if num > 0 && role_allows?(:feature => "cloud_volume_show_list") - label = ui_lookup(:table => "cloud_volumes") - h[:title] = _("Show all %{volumes} based on this Snapshot.") % {:volumes => label} + h[:title] = _("Show all Cloud Volumes based on this Snapshot.") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'based_volumes') end h @@ -41,10 +39,9 @@ def textual_ems def textual_cloud_tenant cloud_tenant = @record.cloud_tenant if @record.respond_to?(:cloud_tenant) - label = ui_lookup(:table => "cloud_tenants") - h = {:label => label, :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.nil? ? _("None") : cloud_tenant.name)} + h = {:label => _('Cloud Tenants'), :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.nil? ? _("None") : cloud_tenant.name)} if cloud_tenant && role_allows?(:feature => "cloud_tenant_show") - h[:title] = _("Show this Snapshot's %{parent}") % {:parent => label} + h[:title] = _("Show this Snapshot's Cloud Tenants") h[:link] = url_for_only_path(:controller => 'cloud_tenant', :action => 'show', :id => cloud_tenant) end h diff --git a/app/helpers/ems_cloud_helper/textual_summary.rb b/app/helpers/ems_cloud_helper/textual_summary.rb index f23f6414077..63a647bbd3e 100644 --- a/app/helpers/ems_cloud_helper/textual_summary.rb +++ b/app/helpers/ems_cloud_helper/textual_summary.rb @@ -78,23 +78,21 @@ def textual_guid end def textual_instances - label = ui_lookup(:tables => "vm_cloud") num = @record.number_of(:vms) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Instances'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "vm_show_list") h[:link] = ems_cloud_path(@record.id, :display => 'instances') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Instances") end h end def textual_images - label = ui_lookup(:tables => "template_cloud") num = @record.number_of(:miq_templates) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Images'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "miq_template_show_list") h[:link] = ems_cloud_path(@record.id, :display => 'images') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Images") end h end @@ -108,11 +106,10 @@ def textual_network_manager end def textual_storage_managers - label = _("Storage Managers") num = @record.try(:storage_managers) ? @record.number_of(:storage_managers) : 0 - h = {:label => label, :icon => "fa fa-database", :value => num} + h = {:label => _('Storage Managers'), :icon => "fa fa-database", :value => num} if num > 0 && role_allows?(:feature => "ems_storage_show_list") - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Storage Managers") h[:link] = ems_cloud_path(@record.id, :display => 'storage_managers') end h @@ -139,12 +136,11 @@ def textual_flavors end def textual_security_groups - label = ui_lookup(:tables => "security_group") num = @record.number_of(:security_groups) - h = {:label => label, :icon => "pficon pficon-cloud-security", :value => num} + h = {:label => _('Security Groups'), :icon => "pficon pficon-cloud-security", :value => num} if num > 0 && role_allows?(:feature => "security_group_show_list") h[:link] = ems_cloud_path(@record.id, :display => 'security_groups') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Security Groups") end h end diff --git a/app/helpers/ems_container_helper/textual_summary.rb b/app/helpers/ems_container_helper/textual_summary.rb index ee2240c4a79..3bbdca3b775 100644 --- a/app/helpers/ems_container_helper/textual_summary.rb +++ b/app/helpers/ems_container_helper/textual_summary.rb @@ -81,11 +81,10 @@ def textual_topology def textual_volumes count_of_volumes = @record.number_of(:persistent_volumes) - label = ui_lookup(:tables => "volume") - h = {:label => label, :icon => "pficon pficon-volume", :value => count_of_volumes} + h = {:label => _('Volumes'), :icon => "pficon pficon-volume", :value => count_of_volumes} if count_of_volumes > 0 && role_allows?(:feature => "persistent_volume_show_list") h[:link] = ems_container_path(@record.id, :display => 'persistent_volumes') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Volumes") end h end diff --git a/app/helpers/flavor_helper/textual_summary.rb b/app/helpers/flavor_helper/textual_summary.rb index bc07e83e9a4..c1555eed8a7 100644 --- a/app/helpers/flavor_helper/textual_summary.rb +++ b/app/helpers/flavor_helper/textual_summary.rb @@ -65,12 +65,11 @@ def textual_cloud_subnet_required end def textual_instances - label = ui_lookup(:tables => "vm_cloud") num = @record.number_of(:vms) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Instances'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "vm_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'instances') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Instances") end h end diff --git a/app/helpers/floating_ip_helper/textual_summary.rb b/app/helpers/floating_ip_helper/textual_summary.rb index 6cdeb66ff2b..28cf884771c 100644 --- a/app/helpers/floating_ip_helper/textual_summary.rb +++ b/app/helpers/floating_ip_helper/textual_summary.rb @@ -40,13 +40,12 @@ def textual_parent_ems_cloud def textual_instance return unless @record.vm - label = ui_lookup(:table => "vm_cloud") instance = @record.vm - h = {:label => label, :icon => "pficon pficon-virtual-machine"} + h = {:label => _('Instance'), :icon => "pficon pficon-virtual-machine"} if instance && role_allows?(:feature => "vm_show") h[:value] = instance.name h[:link] = url_for_only_path(:controller => 'vm_cloud', :action => 'show', :id => instance.id) - h[:title] = _("Show %{label}") % {:label => label} + h[:title] = _("Show Instance") end h end diff --git a/app/helpers/host_aggregate_helper/textual_summary.rb b/app/helpers/host_aggregate_helper/textual_summary.rb index 8dff1ab9182..5d22afac144 100644 --- a/app/helpers/host_aggregate_helper/textual_summary.rb +++ b/app/helpers/host_aggregate_helper/textual_summary.rb @@ -14,23 +14,21 @@ def textual_group_relationships # def textual_hosts - label = ui_lookup(:tables => "host") num = @record.number_of(:hosts) - h = {:label => label, :icon => "pficon pficon-screen", :value => num} + h = {:label => _('Hosts'), :icon => "pficon pficon-screen", :value => num} if num > 0 && role_allows?(:feature => "host_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'hosts') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Hosts") end h end def textual_instances - label = ui_lookup(:tables => "vm_cloud") num = @record.number_of(:vms) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Instances'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "vm_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'instances') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Instances") end h end diff --git a/app/helpers/host_helper/textual_summary.rb b/app/helpers/host_helper/textual_summary.rb index 10e9dbc4ba6..ede51f6269d 100644 --- a/app/helpers/host_helper/textual_summary.rb +++ b/app/helpers/host_helper/textual_summary.rb @@ -270,12 +270,11 @@ def textual_drift_history def textual_availability_zone return nil unless @record.openstack_host? availability_zone = @record.availability_zone - label = ui_lookup(:table => "availability_zone") - h = {:label => label, + h = {:label => _('Availability Zone'), :icon => "pficon pficon-zone", :value => (availability_zone.nil? ? _("None") : availability_zone.name)} if availability_zone && role_allows?(:feature => "availability_zone_show") - h[:title] = _("Show this %{title}'s %{label}") % {:title => host_title, :label => label} + h[:title] = _("Show this %{title}'s Availability Zone") % {:title => host_title} h[:link] = url_for_only_path(:controller => 'availability_zone', :action => 'show', :id => availability_zone) end h diff --git a/app/helpers/load_balancer_helper/textual_summary.rb b/app/helpers/load_balancer_helper/textual_summary.rb index bf87162abf5..038c2957488 100644 --- a/app/helpers/load_balancer_helper/textual_summary.rb +++ b/app/helpers/load_balancer_helper/textual_summary.rb @@ -53,12 +53,11 @@ def textual_cloud_tenant end def textual_instances - label = ui_lookup(:tables => "vm_cloud") num = @record.number_of(:vms) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Instances'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "vm_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'instances') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Instances") end h end diff --git a/app/helpers/network_port_helper/textual_summary.rb b/app/helpers/network_port_helper/textual_summary.rb index b91559e27d5..1f6d4ae7b87 100644 --- a/app/helpers/network_port_helper/textual_summary.rb +++ b/app/helpers/network_port_helper/textual_summary.rb @@ -50,14 +50,13 @@ def textual_parent_ems_cloud def textual_device device = @record.device if device.kind_of?(VmOrTemplate) - label = ui_lookup(:table => "vm_cloud") instance = @record.device h = nil if instance && role_allows?(:feature => "vm_show") - h = {:label => label, :icon => "pficon pficon-virtual-machine"} + h = {:label => _('Instance'), :icon => "pficon pficon-virtual-machine"} h[:value] = instance.name h[:link] = url_for_only_path(:controller => 'vm_cloud', :action => 'show', :id => instance.id) - h[:title] = _("Show %{label}") % {:label => label} + h[:title] = _("Show Instance") end h else diff --git a/app/helpers/network_router_helper/textual_summary.rb b/app/helpers/network_router_helper/textual_summary.rb index 5f12cb3d7c6..2231a8707ec 100644 --- a/app/helpers/network_router_helper/textual_summary.rb +++ b/app/helpers/network_router_helper/textual_summary.rb @@ -33,12 +33,11 @@ def textual_parent_ems_cloud end def textual_instances - label = ui_lookup(:tables => "vm_cloud") num = @record.number_of(:vms) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Instances'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "vm_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'instances') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Instances") end h end diff --git a/app/helpers/orchestration_stack_helper/textual_summary.rb b/app/helpers/orchestration_stack_helper/textual_summary.rb index d001dff047d..29b2e36b00e 100644 --- a/app/helpers/orchestration_stack_helper/textual_summary.rb +++ b/app/helpers/orchestration_stack_helper/textual_summary.rb @@ -68,10 +68,9 @@ def textual_child_orchestration_stack if num == 1 && role_allows(:feature => "orchestration_stack_show") @record.children.first elsif num > 1 && role_allows(:feature => "orchestration_stack_show_list") - label = _("Child Orchestration Stacks") - h = {:label => label, :icon => "ff ff-stack", :value => num} + h = {:label => _("Child Orchestration Stacks"), :icon => "ff ff-stack", :value => num} h[:link] = url_for_only_path(:action => 'show', :id => @record.id, :display => 'children') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Child Orchestration Stacks") h end end @@ -79,8 +78,7 @@ def textual_child_orchestration_stack def textual_orchestration_template template = @record.try(:orchestration_template) return nil if template.nil? - label = ui_lookup(:table => "orchestration_template") - h = {:label => label, :icon => "ff ff-template", :value => template.name} + h = {:label => _('Orchestration Template'), :icon => "ff ff-template", :value => template.name} if role_allows?(:feature => "orchestration_templates_view") h[:title] = _("Show this Orchestration Template") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'stack_orchestration_template') @@ -89,12 +87,11 @@ def textual_orchestration_template end def textual_instances - label = ui_lookup(:tables => "vm_cloud") num = @record.number_of(:vms) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Instances'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "vm_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'instances') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Instances") end h end @@ -106,7 +103,7 @@ def textual_security_groups def textual_cloud_networks num = @record.number_of(:cloud_networks) return nil if num <= 0 - {:label => ui_lookup(:tables => "cloud_network"), :icon => "ff ff-cloud-network", :value => num} + {:label => _('Cloud Networks'), :icon => "ff ff-cloud-network", :value => num} end def textual_parameters diff --git a/app/helpers/pxe_helper/textual_summary.rb b/app/helpers/pxe_helper/textual_summary.rb index d9b70322e42..4de718ead7e 100644 --- a/app/helpers/pxe_helper/textual_summary.rb +++ b/app/helpers/pxe_helper/textual_summary.rb @@ -125,7 +125,7 @@ def textual_iso_datastore_basicinfo end def textual_iso_datastore_name - {:label => ui_lookup(:table => "ext_management_system"), :value => @isd.name} + {:label => _('Providers'), :value => @isd.name} end def textual_iso_datastore_last_refresh_on diff --git a/app/helpers/security_group_helper/textual_summary.rb b/app/helpers/security_group_helper/textual_summary.rb index 65d0efd952b..e51ad3de44a 100644 --- a/app/helpers/security_group_helper/textual_summary.rb +++ b/app/helpers/security_group_helper/textual_summary.rb @@ -50,12 +50,11 @@ def textual_parent_ems_cloud end def textual_instances - label = ui_lookup(:tables => "vm_cloud") num = @record.number_of(:vms) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _('Instances'), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "vm_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'instances') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Instances") end h end diff --git a/app/helpers/storage_helper/textual_summary.rb b/app/helpers/storage_helper/textual_summary.rb index d994773408e..872abad984e 100644 --- a/app/helpers/storage_helper/textual_summary.rb +++ b/app/helpers/storage_helper/textual_summary.rb @@ -32,7 +32,7 @@ def textual_group_content # def textual_store_type - {:label => _("%{storage} Type") % {:storage => ui_lookup(:table => "storages")}, :value => @record.store_type} + {:label => _("Datastore Type"), :value => @record.store_type} end def textual_free_space @@ -95,12 +95,11 @@ def textual_managed_vms end def textual_managed_miq_templates - label = _("Managed %{tables}") % {:tables => ui_lookup(:tables => "miq_template")} num = @record.number_of(:all_miq_templates) - h = {:label => label, :icon => "pficon pficon-virtual-machine", :value => num} + h = {:label => _("Managed VM Templates"), :icon => "pficon pficon-virtual-machine", :value => num} if num > 0 && role_allows?(:feature => "miq_template_show_list") h[:link] = url_for_only_path(:action => 'show', :id => @record, :display => 'all_miq_templates') - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Managed VM Templates") end h end @@ -125,7 +124,7 @@ def textual_files num = @record.number_of(:files) h = {:label => _("All Files"), :icon => "fa fa-file-o", :value => num} if num > 0 - h[:title] = _("Show all files installed on this %{table}") % {:table => ui_lookup(:table => "storages")} + h[:title] = _("Show all files installed on this Datastore") h[:link] = url_for_only_path(:action => 'files', :id => @record) end h @@ -151,8 +150,7 @@ def textual_disk_files ) h = {:label => _("VM Provisioned Disk Files"), :icon => "fa fa-file-o", :value => value} if num > 0 - h[:title] = _("Show VM Provisioned Disk Files installed on this %{table}") % - {:table => ui_lookup(:table => "storages")} + h[:title] = _("Show VM Provisioned Disk Files installed on this Datastore") h[:link] = url_for_only_path(:action => 'disk_files', :id => @record) end h @@ -166,8 +164,7 @@ def textual_snapshot_files ) h = {:label => _("VM Snapshot Files"), :icon => "fa fa-file-o", :value => value} if num > 0 - h[:title] = _("Show VM Snapshot Files installed on this %{storage}") % - {:storage => ui_lookup(:table => "storages")} + h[:title] = _("Show VM Snapshot Files installed on this Datastore") h[:link] = url_for_only_path(:action => 'snapshot_files', :id => @record) end h @@ -181,7 +178,7 @@ def textual_vm_ram_files ) h = {:label => _("VM Memory Files"), :icon => "fa fa-file-o", :value => value} if num > 0 - h[:title] = _("Show VM Memory Files installed on this %{storage}") % {:storage => ui_lookup(:table => "storages")} + h[:title] = _("Show VM Memory Files installed on this Datastore") h[:link] = url_for_only_path(:action => 'vm_ram_files', :id => @record) end h @@ -195,7 +192,7 @@ def textual_vm_misc_files ) h = {:label => _("Other VM Files"), :icon => "fa fa-file-o", :value => value} if num > 0 - h[:title] = _("Show Other VM Files installed on this %{storage}") % {:storage => ui_lookup(:table => "storages")} + h[:title] = _("Show Other VM Files installed on this Datastore") h[:link] = url_for_only_path(:action => 'vm_misc_files', :id => @record) end h @@ -209,7 +206,7 @@ def textual_debris_files ) h = {:label => _("Non-VM Files"), :icon => "fa fa-file-o", :value => value} if num > 0 - h[:title] = _("Show Non-VM Files installed on this %{storage}") % {:storage => ui_lookup(:table => "storages")} + h[:title] = _("Show Non-VM Files installed on this Datastore") h[:link] = url_for_only_path(:action => 'debris_files', :id => @record) end h diff --git a/app/helpers/vm_helper/textual_summary.rb b/app/helpers/vm_helper/textual_summary.rb index 6a7a0b695ee..d772d242971 100644 --- a/app/helpers/vm_helper/textual_summary.rb +++ b/app/helpers/vm_helper/textual_summary.rb @@ -235,14 +235,13 @@ def textual_resource_pool def textual_storage storages = @record.storages - label = ui_lookup(:table => "storages") - h = {:label => label, :icon => "fa fa-database"} + h = {:label => _('Datastores'), :icon => "fa fa-database"} if storages.empty? h[:value] = _("None") elsif storages.length == 1 storage = storages.first h[:value] = storage.name - h[:title] = _("Show this VM's %{label}") % {:label => label} + h[:title] = _("Show this VM's Datastores") h[:link] = url_for_only_path(:controller => 'storage', :action => 'show', :id => storage) else h.delete(:image) # Image will be part of each line item, instead @@ -250,7 +249,7 @@ def textual_storage h[:value] = storages.sort_by { |s| s.name.downcase }.collect do |s| {:icon => "fa fa-database", :value => "#{s.name}#{" (main)" if s == main}", - :title => _("Show this VM's %{label}") % {:label => label}, + :title => _("Show this VM's Datastores"), :link => url_for_only_path(:controller => 'storage', :action => 'show', :id => s)} end end @@ -267,12 +266,11 @@ def textual_ems_infra def textual_availability_zone availability_zone = @record.availability_zone - label = ui_lookup(:table => "availability_zone") - h = {:label => label, + h = {:label => _('Availability Zone'), :icon => "pficon pficon-zone", :value => (availability_zone.nil? ? _("None") : availability_zone.name)} if availability_zone && role_allows?(:feature => "availability_zone_show") - h[:title] = _("Show this VM's %{label}") % {:label => label} + h[:title] = _("Show this VM's Availability Zone") h[:link] = url_for_only_path(:controller => 'availability_zone', :action => 'show', :id => availability_zone) end h @@ -280,10 +278,9 @@ def textual_availability_zone def textual_flavor flavor = @record.flavor - label = ui_lookup(:table => "flavor") - h = {:label => label, :icon => "pficon-flavor", :value => (flavor.nil? ? _("None") : flavor.name)} + h = {:label => _('Flavor'), :icon => "pficon-flavor", :value => (flavor.nil? ? _("None") : flavor.name)} if flavor && role_allows?(:feature => "flavor_show") - h[:title] = _("Show this VM's %{label}") % {:label => label} + h[:title] = _("Show this VM's Flavor") h[:link] = url_for_only_path(:controller => 'flavor', :action => 'show', :id => flavor) end h @@ -291,10 +288,9 @@ def textual_flavor def textual_vm_template vm_template = @record.genealogy_parent - label = ui_lookup(:table => "miq_template") - h = {:label => label, :icon => "ff ff-template", :value => (vm_template.nil? ? _("None") : vm_template.name)} + h = {:label => _('VM Template'), :icon => "ff ff-template", :value => (vm_template.nil? ? _("None") : vm_template.name)} if vm_template && role_allows?(:feature => "miq_template_show") - h[:title] = _("Show this VM's %{label}") % {:label => label} + h[:title] = _("Show this VM's Template") h[:link] = url_for_only_path(:controller => 'miq_template', :action => 'show', :id => vm_template) end h @@ -318,10 +314,9 @@ def textual_parent_vm def textual_orchestration_stack stack = @record.orchestration_stack - label = ui_lookup(:table => "orchestration_stack") - h = {:label => label, :icon => "ff ff-stack", :value => (stack.nil? ? _("None") : stack.name)} + h = {:label => _('Orchestration Stack'), :icon => "ff ff-stack", :value => (stack.nil? ? _("None") : stack.name)} if stack && role_allows?(:feature => "orchestration_stack_show") - h[:title] = _("Show this VM's %{label} '%{name}'") % {:label => label, :name => stack.name} + h[:title] = _("Show this VM's Orchestration Stack '%{name}'") % {:name => stack.name} h[:link] = url_for_only_path(:controller => 'orchestration_stack', :action => 'show', :id => stack) end h @@ -341,11 +336,10 @@ def textual_service end def textual_security_groups - label = ui_lookup(:tables => "security_group") num = @record.number_of(:security_groups) - h = {:label => label, :icon => "pficon pficon-cloud-security", :value => num} + h = {:label => _('Security Groups'), :icon => "pficon pficon-cloud-security", :value => num} if num > 0 && role_allows?(:feature => "security_group_show_list") - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Security Groups") h[:explorer] = true h[:link] = url_for_only_path(:action => 'security_groups', :id => @record, :display => "security_groups") end @@ -353,11 +347,10 @@ def textual_security_groups end def textual_floating_ips - label = ui_lookup(:tables => "floating_ip") num = @record.number_of(:floating_ips) - h = {:label => label, :icon => "ff ff-floating-ip", :value => num} + h = {:label => _('Floating IPs'), :icon => "ff ff-floating-ip", :value => num} if num > 0 && role_allows?(:feature => "floating_ip_show_list") - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Floating IPs") h[:explorer] = true h[:link] = url_for_only_path(:action => 'floating_ips', :id => @record, :display => "floating_ips") end @@ -365,11 +358,10 @@ def textual_floating_ips end def textual_network_routers - label = ui_lookup(:tables => "network_router") num = @record.number_of(:network_routers) - h = {:label => label, :icon => "pficon pficon-route", :value => num} + h = {:label => _('Network Routers'), :icon => "pficon pficon-route", :value => num} if num > 0 && role_allows?(:feature => "network_router_show_list") - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Network Routers") h[:explorer] = true h[:link] = url_for_only_path(:action => 'network_routers', :id => @record, :display => "network_routers") end @@ -377,11 +369,10 @@ def textual_network_routers end def textual_cloud_subnets - label = ui_lookup(:tables => "cloud_subnet") num = @record.number_of(:cloud_subnets) - h = {:label => label, :icon => "pficon pficon-network", :value => num} + h = {:label => _('Cloud Subnets'), :icon => "pficon pficon-network", :value => num} if num > 0 && role_allows?(:feature => "cloud_subnet_show_list") - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Cloud Subnets") h[:explorer] = true h[:link] = url_for_only_path(:action => 'cloud_subnets', :id => @record, :display => "cloud_subnets") end @@ -389,11 +380,10 @@ def textual_cloud_subnets end def textual_network_ports - label = ui_lookup(:tables => "network_port") num = @record.number_of(:network_ports) - h = {:label => label, :icon => "ff ff-network-port", :value => num} + h = {:label => _('Network Ports'), :icon => "ff ff-network-port", :value => num} if num > 0 && role_allows?(:feature => "network_port_show_list") - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Network Ports") h[:explorer] = true h[:link] = url_for_only_path(:action => 'network_ports', :id => @record, :display => "network_ports") end @@ -403,11 +393,10 @@ def textual_network_ports def textual_load_balancers return nil if @record.try(:load_balancers).nil? - label = ui_lookup(:tables => "load_balancer") num = @record.number_of(:load_balancers) - h = {:label => label, :icon => "ff ff-load-balancer", :value => num} + h = {:label => _('Load Balancers'), :icon => "ff ff-load-balancer", :value => num} if num > 0 && role_allows?(:feature => "load_balancer_show_list") - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Load Balancers") h[:explorer] = true h[:link] = url_for_only_path(:action => 'load_balancers', :id => @record, :display => "load_balancers") end @@ -415,11 +404,10 @@ def textual_load_balancers end def textual_cloud_networks - label = ui_lookup(:tables => "cloud_network") num = @record.number_of(:cloud_networks) - h = {:label => label, :icon => "ff ff-cloud-network", :value => num} + h = {:label => _('Cloud Networks'), :icon => "ff ff-cloud-network", :value => num} if num > 0 && role_allows?(:feature => "cloud_network_show_list") - h[:title] = _("Show all %{label}") % {:label => label} + h[:title] = _("Show all Cloud Networks") h[:explorer] = true h[:link] = url_for_only_path(:action => 'cloud_networks', :id => @record, :display => "cloud_networks") end @@ -428,19 +416,17 @@ def textual_cloud_networks def textual_cloud_tenant cloud_tenant = @record.cloud_tenant if @record.respond_to?(:cloud_tenant) - label = ui_lookup(:table => "cloud_tenants") - h = {:label => label, :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.nil? ? _("None") : cloud_tenant.name)} + h = {:label => _('Cloud Tenants'), :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.nil? ? _("None") : cloud_tenant.name)} if cloud_tenant && role_allows?(:feature => "cloud_tenant_show") - h[:title] = _("Show this VM's %{label}") % {:label => label} + h[:title] = _("Show this VM's Cloud Tenants") h[:link] = url_for_only_path(:controller => 'cloud_tenant', :action => 'show', :id => cloud_tenant) end h end def textual_cloud_volumes - label = ui_lookup(:tables => "cloud_volumes") num = @record.number_of(:cloud_volumes) - h = {:label => label, :icon => "pficon pficon-volume", :value => num} + h = {:label => _('Cloud Volumes'), :icon => "pficon pficon-volume", :value => num} if num > 0 && role_allows?(:feature => "cloud_volume_show_list") h[:title] = _("Show all Cloud Volumes attached to this VM.") h[:explorer] = true