Skip to content

Commit

Permalink
Merge pull request #44 from php-gettext/cldr-40
Browse files Browse the repository at this point in the history
Update CLDR data from 39 to 40
  • Loading branch information
mlocati authored Nov 11, 2021
2 parents 4ad818b + 30572d8 commit ee0001d
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 32 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ jobs:
- "7.2"
- "7.3"
- "7.4"
- '8.0'
- "8.0"
- "8.1"
include:
- os: windows-latest
php-version: "5.5"
Expand Down
1 change: 1 addition & 0 deletions src/CldrData.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ private static function getData($key)
);
$knownMissingLanguages = array(
'guw' => 'Gun',
'hnj' => 'Mong Njua',
'nah' => 'Nahuatl',
'smi' => 'Sami',
);
Expand Down
10 changes: 8 additions & 2 deletions src/cldr-data/main/en-US/languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"en-US": {
"identity": {
"version": {
"_cldrVersion": "39"
"_cldrVersion": "40"
},
"language": "en",
"territory": "US"
Expand Down Expand Up @@ -371,7 +371,7 @@
"mgh": "Makhuwa-Meetto",
"mgo": "Metaʼ",
"mh": "Marshallese",
"mi": "Maori",
"mi": "Māori",
"mic": "Mi'kmaq",
"min": "Minangkabau",
"mk": "Macedonian",
Expand Down Expand Up @@ -469,6 +469,7 @@
"rap": "Rapanui",
"rar": "Rarotongan",
"rgn": "Romagnol",
"rhg": "Rohingya",
"rif": "Riffian",
"rm": "Romansh",
"rn": "Rundi",
Expand Down Expand Up @@ -500,6 +501,7 @@
"sdc": "Sassarese Sardinian",
"sdh": "Southern Kurdish",
"se": "Northern Sami",
"se-alt-menu": "Sami, Northern",
"see": "Seneca",
"seh": "Sena",
"sei": "Seri",
Expand All @@ -520,9 +522,13 @@
"sly": "Selayar",
"sm": "Samoan",
"sma": "Southern Sami",
"sma-alt-menu": "Sami, Southern",
"smj": "Lule Sami",
"smj-alt-menu": "Sami, Lule",
"smn": "Inari Sami",
"smn-alt-menu": "Sami, Inari",
"sms": "Skolt Sami",
"sms-alt-menu": "Sami, Skolt",
"sn": "Shona",
"snk": "Soninke",
"so": "Somali",
Expand Down
10 changes: 8 additions & 2 deletions src/cldr-data/main/en-US/scripts.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"en-US": {
"identity": {
"version": {
"_cldrVersion": "39"
"_cldrVersion": "40"
},
"language": "en",
"territory": "US"
Expand Down Expand Up @@ -41,6 +41,7 @@
"Chrs": "Chorasmian",
"Cirt": "Cirth",
"Copt": "Coptic",
"Cpmn": "Cypro-Minoan",
"Cprt": "Cypriot",
"Cyrl": "Cyrillic",
"Cyrs": "Old Church Slavonic Cyrillic",
Expand Down Expand Up @@ -141,6 +142,7 @@
"Orya": "Odia",
"Osge": "Osage",
"Osma": "Osmanya",
"Ougr": "Old Uyghur",
"Palm": "Palmyrene",
"Pauc": "Pau Cin Hau",
"Perm": "Old Permic",
Expand All @@ -153,7 +155,8 @@
"Prti": "Inscriptional Parthian",
"Qaag": "Zawgyi",
"Rjng": "Rejang",
"Rohg": "Hanifi Rohingya",
"Rohg": "Hanifi",
"Rohg-alt-stand-alone": "Hanifi Rohingya",
"Roro": "Rongorongo",
"Runr": "Runic",
"Samr": "Samaritan",
Expand Down Expand Up @@ -191,9 +194,12 @@
"Thai": "Thai",
"Tibt": "Tibetan",
"Tirh": "Tirhuta",
"Tnsa": "Tangsa",
"Toto": "Toto",
"Ugar": "Ugaritic",
"Vaii": "Vai",
"Visp": "Visible Speech",
"Vith": "Vithkuqi",
"Wara": "Varang Kshiti",
"Wcho": "Wancho",
"Wole": "Woleai",
Expand Down
2 changes: 1 addition & 1 deletion src/cldr-data/main/en-US/territories.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"en-US": {
"identity": {
"version": {
"_cldrVersion": "39"
"_cldrVersion": "40"
},
"language": "en",
"territory": "US"
Expand Down
45 changes: 23 additions & 22 deletions src/cldr-data/supplemental/plurals.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"supplemental": {
"version": {
"_unicodeVersion": "13.0.0",
"_cldrVersion": "39"
"_unicodeVersion": "14.0.0",
"_cldrVersion": "40"
},
"plurals-type-cardinal": {
"af": {
Expand Down Expand Up @@ -53,6 +53,10 @@
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"bal": {
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"be": {
"pluralRule-count-one": "n % 10 = 1 and n % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 1.0, 21.0, 31.0, 41.0, 51.0, 61.0, 71.0, 81.0, 101.0, 1001.0, …",
"pluralRule-count-few": "n % 10 = 2..4 and n % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, … @decimal 2.0, 3.0, 4.0, 22.0, 23.0, 24.0, 32.0, 33.0, 102.0, 1002.0, …",
Expand Down Expand Up @@ -182,7 +186,8 @@
},
"es": {
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
"pluralRule-count-many": "e = 0 and i != 0 and i % 1000000 = 0 and v = 0 or e != 0..5 @integer 1000000, 1c6, 2c6, 3c6, 4c6, 5c6, 6c6, … @decimal 1.0000001c6, 1.1c6, 2.0000001c6, 2.1c6, 3.0000001c6, 3.1c6, …",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1c3, 2c3, 3c3, 4c3, 5c3, 6c3, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, 1.0001c3, 1.1c3, 2.0001c3, 2.1c3, 3.0001c3, 3.1c3, …"
},
"et": {
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
Expand Down Expand Up @@ -279,6 +284,9 @@
"pluralRule-count-one": "i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04",
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"hnj": {
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"hr": {
"pluralRule-count-one": "v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …",
"pluralRule-count-few": "v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, … @decimal 0.2~0.4, 1.2~1.4, 2.2~2.4, 3.2~3.4, 4.2~4.4, 5.2, 10.2, 100.2, 1000.2, …",
Expand Down Expand Up @@ -311,9 +319,6 @@
"ii": {
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"in": {
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"io": {
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
Expand All @@ -324,19 +329,14 @@
},
"it": {
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
"pluralRule-count-many": "e = 0 and i != 0 and i % 1000000 = 0 and v = 0 or e != 0..5 @integer 1000000, 1c6, 2c6, 3c6, 4c6, 5c6, 6c6, … @decimal 1.0000001c6, 1.1c6, 2.0000001c6, 2.1c6, 3.0000001c6, 3.1c6, …",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1c3, 2c3, 3c3, 4c3, 5c3, 6c3, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, 1.0001c3, 1.1c3, 2.0001c3, 2.1c3, 3.0001c3, 3.1c3, …"
},
"iu": {
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
"pluralRule-count-two": "n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000",
"pluralRule-count-other": " @integer 0, 3~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"iw": {
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
"pluralRule-count-two": "i = 2 and v = 0 @integer 2",
"pluralRule-count-many": "v = 0 and n != 0..10 and n % 10 = 0 @integer 20, 30, 40, 50, 60, 70, 80, 90, 100, 1000, 10000, 100000, 1000000, …",
"pluralRule-count-other": " @integer 0, 3~17, 101, 1001, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"ja": {
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
Expand All @@ -347,10 +347,6 @@
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"ji": {
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"jmc": {
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
Expand Down Expand Up @@ -617,11 +613,13 @@
},
"pt": {
"pluralRule-count-one": "i = 0..1 @integer 0, 1 @decimal 0.0~1.5",
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 2.0~3.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
"pluralRule-count-many": "e = 0 and i != 0 and i % 1000000 = 0 and v = 0 or e != 0..5 @integer 1000000, 1c6, 2c6, 3c6, 4c6, 5c6, 6c6, … @decimal 1.0000001c6, 1.1c6, 2.0000001c6, 2.1c6, 3.0000001c6, 3.1c6, …",
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1c3, 2c3, 3c3, 4c3, 5c3, 6c3, … @decimal 2.0~3.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, 1.0001c3, 1.1c3, 2.0001c3, 2.1c3, 3.0001c3, 3.1c3, …"
},
"pt-PT": {
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
"pluralRule-count-many": "e = 0 and i != 0 and i % 1000000 = 0 and v = 0 or e != 0..5 @integer 1000000, 1c6, 2c6, 3c6, 4c6, 5c6, 6c6, … @decimal 1.0000001c6, 1.1c6, 2.0000001c6, 2.1c6, 3.0000001c6, 3.1c6, …",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1c3, 2c3, 3c3, 4c3, 5c3, 6c3, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, 1.0001c3, 1.1c3, 2.0001c3, 2.1c3, 3.0001c3, 3.1c3, …"
},
"rm": {
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
Expand All @@ -636,9 +634,6 @@
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"root": {
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"ru": {
"pluralRule-count-one": "v = 0 and i % 10 = 1 and i % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
"pluralRule-count-few": "v = 0 and i % 10 = 2..4 and i % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …",
Expand Down Expand Up @@ -825,6 +820,9 @@
"to": {
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"tpi": {
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"tr": {
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
Expand All @@ -847,6 +845,9 @@
"pluralRule-count-many": "v = 0 and i % 10 = 0 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 11..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …",
"pluralRule-count-other": " @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"und": {
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
},
"ur": {
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
Expand Down
8 changes: 4 additions & 4 deletions tests/test/GetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@ public function testPortuguese()
{
$pt = Language::getById('pt');
$this->assertSame('Portuguese', $pt->name);
$this->assertCount(2, $pt->categories);
$this->assertCount(3, $pt->categories);
$this->assertSame('one', $pt->categories[0]->id);

$ptPT = Language::getById('pt-PT');
$this->assertSame('European Portuguese', $ptPT->name);
$this->assertCount(2, $ptPT->categories);
$this->assertCount(3, $ptPT->categories);
$this->assertSame('one', $ptPT->categories[0]->id);

$ptBR = Language::getById('pt-BR');
$this->assertSame('Brazilian Portuguese', $ptBR->name);
$this->assertCount(2, $ptBR->categories);
$this->assertCount(3, $ptBR->categories);
$this->assertSame('one', $ptBR->categories[0]->id);

$ptCV = Language::getById('pt-CV');
$this->assertSame('Portuguese (Cape Verde)', $ptCV->name);
$this->assertCount(2, $ptCV->categories);
$this->assertCount(3, $ptCV->categories);
$this->assertSame('one', $ptCV->categories[0]->id);

$this->assertSame($pt->formula, $ptBR->formula);
Expand Down

0 comments on commit ee0001d

Please sign in to comment.