From 6c2cc31926f8521e08387af8b0ad521650dd6b9b Mon Sep 17 00:00:00 2001 From: Tim Rensen Date: Wed, 25 Feb 2015 20:37:54 +0100 Subject: [PATCH] Fixed inaccurate downloading status message Importing a base box from the local file system currently outputs 'Downloading: file://...' which is more accurate now by presenting it as: 'Unpacking necessary files from: file://...'. Fixes #5386. --- lib/vagrant/action/builtin/box_add.rb | 9 ++++++++- templates/locales/en.yml | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/action/builtin/box_add.rb b/lib/vagrant/action/builtin/box_add.rb index deed8b9ef..fdfb4edc4 100644 --- a/lib/vagrant/action/builtin/box_add.rb +++ b/lib/vagrant/action/builtin/box_add.rb @@ -420,8 +420,15 @@ module Vagrant show_url = opts[:show_url] show_url ||= url + textLoading = "vagrant.box_downloading" + + # Adjust status message when 'downloading' a local box. + if(show_url.start_with?('file://')) + textLoading = "vagrant.box_unpacking" + end + env[:ui].detail(I18n.t( - "vagrant.box_downloading", + textLoading, url: show_url)) if File.file?(d.destination) env[:ui].info(I18n.t("vagrant.actions.box.download.resuming")) diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 155cd77dc..fa75c2a01 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -24,6 +24,8 @@ en: Downloading: %{url} box_download_error: |- Error downloading: %{message} + box_unpacking: |- + Unpacking necessary files from: %{url} box_expanding_url: |- URL: %{url} box_loading_metadata: |-