From: Tom Hughes Date: Wed, 27 Mar 2019 18:55:48 +0000 (+0000) Subject: erblint: use parentheses for nested function calls X-Git-Tag: live~3234 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/ecd81eadbec57582749bb246d74e32ecab74d1d6 erblint: use parentheses for nested function calls --- diff --git a/.erb-lint.yml b/.erb-lint.yml index 7ac88e42f..76dfdcff8 100644 --- a/.erb-lint.yml +++ b/.erb-lint.yml @@ -31,8 +31,6 @@ linters: Enabled: false # TODO Layout/LeadingBlankLines: Enabled: false # TODO - Style/NestedParenthesizedCalls: - Enabled: false # TODO Rails/LinkToBlank: Enabled: false # TODO Style/ConditionalAssignment: diff --git a/app/views/browse/new_note.html.erb b/app/views/browse/new_note.html.erb index 53279d24e..2929e610e 100644 --- a/app/views/browse/new_note.html.erb +++ b/app/views/browse/new_note.html.erb @@ -1,4 +1,4 @@ -<% set_title(t "browse.note.new_note") %> +<% set_title(t("browse.note.new_note")) %>

diff --git a/app/views/browse/query.html.erb b/app/views/browse/query.html.erb index 8b07adfc2..ea40a00db 100644 --- a/app/views/browse/query.html.erb +++ b/app/views/browse/query.html.erb @@ -1,4 +1,4 @@ -<% set_title(t ".title") %> +<% set_title(t(".title")) %>

diff --git a/app/views/diary_entries/_diary_entry.html.erb b/app/views/diary_entries/_diary_entry.html.erb index 6f0626cc2..fc1cca66e 100644 --- a/app/views/diary_entries/_diary_entry.html.erb +++ b/app/views/diary_entries/_diary_entry.html.erb @@ -7,7 +7,7 @@

<%= link_to h(diary_entry.title), diary_entry_path(diary_entry.user, diary_entry) %>

- <%= raw(t ".posted_by", :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code)) %> + <%= raw(t(".posted_by", :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code))) %> diff --git a/app/views/geocoder/search.html.erb b/app/views/geocoder/search.html.erb index ec349c7bf..a44c55643 100644 --- a/app/views/geocoder/search.html.erb +++ b/app/views/geocoder/search.html.erb @@ -3,7 +3,7 @@ <%= t("site.sidebar.search_results") %> <% @sources.each do |source| %> -

<%= raw(t ".title.#{source}") %>

+

<%= raw(t(".title.#{source}")) %>

"> <%= image_tag "searching.gif", :class => "loader" %>
diff --git a/app/views/messages/inbox.html.erb b/app/views/messages/inbox.html.erb index ba4425c80..40bb8e8a3 100644 --- a/app/views/messages/inbox.html.erb +++ b/app/views/messages/inbox.html.erb @@ -24,5 +24,5 @@ <% else %> -
<%= raw(t ".no_messages_yet", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user))) %>
+
<%= raw(t(".no_messages_yet", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user)))) %>
<% end %> diff --git a/app/views/messages/new.html.erb b/app/views/messages/new.html.erb index dedace3d7..532f3d71e 100644 --- a/app/views/messages/new.html.erb +++ b/app/views/messages/new.html.erb @@ -1,5 +1,5 @@ <% content_for :heading do %> -

<%= raw(t ".send_message_to", :name => link_to(h(@message.recipient.display_name), user_path(@message.recipient))) %>

+

<%= raw(t(".send_message_to", :name => link_to(h(@message.recipient.display_name), user_path(@message.recipient)))) %>

<% end %> <%= error_messages_for "message" %> diff --git a/app/views/messages/outbox.html.erb b/app/views/messages/outbox.html.erb index f30434a9c..a06e18838 100644 --- a/app/views/messages/outbox.html.erb +++ b/app/views/messages/outbox.html.erb @@ -3,7 +3,7 @@ <% end %> <% content_for :heading do %> -

<%= raw(t ".my_inbox", :inbox_link => link_to(t(".inbox"), inbox_messages_path)) %>/<%= t ".outbox" %>

+

<%= raw(t(".my_inbox", :inbox_link => link_to(t(".inbox"), inbox_messages_path))) %>/<%= t ".outbox" %>

<% end %>

<%= t ".messages", :count => current_user.sent_messages.size %>

@@ -23,5 +23,5 @@ <% else %> -
<%= raw(t ".no_sent_messages", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user))) %>
+
<%= raw(t(".no_sent_messages", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user)))) %>
<% end %> diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 69b5800a4..0cb70d2d5 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -26,7 +26,7 @@ <%= f.email_field(:email_confirmation, :tabindex => 2) %> <%= f.error_message_on(:email_confirmation) %> - <%= raw(t ".not displayed publicly") %> + <%= raw(t(".not displayed publicly")) %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 9f967742e..28dc07e0d 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -179,7 +179,7 @@ <% if current_user and @user.id == current_user.id %> <% if @user.home_lat.nil? or @user.home_lon.nil? %>
-

<%= raw(t ".if set location", :settings_link => (link_to t(".settings_link_text"), :controller => "users", :action => "account", :display_name => current_user.display_name)) %>

+

<%= raw(t(".if set location", :settings_link => (link_to t(".settings_link_text"), :controller => "users", :action => "account", :display_name => current_user.display_name))) %>

<% else %> <% content_for :head do %>