Load locale file only once
This commit is contained in:
parent
bb21906ec4
commit
1c2208a30e
1 changed files with 6 additions and 2 deletions
|
@ -8,12 +8,16 @@ module Vagrant
|
||||||
The LXC provider allows Vagrant to manage and control
|
The LXC provider allows Vagrant to manage and control
|
||||||
LXC-based virtual machines.
|
LXC-based virtual machines.
|
||||||
EOF
|
EOF
|
||||||
|
locale_loaded = false
|
||||||
|
|
||||||
provider(:lxc, parallel: true, priority: 7) do
|
provider(:lxc, parallel: true, priority: 7) do
|
||||||
require File.expand_path("../provider", __FILE__)
|
require File.expand_path("../provider", __FILE__)
|
||||||
|
|
||||||
I18n.load_path << File.expand_path(File.dirname(__FILE__) + '/../../locales/en.yml')
|
if not locale_loaded
|
||||||
I18n.reload!
|
I18n.load_path << File.expand_path(File.dirname(__FILE__) + '/../../locales/en.yml')
|
||||||
|
I18n.reload!
|
||||||
|
locale_loaded = true
|
||||||
|
end
|
||||||
|
|
||||||
Provider
|
Provider
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue