From 7c99b33c88d1f3e2cb3ca603ff9e26f98e4b441b Mon Sep 17 00:00:00 2001 From: Lucy Fu Date: Mon, 20 Jul 2020 13:49:17 -0400 Subject: [PATCH] Fix to Policy's I18N strings. --- app/controllers/miq_policy_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/miq_policy_controller.rb b/app/controllers/miq_policy_controller.rb index 8c68c50bd75..e83f439d87d 100644 --- a/app/controllers/miq_policy_controller.rb +++ b/app/controllers/miq_policy_controller.rb @@ -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))} @@ -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'