]> git.openstreetmap.org Git - rails.git/commitdiff
Change direction string ids to force retranslation
authorTom Hughes <tom@compton.nu>
Wed, 8 Jul 2015 19:37:56 +0000 (20:37 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 8 Jul 2015 19:38:28 +0000 (20:38 +0100)
app/assets/javascripts/index/directions/osrm.js
config/locales/en.yml

index 5c1ce6906e2c1513ff1a49422c527439d66f4fa9..b53fecb81921131aac57a0d6e908393425682521 100644 (file)
@@ -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 = "<b>" + (i + 1) + ".</b> ";
             var name = s[1] ? "<b>" + s[1] + "</b>" : 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;
index ffb22bd6013de0513ba0025bcf40dcf81f60d7ca..ab18c69229fcbc5708a76f14fa2fa21bf810dfba 100644 (file)
@@ -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}"