-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Albanian locale is not included for Chrome #1254
Comments
Thanks for the issue @arturmuller - when using That should solve the issue immediately for you. I think we also need to fix the issue properly, which would be to serve Albanian to Chrome versions which are missing it. Do you happen to know which versions that would be? @longlho do you know which versions of Chrome are missing the Intl locales for Albanian? |
Thanks for the quick response @JakeChampion! Based on my research, Intl was introduced to Chrome in v24, so I would probably see if that version supports it. Chrome v76 introduced many featured to Intl (for example I would not be surprised if it was indeed never supported. Regarding your suggestion for an immediate fix, I am afraid that it doesn't do the trick. This is the output when running with "always,gated": So — it seems that the feature detection logic decides to not apply the polyfill. The script runs to completion and triggers a callback specified in the polyfill URL. This is the output when running with "always": The script errors-out and nukes JS on the page. Specified callback is not called and no polyfill is applied. Any ideas on what else I could do to proceed? |
@arturmuller I can see the issue here now. To polyfill the locales we need to use our Intl polyfill, because there is no way to add locales to the native implementations of Intl. The feature detects for We likely need to update our browser targeting and feature detects for Intl.DateTimeFormat and Intl.NumberFormat or find some other way to load those polyfills when a requested locale needs to be polyfilled. |
So locale data can change version to version so it's hard to tell what version contains what locale data. |
Perhaps a dynamically generated feature detect could be implemented for the Intl polyfills - this would require changing how feature detects are implemented within polyfill-library but it would allow for the smallest feature detect for Intl to be implemented. I.E. The feature detect could include the requested locales. Right now feature detects are hard-coded and the ones for the Intl methods are quite broad: |
@JakeChampion thanks for the clarification. Makes sense. If there is anything I can do on my side to help to get the feature detection implemented, I'd be happy to help. We're not currently in desperate need for a fix, but eventually we'll need to get this working. |
Bug
What
Albanian locale is not included for Chrome (which doesn't support this locale out of the box)
Details
Screenshot of polyfill.io response alongside console usage that's not recognising Albanian (sq):
I expected Albanian to be included for Chrome (but not be included for eg. Firefox).
My env:
I tried to force the inclusion of the sq locale via flags=always, but that resulted in various errors as below:
So -- not really sure what I should do to make this work as expected.
The text was updated successfully, but these errors were encountered: