Commit graph

4 commits

Author SHA1 Message Date
picklesrus
41f7fcd68d Update relative-time-polyfill.js 2021-02-16 14:07:26 -05:00
picklesrus
14db1428f1 Update relative-time-polyfill.js 2021-02-16 14:06:10 -05:00
picklesrus
91c256ad75 Fix pluralrules polyfill
This should hopefully fix the Safari 12 issues we were having.
2021-02-16 14:06:02 -05:00
Chris Garrity
ae2bc24ffd Add @formatjs/relativetimeformat-polyfill
Safari < 14 does not support Intl.RelativeTimeFormat which is used in the moderation messaging. Adding this polyfill to support it. RelativeTimeFormat depends on Locale, which is also not available in Safari <14, and PluralRules, not available in Safari < 13.

There is a trade off between adding locale-data for all users that load the page regardless of what browser they’re using and whether they get muted, and only localizing the most common languages.
In the last 30 days only ~3% of users on scratch use a version of Safari (13.x) that doesn’t support Intl. Of that 3%, these 7 locales would cover over 60% of the users. English will be used by default if the locale data is not available.
2021-02-02 09:07:38 -05:00