easyi18n 0.2.0 copy "easyi18n: ^0.2.0" to clipboard
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, as Locales, for MaterialApp.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 reaches MaterialApp without a rebuild of the app's code. localeFromTag parses a delivery tag (pt-br, zh-hant, es-419) with Flutter's subtag casing. This is what easyi18n init 0.13 wires; an app that hardcodes supportedLocales keeps working.
  • The scope and Easyi18nController.create close the http.Client they built when disposed; an injected client is left open. Before this every unmounted scope kept a socket and the 15 s idle timer dart:io arms 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-PT separately from pt). 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.
0
likes
160
points
398
downloads

Documentation

API reference

Publisher

verified publisherliontude.com

Weekly Downloads

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.

Repository (GitHub)
View/report issues

Topics

#i18n #l10n #translation #flutter #arb

License

MIT (license)

Dependencies

crypto, flutter, http, intl, meta, path_provider, unorm_dart

More

Packages that depend on easyi18n