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.
This commit is contained in:
Tim Rensen 2015-02-25 20:37:54 +01:00
parent 92762eeb8c
commit 6c2cc31926
2 changed files with 10 additions and 1 deletions

View File

@ -420,8 +420,15 @@ module Vagrant
show_url = opts[:show_url] show_url = opts[:show_url]
show_url ||= 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( env[:ui].detail(I18n.t(
"vagrant.box_downloading", textLoading,
url: show_url)) url: show_url))
if File.file?(d.destination) if File.file?(d.destination)
env[:ui].info(I18n.t("vagrant.actions.box.download.resuming")) env[:ui].info(I18n.t("vagrant.actions.box.download.resuming"))

View File

@ -24,6 +24,8 @@ en:
Downloading: %{url} Downloading: %{url}
box_download_error: |- box_download_error: |-
Error downloading: %{message} Error downloading: %{message}
box_unpacking: |-
Unpacking necessary files from: %{url}
box_expanding_url: |- box_expanding_url: |-
URL: %{url} URL: %{url}
box_loading_metadata: |- box_loading_metadata: |-