X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/908a6ef409518d86bfd2cdf0d2a82a6c312821c8..3244635aa11878135a014cf2c9ec9177f8e9d0ba:/public/javascripts/site.js diff --git a/public/javascripts/site.js b/public/javascripts/site.js index b6566fa81..43cca261c 100644 --- a/public/javascripts/site.js +++ b/public/javascripts/site.js @@ -1,3 +1,4 @@ + /* * Called as the user scrolls/zooms around to aniplate hrefs of the * view tab and various other links @@ -61,7 +62,7 @@ function updatelinks(lon,lat,zoom,layers,minlon,minlat,maxlon,maxlat,objtype,obj node.href = setArgs("/edit", args); node.style.fontStyle = 'normal'; } else { - node.href = 'javascript:alert("zoom in to edit map");'; + node.href = 'javascript:alert(i18n("javascripts.site.edit_zoom_alert"));'; node.style.fontStyle = 'italic'; } } @@ -86,7 +87,7 @@ function updatelinks(lon,lat,zoom,layers,minlon,minlat,maxlon,maxlat,objtype,obj node.href = setArgs("/history", args); node.style.fontStyle = 'normal'; } else { - node.href = 'javascript:alert("zoom in to see editing history");'; + node.href = 'javascript:alert(i18n("javascripts.site.history_zoom_alert"));'; node.style.fontStyle = 'italic'; } } @@ -201,6 +202,8 @@ function getStyle(el, property) { * rails and then later by javascript. */ function i18n(string, keys) { + string = i18n_strings[string] || string + for (var key in keys) { var re_key = '\\[\\[' + key + '\\]\\]'; var re = new RegExp(re_key, "g");