__init__.py |
|
136 |
parse.py |
Parse a .properties file into a message resource.
By default, all messages are parsed as PatternMessage([str]).
To customize that, define an appropriate `parse_message(str) -> Message`.
The parsed resource will not include any metadata.
|
7567 |
serialize.py |
Serialize a resource as the contents of a .properties file.
Section identifiers will be prepended to their constituent message identifiers.
Multi-part message identifiers will be joined with `.` between each part.
For non-string message values, a `serialize_message` callable must be provided.
Metadata is not supported.
Yields each entry, comment, and empty line separately.
Re-parsing a serialized .properties file is not guaranteed to result in the same Resource,
as the serialization may lose information about message sections and metadata.
|
4745 |