Skip to content

Commit

Permalink
Merge pull request #40 from nasark/parameterize_resource_names
Browse files Browse the repository at this point in the history
Parameterize resource display_name functions based on provider
  • Loading branch information
agrare committed Dec 13, 2024
2 parents 2bc2cdb + 80875a8 commit 55e527f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def run_with_miq_job(options, userid = nil)
end

def self.display_name(number = 1)
n_('Job Template (AWX)', 'Job Templates (AWX)', number)
n_('Job Template (%{provider_description})', 'Job Templates (%{provider_description})', number) % {:provider_description => module_parent.description}
end

def self.stack_type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def supports_limit?
end

def self.display_name(number = 1)
n_('Workflow Template (AWX)', 'Workflow Templates (AWX)', number)
n_('Workflow Template (%{provider_description})', 'Workflow Templates (%{provider_description})', number) % {:provider_description => module_parent.description}
end

def self.provider_collection(manager)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class ManageIQ::Providers::Awx::AutomationManager::ConfiguredSystem <
include ProviderObjectMixin

def self.display_name(number = 1)
n_('Configured System (AWX)', 'Configured Systems (AWX)', number)
n_('Configured System (%{provider_description})', 'Configured Systems (%{provider_description})', number) % {:provider_description => module_parent.description}
end

def provider_object(connection = nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ManageIQ::Providers::Awx::AutomationManager::Job <
virtual_has_many :job_plays

def self.display_name(number = 1)
n_('AWX Job', 'AWX Jobs', number)
n_('%{provider_description} Job', '%{provider_description} Jobs', number) % {:provider_description => module_parent.description}
end

class << self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ class ManageIQ::Providers::Awx::AutomationManager::Playbook <
has_many :jobs, :class_name => 'OrchestrationStack', :foreign_key => :configuration_script_base_id

def self.display_name(number = 1)
n_('Playbook (AWX)', 'Playbooks (AWX)', number)
n_('Playbook (%{provider_description})', 'Playbooks (%{provider_description})', number) % {:provider_description => module_parent.description}
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class << self
alias jobs orchestration_stacks

def self.display_name(number = 1)
n_('AWX Workflow Job', 'AWX Workflow Jobs', number)
n_('%{provider_description} Workflow Job', '%{provider_description} Workflow Jobs', number) % {:provider_description => module_parent.description}
end

def raw_status
Expand Down

0 comments on commit 55e527f

Please sign in to comment.