Name Description Size
__init__.py 124
parse.py Parse a .po or .pot file into a message resource Message identifiers may have one or two parts, with the second one holding the optional message context. If `plurals` is set, its strings are used instead of index values for plural keys. The last plural variant is always considered the catchall variant. If `skip_obsolete` is set, obsolete `~` commented entries will be left out of the output. Messages may include the following metadata: - `translator-comments` - `extracted-comments` - `reference`: `f"{file}:{line}"`, separately for each reference - `obsolete`: `""` - `flag`: separately for each flag - `plural` 3673
serialize.py Serialize a resource as the contents of a .po file. Section identifiers are not supported. Message identifiers may have one or two parts, with the second one holding the optional message context. Comments and metadata on sections is not supported. If `plurals` is set, plural keys are mapped to their `plurals` index position. Otherwise, plural key values must match gettext's plural index values, or be the catchall key. Yields each entry and empty line separately. 5988