Module: Merb::Global::Helpers::HamlGettext
- Defined in:
- lib/merb_global/helpers/haml_gettext.rb
Instance Method Summary collapse
- #parse_tag(line) ⇒ Object
-
#push_plain(text) ⇒ Object
Inject _ gettext into plain text and tag plain text calls.
Instance Method Details
#parse_tag(line) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/merb_global/helpers/haml_gettext.rb', line 9 def parse_tag(line) tag_name, attributes, attributes_hash, object_ref, nuke_outer_whitespace, nuke_inner_whitespace, action, value = super(line) value = _(value) unless action || value.empty? [tag_name, attributes, attributes_hash, object_ref, nuke_outer_whitespace, nuke_inner_whitespace, action, value] end |
#push_plain(text) ⇒ Object
Inject _ gettext into plain text and tag plain text calls
6 7 8 |
# File 'lib/merb_global/helpers/haml_gettext.rb', line 6 def push_plain(text) super(_(text.strip)) end |