Parent

Methods

Included Modules

GetText::Tools::MsgInit

Public Class Methods

run(*arguments) click to toggle source

Create a new .po file from initializing .pot file with user's environment and input. @param [Array<String>] arguments arguments for rmsginit. @return [void]

# File lib/gettext/tools/msginit.rb, line 43
def run(*arguments)
  new.run(*arguments)
end

Public Instance Methods

run(*arguments) click to toggle source

Create .po file from .pot file, user's inputs and metadata. @param [Array] arguments the list of arguments for rmsginit

# File lib/gettext/tools/msginit.rb, line 64
def run(*arguments)
  parse_arguments(*arguments)
  validate

  parser = POParser.new
  parser.ignore_fuzzy = false
  pot = parser.parse_file(@input_file, GetText::PO.new)
  po = replace_pot_header(pot)

  File.open(@output_file, "w") do |f|
    f.puts(po.to_s)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.