Class GetText::PoMessage
In: lib/gettext/tools/pomessage.rb
lib/gettext/tools/parser/ruby.rb
Parent: Object

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

Methods

Included Modules

PoMessageForRubyParser

Constants

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

Attributes

comment  [RW] 
msgctxt  [RW] 
msgid  [RW] 
msgid_plural  [RW]  Options
sources  [RW] 
type  [RW]  Required

Public Class methods

Gets the max line length.

Sets the max line length.

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

For backward comatibility. This doesn’t support “comment”. ary = [msgid1, “file1:line1”, “file2:line”]

Public Instance methods

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

Returns a parameter representation suitable for po-files and other purposes.

initialize_old(type)

Alias for initialize

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.

Returns true if the type is kind of msgctxt. And if this is a kind of msgctxt and msgctxt property is nil, then raise an RuntimeException.

Returns true if the type is kind of plural. And if this is a kind of plural and msgid_plural property is nil, then raise an RuntimeException.

Output the po message for the po-file.

[Validate]