]> git.openstreetmap.org Git - rails.git/commitdiff
Merge pull request #19 from apmon/jsroute2
authorRichard Fairhurst <richard@systemeD.net>
Mon, 31 Mar 2014 16:51:37 +0000 (17:51 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Mon, 31 Mar 2014 16:51:37 +0000 (17:51 +0100)
Minor fixes to the I18n code of routing

1  2 
app/assets/javascripts/routing.js.erb

index 787d31dda7f56bac603afd9af3056bb8dddbe454,3f38beef4382a6484c273adad28e3830a0007894..5ff0656c81c99f1767c700888391a0b133a5e1e9
@@@ -216,7 -216,7 +216,7 @@@ OSM.Routing=function(map,name,jqSearch
              $('#turnbyturn').append(row);
              cumulative+=step[3];
          }
-         $('#sidebar_content').append('<p id="routing_credit">' + r.chosenEngine.creditline + '</p>');
+         $('#sidebar_content').append('<p id="routing_credit">' + I18n.t('javascripts.directions.instructions.courtesy',{link: r.chosenEngine.creditline}) + '</p>');
  
      };
      r.clickTurn=function(instruction,latlng) {
          else                { return Math.round(m / 1000)  + "km"; }
      };
      r.formatTime=function(s) {
 -        var d=new Date(s*1000); var h=d.getHours(); var m=d.getMinutes();
 +        var m=Math.round(s/60);
 +        var h=Math.floor(m/60);
 +        m -= h*60;
          return h+":"+(m<10 ? '0' : '')+m;
      };