Method: Puppet::GettextConfig.use_text_domain
- Defined in:
- lib/puppet/gettext/config.rb
.use_text_domain(domain_name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Switches the active text domain, if the requested domain exists.
117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/puppet/gettext/config.rb', line 117 def self.use_text_domain(domain_name) return if @gettext_disabled || !gettext_loaded? domain_name = domain_name.to_sym if FastGettext.translation_repositories.include?(domain_name) Puppet.debug { "Use text domain #{domain_name.inspect}" } FastGettext.text_domain = domain_name else Puppet.debug { "Requested unknown text domain #{domain_name.inspect}" } end end |