vendored/puppet/lib/puppet.rb in bolt-0.7.0 vs vendored/puppet/lib/puppet.rb in bolt-0.8.0
- old
+ new
@@ -40,14 +40,13 @@
require 'puppet/etc'
require 'puppet/context'
require 'puppet/environments'
class << self
- gettext_config_file = Puppet::GettextConfig.puppet_locale_path
- unless Puppet::GettextConfig.initialize(gettext_config_file, Puppet::GettextConfig.translation_mode(gettext_config_file))
- # Stub out gettext's `_` and `n_()` methods, which attempt to load translations,
- # with versions that do nothing
- require 'puppet/gettext/stubs'
+ Puppet::GettextConfig.create_text_domain('production')
+ locale_dir = Puppet::GettextConfig.puppet_locale_path
+ if Puppet::GettextConfig.load_translations('puppet', locale_dir, Puppet::GettextConfig.translation_mode(locale_dir))
+ Puppet::GettextConfig.set_locale(Locale.current.language)
end
include Puppet::Util
attr_reader :features
end