X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/bc009ccd73c6f99311045de5023755940a28f100..7ad58d1411289ad241a49abb87e414ff13b60173:/app/views/browse/start.js.erb?ds=inline diff --git a/app/views/browse/start.js.erb b/app/views/browse/start.js.erb index 1a32a3a79..1b57f48a0 100644 --- a/app/views/browse/start.js.erb +++ b/app/views/browse/start.js.erb @@ -155,7 +155,7 @@ function displayFeatureWarning(count, limit, callback) { var div = document.createElement("div"); var p = document.createElement("p"); - p.appendChild(document.createTextNode(i18n("<%=j t 'browse.start_rjs.loaded_an_area_with_num_features' %>", { num_features: count, max_features: limit }))); + p.appendChild(document.createTextNode(I18n.t("browse.start_rjs.loaded_an_area_with_num_features", { num_features: count, max_features: limit }))); div.appendChild(p); var input = document.createElement("input"); @@ -194,7 +194,7 @@ function getData(bounds, reload) { var size = projected.getWidth() * projected.getHeight(); if (size > <%= MAX_REQUEST_AREA %>) { - setStatus(i18n("<%=j t 'browse.start_rjs.unable_to_load_size', :max_bbox_size => MAX_REQUEST_AREA %>", { bbox_size: size })); + setStatus(I18n.t("browse.start_rjs.unable_to_load_size", { max_bbox_size: <%= MAX_REQUEST_AREA %>, bbox_size: size })); } else { loadData("/api/<%= API_VERSION %>/map?bbox=" + projected.toBBOX(), reload); } @@ -441,7 +441,7 @@ function displayHistory(request) { table.appendChild(tr); var heading = document.createElement("td"); - heading.appendChild(document.createTextNode(i18n("<%=j t 'browse.start_rjs.history_for_feature' %>", { feature: featureNameHistory(this.feature) }))); + heading.appendChild(document.createTextNode(I18n.t("browse.start_rjs.history_for_feature", { feature: featureNameHistory(this.feature) }))); tr.appendChild(heading); var td = document.createElement("td"); @@ -462,7 +462,7 @@ function displayHistory(request) { var user = nodes[i].getAttribute("user") || "<%=j t 'browse.start_rjs.private_user' %>"; var timestamp = nodes[i].getAttribute("timestamp"); var item = document.createElement("li"); - item.appendChild(document.createTextNode(i18n("<%=j t 'browse.start_rjs.edited_by_user_at_timestamp' %>", { user: user, timestamp: timestamp }))); + item.appendChild(document.createTextNode(I18n.t("browse.start_rjs.edited_by_user_at_timestamp", { user: user, timestamp: timestamp }))); history.appendChild(item); } div.appendChild(history); @@ -502,9 +502,9 @@ function featureNameSelect(feature) { } else if (feature.attributes.name) { return feature.attributes.name; } else if (featureType(feature) == "node") { - return i18n("<%=j t 'browse.start_rjs.object_list.selected.type.node' %>", { id: feature.osm_id }); + return I18n.t("browse.start_rjs.object_list.selected.type.node", { id: feature.osm_id }); } else if (featureType(feature) == "way") { - return i18n("<%=j t 'browse.start_rjs.object_list.selected.type.way' %>", { id: feature.osm_id }); + return I18n.t("browse.start_rjs.object_list.selected.type.way", { id: feature.osm_id }); } } @@ -514,9 +514,9 @@ function featureNameHistory(feature) { } else if (feature.attributes.name) { return feature.attributes.name; } else if (featureType(feature) == "node") { - return i18n("<%=j t 'browse.start_rjs.object_list.history.type.node' %>", { id: feature.osm_id }); + return I18n.t("browse.start_rjs.object_list.history.type.node", { id: feature.osm_id }); } else if (featureType(feature) == "way") { - return i18n("<%=j t 'browse.start_rjs.object_list.history.type.way' %>", { id: feature.osm_id }); + return I18n.t("browse.start_rjs.object_list.history.type.way", { id: feature.osm_id }); } }