Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Attributes | List of all members
babel.messages.pofile.PoFileParser Class Reference

Public Member Functions

None __init__ (self, Catalog catalog, bool ignore_obsolete=False, bool abort_invalid=False)
 
None parse (self, IO[AnyStr]|Iterable[AnyStr] fileobj)
 

Public Attributes

 catalog
 
 ignore_obsolete
 
 counter
 
 offset
 
 abort_invalid
 
 messages
 
 translations
 
 locations
 
 flags
 
 user_comments
 
 auto_comments
 
 context
 
 obsolete
 
 in_msgid
 
 in_msgstr
 
 in_msgctxt
 

Protected Member Functions

None _reset_message_state (self)
 
None _add_message (self)
 
None _finish_current_message (self)
 
None _process_message_line (self, lineno, line, obsolete=False)
 
None _process_keyword_line (self, lineno, line, obsolete=False)
 
None _process_string_continuation_line (self, line, lineno)
 
None _process_comment (self, line)
 
None _invalid_pofile (self, line, lineno, msg)
 

Static Protected Attributes

list _keywords
 

Detailed Description

Support class to  read messages from a ``gettext`` PO (portable object) file
and add them to a `Catalog`

See `read_po` for simple cases.

Member Function Documentation

◆ _add_message()

None babel.messages.pofile.PoFileParser._add_message (   self)
protected
Add a message to the catalog based on the current parser state and
clear the state ready to process the next message.

◆ parse()

None babel.messages.pofile.PoFileParser.parse (   self,
IO[AnyStr] | Iterable[AnyStr]  fileobj 
)
Reads from the file-like object `fileobj` and adds any po file
units found in it to the `Catalog` supplied to the constructor.

Member Data Documentation

◆ _keywords

list babel.messages.pofile.PoFileParser._keywords
staticprotected
Initial value:
= [
'msgid',
'msgstr',
'msgctxt',
'msgid_plural',
]

The documentation for this class was generated from the following file: