Skip to content

Commit

Permalink
Fix to Policy's I18N strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucy Fu authored and Lucy Fu committed Jul 20, 2020
1 parent 382d0d1 commit 7c99b33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/miq_policy_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def replace_right_cell(options = {})
if @profiles
r[:partial => 'profile_list']
elsif @policies || (@view && @sb[:tree_typ] == 'policies')
right_cell_text = _("All %{typ} Policies") % {:typ => "#{ui_lookup(:model => @sb[:nodeid].try(:camelize))} #{@sb[:mode] ? @sb[:mode].capitalize : ""}"}
right_cell_text = _("All %{typ} Policies") % {:typ => "#{ui_lookup(:model => @sb[:nodeid].try(:camelize))} #{@sb[:mode] ? _(@sb[:mode].capitalize) : ""}"}
r[:partial => 'policy_list']
elsif @conditions
right_cell_text = _("All %{typ} Conditions") % {:typ => ui_lookup(:model => @sb[:folder].try(:camelize))}
Expand All @@ -551,12 +551,12 @@ def replace_right_cell(options = {})
if @policy.id.blank?
right_cell_text = if @sb[:mode]
_("Adding a new %{model_name} %{mode} Policy") %
{:model_name => model_name, :mode => @sb[:mode].capitalize}
{:model_name => model_name, :mode => _(@sb[:mode].capitalize)}
else
_("Adding a new %{model_name} Policy") % {:model_name => model_name}
end
else
options = {:model => "#{model_name} #{@sb[:mode] ? @sb[:mode].capitalize : ""}",
options = {:model => "#{model_name} #{@sb[:mode] ? _(@sb[:mode].capitalize) : ""}",
:name => @policy.description}
right_cell_text = @edit ? _("Editing %{model} Policy \"%{name}\"") % options : _("%{model} Policy \"%{name}\"") % options
if @edit && @edit[:typ] == 'conditions'
Expand Down

0 comments on commit 7c99b33

Please sign in to comment.