fabricatio_locale.rust

Classes

Msg

Functions

read_pofile(→ list[Msg])

Reads a .po file and returns a vector of Message objects containing msgid and msgstr.

update_pofile(→ None)

Updates a .po file with the provided messages.

Package Contents

class fabricatio_locale.rust.Msg
property id: str
property txt: str
fabricatio_locale.rust.read_pofile(file_path: str | os.PathLike | pathlib.Path) list[Msg]

Reads a .po file and returns a vector of Message objects containing msgid and msgstr.

fabricatio_locale.rust.update_pofile(file_path: str | os.PathLike | pathlib.Path, messages: Sequence[Msg]) None

Updates a .po file with the provided messages.

Parameters:
  • file_path – Path to the .po file.

  • messages – A vector of Message objects containing msgid and msgstr.