You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Being able to change the locale on the fly has been a stretch goal for years. Currently you can only set the locale at startup and it can't change later. This is because historically a lot of our UI components were written in a way that they only work one time (they append themselves to the document).
I've recently updated a bunch of our UI components to be reentrant, meaning they can re-render as needed - this includes relocalizing any text. I'll keep this issue open until it works everywhere.
The text was updated successfully, but these errors were encountered:
(re: #1598)
This means that the user can change `&locale=xx` in the url hash
(or locale can change some other way) and the UI and map will redraw.
Not all of the UI is able to react to this yet, so we'll leave #1598 open,
but the main components in the tree down through the sidebar, main map,
controls, attributions, footer can handle it.
This commit also cleans up a few rtl issues in the map footer.
(re: #1336, #1598 and others)
- RapidInspector is a class component now with reentrant render functions
- Lots of places where localization happened at init time now happens at render time
- RapidInspector and Sidebar will redo their keybinds now on localization change
(This is something we haven't done before - should adopt this pattern everywhere)
- Cleanup RapidInspector layout a lot - lots more flexbox
- The shortcut keys 'A' and 'D' now work on hover! (#1336)
(This is possible because we aren't making extra inspector components all the time.)
(re: #1598)
This is a followup from 0c196c3
Because many keyboard shortcuts can be localizable, we should refresh them if the language changes.
This wraps up all the keybinds in `_setupKeybinding` functions which can run on `localechange`.
Being able to change the locale on the fly has been a stretch goal for years. Currently you can only set the locale at startup and it can't change later. This is because historically a lot of our UI components were written in a way that they only work one time (they append themselves to the document).
I've recently updated a bunch of our UI components to be reentrant, meaning they can re-render as needed - this includes relocalizing any text. I'll keep this issue open until it works everywhere.
The text was updated successfully, but these errors were encountered: