Method: Puppet::GettextConfig.delete_text_domain

Defined in:
lib/puppet/gettext/config.rb

.delete_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.

Deletes the text domain with the given name

Parameters:

  • domain_name (String, Symbol)

    the name of the domain to delete



141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/puppet/gettext/config.rb', line 141

def self.delete_text_domain(domain_name)
  return if @gettext_disabled || !gettext_loaded?

  domain_name = domain_name.to_sym

  deleted = FastGettext.translation_repositories.delete(domain_name)
  if FastGettext.text_domain == domain_name
    Puppet.debug { "Deleted current text domain #{domain_name.inspect}: #{!deleted.nil?}" }
    FastGettext.text_domain = nil
  else
    Puppet.debug { "Deleted text domain #{domain_name.inspect}: #{!deleted.nil?}" }
  end
end