Class: FastGettext::PoFile
- Inherits:
-
Object
- Object
- FastGettext::PoFile
- Defined in:
- lib/fast_gettext/po_file.rb
Overview
Responsibility:
- abstract po files for Po Repository
TODO refactor…
Class Method Summary collapse
Class Method Details
.to_mo_file(file, options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/fast_gettext/po_file.rb', line 7 def self.to_mo_file(file, ={}) require 'fast_gettext/vendor/poparser' parser = FastGettext::GetText::PoParser.new warn ":ignore_obsolete is no longer supported, use :report_warning" if .key? :ignore_obsolete parser.ignore_fuzzy = [:ignore_fuzzy] parser.report_warning = .fetch(:report_warning, true) mo_file = FastGettext::GetText::MOFile.new parser.parse(File.read(file), mo_file) MoFile.new(mo_file) end |