lib/spiderfw/templates/template_blocks.rb in spiderfw-0.6.21 vs lib/spiderfw/templates/template_blocks.rb in spiderfw-0.6.22

- old
+ new

@@ -43,10 +43,12 @@ block = :Debugger elsif el.name == 'sp:parent-context' block = :ParentContext elsif el.name == 'sp:recurse' block = :Recurse + elsif !skip_attributes && el.has_attribute?('tpl:text-domain') + block = :TextDomain elsif Spider::Template.registered?(el.name) klass = Spider::Template.get_registered_class(el.name) if klass < ::Spider::Widget block = :Widget elsif klass < Spider::Tag @@ -143,13 +145,13 @@ when :escaped_expr res += "{ #{escape_text(val)} }" when :expr res += "'+("+vars_to_scene(val)+").to_s+'" when :gettext - res += "'\n$out << _('#{escape_text(val[0])}')" - if val[1] - res += " #{vars_to_scene(val[1])}" + res += "'\n$out << _('#{escape_text(val[:val])}')" + if val[:vars] + res += " #{vars_to_scene(val[:vars])}" end res += "\n$out << '" end end res @@ -215,7 +217,8 @@ require 'spiderfw/templates/blocks/output' require 'spiderfw/templates/blocks/layout_assets' require 'spiderfw/templates/blocks/layout_meta' require 'spiderfw/templates/blocks/lambda' require 'spiderfw/templates/blocks/recurse' +require 'spiderfw/templates/blocks/text_domain'