core: only set I18n setting on newer versions
/cc @fgrehm - Looks like only the later versions have this.
This commit is contained in:
parent
1a51f42ee7
commit
9a58917d3a
|
@ -263,9 +263,11 @@ end
|
||||||
# Default I18n to load the en locale
|
# Default I18n to load the en locale
|
||||||
I18n.load_path << File.expand_path("templates/locales/en.yml", Vagrant.source_root)
|
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
|
if I18n.config.respond_to?(:enforce_available_locales=)
|
||||||
# future but we need this to silence a deprecation warning from 0.6.9
|
# Make sure only available locales are used. This will be the default in the
|
||||||
I18n.config.enforce_available_locales = true
|
# 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.
|
# A lambda that knows how to load plugins from a single directory.
|
||||||
plugin_load_proc = lambda do |directory|
|
plugin_load_proc = lambda do |directory|
|
||||||
|
|
Loading…
Reference in New Issue