class documentation
class PoFileParser: (source)
Support class to read messages from a ``gettext`` PO (portable object) file and add them to a `Catalog` See `read_po` for simple cases.
Method | __init__ |
Undocumented |
Method | parse |
Reads from the file-like object `fileobj` and adds any po file units found in it to the `Catalog` supplied to the constructor. |
Instance Variable | abort |
Undocumented |
Instance Variable | auto |
Undocumented |
Instance Variable | catalog |
Undocumented |
Instance Variable | context |
Undocumented |
Instance Variable | counter |
Undocumented |
Instance Variable | flags |
Undocumented |
Instance Variable | ignore |
Undocumented |
Instance Variable | in |
Undocumented |
Instance Variable | in |
Undocumented |
Instance Variable | in |
Undocumented |
Instance Variable | locations |
Undocumented |
Instance Variable | messages |
Undocumented |
Instance Variable | obsolete |
Undocumented |
Instance Variable | offset |
Undocumented |
Instance Variable | translations |
Undocumented |
Instance Variable | user |
Undocumented |
Method | _add |
Add a message to the catalog based on the current parser state and clear the state ready to process the next message. |
Method | _finish |
Undocumented |
Method | _invalid |
Undocumented |
Method | _process |
Undocumented |
Method | _process |
Undocumented |
Method | _process |
Undocumented |
Method | _process |
Undocumented |
Method | _reset |
Undocumented |
Class Variable | _keywords |
Undocumented |
def __init__(self, catalog:
Catalog
, ignore_obsolete: bool
= False, abort_invalid: bool
= False):
(source)
¶
Undocumented
Reads from the file-like object `fileobj` and adds any po file units found in it to the `Catalog` supplied to the constructor.