Releases: elixir-cldr/cldr
Cldr version 1.5.0
Enhancements
- Updated to use CLDR version 33 data released by the Unicode Consortium on March 28th 2018. This data release adds no new locales. The release notes for CLDR are at http://cldr.unicode.org/index/downloads/cldr-33
Cldr version 1.4.5
Bug Fixes
-
Fixed
Cldr.Math.power/2
for Decimal numbers with a coefficient of 10 and an exponent <> 1. Thanks to @CamonZ -
Correct typos in README. Thanks to @zacca
-
Fixed
Cldr.Map.deep_merge/2/3
to skip structs since their keys are atoms and they don't support Enumerable -
Fixed the the mix task generation of language tags for all locales. This issue occasionally exhibited itself as compile errors on Cldr.Numbers (ex_cldr_numbers) as "unknown locale".
-
Fixed exception when the
:cldr
compiler is trying to remove module Beam files -
Removed .erl generated files from the repo (they will be created at compile time)
Cldr version 1.4.4
Enhancements
-
Cldr.Config functions that deal with directory and file paths now return results generated at runtime rather than at compile time
-
An exception is raised at compile time if the
:cldr
compiler is configured but it is not the last compiler in the list returned byMix.Project.config[:compilers]
-
Renamed
language_tags
tolanguage_tags.ebin
to better reflect that its a file containing erlang binary terms
Cldr version 1.4.3
Enhancements
-
When a locale configuration change is detected a coloured diff of the locale configuration is printed.
-
When the
:cldr
compiler runs, callMix.Project.build_structure/0
for eachCldr
dependency to ensure thepriv
directory is copied to the build directory.
Cldr version 1.4.2
Bug Fixes
- Remove the hard-coded reference to the
Poison
library inCldr.Rbnf.Config
and replace it with the canonicalCldr.Config.json_library/0
Enhancements
- Improve the error message raised at compile time if no valid json library has been detected
Cldr version 1.4.1
As reported by @marceldegraaf there has been a regression in the performance of Cldr.DateTime.to_string/2
. The use case he reported involved calls with locale: "nl"
; ie using a binary :locale
.
In all cases, locale resolution is passed through Cldr.validate_locale/1
. In prior releases of Cldr
this would require parsing the locale name which is a relatively expensive operation.
Therefore the major focus on this small release is to pre-parse all configured locale names into their corresponding language tag. As a result performance is largely the same whether locale is specified as a binary or as a language tag.
Enhancements
-
Precompiles all known locale names into a language tag which are then used to generate locale specific versions of
Cldr.validate_locale/1
when the parameter is a binary. -
Adds a mix task (available in github, not in the hex package) to generate the language tags for all available locales to support the performance optimization of locale to langauge tag lookup which is used in
Cldr.validate_locale/1
in many places in `Cldr. -
Automatically detects the presence of
Jason
andPoison
and configures the default:json_library
appropriately.
Cldr version 1.4.0
Enhancements
-
Updates CLDR data to version 32.0.1
-
The primary focus on this release to automate the process of recompiling those parts of Cldr that are sensitive to configuration change. This release:
-
Adds a
compiler.cldr
as a Mix compiler. This provides the functions that identify a locale configuration change and then recompile the relevant modules of Cldr. Basically it looks in all dependencies for any module that calls functions inCldr.Config
Therefore it is expected to work for Cldr and any package that depends on Cldr. -
To enable this functionality, the
compiler.cldr
mix task needs to be added inmix.exs
as the last compiler in the list. For example
-
def project do
[
app: :app_name,
...
compilers: Mix.compilers ++ [:cldr],
start_permanent: Mix.env == :prod,
deps: deps()
]
end
-
With this enhancement it will be no longer necessary to force recompile Cldr or packages that depend on it since they will be compiled whenever a locale configuration change is detected.
-
The Jason json library is added to the dependency list as an optional dependency.
-
Adds
:iso_digits
to the currency data maintained in CLDR. Cldr currency data does not always align with the ISO definition of a currency - notably for digits (subunit) definitions. For example, the Colombian Peso has an official subunit of the pesavo. One hundred pesavos equals one peso. There are no notes/cash/coins for the centavo but it is an offical part of the currency and it's important to be maintained for financial transactions. -
Adds a
Mix
task to download the ISO currency data that is used during locale consolidation to include ISO currency digits (subunits) in the currency definition. This is used downstream in theex_money
package.
Bug Fixes
-
Don't raise an exception if a Gettext backend is defined but it has no configuration for
:default_locale
. Fixes #38. Thanks to @Schultzer. -
Fix incorrect boolean expression, replace with
&&
when determining ifGettext
is configured. -
Remove unused var warnings when compiing on Elixir 1.7.0 master branch. Fixes #40. Thanks to @michalmuskala.
-
Fix README
config.exs
examples to use the correct config key:ex_cldr
. Fixes #41. Thanks to @phtrivier. -
Fix detecting a Gettext locale configuration by adding the
:cldr
compiler. Fixes #31. Thanks to @BrummbQ. -
Ensure that the default locale is also expanded. If no default locale is configured, the package default "en-001" is defined. This locale should also be expanded to include "en" since plural rules are often defined on the language rather than the territory-specific locale.
Cldr version v1.4.0-rc.3
Unless further bugs reported this is the final candidate release.
Enhancements
-
The primary focus on this release to automate the process of recompiling those parts of Cldr that are sensitive to configuration change. This release:
-
Adds a
compiler.cldr
as a Mix compiler. This provides the functions that identify a locale configuration change and then recompile the relevant modules of Cldr. Basically it looks in all dependencies for any module that calls functions inCldr.Config
Therefore it is expected to work for Cldr and any package that depends on Cldr. -
To enable this functionality, the
compiler.cldr
mix task needs to be added inmix.exs
as the last compiler in the list. For example
-
def project do
[
app: :app_name,
...
compilers: Mix.compilers ++ [:cldr],
start_permanent: Mix.env == :prod,
deps: deps()
]
end
-
With this enhancement it will be no longer necessary to force recompile Cldr or packages that depend on it since they will be compiled whenever a locale configuration change is detected.
-
Please note that the
:cldr
compiler is only available on Elixir version 1.6.0 and later since it depends onMix.Tasks.Xref.calls/0
. In the case of Elixir versions up to 1.5 a manualmix deps.compile ex_cldr --force
will be required if the locale configuration changes. -
The Jason json library is added to the dependency list as an optional dependency.
-
Adds
:iso_digits
to the currency data maintained in CLDR. Cldr currency data does not always align with the ISO definition of a currency - notably for digits (subunit) definitions. For example, the Colombian Peso has an official subunit of the pesavo. One hundred pesavos equals one peso. There are no notes/cash/coins for the centavo but it is an offical part of the currency and it's important to be maintained for financial transactions. -
Adds a
Mix
task to download the ISO currency data that is used during locale consolidation to include ISO currency digits (subunits) in the currency definition.
Bug Fixes
-
Don't crash if a Gettext backend is defined by it has no configuration for
:default_locale
. Closes #38. Thanks to @Schultzer. -
Fix incorrect boolean expression, replace with
&&
when determining ifGettext
is configured -
Create a "null" Cldr compiler so that on Elixir versions less than 1.6 we don't raise an exception if the compiler is configured.
Cldr version 1.4.0-rc.2
Enhancements
-
The primary focus on this release to automate the process of recompiling those parts of Cldr that are sensitive to configuration change. This release:
-
Adds a
compiler.cldr
as a Mix compiler. This provides the functions that identify a locale configuration change and then recompile the relevant modules of Cldr. Basically it looks in all dependencies for any module that calls functions inCldr.Config
Therefore it is expected to work for Cldr and any package that depends on Cldr. -
To enable this functionality, the
compiler.cldr
mix task needs to be added inmix.exs
as the last compiler in the list. For example
-
def project do
[
app: :app_name,
...
compilers: Mix.compilers ++ [:cldr],
start_permanent: Mix.env == :prod,
deps: deps()
]
end
-
With this enhancement it will be no longer necessary to force recompile Cldr or packages that depend on it since they will be compiled whenever a locale configuration change is detected.
-
Please note that the
:cldr
compiler is only available on Elixir version 1.6.0 and later since it depends onMix.Tasks.Xref.calls/0
. In the case of Elixir versions up to 1.5 a manualmix deps.compile ex_cldr --force
will be required if the locale configuration changes. -
The Jason json library is added to the dependency list as an optional dependency.
-
Adds
:iso_digits
to the currency data maintained in CLDR. Cldr currency data does not always align with the ISO definition of a currency - notably for digits (subunit) definitions. For example, the Colombian Peso has an official subunit of the pesavo. One hundred pesavos equals one peso. There are no notes/cash/coins for the centavo but it is an offical part of the currency and it's important to be maintained for financial transactions. -
Adds a
Mix
task to download the ISO currency data that is used during locale consolidation to include ISO currency digits (subunits) in the currency definition.
Bug Fixes
-
Don't crash if a Gettext backend is defined by it has no configuration for
:default_locale
. Closes #38. Thanks to @Schultzer. -
Fix incorrect boolean expression, replace with
&&
when determining ifGettext
is configured
Cldr version 1.4.0-rc.1
Changelog for Cldr v1.4.0
This is expected to be the final release candidate for Cldr version 1.4.0. It will be released as a final version by February 2nd if no further issues are found.
Enhancements
-
The primary focus on this release to automate the process of recompiling those parts of Cldr that are sensitive to configuration change. This release:
-
Adds a
compiler.cldr
as a Mix compiler. This provides the functions that identify a locale configuration change and then recompile the relevant modules of Cldr. Basically it looks in all dependencies for any module that calls functions inCldr.Config
Therefore it is expected to work for Cldr and any package that depends on Cldr. -
To enable this functionality, the
compiler.cldr
mix task needs to be added inmix.exs
as the last compiler in the list. For example
-
def project do
[
app: :app_name,
...
compilers: Mix.compilers ++ [:cldr],
start_permanent: Mix.env == :prod,
deps: deps()
]
end
-
With this enhancement it will be no longer necessary to force recompile Cldr or packages that depend on it since they will be compiled whenever a locale configuration change is detected.
-
The Jason json library is added to the dependency list as an optional dependency.
-
Adds
:iso_digits
to the currency data maintained in CLDR. Cldr currency data does not always align with the ISO definition of a currency - notable for digits (subunit) definitions. For example, the Colombian Peso has an official subunit of the pesavo. One hundred pesavos equals one peso. There are no notes/cash/coins for the centavo but it is an offical part of the currency and its important to be maintained for financial transactions. -
Adds a
Mix
task to download the ISO currency data that is used during locale consolidation to include ISO currency digits (subunits) in the currency definition.
Bug Fixes
- Don't crash if a Gettext backend is defined by it has no configuration for
:default_locale
. Closes #38. Thanks to @Schultzer.