Skip to content

Releases: elixir-cldr/cldr

Cldr version 1.3.2

20 Jan 06:59
Compare
Choose a tag to compare

Bug Fixes

  • Correctly retrieve the default locale from a configured Gettext backend module. Fixes #32.

Cldr version 1.3.1

19 Jan 01:04
Compare
Choose a tag to compare

Bug Fixes

  • Correctly use conn.path_params not the incorrect conn.url_params in Cldr.Plug.SetLocale and add plug router tests. Fixes #33.

  • Correctly set the default locale using the Gettext default locale if the Cldr default locale isn't set but Gettext is.

Cldr version 1.3.0

14 Jan 00:01
Compare
Choose a tag to compare

Enhancements

  • Add Cldr.Digits.number_of_digits/1 that returns the number of digits (precision) of a float, integer or Decimal. The primary intent is to support better detection of precision errors after parsing a float string. A double precision 64-bit float (which is what Erlang/Elixir use) can safely support 15 digits. According to Wikipedia a decimal floating point number should round-trip convert to string representation and back for 16 digits without rounding (and 17 using "round to even").

Cldr Release 1.2.0

08 Jan 17:07
Compare
Choose a tag to compare

Bug Fixes

  • The changelog refers to the configuration key json_library but the readme and the code refer to json_lib. Standardise on json_library. Thanks to @LostKobrakai.

Enhancements

  • Fix the spec for Cldr.known_currencies/0. Thanks to @LostKobrakai.

Cldr Release 1.1.0

30 Dec 06:18
Compare
Choose a tag to compare

Enhancements

  • When configuring a locale name of the form "language-Script" or "language-Variant" the base "language" is also configured since plural rules will fall back to the base language if the locale name does not contain plural rules.

  • When expanding wildcard locale names a more informative exception and error is produced if the regex for the locale names is invalid

  • When a locale doesn't have any plural rules the error tuple {:error, {Cldr.UnknownPluralRules, message}} is returned instead of the current behaviour which raises an exception.

  • The json library is now configurable. This permits the use of the new json library jason or any other library that provides decode!/1 and encode!/1. The library is configured in config.exs as follows:

config :ex_cldr,
  json_library: Jason # The default is Poison

Cldr Release 1.0

08 Dec 12:00
Compare
Choose a tag to compare

This release contains no API changes from the candidate releases. It has some minimal refactoring but not additional bugs identified during the release candidate process.

Bug Fixes (including for 1.0.0-rc.1, rc.2 and rc.3)

  • Fixed a bug in Cldr.Map.underscore_keys/1 that wasn't correctly accounting for repeated "-"'s

  • Fixed currency definition in Cldr.Config.territory_info/1 so that a list is returned instead of a map so that the record of the same currency being used at different times is preserved. The canonical example is Palestine (territory code :PS) which has used the Jordanian Dinar twice during its history.

  • Restored the correct api for Cldr.Map.deep_map/2 and added Cldr.Map.deep_map/3

  • Fixed a bug in Cldr.Consolidate that crept in during the replacement of Flow with Task.async_stream

Enhancements

  • Remove duplicated fraction_as_integer/2 from plural rules

  • Optimised the code that supports plural rules in Cldr.Number.Cardinal and Cldr.Number.Ordinal

  • Removed obsolete guides since they are now merged into the readme files of each dependent package

Cldr Release 1.0.0-rc.2

22 Nov 01:49
Compare
Choose a tag to compare
Pre-release

Bug Fixes (including for 1.0.0-rc.1)

  • Fixed a bug in Cldr.Map.underscore_keys/1 that wasn't correctly accounting for repeated "-"'s

  • Fixed currency definition in Cldr.Config.territory_info/1 so that a list is returned instead of a map so that the record of the same currency being used at different times is preserved. The canonical example if Palestine (territory code :PS) which has used the Jordanian Dinar twice during its history.

  • Restored the correct api for Cldr.Map.deep_map/2 and added Cldr.Map.deep_map/3

  • Fixed a bug in Cldr.Consolidate that crept in during the replacement of Flow with Task.async_stream

Enhancements

  • Removed obsolete guides since they are now merged into the readme files of each dependent package

Cldr Release 1.0.0-rc.1

21 Nov 23:50
Compare
Choose a tag to compare
Pre-release

Bug Fixes

  • Fixed currency definition in Cldr.Config.territory_info/1 so that a list is returned instead of a map so that the record of the same currency being used at different times is preserved. The canonical example is Palestine (territory code :PS) which has used the Jordanian Dinar twice during its history.

  • Restored the correct api for Cldr.Map.deep_map/2 and added Cldr.Map.deep_map/3

  • Fixed a bug in Cldr.Consolidate that crept in during the replacement of Flow with Task.async_stream

  • Fixed a bug in Cldr.Map.underscore_keys

Enhancements

  • Removed obsolete guides since they are now merged into the readme files of each dependent package

Cldr Release 1.0.0-rc.0

18 Nov 01:21
Compare
Choose a tag to compare
Pre-release

Cldr version 1.0.0-rc.0

This is the first candidate release of Cldr release which signals API stability.

Enhancements

  • Adds two Plugs:

    • Cldr.Plug.AcceptLanguage will parse an accept-language header and resolve the best matched configured Cldr locale. The result is stored in conn.private[:cldr_locale] which is also returned by Cldr.Plug.AcceptLanguage.get_cldr_locale/1.

    • Cldr.Plug.SetLocale which will identify a requested locale in the request parameters or accept-language header and will set both/either Cldr and Gettext locales. The result is also stored in conn.private[:cldr_locale] and is returned by Cldr.Plug.SetLocale.get_cldr_locale/1.

  • %LanguageTag{} includes a new field :gettext_locale_name which will be matched if possible to a configured Gettext locale to aid cross-library collaboration.

  • Refactored the functions in Cldr.Map

Ensure client app data dir is created before installing locales

12 Sep 10:21
Compare
Choose a tag to compare

Ensures that the client application data directory is created before downloading and installing additional locale files.