Class: Amrita2::GetTextBridge::TextNodeForGetText

Inherits:
Core::StaticNode show all
Defined in:
lib/amrita2/gettext.rb

Instance Attribute Summary

Attributes inherited from Core::BaseNode

#parent

Instance Method Summary collapse

Methods inherited from Core::StaticNode

#initialize

Methods inherited from Core::BaseNode

#has_ruby?, #initialize, #module_src, #parent_de, #root

Constructor Details

This class inherits a constructor from Amrita2::Core::StaticNode

Instance Method Details

#dynamic?Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/amrita2/gettext.rb', line 60

def dynamic?
  true
end

#get_erb_sourceObject



73
74
75
# File 'lib/amrita2/gettext.rb', line 73

def get_erb_source
  return ""
end

#render_me(cg) ⇒ Object



64
65
66
67
68
69
70
71
72
# File 'lib/amrita2/gettext.rb', line 64

def render_me(cg)
  #text = @node.to_s.strip

  # to keep  
  text = ""
  @node.output(text, :preserve=>true)
  text.strip!
  cg.put_string_expression("_(#{text.inspect}) % $_") if text != ""
end