Merge remote-tracking branch 'upstream/pull/2921' into master
This commit is contained in:
commit
4347d9d3b0
12 changed files with 30 additions and 17 deletions
|
@ -173,7 +173,20 @@ Style/FrozenStringLiteralComment:
|
|||
Style/NumericLiterals:
|
||||
MinDigits: 11
|
||||
|
||||
# Offense count: 28
|
||||
# Offense count: 19
|
||||
# Cop supports --auto-correct.
|
||||
Style/StringConcatenation:
|
||||
Enabled: false
|
||||
Exclude:
|
||||
- 'app/helpers/browse_tags_helper.rb'
|
||||
- 'app/helpers/user_roles_helper.rb'
|
||||
- 'app/jobs/trace_importer_job.rb'
|
||||
- 'app/models/client_application.rb'
|
||||
- 'app/views/changesets/index.atom.builder'
|
||||
- 'lib/migrate.rb'
|
||||
- 'lib/potlatch.rb'
|
||||
- 'script/cleanup'
|
||||
- 'script/deliver-message'
|
||||
- 'script/statistics'
|
||||
- 'script/update-spam-blocks'
|
||||
- 'test/controllers/api/relations_controller_test.rb'
|
||||
- 'test/helpers/user_roles_helper_test.rb'
|
||||
|
|
|
@ -3,11 +3,11 @@ module NoteHelper
|
|||
|
||||
def note_event(event, at, by)
|
||||
if by.nil?
|
||||
t("browse.note." + event + "_by_anonymous_html",
|
||||
t("browse.note.#{event}_by_anonymous_html",
|
||||
:when => friendly_date_ago(at),
|
||||
:exact_time => l(at))
|
||||
else
|
||||
t("browse.note." + event + "_by_html",
|
||||
t("browse.note.#{event}_by_html",
|
||||
:when => friendly_date_ago(at),
|
||||
:exact_time => l(at),
|
||||
:user => note_author(by))
|
||||
|
|
|
@ -6,7 +6,7 @@ module TitleHelper
|
|||
def set_title(title = nil)
|
||||
if title
|
||||
@title = TitleHelper.coder.decode(title.gsub("<bdi>", "\u202a").gsub("</bdi>", "\u202c"))
|
||||
response.headers["X-Page-Title"] = ERB::Util.u(@title + " | " + t("layouts.project_name.title"))
|
||||
response.headers["X-Page-Title"] = ERB::Util.u("#{@title} | #{t('layouts.project_name.title')}")
|
||||
else
|
||||
@title = title
|
||||
response.headers["X-Page-Title"] = ERB::Util.u(t("layouts.project_name.title"))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<% 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}" %>
|
||||
<li class="<%= member_class %>">
|
||||
<%= if relation_member.member_role.blank?
|
||||
t ".entry_html", :type => type_str, :name => linked_name
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<%= @issue.assigned_role %>
|
||||
| <%= t ".reports", :count => @issue.reports.count %>
|
||||
| <%= t ".report_created_at", :datetime => l(@issue.created_at.to_datetime, :format => :friendly) %>
|
||||
<%= " | " + t(".last_resolved_at", :datetime => l(@issue.resolved_at.to_datetime, :format => :friendly)) if @issue.resolved_at? %>
|
||||
<%= " | " + t(".last_updated_at", :datetime => l(@issue.updated_at.to_datetime, :format => :friendly), :displayname => @issue.user_updated.display_name) if @issue.user_updated %>
|
||||
<%= " | #{t('.last_resolved_at', :datetime => l(@issue.resolved_at.to_datetime, :format => :friendly))}" if @issue.resolved_at? %>
|
||||
<%= " | #{t('.last_updated_at', :datetime => l(@issue.updated_at.to_datetime, :format => :friendly), :displayname => @issue.user_updated.display_name)}" if @issue.user_updated %>
|
||||
</small>
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= javascript_include_tag "es5" unless browser.es5? %>
|
||||
<%= javascript_include_tag "es6" unless browser.es6? %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= javascript_include_tag "i18n/" + I18n.locale.to_s %>
|
||||
<%= javascript_include_tag "i18n/#{I18n.locale}" %>
|
||||
<%= stylesheet_link_tag "screen-#{dir}", :media => "screen" %>
|
||||
<%= stylesheet_link_tag "print-#{dir}", :media => "print" %>
|
||||
<%= stylesheet_link_tag "leaflet-all", :media => "screen, print" %>
|
||||
|
@ -14,5 +14,5 @@
|
|||
<%= yield :auto_discovery_link_tag %>
|
||||
<%= csrf_meta_tag %>
|
||||
<%= csp_meta_tag %>
|
||||
<title><%= @title + " | " if @title %><%= t "layouts.project_name.title" %></title>
|
||||
<title><%= "#{@title} | " if @title %><%= t "layouts.project_name.title" %></title>
|
||||
<% end %>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<p><%= t ".requests" %></p>
|
||||
<ul>
|
||||
<% @client_application.permissions.each do |perm| %>
|
||||
<li><%= t("activerecord.attributes.client_application." + perm.to_s) %></li>
|
||||
<li><%= t("activerecord.attributes.client_application.#{perm}") %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<p><%= t ".support_notice" %></p>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
when "public", "identifiable" then "success"
|
||||
else "danger"
|
||||
end %>
|
||||
<span class="badge badge-<%= badge_class %> text-white"><%= t("." + trace.visibility) %></span>
|
||||
<span class="badge badge-<%= badge_class %> text-white"><%= t(".#{trace.visibility}") %></span>
|
||||
|
||||
<br />
|
||||
<%= trace.description %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="user_popup">
|
||||
<%= user_thumbnail popup %>
|
||||
<p><%= t("." + type) %></p>
|
||||
<p><%= t(".#{type}") %></p>
|
||||
<p><%= link_to popup.display_name, user_path(popup) %></p>
|
||||
</div>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<div class="standard-form-row">
|
||||
<label for="legale_<%= legale %>">
|
||||
<%= radio_button_tag "legale", legale, @legale == legale, :data => { :url => url_for(:legale => legale) } %>
|
||||
<%= t(".legale_names." + name) %>
|
||||
<%= t(".legale_names.#{name}") %>
|
||||
</label>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -72,7 +72,7 @@ class BoundingBox
|
|||
def check_size(max_area = Settings.max_request_area)
|
||||
# check the bbox isn't too large
|
||||
if area > max_area
|
||||
raise OSM::APIBadBoundingBox, "The maximum bbox size is " + max_area.to_s +
|
||||
raise OSM::APIBadBoundingBox, "The maximum bbox size is #{max_area}" \
|
||||
", and your request was too large. Either request a smaller area, or use planet.osm"
|
||||
end
|
||||
self
|
||||
|
|
|
@ -497,8 +497,8 @@ module OSM
|
|||
|
||||
# Return the terms and conditions text for a given country
|
||||
def self.legal_text_for_country(country_code)
|
||||
file_name = Rails.root.join("config", "legales", country_code.to_s + ".yml")
|
||||
file_name = Rails.root.join("config", "legales", Settings.default_legale + ".yml") unless File.exist? file_name
|
||||
file_name = Rails.root.join("config", "legales", "#{country_code}.yml")
|
||||
file_name = Rails.root.join("config", "legales", "#{Settings.default_legale}.yml") unless File.exist? file_name
|
||||
YAML.load_file(file_name).transform_values!(&:html_safe)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue