Skip to content

[Due for payment 2026-08-19] [Intl] Native Intl polyfills only load en/es locale data — pluralization wrong for non-en/es locales (e.g. Polish) #96335

Description

@MelvinBot

Problem

On native (iOS/Android), the Intl polyfills only load locale data for en and es, but the app supports 9 beta locales (de, el, fr, it, ja, nl, pl, pt-BR, zh-hans). This gap affects every locale other than English and Spanish — it is not specific to Greek. Greek just surfaced it during review of Expensify/App#95655.

The hardcoded en/es data loads:

Pluralization is exercised at src/libs/Localize/index.ts:81 via new Intl.PluralRules(language).

Actual impact (narrower than a crash)

@formatjs/intl-pluralrules polyfill-force does not throw on a missing locale — its ResolveLocale falls back to the default locale, which is the first one loaded (en). So:

  • No runtime crash. Non-en/es locales silently use English plural categorization.
  • Locales whose CLDR plural categories match English's one/other are effectively unaffected: de, el (Greek is one/other), fr, it, nl, pt-BR, and ja/zh-hans (other only).
  • The locale actually mis-served today is Polish (pl), which has one / few / many / other. With English rules it can only ever resolve to one/other, so few/many plural forms in pl.ts are never selected → wrong grammatical number on native. Any future locale with non-English plural categories (e.g. Russian, Arabic, Czech) would hit the same problem.
  • NumberFormat: the polyfill is only forced on devices with stale ICU / no formatToParts (polyfillNumberFormat.ts:26); on modern devices native Intl.NumberFormat is used with full locale support. So this only bites older devices, and again only for non-en/es locales.

Suggested fix

Load the pluralrules (and numberformat) locale data for the active locale dynamically, the same way IntlStore already wires up translations, date-fns, and Intl.ListFormat data per locale — rather than hardcoding en/es. This keeps bundle size down (only load the selected locale's data) and closes the gap for all beta locales at once.


Filed at the request of roryabraham from the review thread on Expensify/App#95655.

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. roryabraham commented on Jul 30, 2026

    @roryabraham
    Contributor

    @shubham1206agra do you want to work on this?

  2. shubham1206agra commented on Jul 30, 2026

    @shubham1206agra
    Contributor

    Yes

  3. roryabraham commented on Jul 30, 2026

    @roryabraham
    Contributor

    Great! Thanks @shubham1206agra!

  4. roryabraham commented on Aug 11, 2026

    @roryabraham
    Contributor

    PR deployed to staging

  5. changed the title [-]Native Intl polyfills only load en/es locale data — pluralization wrong for non-en/es locales (e.g. Polish)[/-] [+][Intl] Native Intl polyfills only load en/es locale data — pluralization wrong for non-en/es locales (e.g. Polish)[/+] on Aug 12, 2026
  6. 1 remaining item

  7. changed the title [-][Intl] Native Intl polyfills only load en/es locale data — pluralization wrong for non-en/es locales (e.g. Polish)[/-] [+][Due for payment 2026-08-19] [Intl] Native Intl polyfills only load en/es locale data — pluralization wrong for non-en/es locales (e.g. Polish)[/+] on Aug 12, 2026
  8. melvin-bot commented on Aug 12, 2026

    @melvin-bot

    @shubham1206agra

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.52-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-08-19. 🎊

  9. shubham1206agra commented on Aug 15, 2026

    @shubham1206agra
    Contributor

    Waiting for payment now

  10. melvin-bot commented on Aug 18, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  11. melvin-bot commented on Aug 18, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
  12. mallenexpensify commented on Aug 20, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @shubham1206agra due $250 via NewDot

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions