Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing gettext into vm reconfigure dialog #3482

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/mixins/actions/vm_actions/reconfigure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def get_reconfig_limits(reconfigure_ids)
@reconfig_limits = VmReconfigureRequest.request_limits(:src_ids => reconfigure_ids)
mem1, fmt1 = reconfigure_calculations(@reconfig_limits[:min__vm_memory])
mem2, fmt2 = reconfigure_calculations(@reconfig_limits[:max__vm_memory])
@reconfig_memory_note = "Between #{mem1}#{fmt1} and #{mem2}#{fmt2}"
@reconfig_memory_note = _("Between %{min} and %{max}") % {:min => "#{mem1}#{fmt1}", :max => "#{mem2}#{fmt2}"}

@socket_options = []
@reconfig_limits[:max__number_of_sockets].times do |tidx|
Expand Down
24 changes: 12 additions & 12 deletions app/views/vm_common/_reconfigure.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"name" => "cb_memory",
"ng-model" => "vm.cb_memory",
"ng-change" => "vm.cbChange()",
"switch-on-text" => "Yes",
"switch-off-text" => "No"}
"switch-on-text" => _("Yes"),
"switch-off-text" => _("No")}
#memory_div{"ng-if" => "vm.cb_memory"}
.col-md-4
%input.form-control{"type" => "text",
Expand Down Expand Up @@ -56,8 +56,8 @@
"name" => "cb_cpu",
"ng-model" => "vm.cb_cpu",
"ng-change" => "vm.cbChange()",
"switch-on-text" => "Yes",
"switch-off-text" => "No"}
"switch-on-text" => _("Yes"),
"switch-off-text" => _("No")}
%br
#cpu_div{"ng-if" => "vm.cb_cpu", :style => "margin-left: 20px"}
%h3= _(' Processor Options')
Expand Down Expand Up @@ -123,7 +123,7 @@
"ng-show" => "!vm.reconfigureModel.addEnabled"}= _('Add Disk')
%button.btn.btn-default.btn-sm{:type => "button",
"ng-click" => "vm.hideAddDisk()",
"ng-show" => "vm.reconfigureModel.addEnabled"}= ('Cancel Add')
"ng-show" => "vm.reconfigureModel.addEnabled"}= _('Cancel Add')
%table.table.table-striped.table-condensed.table-bordered
%thead
%th= _('Name')
Expand Down Expand Up @@ -175,7 +175,7 @@
"ng-model" => "vm.reconfigureModel.hdSize",
"required" => "",
"ng-pattern" => "hdpattern",
"placeholder" => "Enter New Size",
"placeholder" => _("Enter New Size"),
"ng-change" => "vm.hdChanged()"}
%span{"style" => "color:red", "ng-show" => "rowForm.dvcSize.$invalid"}
= _(" Valid numeric disk size required ")
Expand All @@ -189,14 +189,14 @@
"selectpicker-for-select-tag" => "")
%td{"ng-if" => @reconfigitems.first.vendor == 'vmware'}
%input{"bs-switch" => "",
:data => {:on_text => 'Yes', :off_text => 'No', :size => 'mini'},
:data => {:on_text => _('Yes'), :off_text => _('No'), :size => 'mini'},
"type" => "checkbox",
"name" => "vm.cb_dependent",
"ng-model" => "vm.reconfigureModel.cb_dependent"}
%td
%td{"ng-if" => @reconfigitems.first.vendor == 'redhat'}
%input{"bs-switch" => "",
:data => {:on_text => 'Yes', :off_text => 'No', :size => 'mini'},
:data => {:on_text => _('Yes'), :off_text => _('No'), :size => 'mini'},
"type" => "checkbox",
"name" => "vm.cb_bootable",
"ng-model" => "vm.reconfigureModel.cb_bootable"}
Expand Down Expand Up @@ -226,7 +226,7 @@
"ng-model" => "disk.hdSize",
"required" => "",
"ng-pattern" => "hdpattern",
"placeholder" => "Enter Size",
"placeholder" => _("Enter Size"),
"ng-change" => "vm.hdChanged()",
"validate-multiple" => "1",
:miqmin => "{{ (disk.orgHdUnit === 'GB') ? (1024 * disk.orgHdSize + 1) : (1 * disk.orgHdSize + 1) }}",
Expand All @@ -246,7 +246,7 @@
"selectpicker-for-select-tag" => "")
%td{"ng-if" => @reconfigitems.first.vendor == 'vmware'}
%input{"bs-switch" => "",
:data => {:on_text => 'Yes', :off_text => 'No', :size => 'mini'},
:data => {:on_text => _('Yes'), :off_text => _('No'), :size => 'mini'},
"type" => "checkbox",
"name" => "vm.cb_dependent",
"ng-model" => "disk.cb_dependent",
Expand All @@ -255,7 +255,7 @@
"ng-if" => "disk.add_remove=='add'"}
%td
%input{"bs-switch" => "",
:data => {:on_text => 'Yes', :off_text => 'No', :size => 'mini'},
:data => {:on_text => _('Yes'), :off_text => _('No'), :size => 'mini'},
"type" => "checkbox",
"name" => "cb_deletebacking",
"ng-model" => "disk.delete_backing",
Expand All @@ -264,7 +264,7 @@
"ng-if" => "disk.add_remove!='add'"}
%td{"ng-if" => @reconfigitems.first.vendor == 'redhat'}
%input{"bs-switch" => "",
:data => {:on_text => 'Yes', :off_text => 'No', :size => 'mini'},
:data => {:on_text => _('Yes'), :off_text => _('No'), :size => 'mini'},
"type" => "checkbox",
"name" => "cb_bootable",
"ng-model" => "disk.cb_bootable",
Expand Down