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

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

Methods

==   []   add_comment   escape   escaped   max_line_length   max_line_length=   merge   msgctxt?   new   new   new_from_ary   plural?   to_po_str  

Included Modules

PoMessageForRubyParser

Constants

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

External Aliases

initialize -> initialize_old

Attributes

comment  [RW] 
msgctxt  [RW] 
msgid  [RW] 
msgid_plural  [RW]  Options
separator  [RW] 
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.

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]