Add locale for primary disk validation error
This commit is contained in:
parent
f51805e910
commit
7feee7a87f
|
@ -806,8 +806,10 @@ module VagrantPlugins
|
|||
|
||||
# Validate disks
|
||||
# Check if there is more than one primrary disk defined and throw an error
|
||||
if @disks.select { |d| d.primary && d.type == :disk }.size > 1
|
||||
errors << "There is more than one disk defined for guest '#{machine.name}'. Please pick a `primary` disk."
|
||||
primary_disks = @disks.select { |d| d.primary && d.type == :disk }
|
||||
if primary_disks.size > 1
|
||||
errors << I18n.t("vagrant.config.vm.multiple_primary_disks_error",
|
||||
name: machine.name)
|
||||
end
|
||||
|
||||
# TODO: Check for duplicate disk names?
|
||||
|
|
|
@ -1892,6 +1892,8 @@ en:
|
|||
hyphens or dots. It cannot start with a hyphen or dot.
|
||||
ignore_provider_config: |-
|
||||
Ignoring provider config for validation...
|
||||
multiple_primary_disks_error: |-
|
||||
There are more than one primary disks defined for guest '%{name}'. Please ensure that only one disk has been defined as a primary disk.
|
||||
name_invalid: |-
|
||||
The sub-VM name '%{name}' is invalid. Please don't use special characters.
|
||||
network_ip_ends_in_one: |-
|
||||
|
|
Loading…
Reference in New Issue