From 0ad76b753a70749bec846463e5dc8ecb87492b83 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Mon, 1 Apr 2013 20:56:06 -0300 Subject: [PATCH] Add locale file to load path only when the provider is required --- lib/vagrant-lxc.rb | 2 -- lib/vagrant-lxc/plugin.rb | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/vagrant-lxc.rb b/lib/vagrant-lxc.rb index b6257db..7566c36 100644 --- a/lib/vagrant-lxc.rb +++ b/lib/vagrant-lxc.rb @@ -1,4 +1,2 @@ require "vagrant-lxc/version" require "vagrant-lxc/plugin" - -I18n.load_path << File.expand_path(File.dirname(__FILE__) + '/../locales/en.yml') diff --git a/lib/vagrant-lxc/plugin.rb b/lib/vagrant-lxc/plugin.rb index 178450f..1c8ca58 100644 --- a/lib/vagrant-lxc/plugin.rb +++ b/lib/vagrant-lxc/plugin.rb @@ -11,6 +11,10 @@ module Vagrant provider(:lxc) do require File.expand_path("../provider", __FILE__) + + I18n.load_path << File.expand_path(File.dirname(__FILE__) + '/../locales/en.yml') + I18n.reload! + Provider end