Module: ChefApply::Text
- Defined in:
- lib/chef_apply/text.rb,
lib/chef_apply/text/text_wrapper.rb
Defined Under Namespace
Classes: TextWrapper
Class Method Summary collapse
Class Method Details
._translation_path ⇒ Object
25 26 27 |
# File 'lib/chef_apply/text.rb', line 25 def self._translation_path @translation_path ||= File.join(File.dirname(__FILE__), "..", "..", "i18n") end |
.load ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/chef_apply/text.rb', line 29 def self.load R18n.from_env(Text._translation_path) R18n.extension_places << File.join(Text._translation_path, "errors") t = R18n.get.t t.translation_keys.each do |k| k = k.to_sym define_singleton_method k do |*args| TextWrapper.new(t.send(k, *args)) end end end |