class Message(object):
Method | check |
Run various validation checks on the message. Some validations are only performed if the catalog is provided. This method returns a sequence of TranslationError objects. |
Method | __cmp__ |
Compare Messages, taking into account plural ids |
Method | __eq__ |
Undocumented |
Method | __ge__ |
Undocumented |
Method | __gt__ |
Undocumented |
Method | __init__ |
Create the message object. |
Method | __le__ |
Undocumented |
Method | __lt__ |
Undocumented |
Method | __ne__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | clone |
Undocumented |
Instance Variable | auto_comments |
Undocumented |
Instance Variable | context |
Undocumented |
Instance Variable | flags |
Undocumented |
Instance Variable | id |
Undocumented |
Instance Variable | lineno |
Undocumented |
Instance Variable | locations |
Undocumented |
Instance Variable | previous_id |
Undocumented |
Instance Variable | string |
Undocumented |
Instance Variable | user_comments |
Undocumented |
Property | fuzzy |
Whether the translation is fuzzy. |
Property | pluralizable |
Whether the message is plurizable. |
Property | python_format |
Whether the message contains Python-style parameters. |
TranslationError
objects.Parameters | |
catalog | A catalog instance that is passed to the checkers |
Returns | |
iterator | Undocumented |
See Also | |
Catalog.check for a way to perform checks for all messages
in a catalog. |
Parameters | |
id | the message ID, or a (singular, plural) tuple for pluralizable messages |
string | the translated message string, or a (singular, plural) tuple for pluralizable messages |
locations | a sequence of (filename, lineno) tuples |
flags | a set or sequence of flags |
auto_comments | a sequence of automatic comments for the message |
user_comments | a sequence of user comments for the message |
previous_id | the previous message ID, or a (singular, plural) tuple for pluralizable messages |
lineno | the line number on which the msgid line was found in the PO file, if any |
context | the message context |
Whether the translation is fuzzy.
>>> Message('foo').fuzzy False >>> msg = Message('foo', 'foo', flags=['fuzzy']) >>> msg.fuzzy True >>> msg <Message 'foo' (flags: ['fuzzy'])>