Skip to content

Commit

Permalink
Translated right cell text for compliance/control policies screen
Browse files Browse the repository at this point in the history
  • Loading branch information
mzazrivec committed Dec 19, 2017
1 parent 2a81371 commit bfc53dc
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions app/controllers/miq_policy_controller.rb
Expand Up @@ -585,7 +585,13 @@ def replace_right_cell(options = {})
r[:partial => 'condition_list']
elsif @folders
mode = @sb[:folder]
right_cell_text = _("%{typ} Policies") % {:typ => mode.capitalize}
right_cell_text = if mode == 'compliance'
_('Compliance Policies')
elsif mode == 'control'
_('Control Policies')
else
_("%{typ} Policies") % {:typ => mode.capitalize}
end
r[:partial => 'policy_folders']
elsif @alert_profiles
right_cell_text = _("All %{typ} Alert Profiles") % {:typ => ui_lookup(:model => @sb[:folder].try(:camelize))}
Expand Down Expand Up @@ -919,7 +925,13 @@ def folder_get_info(folder_node)
@folders = UI_FOLDERS.collect do |model|
"#{model.name.titleize} #{mode.titleize}"
end
@right_cell_text = _("%{typ} Policies") % {:typ => mode.titleize}
@right_cell_text = if mode == 'compliance'
_('Compliance Policies')
elsif mode == 'control'
_('Control Policies')
else
_("%{typ} Policies") % {:typ => mode.titleize}
end
else
# level 2 - host, vm, etc. under compliance/control - OR deeper levels
@sb[:mode] = nodeid.split("-")[1]
Expand Down

0 comments on commit bfc53dc

Please sign in to comment.