erblint: prefer double quoted strings

This commit is contained in:
Andy Allan 2019-03-27 10:57:00 +01:00
parent e22266f8c4
commit 6d0100b91d
10 changed files with 56 additions and 57 deletions

View file

@ -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/*

View file

@ -32,10 +32,10 @@
<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>

View 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 />
@ -21,14 +21,14 @@
<% 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>

View 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 %>

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

View 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'>

View 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>

View 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>

View 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>

View 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 %>