[openstreetmap/openstreetmap-website] Translate step distance units (PR #5781)

Anton Khorev notifications at github.com
Sun Mar 9 13:52:00 UTC 2025


There was an issue #3888 that asked to make directions distances translatable. It was done, but not entirely. Step distances were still untranslatable after the issue was closed.

Before in Russian:

![image](https://github.com/user-attachments/assets/fea830d4-da1a-4d42-ab11-10faba1b45f9)
Notice that the total distance units are "км", but the first step has untranslated "km".

After:

![image](https://github.com/user-attachments/assets/cf03a322-5f30-4ae5-88da-6476a69f927a)

You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Remove unitTemplate from formatDistance
  * Move getDistText next to other formatting functions
  * Return to a previous structure of getDistText
  * Rename distance formatting functions
  * Translate step distance units

-- File Changes --

    M app/assets/javascripts/index/directions.js (39)

-- Patch Links --

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

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

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


More information about the rails-dev mailing list