vendored/puppet/lib/hiera/puppet_function.rb in bolt-0.15.0 vs vendored/puppet/lib/hiera/puppet_function.rb in bolt-0.16.0
- old
+ new
@@ -58,11 +58,14 @@
post_lookup(scope, key, lookup(scope, key, nil, false, override, &default_block))
end
def lookup(scope, key, default, has_default, override, &default_block)
unless Puppet[:strict] == :off
- Puppet.warn_once('deprecations', self.class.name,
- "The function '#{self.class.name}' is deprecated in favor of using 'lookup'. See https://docs.puppet.com/puppet/#{Puppet.minor_version}/reference/deprecated_language.html")
+ #TRANSLATORS 'lookup' is a puppet function and should not be translated
+ message = _("The function '%{class_name}' is deprecated in favor of using 'lookup'.") % { class_name: self.class.name }
+ message += ' '+ _("See https://docs.puppet.com/puppet/%{minor_version}/reference/deprecated_language.html") %
+ { minor_version: Puppet.minor_version }
+ Puppet.warn_once('deprecations', self.class.name, message)
end
lookup_invocation = Puppet::Pops::Lookup::Invocation.new(scope, {}, {})
adapter = lookup_invocation.lookup_adapter
lookup_invocation.set_hiera_xxx_call
lookup_invocation.set_global_only unless adapter.global_only? || adapter.has_environment_data_provider?(lookup_invocation)