pysepal.i18n.binding#

Bind a message directory, and resolve one message from it.

Two cache layers with different identities. Parsed locale data is keyed by resolved path and matched directory code; the bound facade is keyed by resolved path and strictness. Strictness is therefore never inherited from whichever caller happened to bind a path first, while both facades still share one copy of the parsed data.

Editing a JSON file needs a kernel restart, which Solara’s reload already performs. That is deliberate: mtime polling would put hidden I/O on the render path.

Module Attributes

MISSING_MARKER

What a non-strict catalogue renders in place of a key it does not have.

Functions

catalog

Bind a messages/<locale>/*.json directory.

BoundCatalog(folder, *, strict)

One message directory, resolved per locale.