X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/fd6f00b069af5a7b87227ea4c3401dc461d7311a..de18f26d3c3449d3a56b0941a3a39b40fffd3947:/app/views/browse/start.rjs?ds=sidebyside diff --git a/app/views/browse/start.rjs b/app/views/browse/start.rjs index f38b1dc80..4df614847 100644 --- a/app/views/browse/start.rjs +++ b/app/views/browse/start.rjs @@ -1,4 +1,4 @@ -page.replace_html :sidebar_title, 'Data' +page.replace_html :sidebar_title, t('browse.start_rjs.data_frame_title') page.replace_html :sidebar_content, :partial => 'start' page << <= 15) { useMap(); } else { - setStatus("Zoom in or select an area of the map to view"); + setStatus("#{I18n.t('browse.start_rjs.zoom_or_select')}"); } } } @@ -50,11 +50,6 @@ page << < '{{num_features}}')}", { num_features: browseFeatureList.length }))); div.appendChild(p); var input = document.createElement("input"); input.type = "submit"; - input.value = "Load Data"; + input.value = "#{I18n.t('browse.start_rjs.load_data')}"; input.onclick = loadFeatureList; div.appendChild(input); @@ -186,15 +186,15 @@ page << < 0.25) { - setStatus("Unable to load: Bounding box size of " + size + " is too large (must be smaller than 0.25)"); + if (size > #{APP_CONFIG['max_request_area']}) { + setStatus(i18n_js("#{I18n.t('browse.start_rjs.unable_to_load_size', :bbox_size => '{{bbox_size}}', :max_bbox_size => APP_CONFIG['max_request_area'])}", { bbox_size: size })); } else { loadGML("/api/#{API_VERSION}/map?bbox=" + projected.toBBOX()); } } function loadGML(url) { - setStatus("Loading..."); + setStatus("#{I18n.t('browse.start_rjs.loading')}"); $("browse_content").innerHTML = ""; if (!browseDataLayer) { @@ -210,7 +210,10 @@ page << <= 0; i--) { - var user = nodes[i].getAttribute("user") || "private user"; + var user = nodes[i].getAttribute("user") || "#{I18n.t('browse.start_rjs.private_user')}"; var timestamp = nodes[i].getAttribute("timestamp"); var item = document.createElement("li"); - item.appendChild(document.createTextNode("Edited by " + user + " at " + timestamp)); + item.appendChild(document.createTextNode("#{I18n.t('browse.start_rjs.edited_by')} " + user + " #{I18n.t('browse.start_rjs.at_timestamp')} " + timestamp)); history.appendChild(item); } div.appendChild(history); @@ -454,15 +457,51 @@ page << <