Skip to content

Localize version 0.18.0

Choose a tag to compare

@kipcole9 kipcole9 released this 19 Apr 00:34
· 333 commits to main since this release

[0.18.0] — April 18th, 2026

Breaking Change

  • MF2 highlighter token class atoms renamed to match the tree-sitter capture taxonomy used by mf2_wasm_editor, so one stylesheet now styles both server-rendered HTML and the browser editor.

  • Localize.Message.to_html/2 now emits the new canonical class names with _ converted to - on output (.mf2-variable, .mf2-punctuation-bracket, .mf2-string-escape, .mf2-constant-builtin, etc.).

  • Localize.Message.to_ansi/2 default palette keys renamed to the new atoms.

Removed

  • The mf2_theme_css/ directory and scripts/generate_mf2_themes.exs generator. Themes now live canonically in mf2_wasm_editor.

Bug Fixes

  • Localize.Gettext.Interpolation.runtime_interpolate/2 no longer raises Localize.ParseError when a translated string is not valid MF2. It now returns the message unchanged and logs a warning, matching gettext's own "fall back to the msgid" behaviour for missing translations. Dev-facing UI copy that happens to contain MF2-like syntax (e.g. {{…}} or .match) no longer crashes callers.

[0.17.0] — April 17th, 2026

Added

  • mix format plugin Localize.Message.Formatter.Plugin. Canonicalises MF2 messages in ~M sigils and standalone .mf2 files. Enable by adding the plugin to .formatter.exs. See the "mix format plugin" section in the MessageFormat 2 guide.

[0.16.0] — April 17th, 2026

Bug Fixes

  • Fix locale download infinite recursion loop. Thanks to @woylie for the report. Closes #10.

[0.15.0] — April 17th, 2026

Added

  • MF2 syntax highlighter. See Localize.Message.to_tokens/2, Localize.Message.to_html/2 and Localize.Message.to_ansi/2.

Bug Fixes

  • Fix the exception and message when formatting a number and specifying a number system that is not valid for the given locale.