Load locale file only once

This commit is contained in:
Sergey Leschenko 2016-10-18 14:40:37 +03:00
parent bb21906ec4
commit 1c2208a30e

View file

@ -8,12 +8,16 @@ module Vagrant
The LXC provider allows Vagrant to manage and control
LXC-based virtual machines.
EOF
locale_loaded = false
provider(:lxc, parallel: true, priority: 7) do
require File.expand_path("../provider", __FILE__)
if not locale_loaded
I18n.load_path << File.expand_path(File.dirname(__FILE__) + '/../../locales/en.yml')
I18n.reload!
locale_loaded = true
end
Provider
end