]> git.openstreetmap.org Git - rails.git/commitdiff
Avoid using "one" and "two" as translation keys
authorTom Hughes <tom@compton.nu>
Mon, 30 Apr 2018 21:38:43 +0000 (22:38 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 30 Apr 2018 21:38:43 +0000 (22:38 +0100)
app/assets/javascripts/index/directions/osrm.js
config/locales/en.yml

index b49d93e065436afbe39d3fe8711c58a6ac18384c..4ce2d005feb4c9fed71b89748569d4fae3e5fd0e 100644 (file)
@@ -61,10 +61,7 @@ function OSRMEngine() {
         'arrive': 14
       };
       var numToWord = function(num) {
-        if(num > 10) {
-          num = 11;
-        }
-        return ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "gt_ten"][num];
+        return ["first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth"][num-1];
       };
       var transformed_steps = input_steps.map(function(step, idx) {
         var maneuver_id;
index 4dd1762e1900eab84a3c74065dbbca2d63cdf884..15cc2dbf66971069510c82ff36c903fa84b2c8a4 100644 (file)
@@ -2386,16 +2386,16 @@ en:
         unnamed: "unnamed road"
         courtesy: "Directions courtesy of %{link}"
         exit_counts:
-          one: "1st"
-          two: "2nd"
-          three: "3rd"
-          four: "4th"
-          five: "5th"
-          six: "6th"
-          seven: "7th"
-          eight: "8th"
-          nine: "9th"
-          ten: "10th"
+          first: "1st"
+          second: "2nd"
+          third: "3rd"
+          fourth: "4th"
+          fifth: "5th"
+          sixth: "6th"
+          seventh: "7th"
+          eighth: "8th"
+          ninth: "9th"
+          tenth: "10th"
       time: "Time"
     query:
       node: Node