Skip to content

Localize version 0.40.0

Choose a tag to compare

@kipcole9 kipcole9 released this 03 Jun 05:25
· 10 commits to main since this release

[0.40.0] — June 1st, 2026

Breaking Changes

  • A bare relative :locale_cache_dir (no :otp_app set) is now refused at app start with Localize.LocaleCacheDirError — it resolved against the BEAM's CWD, which differs between mix tasks, mix test, and a release. Fix: add :otp_app to anchor the relative path, or use an absolute path.

Bug Fixes

  • Localize.Locale.Provider.locale_cache_dir/0 validates its configuration at app start (via Localize.Supervisor) and raises Localize.LocaleCacheDirError instead of silently reading from the wrong directory at runtime.

  • Localize.Locale.LocaleDisplay.display_name/2 no longer raises FunctionClauseError on a BCP 47 generic extension carrying an odd number of subtags (e.g. cr-s-7b); the trailing singleton chunk now renders as a bare subtag.

Enhancements

  • New :otp_app config key. Three supported forms for the locale cache directory: (1) :otp_app only → Application.app_dir(<otp_app>, "priv/localize/locales"); (2) :otp_app + relative :locale_cache_dirApplication.app_dir(<otp_app>, <relative>); (3) absolute :locale_cache_dir → used verbatim, :otp_app ignored.