[react-i18n] Pluralization should wait until the locales translations have loaded
See original GitHub issueOverview
Originally raised over Slack due to this support issue, I noticed that we load in en
translations before the selected locales translations:
When using pluralization, for specific count
values (the variable for this is PLURALIZATION_KEY_NAME
in the Quilt repo) we’ll receive back the fields “few” or “many”. Because we’ve yet to load in the locale-specific translations, we’ll default to the already loaded in en
translations. With pluralization the “few” and “many” keys (specific to cs
and pl
locales) won’t exist in en
causing the app to crash.

My proposal is to investigate how we can also fallback on the en
pluralization if that locales translations haven’t been loaded in yet. It looks like this can take place somewhere here.
Consuming repo
What repo were you working in when this issue occurred?
Area
- Add any relevant
Area: <area>
labels to this issue
Scope
-
Is this issue related to a specific package?
- Tag it with the
Package: <package_name>
label.
- Tag it with the
Checklist
- Please delete the labels section before submitting your issue
- I have described this issue in a way that is actionable (if possible)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
@movermeyer I can’t say I know much about that project or the changes that were needed for it, but I’m not working in web, I work on the Shopify Search & Discovery first-party app.
That project makes it sound like they did something specific to web, not something that fixes the root problem for @shopify/react-i18n.
@jas7457 My understanding (though I never tested it) was that this was fixed by Bring Locale Specific I18N Builds Over The Finish Line project