changed
CHANGELOG.md
|
@@ -1,5 +1,15 @@
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+ ## Cldr v2.37.1
|
4
|
+
|
5
|
+ This is the changelog for Cldr v2.37.1 released on May 7th, 2023. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr/tags)
|
6
|
+
|
7
|
+ **Note that `ex_cldr` version 2.33.0 and later are supported on Elixir 1.11 and later only.**
|
8
|
+
|
9
|
+ ### Bug Fixes
|
10
|
+
|
11
|
+ * Don't include `:und` in the list returned by `Cldr.known_locale_names/1` since that function is commonly used to enumerate the configured locales and ultimately used to generate UI elements. `:und` is not a useful locale to select so its inclusion, which was added in `ex_cldr version 2.37.0` is inappropriate and now reverted.
|
12
|
+
|
3
13
|
## Cldr v2.37.0
|
4
14
|
|
5
15
|
This is the changelog for Cldr v2.37.0 released on April 28th, 2023. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr/tags)
|
changed
README.md
|
@@ -251,7 +251,7 @@ use Cldr,
|
251
251
|
|
252
252
|
* `:providers`: a list of modules that provide `Cldr` functionality to be compiled into the backend module. See the [providers](#providers) section below.
|
253
253
|
|
254
|
- * `:generate_docs` defines whether or not to generate documentation for the modules built as part of the backend. Since these modules represent the public API for `ex_cldr`, the default is `true`. Setting this key to `false` (the atom `false`, not a *falsy* value) which prevent the generation of docs for this backend.
|
254
|
+ * `:generate_docs` defines whether or not to generate documentation for the modules built as part of the backend. Since these modules represent the public API for `ex_cldr`, the default is `true`. Setting this key to `false` (the atom `false`, not a *falsy* value) will prevent the generation of docs for this backend.
|
255
255
|
|
256
256
|
* `:suppress_warnings` defines whether warnings are logged when a provider module is configured but not available. It also controls whether warnings are logged when a number format is compiled at runtime. Its purpose is to help identify those formats which might best be added to the `:precompile_number_formats` configuration. The default is `false`. Warning are not logged when set to `true`.
|
257
257
|
|
|
@@ -266,6 +266,8 @@ defmodule MyApp.Cldr do
|
266
266
|
end
|
267
267
|
```
|
268
268
|
|
269
|
+ * `:https_proxy` is the URL of a proxy host that will be used when downloading locales to be installed. When downloading, this configuration key has priority, followed by the environment variables `HTTPS_PROXY` and `https_proxy`. The default is `nil`.
|
270
|
+
|
269
271
|
### Providers
|
270
272
|
|
271
273
|
The data maintained by [CLDR](https://cldr.unicode.org) is quite large and not all capabilities are required by all applications. Hence `Cldr` has additional optional functionality that can be provided through additional `hex` packages. In order to support compile-time additions to a configured `backend`, any package can define a provider that will be called at compile time.
|
changed
hex_metadata.config
|
@@ -1,11 +1,11 @@
|
1
1
|
{<<"links">>,
|
2
2
|
[{<<"Changelog">>,
|
3
|
- <<"https://github.com/elixir-cldr/cldr/blob/v2.37.0/CHANGELOG.md">>},
|
3
|
+ <<"https://github.com/elixir-cldr/cldr/blob/v2.37.1/CHANGELOG.md">>},
|
4
4
|
{<<"GitHub">>,<<"https://github.com/elixir-cldr/cldr">>},
|
5
5
|
{<<"Readme">>,
|
6
|
- <<"https://github.com/elixir-cldr/cldr/blob/v2.37.0/README.md">>}]}.
|
6
|
+ <<"https://github.com/elixir-cldr/cldr/blob/v2.37.1/README.md">>}]}.
|
7
7
|
{<<"name">>,<<"ex_cldr">>}.
|
8
|
- {<<"version">>,<<"2.37.0">>}.
|
8
|
+ {<<"version">>,<<"2.37.1">>}.
|
9
9
|
{<<"description">>,
|
10
10
|
<<"Common Locale Data Repository (CLDR) functions for Elixir to localize and format numbers,\ndates, lists and units with support for over 600 locales for internationalized (i18n) and\nlocalized (L10N) applications.">>}.
|
11
11
|
{<<"elixir">>,<<"~> 1.11">>}.
|
changed
lib/cldr/backend/cldr_backend.ex
|
@@ -17,11 +17,7 @@ defmodule Cldr.Backend do
|
17
17
|
|
18
18
|
alias Cldr.{Locale, Config, LanguageTag}
|
19
19
|
|
20
|
- # We used to omit :und but the spec says thats the ultimate
|
21
|
- # fallback so its back!
|
22
|
-
|
23
|
- # @omit_locales [Config.root_locale_name()]
|
24
|
- @omit_locales []
|
20
|
+ @omit_locales [Config.root_locale_name()]
|
25
21
|
@known_locale_names Locale.Loader.known_locale_names(config) -- @omit_locales
|
26
22
|
|
27
23
|
def known_locale_names do
|
changed
lib/cldr/config/config.ex
|
@@ -28,7 +28,8 @@ defmodule Cldr.Config do
|
28
28
|
generate_docs: true,
|
29
29
|
suppress_warnings: false,
|
30
30
|
message_formats: %{},
|
31
|
- force_locale_download: false
|
31
|
+ force_locale_download: false,
|
32
|
+ https_proxy: nil
|
32
33
|
|
33
34
|
@type t :: %__MODULE__{
|
34
35
|
default_locale: String.t(),
|
|
@@ -47,7 +48,8 @@ defmodule Cldr.Config do
|
47
48
|
generate_docs: boolean(),
|
48
49
|
suppress_warnings: boolean(),
|
49
50
|
message_formats: map(),
|
50
|
- force_locale_download: boolean
|
51
|
+ force_locale_download: boolean,
|
52
|
+ https_proxy: String.t() | nil
|
51
53
|
}
|
52
54
|
|
53
55
|
@type number_system :: atom() | String.t()
|
|
@@ -2701,7 +2703,8 @@ defmodule Cldr.Config do
|
2701
2703
|
:default_backend,
|
2702
2704
|
:cacertfile,
|
2703
2705
|
:data_dir,
|
2704
|
- :force_locale_download
|
2706
|
+ :force_locale_download,
|
2707
|
+ :https_proxy
|
2705
2708
|
]
|
2706
2709
|
|
2707
2710
|
@doc false
|
changed
lib/cldr/config/rbnf_config.ex
|
@@ -75,7 +75,7 @@ defmodule Cldr.Rbnf.Config do
|
75
75
|
:ff, :fi, :fil, :fo, :fr, :"fr-BE", :"fr-CH", :ga, :he, :hi, :hr, :hu, :hy,
|
76
76
|
:id, :is, :it, :ja, :ka, :kk, :kl, :km, :ko, :ky, :lb, :lo, :lrc, :lt, :lv,
|
77
77
|
:mk, :ms, :mt, :my, :ne, :nl, :nn, :no, :pl, :pt, :"pt-PT", :qu, :ro, :ru, :se,
|
78
|
- :sk, :sl, :sq, :sr, :"sr-Latn", :su, :sv, :sw, :ta, :th, :tr, :uk, :und, :vec,
|
78
|
+ :sk, :sl, :sq, :sr, :"sr-Latn", :su, :sv, :sw, :ta, :th, :tr, :uk, :vec,
|
79
79
|
:vi, :yue, :"yue-Hans", :zh, :"zh-Hant"]
|
80
80
|
|
81
81
|
"""
|
changed
lib/cldr/locale.ex
|
@@ -445,7 +445,7 @@ defmodule Cldr.Locale do
|
445
445
|
end
|
446
446
|
|
447
447
|
defp known_locale(locale_name, _tags, backend) when is_atom(locale_name) do
|
448
|
- Enum.find(backend.known_locale_names(), &(locale_name == &1))
|
448
|
+ Enum.find(backend.known_locale_names() ++ [Cldr.Config.root_locale_name()], &(locale_name == &1))
|
449
449
|
end
|
450
450
|
|
451
451
|
defp known_rbnf_locale_name(locale_name, _tags, backend) do
|
|
@@ -1809,7 +1809,13 @@ defmodule Cldr.Locale do
|
1809
1809
|
%{language_tag | gettext_locale_name: gettext_locale_name}
|
1810
1810
|
end
|
1811
1811
|
|
1812
|
+ @root_locale_name Cldr.Config.root_locale_name()
|
1813
|
+
|
1812
1814
|
@spec cldr_locale_name(Cldr.LanguageTag.t()) :: locale_name() | nil
|
1815
|
+ defp cldr_locale_name(%LanguageTag{language: @root_locale_name}) do
|
1816
|
+ @root_locale_name
|
1817
|
+ end
|
1818
|
+
|
1813
1819
|
defp cldr_locale_name(%LanguageTag{} = language_tag) do
|
1814
1820
|
first_match(language_tag, &known_locale(&1, &2, language_tag.backend)) ||
|
1815
1821
|
Cldr.known_locale_name(language_tag.requested_locale_name, language_tag.backend)
|
changed
mix.exs
|
@@ -1,7 +1,7 @@
|
1
1
|
defmodule Cldr.Mixfile do
|
2
2
|
use Mix.Project
|
3
3
|
|
4
|
- @version "2.37.0"
|
4
|
+ @version "2.37.1"
|
5
5
|
|
6
6
|
def project do
|
7
7
|
[
|
unknown
priv/cldr/likely_subtags.json
CANNOT RENDER FILES LARGER THAN 1MB