]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/2187'
authorTom Hughes <tom@compton.nu>
Wed, 27 Mar 2019 10:38:46 +0000 (10:38 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 27 Mar 2019 10:38:46 +0000 (10:38 +0000)
39 files changed:
.erb-lint.yml
app/views/browse/_common_details.html.erb
app/views/browse/_node.html.erb
app/views/browse/_relation_member.html.erb
app/views/browse/_way.html.erb
app/views/browse/changeset.html.erb
app/views/diary_entries/comments.html.erb
app/views/diary_entries/index.html.erb
app/views/issues/_comments.html.erb
app/views/issues/index.html.erb
app/views/issues/show.html.erb
app/views/layouts/_head.html.erb
app/views/layouts/_search.html.erb
app/views/layouts/notifier.html.erb
app/views/messages/_message_summary.html.erb
app/views/messages/_sent_message_summary.html.erb
app/views/notes/_notes_paging_nav.html.erb
app/views/notifier/_message_body.html.erb
app/views/reports/new.html.erb
app/views/site/about.html.erb
app/views/site/copyright.html.erb
app/views/site/edit.html.erb
app/views/site/export.html.erb
app/views/site/fixthemap.html.erb
app/views/site/help.html.erb
app/views/site/id.html.erb
app/views/site/index.html.erb
app/views/site/key.html.erb
app/views/site/offline.html.erb
app/views/traces/_trace.html.erb
app/views/traces/_trace_paging_nav.html.erb
app/views/traces/show.html.erb
app/views/user_blocks/_blocks.html.erb
app/views/user_blocks/show.html.erb
app/views/users/account.html.erb
app/views/users/login.html.erb
app/views/users/lost_password.html.erb
app/views/users/new.html.erb
app/views/users/reset_password.html.erb

index 29057feb246052d4a2d8f5b4b70d360a6c16e479..f1da5efb3c5bb0ccbaf764ecb9b61c7f6483a38b 100644 (file)
@@ -26,25 +26,36 @@ linters:
       Rails/OutputSafety:
         Enabled: false
       Style/StringLiterals:
-        Enabled: false # TODO
-      Style/BracesAroundHashParameters:
-        Enabled: false # TODO
+        Exclude: # TODO
+          - app/views/browse/*
+          - app/views/changesets/*
+          - app/views/changeset_comments/*
+          - app/views/diary_entries/*
+          - app/views/geocoder/*
+          - app/views/issues/*
+          - app/views/layouts/*
+          - app/views/messages/*
+          - app/views/notes/*
+          - app/views/notifier/*
+          - app/views/oauth/*
+          - app/views/oauth_clients/*
+          - app/views/redactions/*
+          - app/views/reports/*
+          - app/views/traces/*
+          - app/views/user_blocks/*
+          - app/views/users/*
       Rails/DynamicFindBy:
         Enabled: false # TODO
       Style/AndOr:
         Enabled: false # TODO
       Style/WordArray:
         Enabled: false # TODO
-      Style/MethodCallWithoutArgsParentheses:
-        Enabled: false # TODO
       Layout/LeadingBlankLines:
         Enabled: false # TODO
       Style/NestedParenthesizedCalls:
         Enabled: false # TODO
       Rails/LinkToBlank:
         Enabled: false # TODO
-      Style/HashSyntax:
-        Enabled: false # TODO
       Style/SymbolProc:
         Enabled: false # TODO
       Style/Not:
index 3b3030abf19d7b54eae58080823cd5f2f58e97f4..e035076b6f0f51c37d6548c7eee7640c6ca48633 100644 (file)
@@ -26,7 +26,7 @@
 <% if @type == "node" and common_details.visible? %>
 <div class="details geo">
   <%= t 'browse.location' %>
-  <%= link_to(content_tag(:span, number_with_delimiter(common_details.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(common_details.lon), :class => "longitude"), { :controller => 'site', :action => 'index', :anchor => "map=18/#{common_details.lat}/#{common_details.lon}" }) %>
+  <%= link_to(content_tag(:span, number_with_delimiter(common_details.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(common_details.lon), :class => "longitude"), :controller => 'site', :action => 'index', :anchor => "map=18/#{common_details.lat}/#{common_details.lon}") %>
 </div>
 <% end %>
 
index 873360bb22ad0d687fba1d4f299510423fa44eeb..e0eb55c1b4f941cd74f7431a9d62e0ceb1f47897 100644 (file)
@@ -14,7 +14,7 @@
       <h4><%= t 'browse.part_of' %></h4>
       <ul>
         <% node.ways.uniq.each do |way| %>
-          <li><%= link_to printable_name(way), { :action => "way", :id => way.id.to_s }, :class => link_class('way', way), :title => link_title(way) %></li>
+          <li><%= link_to printable_name(way), { :action => "way", :id => way.id.to_s }, { :class => link_class('way', way), :title => link_title(way) } %></li>
         <% end %>
         <%= render :partial => "containing_relation", :collection => node.containing_relation_members.uniq %>
       </ul>
index 5b6b5c3656f73bfe099f6e1fea67de5bc67ae1e9..ef8c67e59c0ca00c3f33520f7f740e6eecab547d 100644 (file)
@@ -1,6 +1,6 @@
 <%
   member_class = link_class(relation_member.member_type.downcase, relation_member.member)
-  linked_name = link_to printable_name(relation_member.member), { :action => relation_member.member_type.downcase, :id => relation_member.member_id.to_s }, :title => link_title(relation_member.member), :rel => link_follow(relation_member.member)
+  linked_name = link_to printable_name(relation_member.member), { :action => relation_member.member_type.downcase, :id => relation_member.member_id.to_s }, { :title => link_title(relation_member.member), :rel => link_follow(relation_member.member) }
   type_str = t '.type.' + relation_member.member_type.downcase
 %>
 <li class="<%= member_class %>">
index 7099f015affcfbec9a9e621c595ab7cb259f0ddf..49a1bced10e22a3172e335acb1b8b28d71c505b8 100644 (file)
       <ul>
         <% way.way_nodes.each do |wn| %>
           <li>
-            <%= link_to printable_name(wn.node), { :action => "node", :id => wn.node_id.to_s }, :class => link_class('node', wn.node), :title => link_title(wn.node), :rel => link_follow(wn.node) %>
+            <%= link_to printable_name(wn.node), { :action => "node", :id => wn.node_id.to_s }, { :class => link_class('node', wn.node), :title => link_title(wn.node), :rel => link_follow(wn.node) } %>
             <% related_ways = wn.node.ways.reject { |w| w.id == wn.way_id } %>
             <% if related_ways.size > 0 then %>
-              (<%= raw t '.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(printable_name(w), { :action => "way", :id => w.id.to_s }, :class => link_class('way', w), :title => link_title(w)) }.to_sentence %>)
+              (<%= raw t '.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(printable_name(w), { :action => "way", :id => w.id.to_s }, { :class => link_class('way', w), :title => link_title(w) }) }.to_sentence %>)
             <% end %>
           </li>
         <% end %>
index 1d09cbedf2087bedf8325683cf314ea618c9c183..4cb15306fab26768d77e0a760ad4f223862433fa 100644 (file)
@@ -91,7 +91,7 @@
     </h4>
     <ul>
       <% @ways.each do |way| %>
-        <li><%= link_to printable_name(way, true), { :action => "way", :id => way.way_id.to_s }, :class => link_class('way', way), :title => link_title(way) %></li>
+        <li><%= link_to printable_name(way, true), { :action => "way", :id => way.way_id.to_s }, { :class => link_class('way', way), :title => link_title(way) } %></li>
       <% end %>
     </ul>
   <% end %>
     </h4>
     <ul>
       <% @relations.each do |relation| %>
-        <li><%= link_to printable_name(relation, true), { :action => "relation", :id => relation.relation_id.to_s }, :class => link_class('relation', relation), :title => link_title(relation) %></li>
+        <li><%= link_to printable_name(relation, true), { :action => "relation", :id => relation.relation_id.to_s }, { :class => link_class('relation', relation), :title => link_title(relation) } %></li>
       <% end %>
     </ul>
   <% end %>
     </h4>
     <ul>
       <% @nodes.each do |node| %>
-        <li><%= link_to printable_name(node, true), { :action => "node", :id => node.node_id.to_s }, :class => link_class('node', node), :title => link_title(node), :rel => link_follow(node) %></li>
+        <li><%= link_to printable_name(node, true), { :action => "node", :id => node.node_id.to_s }, { :class => link_class('node', node), :title => link_title(node), :rel => link_follow(node) } %></li>
       <% end %>
     </ul>
   <% end %>
index 31ee778a45170e7d73c94c363904ea09ae9a1575..63df5f9c6026852712856a9d1b2eb6330e765e46 100644 (file)
@@ -19,6 +19,6 @@
 </table>
 
 <div class='secondary-actions clearfix'>
-  <span><%= link_to t('.older_comments'), { :page => @comment_pages.current.next } if @comment_pages.current.next %>
-  <%= link_to t('.newer_comments'), { :page => @comment_pages.current.previous } if @comment_pages.current.previous %></span>
+  <span><%= link_to t('.older_comments'), :page => @comment_pages.current.next if @comment_pages.current.next %>
+  <%= link_to t('.newer_comments'), :page => @comment_pages.current.previous if @comment_pages.current.previous %></span>
 </div>
index 1f7a35ae3513e74796cde135125a7578de083aa1..59fa96a834d36662777fba9af512e0260b722a17 100644 (file)
       <% if @user %>
         <% if @user == current_user %>
           <div>
-            <li><%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t('.new'), diary_new_path, { :title => t('.new_title') } %></li>
+            <li><%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t('.new'), diary_new_path, :title => t('.new_title') %></li>
           </div>
         <% end %>
       <% else %>
         <% if current_user %>
           <div>
-            <li><%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t('.new'), diary_new_path, { :title => t('.new_title') } %></li>
+            <li><%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t('.new'), diary_new_path, :title => t('.new_title') %></li>
           </div>
         <% end %>
       <% end %>
index 5cb99f2f16eb9ad2ecfd4bea804286673208d9cd..08adfde53d5e143b9b2d4e3e3d599712a7967a73 100644 (file)
@@ -15,7 +15,7 @@
 </div>
 <br/>
 <div class="comment">
-  <%= form_for @new_comment, url: issue_comments_path(@issue) do |f| %>
+  <%= form_for @new_comment, :url => issue_comments_path(@issue) do |f| %>
   <%= richtext_area :issue_comment, :body, :cols => 10, :rows => 8, :required => true %>
   <%= label_tag :reassign, t('.reassign_param') %> <%= check_box_tag :reassign, true %>
   <br/>
index 9590632315f23ac3ca25976a91927abbed7f7d84..26833553fce17f7deb29b0c2e41aba8e99dc098b 100644 (file)
@@ -6,7 +6,7 @@
 <p><%= t ".search_guidance" %></p>
 <%= select_tag :status, options_for_select(Issue.aasm.states.map(&:name).map { |state| [t(".states.#{state}"), state] }, params[:status]), :include_blank => t(".select_status"), :data => { :behavior => 'category_dropdown' } %>
 <%= select_tag :issue_type, options_for_select(@issue_types, params[:issue_type]), :include_blank => t(".select_type"), :data => { :behavior => 'category_dropdown' } %>
-<%= text_field_tag :search_by_user, params[:search_by_user], placeholder: t(".reported_user") %>
+<%= text_field_tag :search_by_user, params[:search_by_user], :placeholder => t(".reported_user") %>
 <%= select_tag :last_updated_by, options_for_select(@users.all.collect { |f| [f.display_name, f.id] } << [t(".not_updated"), "nil"], params[:last_updated_by]), :include_blank => t(".select_last_updated_by"), :data => { :behavior => 'category_dropdown' } %>
 <%= submit_tag t(".search"), :name => nil %>
 <% end %>
index e8cfafb45cfa1d0f406aebeab86ebdfe5d57a710..3af1c402d6d139a71cbbe686c2ceb6f5a32ad459 100644 (file)
     <% if @read_reports.present? %>
     <div class="read-reports">
       <h4><%= t ".read_reports" %></h4>
-      <%= render 'reports', reports: @read_reports %>
+      <%= render 'reports', :reports => @read_reports %>
     </div>
     <% end %>
 
     <% if @unread_reports.any? %>
     <div class="unread-reports">
       <h4><%= t ".new_reports" %></h4>
-      <%= render 'reports', reports: @unread_reports %>
+      <%= render 'reports', :reports => @unread_reports %>
     </div>
     <% end %>
     <br/>
@@ -59,4 +59,4 @@
 </div>
 
 <h3><%= t ".comments_on_this_issue" %></h3>
-<%= render 'comments', comments: @comments %>
+<%= render 'comments', :comments => @comments %>
index 86d4665cf0aea7dc3247d7961d30140c46741da4..fc79addb80a6aa0c7223b566b3a6871c5a08dba3 100644 (file)
   <%= favicon_link_tag "favicon-96x96.png", :rel => "icon", :sizes => "96x96", :type => "image/png" %>
   <%= favicon_link_tag "android-chrome-192x192.png", :rel => "icon", :sizes => "192x192", :type => "image/png" %>
   <%= favicon_link_tag "favicon-16x16.png", :rel => "icon", :sizes => "16x16", :type => "image/png" %>
-  <%= tag("link", { :rel => "mask-icon", :href => asset_path("tab-icon.svg"), :color => "#7ebc6f" }) %>
-  <%= tag("link", { :rel => "manifest", :href => asset_path("manifest.json") }) %>
-  <%= tag("meta", { :name => "msapplication-config", :content => asset_path("browserconfig.xml") }) %>
-  <%= tag("meta", { :name => "msapplication-TileColor", :content => "#00a300" }) %>
-  <%= tag("meta", { :name => "msapplication-TileImage", :content => image_path("mstile-144x144.png") }) %>
-  <%= tag("meta", { :name => "theme-color", :content => "#ffffff" }) %>
+  <%= tag("link", :rel => "mask-icon", :href => asset_path("tab-icon.svg"), :color => "#7ebc6f") %>
+  <%= tag("link", :rel => "manifest", :href => asset_path("manifest.json")) %>
+  <%= tag("meta", :name => "msapplication-config", :content => asset_path("browserconfig.xml")) %>
+  <%= tag("meta", :name => "msapplication-TileColor", :content => "#00a300") %>
+  <%= tag("meta", :name => "msapplication-TileImage", :content => image_path("mstile-144x144.png")) %>
+  <%= tag("meta", :name => "theme-color", :content => "#ffffff") %>
   <%= canonical_tag %>
   <% if Settings.key?(:publisher_url) -%>
-  <%= tag("link", { :rel => "publisher", :href => Settings.publisher_url }) %>
+  <%= tag("link", :rel => "publisher", :href => Settings.publisher_url) %>
   <% end -%>
-  <%= tag("link", { :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => asset_path("osm.xml") }) %>
-  <%= tag("meta", { :name => "description", :content => "OpenStreetMap is the free wiki world map." }) %>
+  <%= tag("link", :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => asset_path("osm.xml")) %>
+  <%= tag("meta", :name => "description", :content => "OpenStreetMap is the free wiki world map.") %>
   <%= opengraph_tags(@title) %>
   <% if flash[:piwik_goal] -%>
   <%= tag("meta", :name => "piwik-goal", :content => flash[:piwik_goal]) %>
index 36614fd56b5a854b41957a73fdd0cb20e22c248c..924236c111a57a26da820c3c437aa2e1173f7f5d 100644 (file)
@@ -1,10 +1,10 @@
 <div class="search_forms">
   <form method="GET" action="<%= search_path %>" class="search_form">
-    <%= link_to image_tag('directions.png', :class => 'button'), directions_path, { :class => "button switch_link", :title => t('site.search.get_directions_title') } %>
-    <%= submit_tag t('site.search.submit_text'), :class => 'float', :data => { disable_with: false } %>
+    <%= link_to image_tag('directions.png', :class => 'button'), directions_path, :class => "button switch_link", :title => t('site.search.get_directions_title') %>
+    <%= submit_tag t('site.search.submit_text'), :class => 'float', :data => { :disable_with => false } %>
     <div class='query_wrapper'>
       <%= text_field_tag "query", params[:query], :placeholder => t("site.search.search"), :autofocus => autofocus, :class => 'overflow' %>
-      <%= link_to t('site.search.where_am_i'), '#', { :class => "describe_location", :title => t('site.search.where_am_i_title') } %>
+      <%= link_to t('site.search.where_am_i'), '#', :class => "describe_location", :title => t('site.search.where_am_i_title') %>
     </div>
   </form>
 
@@ -21,7 +21,7 @@
     </div>
     <div class="line">
       <select class="routing_engines" name="routing_engines"></select>
-      <%= submit_tag t('site.search.submit_text'), :class => "routing_go", :data => { disable_with: false } %>
+      <%= submit_tag t('site.search.submit_text'), :class => "routing_go", :data => { :disable_with => false } %>
     </div>
     <div class="line">
       <a class="reverse_directions"><%= t('site.search.reverse_directions_text') %></a>
index 883f1b385acaeaa73fab4a3bebcd8723ebe16532..21b4e35ceb95a65cfb7910968ccaf6093a822461 100644 (file)
@@ -12,7 +12,7 @@
             <tr>
               <td style="width: 30px; padding: 10px 10px 10px 0px">
                 <a href="<%= @root_url %>" target="_blank">
-                  <%= image_tag attachments["logo.png"].url, alt: "OpenStreetMap", title: "OpenStreetMap", height: "30", width: "30", border: "0" %>
+                  <%= image_tag attachments["logo.png"].url, :alt => "OpenStreetMap", :title => "OpenStreetMap", :height => "30", :width => "30", :border => "0" %>
                 </a>
               </td>
               <%# the "width: 100%" here looks wrong, but I couldn't find a better way of making Outlook give this cell full width %>
index 6ed41a0e0bf984eb8296dbf575597d92791dad44..dfccb31652da68131c9f7d97680e699415e6dadd 100644 (file)
@@ -2,7 +2,7 @@
   <td class="inbox-sender"><%= link_to h(message_summary.sender.display_name), user_path(message_summary.sender) %></td>
   <td class="inbox-subject"><%= link_to h(message_summary.title), message_path(message_summary) %></td>
   <td class="inbox-sent"><%= l message_summary.sent_on, :format => :friendly %></td>
-  <td class="inbox-mark-unread"><%= button_to t('.unread_button'), message_mark_path(message_summary, :mark => 'unread'), { :remote => true } %></td>
-  <td class="inbox-mark-read"><%= button_to t('.read_button'), message_mark_path(message_summary, :mark => 'read'), { :remote => true } %></td>
-  <td class="inbox-destroy"><%= button_to t('.destroy_button'), message_path(message_summary, :referer => request.fullpath), { :method => :delete, :remote => true } %></td>
+  <td class="inbox-mark-unread"><%= button_to t('.unread_button'), message_mark_path(message_summary, :mark => 'unread'), :remote => true %></td>
+  <td class="inbox-mark-read"><%= button_to t('.read_button'), message_mark_path(message_summary, :mark => 'read'), :remote => true %></td>
+  <td class="inbox-destroy"><%= button_to t('.destroy_button'), message_path(message_summary, :referer => request.fullpath), :method => :delete, :remote => true %></td>
 </tr>
index 028ab135b9ac79d9b931326404796ebefe7c31f7..42db8084dad83fe94d2e426883367f440372384f 100644 (file)
@@ -2,5 +2,5 @@
   <td class="inbox-sender"><%= link_to h(sent_message_summary.recipient.display_name), user_path(sent_message_summary.recipient) %></td>
   <td class="inbox-subject"><%= link_to h(sent_message_summary.title), message_path(sent_message_summary) %></td>
   <td class="inbox-sent"><%= l sent_message_summary.sent_on, :format => :friendly %></td>
-  <td class="inbox-destroy"><%= button_to t('.destroy_button'), message_path(sent_message_summary, :referer => request.fullpath), { :method => :delete, :remote => true } %></td>
+  <td class="inbox-destroy"><%= button_to t('.destroy_button'), message_path(sent_message_summary, :referer => request.fullpath), :method => :delete, :remote => true %></td>
 </tr>
index 694f9960258634b1858915d5f207dcc259e2e807..224e227c340227bb71241e71850d2beeb15a9f04 100644 (file)
@@ -1,7 +1,7 @@
 <p>
 
 <% if @page > 1 %>
-<%= link_to t('changesets.changeset_paging_nav.previous'), @params.merge({ :page => @page - 1 }) %>
+<%= link_to t('changesets.changeset_paging_nav.previous'), @params.merge(:page => @page - 1) %>
 <% else %>
 <%= t('changesets.changeset_paging_nav.previous') %>
 <% end %>
@@ -11,7 +11,7 @@
 <% if @notes.size < @page_size %>
 <%= t('changesets.changeset_paging_nav.next') %>
 <% else %>
-<%= link_to t('changesets.changeset_paging_nav.next'), @params.merge({ :page => @page + 1 }) %>
+<%= link_to t('changesets.changeset_paging_nav.next'), @params.merge(:page => @page + 1) %>
 <% end %>
 
 </p>
index b3b0eb687d5b44277e6cd8d76d2e4134e2575562..29bd3e06372f2177af38f13e53da47f8b5c33f95 100644 (file)
@@ -4,11 +4,11 @@
       <%= link_to(
             image_tag(
               attachments["avatar.png"].url,
-              alt: @author,
-              title: @author,
-              width: 50,
-              height: 50,
-              border: 0
+              :alt => @author,
+              :title => @author,
+              :width => 50,
+              :height => 50,
+              :border => 0
             ),
             user_url(@author),
             :target => "_blank"
index fb338b4979c2bd46376e2f96b7d5c315930ceb58..1d83a3a5932ce8ec399b80c4b7cb7e2b83fb38c8 100644 (file)
@@ -32,7 +32,7 @@
     </div>
 
     <div class='form-row'>
-      <%= text_area :report, :details, :cols => 20, :rows => 5, placeholder: t('.details') %>
+      <%= text_area :report, :details, :cols => 20, :rows => 5, :placeholder => t('.details') %>
     </div>
 
     <div class='buttons'>
index 111815c12598eb52de4e35855de19d25a4f2266a..219e0ab6b0df3cf11e5eb9f0cd58f5414e25595a 100644 (file)
 
   <div class='section' id='partners'>
     <h2><div class='icon partners'></div><%= t ".partners_title" %></h2>
-    <p><%= t 'layouts.hosting_partners_html',
-             :ucl => link_to(t('layouts.partners_ucl'), "https://www.ucl.ac.uk"),
-             :bytemark => link_to(t('layouts.partners_bytemark'), "https://www.bytemark.co.uk"),
-             :partners => link_to(t('layouts.partners_partners'), "https://hardware.openstreetmap.org/thanks/") %>
+    <p><%= t "layouts.hosting_partners_html",
+             :ucl => link_to(t("layouts.partners_ucl"), "https://www.ucl.ac.uk"),
+             :bytemark => link_to(t("layouts.partners_bytemark"), "https://www.bytemark.co.uk"),
+             :partners => link_to(t("layouts.partners_partners"), "https://hardware.openstreetmap.org/thanks/") %>
     </p>
   </div>
 </div>
index 2dcccab18fc78fa1a120e5e47ca3e61a26eb569a..feec81c82172053f7921bbd8d537772c58647d1d 100644 (file)
@@ -1,19 +1,19 @@
 <% content_for :heading do %>
-<% if @locale == 'en' %>
+<% if @locale == "en" %>
   <!-- Maybe ease foreigners back to their native page -->
 
-    <% if t('.legal_babble', :locale => I18n.locale) != t('.legal_babble', :locale => :en) %>
+    <% if t(".legal_babble", :locale => I18n.locale) != t(".legal_babble", :locale => :en) %>
       <%= tag.h1 :lang => @locale, :dir => t("html.dir", :locale => @locale) do %>
-        <h1><%= t '.native.title' %></h1>
+        <h1><%= t ".native.title" %></h1>
         <p>
-          <%= raw t '.native.text',
-                    :native_link => link_to(t('.native.native_link'),
-                                            :controller => 'site',
-                                            :action => 'copyright',
+          <%= raw t ".native.text",
+                    :native_link => link_to(t(".native.native_link"),
+                                            :controller => "site",
+                                            :action => "copyright",
                                             :copyright_locale => nil),
-                    :mapping_link => link_to(t('.native.mapping_link'),
-                                             :controller => 'site',
-                                             :action => 'index') %>
+                    :mapping_link => link_to(t(".native.mapping_link"),
+                                             :controller => "site",
+                                             :action => "index") %>
         </p>
       <% end %>
       <hr />
   <% else %>
     <!-- Maybe note that this page has been translated -->
     <%= tag.div :lang => "en", :dir => t("html.dir", :locale => "en") do %>
-      <% if t('.legal_babble', :locale => @locale) != t('.legal_babble', :locale => :en) %>
-        <h1><%= t '.foreign.title' %></h1>
+      <% if t(".legal_babble", :locale => @locale) != t(".legal_babble", :locale => :en) %>
+        <h1><%= t ".foreign.title" %></h1>
         <p>
-          <%= raw t '.foreign.text',
-                    :english_original_link => link_to(t('.foreign.english_link'),
-                                                      :controller => 'site',
-                                                      :action => 'copyright',
-                                                      :copyright_locale => 'en') %>
+          <%= raw t ".foreign.text",
+                    :english_original_link => link_to(t(".foreign.english_link"),
+                                                      :controller => "site",
+                                                      :action => "copyright",
+                                                      :copyright_locale => "en") %>
         </p>
       <% end %>
       <hr />
@@ -51,9 +51,9 @@
   <p><%= t ".legal_babble.credit_2_html", :locale => @locale %></p>
   <p><%= t ".legal_babble.credit_3_html", :locale => @locale %></p>
   <p><%= image_tag("attribution_example.png",
-                   :alt => t('.legal_babble.attribution_example.alt'),
+                   :alt => t(".legal_babble.attribution_example.alt"),
                    :border => 0,
-                   :title => t('.legal_babble.attribution_example.title')) %>
+                   :title => t(".legal_babble.attribution_example.title")) %>
 
   <h3><%= t ".legal_babble.more_title_html", :locale => @locale %></h3>
   <p><%= t ".legal_babble.more_1_html", :locale => @locale %></p>
index 5451e1b5af122c5b0a44089c80c9d17054d25572..cfc28f0246d3297d157553e04ebc7aa02514fdd9 100644 (file)
@@ -1,12 +1,12 @@
 <% content_for :content do %>
   <% if Settings.status == "database_offline" or Settings.status == "api_offline" %>
-    <p><%= t 'layouts.osm_offline' %></p>
+    <p><%= t "layouts.osm_offline" %></p>
   <% elsif Settings.status == "database_readonly" or Settings.status == "api_readonly" %>
-    <p><%= t 'layouts.osm_read_only' %></p>
+    <p><%= t "layouts.osm_read_only" %></p>
   <% elsif !current_user.data_public? %>
-    <p><%= t '.not_public' %></p>
-    <p><%= raw t '.not_public_description', :user_page => (link_to t('.user_page_link'), { :controller => 'user', :action => 'account', :display_name => current_user.display_name, :anchor => 'public' }) %></p>
-    <p><%= raw t 'site.edit.anon_edits', :link => link_to(t('.anon_edits_link_text'), t('.anon_edits_link')) %></p>
+    <p><%= t ".not_public" %></p>
+    <p><%= raw t ".not_public_description", :user_page => (link_to t(".user_page_link"), :controller => "user", :action => "account", :display_name => current_user.display_name, :anchor => "public") %></p>
+    <p><%= raw t "site.edit.anon_edits", :link => link_to(t(".anon_edits_link_text"), t(".anon_edits_link")) %></p>
   <% else %>
     <%= render :partial => preferred_editor %>
   <% end %>
index 84e3b1736521beeca2fe3d7452d869ab83a3b714..7bd4273a3d424c6101f6400b426dd8b224d70226 100644 (file)
@@ -1,53 +1,53 @@
-<% set_title(t('.title')) %>
+<% set_title(t(".title")) %>
 
 <h2>
   <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
-  <%= t '.title' %>
+  <%= t ".title" %>
 </h2>
 
-<%= form_tag({ :controller => "export", :action => "finish" }, :class => "export_form") do %>
-  <%= hidden_field_tag 'format', 'osm' %>
+<%= form_tag({ :controller => "export", :action => "finish" }, { :class => "export_form" }) do %>
+  <%= hidden_field_tag "format", "osm" %>
 
   <div class='export_area_inputs'>
     <div class='export_boxy'>
-      <%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %>
+      <%= text_field_tag("maxlat", nil, :size => 10, :class => "export_bound") %>
       <br/>
-      <%= text_field_tag('minlon', nil, :size => 10, :class => "export_bound") %>
-      <%= text_field_tag('maxlon', nil, :size => 10, :class => "export_bound") %>
+      <%= text_field_tag("minlon", nil, :size => 10, :class => "export_bound") %>
+      <%= text_field_tag("maxlon", nil, :size => 10, :class => "export_bound") %>
       <br/><br/>
-      <%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %>
+      <%= text_field_tag("minlat", nil, :size => 10, :class => "export_bound") %>
       </div>
-    <a id='drag_box' href="#"><%= t '.manually_select' %></a>
+    <a id='drag_box' href="#"><%= t ".manually_select" %></a>
   </div>
 
-  <h4><%= t '.licence' %></h4>
-  <p><%= raw t '.export_details' %></p>
+  <h4><%= t ".licence" %></h4>
+  <p><%= raw t ".export_details" %></p>
 
   <div id="export_osm_too_large">
     <p class="warning">
-      <%= t '.too_large.body' %>
+      <%= t ".too_large.body" %>
     </p>
   </div>
 
   <div id="export_commit">
     <div class="export_button">
-      <%= submit_tag t('.export_button') %>
+      <%= submit_tag t(".export_button") %>
     </div>
 
-    <p><%= t '.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 '.too_large.overpass.title' %></a></dt>
-    <dd><%= t '.too_large.overpass.description' %></dd>
+    <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://planet.openstreetmap.org/"><%= t '.too_large.planet.title' %></a></dt>
-    <dd><%= t '.too_large.planet.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://download.geofabrik.de/"><%= t '.too_large.geofabrik.title' %></a></dt>
-    <dd><%= t '.too_large.geofabrik.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>
+    <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 571a9b25fc0ed445ebf8a3d29e16e97da4f3c4ac..4bb478c7e416e8bf6f1d65ae079dafc409fb6d1e 100644 (file)
@@ -17,7 +17,7 @@
     <h3><%= t ".how_to_help.join_the_community.title" %></h3>
     <%= t ".how_to_help.join_the_community.explanation_html" %>
     <div class='clearfix center'>
-      <a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.start_mapping') %></a>
+      <a class="button sign-up" href="<%= user_new_path %>"><%= t("layouts.start_mapping") %></a>
     </div>
   </div>
   <div class='col6 inner11'>
index 3ca92398ba4c2a18993216a73e642c8a6ce530a7..dcb8142bde5366b6074c59b5ad1a1a29ecbfc726 100644 (file)
@@ -4,7 +4,7 @@
 
 <p class='introduction'><%= t ".introduction" %></p>
 
-<% ['welcome', 'beginners_guide', 'help', 'mailing_lists', 'forums', 'irc', 'switch2osm', 'welcomemat', 'wiki'].each do |site| %>
+<% %w[welcome beginners_guide help mailing_lists forums irc switch2osm welcomemat wiki].each do |site| %>
   <% unless site == 'welcome' && !current_user %>
   <div class='<%= site %> help-item'>
   <h3>
index f8d0f5858cc7ab0dc3be3e9bade086b4cd32d69b..e2ce6bb0dc1496893793b43c127ea9cd89fab246 100644 (file)
@@ -2,9 +2,9 @@
 <html>
 <head>
   <meta charset='utf-8'>
-  <%= stylesheet_link_tag 'id' %>
+  <%= stylesheet_link_tag "id" %>
   <!--[if !IE || gte IE 9]><!-->
-  <%= javascript_include_tag 'id' %>
+  <%= javascript_include_tag "id" %>
   <!-- <![endif]-->
 </head>
 <body>
index 7603bb1bdd0c26fbcb3c9fa0e0e9d9f8a94a2574..6e3f69a7dcecd393b7c6d079e3e8a3e39dfc677c 100644 (file)
@@ -1,4 +1,4 @@
 <%
-   set_title()
+   set_title
    content_for(:content_class) { "overlay-sidebar" }
 %>
index 91dfd125023d1fdc61395efc2c0707b9d17f6af6..abcf220e3306810f33a28c254a3551f21c83dd93 100644 (file)
@@ -2,7 +2,7 @@
   <table class="mapkey-table">
     <% YAML.load_file(Rails.root.join("config", "key.yml")).each do |name,data| %>
       <% data.each do |entry| %>
-        <tr class="mapkey-table-entry" data-layer="<%= name %>" data-zoom-min="<%= entry['min_zoom'] %>" data-zoom-max="<%= entry['max_zoom'] %>">
+        <tr class="mapkey-table-entry" data-layer="<%= name %>" data-zoom-min="<%= entry["min_zoom"] %>" data-zoom-max="<%= entry["max_zoom"] %>">
           <td class="mapkey-table-key">
             <%= image_tag "key/#{name}/#{entry['image']}" %>
           </td>
index bfe0bcb9fd3d00a4780bd93ad3f4b855debd8466..8e7b431a8fe1f259e6f84755b220778137f685c1 100644 (file)
@@ -1,7 +1,7 @@
 <% if Settings.status == "database_offline" %>
-<p><%= t 'layouts.osm_offline' %>
+<p><%= t "layouts.osm_offline" %>
 </p>
 <% else %>
-<p><%= t 'layouts.osm_read_only' %>
+<p><%= t "layouts.osm_read_only" %>
 </p>
 <% end %>
index 35536f3e8b363ed7230602349c7ddec2b6565285..180835c2841a4a360a0bb09938ce33bd99c9aaed 100644 (file)
@@ -9,7 +9,7 @@
       <% end %>
     <% end %>
   </td>
-  <td class="<%= cl %>"><%= link_to trace.name, { :controller => 'traces', :action => 'show', :display_name => trace.user.display_name, :id => trace.id } %>
+  <td class="<%= cl %>"><%= link_to trace.name, :controller => 'traces', :action => 'show', :display_name => trace.user.display_name, :id => trace.id %>
     <span class="trace_summary" title="<%= trace.timestamp %>"> ...
       <% if trace.inserted %>
         (<%= t '.count_points', :count => trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/, '\1,') %>)
index 4f4b83701b4c6e013d8ad6b65986b3455c26f38d..ebde16aa0ab4bf5199ba1867d4450c1225d43141 100644 (file)
@@ -2,7 +2,7 @@
 
 <% if @traces.size > 1 %>
 <% if @page > 1 %>
-<%= link_to t('.newer'), @params.merge({ :page => @page - 1 }) %>
+<%= link_to t('.newer'), @params.merge(:page => @page - 1) %>
 <% else %>
 <%= t('.newer') %>
 <% end %>
@@ -12,7 +12,7 @@
 <% if @traces.size < @page_size %>
 <%= t('.older') %>
 <% else %>
-<%= link_to t('.older'), @params.merge({ :page => @page + 1 }) %>
+<%= link_to t('.older'), @params.merge(:page => @page + 1) %>
 <% end %>
 <% end %>
 </p>
index cea119d5469aec8e8d943216d98212b965434622..111c71f3621e0852a1c9626ad92968a71bccacd7 100644 (file)
@@ -40,7 +40,7 @@
     <td><%= t '.tags' %></td>
     <td>
     <% unless @trace.tags.empty? %>
-      <%= raw(@trace.tags.collect { |tag| link_to tag.tag, { :controller => 'traces', :action => 'index', :tag => tag.tag, :id => nil } }.join(", ")) %>
+      <%= raw(@trace.tags.collect { |tag| link_to tag.tag, :controller => 'traces', :action => 'index', :tag => tag.tag, :id => nil }.join(", ")) %>
     <% else %>
       <i><%= t '.none' %></i>
     <% end %>
@@ -59,6 +59,6 @@
     <% if current_user == @trace.user %>
       <%= link_to t('.edit_trace'), edit_trace_path(@trace), :class => "button" %>
     <% end %>
-    <%= button_to t('.delete_trace'), { :controller => 'traces', :action => 'delete', :id => @trace.id }, :data => { :confirm => t('.confirm_delete') } %>
+    <%= button_to t('.delete_trace'), { :controller => 'traces', :action => 'delete', :id => @trace.id }, { :data => { :confirm => t('.confirm_delete') } } %>
   </div>
 <% end %>
index db6eea2a818391d18368d4fa23b90f71fc5baeba..0e29d9bc0d52c7c6eb7ff7a0b8242987d029dffe 100644 (file)
@@ -20,7 +20,7 @@
 
 <ul class='secondary-actions'>
   <% if @user_blocks_pages.current_page.number > 1 -%>
-    <li><%= link_to t('.previous'), @params.merge({ :page => @user_blocks_pages.current_page.number - 1 }) %></li>
+    <li><%= link_to t('.previous'), @params.merge(:page => @user_blocks_pages.current_page.number - 1) %></li>
   <% else -%>
     <li><%= t('.previous') %></li>
   <% end -%>
@@ -28,7 +28,7 @@
   <li><%= t('.showing_page', :page => @user_blocks_pages.current_page.number) %></li>
 
   <% if @user_blocks_pages.current_page.number < @user_blocks_pages.page_count -%>
-    <li><%= link_to t('.next'), @params.merge({ :page => @user_blocks_pages.current_page.number + 1 }) %></li>
+    <li><%= link_to t('.next'), @params.merge(:page => @user_blocks_pages.current_page.number + 1) %></li>
   <% else -%>
     <li><%= t('.next') %></li>
   <% end -%>
index 1e935c92b04d0023f51485d933e1c27cc52fd574..6f0104cfbdf9c4da01ea1a374979165e42eddf2b 100644 (file)
@@ -14,7 +14,7 @@
       <li><%= link_to t('.edit'), edit_user_block_path(@user_block) %></li>
     <% end %>
     <% if current_user and current_user.moderator? %>
-      <li><%= link_to(t('.revoke'), { :controller => 'user_blocks', :action => 'revoke', :id => @user_block.id }) %></li>
+      <li><%= link_to(t('.revoke'), :controller => 'user_blocks', :action => 'revoke', :id => @user_block.id) %></li>
     <% end %>
   <% end %>
   <li><%= link_to t('.back'), user_blocks_path %></li>
index fd58888825175561d00cfbecbf4305c3deea7edd..8a5ea5ec2430a92ef2d6bc5a019d8f3298b208cb 100644 (file)
   <fieldset>
     <div class="form-row">
         <label class="standard-label"><%= t 'users.new.password' %></label>
-      <%= f.password_field :pass_crypt, { :value => '', :autocomplete => :off } %>
+      <%= f.password_field :pass_crypt, :value => '', :autocomplete => :off %>
     </div>
 
     <div class="form-row">
       <label class="standard-label"><%= t 'users.new.confirm password' %></label>
-      <%= f.password_field :pass_crypt_confirmation, { :value => '', :autocomplete => :off } %>
+      <%= f.password_field :pass_crypt_confirmation, :value => '', :autocomplete => :off %>
     </div>
   </fieldset>
 
index 2e27875d2bab5f40d628547b6dd920f53b96a1c7..2e7217f192597a53364e400f52d0a5d3ffc9dc77 100644 (file)
@@ -44,7 +44,7 @@
 
   <% end %>
 
-  <%= form_tag(auth_path(:provider => "openid"), { :id => "openid_login_form" }) do %>
+  <%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
     <div id="loginForm" class="standard-form">
 
       <fieldset class='form-divider'>
@@ -76,7 +76,7 @@
         <div id='login_openid_url' class='form-row'>
           <label for='openid_url' class="standard-label"><%= raw t '.openid', :logo => openid_logo %></label>
           <%= hidden_field_tag("openid_referer", params[:referer]) if params[:referer] %>
-          <%= text_field_tag("openid_url", "", { :tabindex => 3, :class => "openid_url" }) %>
+          <%= text_field_tag("openid_url", "", :tabindex => 3, :class => "openid_url") %>
           <span class="minorNote">(<a href="<%= t 'users.account.openid.link' %>" target="_new"><%= t 'users.account.openid.link text' %></a>)</span>
         </div>
 
index d57f03ed9f88806d4b9eab82484722573c1a0963..46d18b4300f2af3b92ba53a61307a4d67afeab43 100644 (file)
@@ -7,7 +7,7 @@
 <%= form_tag :action => 'lost_password' do %>
   <div class="standard-form">
     <label class="standard-label"><%= t '.email address' %></label>
-    <%= text_field('user', 'email', { :tabindex => 1 }) %>
+    <%= text_field('user', 'email', :tabindex => 1) %>
     <%= submit_tag t('.new password button'), :tabindex => 2 %>
   </div>
 <% end %>
index 7fd537d14101bcea6cd0487513e3be2a376b2798..b84adca888b24720a56e890694d59dc53988a7b0 100644 (file)
       <label for="email" class="standard-label">
         <%= t '.email address' %>
       </label>
-      <%= f.email_field(:email, { :tabindex => 1 }) %>
+      <%= f.email_field(:email, :tabindex => 1) %>
       <%= f.error_message_on(:email) %>
     </div>
     <div class="form-row">
       <label for="email_confirmation" class="standard-label">
         <%= t '.confirm email address' %>
       </label>
-      <%= f.email_field(:email_confirmation, { :tabindex => 2 }) %>
+      <%= f.email_field(:email_confirmation, :tabindex => 2) %>
       <%= f.error_message_on(:email_confirmation) %>
     </div>
     <span class="form-help deemphasize"><%= raw(t '.not displayed publicly') %></span>
@@ -34,7 +34,7 @@
       <label for="display_name" class="standard-label">
         <%= t '.display name' %>
       </label>
-      <%= f.text_field(:display_name, { :tabindex => 3 }) %>
+      <%= f.text_field(:display_name, :tabindex => 3) %>
       <%= f.error_message_on(:display_name) %>
     </div>
     <span class="form-help deemphasize"><%= t '.display name description' %></span>
@@ -45,8 +45,8 @@
       <label for="openid_url" class="standard-label">
         <%= raw t '.external auth' %>
       </label>
-      <%= f.select(:auth_provider, Auth::PROVIDERS, { :default => "", :tabindex => 4 }) %>
-      <%= f.text_field(:auth_uid, { :tabindex => 5 }) %>
+      <%= f.select(:auth_provider, Auth::PROVIDERS, :default => "", :tabindex => 4) %>
+      <%= f.text_field(:auth_uid, :tabindex => 5) %>
       <%= f.error_message_on(:auth_uid) %>
     </div>
     <span class="form-help deemphasize"><%= t '.auth no password' %></span>
       <label for='user[pass_crypt]' class="standard-label">
         <%= t '.password' %>
       </label>
-      <%= f.password_field(:pass_crypt, { :tabindex => 6 }) %>
+      <%= f.password_field(:pass_crypt, :tabindex => 6) %>
       <%= f.error_message_on(:pass_crypt) %>
     </div>
     <div class="form-row">
       <label class="standard-label">
         <%= t '.confirm password' %>
       </label>
-      <%= f.password_field(:pass_crypt_confirmation, { :tabindex => 7 }) %>
+      <%= f.password_field(:pass_crypt_confirmation, :tabindex => 7) %>
       <%= f.error_message_on(:pass_crypt_confirmation) %>
     </div>
   </fieldset>
index 4138bf90d909eedae9aec024f6ce8da2a31dfbd8..afa4cb202f3ad500eeab01ff8f470032db4ebaf9 100644 (file)
@@ -9,11 +9,11 @@
   <div class="standard-form">
     <fieldset>
       <label class="standard-label"><%= t '.password' %></label>
-      <%= password_field(:user, :pass_crypt, { :value => '', :tabindex => 4 }) %>
+      <%= password_field(:user, :pass_crypt, :value => '', :tabindex => 4) %>
     </fieldset>
     <fieldset>
       <label class="standard-label"><%= t '.confirm password' %></label>
-      <%= password_field(:user, :pass_crypt_confirmation, { :value => '', :tabindex => 5 }) %>
+      <%= password_field(:user, :pass_crypt_confirmation, :value => '', :tabindex => 5) %>
     </fieldset>
     <%= submit_tag t('.reset'), :tabindex => 6 %>
   </div>