From 626e97ab5fbb0842d2b620643bf89ab80e0cf3c2 Mon Sep 17 00:00:00 2001 From: Milan Zazrivec Date: Thu, 18 Jan 2018 11:20:36 +0100 Subject: [PATCH] Migrate model display names from locale/en.yml to plugin --- app/models/manageiq/providers/kubernetes/container_manager.rb | 4 ++++ .../providers/kubernetes/container_manager/container_group.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/app/models/manageiq/providers/kubernetes/container_manager.rb b/app/models/manageiq/providers/kubernetes/container_manager.rb index 17d1c3880e..fd190a039f 100644 --- a/app/models/manageiq/providers/kubernetes/container_manager.rb +++ b/app/models/manageiq/providers/kubernetes/container_manager.rb @@ -56,4 +56,8 @@ def self.raw_connect(hostname, port, options) def self.event_monitor_class ManageIQ::Providers::Kubernetes::ContainerManager::EventCatcher end + + def self.display_name(number = 1) + n_('Container Provider (Kubernetes)', 'Container Providers (Kubernetes)', number) + end end diff --git a/app/models/manageiq/providers/kubernetes/container_manager/container_group.rb b/app/models/manageiq/providers/kubernetes/container_manager/container_group.rb index 535665ffc3..f259050bfe 100644 --- a/app/models/manageiq/providers/kubernetes/container_manager/container_group.rb +++ b/app/models/manageiq/providers/kubernetes/container_manager/container_group.rb @@ -1,3 +1,7 @@ class ManageIQ::Providers::Kubernetes::ContainerManager::ContainerGroup < ::ContainerGroup alias_attribute :pod_uid, :ems_ref + + def self.display_name(number = 1) + n_('Pod (Kubernetes)', 'Pods (Kubernetes)', number) + end end