Ember-intl: Main site not working on Safari/iPhone/iPad, needs polyfill?

Created on 3 May 2020  路  5Comments  路  Source: ember-intl/ember-intl

The website at https://ember-intl.github.io/ember-intl/versions/master/docs/quickstart isn't currently working on the latest Safari 13.1 on macOS, nor on the latest Mobile Safari on iPhone/iPad either.

The error is:

Unhandled Promise Rejection: Error: Intl.RelativeTimeFormat is not available in this environment.
  Try polyfilling it using "@formatjs/intl-relativetimeformat"

Should hopefully be an easy fix?

bug documentation

Most helpful comment

All 5 comments

Thanks for the heads up, deploy for the doc fix going out now.

Great, thanks!

Just a quick followup after reading https://ember-intl.github.io/ember-intl/versions/master/docs/runtime-requirements which appears to have come from https://formatjs.io/docs/react-intl

  1. The second line refers to "React Intl", but I think should say Ember?

  2. The bold line "We support IE11 & 2 most recent versions of Edge, Chrome & Firefox." could mention Safari given that it accounts for more US web traffic than these other browsers except for Chrome. (https://gs.statcounter.com/browser-market-share/all/united-states-of-america).

  3. yarn install is suggested to be used but has been deprecated, this should be yarn add instead.

  4. It appears to suggest (incorrectly) that Intl.RelativeTimeFormat is supported on Safari 13: "If you're supporting browsers that do not have Intl.RelativeTimeFormat (e.g IE11, Edge, Safari 12-) ...". Additionally, Edge supports Intl.RelativeTimeFormat since version 79 when it switched to Chromium.

Including relevant links to caniuse.com instead might be more useful here, i.e. say "If your app's target browsers don't support Intl.RelativeTimeFormat as shown on caniuse.com, then add this polyfill:". Thoughts?

Should we also add @formatjs/intl-pluralrules so that Safari 12 is supported?

  1. Yup, this was derived from the react-intl API (we share the same foundation and 5.0.0 was bringing the implementations closer together). I missed it in the copy/paste - will fix :)

  2. Definitely will fix that

  3. Good catch!

  4. I'll look into this and update react-intl docs as well

Should we also add @formatjs/intl-pluralrules so that Safari 12 is supported?

Seems reasonable and an easy fix, will add.

Was this page helpful?
0 / 5 - 0 ratings