X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b0e15608750417351c2ac3d9ffa6d13fcf6c8ccb..20a861392e1ee7970da5d95b546aa8551faaf27b:/public/javascripts/site.js diff --git a/public/javascripts/site.js b/public/javascripts/site.js index 17b2f0668..43cca261c 100644 --- a/public/javascripts/site.js +++ b/public/javascripts/site.js @@ -62,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(rails_i18n["layouts.edit_zoom_alert"]);'; + node.href = 'javascript:alert(i18n("javascripts.site.edit_zoom_alert"));'; node.style.fontStyle = 'italic'; } } @@ -87,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(rails_i18n["layouts.history_zoom_alert"]);'; + node.href = 'javascript:alert(i18n("javascripts.site.history_zoom_alert"));'; node.style.fontStyle = 'italic'; } } @@ -202,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");