]> git.openstreetmap.org Git - rails.git/commitdiff
Lazy translation lookups and key renames for help page.
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 25 Apr 2018 08:48:52 +0000 (16:48 +0800)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 25 Apr 2018 09:09:29 +0000 (17:09 +0800)
app/views/site/help.html.erb
config/locales/en.yml

index dff2108cacbc7831b48cbb9572ffd9069698f470..085ea63d53eb69bccd5660d2e2765dc937f071c5 100644 (file)
@@ -1,18 +1,18 @@
 <% content_for :heading do %>
-  <h1><%= t "help_page.title" %></h1>
+  <h1><%= t ".title" %></h1>
 <% end %>
 
-<p class='introduction'><%= t "help_page.introduction" %></p>
+<p class='introduction'><%= t ".introduction" %></p>
 
 <% ['welcome', 'beginners_guide', 'help', 'mailing_lists', 'forums', 'irc', 'switch2osm', 'wiki'].each do |site| %>
   <% unless site == 'welcome' && !current_user %>
   <div class='<%= site %> help-item'>
   <h3>
-    <a href='<%= t "help_page.#{site}.url" %>'>
-      <%= t "help_page.#{site}.title" %>
+    <a href='<%= t ".#{site}.url" %>'>
+      <%= t ".#{site}.title" %>
     </a>
   </h3>
-  <p><%= t "help_page.#{site}.description" %></p>
+  <p><%= t ".#{site}.description" %></p>
   </div>
   <% end %>
 <% end %>
index a56aa0a572c7e92fb5427473eab7e4f6cef9295d..c273836a64f1befcc09cfadd9b0528af1df32b7d 100644 (file)
@@ -968,43 +968,6 @@ en:
       text: Make a Donation
     learn_more: "Learn More"
     more: More
-  help_page:
-    title: Getting Help
-    introduction: |
-      OpenStreetMap has several resources for learning about the project, asking and answering questions,
-      and collaboratively discussing and documenting mapping topics.
-    welcome:
-      url: /welcome
-      title: Welcome to OSM
-      description: Start with this quick guide covering the OpenStreetMap basics.
-    beginners_guide:
-      url: https://wiki.openstreetmap.org/wiki/Beginners%27_guide
-      title: Beginners' Guide
-      description: Community maintained guide for beginners.
-    help:
-      url: https://help.openstreetmap.org/
-      title: help.openstreetmap.org
-      description: Ask a question or look up answers on OSM's question-and-answer site.
-    mailing_lists:
-      url: https://lists.openstreetmap.org/
-      title: Mailing Lists
-      description: Ask a question or discuss interesting matters on a wide range of topical or regional mailing lists.
-    forums:
-      url: https://forum.openstreetmap.org/
-      title: Forums
-      description: Questions and discussions for those that prefer a bulletin board style interface.
-    irc:
-      url: https://irc.openstreetmap.org/
-      title: IRC
-      description: Interactive chat in many different languages and on many topics.
-    switch2osm:
-      url: https://switch2osm.org/
-      title: switch2osm
-      description: Help for companies and organisations switching to OpenStreetMap based maps and other services.
-    wiki:
-      url: https://wiki.openstreetmap.org/
-      title: wiki.openstreetmap.org
-      description: Browse the wiki for in-depth OSM documentation.
   notifier:
     diary_comment_notification:
       subject: "[OpenStreetMap] %{user} commented on a diary entry"
@@ -1416,6 +1379,43 @@ en:
           If you have concerns about how our data is being used or about the contents please consult our
           <a href='/copyright'>copyright page</a> for more legal information, or contact the appropriate
           <a href='https://wiki.osmfoundation.org/wiki/Working_Groups'>OSMF working group</a>.
+    help:
+      title: Getting Help
+      introduction: |
+        OpenStreetMap has several resources for learning about the project, asking and answering questions,
+        and collaboratively discussing and documenting mapping topics.
+      welcome:
+        url: /welcome
+        title: Welcome to OSM
+        description: Start with this quick guide covering the OpenStreetMap basics.
+      beginners_guide:
+        url: https://wiki.openstreetmap.org/wiki/Beginners%27_guide
+        title: Beginners' Guide
+        description: Community maintained guide for beginners.
+      help:
+        url: https://help.openstreetmap.org/
+        title: help.openstreetmap.org
+        description: Ask a question or look up answers on OSM's question-and-answer site.
+      mailing_lists:
+        url: https://lists.openstreetmap.org/
+        title: Mailing Lists
+        description: Ask a question or discuss interesting matters on a wide range of topical or regional mailing lists.
+      forums:
+        url: https://forum.openstreetmap.org/
+        title: Forums
+        description: Questions and discussions for those that prefer a bulletin board style interface.
+      irc:
+        url: https://irc.openstreetmap.org/
+        title: IRC
+        description: Interactive chat in many different languages and on many topics.
+      switch2osm:
+        url: https://switch2osm.org/
+        title: switch2osm
+        description: Help for companies and organisations switching to OpenStreetMap based maps and other services.
+      wiki:
+        url: https://wiki.openstreetmap.org/
+        title: wiki.openstreetmap.org
+        description: Browse the wiki for in-depth OSM documentation.
     sidebar:
       search_results: Search Results
       close: Close