diff --git a/plugins/kernel_v2/config/vm.rb b/plugins/kernel_v2/config/vm.rb index 595cdff54..7baaca319 100644 --- a/plugins/kernel_v2/config/vm.rb +++ b/plugins/kernel_v2/config/vm.rb @@ -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| diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 3fa21f19a..439c22581 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -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: |-