All Versions
93
Latest Version
Avg Release Cycle
14 days
Latest Release
-

Changelog History
Page 10

  • v2.0.2 Changes

    ๐Ÿš€ This is the changelog for Cldr v2.0.2 released on November 24th, 2018. For older changelogs please consult the release tag on GitHub

    โœจ Enhancements

    • ๐Ÿšš Move minimal Decimal version to 1.5

    ๐Ÿ› Bug fixes

    • ๐Ÿ“š Cldr.Substitution.substitute/2 now conforms to its documentation and substitutes a list of terms into a list format
  • v2.0.1 Changes

    ๐Ÿš€ This is the changelog for Cldr v2.0.1 released on November 22, 2018. For older changelogs please consult the release tag on GitHub

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  Fixes a bug whereby a backend configured with locales, but no default locale (and no global configuration), would crash during compilation
  • v2.0.0 Changes

    ๐Ÿš€ This is the changelog for Cldr v2.0.0 released on November 22, 2018. For older changelogs please consult the release tag on GitHub

    โœจ Enhancements

    ๐Ÿ‘€ See also Breaking Changes below.

    • Transforms the regex's for currency spacing to be compatible with the elixir regex engine. This supports improved conformance for currency formatting in ex_cldr_numbers
    • โœ‚ Removes the need for Phoenix as a dependency in tests. Thanks to @lostkobrakai. Closes #84.
    • 0๏ธโƒฃ Print deprecation message if the global config is used for more than :json_library and :default_locale
    • Align Cldr/get_locale/1/0 and Cldr.put_locale/2/1 with Gettext. See Cldr.get_locale/1, Cldr.get_locale/0, Cldr.put_locale/2 and Cldr.put_locale/1
    • ๐Ÿ‘Œ Improve performance of Cldr.Gettext.Plural and align its return better with Gettext
    • Add the 'miscellaneous' number formats to the locale definition files. This allows formatting of "at least", "approximately", "at most" and "range". These formats will be used in ex_cldr_numbers.

    Purpose of the changes

    ๐Ÿ”– Version 2.0 of Cldr is focused on re-architecting the module structure to more closely follow the model set by Phoenix, Ecto, Gettext and others that also rely on generating a public API at compile time. In Cldr version 1.x, the compile functions were all hosted within the ex_cldr package itself which has created several challenges:

    • ๐Ÿ”ง Only one configuration was possible per installation
    • ๐Ÿ”ง Dependency compilation order couldn't be determined which meant that when Gettext was configured a second, forced, compilation phase was required whenever the configuration changed
    • Code in the ex_cldr _build directory would be modified when the configuration changed

    ๐Ÿ†• New structure and configuration

    ๐Ÿ”ง In line with the recommended strategy for configurable library applications, Cldr now requires a backend module be defined that hosts the configuration and public API. This is similar to the strategy used by Gettext, Ecto, Phoenix and others. These backend modules are defined like this:

    defmodule MyApp.Cldr do
      use Cldr, locales: ["en", "zh"]
    end
    

    ๐Ÿ”ง For further information on configuration, consult the readme.

    Migrating from Cldr 1.x to Cldr version 2.x

    ๐Ÿš€ Although the api structure is the same in both releases, the move to a backend module hosting configuration and the public API requires changes in applications using Cldr version 1.x. The steps to migrate are:

    1. Change the dependency in mix.exs to {:ex_cldr, "~> 2.0"} ๐Ÿ”ง 2. Define a backend module to host the configuration and public API. It is recommended that the module be named MyApp.Cldr since this will ease migration through module aliasing.
    2. Change calls to Cldr.function_name to MyApp.Cldr.function_name. The easiest way to do this is to alias the backend module. For example:
    defmodule MyApp.SomeModule do