Page MenuHomePhabricator

CLDRPluralRuleParser lacks support for c and e operands
Closed, ResolvedPublic

Description

CLDR 38 introduced the c (with a synonym e) operand for compact decimal formatting. These operands are now actively used in the base plural rules for fr and pt.

CLDRPluralRuleParser only recognizes the legacy operands (n, i, v, w, f, t). When evaluating the new rules, the parser throws an unrecognised word error.

Encountered this while working on T384157: Update plural rules to CLDR version 48

Event Timeline

Change #1282046 had a related patch set uploaded (by NMW03; author: NMW03):

[CLDRPluralRuleParser@master] Add c and e operands

https://gerrit.wikimedia.org/r/1282046

Nemoralis renamed this task from CLDRPluralRuleParser lacks support for e and c operands to CLDRPluralRuleParser lacks support for c and e operands.May 3 2026, 10:29 PM
Nemoralis updated the task description. (Show Details)

Change #1282046 merged by jenkins-bot:

[CLDRPluralRuleParser@master] Add c and e operands

https://gerrit.wikimedia.org/r/1282046

@Reedy when is the next release for this?

When it's needed/wanted.

It's not exactly a particularly active library, and it looks like your change is the first that actually changes the behaviour of the library in ~6 months. Sure, the declare( strict_types = 1 ); may have some impact...

https://github.com/wikimedia/CLDRPluralRuleParser/compare/v3.0.0...master

I suspect this can be tagged as 3.0.1 and trivially enough intergrated into MW Core

When it's needed/wanted

It is needed for T384157

Change #1304685 had a related patch set uploaded (by NMW03; author: NMW03):

[CLDRPluralRuleParser@master] Add evaluations and test cases for c and e operands

https://gerrit.wikimedia.org/r/1304685

@Reedy pinging you also here in case you didn't saw my message on Telegram, so we don't miss this week's deployment. We need another release of CLDRPluralRuleParser

The patch needs reviewing and merging first.

Change #1304685 merged by jenkins-bot:

[CLDRPluralRuleParser@master] Add evaluations and test cases for c and e operands

https://gerrit.wikimedia.org/r/1304685

Change #1311076 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/vendor@master] Upgrading wikimedia/cldr-plural-rule-parser (v3.0.1 => v3.0.2)

https://gerrit.wikimedia.org/r/1311076

Change #1311077 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/core@master] Upgrading wikimedia/cldr-plural-rule-parser (v3.0.1 => v3.0.2)

https://gerrit.wikimedia.org/r/1311077

Change #1311076 merged by jenkins-bot:

[mediawiki/vendor@master] Upgrading wikimedia/cldr-plural-rule-parser (v3.0.1 => v3.0.2)

https://gerrit.wikimedia.org/r/1311076

Change #1311077 merged by jenkins-bot:

[mediawiki/core@master] Upgrading wikimedia/cldr-plural-rule-parser (v3.0.1 => v3.0.2)

https://gerrit.wikimedia.org/r/1311077