Skip to content

Commit 2dfe46a

Browse files
authored
Update to CLDR 48 data (#51)
1 parent 70f2baf commit 2dfe46a

7 files changed

Lines changed: 151 additions & 130 deletions

File tree

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
erlang 26.2.1
2-
elixir 1.16.0-otp-26
1+
erlang 28.1
2+
elixir 1.19.0-otp-28

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Cldr Territories v2.11.0 November 6th, 2025
4+
5+
### Enhancements
6+
7+
* Updated to [CLDR 48](https://cldr.unicode.org/downloads/cldr-48) data.
8+
39
## Cldr Territories v2.10.0 August 25, 2025
410

511
### Enhancements

lib/cldr/backend.ex

Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -659,47 +659,48 @@ defmodule Cldr.Territory.Backend do
659659
660660
iex> #{inspect __MODULE__}.info(:GB)
661661
{:ok,
662-
%{
663-
currency: [GBP: %{from: ~D[1694-07-27]}],
664-
gdp: 3700000000000,
665-
language_population: %{
666-
"ar" => %{population_percent: 0.3},
667-
"bn" => %{population_percent: 0.4},
668-
"cy" => %{official_status: "official_regional", population_percent: 1.3},
669-
"de" => %{population_percent: 9},
670-
"en" => %{official_status: "official", population_percent: 98},
671-
"es" => %{population_percent: 8},
672-
"fr" => %{population_percent: 17},
673-
"ga" => %{official_status: "official_regional", population_percent: 0.15},
674-
"gd" => %{
675-
official_status: "official_regional",
676-
population_percent: 0.11,
677-
writing_percent: 5
662+
%{
663+
currency: [GBP: %{from: ~D[1694-07-27]}],
664+
gdp: 3700000000000,
665+
language_population: %{
666+
"ar" => %{population_percent: 0.3},
667+
"bn" => %{population_percent: 0.4},
668+
"cy" => %{population_percent: 1.3, official_status: "official_regional"},
669+
"de" => %{population_percent: 9},
670+
"en" => %{population_percent: 98, official_status: "official"},
671+
"en-Shaw" => %{population_percent: 0},
672+
"es" => %{population_percent: 8},
673+
"fr" => %{population_percent: 17},
674+
"ga" => %{population_percent: 0.15, official_status: "official_regional"},
675+
"gd" => %{
676+
population_percent: 0.11,
677+
official_status: "official_regional",
678+
writing_percent: 5
679+
},
680+
"gu" => %{population_percent: 2.9},
681+
"it" => %{population_percent: 0.2},
682+
"kw" => %{population_percent: 0.0029},
683+
"lt" => %{population_percent: 0.2},
684+
"pa" => %{population_percent: 3.6},
685+
"pi" => %{population_percent: 0.0002},
686+
"pl" => %{population_percent: 4},
687+
"pt" => %{population_percent: 0.2},
688+
"ro" => %{population_percent: 0.8},
689+
"sco" => %{population_percent: 2.5, writing_percent: 5},
690+
"so" => %{population_percent: 0.2},
691+
"ta" => %{population_percent: 3.2},
692+
"tr" => %{population_percent: 0.2},
693+
"ur" => %{population_percent: 3.5},
694+
"zh-Hant" => %{population_percent: 0.3}
678695
},
679-
"gu" => %{population_percent: 2.9},
680-
"it" => %{population_percent: 0.2},
681-
"kw" => %{population_percent: 0.0029},
682-
"lt" => %{population_percent: 0.2},
683-
"pa" => %{population_percent: 3.6},
684-
"pl" => %{population_percent: 4},
685-
"pt" => %{population_percent: 0.2},
686-
"ro" => %{population_percent: 0.8},
687-
"sco" => %{population_percent: 2.5, writing_percent: 5},
688-
"so" => %{population_percent: 0.2},
689-
"ta" => %{population_percent: 3.2},
690-
"tr" => %{population_percent: 0.2},
691-
"ur" => %{population_percent: 3.5},
692-
"zh-Hant" => %{population_percent: 0.3},
693-
"en-Shaw" => %{population_percent: 0}
694-
},
695-
literacy_percent: 99,
696-
measurement_system: %{
697-
default: :uksystem,
698-
paper_size: :a4,
699-
temperature: :uksystem
700-
},
701-
population: 68459100
702-
}}
696+
literacy_percent: 99,
697+
measurement_system: %{
698+
default: :uksystem,
699+
paper_size: :a4,
700+
temperature: :uksystem
701+
},
702+
population: 68459100
703+
}}
703704
704705
"""
705706
@doc since: "2.0.0"
@@ -719,22 +720,24 @@ defmodule Cldr.Territory.Backend do
719720
language_population: %{
720721
"ar" => %{population_percent: 0.3},
721722
"bn" => %{population_percent: 0.4},
722-
"cy" => %{official_status: "official_regional", population_percent: 1.3},
723+
"cy" => %{population_percent: 1.3, official_status: "official_regional"},
723724
"de" => %{population_percent: 9},
724-
"en" => %{official_status: "official", population_percent: 98},
725+
"en" => %{population_percent: 98, official_status: "official"},
726+
"en-Shaw" => %{population_percent: 0},
725727
"es" => %{population_percent: 8},
726728
"fr" => %{population_percent: 17},
727-
"ga" => %{official_status: "official_regional", population_percent: 0.15},
729+
"ga" => %{population_percent: 0.15, official_status: "official_regional"},
728730
"gd" => %{
729-
official_status: "official_regional",
730731
population_percent: 0.11,
732+
official_status: "official_regional",
731733
writing_percent: 5
732734
},
733735
"gu" => %{population_percent: 2.9},
734736
"it" => %{population_percent: 0.2},
735737
"kw" => %{population_percent: 0.0029},
736738
"lt" => %{population_percent: 0.2},
737739
"pa" => %{population_percent: 3.6},
740+
"pi" => %{population_percent: 0.0002},
738741
"pl" => %{population_percent: 4},
739742
"pt" => %{population_percent: 0.2},
740743
"ro" => %{population_percent: 0.8},
@@ -743,8 +746,7 @@ defmodule Cldr.Territory.Backend do
743746
"ta" => %{population_percent: 3.2},
744747
"tr" => %{population_percent: 0.2},
745748
"ur" => %{population_percent: 3.5},
746-
"zh-Hant" => %{population_percent: 0.3},
747-
"en-Shaw" => %{population_percent: 0}
749+
"zh-Hant" => %{population_percent: 0.3}
748750
},
749751
literacy_percent: 99,
750752
measurement_system: %{

lib/cldr/territory.ex

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -622,28 +622,30 @@ defmodule Cldr.Territory do
622622
623623
iex> Cldr.Territory.info(:GB)
624624
{:ok,
625-
%{
626-
currency: [GBP: %{from: ~D[1694-07-27]}],
627-
gdp: 3700000000000,
628-
language_population: %{
625+
%{
626+
currency: [GBP: %{from: ~D[1694-07-27]}],
627+
gdp: 3700000000000,
628+
language_population: %{
629629
"ar" => %{population_percent: 0.3},
630630
"bn" => %{population_percent: 0.4},
631-
"cy" => %{official_status: "official_regional", population_percent: 1.3},
631+
"cy" => %{population_percent: 1.3, official_status: "official_regional"},
632632
"de" => %{population_percent: 9},
633-
"en" => %{official_status: "official", population_percent: 98},
633+
"en" => %{population_percent: 98, official_status: "official"},
634+
"en-Shaw" => %{population_percent: 0},
634635
"es" => %{population_percent: 8},
635636
"fr" => %{population_percent: 17},
636-
"ga" => %{official_status: "official_regional", population_percent: 0.15},
637+
"ga" => %{population_percent: 0.15, official_status: "official_regional"},
637638
"gd" => %{
638-
official_status: "official_regional",
639639
population_percent: 0.11,
640+
official_status: "official_regional",
640641
writing_percent: 5
641642
},
642643
"gu" => %{population_percent: 2.9},
643644
"it" => %{population_percent: 0.2},
644645
"kw" => %{population_percent: 0.0029},
645646
"lt" => %{population_percent: 0.2},
646647
"pa" => %{population_percent: 3.6},
648+
"pi" => %{population_percent: 0.0002},
647649
"pl" => %{population_percent: 4},
648650
"pt" => %{population_percent: 0.2},
649651
"ro" => %{population_percent: 0.8},
@@ -652,17 +654,16 @@ defmodule Cldr.Territory do
652654
"ta" => %{population_percent: 3.2},
653655
"tr" => %{population_percent: 0.2},
654656
"ur" => %{population_percent: 3.5},
655-
"zh-Hant" => %{population_percent: 0.3},
656-
"en-Shaw" => %{population_percent: 0}
657-
},
658-
literacy_percent: 99,
659-
measurement_system: %{
660-
default: :uksystem,
661-
paper_size: :a4,
662-
temperature: :uksystem
663-
},
664-
population: 68459100
665-
}}
657+
"zh-Hant" => %{population_percent: 0.3}
658+
},
659+
literacy_percent: 99,
660+
measurement_system: %{
661+
default: :uksystem,
662+
paper_size: :a4,
663+
temperature: :uksystem
664+
},
665+
population: 68459100
666+
}}
666667
667668
iex> Cldr.Territory.info(:"155")
668669
{:error,
@@ -694,22 +695,24 @@ defmodule Cldr.Territory do
694695
language_population: %{
695696
"ar" => %{population_percent: 0.3},
696697
"bn" => %{population_percent: 0.4},
697-
"cy" => %{official_status: "official_regional", population_percent: 1.3},
698+
"cy" => %{population_percent: 1.3, official_status: "official_regional"},
698699
"de" => %{population_percent: 9},
699-
"en" => %{official_status: "official", population_percent: 98},
700+
"en" => %{population_percent: 98, official_status: "official"},
701+
"en-Shaw" => %{population_percent: 0},
700702
"es" => %{population_percent: 8},
701703
"fr" => %{population_percent: 17},
702-
"ga" => %{official_status: "official_regional", population_percent: 0.15},
704+
"ga" => %{population_percent: 0.15, official_status: "official_regional"},
703705
"gd" => %{
704-
official_status: "official_regional",
705706
population_percent: 0.11,
707+
official_status: "official_regional",
706708
writing_percent: 5
707709
},
708710
"gu" => %{population_percent: 2.9},
709711
"it" => %{population_percent: 0.2},
710712
"kw" => %{population_percent: 0.0029},
711713
"lt" => %{population_percent: 0.2},
712714
"pa" => %{population_percent: 3.6},
715+
"pi" => %{population_percent: 0.0002},
713716
"pl" => %{population_percent: 4},
714717
"pt" => %{population_percent: 0.2},
715718
"ro" => %{population_percent: 0.8},
@@ -718,8 +721,7 @@ defmodule Cldr.Territory do
718721
"ta" => %{population_percent: 3.2},
719722
"tr" => %{population_percent: 0.2},
720723
"ur" => %{population_percent: 3.5},
721-
"zh-Hant" => %{population_percent: 0.3},
722-
"en-Shaw" => %{population_percent: 0}
724+
"zh-Hant" => %{population_percent: 0.3}
723725
},
724726
literacy_percent: 99,
725727
measurement_system: %{
@@ -788,7 +790,15 @@ defmodule Cldr.Territory do
788790
defp flag_exists?(territory_code) do
789791
:"001"
790792
|> children!()
791-
|> Enum.flat_map(fn c -> Enum.flat_map(children!(c), &children!/1) end)
793+
|> Enum.flat_map(fn c ->
794+
Enum.flat_map(children!(c), fn territory ->
795+
case children(territory) do
796+
{:ok, child} -> child
797+
_other -> []
798+
end
799+
end)
800+
end)
801+
|> List.flatten()
792802
|> Enum.concat([:EU, :UN])
793803
|> Enum.member?(territory_code)
794804
end

mix.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule Cldr.Territories.Mixfile do
22
use Mix.Project
33

4-
@version "2.10.0"
4+
@version "2.11.0"
55

66
def project do
77
[
@@ -50,7 +50,7 @@ defmodule Cldr.Territories.Mixfile do
5050
if path = System.get_env("CLDR_PATH") do
5151
[path: path]
5252
else
53-
"~> 2.42"
53+
"~> 2.44"
5454
end
5555
end
5656

mix.lock

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
%{
22
"abnf2": {:hex, :abnf2, "0.1.2", "6f8792b8ac3288dba5fc889c2bceae9fe78f74e1a7b36bea9726ffaa9d7bef95", [:mix], [], "hexpm"},
3-
"cldr_utils": {:hex, :cldr_utils, "2.28.3", "d0ac5ed25913349dfaca8b7fe14722d588d8ccfa3e335b0510c7cc3f3c54d4e6", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "40083cd9a5d187f12d675cfeeb39285f0d43e7b7f2143765161b72205d57ffb5"},
3+
"cldr": {:git, "https://github.com/elixir-cldr/cldr48.git", "8de4b8e6ab9ca753c33d00a11f0104299183f19c", []},
4+
"cldr_utils": {:hex, :cldr_utils, "2.29.1", "11ff0a50a36a7e5f3bd9fc2fb8486a4c1bcca3081d9c080bf9e48fe0e6742e2d", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "3844a0a0ed7f42e6590ddd8bd37eb4b1556b112898f67dea3ba068c29aabd6c2"},
45
"decimal": {:hex, :decimal, "2.3.0", "3ad6255aa77b4a3c4f818171b12d237500e63525c2fd056699967a3e7ea20f62", [:mix], [], "hexpm", "a4d66355cb29cb47c3cf30e71329e58361cfcb37c34235ef3bf1d7bf3773aeac"},
5-
"dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"},
6+
"dialyxir": {:hex, :dialyxir, "1.4.6", "7cca478334bf8307e968664343cbdb432ee95b4b68a9cba95bdabb0ad5bdfd9a", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "8cf5615c5cd4c2da6c501faae642839c8405b49f8aa057ad4ae401cb808ef64d"},
67
"earmark": {:hex, :earmark, "1.4.5", "62ffd3bd7722fb7a7b1ecd2419ea0b458c356e7168c1f5d65caf09b4fbdd13c8", [:mix], [], "hexpm", "b7d0e6263d83dc27141a523467799a685965bf8b13b6743413f19a7079843f4f"},
7-
"earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"},
8-
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
9-
"ex_cldr": {:hex, :ex_cldr, "2.42.0", "17ea930e88b8802b330e1c1e288cdbaba52cbfafcccf371ed34b299a47101ffb", [:mix], [{:cldr_utils, "~> 2.28", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.19", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: true]}], "hexpm", "07264a7225810ecae6bdd6715d8800c037a1248dc0063923cddc4ca3c4888df6"},
10-
"ex_doc": {:hex, :ex_doc, "0.32.1", "21e40f939515373bcdc9cffe65f3b3543f05015ac6c3d01d991874129d173420", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "5142c9db521f106d61ff33250f779807ed2a88620e472ac95dc7d59c380113da"},
8+
"earmark_parser": {:hex, :earmark_parser, "1.4.44", "f20830dd6b5c77afe2b063777ddbbff09f9759396500cdbe7523efd58d7a339c", [:mix], [], "hexpm", "4778ac752b4701a5599215f7030989c989ffdc4f6df457c5f36938cc2d2a2750"},
9+
"erlex": {:hex, :erlex, "0.2.8", "cd8116f20f3c0afe376d1e8d1f0ae2452337729f68be016ea544a72f767d9c12", [:mix], [], "hexpm", "9d66ff9fedf69e49dc3fd12831e12a8a37b76f8651dd21cd45fcf5561a8a7590"},
10+
"ex_cldr": {:git, "https://github.com/elixir-cldr/cldr48.git", "8de4b8e6ab9ca753c33d00a11f0104299183f19c", []},
11+
"ex_doc": {:hex, :ex_doc, "0.39.1", "e19d356a1ba1e8f8cfc79ce1c3f83884b6abfcb79329d435d4bbb3e97ccc286e", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "8abf0ed3e3ca87c0847dfc4168ceab5bedfe881692f1b7c45f4a11b232806865"},
1112
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
12-
"makeup": {:hex, :makeup, "1.1.1", "fa0bc768698053b2b3869fa8a62616501ff9d11a562f3ce39580d60860c3a55e", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "5dc62fbdd0de44de194898b6710692490be74baa02d9d108bc29f007783b0b48"},
13-
"makeup_elixir": {:hex, :makeup_elixir, "0.16.2", "627e84b8e8bf22e60a2579dad15067c755531fea049ae26ef1020cad58fe9578", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "41193978704763f6bbe6cc2758b84909e62984c7752b3784bd3c218bb341706b"},
14-
"makeup_erlang": {:hex, :makeup_erlang, "0.1.5", "e0ff5a7c708dda34311f7522a8758e23bfcd7d8d8068dc312b5eb41c6fd76eba", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "94d2e986428585a21516d7d7149781480013c56e30c6a233534bedf38867a59a"},
13+
"makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"},
14+
"makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"},
15+
"makeup_erlang": {:hex, :makeup_erlang, "1.0.2", "03e1804074b3aa64d5fad7aa64601ed0fb395337b982d9bcf04029d68d51b6a7", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "af33ff7ef368d5893e4a267933e7744e46ce3cf1f61e2dccf53a111ed3aa3727"},
1516
"nimble_parsec": {:hex, :nimble_parsec, "1.4.2", "8efba0122db06df95bfaa78f791344a89352ba04baedd3849593bfce4d0dc1c6", [:mix], [], "hexpm", "4b21398942dda052b403bbe1da991ccd03a053668d147d53fb8c4e0efe09c973"},
1617
"poison": {:hex, :poison, "4.0.1", "bcb755a16fac91cad79bfe9fc3585bb07b9331e50cfe3420a24bcc2d735709ae", [:mix], [], "hexpm"},
1718
}

0 commit comments

Comments
 (0)