Repository navigation
v0.155.0
Added
-
LocalizationBootConfig— canonical strict-mode boot API (ftllexengine.localization):- new frozen dataclass that composes
PathResourceLoader,FluentLocalization,
require_clean(), andvalidate_message_schemas()into a single audited boot sequence;
designed for regulated systems where every resource must load cleanly and all declared
message schemas must match exactly before the application accepts traffic boot()→FluentLocalization: executes the full boot sequence and raises
IntegrityCheckFailedErroron any load failure or schema mismatchboot_with_summary()→(FluentLocalization, LoadSummary, tuple[MessageVariableValidationResult, ...]):
identical toboot()but returns structured evidence for audit trails and boot-time loggingfrom_path()static factory: convenience constructor for disk-based resources; accepts
str | Pathas the base_path template- exactly one of
loader(customResourceLoader) orbase_path(path template with
{locale}placeholder) must be provided;__post_init__enforces this at construction time - exported from
ftllexengine.localization
- new frozen dataclass that composes
-
FluentNumber.decimal_valueproperty (ftllexengine.core.value_types):- returns the numeric value as an exact
Decimalregardless of whether the underlying
valueisintorDecimal; integers are coerced viaDecimal(value)with no
precision loss;Decimalvalues are returned as-is (same object identity)
- returns the numeric value as an exact
-
get_currency_decimal_digits()is now Babel-free (ftllexengine.introspection.iso):- rewrote to use
ISO_4217_VALID_CODES(new frozenset) andISO_4217_DECIMAL_DIGITS
fromftllexengine.constants; no Babel required at call time or import time - extended
ISO_4217_DECIMAL_DIGITSwith 13 X-special codes (XAG, XAU, XBA, XBB, XBC,
XBD, XDR, XPD, XPT, XSU, XTS, XUA, XXX — all 0 decimal digits) that were previously
absent; callers no longer receive the incorrect default of 2 for these codes - added raw-length guard before
.upper(): single-char casefold expansions (e.g.,'ß'
expands to'SS') no longer produce false positives - available in parser-only installs (
pip install ftllexengine) — no[babel]extra needed ISO_4217_VALID_CODEScovers active ISO 4217 currencies only; retired and demonetized
codes (e.g.TMM— Turkmenistani Manat 1993–2009) returnNone;get_currency()may
still return data for these codes via Babel/CLDR historical records — the two functions
have different scopes by design (docstring clarified)
- rewrote to use
-
Dual-clock timestamps on audit and integrity structures:
WriteLogEntry(inftllexengine.runtime.cache) gainswall_time_unix: floatalongside
the existingtimestamp(monotonic); enables cross-system correlation of cache audit logsIntegrityContext(inftllexengine.integrity) gainswall_time_unix: float | None = None;
all construction sites incache.py,bundle.py,orchestrator.py, and
resolution_context.pynow passwall_time_unix=time.time()