### 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/5...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to