Open gadicc opened 9 years ago
+1 plurals not working in safari
Can you try msgfmt:core@2.0.0-preview.21
and confirm if it fixes this?
From the updated README:
Intl polyfill
In v2 we handle date/number/currency formatting, but it relies on native browser support. We rely on the Intl polyfill served via cdn.polyfill.io to provide this support in earlier browsers, requesting all the locales you currently offer. (No, we don't lazy load locales for the polyfill)
This results in an extra external request to the CDN on each initial page load. polyfill.io is served from the fastly world-wide CDN, and looks at the browser's user-agent to only send the polyfill if needed. However, if the extra request bothers you, you can turn it off with:
msgfmt.init('en', { disableIntlPolyfill: true });
Wow. Thanks! Works in Safari browser, did not test in cordova so far, but will report later.
Awesome, thanks, been wanting to close this for a while, thanks for the nudge :>
seems to be working in cordova/ios as well. Think this cone can be closed :)
Amazing! Thanks for reporting back. One more milestone done.
@gadicc Somehow I am now receiving a Injected object was undefined, this is most likely a Cordova session
in my xcode log when running via meteor run ios-device
. This causes Intl
to be unavailable. I fixed this temporarily by adding <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Intl.~locale.de,Intl.~locale.en"></script>
to the <head>
.
Any idea?
I don't use Cordova but I understood from other users that this kind of issue can be fixed with the instructions at https://github.com/gadicc/meteor-messageformat#cordova.
I followed these instructions and Message-Format is working fine with cordova. The issue seems only to be the injection of the intl-polyfill code. I suspect this is only the case when running directly from localhost, as I am under the impression that it has worked fine before (when I used testflight and a remote server). I will test again and report back.
No I think you're right, I'll take another look at this.
In v2 we handle date/number/currency formatting, but it relies on native browser support. mf should provide a polyfill to be used by older browsers.