From: Tom Hughes Date: Wed, 8 Jul 2015 19:37:56 +0000 (+0100) Subject: Change direction string ids to force retranslation X-Git-Tag: live~4097 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/d28ae2ad0ab336a5c1f1b7152945b30a4e2cfd02?ds=sidebyside Change direction string ids to force retranslation --- diff --git a/app/assets/javascripts/index/directions/osrm.js b/app/assets/javascripts/index/directions/osrm.js index 5c1ce6906..b53fecb81 100644 --- a/app/assets/javascripts/index/directions/osrm.js +++ b/app/assets/javascripts/index/directions/osrm.js @@ -12,7 +12,7 @@ function OSRMEngine() { getRoute: function (points, callback) { var TURN_INSTRUCTIONS = [ "", - 'javascripts.directions.instructions.continue_on', // 1 + 'javascripts.directions.instructions.continue', // 1 'javascripts.directions.instructions.slight_right', // 2 'javascripts.directions.instructions.turn_right', // 3 'javascripts.directions.instructions.sharp_right', // 4 @@ -66,9 +66,9 @@ function OSRMEngine() { var instText = "" + (i + 1) + ". "; var name = s[1] ? "" + s[1] + "" : I18n.t('javascripts.directions.instructions.unnamed'); if (instCodes[0] === "11" && instCodes[1]) { - instText += I18n.t('javascripts.directions.instructions.roundabout_with_exit', { exit: instCodes[1], name: name } ); + instText += I18n.t(TURN_INSTRUCTIONS[instCodes[0]] + '_with_exit', { exit: instCodes[1], name: name } ); } else { - instText += I18n.t(TURN_INSTRUCTIONS[instCodes[0]], { name: name }); + instText += I18n.t(TURN_INSTRUCTIONS[instCodes[0]] + '_without_exit', { name: name }); } if ((i + 1) < data.route_instructions.length) { linesegend = data.route_instructions[i + 1][3] + 1; diff --git a/config/locales/en.yml b/config/locales/en.yml index ffb22bd60..ab18c6922 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2241,23 +2241,23 @@ 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 %{name} - slight_right: Slight right onto %{name} - turn_right: Turn right onto %{name} - sharp_right: Sharp right onto %{name} - uturn: U-turn along %{name} - sharp_left: Sharp left onto %{name} - turn_left: Turn left onto %{name} - slight_left: Slight left onto %{name} - via_point: (via point) - follow: Follow %{name} - roundabout: At roundabout take %{name} - leave_roundabout: Leave roundabout - %{name} - stay_roundabout: Stay on roundabout - %{name} - start: Start at end of %{name} - destination: Reach destination - against_oneway: Go against one-way on %{name} - end_oneway: End of one-way on %{name} + continue_without_exit: Continue on %{name} + slight_right_without_exit: Slight right onto %{name} + turn_right_without_exit: Turn right onto %{name} + sharp_right_without_exit: Sharp right onto %{name} + uturn_without_exit: U-turn along %{name} + sharp_left_without_exit: Sharp left onto %{name} + turn_left_without_exit: Turn left onto %{name} + slight_left_without_exit: Slight left onto %{name} + via_point_without_exit: (via point) + follow_without_exit: Follow %{name} + roundabout_without_exit: At roundabout take %{name} + leave_roundabout_without_exit: Leave roundabout - %{name} + stay_roundabout_without_exit: Stay on roundabout - %{name} + start_without_exit: Start at end of %{name} + destination_without_exit: Reach destination + against_oneway_without_exit: Go against one-way on %{name} + end_oneway_without_exit: End of one-way on %{name} roundabout_with_exit: At roundabout take exit %{exit} onto %{name} unnamed: "unnamed road" courtesy: "Directions courtesy of %{link}"