Releases: elixir-cldr/cldr
Cldr version 2.24.0-rc.6
Deprecations
-
Deprecated
Cldr.Config.known_locale_names/1
in favour ofCldr.Locale.Loader.known_locale_names/1
-
Deprecated
Cldr.Config.known_rbnf_locale_names/1
in favour ofCldr.Locale.Loader.known_rbnf_locale_names/1
Cldr version 2.24.0-rc.5
Deprecations
- Deprecated
Cldr.Config.get_locale/2
in favour ofCldr.Locale.Loader.get_locale/2
.
This is expected to be the last RC before formal release on October 27th, 2021.
Cldr version 2.24.0-rc.4
Bug Fixes
- Fixes an issue with the locale loader which was incorrectly atomizing date part keys in date/time formats and conversly incorrectly stringifying the number system in the same formats.
Cldr version 2.24.0-rc.3
Bug Fixes
Cldr.validate_territory_subdivision/1
was case sensitive and didn't correctly handle atoms and binaries. Now fixed. Required to supportex_cldr_territories
properly.
Cldr version 2.24.0-rc.2
Bug Fixes
- Correctly atomize the keys for the locale display names "language" types.
v2.24.0-rc.1
Enhancements
- This release updates the CLDR 40 data to the latest pre-release (it's likely the final release data).
Cldr version 2.24.0-rc.0
There has been a significant amount of refactoring of the code that packages the locale files and the code that loads a locale. This has a very minor performance improvement at compile time but the major benefit is for maintainability.
Bug Fixes
-
Cldr.Plug.PutSession
now uses the locale key:canonical_locale_name
to serialize to the session. Previously it was using:cldr_locale_name
which does not include any of the extension information. Extension information encodes user preferences and is required to properly support localisation. -
Cldr.known_territories/1
no longer includes reserved, deprecated, special use or private use territory codes.
Enhancements
- Updates to CLDR release 40
Soft Deprecations
- Deprecated the
:put_session?
option inCldr.Plug.SetLocale
. Use the plugCldr.Plug.PutSession
instead.
Cldr version 2.23.2
Bug Fixes
-
Remove
telemetry
as a dependency. It is not required byex_cldr
. Thanks for the report from @benregn. Closes #154. -
Integerize all the numeric keys in calendars, including the 60 days of the Chinese calendar cycle and the 239 Japanese eras.
-
Change from
use Mix.Config
toimport Config
for configuration. This has been the standard since Elixir 1.9 and since only Elixir 1.10 is supported, the update can be made.
Cldr version 2.23.1
Bug Fixes
- Fix doc errors. Thanks to @maennchen for the report. Doc errors in other
ex_cldr
packages are also updated. Closes #149.
Cldr version 2.23.0
Bug Fixes
-
Corrects the formation of a canonical language tag. In previous releases, the script tag was always included as part of the canonical locale name. For example,
en-US
would becomeen-Latn-US
becauseLatn
is defined as a likely subtag ofen
. However TR35 specifies that if the script is the only script specified for this language then it should be omitted from the canonical name. Fixing this conformance is also a prerequisite for generating local display names. -
Fixes
Cldr.Locale.normalize_locale_name/1
to correctly case all keys in lower case except script (capital case) and region (upper case). It will now also process arbitrary locale names. -
A language tag can have more than one variant and this was not correctly implemented. As a result, the
t:Cldr.LanguageTag
struct fieldvariant
is renamedvariants
and is now a list with a default of[]
rather thannil
. -
Fix a race condition which could return incorrect results for a backend
known_gettext_locale_names/0
-
Cldr.validate_locale/2
will now return an error if the territory for a locale is unknown to CLDR. Note thatCldr.Locale.new/1,2
checks only if the territory is valid - not if it is known to CLDR. -
Locale inheritance no longer includes the "root" locale. In alignment with BCP 47, the "root" locale is now longer a valid locale. Parsing a locale name "root" is still valid but it will return the "und" language instead. While parsing is still correct, it remains a locale that is not valid for use in
ex_cldr
. The "root" locale is used only for a limited set of rules-based number formats. -
Correct territory containment chain for the territory
US
. -
Correctly parses and validates the -t- extension of a language tag.
-
Fixes inspecting a language tag that has a
-t-
extension and/or a private use (-x-
) extension.
Enhancements
-
Add
Cldr.DisplayName
protocol definition to return a localised string representation of CLDR-based structs such ast:Cldr.LanguageTag
,t:Cldr.Unit
andt:Cldr.Currency
-
Cldr.Locale.new/1,2
now passes all ~1600 validation tests for parsing and forming the canonical locale name. This is a prerequsite to impementing the Locale Display Algorithm in ex_cldr_locale_display. -
Cldr.locale_and_backend_from/1
now supports amap
of options as the argument. -
Cldr.validate_territory/1
now correctly substitutes for known aliases. For exampleMyApp.Cldr.validate_locale("en-UK")
will correctly returnen-GB
. -
Implement the
String.Chars
protocol to supportKernel.to_string/1
fort:Cldr.LanguageTag
structs. -
Implement the
Inspect
protocol to supportinspect/2
fort:Cldr.LanguageTag
structs. -
Add
Cldr.LanguageTag.sigil_l/2
to simplify creatingt:Cldr.LanguageTag
structs. -
Add
Cldr.validate_script/1
to normalize and validate a script code (which is now in atom format as its canonical form) -
Pre-compiled language tags (which are stored in
priv/cldr/language_tags.ebin
) are now cached during compilation resulting in a minor performance improvement in compile times. -
Pre-generate the rfc5646 parser which improves overall compile times. As a result the
nimble_parsec
dependency is marked asoptional
since it is no long required by library consumers.