easyi18n 0.2.0
easyi18n: ^0.2.0 copied to clipboard
Runtime SDK for easyi18n: resolve UI strings with source-as-key tr(), with an offline floor (baked assets) and live hot-update from a delivery manifest/CDN.
Changelog #
0.2.0 #
Easyi18nScope.localesOf(context): the locales the app can offer, asLocales, forMaterialApp.supportedLocales. It is the scope's declared list plus every locale the delivery manifest advertises, and it registers the caller on the scope's notifier, so publishing a new language reachesMaterialAppwithout a rebuild of the app's code.localeFromTagparses a delivery tag (pt-br,zh-hant,es-419) with Flutter's subtag casing. This is whateasyi18n init0.13 wires; an app that hardcodessupportedLocaleskeeps working.- The scope and
Easyi18nController.createclose thehttp.Clientthey built when disposed; an injected client is left open. Before this every unmounted scope kept a socket and the 15 s idle timerdart:ioarms with it. (#1545, #1660, #1689)
0.1.1 #
No behaviour change for an app already on 0.1.0. The resolver, the ICU
canonicaliser and the bundle hashing are byte-identical, and the public API is
unchanged. This release re-syncs the vendored contract with easyi18n_core.
- The vendored CLDR plural table is now generated from Unicode's own cardinal
plural rules instead of hand-listed, and its lookup honours a region before
falling back to the language subtag (CLDR states
pt-PTseparately frompt). The SDK never reads this table itself — it is vendored for consumers outside this repo, and a delivered bundle carries rendered ICU rather than form maps — so nothing an app renders moves. (#486, #491, #496) - Golden contract vectors extended: the served and parsed ICU plural recipes, the three previously unvectored recipes, adversarial cross-SDK cases, and key order where UTF-16 and code point ordering disagree. (#326, #455, #486)
0.1.0 #
- Initial runtime SDK:
Easyi18nScope+context.tr(source, args:)/'source'.tr()source-as-key resolution. - Offline floor from baked assets (
assets/easyi18n/{locale}.json). - Automatic hot-update from a delivery manifest (conditional
If-None-Match, content-addressed immutable bundles, atomic swap with rebuild). - Vendored, byte-parity contract (token + bundle hashing) gated by golden
vectors and
tool/sync_contract.dart.