X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/596ab82461c6662cbfbe027c16e332d75a1e3c2e..17445a44da9aaeb24e136c5fc6fc3634e6f10539:/public/javascripts/site.js diff --git a/public/javascripts/site.js b/public/javascripts/site.js index 9dbb2a640..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["javascripts.site.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["javascripts.site.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");