]> git.openstreetmap.org Git - rails.git/commitdiff
Use lazy lookups and rename keys for the welcome page.
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 25 Apr 2018 08:20:17 +0000 (16:20 +0800)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 25 Apr 2018 08:33:34 +0000 (16:33 +0800)
app/views/site/fixthemap.html.erb
app/views/site/welcome.html.erb
config/locales/en.yml

index fc5fecc9a48a9c308297445974bd4618f72e1851..f47068252590c673228f9c9d325bf8c161b2d58a 100644 (file)
@@ -21,8 +21,8 @@
     </div>
   </div>
   <div class='col6 inner11'>
     </div>
   </div>
   <div class='col6 inner11'>
-    <h3><%= t "welcome_page.add_a_note.title" %></h3>
-    <p><%= t "welcome_page.add_a_note.paragraph_1_html" %></p>
+    <h3><%= t "site.welcome.add_a_note.title" %></h3>
+    <p><%= t "site.welcome.add_a_note.paragraph_1_html" %></p>
     <p><%= t "fixthemap.how_to_help.add_a_note.instructions_html", :map_url => root_path %></p>
   </div>
 </div>
     <p><%= t "fixthemap.how_to_help.add_a_note.instructions_html", :map_url => root_path %></p>
   </div>
 </div>
@@ -31,7 +31,7 @@
 <p><%= t "fixthemap.other_concerns.explanation_html" %></p>
 
 <div class='col12 clearfix icon-list'>
 <p><%= t "fixthemap.other_concerns.explanation_html" %></p>
 
 <div class='col12 clearfix icon-list'>
-  <h3><%= t "welcome_page.questions.title" %></h3>
+  <h3><%= t "site.welcome.questions.title" %></h3>
   <span class='sprite small term question'></span>
   <span class='sprite small term question'></span>
-  <p><%= t "welcome_page.questions.paragraph_1_html", :help_url => help_path %></p>
+  <p><%= t "site.welcome.questions.paragraph_1_html", :help_url => help_path %></p>
 </div>
 </div>
index 92220039a0ea86609dc3093bca70173d351c3b81..dc6a519dfeed144f584cd803b96cf47dff8bbc68 100644 (file)
@@ -3,71 +3,71 @@
 <% end %>
 
 <% content_for :heading do %>
 <% end %>
 
 <% content_for :heading do %>
-  <h1><%= t "welcome_page.title" %></h1>
+  <h1><%= t ".title" %></h1>
 <% end %>
 
 <% end %>
 
-<p><%= t "welcome_page.introduction_html" %></p>
+<p><%= t ".introduction_html" %></p>
 
 
-<h3><%= t "welcome_page.whats_on_the_map.title" %></h3>
+<h3><%= t ".whats_on_the_map.title" %></h3>
 
 <div class=' clearfix'>
   <div class='col6 inner11'>
     <div class='center clearfix inner11'>
       <span class='sprite small check'></span>
     </div>
 
 <div class=' clearfix'>
   <div class='col6 inner11'>
     <div class='center clearfix inner11'>
       <span class='sprite small check'></span>
     </div>
-    <p><%= t "welcome_page.whats_on_the_map.on_html" %></p>
+    <p><%= t ".whats_on_the_map.on_html" %></p>
   </div>
   <div class='col6 inner11'>
     <div class='center clearfix inner11'>
       <span class='sprite small x'></span>
     </div>
   </div>
   <div class='col6 inner11'>
     <div class='center clearfix inner11'>
       <span class='sprite small x'></span>
     </div>
-    <p><%= t "welcome_page.whats_on_the_map.off_html" %></p>
+    <p><%= t ".whats_on_the_map.off_html" %></p>
   </div>
 </div>
 
   </div>
 </div>
 
-<h3><%= t "welcome_page.basic_terms.title" %></h3>
+<h3><%= t ".basic_terms.title" %></h3>
 
 
-<p><%= t "welcome_page.basic_terms.paragraph_1_html" %></p>
+<p><%= t ".basic_terms.paragraph_1_html" %></p>
 
 <div class='col12 clearfix icon-list'>
   <div class='clearfix'>
     <span class='sprite small term editor'></span>
 
 <div class='col12 clearfix icon-list'>
   <div class='clearfix'>
     <span class='sprite small term editor'></span>
-    <p><%= t "welcome_page.basic_terms.editor_html" %></p>
+    <p><%= t ".basic_terms.editor_html" %></p>
   </div>
   <div class='clearfix'>
     <span class='sprite small term node'></span>
   </div>
   <div class='clearfix'>
     <span class='sprite small term node'></span>
-    <p><%= t "welcome_page.basic_terms.node_html" %></p>
+    <p><%= t ".basic_terms.node_html" %></p>
   </div>
   <div class='clearfix'>
     <span class='sprite small term way'></span>
   </div>
   <div class='clearfix'>
     <span class='sprite small term way'></span>
-    <p><%= t "welcome_page.basic_terms.way_html" %></p>
+    <p><%= t ".basic_terms.way_html" %></p>
   </div>
   <div class='clearfix'>
     <span class='sprite small term tag'></span>
   </div>
   <div class='clearfix'>
     <span class='sprite small term tag'></span>
-    <p><%= t "welcome_page.basic_terms.tag_html" %></p>
+    <p><%= t ".basic_terms.tag_html" %></p>
   </div>
 </div>
 
 <div class='col12 clearfix icon-list'>
   </div>
 </div>
 
 <div class='col12 clearfix icon-list'>
-  <h3><%= t "welcome_page.rules.title" %></h3>
+  <h3><%= t ".rules.title" %></h3>
   <span class='sprite small term rules'></span>
   <span class='sprite small term rules'></span>
-  <p><%= t "welcome_page.rules.paragraph_1_html" %></p>
+  <p><%= t ".rules.paragraph_1_html" %></p>
 </div>
 
 <div class='col12 clearfix icon-list'>
 </div>
 
 <div class='col12 clearfix icon-list'>
-  <h3><%= t "welcome_page.questions.title" %></h3>
+  <h3><%= t ".questions.title" %></h3>
   <span class='sprite small term question'></span>
   <span class='sprite small term question'></span>
-  <p><%= t "welcome_page.questions.paragraph_1_html", :help_url => help_path %></p>
+  <p><%= t ".questions.paragraph_1_html", :help_url => help_path %></p>
 </div>
 
 <div class='clearfix center'>
 </div>
 
 <div class='clearfix center'>
-  <a href="<%= edit_path %>" class="button start-mapping"><%= t "welcome_page.start_mapping" %></a>
+  <a href="<%= edit_path %>" class="button start-mapping"><%= t ".start_mapping" %></a>
 </div>
 
 <div class='note-box'>
   <div class='inner22'>
 </div>
 
 <div class='note-box'>
   <div class='inner22'>
-    <h3><%= t "welcome_page.add_a_note.title" %></h3>
-    <p><%= t "welcome_page.add_a_note.paragraph_1_html" %></p>
-    <p><%= t "welcome_page.add_a_note.paragraph_2_html", :map_url => root_path %></p>
+    <h3><%= t ".add_a_note.title" %></h3>
+    <p><%= t ".add_a_note.paragraph_1_html" %></p>
+    <p><%= t ".add_a_note.paragraph_2_html", :map_url => root_path %></p>
   </div>
 </div>
   </div>
 </div>
index 01f49a9b73d9e375f3ef4e611b70606c55132a62..2270c9d332e775abfd0a3a091c0d175355d22539 100644 (file)
@@ -1135,59 +1135,6 @@ en:
       trademarks_title_html: <span id="trademarks"></span>Trademarks
       trademarks_1_html: |
         OpenStreetMap, the magnifying glass logo and State of the Map are registered trademarks of the OpenStreetMap Foundation. If you have questions about your use of the marks, please see our <a href="https://wiki.osmfoundation.org/wiki/Trademark_Policy">Trademark Policy</a>.
       trademarks_title_html: <span id="trademarks"></span>Trademarks
       trademarks_1_html: |
         OpenStreetMap, the magnifying glass logo and State of the Map are registered trademarks of the OpenStreetMap Foundation. If you have questions about your use of the marks, please see our <a href="https://wiki.osmfoundation.org/wiki/Trademark_Policy">Trademark Policy</a>.
-  welcome_page:
-    title: Welcome!
-    introduction_html: |
-      Welcome to OpenStreetMap, the free and editable map of the world. Now that you're signed
-      up, you're all set to get started mapping. Here's a quick guide with the most important
-      things you need to know.
-    whats_on_the_map:
-      title: What's on the Map
-      on_html: |
-        OpenStreetMap is a place for mapping things that are both <em>real and current</em> -
-        it includes millions of buildings, roads, and other details about places. You can map
-        whatever real-world features are interesting to you.
-      off_html: |
-        What it <em>doesn't</em> include is opinionated data like ratings, historical or
-        hypothetical features, and data from copyrighted sources. Unless you have special
-        permission, don't copy from online or paper maps.
-    basic_terms:
-      title: Basic Terms For Mapping
-      paragraph_1_html: |
-        OpenStreetMap has some of its own lingo. Here are a few key words that'll come in handy.
-      editor_html: |
-        An <strong>editor</strong> is a program or website you can use to edit the map.
-      node_html: |
-        A <strong>node</strong> is a point on the map, like a single restaurant or a tree.
-      way_html: |
-        A <strong>way</strong> is a line or area, like a road, stream, lake or building.
-      tag_html: |
-        A <strong>tag</strong> is a bit of data about a node or way, like a
-        restaurant's name or a road's speed limit.
-    rules:
-      title: Rules!
-      paragraph_1_html: |
-        OpenStreetMap has few formal rules but we expect all participants to collaborate
-        with, and communicate with, the community. If you are considering
-        any activities other than editing by hand, please read and follow the guidelines on
-        <a href='https://wiki.openstreetmap.org/wiki/Import/Guidelines'>Imports</a> and
-        <a href='https://wiki.openstreetmap.org/wiki/Automated_Edits_code_of_conduct'>Automated Edits</a>.
-    questions:
-      title: Any questions?
-      paragraph_1_html: |
-        OpenStreetMap has several resources for learning about the project, asking and answering
-        questions, and collaboratively discussing and documenting mapping topics.
-        <a href='%{help_url}'>Get help here</a>.
-    start_mapping: Start Mapping
-    add_a_note:
-      title: No Time To Edit? Add a Note!
-      paragraph_1_html: |
-        If you just want something small fixed and don't have the time to sign up and learn how to edit, it's
-        easy to add a note.
-      paragraph_2_html: |
-        Just go to <a href='%{map_url}'>the map</a> and click the note icon:
-        <span class='icon note'></span>. This will add a marker to the map, which you can move
-        by dragging. Add your message, then click save, and other mappers will investigate.
   fixthemap:
     title: Report a problem / Fix the map
     how_to_help:
   fixthemap:
     title: Report a problem / Fix the map
     how_to_help:
@@ -1570,6 +1517,59 @@ en:
       image: Image
       alt: Alt text
       url: URL
       image: Image
       alt: Alt text
       url: URL
+    welcome:
+      title: Welcome!
+      introduction_html: |
+        Welcome to OpenStreetMap, the free and editable map of the world. Now that you're signed
+        up, you're all set to get started mapping. Here's a quick guide with the most important
+        things you need to know.
+      whats_on_the_map:
+        title: What's on the Map
+        on_html: |
+          OpenStreetMap is a place for mapping things that are both <em>real and current</em> -
+          it includes millions of buildings, roads, and other details about places. You can map
+          whatever real-world features are interesting to you.
+        off_html: |
+          What it <em>doesn't</em> include is opinionated data like ratings, historical or
+          hypothetical features, and data from copyrighted sources. Unless you have special
+          permission, don't copy from online or paper maps.
+      basic_terms:
+        title: Basic Terms For Mapping
+        paragraph_1_html: |
+          OpenStreetMap has some of its own lingo. Here are a few key words that'll come in handy.
+        editor_html: |
+          An <strong>editor</strong> is a program or website you can use to edit the map.
+        node_html: |
+          A <strong>node</strong> is a point on the map, like a single restaurant or a tree.
+        way_html: |
+          A <strong>way</strong> is a line or area, like a road, stream, lake or building.
+        tag_html: |
+          A <strong>tag</strong> is a bit of data about a node or way, like a
+          restaurant's name or a road's speed limit.
+      rules:
+        title: Rules!
+        paragraph_1_html: |
+          OpenStreetMap has few formal rules but we expect all participants to collaborate
+          with, and communicate with, the community. If you are considering
+          any activities other than editing by hand, please read and follow the guidelines on
+          <a href='https://wiki.openstreetmap.org/wiki/Import/Guidelines'>Imports</a> and
+          <a href='https://wiki.openstreetmap.org/wiki/Automated_Edits_code_of_conduct'>Automated Edits</a>.
+      questions:
+        title: Any questions?
+        paragraph_1_html: |
+          OpenStreetMap has several resources for learning about the project, asking and answering
+          questions, and collaboratively discussing and documenting mapping topics.
+          <a href='%{help_url}'>Get help here</a>.
+      start_mapping: Start Mapping
+      add_a_note:
+        title: No Time To Edit? Add a Note!
+        paragraph_1_html: |
+          If you just want something small fixed and don't have the time to sign up and learn how to edit, it's
+          easy to add a note.
+        paragraph_2_html: |
+          Just go to <a href='%{map_url}'>the map</a> and click the note icon:
+          <span class='icon note'></span>. This will add a marker to the map, which you can move
+          by dragging. Add your message, then click save, and other mappers will investigate.
   trace:
     visibility:
       private: "Private (only shared as anonymous, unordered points)"
   trace:
     visibility:
       private: "Private (only shared as anonymous, unordered points)"