Skip to content

Commit

Permalink
Merge pull request #8330 from Sesquipedalian/3.0/unicode_update
Browse files Browse the repository at this point in the history
Adds some updates from CLDR data
  • Loading branch information
Sesquipedalian authored Oct 24, 2024
2 parents 40db891 + 0600774 commit 12d051e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/Unicode/Currencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,10 @@ function currencies(): array
'digits' => 2,
'rounding' => 0,
],
'ZWG' => [
'digits' => 2,
'rounding' => 0,
],
];
}

Expand Down Expand Up @@ -1469,6 +1473,7 @@ function country_currencies(): array
],
'ZW' => [
'USD',
'ZWG',
],
];
}
Expand Down
18 changes: 18 additions & 0 deletions Sources/Unicode/Plurals.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ function plurals(): array
'other' => fn ($n, $i, $v, $w, $f, $t, $c) => true,
],
],
'csw' => [
'cardinal' => [
'one' => fn ($n, $i, $v, $w, $f, $t, $c) => in_array($n, [0,1]),
'other' => fn ($n, $i, $v, $w, $f, $t, $c) => true,
],
],
'cy' => [
'cardinal' => [
'zero' => fn ($n, $i, $v, $w, $f, $t, $c) => $n == 0,
Expand Down Expand Up @@ -906,6 +912,17 @@ function plurals(): array
'other' => fn ($n, $i, $v, $w, $f, $t, $c) => true,
],
],
'lld' => [
'cardinal' => [
'one' => fn ($n, $i, $v, $w, $f, $t, $c) => $i == 1 && $v == 0,
'many' => fn ($n, $i, $v, $w, $f, $t, $c) => $c == 0 && $i != 0 && $i % 1000000 == 0 && $v == 0 or !in_array($c, [0,1,2,3,4,5]),
'other' => fn ($n, $i, $v, $w, $f, $t, $c) => true,
],
'ordinal' => [
'many' => fn ($n, $i, $v, $w, $f, $t, $c) => in_array($n, [11,8,80,800]),
'other' => fn ($n, $i, $v, $w, $f, $t, $c) => true,
],
],
'ln' => [
'cardinal' => [
'one' => fn ($n, $i, $v, $w, $f, $t, $c) => in_array($n, [0,1]),
Expand Down Expand Up @@ -1305,6 +1322,7 @@ function plurals(): array
'scn' => [
'cardinal' => [
'one' => fn ($n, $i, $v, $w, $f, $t, $c) => $i == 1 && $v == 0,
'many' => fn ($n, $i, $v, $w, $f, $t, $c) => $c == 0 && $i != 0 && $i % 1000000 == 0 && $v == 0 or !in_array($c, [0,1,2,3,4,5]),
'other' => fn ($n, $i, $v, $w, $f, $t, $c) => true,
],
'ordinal' => [
Expand Down

0 comments on commit 12d051e

Please sign in to comment.