Method: GetText::Tools::MsgInit#run
- Defined in:
- lib/gettext/tools/msginit.rb
#run(*arguments) ⇒ Object
Create .po file from .pot file, user's inputs and metadata.
69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/gettext/tools/msginit.rb', line 69 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 |