Skip to content

Update messages' plural rules from CLDR data - #1303

Merged
akx merged 2 commits into
masterfrom
prules2
Jul 30, 2026
Merged

Update messages' plural rules from CLDR data#1303
akx merged 2 commits into
masterfrom
prules2

Conversation

@akx

@akx akx commented Jul 30, 2026

Copy link
Copy Markdown
Member

Our _GettextCompiler emits suboptimal expressions, and the fix to generate more optimal ones isn't completely trivial, so this uses the ones generated by https://github.com/php-gettext/Languages instead.

Fixes #495
Fixes #711
Fixes #816
Fixes #817
Closes #1289 (duplicate; this one has more thorough coverage)
Closes #768 (duplicate; this one has more thorough coverage)

@codspeed-hq

codspeed-hq Bot commented Jul 30, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 88 untouched benchmarks


Comparing prules2 (a70e5df) with master (dd3c275)

Open in CodSpeed

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.12%. Comparing base (dd3c275) to head (a70e5df).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1303   +/-   ##
=======================================
  Coverage   92.12%   92.12%           
=======================================
  Files          27       27           
  Lines        4737     4737           
=======================================
  Hits         4364     4364           
  Misses        373      373           
Flag Coverage Δ
macos-14-3.10 91.17% <ø> (ø)
macos-14-3.11 91.11% <ø> (ø)
macos-14-3.12 91.32% <ø> (ø)
macos-14-3.13 91.32% <ø> (ø)
macos-14-3.14 91.30% <ø> (ø)
macos-14-3.15 91.30% <ø> (ø)
macos-14-3.8 91.04% <ø> (ø)
macos-14-3.9 91.10% <ø> (ø)
macos-14-pypy3.10 91.17% <ø> (ø)
ubuntu-24.04-3.10 91.19% <ø> (ø)
ubuntu-24.04-3.11 91.13% <ø> (ø)
ubuntu-24.04-3.12 91.34% <ø> (ø)
ubuntu-24.04-3.13 91.34% <ø> (ø)
ubuntu-24.04-3.14 91.32% <ø> (ø)
ubuntu-24.04-3.15 91.32% <ø> (ø)
ubuntu-24.04-3.8 91.06% <ø> (ø)
ubuntu-24.04-3.9 91.12% <ø> (ø)
ubuntu-24.04-pypy3.10 91.19% <ø> (ø)
windows-2022-3.10 91.18% <ø> (ø)
windows-2022-3.11 91.12% <ø> (ø)
windows-2022-3.12 91.33% <ø> (ø)
windows-2022-3.13 91.33% <ø> (ø)
windows-2022-3.14 91.31% <ø> (ø)
windows-2022-3.15 91.31% <ø> (ø)
windows-2022-3.8 91.16% <ø> (ø)
windows-2022-3.9 91.11% <ø> (ø)
windows-2022-pypy3.10 91.18% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@akx
akx merged commit 80f1e49 into master Jul 30, 2026
41 checks passed
@akx akx added this to the Babel 2.19 milestone Jul 30, 2026
"Language: ja_JP\n"
"Language-Team: ja_JP <LL@li.org>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

@jun66j5 jun66j5 Jul 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why nplurals of Japanese is changed to 2? I believe that is 1.
Also, the "plurals" for Japanese is 1 in source data from php-gettext.

See

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid Hungarian plural form Inconsistent plural form for Arabic Russian has incorrect plural rules Wrong num_plurals in Catalog

2 participants