From: Tom Hughes Date: Wed, 27 Mar 2019 16:15:19 +0000 (+0000) Subject: erblint: fix remaining single quoted strings X-Git-Tag: live~3240 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/3af16f6337b52546297e7e09a1aba9b0e1df7e15 erblint: fix remaining single quoted strings --- 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" %>