From: Tom Hughes Date: Thu, 8 Sep 2016 18:26:07 +0000 (+0100) Subject: Merge remote-tracking branch 'openstreetmap/pull/1279' X-Git-Tag: live~4993 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/f02729fa9a29089224502fecc7bf347fa73db0dd?hp=191f6b3fcdd6945fe9c8af8094c8dc94e4b7afd2 Merge remote-tracking branch 'openstreetmap/pull/1279' --- diff --git a/.rubocop.yml b/.rubocop.yml index f12f24a9f..7b8ced040 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,9 @@ inherit_from: .rubocop_todo.yml +AllCops: + Include: + - '**/*.builder' + Rails: Enabled: true diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 927f40780..3a3008e9e 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2016-07-13 09:47:52 +0100 using RuboCop version 0.41.2. +# on 2016-09-07 11:03:27 +0100 using RuboCop version 0.41.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -14,11 +14,11 @@ Lint/AmbiguousOperator: - 'test/lib/bounding_box_test.rb' - 'test/lib/country_test.rb' -# Offense count: 115 +# Offense count: 117 Lint/AmbiguousRegexpLiteral: Enabled: false -# Offense count: 29 +# Offense count: 30 # Configuration parameters: AllowSafeAssignment. Lint/AssignmentInCondition: Exclude: @@ -43,11 +43,16 @@ Lint/HandleExceptions: - 'app/controllers/user_controller.rb' - 'config/initializers/session.rb' -# Offense count: 616 +# Offense count: 2 +Lint/ShadowingOuterLocalVariable: + Exclude: + - 'app/views/changeset/list.atom.builder' + +# Offense count: 626 Metrics/AbcSize: Max: 277 -# Offense count: 11 +# Offense count: 12 Metrics/BlockNesting: Max: 5 @@ -56,17 +61,17 @@ Metrics/BlockNesting: Metrics/ClassLength: Max: 1650 -# Offense count: 67 +# Offense count: 68 Metrics/CyclomaticComplexity: Max: 20 -# Offense count: 2485 +# Offense count: 2561 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes. # URISchemes: http, https Metrics/LineLength: Max: 962 -# Offense count: 596 +# Offense count: 604 # Configuration parameters: CountComments. Metrics/MethodLength: Max: 179 @@ -135,7 +140,7 @@ Style/AsciiComments: Exclude: - 'test/models/message_test.rb' -# Offense count: 217 +# Offense count: 218 Style/Documentation: Enabled: false diff --git a/app/assets/javascripts/leaflet.layers.js b/app/assets/javascripts/leaflet.layers.js index 9f2e50a6f..c294f13ef 100644 --- a/app/assets/javascripts/leaflet.layers.js +++ b/app/assets/javascripts/leaflet.layers.js @@ -50,7 +50,7 @@ L.OSM.layers = function(options) { map.whenReady(function() { var miniMap = L.map(div[0], {attributionControl: false, zoomControl: false}) - .addLayer(new layer.constructor()); + .addLayer(new layer.constructor({ apikey: layer.options.apikey })); miniMap.dragging.disable(); miniMap.touchZoom.disable(); diff --git a/app/assets/javascripts/leaflet.map.js b/app/assets/javascripts/leaflet.map.js index 7395898b7..3af81f766 100644 --- a/app/assets/javascripts/leaflet.map.js +++ b/app/assets/javascripts/leaflet.map.js @@ -16,32 +16,39 @@ L.OSM.Map = L.Map.extend({ var copyright = I18n.t('javascripts.map.copyright', {copyright_url: '/copyright'}); var donate = I18n.t('javascripts.map.donate_link_text', {donate_url: 'http://donate.openstreetmap.org'}); - this.baseLayers = [ - new L.OSM.Mapnik({ - attribution: copyright + " ♥ " + donate, - code: "M", - keyid: "mapnik", - name: I18n.t("javascripts.map.base.standard") - }), - new L.OSM.CycleMap({ + this.baseLayers = []; + + this.baseLayers.push(new L.OSM.Mapnik({ + attribution: copyright + " ♥ " + donate, + code: "M", + keyid: "mapnik", + name: I18n.t("javascripts.map.base.standard") + })); + + if (OSM.THUNDERFOREST_KEY) { + this.baseLayers.push(new L.OSM.CycleMap({ attribution: copyright + ". Tiles courtesy of Andy Allan", + apikey: OSM.THUNDERFOREST_KEY, code: "C", keyid: "cyclemap", name: I18n.t("javascripts.map.base.cycle_map") - }), - new L.OSM.TransportMap({ + })); + + this.baseLayers.push(new L.OSM.TransportMap({ attribution: copyright + ". Tiles courtesy of Andy Allan", + apikey: OSM.THUNDERFOREST_KEY, code: "T", keyid: "transportmap", name: I18n.t("javascripts.map.base.transport_map") - }), - new L.OSM.HOT({ - attribution: copyright + ". Tiles courtesy of Humanitarian OpenStreetMap Team", - code: "H", - keyid: "hot", - name: I18n.t("javascripts.map.base.hot") - }) - ]; + })); + } + + this.baseLayers.push(new L.OSM.HOT({ + attribution: copyright + ". Tiles courtesy of Humanitarian OpenStreetMap Team", + code: "H", + keyid: "hot", + name: I18n.t("javascripts.map.base.hot") + })); this.noteLayer = new L.FeatureGroup(); this.noteLayer.options = {code: 'N'}; diff --git a/app/assets/javascripts/osm.js.erb b/app/assets/javascripts/osm.js.erb index 138416be1..10b7cfdb8 100644 --- a/app/assets/javascripts/osm.js.erb +++ b/app/assets/javascripts/osm.js.erb @@ -23,6 +23,9 @@ OSM = { <% if defined?(MAPZEN_VALHALLA_KEY) %> MAPZEN_VALHALLA_KEY: <%= MAPZEN_VALHALLA_KEY.to_json %>, <% end %> +<% if defined?(THUNDERFOREST_KEY) %> + THUNDERFOREST_KEY: <%= THUNDERFOREST_KEY.to_json %>, +<% end %> MARKER_GREEN: <%= image_path("marker-green.png").to_json %>, MARKER_RED: <%= image_path("marker-red.png").to_json %>, diff --git a/app/views/api/permissions.builder b/app/views/api/permissions.builder index 066f56788..6d26a9e53 100644 --- a/app/views/api/permissions.builder +++ b/app/views/api/permissions.builder @@ -1,6 +1,6 @@ # create list of permissions -xml.instruct! :xml, :version=>"1.0" -xml.osm("version" => "#{API_VERSION}", "generator" => "OpenStreetMap Server") do +xml.instruct! :xml, :version => "1.0" +xml.osm("version" => API_VERSION.to_s, "generator" => "OpenStreetMap Server") do xml.permissions do @permissions.each do |permission| xml.permission :name => permission diff --git a/app/views/changeset/_comments.rss.builder b/app/views/changeset/_comments.rss.builder index 8ad5cbaa7..5c683c86d 100644 --- a/app/views/changeset/_comments.rss.builder +++ b/app/views/changeset/_comments.rss.builder @@ -1,17 +1,15 @@ comments.each do |comment| xml.item do xml.title t("changeset.rss.comment", :author => comment.author.display_name, :changeset_id => comment.changeset.id.to_s) - + xml.link url_for(:controller => "browse", :action => "changeset", :id => comment.changeset.id, :anchor => "c#{comment.id}", :only_path => false) xml.guid url_for(:controller => "browse", :action => "changeset", :id => comment.changeset.id, :anchor => "c#{comment.id}", :only_path => false) xml.description do - xml.cdata! render(:partial => "comment", :object => comment, :formats => [ :html ]) + xml.cdata! render(:partial => "comment", :object => comment, :formats => [:html]) end - if comment.author - xml.dc :creator, comment.author.display_name - end + xml.dc :creator, comment.author.display_name if comment.author xml.pubDate comment.created_at.to_s(:rfc822) end diff --git a/app/views/changeset/comments_feed.rss.builder b/app/views/changeset/comments_feed.rss.builder index 60a229a30..f6d304a4c 100644 --- a/app/views/changeset/comments_feed.rss.builder +++ b/app/views/changeset/comments_feed.rss.builder @@ -1,14 +1,13 @@ -xml.rss("version" => "2.0", +xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do xml.channel do if @changeset - xml.title t('changeset.rss.title_particular', :changeset_id => @changeset.id) + xml.title t("changeset.rss.title_particular", :changeset_id => @changeset.id) else - xml.title t('changeset.rss.title_all') + xml.title t("changeset.rss.title_all") end xml.link url_for(:controller => "site", :action => "index", :only_path => false) xml << render(:partial => "comments", :object => @comments) end end - diff --git a/app/views/changeset/list.atom.builder b/app/views/changeset/list.atom.builder index 3e0cd9ec5..979a7492f 100644 --- a/app/views/changeset/list.atom.builder +++ b/app/views/changeset/list.atom.builder @@ -1,20 +1,20 @@ atom_feed(:language => I18n.locale, :schema_date => 2009, - :id => url_for(params.merge({ :only_path => false })), - :root_url => url_for(params.merge({ :action => :list, :format => nil, :only_path => false })), + :id => url_for(params.merge(:only_path => false)), + :root_url => url_for(params.merge(:action => :list, :format => nil, :only_path => false)), "xmlns:georss" => "http://www.georss.org/georss") do |feed| feed.title changeset_list_title(params, @user) - feed.updated @edits.map {|e| [e.created_at, e.closed_at].max }.max + feed.updated @edits.map { |e| [e.created_at, e.closed_at].max }.max feed.icon "http://#{SERVER_URL}/favicon.ico" feed.logo "http://#{SERVER_URL}/images/mag_map-rss2.0.png" - feed.rights :type => 'xhtml' do |xhtml| + feed.rights :type => "xhtml" do |xhtml| xhtml.a :href => "http://creativecommons.org/licenses/by-sa/2.0/" do |a| a.img :src => "http://#{SERVER_URL}/images/cc_button.png", :alt => "CC by-sa 2.0" end end - for changeset in @edits + @edits.each do |changeset| feed.entry(changeset, :updated => changeset.closed_at, :id => changeset_url(changeset.id, :only_path => false)) do |entry| entry.link :rel => "alternate", :href => changeset_read_url(changeset, :only_path => false), @@ -23,20 +23,20 @@ atom_feed(:language => I18n.locale, :schema_date => 2009, :href => changeset_download_url(changeset, :only_path => false), :type => "application/osmChange+xml" - if !changeset.tags.empty? and changeset.tags.has_key? "comment" - entry.title t('browse.changeset.feed.title_comment', :id => h(changeset.id), :comment => h(changeset.tags['comment'])), :type => "html" + if !changeset.tags.empty? && changeset.tags.key?("comment") + entry.title t("browse.changeset.feed.title_comment", :id => h(changeset.id), :comment => h(changeset.tags["comment"])), :type => "html" else - entry.title t('browse.changeset.feed.title', :id => h(changeset.id)) + entry.title t("browse.changeset.feed.title", :id => h(changeset.id)) end if changeset.user.data_public? entry.author do |author| author.name changeset.user.display_name - author.uri url_for(:controller => 'user', :action => 'view', :display_name => changeset.user.display_name, :only_path => false) + author.uri url_for(:controller => "user", :action => "view", :display_name => changeset.user.display_name, :only_path => false) end end - feed.content :type => 'xhtml' do |xhtml| + feed.content :type => "xhtml" do |xhtml| xhtml.style "th { text-align: left } tr { vertical-align: top }" xhtml.table do |table| table.tr do |tr| diff --git a/app/views/changeset/timeout.atom.builder b/app/views/changeset/timeout.atom.builder index a4faeb34b..c878905e6 100644 --- a/app/views/changeset/timeout.atom.builder +++ b/app/views/changeset/timeout.atom.builder @@ -1,12 +1,12 @@ atom_feed(:language => I18n.locale, :schema_date => 2009, - :id => url_for(params.merge({ :only_path => false })), - :root_url => url_for(params.merge({ :only_path => false, :format => nil })), + :id => url_for(params.merge(:only_path => false)), + :root_url => url_for(params.merge(:only_path => false, :format => nil)), "xmlns:georss" => "http://www.georss.org/georss") do |feed| feed.title @title - feed.subtitle :type => 'xhtml' do |xhtml| + feed.subtitle :type => "xhtml" do |xhtml| xhtml.p do |p| - p << t('changeset.timeout.sorry') + p << t("changeset.timeout.sorry") end end end diff --git a/app/views/diary_entry/rss.rss.builder b/app/views/diary_entry/rss.rss.builder index 240025fa7..7adcb3b52 100644 --- a/app/views/diary_entry/rss.rss.builder +++ b/app/views/diary_entry/rss.rss.builder @@ -1,6 +1,6 @@ xml.instruct! -xml.rss("version" => "2.0", +xml.rss("version" => "2.0", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:georss" => "http://www.georss.org/georss") do xml.channel do @@ -12,10 +12,10 @@ xml.rss("version" => "2.0", xml.title "OpenStreetMap" xml.width "100" xml.height "100" - xml.link url_for(:action => "list", :host=> SERVER_URL) + xml.link url_for(:action => "list", :host => SERVER_URL) end - for entry in @entries + @entries.each do |entry| xml.item do xml.title h(entry.title) xml.link url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL) @@ -24,11 +24,11 @@ xml.rss("version" => "2.0", xml.author entry.user.display_name xml.pubDate entry.created_at.to_s(:rfc822) xml.comments url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :anchor => "comments", :host => SERVER_URL) - - if entry.latitude and entry.longitude + + if entry.latitude && entry.longitude xml.geo :lat, entry.latitude.to_s xml.geo :long, entry.longitude.to_s - xml.georss :point, "#{entry.latitude.to_s} #{entry.longitude.to_s}" + xml.georss :point, "#{entry.latitude} #{entry.longitude}" end end end diff --git a/app/views/notes/_note.gpx.builder b/app/views/notes/_note.gpx.builder index 8a96db81c..9d8ede249 100644 --- a/app/views/notes/_note.gpx.builder +++ b/app/views/notes/_note.gpx.builder @@ -3,7 +3,7 @@ xml.wpt("lon" => note.lon, "lat" => note.lat) do xml.name t("browse.note.title", :id => note.id) xml.desc do - xml.cdata! render(:partial => "description", :object => note, :formats => [ :html ]) + xml.cdata! render(:partial => "description", :object => note, :formats => [:html]) end xml.link("href" => browse_note_url(note, :host => SERVER_URL)) @@ -22,8 +22,6 @@ xml.wpt("lon" => note.lon, "lat" => note.lat) do xml.date_created note.created_at xml.status note.status - if note.closed? - xml.date_closed note.closed_at - end + xml.date_closed note.closed_at if note.closed? end end diff --git a/app/views/notes/_note.rss.builder b/app/views/notes/_note.rss.builder index a095b636d..900e7fd7c 100644 --- a/app/views/notes/_note.rss.builder +++ b/app/views/notes/_note.rss.builder @@ -2,20 +2,18 @@ xml.item do location = describe_location(note.lat, note.lon, 14, locale) if note.closed? - xml.title t('note.rss.closed', :place => location) + xml.title t("note.rss.closed", :place => location) elsif note.comments.length > 1 - xml.title t('note.rss.commented', :place => location) + xml.title t("note.rss.commented", :place => location) else - xml.title t('note.rss.opened', :place => location) + xml.title t("note.rss.opened", :place => location) end xml.link browse_note_url(note) xml.guid note_url(note) - xml.description render(:partial => "description", :object => note, :formats => [ :html ]) + xml.description render(:partial => "description", :object => note, :formats => [:html]) - if note.author - xml.author note.author.display_name - end + xml.author note.author.display_name if note.author xml.pubDate note.updated_at.to_s(:rfc822) xml.geo :lat, note.lat diff --git a/app/views/notes/_note.xml.builder b/app/views/notes/_note.xml.builder index ee9570205..fb6738aaa 100644 --- a/app/views/notes/_note.xml.builder +++ b/app/views/notes/_note.xml.builder @@ -12,9 +12,7 @@ xml.note("lon" => note.lon, "lat" => note.lat) do xml.date_created note.created_at xml.status note.status - if note.closed? - xml.date_closed note.closed_at - end + xml.date_closed note.closed_at if note.closed? xml.comments do note.comments.each do |comment| diff --git a/app/views/notes/feed.rss.builder b/app/views/notes/feed.rss.builder index e663d94a6..708192e5f 100644 --- a/app/views/notes/feed.rss.builder +++ b/app/views/notes/feed.rss.builder @@ -1,12 +1,12 @@ xml.instruct! -xml.rss("version" => "2.0", +xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:georss" => "http://www.georss.org/georss") do xml.channel do - xml.title t('note.rss.title') - xml.description t('note.rss.description_area', :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon ) + xml.title t("note.rss.title") + xml.description t("note.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon) xml.link url_for(:controller => "site", :action => "index", :only_path => false) @comments.each do |comment| @@ -14,17 +14,15 @@ xml.rss("version" => "2.0", xml.item do xml.title t("note.rss.#{comment.event}", :place => location) - + xml.link url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false) xml.guid url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false) xml.description do - xml.cdata! render(:partial => "entry", :object => comment, :formats => [ :html ]) + xml.cdata! render(:partial => "entry", :object => comment, :formats => [:html]) end - if comment.author - xml.dc :creator, comment.author.display_name - end + xml.dc :creator, comment.author.display_name if comment.author xml.pubDate comment.created_at.to_s(:rfc822) xml.geo :lat, comment.note.lat diff --git a/app/views/notes/index.gpx.builder b/app/views/notes/index.gpx.builder index 5207ec3f8..58da357da 100644 --- a/app/views/notes/index.gpx.builder +++ b/app/views/notes/index.gpx.builder @@ -1,6 +1,6 @@ xml.instruct! -xml.gpx("version" => "1.1", +xml.gpx("version" => "1.1", "creator" => "OpenStreetMap.org", "xmlns" => "http://www.topografix.com/GPX/1/1", "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance", diff --git a/app/views/notes/index.rss.builder b/app/views/notes/index.rss.builder index 53806f502..ecbbb7326 100644 --- a/app/views/notes/index.rss.builder +++ b/app/views/notes/index.rss.builder @@ -1,11 +1,11 @@ xml.instruct! -xml.rss("version" => "2.0", +xml.rss("version" => "2.0", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:georss" => "http://www.georss.org/georss") do xml.channel do - xml.title t('note.rss.title') - xml.description t('note.rss.description_area', :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon ) + xml.title t("note.rss.title") + xml.description t("note.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon) xml.link url_for(:controller => "site", :action => "index", :only_path => false) xml << (render(:partial => "note", :collection => @notes) || "") diff --git a/app/views/notes/show.gpx.builder b/app/views/notes/show.gpx.builder index 8bb6c9688..f87ff4dd9 100644 --- a/app/views/notes/show.gpx.builder +++ b/app/views/notes/show.gpx.builder @@ -1,6 +1,6 @@ xml.instruct! -xml.gpx("version" => "1.1", +xml.gpx("version" => "1.1", "creator" => "OpenStreetMap.org", "xmlns" => "http://www.topografix.com/GPX/1/1", "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance", diff --git a/app/views/notes/show.rss.builder b/app/views/notes/show.rss.builder index e566ff02e..62ccbe8a9 100644 --- a/app/views/notes/show.rss.builder +++ b/app/views/notes/show.rss.builder @@ -1,11 +1,11 @@ xml.instruct! -xml.rss("version" => "2.0", +xml.rss("version" => "2.0", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:georss" => "http://www.georss.org/georss") do xml.channel do - xml.title t('note.rss.title') - xml.description t('note.rss.description_item', :id => @note.id) + xml.title t("note.rss.title") + xml.description t("note.rss.description_item", :id => @note.id) xml.link url_for(:controller => "site", :action => "index", :only_path => false) xml << render(:partial => "note", :object => @note) diff --git a/app/views/trace/georss.rss.builder b/app/views/trace/georss.rss.builder index 0b2e26d11..176f2bdbf 100644 --- a/app/views/trace/georss.rss.builder +++ b/app/views/trace/georss.rss.builder @@ -1,6 +1,6 @@ xml.instruct! -xml.rss("version" => "2.0", +xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:georss" => "http://www.georss.org/georss") do @@ -25,14 +25,14 @@ xml.rss("version" => "2.0", xml.guid url_for(:controller => :trace, :action => :view, :id => trace.id, :display_name => trace.user.display_name, :only_path => false) xml.description do - xml.cdata! render(:partial => "description", :object => trace, :formats => [ :html ]) + xml.cdata! render(:partial => "description", :object => trace, :formats => [:html]) end xml.dc :creator, trace.user.display_name xml.pubDate trace.timestamp.to_s(:rfc822) - if trace.latitude and trace.longitude + if trace.latitude && trace.longitude xml.geo :lat, trace.latitude xml.geo :long, trace.longitude xml.georss :point, "#{trace.latitude} #{trace.longitude}" diff --git a/app/views/user/api_read.builder b/app/views/user/api_read.builder index e97695420..7136b9f58 100644 --- a/app/views/user/api_read.builder +++ b/app/views/user/api_read.builder @@ -3,16 +3,14 @@ xml.osm("version" => API_VERSION, "generator" => GENERATOR) do xml.tag! "user", :id => @this_user.id, :display_name => @this_user.display_name, :account_created => @this_user.creation_time.xmlschema do - if @this_user.description - xml.tag! "description", @this_user.description - end + xml.tag! "description", @this_user.description if @this_user.description if @user && @user == @this_user - xml.tag! "contributor-terms", :agreed => !!@this_user.terms_agreed, - :pd => !!@this_user.consider_pd + xml.tag! "contributor-terms", :agreed => @this_user.terms_agreed.present?, + :pd => @this_user.consider_pd else - xml.tag! "contributor-terms", :agreed => !!@this_user.terms_agreed + xml.tag! "contributor-terms", :agreed => @this_user.terms_agreed.present? end - if @this_user.image.file? or @this_user.image_use_gravatar + if @this_user.image.file? || @this_user.image_use_gravatar xml.tag! "img", :href => user_image_url(@this_user, :size => 256) end xml.tag! "roles" do @@ -31,7 +29,7 @@ xml.osm("version" => API_VERSION, "generator" => GENERATOR) do end end if @user && @user == @this_user - if @this_user.home_lat and @this_user.home_lon + if @this_user.home_lat && @this_user.home_lon xml.tag! "home", :lat => @this_user.home_lat, :lon => @this_user.home_lon, :zoom => @this_user.home_zoom diff --git a/config/example.application.yml b/config/example.application.yml index 9234099b7..b5d4db363 100644 --- a/config/example.application.yml +++ b/config/example.application.yml @@ -111,6 +111,8 @@ defaults: &defaults #mapquest_key: "" # Mapzen authentication details #mapzen_valhalla_key: "" + # Thunderforest authentication details + #thunderforest_key: "" development: <<: *defaults diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 1c664589e..8ce06b426 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -422,6 +422,7 @@ ar: bicycle_parking: موقف دراجات bicycle_rental: تأجير دراجة biergarten: حديقة البيرة + boat_rental: تأجير قوارب brothel: بيت دعارة bureau_de_change: مكتب صرافة bus_station: محطة حافلات @@ -966,7 +967,7 @@ ar: native: title: حول هذه الصفحة native_link: النسخة العربية - mapping_link: إبدأ التخطيط + mapping_link: ابدأ التخطيط legal_babble: title_html: حقوق النشر والترخيص more_title_html: معرفة المزيد diff --git a/config/locales/eo.yml b/config/locales/eo.yml index d593651b6..bf8132612 100644 --- a/config/locales/eo.yml +++ b/config/locales/eo.yml @@ -112,7 +112,7 @@ eo: created_by_html: Kreita antaÅ­ %{time} de %{user} deleted_by_html: Forigita antaÅ­ %{time} de %{user} edited_by_html: Ŝanĝita antaÅ­ %{time} de %{user} - closed_by_html: Fermita abbr title='%{title}'>antaÅ­ %{time} de %{user} + closed_by_html: Fermita antaÅ­ %{time} de %{user} version: Versio in_changeset: Ŝanĝaro anonymous: anonimulo diff --git a/config/locales/lt.yml b/config/locales/lt.yml index dc80afb6c..221033da8 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -1463,6 +1463,7 @@ lt: track: Pėdsakas bridleway: Takas galvijams varyti cycleway: Dviračių takas + cycleway_local: Vietinis dviračių takas footway: Pėsčiųjų takas rail: Geležinkelis subway: Metro diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index b95309829..9edd7dae1 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -5,6 +5,7 @@ # Author: BraulioBezerra # Author: Brunomelnic # Author: Cainamarques +# Author: Cristofer Alves # Author: Dianakc # Author: Diego Queiroz # Author: Fmca @@ -1562,7 +1563,7 @@ pt-BR: construction: Vias em construção bicycle_shop: Loja de bicicletas bicycle_parking: Bicicletário - toilets: Banheiro público + toilets: Banheiros richtext_area: edit: Editar preview: Pré-visualizar diff --git a/vendor/assets/leaflet/leaflet.osm.js b/vendor/assets/leaflet/leaflet.osm.js index 6b78fe9be..c6de9f749 100644 --- a/vendor/assets/leaflet/leaflet.osm.js +++ b/vendor/assets/leaflet/leaflet.osm.js @@ -26,8 +26,8 @@ L.OSM.Mapnik = L.OSM.TileLayer.extend({ L.OSM.CycleMap = L.OSM.TileLayer.extend({ options: { url: document.location.protocol === 'https:' ? - 'https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png' : - 'http://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png', + 'https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey={apikey}' : + 'http://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey={apikey}', attribution: '© OpenStreetMap contributors. Tiles courtesy of Andy Allan' } }); @@ -35,8 +35,8 @@ L.OSM.CycleMap = L.OSM.TileLayer.extend({ L.OSM.TransportMap = L.OSM.TileLayer.extend({ options: { url: document.location.protocol === 'https:' ? - 'https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png' : - 'http://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png', + 'https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey={apikey}' : + 'http://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey={apikey}', attribution: '© OpenStreetMap contributors. Tiles courtesy of Andy Allan' } });