This method is deprecated or moved on the latest stable version.
The last existing version (v2_2_9) is shown here.
translate(locale)
public
Translates raw text into locale.
# File lib/rdoc/i18n/text.rb, line 43
def translate(locale)
translated_text = ''
parse do |part|
case part[:type]
when :paragraph
translated_text << locale.translate(part[:paragraph])
when :empty_line
translated_text << part[:line]
else
raise "should not reach here: unexpected type: #{type}"
end
end
translated_text
end