From 3af16f6337b52546297e7e09a1aba9b0e1df7e15 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 27 Mar 2019 16:15:19 +0000 Subject: [PATCH] erblint: fix remaining single quoted strings --- .erb-lint.yml | 19 ---- app/views/browse/_common_details.html.erb | 12 +-- .../browse/_containing_relation.html.erb | 4 +- app/views/browse/_node.html.erb | 10 +- app/views/browse/_relation.html.erb | 10 +- app/views/browse/_relation_member.html.erb | 6 +- app/views/browse/_tag_details.html.erb | 2 +- app/views/browse/_way.html.erb | 14 +-- app/views/browse/changeset.html.erb | 46 ++++----- app/views/browse/feature.html.erb | 4 +- app/views/browse/history.html.erb | 4 +- app/views/browse/new_note.html.erb | 6 +- app/views/browse/note.html.erb | 16 ++-- app/views/browse/timeout.html.erb | 2 +- app/views/changeset_comments/timeout.html.erb | 2 +- app/views/changesets/_changeset.html.erb | 2 +- app/views/changesets/history.html.erb | 2 +- app/views/changesets/index.html.erb | 10 +- app/views/changesets/timeout.html.erb | 2 +- .../diary_entries/_diary_comment.html.erb | 4 +- app/views/diary_entries/_diary_entry.html.erb | 12 +-- app/views/diary_entries/_location.html.erb | 4 +- app/views/diary_entries/comments.html.erb | 16 ++-- app/views/diary_entries/edit.html.erb | 20 ++-- app/views/diary_entries/index.html.erb | 24 ++--- .../diary_entries/no_such_entry.html.erb | 4 +- app/views/diary_entries/show.html.erb | 20 ++-- app/views/geocoder/results.html.erb | 4 +- app/views/geocoder/search.html.erb | 2 +- app/views/issues/_comments.html.erb | 4 +- app/views/issues/index.html.erb | 6 +- app/views/issues/show.html.erb | 12 +-- app/views/layouts/_head.html.erb | 2 +- app/views/layouts/_header.html.erb | 58 +++++------ app/views/layouts/_search.html.erb | 16 ++-- app/views/layouts/map.html.erb | 30 +++--- app/views/layouts/site.html.erb | 2 +- app/views/messages/_message_summary.html.erb | 6 +- .../messages/_sent_message_summary.html.erb | 2 +- app/views/messages/inbox.html.erb | 10 +- app/views/messages/new.html.erb | 14 +-- app/views/messages/no_such_message.html.erb | 4 +- app/views/messages/outbox.html.erb | 12 +-- app/views/messages/show.html.erb | 8 +- app/views/notes/_notes_paging_nav.html.erb | 10 +- app/views/notes/mine.html.erb | 22 ++--- app/views/notifier/_gpx_description.html.erb | 8 +- .../changeset_comment_notification.html.erb | 6 +- .../diary_comment_notification.html.erb | 6 +- app/views/notifier/email_confirm.html.erb | 6 +- .../notifier/friend_notification.html.erb | 6 +- app/views/notifier/gpx_failure.html.erb | 10 +- app/views/notifier/gpx_success.html.erb | 4 +- app/views/notifier/lost_password.html.erb | 6 +- .../notifier/message_notification.html.erb | 6 +- .../note_comment_notification.html.erb | 4 +- app/views/oauth/authorize.html.erb | 2 +- app/views/oauth_clients/_form.html.erb | 12 +-- app/views/oauth_clients/edit.html.erb | 4 +- app/views/oauth_clients/index.html.erb | 24 ++--- app/views/oauth_clients/new.html.erb | 4 +- app/views/oauth_clients/show.html.erb | 22 ++--- app/views/redactions/_redactions.html.erb | 2 +- app/views/redactions/edit.html.erb | 10 +- app/views/redactions/index.html.erb | 8 +- app/views/redactions/new.html.erb | 10 +- app/views/redactions/show.html.erb | 12 +-- app/views/reports/new.html.erb | 12 +-- app/views/traces/_trace.html.erb | 22 ++--- app/views/traces/_trace_optionals.html.erb | 2 +- app/views/traces/_trace_paging_nav.html.erb | 10 +- app/views/traces/edit.html.erb | 30 +++--- app/views/traces/index.html.erb | 26 ++--- app/views/traces/new.html.erb | 22 ++--- app/views/traces/offline.html.erb | 4 +- app/views/traces/show.html.erb | 34 +++---- app/views/user_blocks/_block.html.erb | 10 +- app/views/user_blocks/_blocks.html.erb | 22 ++--- app/views/user_blocks/blocks_by.html.erb | 6 +- app/views/user_blocks/blocks_on.html.erb | 6 +- app/views/user_blocks/edit.html.erb | 18 ++-- app/views/user_blocks/index.html.erb | 6 +- app/views/user_blocks/new.html.erb | 18 ++-- app/views/user_blocks/not_found.html.erb | 4 +- app/views/user_blocks/revoke.html.erb | 14 +-- app/views/user_blocks/show.html.erb | 18 ++-- app/views/users/_contact.html.erb | 20 ++-- app/views/users/_popup.html.erb | 2 +- app/views/users/_terms.html.erb | 36 +++---- app/views/users/_user.html.erb | 6 +- app/views/users/account.html.erb | 96 +++++++++---------- app/views/users/blocked.html.erb | 6 +- app/views/users/confirm.html.erb | 8 +- app/views/users/confirm_email.html.erb | 6 +- app/views/users/index.html.erb | 12 +-- app/views/users/login.html.erb | 24 ++--- app/views/users/logout.html.erb | 4 +- app/views/users/lost_password.html.erb | 12 +-- app/views/users/new.html.erb | 30 +++--- app/views/users/no_such_user.html.erb | 4 +- app/views/users/reset_password.html.erb | 12 +-- app/views/users/show.html.erb | 86 ++++++++--------- app/views/users/terms.html.erb | 30 +++--- 103 files changed, 666 insertions(+), 685 deletions(-) diff --git a/.erb-lint.yml b/.erb-lint.yml index f1da5efb3..ac8dbb95d 100644 --- a/.erb-lint.yml +++ b/.erb-lint.yml @@ -25,25 +25,6 @@ linters: Enabled: false Rails/OutputSafety: Enabled: false - Style/StringLiterals: - 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: diff --git a/app/views/browse/_common_details.html.erb b/app/views/browse/_common_details.html.erb index e035076b6..3f2359599 100644 --- a/app/views/browse/_common_details.html.erb +++ b/app/views/browse/_common_details.html.erb @@ -1,8 +1,8 @@

<% if common_details.changeset.tags['comment'].present? %> - <%= linkify(h(common_details.changeset.tags['comment'])) %> + <%= linkify(h(common_details.changeset.tags["comment"])) %> <% else %> - <%= t 'browse.no_comment' %> + <%= t "browse.no_comment" %> <% end %>

@@ -16,17 +16,17 @@
- <%= t 'browse.version' %> + <%= t "browse.version" %> #<%= h(common_details.version) %> · - <%= t 'browse.in_changeset' %> + <%= t "browse.in_changeset" %> #<%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %>
<% if @type == "node" and common_details.visible? %>
- <%= 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}") %> + <%= 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}") %>
<% end %> diff --git a/app/views/browse/_containing_relation.html.erb b/app/views/browse/_containing_relation.html.erb index 391462d92..1dca0c26e 100644 --- a/app/views/browse/_containing_relation.html.erb +++ b/app/views/browse/_containing_relation.html.erb @@ -1,9 +1,9 @@
  • <%= linked_name = link_to h(printable_name(containing_relation.relation)), :action => "relation", :id => containing_relation.relation.id.to_s if containing_relation.member_role.blank? - raw t '.entry', :relation_name => linked_name + raw t ".entry", :relation_name => linked_name else - raw t '.entry_role', :relation_name => linked_name, :relation_role => h(containing_relation.member_role) + raw t ".entry_role", :relation_name => linked_name, :relation_role => h(containing_relation.member_role) end %>
  • diff --git a/app/views/browse/_node.html.erb b/app/views/browse/_node.html.erb index e0eb55c1b..52502ad4b 100644 --- a/app/views/browse/_node.html.erb +++ b/app/views/browse/_node.html.erb @@ -1,9 +1,9 @@ <% if node.redacted? %>
    - <%= t 'browse.redacted.message_html', - :type => t('browse.redacted.type.node'), + <%= t "browse.redacted.message_html", + :type => t("browse.redacted.type.node"), :version => node.version, - :redaction_link => link_to(t('browse.redacted.redaction', + :redaction_link => link_to(t("browse.redacted.redaction", :id => node.redaction.id), node.redaction) %>
    <% else %> @@ -11,10 +11,10 @@ <%= render :partial => "common_details", :object => node %> <% unless node.ways.empty? and node.containing_relation_members.empty? %> -

    <%= t 'browse.part_of' %>

    +

    <%= t "browse.part_of" %>

    diff --git a/app/views/browse/_relation.html.erb b/app/views/browse/_relation.html.erb index e7c4817b0..452556364 100644 --- a/app/views/browse/_relation.html.erb +++ b/app/views/browse/_relation.html.erb @@ -1,9 +1,9 @@ <% if relation.redacted? %>
    - <%= t 'browse.redacted.message_html', - :type => t('browse.redacted.type.relation'), + <%= t "browse.redacted.message_html", + :type => t("browse.redacted.type.relation"), :version => relation.version, - :redaction_link => link_to(t('browse.redacted.redaction', + :redaction_link => link_to(t("browse.redacted.redaction", :id => relation.redaction.id), relation.redaction) %>
    <% else %> @@ -11,12 +11,12 @@ <%= render :partial => "common_details", :object => relation %> <% unless relation.containing_relation_members.empty? %> -

    <%= t 'browse.part_of' %>

    +

    <%= t "browse.part_of" %>

    <% end %> <% unless relation.relation_members.empty? %> -

    <%= t '.members' %>

    +

    <%= t ".members" %>

    <% end %> diff --git a/app/views/browse/_relation_member.html.erb b/app/views/browse/_relation_member.html.erb index ef8c67e59..a707c3ba1 100644 --- a/app/views/browse/_relation_member.html.erb +++ b/app/views/browse/_relation_member.html.erb @@ -1,14 +1,14 @@ <% 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) } - type_str = t '.type.' + relation_member.member_type.downcase + type_str = t ".type." + relation_member.member_type.downcase %>
  • <%= if relation_member.member_role.blank? - raw t '.entry', :type => type_str, :name => linked_name + raw t ".entry", :type => type_str, :name => linked_name else - raw t '.entry_role', :type => type_str, :name => linked_name, :role => h(relation_member.member_role) + raw t ".entry_role", :type => type_str, :name => linked_name, :role => h(relation_member.member_role) end %>
  • diff --git a/app/views/browse/_tag_details.html.erb b/app/views/browse/_tag_details.html.erb index 9c3fbbfc2..0e1a3fbef 100644 --- a/app/views/browse/_tag_details.html.erb +++ b/app/views/browse/_tag_details.html.erb @@ -1,5 +1,5 @@ <% unless tag_details.empty? %> -

    <%= t '.tags' %>

    +

    <%= t ".tags" %>

    <%= render :partial => "tag", :collection => tag_details.sort %>
    diff --git a/app/views/browse/_way.html.erb b/app/views/browse/_way.html.erb index 49a1bced1..ed206c59b 100644 --- a/app/views/browse/_way.html.erb +++ b/app/views/browse/_way.html.erb @@ -1,9 +1,9 @@ <% if way.redacted? %>
    - <%= t 'browse.redacted.message_html', - :type => t('browse.redacted.type.way'), + <%= t "browse.redacted.message_html", + :type => t("browse.redacted.type.way"), :version => way.version, - :redaction_link => link_to(t('browse.redacted.redaction', + :redaction_link => link_to(t("browse.redacted.redaction", :id => way.redaction.id), way.redaction) %>
    <% else %> @@ -11,21 +11,21 @@ <%= render :partial => "common_details", :object => way %> <% unless way.containing_relation_members.empty? %> -

    <%= t 'browse.part_of' %>

    +

    <%= t "browse.part_of" %>

    <% end %> <% unless way.way_nodes.empty? %> -

    <%= t '.nodes' %>

    +

    <%= t ".nodes" %>