Home | Trees | Indices | Help |
---|
|
object --+ | Message_base
Abstract base class for entries in PO catalogs.
Elements of the message are accessed through instance attributes. Some of them are read-only, typically those that are derived from the normal read-write attributes and cannot be set independently.
The precise type of each attribute depends on the subclass through
which it is accessed, but has a general behavior of one of the standard
types. E.g. when the behavior is that of a list, the type is stated as
list*
. All strings are assumed unicode, except where noted
otherwise.
Regardless of the exact composition of the message, each message object will have all the instance attributes listed. In case the message actually does not have an element corresponding to an instance attribute, that attribute will have an appropriate null value.
Only the read-only attributes are provided by this base class, while the read-write attributes are to be provided by its subclasses. All are listed here, however, as the interface that all subclasses should implement.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
bool |
|
||
bool |
|
||
list of strings |
|
||
|
|||
|
|||
|
|||
string |
|
||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Instance Variables | |
bool |
active (read-only) whether the translation of the message is used at destination ( False for untranslated, fuzzy and obsolete
messages)
|
list* of strings |
auto_comment automatic (extracted) comments ( #. ... )
|
set* of strings |
flag message flags ( #, ... )
|
string |
fmt (read-only) format composition |
string |
format (read-only) the format flag of the message (e.g. |
bool |
fuzzy whether the message is fuzzy |
string |
inv (read-only) extraction-invariant composition |
string |
key (read-only) key composition |
key_previous (read-only) previous key composition |
|
list* of strings |
manual_comment manual (translator) comments ( # ... )
|
string or None |
msgctxt context field ( msgctxt "..." )
|
string or None |
msgctxt_previous previous context field ( #| msgctxt "..." )
|
string |
msgid message field ( msgid "..." )
|
string or None |
msgid_plural plural field ( msgid_plural "..." )
|
string or None |
msgid_plural_previous previous plural field ( #| msgid_plural "..." )
|
string or None |
msgid_previous previous message field ( #| msgid "..." )
|
list* of strings |
msgstr translation fields ( msgstr "..." ,
msgstr[n] "..." )
|
bool |
obsolete whether entry is obsolete ( #~ ... )
|
int |
refentry referent entry number of the message inside the catalog |
int |
refline referent line number of the message inside the catalog |
list* of pairs* |
source source references, as filepath:lineno pairs ( #: ... )
|
bool |
translated (read-only) whether the message is translated (False for fuzzy messages) |
string |
trn (read-only) translator-controlled composition |
bool |
untranslated (read-only) whether the message is untranslated (False for fuzzy messages) |
Properties | |
Inherited from |
Method Details |
Internal constructor for subclasses' usage.
|
Attribute getter. Processes read-only attributes, and sends others to the getter given by the constructor.
|
Get attribute value. Allows accessing the message like a dictionary.
|
Attribute setter. May act upon some attributes (e.g. checks), but finally passes all of them to the setter given by the constructor.
|
Reports whether messages are equal in all apparent parts. "Apparent" parts include all those which are visible in the PO file. I.e. the check will ignore internal states, like line caches, etc.
|
Reports whether messages are not equal in some apparent parts. Equivalent to
|
The line-representation of the message. Lines are returned with newlines included.
See Also: pology.wrap |
The string-representation of the message. Passes the arguments to to_lines and joins the resulting list. See Also: to_lines |
Thoroughly unfuzzy the message. Strictly speaking, a message is fuzzy if it has the If the message is not strictly fuzzy upon this call, it is undefined whether any present previous fields will be left untouched, or removed nontheless.
|
Revert message to pristine untranslated state. Reverting to untranslated state removes manual comments (by default),
|
Coded description of the translation state of the message. Code string can be one of: "T" (translated), "F" (fuzzy), "U" (untranslated), "OT" (obsolete translated), "OF" (obsolete fuzzy), "OU" (obsolete untranslated).
|
Copy all parts from the other message. All mutable parts are deeply copied.
|
Copy all key parts from the other message. See key attribute for the description and list of key parts. All mutable parts are deeply copied.
|
Copy all format parts from the other message. See fmt attribute for the description and list of format parts. All mutable parts are deeply copied.
|
Copy extraction-invariant parts from the other message. See inv attribute for the description and list of extraction-invariant parts. All mutable parts are deeply copied.
|
Instance Variable Details |
fmt(read-only) format compositionFormat composition consists of all message parts which determine contents of compiled message in the MO file, including whether it is compiled at all. The value is an undefined serialization of:
|
format(read-only) the format flag of the message (e.g.c-format )
or empty string
|
fuzzywhether the message is fuzzyThe state of fuzziness can be also checked and set by looking for and
adding/removing the
|
inv(read-only) extraction-invariant compositionExtraction-invariant parts of the message are those that are not dependent on the placement and comments to the message in the code. In effect, these are the parts which are not eliminated when the message is obsoleted after merging. The value is an undefined serialization of:
|
key(read-only) key compositionMessage key is formed by the parts of the message which define unique entry in a catalog. The value is an undefined serialization of
|
key_previous(read-only) previous key compositionLike key, except this is for previous fields. If there are no
previous fields, this is The value is an undefined serialization of
|
refentryreferent entry number of the message inside the catalogValid only if there were no additions/removals of messages from the catalog, otherwise undefined (made valid again after syncing the catalog).
|
reflinereferent line number of the message inside the catalogValid only if there were no modifications to the catalog, otherwise
undefined (made valid again after syncing the catalog). Normally this is
the line number of
|
trn(read-only) translator-controlled compositionTranslator-controlled parts of the message are those that are normally modified by a translator when working on a PO file. The value is an undefined serialization of:
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Jul 24 21:00:27 2014 | http://epydoc.sourceforge.net |