i18n the export tab
This commit is contained in:
parent
3d906fe8c6
commit
1db6b392a6
3 changed files with 61 additions and 30 deletions
|
@ -1,6 +1,6 @@
|
|||
<% form_tag :action => "finish" do %>
|
||||
|
||||
<p class="export_heading">Area to Export</p>
|
||||
<p class="export_heading"><%= t'export.start.area_to_export' %></p>
|
||||
|
||||
<div class="export_bounds">
|
||||
<%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %>
|
||||
|
@ -10,70 +10,70 @@
|
|||
<br/>
|
||||
<%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %>
|
||||
<p class="export_hint">
|
||||
<a id='drag_box' href="#" onclick="return startBox();">Manually select a different area</a>
|
||||
<a id='drag_box' href="#" onclick="return startBox();"><%= t'export.start.manually_select' %></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p class="export_heading">Format to Export</p>
|
||||
<p class="export_heading"><%= t'export.start.format_to_export' %></p>
|
||||
|
||||
<div class="export_details">
|
||||
<p>
|
||||
<%= radio_button_tag("format", "osm") %> OpenStreetMap XML Data
|
||||
<%= radio_button_tag("format", "osm") %> <%= t'export.start.osm_xml_data' %>
|
||||
<br/>
|
||||
<%= radio_button_tag("format", "mapnik") %> Mapnik Image
|
||||
<%= radio_button_tag("format", "mapnik") %> <%= t'export.start.mapnik_image' %>
|
||||
<br/>
|
||||
<%= radio_button_tag("format", "osmarender") %> Osmarender Image
|
||||
<%= radio_button_tag("format", "osmarender") %> <%= t'export.start.osmarender_image' %>
|
||||
<br/>
|
||||
<%= radio_button_tag("format", "html") %> Embeddable HTML
|
||||
<%= radio_button_tag("format", "html") %> <%= t'export.start.embeddable_html' %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="export_osm">
|
||||
<p class="export_heading">Licence</p>
|
||||
<p class="export_heading"><%= t'export.start.licence' %></p>
|
||||
|
||||
<div class="export_details">
|
||||
<p>OpenStreetMap data is licensed under the <a href="http://creativecommons.org/licenses/by-sa/2.0/">Creative Commons Attribution-ShareAlike 2.0 license</a>.</p>
|
||||
<p><%= t'export.start.export_details' %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="export_mapnik">
|
||||
<p class="export_heading">Options</p>
|
||||
<p class="export_heading"><%= t'export.start.options' %></p>
|
||||
|
||||
<div class="export_details">
|
||||
<p>Format <%= select_tag("mapnik_format", options_for_select([["PNG", "png"], ["JPEG", "jpeg"], ["SVG", "svg"], ["PDF", "pdf"], ["Postscript", "ps"]], "png")) %></p>
|
||||
<p>Scale 1 : <%= text_field_tag("mapnik_scale", nil, :size => 8) %> <span class="export_hint">(max 1 : <span id="mapnik_max_scale"></span>)</span></p>
|
||||
<p>Image Size <span id="mapnik_image_width"></span> x <span id="mapnik_image_height"></span></p>
|
||||
<p><%= t'export.start.format' %> <%= select_tag("mapnik_format", options_for_select([["PNG", "png"], ["JPEG", "jpeg"], ["SVG", "svg"], ["PDF", "pdf"], ["Postscript", "ps"]], "png")) %></p>
|
||||
<p><%= t'export.start.scale' %> 1 : <%= text_field_tag("mapnik_scale", nil, :size => 8) %> <span class="export_hint">(<%= t'export.start.max' %> 1 : <span id="mapnik_max_scale"></span>)</span></p>
|
||||
<p><%= t'export.start.image_size' %> <span id="mapnik_image_width"></span> x <span id="mapnik_image_height"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="export_osmarender">
|
||||
<p class="export_heading">Options</p>
|
||||
<p class="export_heading"><%= t'export.start.options' %></p>
|
||||
|
||||
<div class="export_details">
|
||||
<p>Format <%= select_tag("osmarender_format", options_for_select([["PNG", "png"], ["JPEG", "jpeg"]], "png")) %></p>
|
||||
<p>Zoom <%= select_tag("osmarender_zoom", options_for_select([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17])) %></p>
|
||||
<p><%= t'export.start.format' %> <%= select_tag("osmarender_format", options_for_select([["PNG", "png"], ["JPEG", "jpeg"]], "png")) %></p>
|
||||
<p><%= t'export.start.zoom' %> <%= select_tag("osmarender_zoom", options_for_select([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17])) %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="export_html">
|
||||
<p class="export_heading">Options</p>
|
||||
<p class="export_heading"><%= t'export.start.options' %></p>
|
||||
<div class="export_details">
|
||||
<p><a id="add_marker" href="#">Add a marker to the map</a></p>
|
||||
<p><a id="add_marker" href="#"><%= t'export.start.add_marker' %></a></p>
|
||||
<p id="marker_inputs" style="display:none">
|
||||
Lat: <input type="text" id="marker_lat" size="9" />
|
||||
Lon: <input type="text" id="marker_lon" size="9" />
|
||||
<%= t'export.start.latitude' %> <input type="text" id="marker_lat" size="9" />
|
||||
<%= t'export.start.longitude' %> <input type="text" id="marker_lon" size="9" />
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p class="export_heading">Output</p>
|
||||
<p class="export_heading"><%= t'export.start.output' %></p>
|
||||
<div class="export_details">
|
||||
<p><input type="text" id="export_html_text" style="width:95%" /></p>
|
||||
<p>Paste HTML to embed in website</p>
|
||||
<p><%= t'export.start.paste_html' %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="export_buttons">
|
||||
<p><%= submit_tag "Export", :id => "export_commit" %></p>
|
||||
<p><%= submit_tag t('export.start.export_button'), :id => "export_commit" %></p>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
page.replace_html :sidebar_title, 'Export'
|
||||
page.replace_html :sidebar_title, t('export.start_rjs.export')
|
||||
page.replace_html :sidebar_content, :partial => 'start'
|
||||
page << <<EOJ
|
||||
var vectors;
|
||||
|
@ -77,7 +77,7 @@ page << <<EOJ
|
|||
$("minlat").onchange = boundsChanged;
|
||||
|
||||
function startDrag() {
|
||||
$("drag_box").innerHTML='Drag a box on the map to select an area';
|
||||
$("drag_box").innerHTML='#{I18n.t('export.start_rjs.drag_a_box')}';
|
||||
|
||||
clearBox();
|
||||
box.activate();
|
||||
|
@ -94,11 +94,11 @@ page << <<EOJ
|
|||
box.deactivate();
|
||||
validateControls();
|
||||
|
||||
$("drag_box").innerHTML = "Manually select a different area";
|
||||
$("drag_box").innerHTML = "#{I18n.t('export.start_rjs.manually_select')}";
|
||||
}
|
||||
|
||||
function startMarker() {
|
||||
$("add_marker").innerHTML='Click on the map to add a marker';
|
||||
$("add_marker").innerHTML='#{I18n.t('export.start_rjs.click_add_marker')}';
|
||||
|
||||
if (!markerLayer) {
|
||||
markerLayer = new OpenLayers.Layer.Vector("",{
|
||||
|
@ -130,7 +130,7 @@ page << <<EOJ
|
|||
function endMarker(event) {
|
||||
markerControl.deactivate();
|
||||
|
||||
$("add_marker").innerHTML = "Change marker position";
|
||||
$("add_marker").innerHTML = "#{I18n.t('export.start_rjs.change_marker')}";
|
||||
$("marker_inputs").style.display = "block";
|
||||
|
||||
var epsg4326 = new OpenLayers.Projection("EPSG:4326");
|
||||
|
@ -147,7 +147,7 @@ page << <<EOJ
|
|||
$("marker_lon").value = "";
|
||||
$("marker_lat").value = "";
|
||||
$("marker_inputs").style.display = "none";
|
||||
$("add_marker").innerHTML = "Add a marker to the map";
|
||||
$("add_marker").innerHTML = "#{I18n.t('export.start_rjs.add_marker')}";
|
||||
|
||||
if (markerLayer) {
|
||||
markerControl.destroy();
|
||||
|
@ -248,7 +248,7 @@ page << <<EOJ
|
|||
|
||||
var layers = getMapLayers();
|
||||
|
||||
html += '<br /><small><a href="http://#{SERVER_URL}/?lat='+center.lat+'&lon='+center.lon+'&zoom='+zoom+'&layers='+layers+markerUrl+'">View Larger Map</a></small>';
|
||||
html += '<br /><small><a href="http://#{SERVER_URL}/?lat='+center.lat+'&lon='+center.lon+'&zoom='+zoom+'&layers='+layers+markerUrl+'">#{I18n.t('export.start_rjs.view_larger_map')}</a></small>';
|
||||
|
||||
$("export_html_text").value = html;
|
||||
|
||||
|
|
|
@ -173,6 +173,37 @@ en:
|
|||
other: "{{count}} comments"
|
||||
edit_link: Edit this entry
|
||||
comment_from: "Comment from {{link_user}} at {{comment_created_at}}"
|
||||
export:
|
||||
start:
|
||||
area_to_export: "Area to Export"
|
||||
manually_select: "Manually select a different area"
|
||||
format_to_export: "Format to Export"
|
||||
osm_xml_data: "OpenStreetMap XML Data"
|
||||
mapnik_image: "Mapnik Image"
|
||||
osmarender_image: "Osmarender Image"
|
||||
embeddable_html: "Embeddable HTML"
|
||||
licence: "Licence"
|
||||
export_details: 'OpenStreetMap data is licensed under the <a href="http://creativecommons.org/licenses/by-sa/2.0/">Creative Commons Attribution-ShareAlike 2.0 license</a>.'
|
||||
options: "Options"
|
||||
format: "Format"
|
||||
scale: "Scale"
|
||||
max: "max"
|
||||
image_size: "Image Size"
|
||||
zoom: "Zoom"
|
||||
add_marker: "Add a marker to the map"
|
||||
latitude: "Lat:"
|
||||
longitude: "Lon:"
|
||||
output: "Output"
|
||||
paste_html: "Paste HTML to embed in website"
|
||||
export_button: "Export"
|
||||
start_rjs:
|
||||
export: "Export"
|
||||
drag_a_box: "Drag a box on the map to select an area"
|
||||
manually_select: "Manually select a different area"
|
||||
click_add_marker: "Click on the map to add a marker"
|
||||
change_marker: "Change marker position"
|
||||
add_marker: "Add a marker to the map"
|
||||
view_larger_map: "View Larger Map"
|
||||
layouts:
|
||||
welcome_user: "Welcome, {{user_link}}"
|
||||
inbox: "inbox ({{size}})"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue