Make the HERE Map display in the currently selected language#9552
Make the HERE Map display in the currently selected language#9552ahukkanen merged 2 commits intodecidim:developfrom belighted:feature/make-here-map-use-current-language
Conversation
ahukkanen
left a comment
There was a problem hiding this comment.
Really nice improvement @sergei-krylov, thanks a lot!
I tested it locally and it works just as advertised, although I did not understand why looking at the HERE tile layer code for Leaflet. But I guess I don't need to care how it works if it just works. 😆
One change I'd like to propose is to move the added logic to the Ruby backend as suggested here in the review. My intention would be to add some specs for this (e.g. test the officially supported locales en, ca, es) and it might be easier to implement these if the logic is at the backend.
We'd also like to keep the JS code for the maps initialization as simple as possible, which is why we created the maps API in the first place which allows providing options to the view/JS.
|
@ahukkanen , thanks a lot for review of this PR! I moved everything to the backend as suggested. |
ahukkanen
left a comment
There was a problem hiding this comment.
Looking pretty good! I still left one more request to fix the Rubocop issues, would be a bit more readable.
It would be actually available through the If we can just fix those Rubocop issues as suggested in the latest review, it's good to go (I'll still need to test it once more after finished). |
ahukkanen
left a comment
There was a problem hiding this comment.
Great improvement, thanks a lot!
…ging * feature/redesign-main-footer: Reorder elements in main links of footer and define links and texts Define a cell for static_pages and topics configured to appear in footer Fix translation call Set fixed links in redesigned_main_legal partial Add FooterMenuPresenter to display menu items in footer Fix budgets seeds on non development apps (#9585) Return 404 when there isn't a valid component in program (#9576) Add missing queue close_meeting_reminder to sidekiq configuration (#9568) Make the HERE Map display in the currently selected language (#9552) Add help text for proposals' 'publish answers immediately' setting (#9549) Fix admin language selector with more than 4 locales (#9519) Fix publish event on official proposals (#9421) Prevent missing ActionLog entries to break the application (#9502) Add boilerplate structure to CHANGELOG (#9501) Add step-by-step instructions of the Crowdin releases process (#9555) Fix translated attributes field type change (#9547) Add `modifyList` option to the autocomplete element (#9548) Admin log filters (#9460) Improve the default gitignore files created by the generators (#9507)
…#9552) * Make the HERE map display in the currently selected language * Refactor HERE map language codes method
🎩 What? Why?
Make the HERE Map display in the currently selected language.
See the supported languages in docs: https://developer.here.com/documentation/map-tile/dev_guide/topics/resource-base-maptile.html#resource-base-maptile__includes-query-parameters
Testing
Find any map on the app, on meetings page as an example, choose another language for website to see the map also changes its language (if the language is one of the supported).