Project-OSRM / osrm-text-instructions

Text instructions from OSRM route responses
BSD 2-Clause "Simplified" License
87 stars 61 forks source link

Arrival instruction includes an optional named waypoint #235

Closed danpaz closed 6 years ago

danpaz commented 6 years ago

Issue

Updates compile to accept an optional parameter options.waypointName to use in the arrive instruction. When the new parameter is provided, compile replaces the default arrival instruction You have arrived at your {nth} destination with You have arrived at {waypoint_name}.

For example:

You have arrived at your first destination

becomes

You have arrived at Somewhere

For the localizations, I copied the default arrival instruction and modified it manually to create the new named template. In most languages this was pretty straightforward to do, but for some languages I made an effort but am not 100% confident with the result. I'll highlight these in comments below for feedback from anyone with better knowledge of those languages.

Tasklist

/cc @1ec5 @lyzidiamond @bsudekum @allierowan @mcwhittemore

wingwuyf commented 6 years ago

@1ec5 目 is not necessary, 目的地 is a single Chinese vocabulary. I think it should be "named": "已到达{waypoint_name}"

1ec5 commented 6 years ago

9a6a98072c83f6032fc00550cb0636679293f3a6 updates the test scripts so that UPDATE=1 also updates any named translations. b9d776e621db9daf466c7aa2b9d7ee12f9368b29 fixes the Simplified Chinese named waypoint arrival translations, per https://github.com/Project-OSRM/osrm-text-instructions/pull/235#issuecomment-380301060.

danpaz commented 6 years ago

Thanks everyone! I updated the Russian translations per https://github.com/Project-OSRM/osrm-text-instructions/pull/235#discussion_r180550563. Planning to merge and cut a release with this feature shortly.