-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fallback to hardcoded units in browsers without NumberFormat
support in ScaleControl
#12068
Conversation
Given that browser share for Safari <= 14.0 is marginal, should we instead consider the option of simply showing non-localized scale (English) for unsupported browsers? I think the tradeoff might be worth, since we'd otherwise have to support manual translation of all these strings across all languages in the future. |
Yep, we can do that 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Can you do two small things before merging?
- edit the title to reflect that this isn't a full reversion (new approach still exists)
- add a changelog entry documenting the fix (since we released the bug)
NumberFormat
support in ScaleControl
…t in `ScaleControl` (#12068) Add a workaround in ScaleControl to support localization in browsers without NumberFormat support Co-authored-by: Ansis Brammanis <ansis@mapbox.com>
* Fallback to hardcoded units in browsers without `NumberFormat` support in `ScaleControl` (#12068) Add a workaround in ScaleControl to support localization in browsers without NumberFormat support Co-authored-by: Ansis Brammanis <ansis@mapbox.com> * Fix GeolocateControl in Safari (#12080) * fix GeolocateControl in Safari * update geolocate unit test to cover the fix Co-authored-by: Stepan Kuzmin <stepan.kuzmin@mapbox.com> Co-authored-by: Ansis Brammanis <ansis@mapbox.com> Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
This PR reverts i18n support added in #11850 due to the lack of support in Safari <14.1 #12021
Closes #12021
Launch Checklist
mapbox-gl-js
changelog:<changelog>Add a workaround in ScaleControl to support localization in browsers without NumberFormat support</changelog>