core: only set I18n setting on newer versions

/cc @fgrehm - Looks like only the later versions have this.
This commit is contained in:
Mitchell Hashimoto 2013-12-03 18:43:19 -08:00
parent 1a51f42ee7
commit 9a58917d3a
1 changed files with 5 additions and 3 deletions

View File

@ -263,9 +263,11 @@ end
# Default I18n to load the en locale
I18n.load_path << File.expand_path("templates/locales/en.yml", Vagrant.source_root)
# Make sure only available locales are used. This will be the default in the
# future but we need this to silence a deprecation warning from 0.6.9
I18n.config.enforce_available_locales = true
if I18n.config.respond_to?(:enforce_available_locales=)
# Make sure only available locales are used. This will be the default in the
# future but we need this to silence a deprecation warning from 0.6.9
I18n.config.enforce_available_locales = true
end
# A lambda that knows how to load plugins from a single directory.
plugin_load_proc = lambda do |directory|