Class GetText::POEntry
In: lib/gettext/po_entry.rb
lib/gettext/tools/parser/ruby.rb
Parent: Object

Contains data related to the expression or sentence that is to be translated.

Methods

==   []   add_comment   flag   flag=   fuzzy?   header?   merge   mergeable?   msgctxt?   new   new   obsolete?   plural?   to_s   translated?   type=  

Included Modules

POEntryForRubyParser

Classes and Modules

Class GetText::POEntry::Formatter
Class GetText::POEntry::InvalidTypeError
Class GetText::POEntry::NoMsgctxtError
Class GetText::POEntry::NoMsgidError
Class GetText::POEntry::NoMsgidPluralError

Constants

PARAMS = { :normal => [:msgid, :separator, :msgstr], :plural => [:msgid, :msgid_plural, :separator, :msgstr], :msgctxt => [:msgctxt, :msgid, :msgstr], :msgctxt_plural => [:msgctxt, :msgid, :msgid_plural, :msgstr]

External Aliases

initialize -> initialize_old

Attributes

comment  [RW] 
extracted_comment  [RW] 
flags  [RW]  @return [Array<String>] The flags for this PO entry. @since 3.0.4
msgctxt  [RW] 
msgid  [RW] 
msgid_plural  [RW]  Options
msgstr  [RW] 
previous  [RW] 
references  [RW] 
separator  [RW] 
translator_comment  [RW] 
type  [R]  Required

Public Class methods

Create the object. type should be :normal, :plural, :msgctxt or :msgctxt_plural.

Public Instance methods

Checks if the self has same attributes as other.

Support for extracted comments. Explanation s. www.gnu.org/software/gettext/manual/gettext.html#Names @return [void]

@return [String, nil] The flag of the PO entry. @deprecated Since 3.0.4. Use {flags} instead.

Set the new flag for the PO entry.

@param [String, nil] flag The new flag. @deprecated Since 3.0.4. Use {flags=} instead.

@return true if the entry is fuzzy entry, false otherwise.

  Fuzzy entry has "fuzzy" flag.

@return true if the entry is header entry, false otherwise.

  Header entry is normal type and has empty msgid.

Merges two translation targets with the same msgid and returns the merged result. If one is declared as plural and the other not, then the one with the plural wins.

Checks if the other translation target is mergeable with the current one. Relevant are msgid and translation context (msgctxt).

Returns true if the type is kind of msgctxt.

@return true if the entry is obsolete entry, false otherwise.

  Obsolete entry is normal type and has :last msgid.

Returns true if the type is kind of plural.

Format the po entry in PO format.

@param [Hash] options @option options (see Formatter#initialize)

@return true if the entry is translated entry, false otherwise.

[Validate]