Fix OSRM directions issues
Don't rely on trailing spaces in translation strings as they aren't reliably preserved, and make "exit" translatable. Fixes #915
This commit is contained in:
parent
2d1adf4fe1
commit
fa3ccdfd49
2 changed files with 20 additions and 18 deletions
|
@ -66,9 +66,10 @@ function OSRMEngine() {
|
|||
var instText = "<b>" + (i + 1) + ".</b> ";
|
||||
instText += TURN_INSTRUCTIONS[instCodes[0]];
|
||||
if (instCodes[1]) {
|
||||
instText += "exit " + instCodes[1] + " ";
|
||||
instText += I18n.t('javascripts.directions.instructions.exit', { exit: instCodes[1] } );
|
||||
}
|
||||
if (instCodes[0] !== 15) {
|
||||
instText += " ";
|
||||
instText += s[1] ? "<b>" + s[1] + "</b>" : I18n.t('javascripts.directions.instructions.unnamed');
|
||||
}
|
||||
if ((i + 1) < data.route_instructions.length) {
|
||||
|
|
|
@ -2193,23 +2193,24 @@ en:
|
|||
no_route: "Couldn't find a route between those two places."
|
||||
no_place: "Sorry - couldn't find that place."
|
||||
instructions:
|
||||
continue_on: "Continue on "
|
||||
slight_right: "Slight right onto "
|
||||
turn_right: "Turn right onto "
|
||||
sharp_right: "Sharp right onto "
|
||||
uturn: "U-turn along "
|
||||
sharp_left: "Sharp left onto "
|
||||
turn_left: "Turn left onto "
|
||||
slight_left: "Slight left onto "
|
||||
via_point: "(via point) "
|
||||
follow: "Follow "
|
||||
roundabout: "At roundabout take "
|
||||
leave_roundabout: "Leave roundabout - "
|
||||
stay_roundabout: "Stay on roundabout - "
|
||||
start: "Start at end of "
|
||||
destination: "Reach destination"
|
||||
against_oneway: "Go against one-way on "
|
||||
end_oneway: "End of one-way on "
|
||||
continue_on: Continue on
|
||||
slight_right: Slight right onto
|
||||
turn_right: Turn right onto
|
||||
sharp_right: Sharp right onto
|
||||
uturn: U-turn along
|
||||
sharp_left: Sharp left onto
|
||||
turn_left: Turn left onto
|
||||
slight_left: Slight left onto
|
||||
via_point: (via point)
|
||||
follow: Follow
|
||||
roundabout: At roundabout take
|
||||
leave_roundabout: Leave roundabout -
|
||||
stay_roundabout: Stay on roundabout -
|
||||
start: Start at end of
|
||||
destination: Reach destination
|
||||
against_oneway: Go against one-way on
|
||||
end_oneway: End of one-way on
|
||||
exit: exit %{exit}
|
||||
unnamed: "(unnamed)"
|
||||
courtesy: "Directions courtesy of %{link}"
|
||||
time: "Time"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue