lib/csl/locale.rb in csl-1.0.0.pre7 vs lib/csl/locale.rb in csl-1.0.0.pre8

- old
+ new

@@ -42,10 +42,14 @@ raise ParseError, "root node is not a locale: #{node.inspect}" unless node.is_a?(self) node end + + def load(input = Locale.default) + super + end end attr_defaults :version => Schema.version, :xmlns => Schema.namespace attr_struct :xmlns, :version @@ -181,14 +185,12 @@ def clear @language, @region = nil self end - def translate(*arguments) - raise 'not implemented' + def translate(query) + terms[query] end - - alias _ translate alias t translate # @example # locale.each_term { |term| block } #-> locale # locale.each_term #-> enumerator \ No newline at end of file