A runtime store of translations for the generated code to target.
A Bundle holds the Intl handle, the active Locale, the active locale's
messages, and a set of fallback messages (the master language). Keys missing
from the active locale fall back to the master, so a locale can ship partial
translations. New locales are loaded as data at runtime — adding one requires no
recompile.
A map from translation key to its parsed message.
Build a bundle from already-parsed messages. The messages passed here serve
as both the active locale and the fallback (they are the master language).
Generated code calls this in its init.
Parse a JSON object of { "key": "ICU string", ... } into Messages.
Returns the list of (key, parseError) pairs for any values that are not valid
ICU, alongside the messages that did parse. This is total: a malformed entry is
reported but does not abort the whole load.
Parse an association list of (key, ICU string) into messages, collecting
any per-key parse errors. Exposed for callers that already have the pairs (e.g.
generated code baking in the master language).
Switch the active locale, replacing the active messages. The fallback (master) messages are preserved, so keys missing from the new locale still resolve.
The bundle's currently active locale.
An opaque runtime translation store.