Skip to content

chore(deps): bump localize from 0.50.0 to 1.0.1 in the prod-dependencies group - #224

Merged
jimsynz merged 1 commit into
mainfrom
dependabot/hex/prod-dependencies-2b9483c1c2
Aug 8, 2026
Merged

chore(deps): bump localize from 0.50.0 to 1.0.1 in the prod-dependencies group#224
jimsynz merged 1 commit into
mainfrom
dependabot/hex/prod-dependencies-2b9483c1c2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 8, 2026

Copy link
Copy Markdown
Contributor

Bumps the prod-dependencies group with 1 update: localize.

Updates localize from 0.50.0 to 1.0.1

Release notes

Sourced from localize's releases.

Localize version 1.0.1

[1.0.1] — August 2nd, 2026

Fixed

  • Localize.LanguageTag.best_match/3 now prefers a territory's own language when candidates are otherwise equidistant, so sgs (Samogitian, spoken in Lithuania) matches lt rather than en-LT. The distance trie scores every candidate sharing the desired script and territory identically, which previously left the winner to depend on the order of the supported list.

  • Localize.ParseError reports an over-cap input as reason: :input_too_large with the byte counts in new :size and :limit fields, instead of interpolating them into a prose :reason string that its own type never allowed. The message, number and unit-identifier parsers all use it, and the oversized input is no longer retained on the exception.

Localize version 1.0.0

[1.0.0] — July 31st, 2026

The first stable release. MF2 message validation is separated from parsing: Localize.Message.Parser.parse/1 checks syntax, Localize.Message.Validator.validate/1 checks the TR35 data-model rules, and everything that formats or serializes a message runs both. A message like .local $count = {$count :number} — a declaration that reads the variable it declares, which is a Duplicate Declaration error rather than a valid annotation of an external variable — is now rejected wherever it appears rather than only when formatted. The construct for annotating an external variable is .input {$count :number}.

Added

  • An ecosystem guide sets out the library's shape: a set of structured, locale-aware types, and the four operations — formatting, parsing, ordering and serialization — that apply both to them and to most of Elixir's own types. It tabulates which library provides each operation for each type.

  • Localize.Message.Validator.validate/1 is public, checking a parsed message against the TR35 data-model rules. Localize.Message.Parser.parse/1 remains syntax-only, so tooling that must accept invalid input — to_tokens/2 and the highlighters built on it — parses without validating, while everything that formats or serializes composes the two and reports syntax errors before data-model ones.

Fixed

  • Duplicate Declaration is now caught wherever a message is used, not only when it is formatted. .local $count = {$count :number} reads the variable it declares, so it was rejected by format/3 but serialized happily by canonical_message/2 and accepted at compile time as a Gettext msgid. Use .input {$count :number} to annotate an external variable.

  • Three further TR35 data-model rules are now enforced: Missing Selector Annotation (a selector that does not resolve, directly or through a chain of locals, to a declaration carrying a function), Variant Key Mismatch (a variant whose key count differs from the selector count), and Missing Fallback Variant (no variant with only * keys). None was detected previously — the first two were documented as enforced during match evaluation and were not, and all three could be formatted or serialized without error.

  • Localize.Message.canonical_message/2 no longer serializes a message that violates the data-model rules; it previously round-tripped every invalid form, including a .local declaration reading the variable it declares. The compile-time Gettext interpolator validates too, so a mis-authored msgid fails the build rather than surfacing at runtime.

  • The MF2 working-group data-model-errors.json conformance cases now assert the specific error reason rather than merely that some error occurred. The WG cases pass no bindings, so an incidental unbound-variable error satisfied the old assertion — which is how three unimplemented rules stayed green.

  • Localize.validate_territory/1 now accepts integer M49 codes as its typespec and documentation always promised — validate_territory(1) returns {:ok, :"001"}. An integer previously raised FunctionClauseError because the validator's guard omitted is_integer/1, even though its normalization already zero-padded integers. Numeric codes may also be given as strings ("001"); note that country-level M49 numbers such as 840 are not in CLDR's territory validity set, which uses the alpha-2 code ("US") there.

Localize version 1.0.0-rc.7

[1.0.0-rc.7] — July 28th, 2026

This release settles the :format / :style option naming across the library. The rule is now uniform: :format is how a value is rendered, :style is which variant of a name or pattern you get, and an option that selects something else again — Localize.Interval's choice of which date fields appear — is named for what it selects. Every rename below is a hard break with no alias; each entry names its replacement.

Changed

  • Breaking: Localize.Duration.to_string/2 and to_parts/2 rename the per-unit width override from :styles to :formats, so the whole-duration width and its per-unit overrides share one name (format: :short, formats: [hour: :long]). The :styles key, introduced in 1.0.0-rc.2 and never in a stable release, is now ignored like any other unknown option.

  • Breaking: Localize.Calendar.localize/3 returns {:ok, name} or {:error, exception} instead of a bare string, nil, or an error tuple, and gains localize!/3 for the bare name — the old union meant a template interpolating the result raised Protocol.UndefinedError when the locale was invalid. It now derives the part's value and delegates to display_name/3, so the two agree: its width option is :style (was :format), its default width is :wide (was :abbreviated), and an unknown part returns an error rather than raising FunctionClauseError.

  • Breaking: The calendar part and type names are unified on :day_of_week and :day_period: Localize.Calendar.display_name/3 takes :day_of_week (was :day) and localize/3 takes :day_period (was :am_pm). An unknown part or type now returns an error listing the valid names rather than raising FunctionClauseError.

  • Breaking: The day-period variant selector is day_period: :variant on Localize.Calendar.display_name/3 and localize/3, and on the date/time formatters that pass it through (Localize.Time.to_string(~T[15:00:00], format: "h a", day_period: :variant) renders "3 pm"). The :am_pm and :period aliases are removed, so every variant option is now named for the part it applies to, as :era already was.

  • Breaking: Localize.Interval.to_string/3 renames its :style option to :fields, because it selects which date fields appear (:date, :month, :month_and_day, :year_and_month) rather than a width — :format remains the width axis, and the two are now named for what they do. Localize.Interval.date_styles/0 becomes known_fields/0, and Localize.DateTimeIntervalFormatError carries :fields with reason :unknown_fields in place of :style / :unknown_style.

... (truncated)

Changelog

Sourced from localize's changelog.

[1.0.1] — August 2nd, 2026

Added

  • mix localize.unit.gen_conversions generates a dependency-free unit conversion module from CLDR data, selected by quantity (--types speed,temperature), for embedded targets where compiling Localize costs more than the project itself. The generated module resolves SI prefixes and -per- compounds at call time, accepts CLDR identifiers, spaced names and English symbols such as "km/h", and provides a ~u sigil that converts at compile time.

Fixed

  • Localize.LanguageTag.best_match/3 now prefers a territory's own language when candidates are otherwise equidistant, so sgs (Samogitian, spoken in Lithuania) matches lt rather than en-LT. The distance trie scores every candidate sharing the desired script and territory identically, which previously left the winner to depend on the order of the supported list.

  • Localize.ParseError reports an over-cap input as reason: :input_too_large with the byte counts in new :size and :limit fields, instead of interpolating them into a prose :reason string that its own type never allowed. The message, number and unit-identifier parsers all use it, and the oversized input is no longer retained on the exception.

[1.0.0] — July 31st, 2026

The first stable release. MF2 message validation is separated from parsing: Localize.Message.Parser.parse/1 checks syntax, Localize.Message.Validator.validate/1 checks the TR35 data-model rules, and everything that formats or serializes a message runs both. A message like .local $count = {$count :number} — a declaration that reads the variable it declares, which is a Duplicate Declaration error rather than a valid annotation of an external variable — is now rejected wherever it appears rather than only when formatted. The construct for annotating an external variable is .input {$count :number}.

Added

  • An ecosystem guide sets out the library's shape: a set of structured, locale-aware types, and the four operations — formatting, parsing, ordering and serialization — that apply both to them and to most of Elixir's own types. It tabulates which library provides each operation for each type.

  • Localize.Message.Validator.validate/1 is public, checking a parsed message against the TR35 data-model rules. Localize.Message.Parser.parse/1 remains syntax-only, so tooling that must accept invalid input — to_tokens/2 and the highlighters built on it — parses without validating, while everything that formats or serializes composes the two and reports syntax errors before data-model ones.

Fixed

  • Duplicate Declaration is now caught wherever a message is used, not only when it is formatted. .local $count = {$count :number} reads the variable it declares, so it was rejected by format/3 but serialized happily by canonical_message/2 and accepted at compile time as a Gettext msgid. Use .input {$count :number} to annotate an external variable.

  • Three further TR35 data-model rules are now enforced: Missing Selector Annotation (a selector that does not resolve, directly or through a chain of locals, to a declaration carrying a function), Variant Key Mismatch (a variant whose key count differs from the selector count), and Missing Fallback Variant (no variant with only * keys). None was detected previously — the first two were documented as enforced during match evaluation and were not, and all three could be formatted or serialized without error.

  • Localize.Message.canonical_message/2 no longer serializes a message that violates the data-model rules; it previously round-tripped every invalid form, including a .local declaration reading the variable it declares. The compile-time Gettext interpolator validates too, so a mis-authored msgid fails the build rather than surfacing at runtime.

  • The MF2 working-group data-model-errors.json conformance cases now assert the specific error reason rather than merely that some error occurred. The WG cases pass no bindings, so an incidental unbound-variable error satisfied the old assertion — which is how three unimplemented rules stayed green.

  • Localize.validate_territory/1 now accepts integer M49 codes as its typespec and documentation always promised — validate_territory(1) returns {:ok, :"001"}. An integer previously raised FunctionClauseError because the validator's guard omitted is_integer/1, even though its normalization already zero-padded integers. Numeric codes may also be given as strings ("001"); note that country-level M49 numbers such as 840 are not in CLDR's territory validity set, which uses the alpha-2 code ("US") there.

[1.0.0-rc.7] — July 28th, 2026

This release settles the :format / :style option naming across the library. The rule is now uniform: :format is how a value is rendered, :style is which variant of a name or pattern you get, and an option that selects something else again — Localize.Interval's choice of which date fields appear — is named for what it selects. Every rename below is a hard break with no alias; each entry names its replacement.

Changed

  • Breaking: Localize.Duration.to_string/2 and to_parts/2 rename the per-unit width override from :styles to :formats, so the whole-duration width and its per-unit overrides share one name (format: :short, formats: [hour: :long]). The :styles key, introduced in 1.0.0-rc.2 and never in a stable release, is now ignored like any other unknown option.

  • Breaking: Localize.Calendar.localize/3 returns {:ok, name} or {:error, exception} instead of a bare string, nil, or an error tuple, and gains localize!/3 for the bare name — the old union meant a template interpolating the result raised Protocol.UndefinedError when the locale was invalid. It now derives the part's value and delegates to display_name/3, so the two agree: its width option is :style (was :format), its default width is :wide (was :abbreviated), and an unknown part returns an error rather than raising FunctionClauseError.

  • Breaking: The calendar part and type names are unified on :day_of_week and :day_period: Localize.Calendar.display_name/3 takes :day_of_week (was :day) and localize/3 takes :day_period (was :am_pm). An unknown part or type now returns an error listing the valid names rather than raising FunctionClauseError.

  • Breaking: The day-period variant selector is day_period: :variant on Localize.Calendar.display_name/3 and localize/3, and on the date/time formatters that pass it through (Localize.Time.to_string(~T[15:00:00], format: "h a", day_period: :variant) renders "3 pm"). The :am_pm and :period aliases are removed, so every variant option is now named for the part it applies to, as :era already was.

  • Breaking: Localize.Interval.to_string/3 renames its :style option to :fields, because it selects which date fields appear (:date, :month, :month_and_day, :year_and_month) rather than a width — :format remains the width axis, and the two are now named for what they do. Localize.Interval.date_styles/0 becomes known_fields/0, and Localize.DateTimeIntervalFormatError carries :fields with reason :unknown_fields in place of :style / :unknown_style.

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Bumps the prod-dependencies group with 1 update: [localize](https://github.com/elixir-localize/localize).


Updates `localize` from 0.50.0 to 1.0.1
- [Release notes](https://github.com/elixir-localize/localize/releases)
- [Changelog](https://github.com/elixir-localize/localize/blob/main/CHANGELOG.md)
- [Commits](elixir-localize/localize@v0.50.0...v1.0.1)

---
updated-dependencies:
- dependency-name: localize
  dependency-version: 1.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: prod-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file elixir Pull requests that update elixir code labels Aug 8, 2026
@jimsynz
jimsynz merged commit c006c75 into main Aug 8, 2026
38 of 40 checks passed
@dependabot
dependabot Bot deleted the dependabot/hex/prod-dependencies-2b9483c1c2 branch August 8, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file elixir Pull requests that update elixir code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant