[openstreetmap/openstreetmap-website] Refactor directions output rendering and unit handling (PR #5992)

Marwin Hochfelsner notifications at github.com
Thu May 8 12:28:38 UTC 2025


### Description
- Group unit translations by sending the scope with `translateDistanceUnits`
- Regroup `writeSummary` and `writeSteps` into `writeContent` and `writeStep`
- Unify unit toggling into `writeContent` with `data-unit` to simplify event binding.

### How has this been tested?
locally
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Refactor directions output rendering and unit handling

-- File Changes --

    M app/assets/javascripts/index/directions-route-output.js (109)
    M app/views/directions/show.html.erb (4)
    M config/locales/en.yml (10)

-- Patch Links --

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

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

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


More information about the rails-dev mailing list