From: Andy Allan Date: Wed, 27 Mar 2019 09:57:00 +0000 (+0100) Subject: erblint: prefer double quoted strings X-Git-Tag: live~3182^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/6d0100b91dda3e36d3eeeab0e3a4894e1dae9fd2 erblint: prefer double quoted strings --- diff --git a/.erb-lint.yml b/.erb-lint.yml index a002cdafa..340cfd297 100644 --- a/.erb-lint.yml +++ b/.erb-lint.yml @@ -41,7 +41,6 @@ linters: - app/views/oauth_clients/* - app/views/redactions/* - app/views/reports/* - - app/views/site/* - app/views/traces/* - app/views/user_blocks/* - app/views/users/* diff --git a/app/views/site/about.html.erb b/app/views/site/about.html.erb index 111815c12..219e0ab6b 100644 --- a/app/views/site/about.html.erb +++ b/app/views/site/about.html.erb @@ -32,10 +32,10 @@

<%= t ".partners_title" %>

-

<%= 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/") %> +

<%= 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/") %>

diff --git a/app/views/site/copyright.html.erb b/app/views/site/copyright.html.erb index 2dcccab18..feec81c82 100644 --- a/app/views/site/copyright.html.erb +++ b/app/views/site/copyright.html.erb @@ -1,19 +1,19 @@ <% content_for :heading do %> -<% if @locale == 'en' %> +<% if @locale == "en" %> - <% 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 %> -

<%= t '.native.title' %>

+

<%= t ".native.title" %>

- <%= 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") %>

<% end %>
@@ -21,14 +21,14 @@ <% else %> <%= tag.div :lang => "en", :dir => t("html.dir", :locale => "en") do %> - <% if t('.legal_babble', :locale => @locale) != t('.legal_babble', :locale => :en) %> -

<%= t '.foreign.title' %>

+ <% if t(".legal_babble", :locale => @locale) != t(".legal_babble", :locale => :en) %> +

<%= t ".foreign.title" %>

- <%= 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") %>

<% end %>
@@ -51,9 +51,9 @@

<%= t ".legal_babble.credit_2_html", :locale => @locale %>

<%= t ".legal_babble.credit_3_html", :locale => @locale %>

<%= 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")) %>

<%= t ".legal_babble.more_title_html", :locale => @locale %>

<%= t ".legal_babble.more_1_html", :locale => @locale %>

diff --git a/app/views/site/edit.html.erb b/app/views/site/edit.html.erb index b8e1798ee..cfc28f024 100644 --- a/app/views/site/edit.html.erb +++ b/app/views/site/edit.html.erb @@ -1,12 +1,12 @@ <% content_for :content do %> <% if Settings.status == "database_offline" or Settings.status == "api_offline" %> -

<%= t 'layouts.osm_offline' %>

+

<%= t "layouts.osm_offline" %>

<% elsif Settings.status == "database_readonly" or Settings.status == "api_readonly" %> -

<%= t 'layouts.osm_read_only' %>

+

<%= t "layouts.osm_read_only" %>

<% elsif !current_user.data_public? %> -

<%= t '.not_public' %>

-

<%= 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') %>

-

<%= raw t 'site.edit.anon_edits', :link => link_to(t('.anon_edits_link_text'), t('.anon_edits_link')) %>

+

<%= t ".not_public" %>

+

<%= 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") %>

+

<%= raw t "site.edit.anon_edits", :link => link_to(t(".anon_edits_link_text"), t(".anon_edits_link")) %>

<% else %> <%= render :partial => preferred_editor %> <% end %> diff --git a/app/views/site/export.html.erb b/app/views/site/export.html.erb index 9bd06a463..7bd4273a3 100644 --- a/app/views/site/export.html.erb +++ b/app/views/site/export.html.erb @@ -1,53 +1,53 @@ -<% set_title(t('.title')) %> +<% set_title(t(".title")) %>

- <%= t '.title' %> + <%= t ".title" %>

<%= form_tag({ :controller => "export", :action => "finish" }, { :class => "export_form" }) do %> - <%= hidden_field_tag 'format', 'osm' %> + <%= hidden_field_tag "format", "osm" %>
- <%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %> + <%= text_field_tag("maxlat", 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") %> + <%= text_field_tag("minlon", nil, :size => 10, :class => "export_bound") %> + <%= text_field_tag("maxlon", nil, :size => 10, :class => "export_bound") %>

- <%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %> + <%= text_field_tag("minlat", nil, :size => 10, :class => "export_bound") %>
- <%= t '.manually_select' %> + <%= t ".manually_select" %>
-

<%= t '.licence' %>

-

<%= raw t '.export_details' %>

+

<%= t ".licence" %>

+

<%= raw t ".export_details" %>

- <%= t '.too_large.body' %> + <%= t ".too_large.body" %>

- <%= submit_tag t('.export_button') %> + <%= submit_tag t(".export_button") %>
-

<%= t '.too_large.advice' %>

+

<%= t ".too_large.advice" %>

-
<%= t '.too_large.overpass.title' %>
-
<%= t '.too_large.overpass.description' %>
+
<%= t ".too_large.overpass.title" %>
+
<%= t ".too_large.overpass.description" %>
-
<%= t '.too_large.planet.title' %>
-
<%= t '.too_large.planet.description' %>
+
<%= t ".too_large.planet.title" %>
+
<%= t ".too_large.planet.description" %>
-
<%= t '.too_large.geofabrik.title' %>
-
<%= t '.too_large.geofabrik.description' %>
+
<%= t ".too_large.geofabrik.title" %>
+
<%= t ".too_large.geofabrik.description" %>
-
<%= t '.too_large.other.title' %>
-
<%= t '.too_large.other.description' %>
+
<%= t ".too_large.other.title" %>
+
<%= t ".too_large.other.description" %>
<% end %> diff --git a/app/views/site/fixthemap.html.erb b/app/views/site/fixthemap.html.erb index 571a9b25f..4bb478c7e 100644 --- a/app/views/site/fixthemap.html.erb +++ b/app/views/site/fixthemap.html.erb @@ -17,7 +17,7 @@

<%= t ".how_to_help.join_the_community.title" %>

<%= t ".how_to_help.join_the_community.explanation_html" %>
- +
diff --git a/app/views/site/help.html.erb b/app/views/site/help.html.erb index 3ca92398b..dcb8142bd 100644 --- a/app/views/site/help.html.erb +++ b/app/views/site/help.html.erb @@ -4,7 +4,7 @@

<%= t ".introduction" %>

-<% ['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 %>

diff --git a/app/views/site/id.html.erb b/app/views/site/id.html.erb index f8d0f5858..e2ce6bb0d 100644 --- a/app/views/site/id.html.erb +++ b/app/views/site/id.html.erb @@ -2,9 +2,9 @@ - <%= stylesheet_link_tag 'id' %> + <%= stylesheet_link_tag "id" %> - <%= javascript_include_tag 'id' %> + <%= javascript_include_tag "id" %> diff --git a/app/views/site/key.html.erb b/app/views/site/key.html.erb index 91dfd1250..abcf220e3 100644 --- a/app/views/site/key.html.erb +++ b/app/views/site/key.html.erb @@ -2,7 +2,7 @@ <% YAML.load_file(Rails.root.join("config", "key.yml")).each do |name,data| %> <% data.each do |entry| %> - + " data-zoom-max="<%= entry["max_zoom"] %>"> diff --git a/app/views/site/offline.html.erb b/app/views/site/offline.html.erb index bfe0bcb9f..8e7b431a8 100644 --- a/app/views/site/offline.html.erb +++ b/app/views/site/offline.html.erb @@ -1,7 +1,7 @@ <% if Settings.status == "database_offline" %> -

<%= t 'layouts.osm_offline' %> +

<%= t "layouts.osm_offline" %>

<% else %> -

<%= t 'layouts.osm_read_only' %> +

<%= t "layouts.osm_read_only" %>

<% end %>
<%= image_tag "key/#{name}/#{entry['image']}" %>