You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compact decimal plural forms use the value before rounding #1429
Compact decimal plural selection uses the scaled value before rounding, even when the displayed value has no fractional digits. This gives the wrong unit form for ordinary inputs in Russian, Polish, Czech, and French.
The plural form should correspond to the displayed rounded value. As an independent comparison, Node's Intl.NumberFormat(locale, {notation: 'compact', compactDisplay: 'long', maximumFractionDigits: 0}) produces these expected outputs.
Reproducibility
Reproduced on master at 63c168e, Python 3.12.15 on macOS, with CLDR 48.2 generated using scripts/download_import_cldr.py.
Additional Information
_get_compact_format computes rounded, but passes abs(scaled) to locale.plural_form. The displayed result also drops optional fractional zeros: e.g. Russian 1010 with fraction_digits=1 displays 1, rather than 1.0, so those zeros should not affect plural selection.
This differs from #1301: no change of magnitude is needed to reproduce it. This report was investigated with Codex assistance; the examples above were executed locally.
Activity