Move validation message to locales
This commit is contained in:
parent
3e177d380f
commit
86f9243762
|
@ -815,7 +815,8 @@ module VagrantPlugins
|
|||
disk_names = @disks.map { |d| d.name }
|
||||
duplicate_names = disk_names.detect{ |d| disk_names.count(d) > 1 }
|
||||
if duplicate_names && duplicate_names.size
|
||||
errors << "Duplicate disk names found: #{duplicate_names}. Please use unique names"
|
||||
errors << I18n.t("vagrant.config.vm.multiple_disk_names_error",
|
||||
name: duplicate_names)
|
||||
end
|
||||
|
||||
@disks.each do |d|
|
||||
|
|
|
@ -1905,6 +1905,8 @@ en:
|
|||
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.
|
||||
multiple_disk_names_error: |-
|
||||
Duplicate disk names defined: '%{name}'. Disk names must be unique.
|
||||
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