Ex_Cldr v2.21.0 Release Notes

  • ๐Ÿš€ This is the changelog for Cldr v2.21.0 released on May 17th, 2021. For older changelogs please consult the release tag on GitHub

    ๐Ÿ› Bug Fixes

    • Correctly pluralize numbers where the plural rule has an explicit case for the given number. When pluralizing numbers, plural rules will return a value such as :one, :two, :few, :many which is used as a key into a map of substitutions. However it is also possible to have substitutions based upon the explicit value of a number, rather than its plural type. Previously this last rule was not being applied but now is. For the purposes of pluralization, 1.0 and 1 are considered the same - plural rules use the integer representation so a float is cast to an integer when they are both equal according to ==.

    • Correctly pluralize Decimal numbers (in addition to integer and float)

    โœจ Enhancements

    • โž• Add --force-locale-download option to mix cldr.install.locales.

    • 0๏ธโƒฃ Plug.SetLocale default keys for locale discovery from an HTTP request are now expanded to be [:session, :accept_language, :query, :path].

    • ๐Ÿ—„ The :session_key option to Cldr.Plug.SetLocale is deprecated. A well-known session key is required in order to support setting the locale from the session passed to mount/3 for liveview applications. The session key is available as Cldr.Plug.SetLocale.session_key/0

    • โž• Adds Cldr.Plug.SetSession that will copy the cldr locale name from the conn and put it in the session. This simplifies the lifecycle of a typical HTTP request and ensures that the locale is readily available in liveviews as well.