[openstreetmap/openstreetmap-website] Initialize I18n and OSM as soon as application.js loads (PR #5538)

Anton Khorev notifications at github.com
Thu Jan 23 05:30:43 UTC 2025


That's what was happening before https://github.com/openstreetmap/openstreetmap-website/commit/d7b4f88d5e342b5c2b4f2435d0394e4286524678, but after that the init code was moved inside `$(document).ready( ... )`. That means it may not run before other code wants to use it, like https://github.com/openstreetmap/openstreetmap-website/pull/5402#discussion_r1923067165. `<head>` already exists by the time application.js runs, it should be possible to read html attributes from there.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5538

-- Commit Summary --

  * Initialize I18n and OSM as soon as application.js loads

-- File Changes --

    M app/assets/javascripts/application.js (44)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5538.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5538.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5538
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5538 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250122/b503fa62/attachment.htm>


More information about the rails-dev mailing list