Class: FastGettext::PoFile

Inherits:
Object
  • Object
show all
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) ⇒ Object



7
8
9
10
11
12
# File 'lib/fast_gettext/po_file.rb', line 7

def self.to_mo_file(file)
  require 'fast_gettext/vendor/poparser'
  mo_file = FastGettext::GetText::MOFile.new
  FastGettext::GetText::PoParser.new.parse(File.read(file),mo_file)
  MoFile.new(mo_file)
end