Skip to content

Commit

Permalink
Mark Strings in Request Details for Translation
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidResende0 committed May 11, 2023
1 parent 05fb99d commit fa494df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/models/miq_retire_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def self.get_description(req_obj)
req_obj.source.name
end

"#{request_class::TASK_DESCRIPTION} for: #{name}"
N_("#{request_class::TASK_DESCRIPTION} for: #{name}")
end

def deliver_to_automate(req_type = request_type, zone = nil)
Expand Down
8 changes: 4 additions & 4 deletions app/models/service_template_provision_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def self.get_description(req_obj)
end

if req_obj.kind_of?(ServiceTemplateProvisionRequest)
result = "Provisioning Service [#{svc_target_name}] from [#{prov_source.name}]"
result = N_("Provisioning Service [#{svc_target_name}] from [#{prov_source.name}]")
else
service_resource = prov_source
rsc_name = service_resource.name if service_resource.respond_to?(:name)
Expand All @@ -56,11 +56,11 @@ def self.get_description(req_obj)

result = case req_template
when ServiceTemplate
"Provisioning Service [#{rsc_name}] for Service [#{svc_target_name}]"
N_("Provisioning Service [#{rsc_name}] for Service [#{svc_target_name}]")
when MiqProvisionRequestTemplate
"Provisioning VM [#{rsc_name}] for Service [#{svc_target_name}]"
N_("Provisioning VM [#{rsc_name}] for Service [#{svc_target_name}]")
else
"Provisioning [#{rsc_name}] for Service [#{svc_target_name}]"
N_("Provisioning [#{rsc_name}] for Service [#{svc_target_name}]")
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/vm_reconfigure_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def self.get_description(req)
msg << build_message(options, :network_adapter_edit, "Edit Network Adapters: %d", :length)
msg << build_message(options, :cdrom_connect, "Attach CD/DVDs: %d", :length)
msg << build_message(options, :cdrom_disconnect, "Detach CD/DVDs: %d", :length)
"#{request_class::TASK_DESCRIPTION} for: #{resource_name(req)} - #{msg.compact.join(", ")}"
N_("#{request_class::TASK_DESCRIPTION} for: #{resource_name(req)} - #{msg.compact.join(", ")}")
end

def self.build_message(options, key, message, modifier = nil)
Expand Down

0 comments on commit fa494df

Please sign in to comment.