]> git.openstreetmap.org Git - rails.git/commitdiff
Use lazy lookups and rename translation keys for export
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 25 Apr 2018 08:40:22 +0000 (16:40 +0800)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 25 Apr 2018 09:09:29 +0000 (17:09 +0800)
app/views/site/export.html.erb
config/locales/en.yml

index bf5376fb55bd1be2e10c321ba756492c6b63f6ea..f11ad8d790a7b85a95f767b8c9de610f3625c5e3 100644 (file)
@@ -1,8 +1,8 @@
-<% set_title(t('export.title')) %>
+<% set_title(t('.title')) %>
 
 <h2>
   <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
-  <%= t 'export.title' %>
+  <%= t '.title' %>
 </h2>
 
 <%= form_tag({:controller => "export", :action => "finish"}, :class => "export_form") do %>
       <br/><br/>
       <%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %>
       </div>
-    <a id='drag_box' href="#"><%= t'export.start.manually_select' %></a>
+    <a id='drag_box' href="#"><%= t '.manually_select' %></a>
   </div>
 
-  <h4><%= t'export.start.licence' %></h4>
-  <p><%= raw t 'export.start.export_details' %></p>
+  <h4><%= t '.licence' %></h4>
+  <p><%= raw t '.export_details' %></p>
 
   <div id="export_osm_too_large">
     <p class="warning">
-      <%= t'export.start.too_large.body' %>
+      <%= t '.too_large.body' %>
     </p>
   </div>
 
   <div id="export_commit">
     <div class="export_button">
-      <%= submit_tag t('export.start.export_button') %>
+      <%= submit_tag t('.export_button') %>
     </div>
 
-    <p><%= t'export.start.too_large.advice' %></p>
+    <p><%= t '.too_large.advice' %></p>
   </div>
 
-  <dl class="inner12">  
-    <dt><a id="export_overpass" href="https://overpass-api.de/api/map?bbox="><%= t'export.start.too_large.overpass.title' %></a></dt>
-    <dd><%= t'export.start.too_large.overpass.description' %></dd>
-    
-    <dt><a href="https://planet.openstreetmap.org/"><%= t'export.start.too_large.planet.title' %></a></dt>
-    <dd><%= t'export.start.too_large.planet.description' %></dd>
+  <dl class="inner12">
+    <dt><a id="export_overpass" href="https://overpass-api.de/api/map?bbox="><%= t '.too_large.overpass.title' %></a></dt>
+    <dd><%= t '.too_large.overpass.description' %></dd>
 
-    <dt><a href="https://download.geofabrik.de/"><%= t'export.start.too_large.geofabrik.title' %></a></dt>
-    <dd><%= t'export.start.too_large.geofabrik.description' %></dd>
+    <dt><a href="https://planet.openstreetmap.org/"><%= t '.too_large.planet.title' %></a></dt>
+    <dd><%= t '.too_large.planet.description' %></dd>
 
-    <dt><a href="https://wiki.openstreetmap.org/wiki/Download"><%= t'export.start.too_large.other.title' %></a></dt>
-    <dd><%= t'export.start.too_large.other.description' %></dd>
+    <dt><a href="https://download.geofabrik.de/"><%= t '.too_large.geofabrik.title' %></a></dt>
+    <dd><%= t '.too_large.geofabrik.description' %></dd>
+
+    <dt><a href="https://wiki.openstreetmap.org/wiki/Download"><%= t '.too_large.other.title' %></a></dt>
+    <dd><%= t '.too_large.other.description' %></dd>
   </dl>
 <% end %>
index fca925e2c5c4bc90994d4cb930bc20d75bb30c54..e61af8d3b363f694f4c97c27b3bdd86ceabf1c1a 100644 (file)
@@ -323,47 +323,6 @@ en:
       ago: "%{ago} ago"
       newer_comments: "Newer Comments"
       older_comments: "Older Comments"
-  export:
-    title: "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"
-      map_image: "Map Image (shows standard layer)"
-      embeddable_html: "Embeddable HTML"
-      licence: "Licence"
-      export_details: 'OpenStreetMap data is licensed under the <a href="https://opendatacommons.org/licenses/odbl/1.0/">Open Data Commons Open Database License</a> (ODbL).'
-      too_large:
-        advice: "If the above export fails, please consider using one of the sources listed below:"
-        body: "This area is too large to be exported as OpenStreetMap XML Data. Please zoom in or select a smaller area, or use one of the sources listed below for bulk data downloads."
-        planet:
-          title: "Planet OSM"
-          description: "Regularly-updated copies of the complete OpenStreetMap database"
-        overpass:
-          title: "Overpass API"
-          description: "Download this bounding box from a mirror of the OpenStreetMap database"
-        geofabrik:
-          title: "Geofabrik Downloads"
-          description: "Regularly-updated extracts of continents, countries, and selected cities"
-        metro:
-          title: "Metro Extracts"
-          description: "Extracts for major world cities and their surrounding areas"
-        other:
-          title: "Other Sources"
-          description: "Additional sources listed on the OpenStreetMap wiki"
-      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"
   geocoder:
     search:
       title:
@@ -1417,6 +1376,46 @@ en:
       potlatch2_unsaved_changes: "You have unsaved changes. (To save in Potlatch 2, you should click save.)"
       id_not_configured: "iD has not been configured"
       no_iframe_support: "Your browser doesn't support HTML iframes, which are necessary for this feature."
+    export:
+      title: "Export"
+      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"
+      map_image: "Map Image (shows standard layer)"
+      embeddable_html: "Embeddable HTML"
+      licence: "Licence"
+      export_details: 'OpenStreetMap data is licensed under the <a href="https://opendatacommons.org/licenses/odbl/1.0/">Open Data Commons Open Database License</a> (ODbL).'
+      too_large:
+        advice: "If the above export fails, please consider using one of the sources listed below:"
+        body: "This area is too large to be exported as OpenStreetMap XML Data. Please zoom in or select a smaller area, or use one of the sources listed below for bulk data downloads."
+        planet:
+          title: "Planet OSM"
+          description: "Regularly-updated copies of the complete OpenStreetMap database"
+        overpass:
+          title: "Overpass API"
+          description: "Download this bounding box from a mirror of the OpenStreetMap database"
+        geofabrik:
+          title: "Geofabrik Downloads"
+          description: "Regularly-updated extracts of continents, countries, and selected cities"
+        metro:
+          title: "Metro Extracts"
+          description: "Extracts for major world cities and their surrounding areas"
+        other:
+          title: "Other Sources"
+          description: "Additional sources listed on the OpenStreetMap wiki"
+      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"
     sidebar:
       search_results: Search Results
       close: Close