Class: GetText::Tools::MsgInit

### Home Classes Methods

### In Files

- lib/gettext/tools/msginit.rb

### Parent

Object

### Namespace

- CLASS GetText::Tools::MsgInit::ArgumentError
- CLASS GetText::Tools::MsgInit::Error
- CLASS GetText::Tools::MsgInit::ValidationError

### Methods

- ::run
- #run

### Included Modules

- GetText

### Class/Module Index

Quicksearch

- GetText
- GetText::ClassInfo
- GetText::ErbParser
- GetText::GladeParser
- GetText::LocalePath
- GetText::MO
- GetText::MO::HeaderRev1
- GetText::MO::InvalidFormat
- GetText::NoboundTextDomainError
- GetText::PO
- GetText::PO::NonExistentEntryError
- GetText::POEntry
- GetText::POEntry::InvalidTypeError
- GetText::POEntry::NoMsgctxtError
- GetText::POEntry::NoMsgidError
- GetText::POEntry::NoMsgidPluralError
- GetText::POEntryForRubyParser
- GetText::POParser
- GetText::ParseError
- GetText::RubyParser
- GetText::TextDomain
- GetText::TextDomainGroup
- GetText::TextDomainManager
- GetText::Tools
- GetText::Tools::MsgInit
- GetText::Tools::MsgInit::ArgumentError
- GetText::Tools::MsgInit::Error
- GetText::Tools::MsgInit::ValidationError
- GetText::Tools::MsgMerge
- GetText::Tools::Task
- GetText::Tools::XGetText

No matching classes.

# GetText::Tools::MsgInit

### Constants

COPYRIGHT_KEY
DESCRIPTION_TITLE
EMAIL
FIRST_AUTHOR_KEY
LANGUAGE_KEY
LANGUAGE_TEAM_KEY
LAST_TRANSLATOR_KEY
PLURAL_FORMS
POT_REVISION_DATE_KEY
VERSION
YEAR_KEY

### 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.