Merge branch 'master' of https://github.com/tankhiwale/openstreetmap-website
|
@ -1,12 +1,12 @@
|
|||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2019-10-07 20:37:25 +0100 using RuboCop version 0.75.0.
|
||||
# on 2019-10-19 16:05:52 +0000 using RuboCop version 0.75.0.
|
||||
# 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
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 34
|
||||
# Offense count: 35
|
||||
# Configuration parameters: AllowSafeAssignment.
|
||||
Lint/AssignmentInCondition:
|
||||
Exclude:
|
||||
|
@ -32,7 +32,7 @@ Lint/HandleExceptions:
|
|||
- 'app/controllers/api/amf_controller.rb'
|
||||
- 'app/controllers/users_controller.rb'
|
||||
|
||||
# Offense count: 700
|
||||
# Offense count: 701
|
||||
Metrics/AbcSize:
|
||||
Max: 189
|
||||
|
||||
|
@ -52,11 +52,11 @@ Metrics/BlockNesting:
|
|||
Metrics/ClassLength:
|
||||
Max: 645
|
||||
|
||||
# Offense count: 73
|
||||
# Offense count: 74
|
||||
Metrics/CyclomaticComplexity:
|
||||
Max: 22
|
||||
|
||||
# Offense count: 721
|
||||
# Offense count: 722
|
||||
# Configuration parameters: CountComments, ExcludedMethods.
|
||||
Metrics/MethodLength:
|
||||
Max: 179
|
||||
|
@ -64,14 +64,14 @@ Metrics/MethodLength:
|
|||
# Offense count: 2
|
||||
# Configuration parameters: CountComments.
|
||||
Metrics/ModuleLength:
|
||||
Max: 107
|
||||
Max: 117
|
||||
|
||||
# Offense count: 4
|
||||
# Configuration parameters: CountKeywordArgs.
|
||||
Metrics/ParameterLists:
|
||||
Max: 9
|
||||
|
||||
# Offense count: 71
|
||||
# Offense count: 72
|
||||
Metrics/PerceivedComplexity:
|
||||
Max: 25
|
||||
|
||||
|
@ -209,7 +209,7 @@ Style/IfUnlessModifier:
|
|||
Style/NumericLiterals:
|
||||
MinDigits: 11
|
||||
|
||||
# Offense count: 3330
|
||||
# Offense count: 3338
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||
# URISchemes: http, https
|
||||
|
|
3
Gemfile
|
@ -28,8 +28,7 @@ gem "coffee-rails", "~> 4.2"
|
|||
gem "jquery-rails"
|
||||
|
||||
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
||||
# gem 'jbuilder', '~> 2.0'
|
||||
gem "jsonify-rails"
|
||||
gem "jbuilder", "~> 2.7"
|
||||
|
||||
# Reduces boot times through caching; required in config/boot.rb
|
||||
gem "bootsnap", ">= 1.1.0", :require => false
|
||||
|
|
54
Gemfile.lock
|
@ -53,25 +53,25 @@ GEM
|
|||
tzinfo (~> 1.1)
|
||||
addressable (2.7.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
annotate (3.0.2)
|
||||
annotate (3.0.3)
|
||||
activerecord (>= 3.2, < 7.0)
|
||||
rake (>= 10.4, < 13.0)
|
||||
rake (>= 10.4, < 14.0)
|
||||
arel (9.0.0)
|
||||
ast (2.4.0)
|
||||
autoprefixer-rails (8.6.5)
|
||||
execjs
|
||||
aws-eventstream (1.0.3)
|
||||
aws-partitions (1.230.0)
|
||||
aws-sdk-core (3.72.0)
|
||||
aws-partitions (1.241.0)
|
||||
aws-sdk-core (3.79.0)
|
||||
aws-eventstream (~> 1.0, >= 1.0.2)
|
||||
aws-partitions (~> 1, >= 1.228.0)
|
||||
aws-partitions (~> 1, >= 1.239.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
jmespath (~> 1.0)
|
||||
aws-sdk-kms (1.25.0)
|
||||
aws-sdk-core (~> 3, >= 3.71.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-s3 (1.52.0)
|
||||
aws-sdk-core (~> 3, >= 3.71.0)
|
||||
aws-sdk-s3 (1.56.0)
|
||||
aws-sdk-core (~> 3, >= 3.77.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sigv4 (1.1.0)
|
||||
|
@ -93,7 +93,7 @@ GEM
|
|||
debug_inspector (>= 0.0.1)
|
||||
bootsnap (1.4.5)
|
||||
msgpack (~> 1.0)
|
||||
browser (2.6.1)
|
||||
browser (2.7.0)
|
||||
builder (3.2.3)
|
||||
bzip2-ffi (1.0.0)
|
||||
ffi (~> 1.0)
|
||||
|
@ -141,7 +141,7 @@ GEM
|
|||
activerecord (>= 3.0, < 6.1)
|
||||
delayed_job (>= 3.0, < 5)
|
||||
docile (1.3.2)
|
||||
dry-configurable (0.8.3)
|
||||
dry-configurable (0.9.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
dry-core (~> 0.4, >= 0.4.7)
|
||||
dry-container (0.7.2)
|
||||
|
@ -149,10 +149,10 @@ GEM
|
|||
dry-configurable (~> 0.1, >= 0.1.3)
|
||||
dry-core (0.4.9)
|
||||
concurrent-ruby (~> 1.0)
|
||||
dry-equalizer (0.2.2)
|
||||
dry-equalizer (0.3.0)
|
||||
dry-inflector (0.2.0)
|
||||
dry-initializer (3.0.1)
|
||||
dry-logic (1.0.3)
|
||||
dry-initializer (3.0.2)
|
||||
dry-logic (1.0.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
dry-core (~> 0.2)
|
||||
dry-equalizer (~> 0.2)
|
||||
|
@ -164,7 +164,7 @@ GEM
|
|||
dry-initializer (~> 3.0)
|
||||
dry-logic (~> 1.0)
|
||||
dry-types (~> 1.2)
|
||||
dry-types (1.2.0)
|
||||
dry-types (1.2.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
dry-container (~> 0.3)
|
||||
dry-core (~> 0.4, >= 0.4.4)
|
||||
|
@ -190,7 +190,7 @@ GEM
|
|||
fakefs (0.20.1)
|
||||
faraday (0.17.0)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
ffi (1.11.1)
|
||||
ffi (1.11.2)
|
||||
ffi-libarchive (0.4.10)
|
||||
ffi (~> 1.0)
|
||||
fspath (3.1.2)
|
||||
|
@ -206,7 +206,7 @@ GEM
|
|||
http_accept_language (2.0.5)
|
||||
i18n (0.9.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
i18n-js (3.4.0)
|
||||
i18n-js (3.5.0)
|
||||
i18n (>= 0.6.6)
|
||||
image_optim (0.26.5)
|
||||
exifr (~> 1.2, >= 1.2.2)
|
||||
|
@ -221,17 +221,14 @@ GEM
|
|||
image_size (2.0.2)
|
||||
in_threads (1.5.3)
|
||||
jaro_winkler (1.5.4)
|
||||
jbuilder (2.9.1)
|
||||
activesupport (>= 4.2.0)
|
||||
jmespath (1.4.0)
|
||||
jquery-rails (4.3.5)
|
||||
rails-dom-testing (>= 1, < 3)
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
json (2.2.0)
|
||||
jsonify (0.3.1)
|
||||
multi_json (~> 1.0)
|
||||
jsonify-rails (0.3.2)
|
||||
actionpack
|
||||
jsonify (< 0.4.0)
|
||||
jwt (2.2.1)
|
||||
kgio (2.11.2)
|
||||
kramdown (2.1.0)
|
||||
|
@ -262,9 +259,9 @@ GEM
|
|||
multi_xml (0.6.0)
|
||||
multipart-post (2.1.1)
|
||||
nio4r (2.5.2)
|
||||
nokogiri (1.10.4)
|
||||
nokogiri (1.10.5)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
nokogumbo (2.0.1)
|
||||
nokogumbo (2.0.2)
|
||||
nokogiri (~> 1.8, >= 1.8.4)
|
||||
oauth (0.4.7)
|
||||
oauth-plugin (0.5.1)
|
||||
|
@ -306,7 +303,7 @@ GEM
|
|||
multi_json (~> 1.12)
|
||||
omniauth-oauth2 (~> 1.4)
|
||||
openstreetmap-deadlock_retry (1.3.0)
|
||||
parallel (1.18.0)
|
||||
parallel (1.19.0)
|
||||
parser (2.6.5.0)
|
||||
ast (~> 2.4.0)
|
||||
pg (1.1.4)
|
||||
|
@ -321,7 +318,8 @@ GEM
|
|||
quad_tile (1.0.1)
|
||||
r2 (0.2.7)
|
||||
rack (2.0.7)
|
||||
rack-cors (1.0.3)
|
||||
rack-cors (1.0.6)
|
||||
rack (>= 1.6.0)
|
||||
rack-openid (1.3.1)
|
||||
rack (>= 1.1.0)
|
||||
ruby-openid (>= 2.1.8)
|
||||
|
@ -360,7 +358,7 @@ GEM
|
|||
rake (>= 0.8.7)
|
||||
thor (>= 0.19.0, < 2.0)
|
||||
rainbow (3.0.0)
|
||||
rake (12.3.3)
|
||||
rake (13.0.1)
|
||||
rb-fsevent (0.10.3)
|
||||
rb-inotify (0.10.0)
|
||||
ffi (~> 1.0)
|
||||
|
@ -378,7 +376,7 @@ GEM
|
|||
rainbow (>= 2.2.2, < 4.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 1.7)
|
||||
rubocop-performance (1.5.0)
|
||||
rubocop-performance (1.5.1)
|
||||
rubocop (>= 0.71.0)
|
||||
rubocop-rails (2.3.2)
|
||||
rack (>= 1.1)
|
||||
|
@ -419,7 +417,7 @@ GEM
|
|||
thor (0.20.3)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.10)
|
||||
tins (1.22.0)
|
||||
tins (1.22.2)
|
||||
tzinfo (1.2.5)
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (4.2.0)
|
||||
|
@ -477,9 +475,9 @@ DEPENDENCIES
|
|||
http_accept_language (~> 2.0.0)
|
||||
i18n-js (>= 3.0.0)
|
||||
image_optim_rails
|
||||
jbuilder (~> 2.7)
|
||||
jquery-rails
|
||||
json
|
||||
jsonify-rails
|
||||
kgio
|
||||
kramdown
|
||||
libxml-ruby (>= 2.0.5)
|
||||
|
|
|
@ -34,7 +34,7 @@ class ApiAbility
|
|||
can [:new, :create], Report
|
||||
can [:create, :show, :update, :destroy, :data], Trace
|
||||
can [:details, :gpx_files], User
|
||||
can [:read, :read_one, :update, :update_one, :delete_one], UserPreference
|
||||
can [:index, :show, :update, :update_all, :destroy], UserPreference
|
||||
|
||||
if user.terms_agreed?
|
||||
can [:create, :update, :upload, :close, :subscribe, :unsubscribe, :expand_bbox], Changeset
|
||||
|
|
|
@ -10,8 +10,8 @@ class ApiCapability
|
|||
can [:create, :update, :destroy], Trace if capability?(token, :allow_write_gpx)
|
||||
can [:details], User if capability?(token, :allow_read_prefs)
|
||||
can [:gpx_files], User if capability?(token, :allow_read_gpx)
|
||||
can [:read, :read_one], UserPreference if capability?(token, :allow_read_prefs)
|
||||
can [:update, :update_one, :delete_one], UserPreference if capability?(token, :allow_write_prefs)
|
||||
can [:index, :show], UserPreference if capability?(token, :allow_read_prefs)
|
||||
can [:update, :update_all, :destroy], UserPreference if capability?(token, :allow_write_prefs)
|
||||
|
||||
if token&.user&.terms_agreed?
|
||||
can [:create, :update, :upload, :close, :subscribe, :unsubscribe, :expand_bbox], Changeset if capability?(token, :allow_write_api)
|
||||
|
|
BIN
app/assets/images/banners/sotm_africa_2019.png
Normal file
After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 222 KiB |
Before Width: | Height: | Size: 447 B |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 157 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 80 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 92 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 527 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 527 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 87 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 89 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 527 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 106 B |
BIN
app/assets/images/browse/scrub.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
app/assets/images/browse/tourism_alpine_hut.16.png
Normal file
After Width: | Height: | Size: 520 B |
BIN
app/assets/images/browse/tourism_wilderness_hut.16.png
Normal file
After Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 112 B |
|
@ -121,7 +121,7 @@
|
|||
.shop.shoes::before { content: image-url('browse/shop_shoes.16.png'); }
|
||||
.shop.supermarket::before { content: image-url('browse/shop_supermarket.p.16.png'); }
|
||||
|
||||
.tourism.alpine_hut::before { content: image-url('browse/alpinehut.p.16.png'); }
|
||||
.tourism.alpine_hut::before { content: image-url('browse/tourism_alpine_hut.16.png'); }
|
||||
.tourism.camp_site::before { content: image-url('browse/tourism_camp_site.16.png'); }
|
||||
.tourism.caravan_site::before { content: image-url('browse/tourism_caravan_site.16.png'); }
|
||||
.tourism.hostel::before { content: image-url('browse/tourism_hostel.16.png'); }
|
||||
|
@ -130,6 +130,7 @@
|
|||
.tourism.museum::before { content: image-url('browse/tourism_museum.16.png'); }
|
||||
.tourism.picnic_site::before { content: image-url('browse/tourism_picnic_site.16.png'); }
|
||||
.tourism.viewpoint::before { content: image-url('browse/view_point.p.16.png'); }
|
||||
.tourism.wilderness_hut::before { content: image-url('browse/tourism_wilderness_hut.16.png'); }
|
||||
|
||||
/* Ways */
|
||||
|
||||
|
@ -184,6 +185,7 @@
|
|||
|
||||
.natural.grassland::before { content: image-url('browse/grassland.png'); }
|
||||
.natural.heath::before { content: image-url('browse/heathland.png'); }
|
||||
.natural.scrub::before { content: image-url('browse/scrub.png'); }
|
||||
.natural.water::before { content: image-url('browse/lake.png'); }
|
||||
.natural.wood::before { content: image-url('browse/wood.png'); }
|
||||
|
||||
|
|
|
@ -9,31 +9,22 @@ module Api
|
|||
|
||||
##
|
||||
# return all the preferences as an XML document
|
||||
def read
|
||||
doc = OSM::API.new.get_xml_doc
|
||||
def index
|
||||
@user_preferences = current_user.preferences
|
||||
|
||||
prefs = current_user.preferences
|
||||
|
||||
el1 = XML::Node.new "preferences"
|
||||
|
||||
prefs.each do |pref|
|
||||
el1 << pref.to_xml_node
|
||||
end
|
||||
|
||||
doc.root << el1
|
||||
render :xml => doc.to_s
|
||||
render :formats => [:xml]
|
||||
end
|
||||
|
||||
##
|
||||
# return the value for a single preference
|
||||
def read_one
|
||||
def show
|
||||
pref = UserPreference.find([current_user.id, params[:preference_key]])
|
||||
|
||||
render :plain => pref.v.to_s
|
||||
end
|
||||
|
||||
# update the entire set of preferences
|
||||
def update
|
||||
def update_all
|
||||
old_preferences = current_user.preferences.each_with_object({}) do |preference, preferences|
|
||||
preferences[preference.k] = preference
|
||||
end
|
||||
|
@ -63,7 +54,7 @@ module Api
|
|||
|
||||
##
|
||||
# update the value of a single preference
|
||||
def update_one
|
||||
def update
|
||||
begin
|
||||
pref = UserPreference.find([current_user.id, params[:preference_key]])
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
|
@ -80,7 +71,7 @@ module Api
|
|||
|
||||
##
|
||||
# delete a single preference
|
||||
def delete_one
|
||||
def destroy
|
||||
UserPreference.find([current_user.id, params[:preference_key]]).delete
|
||||
|
||||
render :plain => ""
|
||||
|
|
|
@ -17,6 +17,8 @@ module BrowseTagsHelper
|
|||
link_to(w[:title], w[:url], :title => t("browse.tag_details.wikidata_link", :page => w[:title].strip))
|
||||
end
|
||||
safe_join(wdt, ";")
|
||||
elsif wmc = wikimedia_commons_link(key, value)
|
||||
link_to h(wmc[:title]), wmc[:url], :title => t("browse.tag_details.wikimedia_commons_link", :page => wmc[:title])
|
||||
elsif url = wiki_link("tag", "#{key}=#{value}")
|
||||
link_to h(value), url, :title => t("browse.tag_details.wiki_link.tag", :key => key, :value => value)
|
||||
elsif phones = telephone_links(key, value)
|
||||
|
@ -111,6 +113,16 @@ module BrowseTagsHelper
|
|||
nil
|
||||
end
|
||||
|
||||
def wikimedia_commons_link(key, value)
|
||||
if key == "wikimedia_commons" && value =~ /^(?:file|category):/i
|
||||
return {
|
||||
:url => "//commons.wikimedia.org/wiki/#{value}?uselang=#{I18n.locale}",
|
||||
:title => value
|
||||
}
|
||||
end
|
||||
nil
|
||||
end
|
||||
|
||||
def telephone_links(_key, value)
|
||||
# Does it look like a global phone number? eg "+1 (234) 567-8901 "
|
||||
# or a list of alternate numbers separated by ;
|
||||
|
|
|
@ -200,28 +200,6 @@ class Node < ActiveRecord::Base
|
|||
save_with_history!
|
||||
end
|
||||
|
||||
def to_xml
|
||||
doc = OSM::API.new.get_xml_doc
|
||||
doc.root << to_xml_node
|
||||
doc
|
||||
end
|
||||
|
||||
def to_xml_node(changeset_cache = {}, user_display_name_cache = {})
|
||||
el = XML::Node.new "node"
|
||||
el["id"] = id.to_s
|
||||
|
||||
add_metadata_to_xml_node(el, self, changeset_cache, user_display_name_cache)
|
||||
|
||||
if visible?
|
||||
el["lat"] = lat.to_s
|
||||
el["lon"] = lon.to_s
|
||||
end
|
||||
|
||||
add_tags_to_xml_node(el, node_tags)
|
||||
|
||||
el
|
||||
end
|
||||
|
||||
def tags_as_hash
|
||||
tags
|
||||
end
|
||||
|
|
|
@ -121,31 +121,6 @@ class Relation < ActiveRecord::Base
|
|||
relation
|
||||
end
|
||||
|
||||
def to_xml
|
||||
doc = OSM::API.new.get_xml_doc
|
||||
doc.root << to_xml_node
|
||||
doc
|
||||
end
|
||||
|
||||
def to_xml_node(changeset_cache = {}, user_display_name_cache = {})
|
||||
el = XML::Node.new "relation"
|
||||
el["id"] = id.to_s
|
||||
|
||||
add_metadata_to_xml_node(el, self, changeset_cache, user_display_name_cache)
|
||||
|
||||
relation_members.each do |member|
|
||||
member_el = XML::Node.new "member"
|
||||
member_el["type"] = member.member_type.downcase
|
||||
member_el["ref"] = member.member_id.to_s
|
||||
member_el["role"] = member.member_role
|
||||
el << member_el
|
||||
end
|
||||
|
||||
add_tags_to_xml_node(el, relation_tags)
|
||||
|
||||
el
|
||||
end
|
||||
|
||||
# FIXME: is this really needed?
|
||||
def members
|
||||
@members ||= relation_members.map do |member|
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
class User < ActiveRecord::Base
|
||||
require "xml/libxml"
|
||||
|
||||
self.ignored_columns = ["nearby"]
|
||||
|
||||
has_many :traces, -> { where(:visible => true) }
|
||||
has_many :diary_entries, -> { order(:created_at => :desc) }
|
||||
has_many :diary_comments, -> { order(:created_at => :desc) }
|
||||
|
|
|
@ -18,13 +18,4 @@ class UserPreference < ActiveRecord::Base
|
|||
|
||||
validates :user, :presence => true, :associated => true
|
||||
validates :k, :v, :length => 1..255, :characters => true
|
||||
|
||||
# Turn this Node in to an XML Node without the <osm> wrapper.
|
||||
def to_xml_node
|
||||
el1 = XML::Node.new "preference"
|
||||
el1["k"] = k
|
||||
el1["v"] = v
|
||||
|
||||
el1
|
||||
end
|
||||
end
|
||||
|
|
|
@ -106,44 +106,6 @@ class Way < ActiveRecord::Base
|
|||
way
|
||||
end
|
||||
|
||||
# Find a way given it's ID, and in a single SQL call also grab its nodes and tags
|
||||
def to_xml
|
||||
doc = OSM::API.new.get_xml_doc
|
||||
doc.root << to_xml_node
|
||||
doc
|
||||
end
|
||||
|
||||
def to_xml_node(visible_nodes = nil, changeset_cache = {}, user_display_name_cache = {})
|
||||
el = XML::Node.new "way"
|
||||
el["id"] = id.to_s
|
||||
|
||||
add_metadata_to_xml_node(el, self, changeset_cache, user_display_name_cache)
|
||||
|
||||
# make sure nodes are output in sequence_id order
|
||||
ordered_nodes = []
|
||||
way_nodes.each do |nd|
|
||||
if visible_nodes
|
||||
# if there is a list of visible nodes then use that to weed out deleted nodes
|
||||
ordered_nodes[nd.sequence_id] = nd.node_id.to_s if visible_nodes[nd.node_id]
|
||||
else
|
||||
# otherwise, manually go to the db to check things
|
||||
ordered_nodes[nd.sequence_id] = nd.node_id.to_s if nd.node&.visible?
|
||||
end
|
||||
end
|
||||
|
||||
ordered_nodes.each do |nd_id|
|
||||
next unless nd_id && nd_id != "0"
|
||||
|
||||
node_el = XML::Node.new "nd"
|
||||
node_el["ref"] = nd_id
|
||||
el << node_el
|
||||
end
|
||||
|
||||
add_tags_to_xml_node(el, way_tags)
|
||||
|
||||
el
|
||||
end
|
||||
|
||||
def nds
|
||||
@nds ||= way_nodes.collect(&:node_id)
|
||||
end
|
||||
|
|
|
@ -16,12 +16,12 @@ json.properties do
|
|||
json.close_url close_note_url(note, :format => params[:format])
|
||||
end
|
||||
|
||||
json.date_created note.created_at
|
||||
json.date_created note.created_at.to_s
|
||||
json.status note.status
|
||||
json.closed_at note.closed_at if note.closed?
|
||||
json.closed_at note.closed_at.to_s if note.closed?
|
||||
|
||||
json.comments(note.comments) do |comment|
|
||||
json.date comment.created_at
|
||||
json.date comment.created_at.to_s
|
||||
|
||||
if comment.author
|
||||
json.uid comment.author.id
|
|
@ -1,5 +1,5 @@
|
|||
json.type "FeatureCollection"
|
||||
|
||||
json.features(@notes) do |note|
|
||||
json.ingest! render(note)
|
||||
json.partial! note
|
||||
end
|
1
app/views/api/notes/show.json.jbuilder
Normal file
|
@ -0,0 +1 @@
|
|||
json.partial! @note
|
|
@ -1 +0,0 @@
|
|||
json.ingest! render(@note)
|
|
@ -0,0 +1,6 @@
|
|||
attrs = {
|
||||
"k" => user_preference.k,
|
||||
"v" => user_preference.v
|
||||
}
|
||||
|
||||
xml.preference(attrs)
|
7
app/views/api/user_preferences/index.xml.builder
Normal file
|
@ -0,0 +1,7 @@
|
|||
xml.instruct!
|
||||
|
||||
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
|
||||
osm.preferences do |preferences|
|
||||
preferences << (render(@user_preferences) || "")
|
||||
end
|
||||
end
|
|
@ -1,6 +1,6 @@
|
|||
sotm_asia_2019:
|
||||
id: sotm_asia_2019
|
||||
alt: State of the Map Asia 2019
|
||||
link: https://stateofthemap.asia/
|
||||
img: banners/sotm_asia_2019.png
|
||||
enddate: 2019-nov-03
|
||||
sotm_africa_2019:
|
||||
id: sotm_africa_2019
|
||||
alt: State of the Map Africa 2019
|
||||
link: https://2019.stateofthemap.africa/
|
||||
img: banners/sotm_africa_2019.png
|
||||
enddate: 2019-nov-24
|
||||
|
|
|
@ -316,6 +316,7 @@ ar:
|
|||
tag: صفحة وصف الويكي للوسم %{key}=%{value}
|
||||
wikidata_link: العنصر %{page} على ويكي بيانات
|
||||
wikipedia_link: مقالة %{page} على ويكيبيديا
|
||||
wikimedia_commons_link: العنصر %{page} في ويكيميديا كومنز
|
||||
telephone_link: اتصل بـ%{phone_number}
|
||||
colour_preview: معاينة اللون %{colour_value}
|
||||
note:
|
||||
|
|
|
@ -283,6 +283,7 @@ ast:
|
|||
tag: La páxina wiki de descripción de la etiqueta %{key}=%{value}
|
||||
wikidata_link: L'elementu %{page} en Wikidata
|
||||
wikipedia_link: L'artículu %{page} en Wikipedia
|
||||
wikimedia_commons_link: L'elementu %{page} en Wikimedia Commons
|
||||
telephone_link: Llamar a %{phone_number}
|
||||
colour_preview: Entever el color %{colour_value}
|
||||
note:
|
||||
|
@ -1279,10 +1280,10 @@ ast:
|
|||
de cambios'
|
||||
subject_other: '[OpenStreetMap] %{commenter} comentó sobro un conxuntu de
|
||||
cambios que t''interesa'
|
||||
your_changeset: '%{commenter} dexó un comentariu n''unu de los tos conxuntos
|
||||
de cambios creáu el %{time}'
|
||||
commented_changeset: '%{commenter} dexó un comentariu nun conxuntu de cambios
|
||||
del mapa que tas siguiendo creáu por %{changeset_author} el %{time}'
|
||||
your_changeset: '%{commenter} dexó un comentariu a les %{time} n''unu de los
|
||||
tos conxuntos de cambios'
|
||||
commented_changeset: '%{commenter} dexó un comentariu a les %{time} nun conxuntu
|
||||
de cambios del mapa que tas siguiendo creáu por %{changeset_author}'
|
||||
partial_changeset_with_comment: col comentariu '%{changeset_comment}'
|
||||
partial_changeset_without_comment: ensin comentarios
|
||||
details: Puen alcontrase más detalles del conxuntu de cambios en %{url}
|
||||
|
@ -1889,7 +1890,9 @@ ast:
|
|||
newer: Traces más nueves
|
||||
trace:
|
||||
pending: PENDIENTE
|
||||
count_points: '%{count} puntos'
|
||||
count_points:
|
||||
one: 1 puntu
|
||||
other: '%{count} puntos'
|
||||
more: más
|
||||
trace_details: Amosar detalles de la traza
|
||||
view_map: Ver el Mapa
|
||||
|
|
|
@ -17,6 +17,9 @@ be-Tarask:
|
|||
submit:
|
||||
diary_comment:
|
||||
create: Захаваць
|
||||
diary_entry:
|
||||
create: Апублікаваць
|
||||
update: Абнавіць
|
||||
issue_comment:
|
||||
create: Дадаць камэнтар
|
||||
message:
|
||||
|
@ -24,6 +27,9 @@ be-Tarask:
|
|||
client_application:
|
||||
create: Рэгістрацыя
|
||||
update: Рэдагаваць
|
||||
redaction:
|
||||
create: Стварыць рэдакцыю
|
||||
update: Захаваць рэдакцыю
|
||||
trace:
|
||||
create: Загрузіць
|
||||
update: Захаваць зьмены
|
||||
|
@ -33,6 +39,7 @@ be-Tarask:
|
|||
activerecord:
|
||||
errors:
|
||||
messages:
|
||||
invalid_email_address: не падобны на карэктны адрас э-пошты
|
||||
email_address_not_routable: не маршрутызаваны
|
||||
models:
|
||||
acl: Сьпіс абмежаваньня доступу
|
||||
|
@ -156,6 +163,15 @@ be-Tarask:
|
|||
description: Аддаленае кіраваньне (JOSM ці Merkaartor)
|
||||
api:
|
||||
notes:
|
||||
comment:
|
||||
opened_at_html: Створана %{when}
|
||||
opened_at_by_html: Створана %{when} удзельнікам %{user}
|
||||
commented_at_html: Абноўлена %{when}
|
||||
commented_at_by_html: Абноўлена %{when} удзельнікам %{user}
|
||||
closed_at_html: Разьвязана %{when}
|
||||
closed_at_by_html: Разьвізана %{when} удзельнікам %{user}
|
||||
reopened_at_html: Пераадкрыта %{when}
|
||||
reopened_at_by_html: Пераадкрыта %{when} удзельнікам %{user}
|
||||
entry:
|
||||
full: Поўны тэкст
|
||||
browse:
|
||||
|
|
|
@ -1339,7 +1339,9 @@ bg:
|
|||
newer: По-нови следи
|
||||
trace:
|
||||
pending: Обработва се
|
||||
count_points: '%{count} точки'
|
||||
count_points:
|
||||
one: 1 точка
|
||||
other: '%{count} точки'
|
||||
view_map: Вижте на картата
|
||||
edit: променяне
|
||||
edit_map: Редактиране на картата
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
# Author: KWiki
|
||||
# Author: Macofe
|
||||
# Author: Maxmus
|
||||
# Author: Obsuser
|
||||
# Author: Palapa
|
||||
# Author: Ruila
|
||||
# Author: Srdjan m
|
||||
|
@ -994,7 +995,7 @@ bs:
|
|||
destroyed: Poruka izbrisana
|
||||
site:
|
||||
about:
|
||||
next: Slijedeće
|
||||
next: Sljedeće
|
||||
open_data_title: Open Data
|
||||
copyright:
|
||||
foreign:
|
||||
|
@ -1424,7 +1425,7 @@ bs:
|
|||
no_apps: Imate li aplikaciju koju želite registrirati za korištenje sa %{oauth}
|
||||
standardom? Morate registrirati Vašu web aplikaciju prije nego ona može slati
|
||||
OAuth zahtjeve za ovu uslugu
|
||||
registered_apps: 'Imate registrirane slijedeće klijentske aplikacije:'
|
||||
registered_apps: 'Imate registrirane sljedeće klijentske aplikacije:'
|
||||
register_new: Registrirajte Vašu aplikaciju
|
||||
form:
|
||||
name: Ime
|
||||
|
|
|
@ -342,6 +342,7 @@ de:
|
|||
tag: Die Wiki-Erläuterungsseite für das Attribut %{key}=%{value}
|
||||
wikidata_link: Das Objekt %{page} auf Wikidata
|
||||
wikipedia_link: Der Artikel zu %{page} in der Wikipedia
|
||||
wikimedia_commons_link: Das %{page} Element auf Wikimedia Commons
|
||||
telephone_link: '%{phone_number} anrufen'
|
||||
colour_preview: Farbe %{colour_value} Vorschau
|
||||
note:
|
||||
|
|
|
@ -132,7 +132,43 @@ el:
|
|||
pass_crypt: Κωδικός
|
||||
datetime:
|
||||
distance_in_words_ago:
|
||||
about_x_hours:
|
||||
one: περίπου μία ώρα πριν
|
||||
other: περίπου %{count} ώρες πριν
|
||||
about_x_months:
|
||||
one: περίπου έναν μήνα πριν
|
||||
other: περίπου %{count} μήνες πριν
|
||||
about_x_years:
|
||||
one: περίπου έναν χρόνο πριν
|
||||
other: περίπου %{count} χρόνια πριν
|
||||
almost_x_years:
|
||||
one: σχεδόν ένα χρόνο πριν
|
||||
other: σχεδόν %{count} χρόνια πριν
|
||||
half_a_minute: μισό λεπτό πριν
|
||||
less_than_x_seconds:
|
||||
one: λιγότερο από ένα δευτερόλεπτο πριν
|
||||
other: λιγότερο από %{count} δευτερόλεπτα πριν
|
||||
less_than_x_minutes:
|
||||
one: λιγότερο από ένα λεπτό πριν
|
||||
other: λιγότερο από %{count} λεπτά πριν
|
||||
over_x_years:
|
||||
one: πάνω από έναν χρόνο πριν
|
||||
other: πάνω από %{count} χρόνια πριν
|
||||
x_seconds:
|
||||
one: ένα δευτερόλεπτο πριν
|
||||
other: '%{count} δευτερόλεπτα πριν'
|
||||
x_minutes:
|
||||
one: ένα λεπτό πριν
|
||||
other: '%{count} λεπτά πριν'
|
||||
x_days:
|
||||
one: μία ημέρα πριν
|
||||
other: '%{count} ημέρες πριν'
|
||||
x_months:
|
||||
one: έναν μήνα πριν
|
||||
other: '%{count} μήνες πριν'
|
||||
x_years:
|
||||
one: ένα χρόνο πριν
|
||||
other: '%{count} χρόνια πριν'
|
||||
printable_name:
|
||||
with_version: '%{id}, v%{version}'
|
||||
editor:
|
||||
|
|
|
@ -278,6 +278,7 @@ en:
|
|||
tag: "The wiki description page for the %{key}=%{value} tag"
|
||||
wikidata_link: "The %{page} item on Wikidata"
|
||||
wikipedia_link: "The %{page} article on Wikipedia"
|
||||
wikimedia_commons_link: "The %{page} item on Wikimedia Commons"
|
||||
telephone_link: "Call %{phone_number}"
|
||||
colour_preview: "Colour %{colour_value} preview"
|
||||
note:
|
||||
|
|
|
@ -297,6 +297,7 @@ eo:
|
|||
tag: La viki-paĝo priskribanta la etikedon '%{key}=%{value}'
|
||||
wikidata_link: La %{page} elemento en Vikidatumoj
|
||||
wikipedia_link: La artikolo %{page} en Vikipedio
|
||||
wikimedia_commons_link: Objekto %{page} ĉe Vikimedia Komunejo
|
||||
telephone_link: Telefoni %{phone_number}
|
||||
colour_preview: Antaŭvido de koloro “%{colour_value}”
|
||||
note:
|
||||
|
|
|
@ -1373,7 +1373,7 @@ es:
|
|||
date: Fecha
|
||||
no_messages_yet: No tienes aún mensajes. ¿Por qué no te pones en contacto con
|
||||
alguno de los %{people_mapping_nearby_link}?
|
||||
people_mapping_nearby: gente cercana mapeando
|
||||
people_mapping_nearby: gente mapeando cerca
|
||||
message_summary:
|
||||
unread_button: Marcar como no leído
|
||||
read_button: Marcar como leído
|
||||
|
|
|
@ -914,7 +914,7 @@ fa:
|
|||
clothes: فروشگاه پوشاک
|
||||
computer: فروشگاه رایانه
|
||||
confectionery: فروشگاه قنادی
|
||||
convenience: فروشگاه زنجیره ای
|
||||
convenience: سوپرمارکت
|
||||
copyshop: مغازه فتوکپی
|
||||
cosmetics: فروشگاه لوازم آرایشی
|
||||
deli: اغذیه فروشی
|
||||
|
@ -966,7 +966,7 @@ fa:
|
|||
shoes: فروشگاه کفش
|
||||
sports: فروشگاه ورزشی
|
||||
stationery: فروشگاه نوشتافزار
|
||||
supermarket: سوپرمارکت
|
||||
supermarket: فروشگاه بزرگ
|
||||
tailor: خیاطی
|
||||
ticket: فروشگاه بلیط
|
||||
tobacco: فروشگاه توتون و تنباکو
|
||||
|
@ -1159,10 +1159,10 @@ fa:
|
|||
sign_up_tooltip: ایجاد یک حساب کاربری برای ویرایش
|
||||
edit: ویرایش
|
||||
history: تاریخچه
|
||||
export: برونبُرد
|
||||
export: برونریزی
|
||||
issues: موضوعها
|
||||
data: دادهها
|
||||
export_data: برونبُرد دادهها
|
||||
export_data: برونریزی دادهها
|
||||
gps_traces: ردهای GPS
|
||||
gps_traces_tooltip: مدیریت ردهای GPS
|
||||
user_diaries: روزنوشتهای کاربر
|
||||
|
@ -1225,13 +1225,14 @@ fa:
|
|||
and_the_tags: 'و برچسبهای زیر:'
|
||||
and_no_tags: و بدون برچسب.
|
||||
failure:
|
||||
subject: درونبرد ناموفق GPX [OpenStreetMap]
|
||||
failed_to_import: 'درونبرد با شکست مواجه شد. این خطا رخ داد:'
|
||||
more_info_1: اطلاعات بیشتر دربارهٔ شکست درونبرد GPX و چگونگی پیشگیری از
|
||||
subject: شکست درونریزی GPX [OpenStreetMap]
|
||||
failed_to_import: 'درونریزی با شکست مواجه شد. این خطا رخ داد:'
|
||||
more_info_1: اطلاعات بیشتر دربارهٔ شکست درونریزی GPX و چگونگی پیشگیری از
|
||||
آن
|
||||
more_info_2: 'آن را در اینجا خواهید یافت:'
|
||||
import_failures_url: https://wiki.openstreetmap.org/wiki/Fa:GPX_Import_Failures
|
||||
success:
|
||||
subject: درونبرد موفق GPX [OpenStreetMap]
|
||||
subject: موفقیت درونریزی GPX [OpenStreetMap]
|
||||
loaded_successfully: با موفقیت و با %{trace_points} نقطه از %{possible_points}
|
||||
نقطهٔ ممکن روی وبسایت قرار گرفته است.
|
||||
signup_confirm:
|
||||
|
@ -1580,10 +1581,10 @@ fa:
|
|||
no_iframe_support: مرورگر شما فریمهای HTML را، که برای این ویژگی لازم است،
|
||||
پشتیبانی نمیکند.
|
||||
export:
|
||||
title: برونبُرد
|
||||
area_to_export: محدوده برای برونبرد
|
||||
title: برونریزی
|
||||
area_to_export: محدوده برای برونریزی
|
||||
manually_select: بهصورت دستی منطقه دیگری را انتخاب کنید
|
||||
format_to_export: قالب برونبرد
|
||||
format_to_export: قالب برونریزی
|
||||
osm_xml_data: OpenStreetMap XML Data
|
||||
map_image: تصویر نقشه (لایهٔ استاندارد را نشان میدهد)
|
||||
embeddable_html: HTML توکار
|
||||
|
@ -1591,9 +1592,9 @@ fa:
|
|||
export_details: دادههای OpenStreetMap تحت <a href="https://opendatacommons.org/licenses/odbl/1.0/">پروانهٔ
|
||||
دادههای همگانی باز، پایگاهدادهٔ باز</a> (ODbL) قرار دارد.
|
||||
too_large:
|
||||
advice: 'اگر برونبَری بالا ناموفق بود، لطفاً یکی از منابع زیر را استفاده
|
||||
advice: 'اگر برونریزی بالا ناموفق بود، لطفاً یکی از منابع زیر را استفاده
|
||||
کنید:'
|
||||
body: این محدوده برای برونبَری در قالب OpenStreetMap XML خیلی بزرگ است. لطفاً
|
||||
body: این محدوده برای برونریزی در قالب OpenStreetMap XML خیلی بزرگ است. لطفاً
|
||||
بزرگنمایی کنید یا منطقهٔ کوچکتری را انتخاب کنید، یا برای دریافت دادههای
|
||||
انبوه یکی از منابع فهرست زیر را استفاده کنید.
|
||||
planet:
|
||||
|
@ -1624,7 +1625,7 @@ fa:
|
|||
longitude: 'طول:'
|
||||
output: خروجی
|
||||
paste_html: برای استفادهٔ توکار در وبسایت، HTML را کپی و درج کنید
|
||||
export_button: برونبُرد
|
||||
export_button: برونریزی
|
||||
fixthemap:
|
||||
title: گزارش مشکل / اصلاح نقشه
|
||||
how_to_help:
|
||||
|
@ -1816,7 +1817,7 @@ fa:
|
|||
paragraph_1_html: قوانین رسمی OpenStreetMap تنها چند مورد است، اما از همهٔ
|
||||
مشارکتکنندگان انتظار داریم با جامعه همکاری کنند و ارتباط داشته باشند. اگر
|
||||
میخواهید هرگونه فعالیتی به غیر از ویرایش دستی انجام دهید، لطفاً رهنمودهای
|
||||
مربوط به <a href='http://wiki.openstreetmap.org/wiki/Import/Guidelines'>درونبُرد
|
||||
مربوط به <a href='http://wiki.openstreetmap.org/wiki/Import/Guidelines'>درونریزی
|
||||
(Import)</a> و <a href='https://wiki.openstreetmap.org/wiki/Automated_Edits_code_of_conduct'>ویرایشهای
|
||||
خودکار</a> را بخوانید و از آنها پیروی کنید.
|
||||
questions:
|
||||
|
@ -2559,7 +2560,7 @@ fa:
|
|||
center_marker: مرکز نقشه در نشانگر
|
||||
paste_html: برای درج در وب سایت HTML را جایگذاری کنید
|
||||
view_larger_map: نمایش نقشه بزرگتر
|
||||
only_standard_layer: فقط از لایهٔ استاندارد میتوان خروجی تصویری گرفت
|
||||
only_standard_layer: فقط لایهٔ استاندارد را میتوان در قالب عکس برونریزی کرد.
|
||||
embed:
|
||||
report_problem: گزارش مشکل
|
||||
key:
|
||||
|
|
|
@ -298,8 +298,8 @@ fi:
|
|||
note: merkintä
|
||||
redacted:
|
||||
redaction: Redaktio %{id}
|
||||
message_html: Tämän %{type}-tyypin versiota ei voi näyttää koska se on laitostettu.
|
||||
Katso lisätietoja %{redaction_link}.
|
||||
message_html: Tämän %{type}-tyypin versiota %{version} ei voi näyttää koska
|
||||
se on relaatoitu. Katso lisätietoja %{redaction_link}.
|
||||
type:
|
||||
node: piste
|
||||
way: polku
|
||||
|
@ -2742,12 +2742,12 @@ fi:
|
|||
redactions:
|
||||
edit:
|
||||
description: Kuvaus
|
||||
heading: Muokkaa laitosta
|
||||
title: Muokkaa laitosta
|
||||
heading: Muokkaa relaatiota
|
||||
title: Muokkaa relaatiota
|
||||
index:
|
||||
empty: Ei ole näytettävää laitosta
|
||||
heading: Laitosten luettelo
|
||||
title: Laitosten luettelo
|
||||
empty: Ei ole näytettävää relaatiota
|
||||
heading: Relaatioiden luettelo
|
||||
title: Relaatioiden luettelo
|
||||
new:
|
||||
description: Kuvaus
|
||||
heading: Kirjoita tietoja uudesta laitoksesta
|
||||
|
@ -2757,7 +2757,7 @@ fi:
|
|||
heading: Näytetään redaktio ”%{title}”
|
||||
title: Näytetään redaktio
|
||||
user: 'Luoja:'
|
||||
edit: Muokkaa tätä laitosta
|
||||
edit: Muokkaa tätä relaatiota
|
||||
destroy: Poista tämä redaktio
|
||||
confirm: Oletko varma?
|
||||
create:
|
||||
|
@ -2768,7 +2768,7 @@ fi:
|
|||
not_empty: Redaktio ei ole tyhjä. Poista redaktiotiedot kaikista tähän redaktioon
|
||||
liittyvistä versioista ennen sen tuhoamista.
|
||||
flash: Redaktio tuhottu.
|
||||
error: Laitosta tuhottaessa tapahtui virhe.
|
||||
error: Relaatiota tuhottaessa tapahtui virhe.
|
||||
validations:
|
||||
leading_whitespace: tyhjää tilaa alussa
|
||||
trailing_whitespace: tyhjää tilaa lopussa
|
||||
|
|
|
@ -59,7 +59,14 @@ fit:
|
|||
old_way_tag: Vanha viivan tagi
|
||||
relation: Relaatio
|
||||
relation_member: Relaation jäsen
|
||||
relation_tag: Relaation tagi
|
||||
session: Istunto
|
||||
trace: Jälki
|
||||
tracepoint: Jälkipiste
|
||||
tracetag: Jäljen tagi
|
||||
user: Käyttäjä
|
||||
user_preference: Käyttäjän asetus
|
||||
user_token: Käyttäjän poletti
|
||||
way: Viiva
|
||||
way_node: Viivan piste
|
||||
way_tag: Viivan tagi
|
||||
|
@ -86,6 +93,7 @@ fit:
|
|||
description: Kuvvaus
|
||||
message:
|
||||
sender: Lähättäjä
|
||||
title: Aihe
|
||||
body: Viesti
|
||||
recipient: Vastaanottaja
|
||||
user:
|
||||
|
@ -161,9 +169,16 @@ fit:
|
|||
reopened_at_by_html: '%{user} aktivoinut uuesti %{when}'
|
||||
rss:
|
||||
title: OpenStreetMapin karttailmoitukset
|
||||
description_area: Lista raportoiduista, kommentoiduista tai suljetuista huomautuksista
|
||||
omalla alueellasi [( %{min_lat}|%{min_lon})--( %{max_lat}|%{max_lon})]
|
||||
description_item: Karttailmotuksen %{id} RSS-syöte
|
||||
opened: uusi huomautus (lähellä kohdetta %{place})
|
||||
commented: uusi kommentti (lähelä kohetta %{place})
|
||||
closed: suljettu karttailmoitus (lähellä paikkaa %{place})
|
||||
reopened: uudelleenavattu karttailmoitus (lähellä paikka %{place})
|
||||
entry:
|
||||
comment: Kommentti
|
||||
full: Koko karttailmoitus
|
||||
browse:
|
||||
created: Luotu
|
||||
closed: Ratkaistu
|
||||
|
@ -229,6 +244,7 @@ fit:
|
|||
entry: Relaatio %{relation_name}
|
||||
entry_role: Relaatio %{relation_name} (rooli %{relation_role})
|
||||
not_found:
|
||||
sorry: 'Pahoittelemme, %{type} #%{id} ei ole olemassa.'
|
||||
type:
|
||||
node: Pistettä
|
||||
way: Polkua
|
||||
|
@ -236,6 +252,7 @@ fit:
|
|||
changeset: muutoskokoelma
|
||||
note: merkintä
|
||||
timeout:
|
||||
sorry: Tietojen hakeminen (kohde %{type}:%{id}) kesti liian kauan.
|
||||
type:
|
||||
node: piste
|
||||
way: polku
|
||||
|
@ -244,6 +261,8 @@ fit:
|
|||
note: merkintä
|
||||
redacted:
|
||||
redaction: Redaktio %{id}
|
||||
message_html: Tämän %{type}-tyypin versuunia %{version} ei voi näyttää koska
|
||||
se on relaatoitu. Katso lisätietoja %{redaction_link}.
|
||||
type:
|
||||
node: piste
|
||||
way: polku
|
||||
|
@ -275,6 +294,9 @@ fit:
|
|||
commented_by_anonymous: Kommentti tuntemattomalta käyttäjältä <abbr title='%{exact_time}'>%{when}</abbr>
|
||||
closed_by: Ratkaissut käyttäjä %{user} <abbr title='%{exact_time}'>%{when}</abbr>
|
||||
closed_by_anonymous: Ratkaissut tuntematon käyttäjä <abbr title='%{exact_time}'>%{when}</abbr>
|
||||
reopened_by: Avvannut uudelleen käyttäjä %{user} <abbr title='%{exact_time}'>%{when}</abbr>
|
||||
reopened_by_anonymous: Avvannut uudelleen tuntematon käyttäjä <abbr title='%{exact_time}'>%{when}</abbr>
|
||||
hidden_by: Piilottanut käyttäjä %{user} <abbr title='%{exact_time}'>%{when}</abbr>
|
||||
report: Ilmianna karttailmotus
|
||||
query:
|
||||
title: Ominaisuuskysely
|
||||
|
@ -320,6 +342,9 @@ fit:
|
|||
index:
|
||||
title_all: Keskustelu OpenStreetMapin muutoskokoelmasta
|
||||
title_particular: 'OpenStreetMap muutoskokoelma #%{changeset_id} keskustelu'
|
||||
timeout:
|
||||
sorry: Valitettavasti pyytämäsi muutoskokoelmien kommenttien hakeminen kesti
|
||||
liian kauan.
|
||||
diary_entries:
|
||||
new:
|
||||
title: Uusi päiväkirjamerkintä
|
||||
|
@ -354,6 +379,9 @@ fit:
|
|||
login: Lokkaa sisäle
|
||||
no_such_entry:
|
||||
title: Päiväkirjamerkintää ei ole
|
||||
heading: Tunnuksella %{id} ei ole päiväkirjamerkintää.
|
||||
body: Tunnuksella %{id} ei ole päiväkirjamerkintää. Joko saamasi linkki oli
|
||||
virheellinen tai kirjoitit sen väärin.
|
||||
diary_entry:
|
||||
posted_by: Käyttäjä %{link_user} kirjotti tämän %{created} kielellä %{language_link}
|
||||
comment_link: Kommentoi tätä kirjoitusta
|
||||
|
@ -408,6 +436,13 @@ fit:
|
|||
geonames_reverse: Hakuresyltaatit <a href="http://www.geonames.org/">GeoNamesista</a>
|
||||
search_osm_nominatim:
|
||||
prefix:
|
||||
aerialway:
|
||||
cable_car: Köysirata
|
||||
chair_lift: Tuolihissi
|
||||
drag_lift: Vetohissi
|
||||
gondola: Gondolihissi
|
||||
platter: Hiihtohissi
|
||||
pylon: Pylväs
|
||||
amenity:
|
||||
cafe: Kahvila
|
||||
hospital: Siukhuusi
|
||||
|
@ -420,6 +455,7 @@ fit:
|
|||
sauna: Sauna
|
||||
school: Skoulu
|
||||
toilets: Tualetit
|
||||
university: Yniversiteetti
|
||||
leisure:
|
||||
sauna: Sauna
|
||||
office:
|
||||
|
@ -430,33 +466,89 @@ fit:
|
|||
tourism:
|
||||
museum: Myseymmi
|
||||
zoo: Elläintarha
|
||||
description:
|
||||
title:
|
||||
osm_nominatim: Sijainti <a href="https://nominatim.openstreetmap.org/">OpenStreetMap
|
||||
Nominatimista</a>
|
||||
geonames: Sijainti palvelusta <a href="http://www.geonames.org/">GeoNames</a>
|
||||
types:
|
||||
cities: Kaupunkit
|
||||
towns: Kylät
|
||||
places: Paikat
|
||||
results:
|
||||
no_results: Ei hakuresyltaatteja
|
||||
more_results: Lissää resyltaatteja
|
||||
issues:
|
||||
index:
|
||||
title: Tapaukset
|
||||
select_status: Valitte tila
|
||||
select_type: Valitte tyyppi
|
||||
select_last_updated_by: Valitte viimiisin päivittäjä
|
||||
reported_user: Ilmiannettu
|
||||
not_updated: Ei päivitetty
|
||||
search: Hakea
|
||||
search_guidance: 'Eti tapauksia:'
|
||||
user_not_found: Käyttäjää ei löydy
|
||||
issues_not_found: Tapahtumia ei löytynyt
|
||||
status: Tila
|
||||
reports: Ilmiannot
|
||||
last_updated: Päivitetty
|
||||
last_updated_time_html: <abbr title='%{title}'>%{time}</abbr>
|
||||
last_updated_time_user_html: käyttäjä %{user} <abbr title='%{title}'>%{time}</abbr>
|
||||
link_to_reports: Näytä ilmiannot
|
||||
reports_count:
|
||||
one: 1 ilmoitus
|
||||
other: '%{count} ilmiantoa'
|
||||
states:
|
||||
open: Avaa
|
||||
open: Avvaa
|
||||
resolved: Ratkaistu
|
||||
update:
|
||||
new_report: Ilmianto on vastaanotettu
|
||||
successful_update: Ilmianto on päivitetty
|
||||
provide_details: Täyennä tarvittavat tiot
|
||||
show:
|
||||
title: '%{status} Tapaus #%{issue_id}'
|
||||
reports:
|
||||
zero: Ei ilmiantoa
|
||||
one: Yksi ilmianto
|
||||
other: '%{count} ilmiantoa'
|
||||
report_created_at: Ilmotettu ensimmäisen kerran %{datetime}
|
||||
last_resolved_at: Ratkastu %{datetime}
|
||||
last_updated_at: Viimeisin käsittelijä %{displayname} %{datetime}
|
||||
resolve: Ratkase
|
||||
ignore: Merkitte aiheettomaksi
|
||||
reopen: Avaa uuelleen
|
||||
reopen: Avvaa uuelleen
|
||||
reports_of_this_issue: Ilmianna tapahtuma
|
||||
read_reports: Lue ilmiantoja
|
||||
new_reports: Uuet ilmiannot
|
||||
other_issues_against_this_user: Muut tähän käyttäjään kohistetut ilmiannot
|
||||
no_other_issues: Ei muita tähän käyttäjään kohistuvia ilmiantoja.
|
||||
comments_on_this_issue: Tapauksen kommentit
|
||||
resolve:
|
||||
resolved: Tapaus on markeerattu ratkaistuksi
|
||||
ignore:
|
||||
ignored: Tapaus on markeerattu aiheettomaksi
|
||||
reopen:
|
||||
reopened: Tapaus on markeerattu käsittelyssä olevaksi
|
||||
comments:
|
||||
created_at: '%{datetime}'
|
||||
reassign_param: Haluatko määrittää tapauksen tilan uuelleen?
|
||||
reports:
|
||||
updated_at: '%{datetime}'
|
||||
reported_by_html: Käyttäjä %{user} ilmiantanut merkinnällä %{category}
|
||||
helper:
|
||||
reportable_title:
|
||||
diary_comment: '%{entry_title}, kommenttitunnus %{comment_id}'
|
||||
note: Karttailmoitustunnus %{note_id}
|
||||
issue_comments:
|
||||
create:
|
||||
comment_created: Kommentti jätetty
|
||||
reports:
|
||||
new:
|
||||
title_html: Ilmianna %{link}
|
||||
missing_params: Ilmotuksen luominen epäonnistui
|
||||
details: Kuvaile ongelmaa (pakollinen)
|
||||
select: 'Valitte ilmiannon syy:'
|
||||
categories:
|
||||
diary_entry:
|
||||
other_label: Muu
|
||||
|
@ -544,13 +636,29 @@ fit:
|
|||
changeset_comment_notification:
|
||||
hi: Hei %{to_user},
|
||||
greeting: Hei,
|
||||
commented:
|
||||
partial_changeset_with_comment: kommentin kanssa '%{changeset_comment}'
|
||||
partial_changeset_without_comment: ei kommenttia
|
||||
details: 'Lisätioja muutoskokoelmasta: %{url}'
|
||||
unsubscribe: Peruaksesi tilauksen päivityksistä tähän muutoskokoelmaan, vieraile
|
||||
sivula %{url} ja klikkaa "Unsubscribe".
|
||||
messages:
|
||||
inbox:
|
||||
title: Saapuneet
|
||||
my_inbox: Saapuneet
|
||||
outbox: Lähetetyt
|
||||
messages: Kansiossa on %{new_messages} ja %{old_messages}.
|
||||
new_messages:
|
||||
one: '%{count} lukematon viesti'
|
||||
other: '%{count} lukematonta viestiä'
|
||||
old_messages:
|
||||
one: '%{count} luettu viesti'
|
||||
other: '%{count} luettua viestiä'
|
||||
from: Lähättäjä
|
||||
subject: Otsikko
|
||||
date: Taatumi
|
||||
no_messages_yet: Ei viestejä. %{people_mapping_nearby_link}
|
||||
people_mapping_nearby: Lähiseudun kartoittajat
|
||||
message_summary:
|
||||
unread_button: Markeeraa lukemattomaksi
|
||||
read_button: Markeeraa luetuksi
|
||||
|
@ -564,14 +672,39 @@ fit:
|
|||
back_to_inbox: Takashiin saapuneisiin
|
||||
create:
|
||||
message_sent: Viesti on lähätetty.
|
||||
limit_exceeded: Olet lähettänyt runsaasti viestejä lyhyessä ajassa. Odota hetki
|
||||
ennen kuin yrität lähettää lisää.
|
||||
no_such_message:
|
||||
title: Ei sellaista viestiä
|
||||
heading: Ei sellaista viestiä
|
||||
outbox:
|
||||
title: Lähätetyt
|
||||
my_inbox: Minun %{inbox_link}
|
||||
inbox: Saapuneet
|
||||
outbox: Lähätetyt
|
||||
messages:
|
||||
one: Kansiossa on %{count} lähätetty viesti.
|
||||
other: Kansiossa on %{count} lähätettyä viestiä.
|
||||
to: Vastaanottaja
|
||||
subject: Otsikko
|
||||
date: Taatumi
|
||||
no_sent_messages: Et ole lähettänyt vielä viestejä. Miksi et ottaisi yhteyttä
|
||||
joihinkin %{people_mapping_nearby_link}?
|
||||
people_mapping_nearby: lähellä kartoittaviin käyttäjiin
|
||||
reply:
|
||||
wrong_user: Olet lokannu sisäle konttulla `%{user}' mutta viestiä, johon tahot
|
||||
vastata, ei ole lähätetty kyseiselle käyttäjälle. Ole hyvä ja lokkaa sisäle
|
||||
oikealla käyttäjäkonttulla vastataksesi.
|
||||
show:
|
||||
title: Lue viesti
|
||||
from: 'Lähettäjä:'
|
||||
subject: Otsikko
|
||||
date: Taatumi
|
||||
reply_button: Vastaa
|
||||
unread_button: Markeeraa lukemattomaksi
|
||||
destroy_button: Ota poies
|
||||
back: Takashiin
|
||||
to: 'Vastaanottaja:'
|
||||
sent_message_summary:
|
||||
destroy_button: Ota poies
|
||||
mark:
|
||||
|
@ -582,15 +715,82 @@ fit:
|
|||
site:
|
||||
about:
|
||||
next: Seuraava
|
||||
copyright_html: <span>©</span>OpenStreetMapin<br>tekijät
|
||||
used_by: Tuhannet verkkosivustot, mupiilisovellukset ja laitteistot käyttävät
|
||||
%{name}-karttaa
|
||||
lede_text: OpenStreetMapia rakentavat vapaaehtoiset yhteisön jäsenet, jotka
|
||||
tuottavat ja ylläpitävät karttatietoja teistä, rautateistä, kahviloista, rautatieasemista
|
||||
ja monista muista kohteista kaikkialla maailmassa.
|
||||
local_knowledge_title: Paikallistuntemus
|
||||
local_knowledge_html: OpenStreetMapissa korostuu paikallistuntemus. Kartoittajat
|
||||
käyttävät ilmakuvia, GPS-paikantamia ja jalkautumista pitääkseen OpenStreetMap-kartan
|
||||
ajan tasalla.
|
||||
community_driven_title: Yhteisön voima
|
||||
community_driven_html: |-
|
||||
OpenStreetMap-yhteisö on monipuolinen, intohimoinen ja kasvaa joka päivä. Yhteisöön kuuluu harrastajakartoittajia, GIS-ammattilaisia, järjestelmää ylläpitäviä insinöörejä, humanitaarisia auttajia, jotka kartoittavat katastrofin kärsineitä alueita sekä monia muita. Lisätietoja yhteisöstä saa lukemalla <a href='https://blog.openstreetmap.org'>OpenStreetMap-blogia</a>, <a href='%{diary_path}'>käyttäjien päiväkirjoja</a>,
|
||||
<a href='https://blogs.openstreetmap.org/'>yhteisöblogeja</a> ja
|
||||
<a href='https://www.osmfoundation.org/'>OSM-säätiön</a> verkkosivua.
|
||||
open_data_title: Avoin taatta
|
||||
open_data_html: 'OpenStreetMap on <i>avointa taattaa</i>: palvelua saa käyttää
|
||||
vapaasti mihin tahansa, kunhan OpenStreetMap tekijöineen mainitaan. Jos palvelua
|
||||
kehitetään tai muuunnellaan, sitä saa levittää eteenpäin vain samala lisensillä.
|
||||
Lisätietoja on <a href=''%{copyright_path}''>Tekijänoikeus ja lisensi</a>
|
||||
-sivula.'
|
||||
legal_title: Lakitekninen jako
|
||||
legal_html: "Tämä ja monet muut OSM-sivustot ovat muodollisesti <a href='https://osmfoundation.org/'>OpenStreetMap-säätiön</a>
|
||||
(OSMF) hallinnoimia OSM-yhteisön puolesta. Kaikkien näiden sivustojen käyttöön
|
||||
sovelletaan <a href=\"https://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">\nsallitun
|
||||
käytön käytäntöjä</a>, <a href=\"https://wiki.osmfoundation.org/wiki/Terms_of_Use\">käyttöehtoja</a>
|
||||
ja <a href=\"https://wiki.osmfoundation.org/wiki/Privacy_Policy\">tietosuojakäytäntöä</a>
|
||||
(molemmat sisällöt saatavilla vain englanniksi).\n<br> \n<a href='https://osmfoundation.org/Contact'>Ota
|
||||
yhteys OSMF:ään</a> lisensointi-, tekijänoikeus- ja muissa lakiteknisissä
|
||||
kysymyksissä.\n<br>\nNimi OpenStreetMap, suurennuslasilogo ja slogan State
|
||||
of the Map ovat <a href=\"https://wiki.osmfoundation.org/wiki/Trademark_Policy\">säätiön
|
||||
rekisteröimiä tavaramerkkejä</a>."
|
||||
partners_title: Kumppanit
|
||||
copyright:
|
||||
foreign:
|
||||
title: Tietoja tästä käänöksestä
|
||||
text: Jos tämän käänätyn sivun ja %{english_original_link} välillä on eroja,
|
||||
englantinkielinen sivu on aina etusijalla.
|
||||
english_link: englantinkielisen alkuperäisversuunin
|
||||
native:
|
||||
title: Tästä sivusta
|
||||
text: Tällä sivula on alkuperänen englanninkielinen versuuni tekijäoikeuksista.
|
||||
Saatavilla on myös %{native_link}. Voit myös lopettaa tekijänoikeuksien
|
||||
lukemisen ja %{mapping_link}.
|
||||
native_link: meänkielinen versuuni
|
||||
mapping_link: aloittaa kartoituksen
|
||||
legal_babble:
|
||||
title_html: Tekijänoikeus ja lisensi
|
||||
intro_1_html: |-
|
||||
OpenStreetMap<sup><a href="#trademarks">®</a></sup> on <i>avointa taattaa</i>, jonka <a
|
||||
href="https://osmfoundation.org/">OpenStreetMap Foundation</a> (OSMF) on lisensoinut <a
|
||||
href="https://opendatacommons.org/licenses/odbl/">Open Data Commons Open Database -lisensillä</a> (ODbL).
|
||||
intro_2_html: "OpenStreetMapin karttoja ja tietoja voi kopioida, levittää,
|
||||
välittää ja mukauttaa, \nkunhan OpenStreetMap ja sen tekijät mainitaan.
|
||||
Jos karttoja tai tietoja muutethaan tai kehitethään, niitä saa levittää
|
||||
vain samalla lisensillä.\n<a href=\"https://opendatacommons.org/licenses/odbl/1.0/\">Lakitekstissä</a>
|
||||
mainitaan levittäjän oikeudet ja velvollisuudet."
|
||||
intro_3_html: |-
|
||||
Kartta-aineisto ja dokumentaatio on lisensoitu <a href="https://creativecommons.org/licenses/by-sa/2.0/deed.fi">Creative
|
||||
Commons Nimeä-Jaa samoin 2.0</a> -lisensillä (CC-BY-SA).
|
||||
credit_title_html: OpenStreetMapin mainitseminen
|
||||
credit_1_html: OpenStreetMapin sisältöä levitettäessä on mainittava teksti
|
||||
"© OpenStreetMapin tekijät" tai sen englantinkielinen vastine
|
||||
"© OpenStreetMap contributors".
|
||||
credit_2_html: "Levittäjän tulee tehdä selväksi, että aineisto on saatavilla
|
||||
Open Database -lisenssillä\nja kartta-aineisto CC-BY-SA-lisenssillä. Tämä
|
||||
voidaan tehdä sijoittamalla sivulle linkki\n<a href=\"https://www.openstreetmap.org/copyright\">tälle
|
||||
tekijänoikeussivulle</a>. \nJos linkkien käyttö ei ole mahdollista (esimerkiksi
|
||||
paperille tulostettu aineisto),\nsuosittelemme ohjaamaan lukijat osoitteisiin
|
||||
www.openstreetmap.org, opendatacommons.org ja tarvittaessa myös creativecommons.org."
|
||||
credit_3_html: 'Sivustolle upotetun interaktiivisen karttaikkunan tulee sisältää
|
||||
tekijän nimi kartan alaosassa:'
|
||||
attribution_example:
|
||||
alt: Esimerkki siitä, miten nimetä OpenStreetMap nettisivulla
|
||||
title: Nimeämisesimerkki
|
||||
more_title_html: Lisätietoja
|
||||
contributors_title_html: Meän tekijät
|
||||
index:
|
||||
permalink: Ikunen länkki
|
||||
|
@ -603,12 +803,26 @@ fit:
|
|||
format_to_export: Eksporteerausmuoto
|
||||
osm_xml_data: OpenStreetMap XML-taatta
|
||||
licence: Lisensi
|
||||
too_large:
|
||||
other:
|
||||
title: Muut läheet
|
||||
description: Muut läheet ovat esillä OpenStreetMap-wikissä
|
||||
options: Inställninkit
|
||||
format: 'Fiilimuoto:'
|
||||
scale: Mittakaava
|
||||
max: eninthään
|
||||
image_size: Kuvan koko
|
||||
zoom: Suurennostaso
|
||||
add_marker: Lissää vietävään kartaan kohemerkki
|
||||
latitude: 'Lev:'
|
||||
longitude: 'Pit:'
|
||||
output: Tulos
|
||||
paste_html: Kopioi ja liitä tämä HTML-kooti verkkosivulesi
|
||||
export_button: Eksporteeraa
|
||||
fixthemap:
|
||||
title: Ilmota ongelmasta / Korjaa karttaa
|
||||
how_to_help:
|
||||
title: Kuinka voin auttaa
|
||||
join_the_community:
|
||||
title: Liity föreeninkhiin
|
||||
help:
|
||||
|
@ -630,6 +844,11 @@ fit:
|
|||
search:
|
||||
search: Haku
|
||||
submit_text: Hae
|
||||
key:
|
||||
table:
|
||||
entry:
|
||||
school:
|
||||
1: yniversiteetti
|
||||
richtext_area:
|
||||
edit: Mookkaa
|
||||
preview: Etukattelu
|
||||
|
@ -666,6 +885,16 @@ fit:
|
|||
trace:
|
||||
edit: mookkaa
|
||||
edit_map: Mookkaa karttaa
|
||||
public: JULKINEN
|
||||
identifiable: TUNNISTETTAVA
|
||||
private: YKSITYINEN
|
||||
trackable: SEURATTAVA
|
||||
by: käyttäjältä
|
||||
in: avainsanoilla
|
||||
map: sijainti kartalla
|
||||
index:
|
||||
public_traces: Julkiset GPS-jäljet
|
||||
my_traces: Minun GPS-jäljet
|
||||
oauth_clients:
|
||||
edit:
|
||||
title: Mookkaa sovellustasi
|
||||
|
@ -684,7 +913,11 @@ fit:
|
|||
lost password link: Unhouttanu sinun salasanan?
|
||||
login_button: Lokkaa sisäle
|
||||
register now: Luo konttu nyt
|
||||
openid_logo_alt: Lokkaa sisäle OpenID-konttulla
|
||||
auth_providers:
|
||||
openid:
|
||||
title: Lokkaa sisäle OpenID:llä
|
||||
alt: Lokkaa sisäle OpenID-atressilla
|
||||
google:
|
||||
title: Lokkaa sisäle Googlella
|
||||
facebook:
|
||||
|
@ -696,7 +929,10 @@ fit:
|
|||
heading: Lokkaa ulos OpenStreetMapista
|
||||
logout_button: Lokkaa ulos
|
||||
lost_password:
|
||||
title: Unohtunut salasana
|
||||
heading: Unohditko salasanasi?
|
||||
email address: 'E-postiatressi:'
|
||||
new password button: Lähätä salasanan palautusohjeet
|
||||
reset_password:
|
||||
password: 'Salasana:'
|
||||
confirm password: 'Vahvista salasana:'
|
||||
|
@ -799,11 +1035,69 @@ fit:
|
|||
changesets:
|
||||
show:
|
||||
comment: Kommentoi
|
||||
directions:
|
||||
instructions:
|
||||
unnamed: nimetön tie
|
||||
courtesy: Reittiohjeet tarjoaa %{link}
|
||||
exit_counts:
|
||||
first: ensimmäisestä
|
||||
second: toisesta
|
||||
third: "3."
|
||||
fourth: "4."
|
||||
fifth: "5."
|
||||
sixth: "6."
|
||||
seventh: "7."
|
||||
eighth: "8."
|
||||
ninth: "9."
|
||||
tenth: "10."
|
||||
time: Matka-aika
|
||||
query:
|
||||
node: Piste
|
||||
way: Viiva
|
||||
relation: Relaatio
|
||||
nothing_found: Karttakohteita ei löytynyt
|
||||
error: 'Yhteysvirhe palvelimeen %{server}: %{error}'
|
||||
timeout: Yhteyden aikakatkaisu palvelimeen %{server}
|
||||
context:
|
||||
directions_from: Reittiohjeet täältä
|
||||
directions_to: Reittiohjeet tänne
|
||||
add_note: Ilmota karttavirheestä
|
||||
show_address: Näytä atressi
|
||||
query_features: Lähistöllä
|
||||
centre_map: Keskitä kartta
|
||||
redactions:
|
||||
edit:
|
||||
description: Kuvvaus
|
||||
heading: Mookkaa laitosta
|
||||
title: Mookkaa laitosta
|
||||
index:
|
||||
empty: Ei ole näytettävää laitosta
|
||||
heading: Laitosten luettelo
|
||||
title: Laitosten luettelo
|
||||
new:
|
||||
description: Kuvvaus
|
||||
heading: Kirjota tietoja uudesta laitoksesta
|
||||
title: Luodaan uusi redaktio
|
||||
show:
|
||||
description: 'Kuvvaus:'
|
||||
heading: Näytetään redaktio ”%{title}”
|
||||
title: Näytetään redaktio
|
||||
user: 'Luoja:'
|
||||
edit: Mookkaa tätä laitosta
|
||||
destroy: Ota poies tämä redaktio
|
||||
confirm: Oletko varma?
|
||||
create:
|
||||
flash: Redaktio luotu.
|
||||
update:
|
||||
flash: Muutokset on säästetty.
|
||||
destroy:
|
||||
not_empty: Redaktio ei ole tyhjä. Ota poies redaktiotiot kaikista tähän redaktioon
|
||||
liittyvistä versuuneista ennen sen tuhoamista.
|
||||
flash: Redaktio tuhottu.
|
||||
error: Redaktiota tuhottaessa tapahtui virhe.
|
||||
validations:
|
||||
leading_whitespace: tyhjää tilaa alussa
|
||||
trailing_whitespace: tyhjää tilaa lopussa
|
||||
invalid_characters: sisälthää virheellisiä merkkejä
|
||||
url_characters: sisälthää erikoismerkkejä URL:ssa (%{characters})
|
||||
...
|
||||
|
|
|
@ -285,7 +285,7 @@ fr:
|
|||
title_comment: Groupe de modifications %{id} — %{comment}
|
||||
join_discussion: Se connecter pour rejoindre la discussion
|
||||
discussion: Discussion
|
||||
still_open: Ensemble de modifications toujours ouvert — la discussion s’ouvrira
|
||||
still_open: Ensemble de modifications toujours ouvert – la discussion s’ouvrira
|
||||
une fois que l’ensemble de modifications sera fermé.
|
||||
node:
|
||||
title: 'Nœud : %{name}'
|
||||
|
@ -348,6 +348,7 @@ fr:
|
|||
tag: La description de l’attribut %{key}=%{value} sur le wiki
|
||||
wikidata_link: L’élément %{page} sur Wikidata
|
||||
wikipedia_link: L’article « %{page} » sur Wikipédia
|
||||
wikimedia_commons_link: L’élément %{page} sur Wikimedia Commons
|
||||
telephone_link: Appeler %{phone_number}
|
||||
colour_preview: Aperçu de la couleur %{colour_value}
|
||||
note:
|
||||
|
@ -359,13 +360,13 @@ fr:
|
|||
hidden_title: Note masquée nº %{note_name}
|
||||
open_by: Créée par %{user}, <abbr title="%{exact_time}">%{when}</abbr>
|
||||
open_by_anonymous: Créée par un utilisateur anonyme, <abbr title="%{exact_time}">%{when}</abbr>
|
||||
commented_by: Commenté par %{user} <abbr title='%{exact_time}'>%{when}</abbr>
|
||||
commented_by_anonymous: Commenté par un utilisateur anonyme <abbr title='%{exact_time}'>%{when}</abbr>
|
||||
closed_by: Résolu par %{user} <abbr title='%{exact_time}'>%{when}</abbr>
|
||||
closed_by_anonymous: Résolu par un utilisateur anonyme le <abbr title='%{exact_time}'>%{when}</abbr>
|
||||
commented_by: Commenté par %{user} <abbr title="%{exact_time}">%{when}</abbr>
|
||||
commented_by_anonymous: Commenté par un utilisateur anonyme <abbr title="%{exact_time}">%{when}</abbr>
|
||||
closed_by: Résolu par %{user} <abbr title="%{exact_time}">%{when}</abbr>
|
||||
closed_by_anonymous: Résolu par un utilisateur anonyme le <abbr title="%{exact_time}">%{when}</abbr>
|
||||
reopened_by: Réactivée par %{user}, <abbr title="%{exact_time}">%{when}</abbr>
|
||||
reopened_by_anonymous: Réactivé par un utilisateur anonyme <abbr title='%{exact_time}'>%{when}</abbr>
|
||||
hidden_by: Masqué par %{user} <abbr title='%{exact_time}'>%{when}</abbr>
|
||||
reopened_by_anonymous: Réactivé par un utilisateur anonyme <abbr title="%{exact_time}">%{when}</abbr>
|
||||
hidden_by: Masqué par %{user} <abbr title="%{exact_time}">%{when}</abbr>
|
||||
report: Signaler cette note
|
||||
query:
|
||||
title: Requête sur les objets
|
||||
|
@ -375,8 +376,8 @@ fr:
|
|||
changesets:
|
||||
changeset_paging_nav:
|
||||
showing_page: Page %{page}
|
||||
next: Suivant »
|
||||
previous: « Précédent
|
||||
next: Suivant ››
|
||||
previous: ‹‹ Précédent
|
||||
changeset:
|
||||
anonymous: Anonyme
|
||||
no_edits: (aucune modification)
|
||||
|
@ -404,16 +405,15 @@ fr:
|
|||
met trop de temps pour être chargée.
|
||||
changeset_comments:
|
||||
comment:
|
||||
comment: Nouveau commentaire sur le groupe de modifications nº %{changeset_id}
|
||||
comment: Nouveau commentaire sur le groupe de modifications nº %{changeset_id}
|
||||
par %{author}
|
||||
commented_at_by_html: Mis à jour le %{when} par %{user}
|
||||
comments:
|
||||
comment: Nouveau commentaire sur le groupe de modifications n° %{changeset_id}
|
||||
comment: Nouveau commentaire sur le groupe de modifications nº %{changeset_id}
|
||||
par %{author}
|
||||
index:
|
||||
title_all: Discussion sur le groupe de modifications OpenStreetMap
|
||||
title_particular: Discussion sur le groupe de modifications OpenStreetMap nº
|
||||
%{changeset_id}
|
||||
title_particular: Discussion sur le groupe de modifications OpenStreetMap nº %{changeset_id}
|
||||
timeout:
|
||||
sorry: Désolé, la liste des commentaires d’ensembles de modifications que vous
|
||||
avez demandée est trop longue à récupérer.
|
||||
|
@ -421,12 +421,12 @@ fr:
|
|||
new:
|
||||
title: Nouvelle entrée du journal
|
||||
form:
|
||||
subject: 'Sujet :'
|
||||
body: 'Corps :'
|
||||
language: 'Langue :'
|
||||
location: 'Lieu :'
|
||||
latitude: 'Latitude :'
|
||||
longitude: 'Longitude :'
|
||||
subject: 'Sujet :'
|
||||
body: 'Corps :'
|
||||
language: 'Langue :'
|
||||
location: 'Lieu :'
|
||||
latitude: 'Latitude :'
|
||||
longitude: 'Longitude :'
|
||||
use_map_link: utiliser la carte
|
||||
index:
|
||||
title: Journaux des utilisateurs
|
||||
|
@ -450,8 +450,8 @@ fr:
|
|||
login_to_leave_a_comment: '%{login_link} pour laisser un commentaire'
|
||||
login: Se connecter
|
||||
no_such_entry:
|
||||
title: Pas d’entrée du journal correspondante
|
||||
heading: 'Aucune entrée avec l’id : %{id}'
|
||||
title: Aucune entrée du journal correspondante
|
||||
heading: 'Aucune entrée avec l’id : %{id}'
|
||||
body: Désolé, il n’y a aucune entrée ou commentaire dans le journal avec l’id
|
||||
%{id}. Veuillez vérifier votre orthographe ou la validité du lien que vous
|
||||
avez cliqué.
|
||||
|
@ -461,7 +461,7 @@ fr:
|
|||
reply_link: Répondre à cette entrée
|
||||
comment_count:
|
||||
zero: Aucun commentaire
|
||||
one: '%{count} commentaire'
|
||||
one: Un commentaire
|
||||
other: '%{count} commentaires'
|
||||
edit_link: Modifier cette entrée
|
||||
hide_link: Masquer cette entrée
|
||||
|
@ -475,7 +475,7 @@ fr:
|
|||
confirm: Confirmer
|
||||
report: Signaler ce commentaire
|
||||
location:
|
||||
location: 'Lieu :'
|
||||
location: 'Lieu :'
|
||||
view: Afficher
|
||||
edit: Modifier
|
||||
feed:
|
||||
|
@ -491,7 +491,7 @@ fr:
|
|||
description: Entrées récentes des journaux d’utilisateurs de OpenStreetMap
|
||||
comments:
|
||||
has_commented_on: '%{display_name} a commenté les entrées de journal suivantes'
|
||||
post: Article
|
||||
post: Billet
|
||||
when: Quand
|
||||
comment: Commentaire
|
||||
newer_comments: Commentaires plus récents
|
||||
|
@ -504,8 +504,8 @@ fr:
|
|||
osm_nominatim: Résultats de <a href="https://nominatim.openstreetmap.org/">OpenStreetMap
|
||||
Nominatim</a>
|
||||
geonames: Résultats depuis <a href="http://www.geonames.org/">GeoNames</a>
|
||||
osm_nominatim_reverse: Résultats de <a href="https://nominatim.openstreetmap.org/">OpenStreetMap
|
||||
Nominatim</a>
|
||||
osm_nominatim_reverse: Résultats de <a href="https://nominatim.openstreetmap.org/">Nominatim
|
||||
sur OpenStreetMap</a>
|
||||
geonames_reverse: Résultats de <a href="http://www.geonames.org/">GeoNames</a>
|
||||
search_osm_nominatim:
|
||||
prefix:
|
||||
|
@ -667,7 +667,7 @@ fr:
|
|||
emergency_access_point: Point d’accès d’urgence
|
||||
footway: Chemin piéton
|
||||
ford: Gué
|
||||
give_way: Panneau cédez le passage
|
||||
give_way: Panneau « Cédez le passage »
|
||||
living_street: Rue en zone de rencontre
|
||||
milestone: Borne kilométrique
|
||||
motorway: Autoroute
|
||||
|
@ -690,7 +690,7 @@ fr:
|
|||
services: Services autoroutiers
|
||||
speed_camera: Radar de vitesse
|
||||
steps: Escalier
|
||||
stop: Signe d'arrêt
|
||||
stop: Panneau « Stop / Arrêt »
|
||||
street_lamp: Lampadaire
|
||||
tertiary: Route tertiaire
|
||||
tertiary_link: Route tertiaire
|
||||
|
@ -710,7 +710,7 @@ fr:
|
|||
bunker: Bunker
|
||||
castle: Château
|
||||
church: Église
|
||||
city_gate: Porte de ville / porte de fortifications
|
||||
city_gate: Porte de ville / porte fortifiée
|
||||
citywalls: Remparts / murailles
|
||||
fort: Fort
|
||||
heritage: Site / objet du patrimoine
|
||||
|
@ -737,7 +737,7 @@ fr:
|
|||
basin: Bassin
|
||||
brownfield: Friche industrielle
|
||||
cemetery: Cimetière
|
||||
commercial: Zone tertiaire / Zone d'activités
|
||||
commercial: Zone tertiaire / Zone d’activités
|
||||
conservation: Zone préservée
|
||||
construction: Zone en construction
|
||||
farm: Ferme
|
||||
|
@ -899,12 +899,12 @@ fr:
|
|||
country: Pays
|
||||
county: Comté
|
||||
farm: Ferme
|
||||
hamlet: Hameau ou lieu-dit habité
|
||||
hamlet: Hameau habité
|
||||
house: Maison
|
||||
houses: Maisons
|
||||
island: Île
|
||||
islet: Îlot
|
||||
isolated_dwelling: Lieu-dit habité
|
||||
isolated_dwelling: Lieu-dit habité isolé
|
||||
locality: Lieu-dit inhabité
|
||||
municipality: Municipalité
|
||||
neighbourhood: Quartier
|
||||
|
@ -996,7 +996,7 @@ fr:
|
|||
kiosk: Kiosque
|
||||
kitchen: Magasin de cuisine
|
||||
laundry: Blanchisserie
|
||||
lottery: Loto
|
||||
lottery: Loterie
|
||||
mall: Centre commercial
|
||||
market: Marché
|
||||
massage: Massage
|
||||
|
@ -1025,7 +1025,7 @@ fr:
|
|||
travel_agency: Agence de voyage
|
||||
tyres: Magasin de pneus
|
||||
vacant: Commerce vacant
|
||||
variety_store: Magasin à prix unique ou à bas prix
|
||||
variety_store: Magasin à prix unique ou réduit
|
||||
video: Magasin de vidéos
|
||||
wine: Caviste
|
||||
"yes": Boutique
|
||||
|
@ -1083,8 +1083,8 @@ fr:
|
|||
level10: Limite de quartier
|
||||
description:
|
||||
title:
|
||||
osm_nominatim: Localisation depuis <a href="https://nominatim.openstreetmap.org/">OpenStreetMap
|
||||
Nominatim</a>
|
||||
osm_nominatim: Localisation depuis <a href="https://nominatim.openstreetmap.org/">Nominatim
|
||||
sur OpenStreetMap</a>
|
||||
geonames: Localisation depuis <a href="http://www.geonames.org/">GeoNames</a>
|
||||
types:
|
||||
cities: Villes
|
||||
|
@ -1102,17 +1102,18 @@ fr:
|
|||
reported_user: Utilisateur signalé
|
||||
not_updated: Non mis à jour
|
||||
search: Rechercher
|
||||
search_guidance: 'Problèmes de recherche :'
|
||||
search_guidance: 'Problèmes de recherche :'
|
||||
user_not_found: L’utilisateur n’existe pas
|
||||
issues_not_found: Pas trouvé de tel problème
|
||||
issues_not_found: Aucun problème trouvé de ce type
|
||||
status: État
|
||||
reports: Rapports
|
||||
last_updated: Dernière mise à jour
|
||||
last_updated_time_html: <abbr title='%{title}'>%{time}</abbr>
|
||||
last_updated_time_user_html: à <abbr title='%{title}'>%{time}</abbr> par %{user}
|
||||
last_updated_time_html: <abbr title="%{title}">%{time}</abbr>
|
||||
last_updated_time_user_html: à <abbr title="%{title}">%{time}</abbr> par %{user}
|
||||
link_to_reports: Afficher les rapports
|
||||
reports_count:
|
||||
one: 1 rapport
|
||||
zero: Aucun rapport
|
||||
one: Un rapport
|
||||
other: '%{count} rapports'
|
||||
reported_item: Élément signalé
|
||||
states:
|
||||
|
@ -1124,7 +1125,7 @@ fr:
|
|||
successful_update: Votre rapport a bien été mis à jour
|
||||
provide_details: Veuillez fournir les détails demandés
|
||||
show:
|
||||
title: '%{status} Problème #%{issue_id}'
|
||||
title: Problème %{status} nº %{issue_id}
|
||||
reports:
|
||||
zero: Aucun rapport
|
||||
one: 1 rapport
|
||||
|
@ -1134,7 +1135,7 @@ fr:
|
|||
last_updated_at: Dernière mise à jour à %{datetime} par %{displayname}
|
||||
resolve: Résoudre
|
||||
ignore: Ignorer
|
||||
reopen: Réouvrir
|
||||
reopen: Rouvrir
|
||||
reports_of_this_issue: Rapports de ce problème
|
||||
read_reports: Lire les rapports
|
||||
new_reports: Nouveaux rapports
|
||||
|
@ -1142,11 +1143,11 @@ fr:
|
|||
no_other_issues: Aucun autre problème avec cet utilisateur.
|
||||
comments_on_this_issue: Commentaires sur ce problème
|
||||
resolve:
|
||||
resolved: L’état du problème a été mis à 'Résolu'
|
||||
resolved: L’état du problème a été mis à « Résolu »
|
||||
ignore:
|
||||
ignored: L’état du problème a été mis à 'Ignoré'
|
||||
ignored: L’état du problème a été mis à « Ignoré »
|
||||
reopen:
|
||||
reopened: L’état du problème a été mis à 'Ouvert'
|
||||
reopened: L’état du problème a été mis à « Ouvert »
|
||||
comments:
|
||||
created_at: Le %{datetime}
|
||||
reassign_param: Réaffecter le problème ?
|
||||
|
@ -1155,8 +1156,8 @@ fr:
|
|||
reported_by_html: Signalé comme %{category} par %{user}
|
||||
helper:
|
||||
reportable_title:
|
||||
diary_comment: '%{entry_title}, commentaire #%{comment_id}'
|
||||
note: 'Note #%{note_id}'
|
||||
diary_comment: '%{entry_title}, commentaire nº %{comment_id}'
|
||||
note: Note nº %{note_id}
|
||||
issue_comments:
|
||||
create:
|
||||
comment_created: Votre commentaire a bien été créé
|
||||
|
@ -1165,15 +1166,15 @@ fr:
|
|||
title_html: Rapport %{link}
|
||||
missing_params: Impossible de créer un nouveau rapport
|
||||
details: Veuillez fournir plus de détails sur le problème (obligatoire).
|
||||
select: 'Sélectionner un motif pour votre rapport :'
|
||||
select: 'Sélectionnez un motif pour votre rapport :'
|
||||
disclaimer:
|
||||
intro: 'Avant d’envoyer votre rapport aux modérateurs du site, veuillez vous
|
||||
assurer que :'
|
||||
not_just_mistake: Vous êtes certain que le problème n’est pas juste une erreur
|
||||
unable_to_fix: Vous êtes incapable de régler le problème par vous-même ou
|
||||
avec l’aide des membres de votre communauté
|
||||
resolve_with_user: Vous avez déjà essayé de résoudre le problème avec l’utilisateur
|
||||
concerné
|
||||
assurer que :'
|
||||
not_just_mistake: vous êtes certain que le problème n’est pas juste une erreur ;
|
||||
unable_to_fix: vous êtes incapable de régler le problème par vous-même ou
|
||||
avec l’aide des membres de votre proche communauté ;
|
||||
resolve_with_user: vous avez déjà essayé de résoudre le problème avec l’utilisateur
|
||||
concerné.
|
||||
categories:
|
||||
diary_entry:
|
||||
spam_label: Cette entrée de l’agenda est/contient du pourriel
|
||||
|
@ -1227,8 +1228,8 @@ fr:
|
|||
intro_2_create_account: Créez un compte d’utilisateur
|
||||
hosting_partners_html: L’hébergement est pris en charge par %{ucl}, %{bytemark},
|
||||
et d’autres %{partners}.
|
||||
partners_ucl: L’University College de Londres
|
||||
partners_bytemark: l'hébergeur Bytemark
|
||||
partners_ucl: l’University College de Londres
|
||||
partners_bytemark: l'Hébergeur Bytemark
|
||||
partners_partners: partenaires
|
||||
tou: Conditions d’utilisation
|
||||
osm_offline: La base de données OpenStreetMap est actuellement hors ligne ; une
|
||||
|
@ -1373,17 +1374,19 @@ fr:
|
|||
outbox: boîte d’envoi
|
||||
messages: Vous avez %{new_messages} et %{old_messages}
|
||||
new_messages:
|
||||
one: '%{count} nouveau message'
|
||||
zero: zéro nouveau message
|
||||
one: un nouveau message
|
||||
other: '%{count} nouveaux messages'
|
||||
old_messages:
|
||||
one: '%{count} ancien message'
|
||||
zero: aucun ancien message
|
||||
one: un ancien message
|
||||
other: '%{count} anciens messages'
|
||||
from: De
|
||||
subject: Objet
|
||||
date: Date
|
||||
no_messages_yet: Vous n’avez actuellement aucun message. Pourquoi ne pas entrer
|
||||
en contact avec quelques %{people_mapping_nearby_link} ?
|
||||
people_mapping_nearby: personnes proche de vous
|
||||
en contact avec quelques %{people_mapping_nearby_link} ?
|
||||
people_mapping_nearby: personnes qui cartographient aux alentours
|
||||
message_summary:
|
||||
unread_button: Marquer comme non lu
|
||||
read_button: Marquer comme lu
|
||||
|
@ -1409,16 +1412,16 @@ fr:
|
|||
inbox: boîte de réception
|
||||
outbox: boîte d’envoi
|
||||
messages:
|
||||
one: Vous avez %{count} message envoyé
|
||||
one: Vous n’avez aucun message envoyé
|
||||
other: Vous avez %{count} messages envoyés
|
||||
to: À
|
||||
subject: Objet
|
||||
date: Date
|
||||
no_sent_messages: Vous n’avez encore envoyé aucun message. Pourquoi ne pas entrez
|
||||
en contact avec quelques %{people_mapping_nearby_link} ?
|
||||
en contact avec quelques %{people_mapping_nearby_link} ?
|
||||
people_mapping_nearby: personnes proche de vous
|
||||
reply:
|
||||
wrong_user: Vous êtes identifié(e) comme « %{user} » mais le message auquel
|
||||
wrong_user: Vous êtes identifié(e) comme « %{user} » mais le message auquel
|
||||
vous souhaitez répondre n’a pas été envoyé à cet utilisateur. Veuillez vous
|
||||
connecter avec l’identifiant correct pour pouvoir répondre.
|
||||
show:
|
||||
|
@ -1431,20 +1434,20 @@ fr:
|
|||
destroy_button: Supprimer
|
||||
back: Retour
|
||||
to: À
|
||||
wrong_user: Vous êtes identifié comme « %{user} » mais le message que vous essayez
|
||||
wrong_user: Vous êtes identifié comme « %{user} » mais le message que vous essayez
|
||||
de lire n’a pas été envoyé par cet utilisateur, ni ne lui a été destiné. Veuillez
|
||||
vous connecter avec l’identifiant correct pour pouvoir le lire.
|
||||
sent_message_summary:
|
||||
destroy_button: Supprimer
|
||||
mark:
|
||||
as_read: Message marqué comme lu
|
||||
as_unread: Message marqué comme non-lu
|
||||
as_unread: Message marqué comme non lu
|
||||
destroy:
|
||||
destroyed: Message supprimé
|
||||
site:
|
||||
about:
|
||||
next: Suivant
|
||||
copyright_html: <span>©</span>Contributeurs<br /> d’OpenStreetMap
|
||||
copyright_html: © Contributeurs<br /> d’OpenStreetMap
|
||||
used_by: '%{name} fournit des données cartographiques sur des milliers de sites
|
||||
web, applications mobiles et appareils'
|
||||
lede_text: OpenStreetMap est bâti par une communauté de cartographes bénévoles
|
||||
|
@ -1460,30 +1463,28 @@ fr:
|
|||
et grossit chaque jour. Nos contributeurs incluent des cartographes enthousiastes,
|
||||
des professionnels du SIG, des ingénieurs qui font fonctionner les serveurs
|
||||
d’OSM, des humanitaires cartographiant les zones dévastées par une catastrophe
|
||||
et beaucoup d’autres.\nPour en savoir plus sur la communauté, consultez \n<a
|
||||
href='https://blog.openstreetmap.org'>le blogue OpenStreetMap</a>,\n<a href='%{diary_path}'>les
|
||||
annuaires d’utilisateurs</a>, \n<a href='https://blogs.openstreetmap.org/'>les
|
||||
blogues communautaires</a> et \nle site web de la <a href='https://www.osmfoundation.org/'>Fondation
|
||||
et beaucoup d’autres.\nPour en savoir plus sur la communauté, consultez \nle
|
||||
<a href=\"https://blog.openstreetmap.org/\">blogue OpenStreetMap</a>,\nles
|
||||
<a href=\"%{diary_path}\">journaux d’utilisateurs</a>, \nles <a href=\"https://blogs.openstreetmap.org/\">blogues
|
||||
communautaires</a> et \nle site web de la <a href=\"https://www.osmfoundation.org/\">Fondation
|
||||
OSM</a>."
|
||||
open_data_title: Données libres
|
||||
open_data_html: 'OpenStreetMap est en <i>données ouvertes</i> : vous êtes libre
|
||||
de l’utiliser pour n’importe quel but tant que vous créditez OpenStreetMap
|
||||
open_data_title: Données ouvertes
|
||||
open_data_html: 'OpenStreetMap est en <i>données ouvertes</i> : vous êtes libre
|
||||
de l’utiliser dans n’importe quel but tant que vous créditez OpenStreetMap
|
||||
et ses contributeurs. Si vous modifiez ou vous appuyez sur les données d’une
|
||||
façon quelconque, vous pouvez distribuer le résultat seulement suivant la
|
||||
même licence. Consultez la page sur les <a href=''%{copyright_path}''>droits
|
||||
même licence. Consultez la page sur les <a href="%{copyright_path}">droits
|
||||
d’auteur et licence</a> pour plus de détails.'
|
||||
legal_title: Juridique
|
||||
legal_html: "Ce site et de nombreux autres services connexes sont formellement
|
||||
exploités par la \n<a href=\"https://osmfoundation.org/\">Fondation OpenStreetMap</a>
|
||||
(OSMF) \nau nom de la communauté. L’utilisation de tous les services offerts
|
||||
par l’OSMF est sujette\nà nos <a href=\"https://wiki.osmfoundation.org/wiki/Terms_of_Use\">Conditions
|
||||
d’utilisation</a>, à notre <a href=\"https://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">\nPolitique
|
||||
des usages acceptés</a> et à notre <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">Politique
|
||||
de confidentialité</a>.\n<br> \nVeuillez <a href=\"https://osmfoundation.org/Contact\">contacter
|
||||
l’OSMF</a> \nsi vous avez des questions ou problèmes concernant les licences,
|
||||
les droits d’auteur ou d’autres aspects juridiques.\n<br>\nOpenStreetMap,
|
||||
le logo avec la loupe et ''State of the Map'' sont <a href=\"https://wiki.osmfoundation.org/wiki/Trademark_Policy\">des
|
||||
marques déposées de OSMF</a>."
|
||||
legal_title: Informations juridiques
|
||||
legal_html: |-
|
||||
Ce site et de nombreux autres services connexes sont formellement exploités par la
|
||||
<a href="https://osmfoundation.org/">Fondation OpenStreetMap</a> (OSMF) au nom de la communauté. L’utilisation de tous les services offerts par l’OSMF est sujette
|
||||
à nos <a href="https://wiki.osmfoundation.org/wiki/Terms_of_Use">Conditions d’utilisation</a>, à notre <a href="https://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy">Politique des usages acceptés</a> et à notre <a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy">Politique de confidentialité</a>.
|
||||
<br />
|
||||
Veuillez <a href="https://osmfoundation.org/Contact">contacter l’OSMF</a>
|
||||
si vous avez des questions ou problèmes concernant les licences, les droits d’auteur ou d’autres aspects juridiques.
|
||||
<br />
|
||||
OpenStreetMap, le logo avec la loupe et ''State of the Map'' sont <a href="https://wiki.osmfoundation.org/wiki/Trademark_Policy">des marques déposées de l’OSMF</a>.
|
||||
partners_title: Partenaires
|
||||
copyright:
|
||||
foreign:
|
||||
|
@ -1501,58 +1502,61 @@ fr:
|
|||
legal_babble:
|
||||
title_html: Droits d’auteur et licence
|
||||
intro_1_html: |-
|
||||
OpenStreetMap<sup><a href="#trademarks">®</a></sup> est un ensemble de <i>données ouvertes</i>, disponibles sous licence libre <a
|
||||
href="https://opendatacommons.org/licenses/odbl/">Open Data Commons Open Database License</a> (ODbL) auprès de la <a
|
||||
OpenStreetMap<sup><a href="#trademarks">®</a></sup> est un ensemble de <i>données ouvertes</i>, disponibles sous la licence libre <a
|
||||
href="https://opendatacommons.org/licenses/odbl/">Open Data Commons Open Database License</a> (ODbL) accordée par la <a
|
||||
href="https://osmfoundation.org/">Fondation OpenStreetMap</a> (OSMF).
|
||||
intro_2_html: Vous êtes libre de copier, distribuer, transmettre et adapter
|
||||
nos données, à condition que vous créditiez, OpenStreetMap et ses contributeurs.
|
||||
Si vous modifiez ou utilisez nos données dans d’autres œuvres dérivées,
|
||||
vous ne pouvez distribuer celles-ci que sous la même licence. Le <a href="https://opendatacommons.org/licenses/odbl/1.0/">texte
|
||||
intro_2_html: |-
|
||||
Vous êtes libre de copier, distribuer, transmettre et adapter nos données,
|
||||
à condition que vous créditiez OpenStreetMap et ses
|
||||
contributeurs. Si vous modifiez ou utilisez nos données dans d’autres œuvres dérivées, vous
|
||||
ne pouvez distribuer celles-ci que sous la même licence. Le <a href="https://opendatacommons.org/licenses/odbl/1.0/">texte
|
||||
légal</a> complet détaille vos droits et responsabilités.
|
||||
intro_3_html: Nos carreaux de rendu cartographiques, ainsi que notre documentation,
|
||||
sont disponibles sous la licence <a href="https://creativecommons.org/licenses/by-sa/2.0/">Creative
|
||||
intro_3_html: |-
|
||||
Nos carreaux de rendu cartographiques, ainsi que notre documentation, sont disponibles sous
|
||||
la licence <a href="https://creativecommons.org/licenses/by-sa/2.0/">Creative
|
||||
Commons paternité – partage à l’identique 2.0</a> (CC-BY-SA).
|
||||
credit_title_html: Comment créditer OpenStreetMap
|
||||
credit_1_html: Nous demandons que votre crédit comporte la mention « © les
|
||||
contributeurs d’OpenStreetMap ».
|
||||
credit_1_html: Nous demandons que votre crédit comporte la mention « © les
|
||||
contributeurs d’OpenStreetMap ».
|
||||
credit_2_html: |-
|
||||
Vous devez également préciser clairement que les données sont disponibles sous la licence ODbL et, si vous utilisez les tuiles de notre carte, que la carte est sous la licence CC-BY-SA. Vous pouvez mentionner ceci avec un lien hypertexte vers
|
||||
Vous devez également préciser clairement que les données sont disponibles sous la licence
|
||||
ODbL (Open Database License) et, si vous utilisez les tuiles de notre carte, que la carte est sous la
|
||||
licence CC BY-SA. Vous pouvez mentionner ceci avec un lien hypertexte vers
|
||||
<a href="https://www.openstreetmap.org/copyright">cette page de mentions légales</a>.
|
||||
Alternativement, et obligatoirement si vous distribuez OpenStreetMap sous forme de données brutes, vous pouvez directement nommer et fournir un lien vers la ou les licences. Sur les supports où les liens hypertexte sont impossibles (par exemple sur un support papier), nous vous suggérons de rediriger vos lecteurs vers le site openstreetmap.org (éventuellement en développant « OpenStreetMap » en l’adresse openstreetmap.org), vers opendatacommons.org et, si c’est pertinent, vers creativecommons.org.
|
||||
Alternativement, et obligatoirement si vous distribuez OpenStreetMap sous forme de données brutes, vous pouvez directement nommer et fournir un lien vers la ou les licences. Sur les supports où les liens hypertexte sont impossibles (par exemple sur un support papier), nous vous suggérons de rediriger vos lecteurs vers le site openstreetmap.org (éventuellement en développant « OpenStreetMap » en son adresse complète openstreetmap.org), vers opendatacommons.org et, si c’est pertinent, vers creativecommons.org.
|
||||
credit_3_html: |-
|
||||
Pour une carte électronique navigable, le crédit devrait apparaître dans le coin de la carte.
|
||||
Pour une carte électronique navigable, le crédit devrait apparaître dans un coin de la carte.
|
||||
Par exemple :
|
||||
attribution_example:
|
||||
alt: Exemple d’attribution d’OpenStreetMap sur une page internet
|
||||
alt: Exemple d’attribution d’OpenStreetMap sur une page Internet
|
||||
title: Exemple d’attribution
|
||||
more_title_html: Pour trouver plus d’informations
|
||||
more_1_html: |-
|
||||
Pour obtenir plus d’informations sur la façon de réutiliser nos données et de nous créditer, veuillez lire la <a
|
||||
href="https://osmfoundation.org/Licence"> Licence OSMF</a> et le <a
|
||||
href="https://wiki.openstreetmap.org/wiki/Legal_FAQ">FAQ Légal</a>.
|
||||
more_2_html: "Bien qu’OpenStreetMap soit un jeu de données libres et ouvertes,
|
||||
nous ne pouvons pas fournir une API gratuite et en libre accès pour les
|
||||
tierces personnes.\nVeuillez vous référer à notre <a href=\"https://operations.osmfoundation.org/policies/api/\">politique
|
||||
d’utilisation de l’API</a>, \n à notre <a href=\"https://operations.osmfoundation.org/policies/tiles/\">politique
|
||||
d’utilisation des tuiles</a>, \net à la <a href=\"https://operations.osmfoundation.org/policies/nominatim/\">politique
|
||||
d’utilisation de Nominatim</a>."
|
||||
more_2_html: |-
|
||||
Bien qu’OpenStreetMap soit un jeu de données libres et ouvertes, nous ne pouvons pas fournir une
|
||||
API gratuite et en libre accès pour les tierces personnes.
|
||||
Veuillez vous référer à notre <a href="https://operations.osmfoundation.org/policies/api/">politique d’utilisation de l’API</a>,
|
||||
à notre <a href="https://operations.osmfoundation.org/policies/tiles/">politique d’utilisation des tuiles</a>
|
||||
et à la <a href="https://operations.osmfoundation.org/policies/nominatim/">politique d’utilisation de Nominatim</a>.
|
||||
contributors_title_html: Nos contributeurs
|
||||
contributors_intro_html: 'Nos contributeurs sont des milliers de personnes.
|
||||
Nous incluons également des données publiées sous licence ouverte par des
|
||||
agences nationales de cartographie et par d’autres sources, notamment :'
|
||||
contributors_at_html: '<strong>Autriche</strong> : contient des données sur
|
||||
la <a href="https://data.wien.gv.at/">ville de Vienne</a> (sous licence
|
||||
<a href="https://creativecommons.org/licenses/by/3.0/at/deed.de">CC BY</a>),
|
||||
la <a href="https://www.vorarlberg.at/vorarlberg/bauen_wohnen/bauen/vermessung_geoinformation/weitereinformationen/services/wmsdienste.htm">région
|
||||
du Vorarlberg</a> et la région du Tyrol (sous licence <a href="https://www.tirol.gv.at/applikationen/e-government/data/nutzungsbedingungen/">CC
|
||||
BY AT avec amendements</a>).'
|
||||
contributors_au_html: "<strong>Australie</strong> : contient des données source
|
||||
de \n<a href=\"https://www.psma.com.au/psma-data-copyright-and-disclaimer\">PSMA
|
||||
Australia Limited</a>\ndont la licence appartient au Commonwealth d'Australie
|
||||
sous \n<a href=\"https://creativecommons.org/licenses/by/4.0/\">CC BY 4.0</a>."
|
||||
contributors_at_html: |-
|
||||
<strong>Autriche</strong> : contient des données sur la <a href="https://data.wien.gv.at/">ville de Vienne</a> (sous
|
||||
licence <a href="https://creativecommons.org/licenses/by/3.0/at/deed.de">CC BY</a>), la
|
||||
<a href="https://www.vorarlberg.at/vorarlberg/bauen_wohnen/bauen/vermessung_geoinformation/weitereinformationen/services/wmsdienste.htm">région du Vorarlberg</a> et la
|
||||
région du Tyrol (sous licence <a href="https://www.tirol.gv.at/applikationen/e-government/data/nutzungsbedingungen/">CC BY AT avec amendements</a>).
|
||||
contributors_au_html: |-
|
||||
<strong>Australie</strong> : contient des données sourcées de
|
||||
<a href="https://www.psma.com.au/psma-data-copyright-and-disclaimer">PSMA Australia Limited</a> publiées sous la licence
|
||||
<a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a> accordée par le Commonwealth d’Australie.
|
||||
contributors_ca_html: '<strong>Canada</strong> : contient des données de <em>GeoBase</em>®,
|
||||
<em>GeoGratis</em> (© Département des Ressources naturelles du Canada),
|
||||
<em>CanVec</em> (© Département des Ressources naturelles du Canada) et <em>StatCan</em>
|
||||
<em>GeoGratis</em> (© Département des Ressources naturelles du Canada),
|
||||
<em>CanVec</em> (© Département des Ressources naturelles du Canada) et <em>StatCan</em>
|
||||
(Division Géographie, Statistiques du Canada).'
|
||||
contributors_fi_html: '<strong>Finlande</strong> : contient des données de
|
||||
la Base de données topographique de l’Inspection nationale du territoire
|
||||
|
@ -1561,8 +1565,8 @@ fr:
|
|||
contributors_fr_html: '<strong>France</strong> : contient des données de la
|
||||
<em>Direction générale des finances publiques</em> (anciennement la <em>Direction
|
||||
générale des impôts</em>).'
|
||||
contributors_nl_html: '<strong>Pays-Bas</strong> : contient des données ©
|
||||
<abbr title="Automotive Navigation Data">AND</abbr>, 2007 (<a href="https://www.and.com">www.and.com</a>).'
|
||||
contributors_nl_html: '<strong>Pays-Bas</strong> : contient des données © <abbr
|
||||
title="Automotive Navigation Data">AND</abbr>, 2007 (<a href="https://www.and.com/">www.and.com</a>).'
|
||||
contributors_nz_html: "<strong>Nouvelle-Zélande</strong> : contient des données
|
||||
provenant du <a href=\"https://data.linz.govt.nz/\">service de données LINZ</a>
|
||||
et pour la réutilisation, sous licence \n<a href=\"https://creativecommons.org/licenses/by/4.0/\">CC
|
||||
|
@ -1579,9 +1583,10 @@ fr:
|
|||
contributors_za_html: |-
|
||||
<strong>Afrique du Sud</strong> : contient des données issues de la <a href="http://www.ngi.gov.za/">Direction principale des
|
||||
Informations Géospatiales Nationales</a>, copyright de l’État réservé.
|
||||
contributors_gb_html: '<strong>Royaume-Uni</strong> : contient des données
|
||||
issues de l’<em>Ordnance Survey</em> © 2010-2019 Droits d’auteurs et
|
||||
de la base de données de la Couronne.'
|
||||
contributors_gb_html: |-
|
||||
<strong>Royaume-Uni</strong> : contient des données issues de
|
||||
l’<em>Ordnance Survey</em> © 2010–2019 Droits d’auteurs et de la
|
||||
base de données de la Couronne.
|
||||
contributors_footer_1_html: Pour plus de détails sur celles-ci et sur les
|
||||
autres sources utilisées pour aider à améliorer OpenStreetMap, consultez
|
||||
la page des <a href="https://wiki.openstreetmap.org/wiki/Contributors">contributeurs</a>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# Author: Abijeet Patro
|
||||
# Author: Athena in Wonderland
|
||||
# Author: Banjo
|
||||
# Author: Breogan2008
|
||||
# Author: Elisardojm
|
||||
# Author: Gallaecio
|
||||
# Author: Iváns
|
||||
|
@ -296,6 +297,7 @@ gl:
|
|||
tag: A páxina de descrición da etiqueta %{key}=%{value}
|
||||
wikidata_link: O elemento %{page} no Wikidata
|
||||
wikipedia_link: O artigo sobre %{page} na Wikipedia
|
||||
wikimedia_commons_link: O elemento %{page} en Wikimedia Comúns
|
||||
telephone_link: Chamar a %{phone_number}
|
||||
colour_preview: Previsualización %{colour_value} da cor
|
||||
note:
|
||||
|
|
|
@ -313,6 +313,7 @@ he:
|
|||
tag: עמוד התיאור עבור התג %{key}=%{value}
|
||||
wikidata_link: פריט %{page} בוויקינתונים
|
||||
wikipedia_link: הערך %{page} בוויקיפדיה
|
||||
wikimedia_commons_link: הפריט %{page} בוויקישיתוף
|
||||
telephone_link: להתקשר למספר %{phone_number}
|
||||
colour_preview: תצוגה מקדימה של הצבע %{colour_value}
|
||||
note:
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
# Author: Mnalis
|
||||
# Author: Mvrban
|
||||
# Author: Nemo bis
|
||||
# Author: Obsuser
|
||||
# Author: Phidrho
|
||||
# Author: Roberta F.
|
||||
# Author: Ruila
|
||||
|
@ -940,7 +941,7 @@ hr:
|
|||
greeting: Bok,
|
||||
your_gpx_file: Liči na vašu GPX datoteku
|
||||
with_description: s opisom
|
||||
and_the_tags: 'i sa slijedećim oznakama:'
|
||||
and_the_tags: 'i sa sljedećim oznakama:'
|
||||
and_no_tags: i bez oznaka
|
||||
failure:
|
||||
subject: '[OpenStreetMap] GPX Import nije uspio'
|
||||
|
@ -1506,7 +1507,7 @@ hr:
|
|||
index:
|
||||
title: Moji OAuth detalji
|
||||
my_tokens: Moje odobrene aplikacije
|
||||
list_tokens: 'Slijedeći tokeni su izdani aplikacijama na vaše ime:'
|
||||
list_tokens: 'Sljedeći tokeni su izdani aplikacijama na Vaše ime:'
|
||||
application: Ime aplikacije
|
||||
issued_at: Izdano u
|
||||
revoke: Opozovi!
|
||||
|
@ -1514,7 +1515,7 @@ hr:
|
|||
no_apps: Imate li aplikaciju koju želite registrirati za korištenje s %{oauth}
|
||||
standardom? Morate registrirati svoju web aplikaciju prije nego možete dati
|
||||
OAuth zahtjeve za ovu uslugu
|
||||
registered_apps: 'Imate registrirane slijedeće aplikacije:'
|
||||
registered_apps: 'Imate registrirane sljedeće aplikacije:'
|
||||
register_new: Registriraj svoju aplikaciju
|
||||
form:
|
||||
name: Ime
|
||||
|
@ -1945,7 +1946,7 @@ hr:
|
|||
status: Status
|
||||
revoker_name: Opozvao
|
||||
showing_page: Stranica %{page}
|
||||
next: Slijedeća »
|
||||
next: Sljedeća »
|
||||
previous: « Prethodna
|
||||
notes:
|
||||
mine:
|
||||
|
|
|
@ -148,11 +148,11 @@ hu:
|
|||
one: kevesebb, mint 1 másodperce
|
||||
other: kevesebb, mint %{count} másodperce
|
||||
less_than_x_minutes:
|
||||
one: kevesebb, mint 1 perce
|
||||
other: kevesebb, mint %{count} perce
|
||||
one: kevesebb mint 1 perce
|
||||
other: kevesebb mint %{count} perce
|
||||
over_x_years:
|
||||
one: több, mint 1 éve
|
||||
other: több, mint %{count} éve
|
||||
one: több mint 1 éve
|
||||
other: több mint %{count} éve
|
||||
x_seconds:
|
||||
one: 1 másodperccel ezelőtt
|
||||
other: '%{count} másodperccel ezelőtt'
|
||||
|
@ -324,7 +324,7 @@ hu:
|
|||
report: Jegyzet jelentése
|
||||
query:
|
||||
title: Funkciók lekérdezése
|
||||
introduction: Kattintson a térképen, a közeli funkciók kereséséhez.
|
||||
introduction: Kattintson a térképen a közeli funkciók kereséséhez.
|
||||
nearby: Közeli funkciók
|
||||
enclosing: Bentfoglalt funkciók
|
||||
changesets:
|
||||
|
@ -1282,12 +1282,12 @@ hu:
|
|||
commented_note: '%{commenter} hozzászólt az egyik jegyzethez, amelyhez te
|
||||
is, %{place} közelében.'
|
||||
closed:
|
||||
subject_own: '[OpenStreetMap] %{commenter} megoldotta az egyik jegyztetedet'
|
||||
subject_own: '[OpenStreetMap] %{commenter} megoldotta az egyik jegyzetedet'
|
||||
subject_other: '[OpenStreetMap] %{commenter} megoldotta az egyik jegyzetet,
|
||||
amelyet te is figyelsz'
|
||||
your_note: '[OpenStreetMap] %{commenter} megoldotta az egyik jegyzetedet %{place}
|
||||
közelében.'
|
||||
commented_note: '%{commenter} megoldotta az egyik jegyzetet amelyhez hozzászóltál,
|
||||
commented_note: '%{commenter} megoldotta az egyik jegyzetet, amelyhez hozzászóltál,
|
||||
%{place} közelében.'
|
||||
reopened:
|
||||
subject_own: '[OpenStreetMap] %{commenter} újra megnyitotta az egyik jegyzetedet'
|
||||
|
@ -1304,7 +1304,7 @@ hu:
|
|||
subject_own: '[OpenStreetMap] %{commenter} hozzászólt az egyik változtatáscsomagodhoz'
|
||||
subject_other: '[OpenStreetMap] %{commenter} hozzászólt az egyik, általad
|
||||
érdekesnek vélt változtatáscsomaghoz'
|
||||
your_changeset: '%{commenter} egy megjegyzést fűzött a %{time}-i módosításcsomagodhoz.'
|
||||
your_changeset: '%{commenter} megjegyzést fűzött a %{time}-i módosításcsomagodhoz.'
|
||||
commented_changeset: '%{commenter} egy megjegyzést fűzött %{changeset_author}
|
||||
%{time}-i módosításcsomagjához, amit figyelsz.'
|
||||
partial_changeset_with_comment: „%{changeset_comment}” megjegyzéssel
|
||||
|
@ -1316,7 +1316,7 @@ hu:
|
|||
messages:
|
||||
inbox:
|
||||
title: Beérkezett üzenetek
|
||||
my_inbox: Beérkezett üzenetek
|
||||
my_inbox: Beérkezett üzeneteim
|
||||
outbox: Elküldött üzenetek
|
||||
messages: '%{new_messages} és %{old_messages} van'
|
||||
new_messages:
|
||||
|
@ -1430,9 +1430,9 @@ hu:
|
|||
english_link: az eredeti angol nyelvű
|
||||
native:
|
||||
title: Erről az oldalról
|
||||
text: Jelenleg a szerzői jogi oldal angol nyelvű változatát látod. Visszaléphetsz
|
||||
ezen oldal %{native_link}, vagy befejezheted a szerzői jogról szóló oldal
|
||||
olvasását, és %{mapping_link}.
|
||||
text: 'Jelenleg a szerzői jogi oldal angol nyelvű változatát látod. Visszaléphetsz
|
||||
ezen oldalra: %{native_link}, vagy befejezheted a szerzői jogról szóló oldal
|
||||
és %{mapping_link} olvasását.'
|
||||
native_link: magyar nyelvű változatára
|
||||
mapping_link: kezdheted a térképezést
|
||||
legal_babble:
|
||||
|
@ -1447,14 +1447,14 @@ hu:
|
|||
href="https://opendatacommons.org/licenses/odbl/1.0/">jogi
|
||||
szabályzat</a> ismerteti a jogaidat és kötelezettségeidet.
|
||||
intro_3_html: |2-
|
||||
Az OpenStreetMap <i>térképeire</i> a <a
|
||||
Az OpenStreetMap <i>térképeire</i> és dokumentumaira a <a
|
||||
href="https://creativecommons.org/licenses/by-sa/2.0/">Creative
|
||||
Commons Nevezd meg! - Így add tovább! 2.0</a> licenc (CC BY-SA) vonatkozik.
|
||||
credit_title_html: Hogyan kell feltüntetned az OpenStreetMapot?
|
||||
credit_1_html: Kérjük, hogy forrásként a “© OpenStreetMap közreműködők”
|
||||
szöveget tüntesd fel.
|
||||
credit_2_html: Azt is egyértelművé kell tenned, hogy az adatok az Open Database
|
||||
Licenc alatt elérhetőek, illetve ha a mi térkép csempéinket használod akkor
|
||||
Licenc alatt elérhetőek, illetve ha a mi térkép csempéinket használod, akkor
|
||||
azt, hogy a grafikai megjelenítés a CC BY-SA licenc feltételeivel használható.
|
||||
Ezt megteheted egy erre a <a href="https://www.openstreetmap.org/copyright">copyright
|
||||
oldalra</a> való hivatkozással. Alternatívaként, ha az OSM-et adatokként
|
||||
|
@ -1479,7 +1479,7 @@ hu:
|
|||
|
||||
Lásd az <a href="https://operations.osmfoundation.org/policies/tiles/">API Felhasználási Irányelveinket</a>, a <a href="http://wiki.openstreetmap.org/wiki/Tile_usage_policy">Csempe Felhasználási Irányelveinket</a> és a <a href="https://operations.osmfoundation.org/policies/nominatim/">Nominatim Felhasználási Irányelveinket</a>.
|
||||
contributors_title_html: Közreműködőink
|
||||
contributors_intro_html: 'Többszáz egyéni közreműködőnk van. További, szabadon
|
||||
contributors_intro_html: 'Több ezer egyéni közreműködőnk van. További, szabadon
|
||||
elérhető adatokat is felhasználunk nemzeti térkép intézetektől és más forrásokból,
|
||||
többek között:'
|
||||
contributors_at_html: |-
|
||||
|
@ -1600,11 +1600,11 @@ hu:
|
|||
overpass:
|
||||
title: Overpass API
|
||||
description: A megjelenített befoglaló keret letöltése egy OpenStreetMap
|
||||
tükörserverről
|
||||
tükörszerverről
|
||||
geofabrik:
|
||||
title: Geofabrik letöltések
|
||||
description: Kontinensek, országok és kiválasztott városok rendszeresen
|
||||
frissített kivonata
|
||||
frissített kivonatai
|
||||
metro:
|
||||
title: Metro Extracts
|
||||
description: A főbb városok, valamint a környező területek kivonatai
|
||||
|
|
|
@ -71,7 +71,7 @@ ia:
|
|||
tracetag: Etiquetta de tracia
|
||||
user: Usator
|
||||
user_preference: Preferentias de usator
|
||||
user_token: Indicio de usator
|
||||
user_token: Token del usator
|
||||
way: Via
|
||||
way_node: Nodo de via
|
||||
way_tag: Etiquetta de via
|
||||
|
@ -283,6 +283,7 @@ ia:
|
|||
tag: Le pagina wiki que describe le etiquetta %{key}=%{value}
|
||||
wikidata_link: Le elemento %{page} in Wikidata
|
||||
wikipedia_link: Le articulo %{page} in Wikipedia
|
||||
wikimedia_commons_link: Le objecto %{page} sur Wikimedia Commons
|
||||
telephone_link: Telephonar %{phone_number}
|
||||
colour_preview: Previsualisation del color %{colour_value}
|
||||
note:
|
||||
|
@ -1964,9 +1965,9 @@ ia:
|
|||
authorize_failure:
|
||||
title: Requesta de autorisation fallite
|
||||
denied: Tu ha refusate al application %{app_name} le accesso a tu conto.
|
||||
invalid: Le indicio de autorisation non es valide.
|
||||
invalid: Le token de autorisation non es valide.
|
||||
revoke:
|
||||
flash: Tu ha revocate le indicio pro %{application}
|
||||
flash: Tu ha revocate le token pro %{application}
|
||||
permissions:
|
||||
missing: Tu non ha permittite al application le accesso a iste facilitate
|
||||
oauth_clients:
|
||||
|
@ -1978,8 +1979,8 @@ ia:
|
|||
title: Detalios OAuth pro %{app_name}
|
||||
key: 'Clave de consumitor:'
|
||||
secret: 'Secreto de consumitor:'
|
||||
url: 'URL del indicio de requesta:'
|
||||
access_url: 'URL del indicio de accesso:'
|
||||
url: 'URL del token de requesta:'
|
||||
access_url: 'URL del token de accesso:'
|
||||
authorize_url: 'URL de autorisation:'
|
||||
support_notice: Nos supporta le signaturas HMAC-SHA1 (recommendate) e RSA-SHA1.
|
||||
edit: Modificar detalios
|
||||
|
@ -1996,8 +1997,7 @@ ia:
|
|||
index:
|
||||
title: Mi detalios OAuth
|
||||
my_tokens: Mi applicationes autorisate
|
||||
list_tokens: 'Le sequente indicios ha essite emittite a applicationes in tu
|
||||
nomine:'
|
||||
list_tokens: 'Le sequente tokens ha essite emittite a applicationes in tu nomine:'
|
||||
application: Nomine del application
|
||||
issued_at: Emittite le
|
||||
revoke: Revocar!
|
||||
|
@ -2105,7 +2105,7 @@ ia:
|
|||
confirm password: 'Confirma contrasigno:'
|
||||
reset: Reinitialisar contrasigno
|
||||
flash changed: Tu contrasigno ha essite cambiate.
|
||||
flash token bad: Indicio non trovate. Verifica le URL.
|
||||
flash token bad: Token non trovate. Verifica le URL.
|
||||
new:
|
||||
title: Crear conto
|
||||
no_auto_account_create: Infortunatemente in iste momento non es possibile crear
|
||||
|
@ -2333,7 +2333,7 @@ ia:
|
|||
adresse de e-mail.
|
||||
button: Confirmar
|
||||
success: Le cambio del adresse de e-mail ha essite confirmate.
|
||||
failure: Un adresse de e-mail ha ja essite confirmate con iste indicio.
|
||||
failure: Un adresse de e-mail ha ja essite confirmate con iste token.
|
||||
unknown_token: Iste codice de confirmation ha expirate o non existe.
|
||||
set_home:
|
||||
flash success: Position de origine confirmate con successo
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
# Author: Frubino
|
||||
# Author: Gianfranco
|
||||
# Author: Isiond
|
||||
# Author: Jlrb+
|
||||
# Author: Kaitu
|
||||
# Author: Karika
|
||||
# Author: Lollo
|
||||
|
@ -1637,7 +1638,7 @@ it:
|
|||
geofabrik:
|
||||
title: Geofabrik Downloads
|
||||
description: Estratti aggiornati regolarmente di continenti, paesi, e città
|
||||
selezionata
|
||||
selezionate
|
||||
metro:
|
||||
title: Metro Extracts
|
||||
description: Estratti per le principali città del mondo e le loro aree circostanti
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
# Author: Wrightbus
|
||||
# Author: Yusuke1109
|
||||
# Author: ネイ
|
||||
# Author: 沈澄心
|
||||
# Author: 神樂坂秀吉
|
||||
# Author: 青子守歌
|
||||
# Author: 아라
|
||||
|
@ -1784,7 +1785,9 @@ ja:
|
|||
newer: 以降のトレース
|
||||
trace:
|
||||
pending: 処理中
|
||||
count_points: '%{count} 個の点'
|
||||
count_points:
|
||||
one: 1個の点
|
||||
other: '%{count}個の点'
|
||||
more: 詳細
|
||||
trace_details: トレースの詳細表示
|
||||
view_map: 地図で表示
|
||||
|
|
|
@ -286,6 +286,7 @@ mk:
|
|||
tag: Вики-страницата за ознаката %{key}=%{value}
|
||||
wikidata_link: Предметот за %{page} на Википодатоци
|
||||
wikipedia_link: Статијата %{page} на Википедија
|
||||
wikimedia_commons_link: Ставката %{page} на Ризницата
|
||||
telephone_link: Јави се на %{phone_number}
|
||||
colour_preview: Преглед на бојата %{colour_value}
|
||||
note:
|
||||
|
|
|
@ -2516,7 +2516,7 @@ nb:
|
|||
gps: Offentlige GPS-sporinger
|
||||
overlays: Aktiver overlag for å feilsøke kartet
|
||||
title: Lag
|
||||
copyright: © <a href='%{copyright_url}'>OpenStreetMap bidragsytere</a>
|
||||
copyright: © <a href='%{copyright_url}'>OpenStreetMaps bidragsytere</a>
|
||||
donate_link_text: <a class='donate-attr' href='%{donate_url}'>Gi en donasjon</a>
|
||||
site:
|
||||
edit_tooltip: Rediger kartet
|
||||
|
|
|
@ -349,6 +349,7 @@ pl:
|
|||
tag: Strona wiki dla znacznika %{key}=%{value}
|
||||
wikidata_link: '%{page} element na Wikidata'
|
||||
wikipedia_link: Artykuł %{page} w Wikipedii
|
||||
wikimedia_commons_link: Plik %{page} na Wikimedia Commons
|
||||
telephone_link: Zadzwoń pod %{phone_number}
|
||||
colour_preview: Podgląd koloru %{colour_value}
|
||||
note:
|
||||
|
|
|
@ -326,6 +326,7 @@ pt-BR:
|
|||
tag: A página no wiki com a descrição da etiqueta %{key}=%{value}
|
||||
wikidata_link: O item %{page} no Wikidata
|
||||
wikipedia_link: O artigo %{page} na Wikipédia
|
||||
wikimedia_commons_link: A %{page} de item mo Wikimedia Commons
|
||||
telephone_link: Ligar para %{phone_number}
|
||||
colour_preview: Pré-visualização da cor %{colour_value}
|
||||
note:
|
||||
|
|
|
@ -311,6 +311,7 @@ pt-PT:
|
|||
tag: A página wiki com a descrição da etiqueta %{key}=%{value}
|
||||
wikidata_link: O item %{page} como Wikidata
|
||||
wikipedia_link: A página %{page} na Wikipédia
|
||||
wikimedia_commons_link: O item %{page} na Wikimedia Commons
|
||||
telephone_link: Telefonar %{phone_number}
|
||||
colour_preview: Antevisão da cor %{colour_value}
|
||||
note:
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
# Author: Erdemaslancan
|
||||
# Author: George Animal
|
||||
# Author: Gizemb
|
||||
# Author: Grkn gll
|
||||
# Author: Hedda
|
||||
# Author: Imabadplayer
|
||||
# Author: Incelemeelemani
|
||||
|
@ -314,8 +315,9 @@ tr:
|
|||
wiki_link:
|
||||
key: '%{key} parametresi için Viki açıklaması'
|
||||
tag: '%{key}=%{value} parametresi için Viki açıklaması'
|
||||
wikidata_link: Vikidatada bulunan %{page} ögesi
|
||||
wikipedia_link: '%{page} hakkında Vikipedi maddesi'
|
||||
wikidata_link: Vikidata'da bulunan %{page} öğesi
|
||||
wikipedia_link: Vikipedi'deki %{page} makalesi
|
||||
wikimedia_commons_link: Wikimedia Commons'daki %{page} maddesi
|
||||
telephone_link: '%{phone_number} ara'
|
||||
colour_preview: Renk %{colour_value} önizleme
|
||||
note:
|
||||
|
|
|
@ -119,6 +119,10 @@ tt:
|
|||
one: 1 ел элек
|
||||
other: '%{count} ел элек'
|
||||
editor:
|
||||
potlatch:
|
||||
name: Potlatch 1
|
||||
id:
|
||||
name: iD
|
||||
remote:
|
||||
name: Дистанцион идарә
|
||||
description: Дистанционн идарә (JOSM яки Merkaartor)
|
||||
|
@ -495,7 +499,7 @@ tt:
|
|||
fish: Балык кибете
|
||||
florist: Чәчәк кибете
|
||||
food: Ашамлыклар
|
||||
gallery: Галерея
|
||||
gallery: Җыелма
|
||||
market: Базар
|
||||
pharmacy: Даруханә
|
||||
tailor: Тегүче
|
||||
|
@ -681,7 +685,7 @@ tt:
|
|||
preview: Алдан карау
|
||||
markdown_help:
|
||||
headings: Башлыклар
|
||||
heading: Башлык
|
||||
heading: Бүлек башы
|
||||
link: Сылтама
|
||||
text: Текст
|
||||
image: Сурәт
|
||||
|
|
|
@ -328,6 +328,7 @@ uk:
|
|||
tag: Сторінка вікі, що описує теґ %{key}=%{value}
|
||||
wikidata_link: '%{page} елемент на Вікіданих'
|
||||
wikipedia_link: Стаття %{page} у Вікіпедії
|
||||
wikimedia_commons_link: Сторінка %{page} у Вікісховищі
|
||||
telephone_link: Зателефонуйте на %{phone_number}
|
||||
colour_preview: Перегляд кольору %{colour_value}
|
||||
note:
|
||||
|
@ -1329,10 +1330,10 @@ uk:
|
|||
змін'
|
||||
subject_other: '[OpenStreetMap] %{commenter} прокоментував набір змін, до
|
||||
якого ви залишали свій коментар'
|
||||
your_changeset: '%{commenter} залишив коментар до одного з ваших наборів змін,
|
||||
створених %{time}'
|
||||
commented_changeset: '%{commenter} залишив коментар до набору змін, що ви
|
||||
переглядаєте, створений %{changeset_author} – %{time}'
|
||||
your_changeset: '%{commenter} залишив коментар у %{time} до одного з ваших
|
||||
наборів змін'
|
||||
commented_changeset: '%{commenter} залишив коментар у %{time} до набору змін,
|
||||
що ви переглядаєте, створений %{changeset_author}'
|
||||
partial_changeset_with_comment: з коментарем '%{changeset_comment}'
|
||||
partial_changeset_without_comment: без коментарів
|
||||
details: |2-
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
# Author: 予弦
|
||||
# Author: 夢蝶葬花
|
||||
# Author: 水獭很懒
|
||||
# Author: 沈澄心
|
||||
# Author: 神樂坂秀吉
|
||||
# Author: 阿pp
|
||||
# Author: 아라
|
||||
|
@ -323,6 +324,7 @@ zh-CN:
|
|||
tag: '%{key}=%{value} 标签的 wiki 说明页面'
|
||||
wikidata_link: 维基数据上的%{page}项
|
||||
wikipedia_link: 维基百科上的 %{page} 条目
|
||||
wikimedia_commons_link: 在维基共享资源上的%{page}项目
|
||||
telephone_link: 请拨打 %{phone_number}
|
||||
colour_preview: '%{colour_value}的颜色预览'
|
||||
note:
|
||||
|
@ -1296,8 +1298,8 @@ zh-CN:
|
|||
commented:
|
||||
subject_own: '[OpenStreetMap] %{commenter}在您的一个修改集合中做出了评论'
|
||||
subject_other: '[OpenStreetMap] %{commenter} 评论了您感兴趣的一个修改集合'
|
||||
your_changeset: '%{commenter} 在您于 %{time} 创建的一个修改集合留了言'
|
||||
commented_changeset: '%{commenter} 在您监视的由 %{changeset_author} 于 %{time} 创建的一个地图修改集合中留了言'
|
||||
your_changeset: '%{commenter} 于 %{time} 在您创建的一个修改集合留了言'
|
||||
commented_changeset: '%{commenter} 于 %{time} 在您监视的由 %{changeset_author} 创建的一个地图修改集合中留了言'
|
||||
partial_changeset_with_comment: 带评论“%{changeset_comment}”
|
||||
partial_changeset_without_comment: 没有评论
|
||||
details: 更多关于修改集合的详细信息可以在 %{url} 找到。
|
||||
|
@ -1784,7 +1786,9 @@ zh-CN:
|
|||
newer: 较新轨迹
|
||||
trace:
|
||||
pending: 挂起
|
||||
count_points: '%{count} 个点'
|
||||
count_points:
|
||||
one: 1个点
|
||||
other: '%{count}个点'
|
||||
more: 更多
|
||||
trace_details: 查看轨迹详情
|
||||
view_map: 查看地图
|
||||
|
@ -2019,7 +2023,7 @@ zh-CN:
|
|||
read_ct: 我已了解并同意贡献者条款
|
||||
tou_explain_html: 这些%{tou_link}适用于网站方面的使用,与其它由OSMF提供的基础内容。请点击链接,阅读并同意该条款。
|
||||
read_tou: 我已阅读并同意使用条款
|
||||
consider_pd: 除了上述协议,我同意将我的贡献授权为公共领域
|
||||
consider_pd: 除了上述协议,我同意将我的贡献释于公有领域
|
||||
consider_pd_why: 这是什么?
|
||||
consider_pd_why_url: http://www.osmfoundation.org/wiki/License/Why_would_I_want_my_contributions_to_be_public_domain
|
||||
guidance: 帮助理解这些条款的信息:一个<a href="%{summary}">可读的摘要</a>和一些<a href="%{translations}">非正式翻译</a>
|
||||
|
@ -2131,7 +2135,7 @@ zh-CN:
|
|||
agreed: 您已同意新的贡献者条款。
|
||||
not yet agreed: 您还没有同意新的贡献者条款。
|
||||
review link text: 请跟随此链接,方便您查看并接受新的贡献者条款。
|
||||
agreed_with_pd: 您也将您的编辑释于公共领域。
|
||||
agreed_with_pd: 您也将您的编辑释于公有领域。
|
||||
link: https://www.osmfoundation.org/wiki/License/Contributor_Terms
|
||||
link text: 这是什么?
|
||||
profile description: 基本信息说明:
|
||||
|
|
|
@ -315,6 +315,7 @@ zh-TW:
|
|||
tag: '%{key}=%{value} 標籤的 Wiki 說明頁面'
|
||||
wikidata_link: 維基數據上的 %{page} 項目
|
||||
wikipedia_link: 維基百科上的 %{page} 條目
|
||||
wikimedia_commons_link: 在維基共享資源上的%{page}項目
|
||||
telephone_link: 致電 %{phone_number}
|
||||
colour_preview: 色彩%{colour_value}預覽
|
||||
note:
|
||||
|
@ -1290,8 +1291,8 @@ zh-TW:
|
|||
commented:
|
||||
subject_own: '[OpenStreetMap] %{commenter}% 在您的變更集評論'
|
||||
subject_other: '[OpenStreetMap] %{commenter} 就您感興趣的變更集評論'
|
||||
your_changeset: '%{commenter} 在您於 %{time} 建立的變更集評論'
|
||||
commented_changeset: '%{commenter} 在您監視,由 %{changeset_author} 於 %{time} 建立的變更集評論'
|
||||
your_changeset: '%{commenter}於 %{time} 在您的變更集之一裡留下了評論'
|
||||
commented_changeset: '%{commenter}於 %{time} 在您監視的由%{changeset_author}所建立變更集裡留下了評論'
|
||||
partial_changeset_with_comment: 評論 "%{changeset_comment}"
|
||||
partial_changeset_without_comment: 沒有評論
|
||||
details: 關於變更集的詳情可在 %{url} 找到。
|
||||
|
|
|
@ -67,11 +67,11 @@ OpenStreetMap::Application.routes.draw do
|
|||
get "user/gpx_files" => "api/users#gpx_files"
|
||||
get "users" => "api/users#index", :as => :api_users
|
||||
|
||||
get "user/preferences" => "api/user_preferences#read"
|
||||
get "user/preferences/:preference_key" => "api/user_preferences#read_one"
|
||||
put "user/preferences" => "api/user_preferences#update"
|
||||
put "user/preferences/:preference_key" => "api/user_preferences#update_one"
|
||||
delete "user/preferences/:preference_key" => "api/user_preferences#delete_one"
|
||||
get "user/preferences" => "api/user_preferences#index"
|
||||
get "user/preferences/:preference_key" => "api/user_preferences#show"
|
||||
put "user/preferences" => "api/user_preferences#update_all"
|
||||
put "user/preferences/:preference_key" => "api/user_preferences#update"
|
||||
delete "user/preferences/:preference_key" => "api/user_preferences#destroy"
|
||||
|
||||
post "gpx/create" => "api/traces#create"
|
||||
get "gpx/:id" => "api/traces#show", :id => /\d+/
|
||||
|
|
6
db/migrate/20191120140058_remove_nearby_from_users.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
class RemoveNearbyFromUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# We've already ignored this column in the model, so it is safe to remove
|
||||
safety_assured { remove_column :users, :nearby, :integer, :default => 50 }
|
||||
end
|
||||
end
|
|
@ -1394,7 +1394,6 @@ CREATE TABLE public.users (
|
|||
home_lat double precision,
|
||||
home_lon double precision,
|
||||
home_zoom smallint DEFAULT 3,
|
||||
nearby integer DEFAULT 50,
|
||||
pass_salt character varying,
|
||||
email_valid boolean DEFAULT false NOT NULL,
|
||||
new_email character varying,
|
||||
|
@ -3137,6 +3136,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
|||
('20190623093642'),
|
||||
('20190702193519'),
|
||||
('20190716173946'),
|
||||
('20191120140058'),
|
||||
('21'),
|
||||
('22'),
|
||||
('23'),
|
||||
|
|
|
@ -100,33 +100,33 @@ class UserApiCapabilityTest < ApiCapabilityTest
|
|||
test "user preferences" do
|
||||
# a user with no tokens
|
||||
capability = ApiCapability.new nil
|
||||
[:read, :read_one, :update, :update_one, :delete_one].each do |act|
|
||||
[:index, :show, :update_all, :update, :destroy].each do |act|
|
||||
assert capability.cannot? act, UserPreference
|
||||
end
|
||||
|
||||
# A user with empty tokens
|
||||
capability = ApiCapability.new tokens
|
||||
|
||||
[:read, :read_one, :update, :update_one, :delete_one].each do |act|
|
||||
[:index, :show, :update_all, :update, :destroy].each do |act|
|
||||
assert capability.cannot? act, UserPreference
|
||||
end
|
||||
|
||||
capability = ApiCapability.new tokens(:allow_read_prefs)
|
||||
|
||||
[:update, :update_one, :delete_one].each do |act|
|
||||
[:update_all, :update, :destroy].each do |act|
|
||||
assert capability.cannot? act, UserPreference
|
||||
end
|
||||
|
||||
[:read, :read_one].each do |act|
|
||||
[:index, :show].each do |act|
|
||||
assert capability.can? act, UserPreference
|
||||
end
|
||||
|
||||
capability = ApiCapability.new tokens(:allow_write_prefs)
|
||||
[:read, :read_one].each do |act|
|
||||
[:index, :show].each do |act|
|
||||
assert capability.cannot? act, UserPreference
|
||||
end
|
||||
|
||||
[:update, :update_one, :delete_one].each do |act|
|
||||
[:update_all, :update, :destroy].each do |act|
|
||||
assert capability.can? act, UserPreference
|
||||
end
|
||||
end
|
||||
|
|
|
@ -458,10 +458,10 @@ CHANGESET
|
|||
diff.root = XML::Node.new "osmChange"
|
||||
delete = XML::Node.new "delete"
|
||||
diff.root << delete
|
||||
delete << super_relation.to_xml_node
|
||||
delete << used_relation.to_xml_node
|
||||
delete << used_way.to_xml_node
|
||||
delete << used_node.to_xml_node
|
||||
delete << xml_node_for_relation(super_relation)
|
||||
delete << xml_node_for_relation(used_relation)
|
||||
delete << xml_node_for_way(used_way)
|
||||
delete << xml_node_for_node(used_node)
|
||||
|
||||
# update the changeset to one that this user owns
|
||||
%w[node way relation].each do |type|
|
||||
|
@ -590,9 +590,9 @@ CHANGESET
|
|||
diff.root = XML::Node.new "osmChange"
|
||||
delete = XML::Node.new "delete"
|
||||
diff.root << delete
|
||||
delete << other_relation.to_xml_node
|
||||
delete << used_way.to_xml_node
|
||||
delete << used_node.to_xml_node
|
||||
delete << xml_node_for_relation(other_relation)
|
||||
delete << xml_node_for_way(used_way)
|
||||
delete << xml_node_for_node(used_node)
|
||||
|
||||
# update the changeset to one that this user owns
|
||||
%w[node way relation].each do |type|
|
||||
|
@ -633,9 +633,9 @@ CHANGESET
|
|||
delete = XML::Node.new "delete"
|
||||
diff.root << delete
|
||||
delete["if-unused"] = ""
|
||||
delete << used_relation.to_xml_node
|
||||
delete << used_way.to_xml_node
|
||||
delete << used_node.to_xml_node
|
||||
delete << xml_node_for_relation(used_relation)
|
||||
delete << xml_node_for_way(used_way)
|
||||
delete << xml_node_for_node(used_node)
|
||||
|
||||
# update the changeset to one that this user owns
|
||||
%w[node way relation].each do |type|
|
||||
|
@ -1137,7 +1137,7 @@ CHANGESET
|
|||
diff = XML::Document.new
|
||||
diff.root = XML::Node.new "osmChange"
|
||||
modify = XML::Node.new "modify"
|
||||
xml_old_node = old_node.to_xml_node
|
||||
xml_old_node = xml_node_for_node(old_node)
|
||||
xml_old_node["lat"] = 2.0.to_s
|
||||
xml_old_node["lon"] = 2.0.to_s
|
||||
xml_old_node["changeset"] = changeset_id.to_s
|
||||
|
@ -1175,7 +1175,7 @@ CHANGESET
|
|||
diff = XML::Document.new
|
||||
diff.root = XML::Node.new "osmChange"
|
||||
modify = XML::Node.new "modify"
|
||||
xml_old_way = old_way.to_xml_node
|
||||
xml_old_way = xml_node_for_way(old_way)
|
||||
nd_ref = XML::Node.new "nd"
|
||||
nd_ref["ref"] = create(:node, :lat => 3, :lon => 3).id.to_s
|
||||
xml_old_way << nd_ref
|
||||
|
@ -1228,7 +1228,7 @@ CHANGESET
|
|||
diff.root = XML::Node.new "osmChange"
|
||||
delete = XML::Node.new "delete"
|
||||
diff.root << delete
|
||||
delete << node.to_xml_node
|
||||
delete << xml_node_for_node(node)
|
||||
|
||||
# upload it
|
||||
error_format "xml"
|
||||
|
@ -1487,7 +1487,7 @@ CHANGESET
|
|||
|
||||
# add (delete) a way to it, which contains a point at (3,3)
|
||||
with_controller(WaysController.new) do
|
||||
xml = update_changeset(way.to_xml, changeset_id)
|
||||
xml = update_changeset(xml_for_way(way), changeset_id)
|
||||
put :delete, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :success, "Couldn't delete a way."
|
||||
end
|
||||
|
|
|
@ -147,6 +147,15 @@ module Api
|
|||
assert_response :not_found
|
||||
end
|
||||
|
||||
# Ensure the lat/lon is formatted as a decimal e.g. not 4.0e-05
|
||||
def test_lat_lon_xml_format
|
||||
node = create(:node, :latitude => (0.00004 * OldNode::SCALE).to_i, :longitude => (0.00008 * OldNode::SCALE).to_i)
|
||||
|
||||
get :show, :params => { :id => node.id }
|
||||
assert_match(/lat="0.0000400"/, response.body)
|
||||
assert_match(/lon="0.0000800"/, response.body)
|
||||
end
|
||||
|
||||
# this tests deletion restrictions - basic deletion is tested in the unit
|
||||
# tests for node!
|
||||
def test_delete
|
||||
|
@ -164,22 +173,22 @@ module Api
|
|||
basic_authorization private_user.email, "test"
|
||||
|
||||
# try to delete with an invalid (closed) changeset
|
||||
xml = update_changeset(private_node.to_xml, private_user_closed_changeset.id)
|
||||
xml = update_changeset(xml_for_node(private_node), private_user_closed_changeset.id)
|
||||
delete :delete, :params => { :id => private_node.id }, :body => xml.to_s
|
||||
assert_require_public_data("non-public user shouldn't be able to delete node")
|
||||
|
||||
# try to delete with an invalid (non-existent) changeset
|
||||
xml = update_changeset(private_node.to_xml, 0)
|
||||
xml = update_changeset(xml_for_node(private_node), 0)
|
||||
delete :delete, :params => { :id => private_node.id }, :body => xml.to_s
|
||||
assert_require_public_data("shouldn't be able to delete node, when user's data is private")
|
||||
|
||||
# valid delete now takes a payload
|
||||
xml = private_node.to_xml
|
||||
xml = xml_for_node(private_node)
|
||||
delete :delete, :params => { :id => private_node.id }, :body => xml.to_s
|
||||
assert_require_public_data("shouldn't be able to delete node when user's data isn't public'")
|
||||
|
||||
# this won't work since the node is already deleted
|
||||
xml = private_deleted_node.to_xml
|
||||
xml = xml_for_node(private_deleted_node)
|
||||
delete :delete, :params => { :id => private_deleted_node.id }, :body => xml.to_s
|
||||
assert_require_public_data
|
||||
|
||||
|
@ -192,7 +201,7 @@ module Api
|
|||
private_used_node = create(:node, :changeset => private_user_changeset)
|
||||
create(:way_node, :node => private_used_node)
|
||||
|
||||
xml = private_used_node.to_xml
|
||||
xml = xml_for_node(private_used_node)
|
||||
delete :delete, :params => { :id => private_used_node.id }, :body => xml.to_s
|
||||
assert_require_public_data "shouldn't be able to delete a node used in a way (#{@response.body})"
|
||||
|
||||
|
@ -200,7 +209,7 @@ module Api
|
|||
private_used_node2 = create(:node, :changeset => private_user_changeset)
|
||||
create(:relation_member, :member => private_used_node2)
|
||||
|
||||
xml = private_used_node2.to_xml
|
||||
xml = xml_for_node(private_used_node2)
|
||||
delete :delete, :params => { :id => private_used_node2.id }, :body => xml.to_s
|
||||
assert_require_public_data "shouldn't be able to delete a node used in a relation (#{@response.body})"
|
||||
|
||||
|
@ -212,18 +221,18 @@ module Api
|
|||
basic_authorization user.email, "test"
|
||||
|
||||
# try to delete with an invalid (closed) changeset
|
||||
xml = update_changeset(node.to_xml, closed_changeset.id)
|
||||
xml = update_changeset(xml_for_node(node), closed_changeset.id)
|
||||
delete :delete, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :conflict
|
||||
|
||||
# try to delete with an invalid (non-existent) changeset
|
||||
xml = update_changeset(node.to_xml, 0)
|
||||
xml = update_changeset(xml_for_node(node), 0)
|
||||
delete :delete, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :conflict
|
||||
|
||||
# try to delete a node with a different ID
|
||||
other_node = create(:node)
|
||||
xml = other_node.to_xml
|
||||
xml = xml_for_node(other_node)
|
||||
delete :delete, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :bad_request,
|
||||
"should not be able to delete a node with a different ID from the XML"
|
||||
|
@ -235,7 +244,7 @@ module Api
|
|||
"should not be able to delete a node without a valid XML payload"
|
||||
|
||||
# valid delete now takes a payload
|
||||
xml = node.to_xml
|
||||
xml = xml_for_node(node)
|
||||
delete :delete, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :success
|
||||
|
||||
|
@ -245,7 +254,7 @@ module Api
|
|||
"delete request should return a new version number for node"
|
||||
|
||||
# deleting the same node twice doesn't work
|
||||
xml = node.to_xml
|
||||
xml = xml_for_node(node)
|
||||
delete :delete, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :gone
|
||||
|
||||
|
@ -259,7 +268,7 @@ module Api
|
|||
way_node = create(:way_node, :node => used_node)
|
||||
way_node2 = create(:way_node, :node => used_node)
|
||||
|
||||
xml = used_node.to_xml
|
||||
xml = xml_for_node(used_node)
|
||||
delete :delete, :params => { :id => used_node.id }, :body => xml.to_s
|
||||
assert_response :precondition_failed,
|
||||
"shouldn't be able to delete a node used in a way (#{@response.body})"
|
||||
|
@ -270,7 +279,7 @@ module Api
|
|||
relation_member = create(:relation_member, :member => used_node2)
|
||||
relation_member2 = create(:relation_member, :member => used_node2)
|
||||
|
||||
xml = used_node2.to_xml
|
||||
xml = xml_for_node(used_node2)
|
||||
delete :delete, :params => { :id => used_node2.id }, :body => xml.to_s
|
||||
assert_response :precondition_failed,
|
||||
"shouldn't be able to delete a node used in a relation (#{@response.body})"
|
||||
|
@ -289,7 +298,7 @@ module Api
|
|||
user = create(:user)
|
||||
node = create(:node, :changeset => create(:changeset, :user => user))
|
||||
|
||||
xml = node.to_xml
|
||||
xml = xml_for_node(node)
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :unauthorized
|
||||
|
||||
|
@ -301,41 +310,41 @@ module Api
|
|||
## trying to break changesets
|
||||
|
||||
# try and update in someone else's changeset
|
||||
xml = update_changeset(private_node.to_xml,
|
||||
xml = update_changeset(xml_for_node(private_node),
|
||||
create(:changeset).id)
|
||||
put :update, :params => { :id => private_node.id }, :body => xml.to_s
|
||||
assert_require_public_data "update with other user's changeset should be forbidden when data isn't public"
|
||||
|
||||
# try and update in a closed changeset
|
||||
xml = update_changeset(private_node.to_xml,
|
||||
xml = update_changeset(xml_for_node(private_node),
|
||||
create(:changeset, :closed, :user => private_user).id)
|
||||
put :update, :params => { :id => private_node.id }, :body => xml.to_s
|
||||
assert_require_public_data "update with closed changeset should be forbidden, when data isn't public"
|
||||
|
||||
# try and update in a non-existant changeset
|
||||
xml = update_changeset(private_node.to_xml, 0)
|
||||
xml = update_changeset(xml_for_node(private_node), 0)
|
||||
put :update, :params => { :id => private_node.id }, :body => xml.to_s
|
||||
assert_require_public_data "update with changeset=0 should be forbidden, when data isn't public"
|
||||
|
||||
## try and submit invalid updates
|
||||
xml = xml_attr_rewrite(private_node.to_xml, "lat", 91.0)
|
||||
xml = xml_attr_rewrite(xml_for_node(private_node), "lat", 91.0)
|
||||
put :update, :params => { :id => private_node.id }, :body => xml.to_s
|
||||
assert_require_public_data "node at lat=91 should be forbidden, when data isn't public"
|
||||
|
||||
xml = xml_attr_rewrite(private_node.to_xml, "lat", -91.0)
|
||||
xml = xml_attr_rewrite(xml_for_node(private_node), "lat", -91.0)
|
||||
put :update, :params => { :id => private_node.id }, :body => xml.to_s
|
||||
assert_require_public_data "node at lat=-91 should be forbidden, when data isn't public"
|
||||
|
||||
xml = xml_attr_rewrite(private_node.to_xml, "lon", 181.0)
|
||||
xml = xml_attr_rewrite(xml_for_node(private_node), "lon", 181.0)
|
||||
put :update, :params => { :id => private_node.id }, :body => xml.to_s
|
||||
assert_require_public_data "node at lon=181 should be forbidden, when data isn't public"
|
||||
|
||||
xml = xml_attr_rewrite(private_node.to_xml, "lon", -181.0)
|
||||
xml = xml_attr_rewrite(xml_for_node(private_node), "lon", -181.0)
|
||||
put :update, :params => { :id => private_node.id }, :body => xml.to_s
|
||||
assert_require_public_data "node at lon=-181 should be forbidden, when data isn't public"
|
||||
|
||||
## finally, produce a good request which still won't work
|
||||
xml = private_node.to_xml
|
||||
xml = xml_for_node(private_node)
|
||||
put :update, :params => { :id => private_node.id }, :body => xml.to_s
|
||||
assert_require_public_data "should have failed with a forbidden when data isn't public"
|
||||
|
||||
|
@ -343,7 +352,7 @@ module Api
|
|||
|
||||
# try and update a node without authorisation
|
||||
# first try to update node without auth
|
||||
xml = node.to_xml
|
||||
xml = xml_for_node(node)
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :forbidden
|
||||
|
||||
|
@ -353,36 +362,36 @@ module Api
|
|||
## trying to break changesets
|
||||
|
||||
# try and update in someone else's changeset
|
||||
xml = update_changeset(node.to_xml,
|
||||
xml = update_changeset(xml_for_node(node),
|
||||
create(:changeset).id)
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :conflict, "update with other user's changeset should be rejected"
|
||||
|
||||
# try and update in a closed changeset
|
||||
xml = update_changeset(node.to_xml,
|
||||
xml = update_changeset(xml_for_node(node),
|
||||
create(:changeset, :closed, :user => user).id)
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :conflict, "update with closed changeset should be rejected"
|
||||
|
||||
# try and update in a non-existant changeset
|
||||
xml = update_changeset(node.to_xml, 0)
|
||||
xml = update_changeset(xml_for_node(node), 0)
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :conflict, "update with changeset=0 should be rejected"
|
||||
|
||||
## try and submit invalid updates
|
||||
xml = xml_attr_rewrite(node.to_xml, "lat", 91.0)
|
||||
xml = xml_attr_rewrite(xml_for_node(node), "lat", 91.0)
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :bad_request, "node at lat=91 should be rejected"
|
||||
|
||||
xml = xml_attr_rewrite(node.to_xml, "lat", -91.0)
|
||||
xml = xml_attr_rewrite(xml_for_node(node), "lat", -91.0)
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :bad_request, "node at lat=-91 should be rejected"
|
||||
|
||||
xml = xml_attr_rewrite(node.to_xml, "lon", 181.0)
|
||||
xml = xml_attr_rewrite(xml_for_node(node), "lon", 181.0)
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :bad_request, "node at lon=181 should be rejected"
|
||||
|
||||
xml = xml_attr_rewrite(node.to_xml, "lon", -181.0)
|
||||
xml = xml_attr_rewrite(xml_for_node(node), "lon", -181.0)
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :bad_request, "node at lon=-181 should be rejected"
|
||||
|
||||
|
@ -390,26 +399,26 @@ module Api
|
|||
current_node_version = node.version
|
||||
|
||||
# try and submit a version behind
|
||||
xml = xml_attr_rewrite(node.to_xml,
|
||||
xml = xml_attr_rewrite(xml_for_node(node),
|
||||
"version", current_node_version - 1)
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :conflict, "should have failed on old version number"
|
||||
|
||||
# try and submit a version ahead
|
||||
xml = xml_attr_rewrite(node.to_xml,
|
||||
xml = xml_attr_rewrite(xml_for_node(node),
|
||||
"version", current_node_version + 1)
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :conflict, "should have failed on skipped version number"
|
||||
|
||||
# try and submit total crap in the version field
|
||||
xml = xml_attr_rewrite(node.to_xml,
|
||||
xml = xml_attr_rewrite(xml_for_node(node),
|
||||
"version", "p1r4t3s!")
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :conflict,
|
||||
"should not be able to put 'p1r4at3s!' in the version field"
|
||||
|
||||
## try an update with the wrong ID
|
||||
xml = create(:node).to_xml
|
||||
xml = xml_for_node(create(:node))
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :bad_request,
|
||||
"should not be able to update a node with a different ID from the XML"
|
||||
|
@ -421,7 +430,7 @@ module Api
|
|||
"should not be able to update a node with non-OSM XML doc."
|
||||
|
||||
## finally, produce a good request which should work
|
||||
xml = node.to_xml
|
||||
xml = xml_for_node(node)
|
||||
put :update, :params => { :id => node.id }, :body => xml.to_s
|
||||
assert_response :success, "a valid update request failed"
|
||||
end
|
||||
|
@ -474,7 +483,7 @@ module Api
|
|||
tag_xml["v"] = existing_tag.v
|
||||
|
||||
# add the tag into the existing xml
|
||||
node_xml = existing_tag.node.to_xml
|
||||
node_xml = xml_for_node(existing_tag.node)
|
||||
node_xml.find("//osm/node").first << tag_xml
|
||||
|
||||
# try and upload it
|
||||
|
|
|
@ -43,7 +43,7 @@ module Api
|
|||
basic_authorization private_user.email, "test"
|
||||
|
||||
# setup a simple XML node
|
||||
xml_doc = private_node.to_xml
|
||||
xml_doc = xml_for_node(private_node)
|
||||
xml_node = xml_doc.find("//osm/node").first
|
||||
nodeid = private_node.id
|
||||
|
||||
|
@ -91,7 +91,7 @@ module Api
|
|||
|
||||
# setup a simple XML node
|
||||
|
||||
xml_doc = node.to_xml
|
||||
xml_doc = xml_for_node(node)
|
||||
xml_node = xml_doc.find("//osm/node").first
|
||||
nodeid = node.id
|
||||
|
||||
|
|
|
@ -525,28 +525,28 @@ module Api
|
|||
assert_response :forbidden
|
||||
|
||||
# try to delete with an invalid (closed) changeset
|
||||
xml = update_changeset(relation.to_xml,
|
||||
xml = update_changeset(xml_for_relation(relation),
|
||||
private_user_closed_changeset.id)
|
||||
delete :delete, :params => { :id => relation.id }, :body => xml.to_s
|
||||
assert_response :forbidden
|
||||
|
||||
# try to delete with an invalid (non-existent) changeset
|
||||
xml = update_changeset(relation.to_xml, 0)
|
||||
xml = update_changeset(xml_for_relation(relation), 0)
|
||||
delete :delete, :params => { :id => relation.id }, :body => xml.to_s
|
||||
assert_response :forbidden
|
||||
|
||||
# this won't work because the relation is in-use by another relation
|
||||
xml = used_relation.to_xml
|
||||
xml = xml_for_relation(used_relation)
|
||||
delete :delete, :params => { :id => used_relation.id }, :body => xml.to_s
|
||||
assert_response :forbidden
|
||||
|
||||
# this should work when we provide the appropriate payload...
|
||||
xml = relation.to_xml
|
||||
xml = xml_for_relation(relation)
|
||||
delete :delete, :params => { :id => relation.id }, :body => xml.to_s
|
||||
assert_response :forbidden
|
||||
|
||||
# this won't work since the relation is already deleted
|
||||
xml = deleted_relation.to_xml
|
||||
xml = xml_for_relation(deleted_relation)
|
||||
delete :delete, :params => { :id => deleted_relation.id }, :body => xml.to_s
|
||||
assert_response :forbidden
|
||||
|
||||
|
@ -568,36 +568,36 @@ module Api
|
|||
assert_match(/Changeset id is missing/, @response.body)
|
||||
|
||||
# try to delete with an invalid (closed) changeset
|
||||
xml = update_changeset(relation.to_xml,
|
||||
xml = update_changeset(xml_for_relation(relation),
|
||||
closed_changeset.id)
|
||||
delete :delete, :params => { :id => relation.id }, :body => xml.to_s
|
||||
assert_response :conflict
|
||||
|
||||
# try to delete with an invalid (non-existent) changeset
|
||||
xml = update_changeset(relation.to_xml, 0)
|
||||
xml = update_changeset(xml_for_relation(relation), 0)
|
||||
delete :delete, :params => { :id => relation.id }, :body => xml.to_s
|
||||
assert_response :conflict
|
||||
|
||||
# this won't work because the relation is in a changeset owned by someone else
|
||||
xml = update_changeset(relation.to_xml, create(:changeset).id)
|
||||
xml = update_changeset(xml_for_relation(relation), create(:changeset).id)
|
||||
delete :delete, :params => { :id => relation.id }, :body => xml.to_s
|
||||
assert_response :conflict,
|
||||
"shouldn't be able to delete a relation in a changeset owned by someone else (#{@response.body})"
|
||||
|
||||
# this won't work because the relation in the payload is different to that passed
|
||||
xml = update_changeset(relation.to_xml, changeset.id)
|
||||
xml = update_changeset(xml_for_relation(relation), changeset.id)
|
||||
delete :delete, :params => { :id => create(:relation).id }, :body => xml.to_s
|
||||
assert_response :bad_request, "shouldn't be able to delete a relation when payload is different to the url"
|
||||
|
||||
# this won't work because the relation is in-use by another relation
|
||||
xml = update_changeset(used_relation.to_xml, changeset.id)
|
||||
xml = update_changeset(xml_for_relation(used_relation), changeset.id)
|
||||
delete :delete, :params => { :id => used_relation.id }, :body => xml.to_s
|
||||
assert_response :precondition_failed,
|
||||
"shouldn't be able to delete a relation used in a relation (#{@response.body})"
|
||||
assert_equal "Precondition failed: The relation #{used_relation.id} is used in relation #{super_relation.id}.", @response.body
|
||||
|
||||
# this should work when we provide the appropriate payload...
|
||||
xml = update_changeset(multi_tag_relation.to_xml, changeset.id)
|
||||
xml = update_changeset(xml_for_relation(multi_tag_relation), changeset.id)
|
||||
delete :delete, :params => { :id => multi_tag_relation.id }, :body => xml.to_s
|
||||
assert_response :success
|
||||
|
||||
|
@ -607,18 +607,18 @@ module Api
|
|||
"delete request should return a new version number for relation"
|
||||
|
||||
# this won't work since the relation is already deleted
|
||||
xml = update_changeset(deleted_relation.to_xml, changeset.id)
|
||||
xml = update_changeset(xml_for_relation(deleted_relation), changeset.id)
|
||||
delete :delete, :params => { :id => deleted_relation.id }, :body => xml.to_s
|
||||
assert_response :gone
|
||||
|
||||
# Public visible relation needs to be deleted
|
||||
xml = update_changeset(super_relation.to_xml, changeset.id)
|
||||
xml = update_changeset(xml_for_relation(super_relation), changeset.id)
|
||||
delete :delete, :params => { :id => super_relation.id }, :body => xml.to_s
|
||||
assert_response :success
|
||||
|
||||
# this works now because the relation which was using this one
|
||||
# has been deleted.
|
||||
xml = update_changeset(used_relation.to_xml, changeset.id)
|
||||
xml = update_changeset(xml_for_relation(used_relation), changeset.id)
|
||||
delete :delete, :params => { :id => used_relation.id }, :body => xml.to_s
|
||||
assert_response :success,
|
||||
"should be able to delete a relation used in an old relation (#{@response.body})"
|
||||
|
@ -643,7 +643,7 @@ module Api
|
|||
# indirectly via the way), so the bbox should be [3,3,5,5].
|
||||
check_changeset_modify(BoundingBox.new(3, 3, 5, 5)) do |changeset_id|
|
||||
# add a tag to an existing relation
|
||||
relation_xml = relation.to_xml
|
||||
relation_xml = xml_for_relation(relation)
|
||||
relation_element = relation_xml.find("//osm/relation").first
|
||||
new_tag = XML::Node.new("tag")
|
||||
new_tag["k"] = "some_new_tag"
|
||||
|
@ -675,7 +675,7 @@ module Api
|
|||
[node1, node2, way1, way2].each do |element|
|
||||
bbox = element.bbox.to_unscaled
|
||||
check_changeset_modify(bbox) do |changeset_id|
|
||||
relation_xml = Relation.find(relation.id).to_xml
|
||||
relation_xml = xml_for_relation(Relation.find(relation.id))
|
||||
relation_element = relation_xml.find("//osm/relation").first
|
||||
new_member = XML::Node.new("member")
|
||||
new_member["ref"] = element.id.to_s
|
||||
|
@ -710,7 +710,7 @@ module Api
|
|||
|
||||
check_changeset_modify(BoundingBox.new(5, 5, 5, 5)) do |changeset_id|
|
||||
# remove node 5 (5,5) from an existing relation
|
||||
relation_xml = relation.to_xml
|
||||
relation_xml = xml_for_relation(relation)
|
||||
relation_xml
|
||||
.find("//osm/relation/member[@type='node'][@ref='#{node2.id}']")
|
||||
.first.remove!
|
||||
|
@ -879,7 +879,7 @@ OSM
|
|||
create(:relation_member, :relation => relation, :member => node2)
|
||||
|
||||
check_changeset_modify(BoundingBox.new(3, 3, 5, 5)) do |changeset_id|
|
||||
relation_xml = relation.to_xml
|
||||
relation_xml = xml_for_relation(relation)
|
||||
relation_xml
|
||||
.find("//osm/relation/member")
|
||||
.each(&:remove!)
|
||||
|
|
|
@ -7,38 +7,38 @@ module Api
|
|||
def test_routes
|
||||
assert_routing(
|
||||
{ :path => "/api/0.6/user/preferences", :method => :get },
|
||||
{ :controller => "api/user_preferences", :action => "read" }
|
||||
{ :controller => "api/user_preferences", :action => "index" }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/api/0.6/user/preferences", :method => :put },
|
||||
{ :controller => "api/user_preferences", :action => "update" }
|
||||
{ :controller => "api/user_preferences", :action => "update_all" }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/api/0.6/user/preferences/key", :method => :get },
|
||||
{ :controller => "api/user_preferences", :action => "read_one", :preference_key => "key" }
|
||||
{ :controller => "api/user_preferences", :action => "show", :preference_key => "key" }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/api/0.6/user/preferences/key", :method => :put },
|
||||
{ :controller => "api/user_preferences", :action => "update_one", :preference_key => "key" }
|
||||
{ :controller => "api/user_preferences", :action => "update", :preference_key => "key" }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/api/0.6/user/preferences/key", :method => :delete },
|
||||
{ :controller => "api/user_preferences", :action => "delete_one", :preference_key => "key" }
|
||||
{ :controller => "api/user_preferences", :action => "destroy", :preference_key => "key" }
|
||||
)
|
||||
end
|
||||
|
||||
##
|
||||
# test read action
|
||||
def test_read
|
||||
# test showing all preferences
|
||||
def test_index
|
||||
# first try without auth
|
||||
get :read
|
||||
get :index
|
||||
assert_response :unauthorized, "should be authenticated"
|
||||
|
||||
# authenticate as a user with no preferences
|
||||
basic_authorization create(:user).email, "test"
|
||||
|
||||
# try the read again
|
||||
get :read
|
||||
get :index
|
||||
assert_select "osm" do
|
||||
assert_select "preferences", :count => 1 do
|
||||
assert_select "preference", :count => 0
|
||||
|
@ -52,7 +52,7 @@ module Api
|
|||
basic_authorization user.email, "test"
|
||||
|
||||
# try the read again
|
||||
get :read
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_equal "application/xml", @response.content_type
|
||||
assert_select "osm" do
|
||||
|
@ -65,39 +65,39 @@ module Api
|
|||
end
|
||||
|
||||
##
|
||||
# test read_one action
|
||||
def test_read_one
|
||||
# test showing one preference
|
||||
def test_show
|
||||
user = create(:user)
|
||||
create(:user_preference, :user => user, :k => "key", :v => "value")
|
||||
|
||||
# try a read without auth
|
||||
get :read_one, :params => { :preference_key => "key" }
|
||||
get :show, :params => { :preference_key => "key" }
|
||||
assert_response :unauthorized, "should be authenticated"
|
||||
|
||||
# authenticate as a user with preferences
|
||||
basic_authorization user.email, "test"
|
||||
|
||||
# try the read again
|
||||
get :read_one, :params => { :preference_key => "key" }
|
||||
get :show, :params => { :preference_key => "key" }
|
||||
assert_response :success
|
||||
assert_equal "text/plain", @response.content_type
|
||||
assert_equal "value", @response.body
|
||||
|
||||
# try the read again for a non-existent key
|
||||
get :read_one, :params => { :preference_key => "unknown_key" }
|
||||
get :show, :params => { :preference_key => "unknown_key" }
|
||||
assert_response :not_found
|
||||
end
|
||||
|
||||
##
|
||||
# test update action
|
||||
def test_update
|
||||
# test bulk update action
|
||||
def test_update_all
|
||||
user = create(:user)
|
||||
create(:user_preference, :user => user, :k => "key", :v => "value")
|
||||
create(:user_preference, :user => user, :k => "some_key", :v => "some_value")
|
||||
|
||||
# try a put without auth
|
||||
assert_no_difference "UserPreference.count" do
|
||||
put :update, :body => "<osm><preferences><preference k='key' v='new_value'/><preference k='new_key' v='value'/></preferences></osm>"
|
||||
put :update_all, :body => "<osm><preferences><preference k='key' v='new_value'/><preference k='new_key' v='value'/></preferences></osm>"
|
||||
end
|
||||
assert_response :unauthorized, "should be authenticated"
|
||||
assert_equal "value", UserPreference.find([user.id, "key"]).v
|
||||
|
@ -111,7 +111,7 @@ module Api
|
|||
|
||||
# try the put again
|
||||
assert_no_difference "UserPreference.count" do
|
||||
put :update, :body => "<osm><preferences><preference k='key' v='new_value'/><preference k='new_key' v='value'/></preferences></osm>"
|
||||
put :update_all, :body => "<osm><preferences><preference k='key' v='new_value'/><preference k='new_key' v='value'/></preferences></osm>"
|
||||
end
|
||||
assert_response :success
|
||||
assert_equal "text/plain", @response.content_type
|
||||
|
@ -124,7 +124,7 @@ module Api
|
|||
|
||||
# try a put with duplicate keys
|
||||
assert_no_difference "UserPreference.count" do
|
||||
put :update, :body => "<osm><preferences><preference k='key' v='value'/><preference k='key' v='newer_value'/></preferences></osm>"
|
||||
put :update_all, :body => "<osm><preferences><preference k='key' v='value'/><preference k='key' v='newer_value'/></preferences></osm>"
|
||||
end
|
||||
assert_response :bad_request
|
||||
assert_equal "text/plain", @response.content_type
|
||||
|
@ -133,20 +133,20 @@ module Api
|
|||
|
||||
# try a put with invalid content
|
||||
assert_no_difference "UserPreference.count" do
|
||||
put :update, :body => "nonsense"
|
||||
put :update_all, :body => "nonsense"
|
||||
end
|
||||
assert_response :bad_request
|
||||
end
|
||||
|
||||
##
|
||||
# test update_one action
|
||||
def test_update_one
|
||||
# test update action
|
||||
def test_update
|
||||
user = create(:user)
|
||||
create(:user_preference, :user => user)
|
||||
|
||||
# try a put without auth
|
||||
assert_no_difference "UserPreference.count" do
|
||||
put :update_one, :params => { :preference_key => "new_key" }, :body => "new_value"
|
||||
put :update, :params => { :preference_key => "new_key" }, :body => "new_value"
|
||||
end
|
||||
assert_response :unauthorized, "should be authenticated"
|
||||
assert_raises ActiveRecord::RecordNotFound do
|
||||
|
@ -158,7 +158,7 @@ module Api
|
|||
|
||||
# try adding a new preference
|
||||
assert_difference "UserPreference.count", 1 do
|
||||
put :update_one, :params => { :preference_key => "new_key" }, :body => "new_value"
|
||||
put :update, :params => { :preference_key => "new_key" }, :body => "new_value"
|
||||
end
|
||||
assert_response :success
|
||||
assert_equal "text/plain", @response.content_type
|
||||
|
@ -167,7 +167,7 @@ module Api
|
|||
|
||||
# try changing the value of a preference
|
||||
assert_no_difference "UserPreference.count" do
|
||||
put :update_one, :params => { :preference_key => "new_key" }, :body => "newer_value"
|
||||
put :update, :params => { :preference_key => "new_key" }, :body => "newer_value"
|
||||
end
|
||||
assert_response :success
|
||||
assert_equal "text/plain", @response.content_type
|
||||
|
@ -176,14 +176,14 @@ module Api
|
|||
end
|
||||
|
||||
##
|
||||
# test delete_one action
|
||||
def test_delete_one
|
||||
# test destroy action
|
||||
def test_destroy
|
||||
user = create(:user)
|
||||
create(:user_preference, :user => user, :k => "key", :v => "value")
|
||||
|
||||
# try a delete without auth
|
||||
assert_no_difference "UserPreference.count" do
|
||||
delete :delete_one, :params => { :preference_key => "key" }
|
||||
delete :destroy, :params => { :preference_key => "key" }
|
||||
end
|
||||
assert_response :unauthorized, "should be authenticated"
|
||||
assert_equal "value", UserPreference.find([user.id, "key"]).v
|
||||
|
@ -193,7 +193,7 @@ module Api
|
|||
|
||||
# try the delete again
|
||||
assert_difference "UserPreference.count", -1 do
|
||||
get :delete_one, :params => { :preference_key => "key" }
|
||||
get :destroy, :params => { :preference_key => "key" }
|
||||
end
|
||||
assert_response :success
|
||||
assert_equal "text/plain", @response.content_type
|
||||
|
@ -204,7 +204,7 @@ module Api
|
|||
|
||||
# try the delete again for the same key
|
||||
assert_no_difference "UserPreference.count" do
|
||||
get :delete_one, :params => { :preference_key => "key" }
|
||||
get :destroy, :params => { :preference_key => "key" }
|
||||
end
|
||||
assert_response :not_found
|
||||
assert_raises ActiveRecord::RecordNotFound do
|
||||
|
@ -214,7 +214,7 @@ module Api
|
|||
|
||||
# Ensure that a valid access token with correct capabilities can be used to
|
||||
# read preferences
|
||||
def test_read_one_using_token
|
||||
def test_show_using_token
|
||||
user = create(:user)
|
||||
token = create(:access_token, :user => user, :allow_read_prefs => true)
|
||||
create(:user_preference, :user => user, :k => "key", :v => "value")
|
||||
|
@ -224,14 +224,14 @@ module Api
|
|||
@request.env["oauth.strategies"] = [:token]
|
||||
@request.env["oauth.token"] = token
|
||||
|
||||
get :read_one, :params => { :preference_key => "key" }
|
||||
get :show, :params => { :preference_key => "key" }
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
# Ensure that a valid access token with incorrect capabilities can't be used
|
||||
# to read preferences even, though the owner of that token could read them
|
||||
# by other methods.
|
||||
def test_read_one_using_token_fail
|
||||
def test_show_using_token_fail
|
||||
user = create(:user)
|
||||
token = create(:access_token, :user => user, :allow_read_prefs => false)
|
||||
create(:user_preference, :user => user, :k => "key", :v => "value")
|
||||
|
@ -239,7 +239,7 @@ module Api
|
|||
@request.env["oauth.strategies"] = [:token]
|
||||
@request.env["oauth.token"] = token
|
||||
|
||||
get :read_one, :params => { :preference_key => "key" }
|
||||
get :show, :params => { :preference_key => "key" }
|
||||
assert_response :forbidden
|
||||
end
|
||||
end
|
||||
|
|
|
@ -290,17 +290,17 @@ module Api
|
|||
assert_response :forbidden
|
||||
|
||||
# try to delete with an invalid (closed) changeset
|
||||
xml = update_changeset(private_way.to_xml, private_closed_changeset.id)
|
||||
xml = update_changeset(xml_for_way(private_way), private_closed_changeset.id)
|
||||
delete :delete, :params => { :id => private_way.id }, :body => xml.to_s
|
||||
assert_response :forbidden
|
||||
|
||||
# try to delete with an invalid (non-existent) changeset
|
||||
xml = update_changeset(private_way.to_xml, 0)
|
||||
xml = update_changeset(xml_for_way(private_way), 0)
|
||||
delete :delete, :params => { :id => private_way.id }, :body => xml.to_s
|
||||
assert_response :forbidden
|
||||
|
||||
# Now try with a valid changeset
|
||||
xml = private_way.to_xml
|
||||
xml = xml_for_way(private_way)
|
||||
delete :delete, :params => { :id => private_way.id }, :body => xml.to_s
|
||||
assert_response :forbidden
|
||||
|
||||
|
@ -311,12 +311,12 @@ module Api
|
|||
# "delete request should return a new version number for way"
|
||||
|
||||
# this won't work since the way is already deleted
|
||||
xml = private_deleted_way.to_xml
|
||||
xml = xml_for_way(private_deleted_way)
|
||||
delete :delete, :params => { :id => private_deleted_way.id }, :body => xml.to_s
|
||||
assert_response :forbidden
|
||||
|
||||
# this shouldn't work as the way is used in a relation
|
||||
xml = private_used_way.to_xml
|
||||
xml = xml_for_way(private_used_way)
|
||||
delete :delete, :params => { :id => private_used_way.id }, :body => xml.to_s
|
||||
assert_response :forbidden,
|
||||
"shouldn't be able to delete a way used in a relation (#{@response.body}), when done by a private user"
|
||||
|
@ -339,17 +339,17 @@ module Api
|
|||
assert_response :bad_request
|
||||
|
||||
# try to delete with an invalid (closed) changeset
|
||||
xml = update_changeset(way.to_xml, closed_changeset.id)
|
||||
xml = update_changeset(xml_for_way(way), closed_changeset.id)
|
||||
delete :delete, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :conflict
|
||||
|
||||
# try to delete with an invalid (non-existent) changeset
|
||||
xml = update_changeset(way.to_xml, 0)
|
||||
xml = update_changeset(xml_for_way(way), 0)
|
||||
delete :delete, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :conflict
|
||||
|
||||
# Now try with a valid changeset
|
||||
xml = way.to_xml
|
||||
xml = xml_for_way(way)
|
||||
delete :delete, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :success
|
||||
|
||||
|
@ -360,12 +360,12 @@ module Api
|
|||
"delete request should return a new version number for way"
|
||||
|
||||
# this won't work since the way is already deleted
|
||||
xml = deleted_way.to_xml
|
||||
xml = xml_for_way(deleted_way)
|
||||
delete :delete, :params => { :id => deleted_way.id }, :body => xml.to_s
|
||||
assert_response :gone
|
||||
|
||||
# this shouldn't work as the way is used in a relation
|
||||
xml = used_way.to_xml
|
||||
xml = xml_for_way(used_way)
|
||||
delete :delete, :params => { :id => used_way.id }, :body => xml.to_s
|
||||
assert_response :precondition_failed,
|
||||
"shouldn't be able to delete a way used in a relation (#{@response.body})"
|
||||
|
@ -390,7 +390,7 @@ module Api
|
|||
|
||||
## First test with no user credentials
|
||||
# try and update a way without authorisation
|
||||
xml = way.to_xml
|
||||
xml = xml_for_way(way)
|
||||
put :update, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :unauthorized
|
||||
|
||||
|
@ -402,33 +402,33 @@ module Api
|
|||
## trying to break changesets
|
||||
|
||||
# try and update in someone else's changeset
|
||||
xml = update_changeset(private_way.to_xml,
|
||||
xml = update_changeset(xml_for_way(private_way),
|
||||
create(:changeset).id)
|
||||
put :update, :params => { :id => private_way.id }, :body => xml.to_s
|
||||
assert_require_public_data "update with other user's changeset should be forbidden when date isn't public"
|
||||
|
||||
# try and update in a closed changeset
|
||||
xml = update_changeset(private_way.to_xml,
|
||||
xml = update_changeset(xml_for_way(private_way),
|
||||
create(:changeset, :closed, :user => private_user).id)
|
||||
put :update, :params => { :id => private_way.id }, :body => xml.to_s
|
||||
assert_require_public_data "update with closed changeset should be forbidden, when data isn't public"
|
||||
|
||||
# try and update in a non-existant changeset
|
||||
xml = update_changeset(private_way.to_xml, 0)
|
||||
xml = update_changeset(xml_for_way(private_way), 0)
|
||||
put :update, :params => { :id => private_way.id }, :body => xml.to_s
|
||||
assert_require_public_data("update with changeset=0 should be forbidden, when data isn't public")
|
||||
|
||||
## try and submit invalid updates
|
||||
xml = xml_replace_node(private_way.to_xml, node.id, 9999)
|
||||
xml = xml_replace_node(xml_for_way(private_way), node.id, 9999)
|
||||
put :update, :params => { :id => private_way.id }, :body => xml.to_s
|
||||
assert_require_public_data "way with non-existent node should be forbidden, when data isn't public"
|
||||
|
||||
xml = xml_replace_node(private_way.to_xml, node.id, create(:node, :deleted).id)
|
||||
xml = xml_replace_node(xml_for_way(private_way), node.id, create(:node, :deleted).id)
|
||||
put :update, :params => { :id => private_way.id }, :body => xml.to_s
|
||||
assert_require_public_data "way with deleted node should be forbidden, when data isn't public"
|
||||
|
||||
## finally, produce a good request which will still not work
|
||||
xml = private_way.to_xml
|
||||
xml = xml_for_way(private_way)
|
||||
put :update, :params => { :id => private_way.id }, :body => xml.to_s
|
||||
assert_require_public_data "should have failed with a forbidden when data isn't public"
|
||||
|
||||
|
@ -440,28 +440,28 @@ module Api
|
|||
## trying to break changesets
|
||||
|
||||
# try and update in someone else's changeset
|
||||
xml = update_changeset(way.to_xml,
|
||||
xml = update_changeset(xml_for_way(way),
|
||||
create(:changeset).id)
|
||||
put :update, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :conflict, "update with other user's changeset should be rejected"
|
||||
|
||||
# try and update in a closed changeset
|
||||
xml = update_changeset(way.to_xml,
|
||||
xml = update_changeset(xml_for_way(way),
|
||||
create(:changeset, :closed, :user => user).id)
|
||||
put :update, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :conflict, "update with closed changeset should be rejected"
|
||||
|
||||
# try and update in a non-existant changeset
|
||||
xml = update_changeset(way.to_xml, 0)
|
||||
xml = update_changeset(xml_for_way(way), 0)
|
||||
put :update, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :conflict, "update with changeset=0 should be rejected"
|
||||
|
||||
## try and submit invalid updates
|
||||
xml = xml_replace_node(way.to_xml, node.id, 9999)
|
||||
xml = xml_replace_node(xml_for_way(way), node.id, 9999)
|
||||
put :update, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :precondition_failed, "way with non-existent node should be rejected"
|
||||
|
||||
xml = xml_replace_node(way.to_xml, node.id, create(:node, :deleted).id)
|
||||
xml = xml_replace_node(xml_for_way(way), node.id, create(:node, :deleted).id)
|
||||
put :update, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :precondition_failed, "way with deleted node should be rejected"
|
||||
|
||||
|
@ -469,26 +469,26 @@ module Api
|
|||
current_way_version = way.version
|
||||
|
||||
# try and submit a version behind
|
||||
xml = xml_attr_rewrite(way.to_xml,
|
||||
xml = xml_attr_rewrite(xml_for_way(way),
|
||||
"version", current_way_version - 1)
|
||||
put :update, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :conflict, "should have failed on old version number"
|
||||
|
||||
# try and submit a version ahead
|
||||
xml = xml_attr_rewrite(way.to_xml,
|
||||
xml = xml_attr_rewrite(xml_for_way(way),
|
||||
"version", current_way_version + 1)
|
||||
put :update, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :conflict, "should have failed on skipped version number"
|
||||
|
||||
# try and submit total crap in the version field
|
||||
xml = xml_attr_rewrite(way.to_xml,
|
||||
xml = xml_attr_rewrite(xml_for_way(way),
|
||||
"version", "p1r4t3s!")
|
||||
put :update, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :conflict,
|
||||
"should not be able to put 'p1r4at3s!' in the version field"
|
||||
|
||||
## try an update with the wrong ID
|
||||
xml = create(:way).to_xml
|
||||
xml = xml_for_way(create(:way))
|
||||
put :update, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :bad_request,
|
||||
"should not be able to update a way with a different ID from the XML"
|
||||
|
@ -500,7 +500,7 @@ module Api
|
|||
"should not be able to update a way with non-OSM XML doc."
|
||||
|
||||
## finally, produce a good request which should work
|
||||
xml = way.to_xml
|
||||
xml = xml_for_way(way)
|
||||
put :update, :params => { :id => way.id }, :body => xml.to_s
|
||||
assert_response :success, "a valid update request failed"
|
||||
end
|
||||
|
@ -527,7 +527,7 @@ module Api
|
|||
tag_xml["v"] = "yes"
|
||||
|
||||
# add the tag into the existing xml
|
||||
way_xml = private_way.to_xml
|
||||
way_xml = xml_for_way(private_way)
|
||||
way_xml.find("//osm/way").first << tag_xml
|
||||
|
||||
# try and upload it
|
||||
|
@ -545,7 +545,7 @@ module Api
|
|||
tag_xml["v"] = "yes"
|
||||
|
||||
# add the tag into the existing xml
|
||||
way_xml = way.to_xml
|
||||
way_xml = xml_for_way(way)
|
||||
way_xml.find("//osm/way").first << tag_xml
|
||||
|
||||
# try and upload it
|
||||
|
@ -575,7 +575,7 @@ module Api
|
|||
tag_xml["v"] = private_existing_tag.v
|
||||
|
||||
# add the tag into the existing xml
|
||||
way_xml = private_way.to_xml
|
||||
way_xml = xml_for_way(private_way)
|
||||
way_xml.find("//osm/way").first << tag_xml
|
||||
|
||||
# try and upload it
|
||||
|
@ -593,7 +593,7 @@ module Api
|
|||
tag_xml["v"] = existing_tag.v
|
||||
|
||||
# add the tag into the existing xml
|
||||
way_xml = way.to_xml
|
||||
way_xml = xml_for_way(way)
|
||||
way_xml.find("//osm/way").first << tag_xml
|
||||
|
||||
# try and upload it
|
||||
|
@ -621,7 +621,7 @@ module Api
|
|||
tag_xml["v"] = "foobar"
|
||||
|
||||
# add the tag into the existing xml
|
||||
way_xml = private_way.to_xml
|
||||
way_xml = xml_for_way(private_way)
|
||||
|
||||
# add two copies of the tag
|
||||
way_xml.find("//osm/way").first << tag_xml.copy(true) << tag_xml
|
||||
|
@ -641,7 +641,7 @@ module Api
|
|||
tag_xml["v"] = "foobar"
|
||||
|
||||
# add the tag into the existing xml
|
||||
way_xml = way.to_xml
|
||||
way_xml = xml_for_way(way)
|
||||
|
||||
# add two copies of the tag
|
||||
way_xml.find("//osm/way").first << tag_xml.copy(true) << tag_xml
|
||||
|
|
|
@ -48,6 +48,9 @@ class BrowseTagsHelperTest < ActionView::TestCase
|
|||
html = format_value("name:etymology:wikidata", "Q123")
|
||||
assert_dom_equal "<a title=\"The Q123 item on Wikidata\" href=\"//www.wikidata.org/entity/Q123?uselang=en\">Q123</a>", html
|
||||
|
||||
html = format_value("wikimedia_commons", "File:Test.jpg")
|
||||
assert_dom_equal "<a title=\"The File:Test.jpg item on Wikimedia Commons\" href=\"//commons.wikimedia.org/wiki/File:Test.jpg?uselang=en\">File:Test.jpg</a>", html
|
||||
|
||||
html = format_value("colour", "#f00")
|
||||
assert_dom_equal %(<span class="colour-preview-box" data-colour="#f00" title="Colour #f00 preview"></span>#f00), html
|
||||
end
|
||||
|
@ -190,6 +193,34 @@ class BrowseTagsHelperTest < ActionView::TestCase
|
|||
assert_nil link
|
||||
end
|
||||
|
||||
def test_wikimedia_commons_link
|
||||
link = wikimedia_commons_link("wikimedia_commons", "http://commons.wikimedia.org/wiki/File:Full%20URL.jpg")
|
||||
assert_nil link
|
||||
|
||||
link = wikimedia_commons_link("wikimedia_commons", "https://commons.wikimedia.org/wiki/File:Full%20URL.jpg")
|
||||
assert_nil link
|
||||
|
||||
link = wikimedia_commons_link("wikimedia_commons", "Test.jpg")
|
||||
assert_nil link
|
||||
|
||||
link = wikimedia_commons_link("wikimedia_commons", "File:Test.jpg")
|
||||
assert_equal "//commons.wikimedia.org/wiki/File:Test.jpg?uselang=en", link[:url]
|
||||
assert_equal "File:Test.jpg", link[:title]
|
||||
|
||||
link = wikimedia_commons_link("wikimedia_commons", "Category:Test_Category")
|
||||
assert_equal "//commons.wikimedia.org/wiki/Category:Test_Category?uselang=en", link[:url]
|
||||
assert_equal "Category:Test_Category", link[:title]
|
||||
|
||||
I18n.locale = "pt-BR"
|
||||
|
||||
link = wikimedia_commons_link("wikimedia_commons", "File:Test.jpg")
|
||||
assert_equal "//commons.wikimedia.org/wiki/File:Test.jpg?uselang=pt-BR", link[:url]
|
||||
assert_equal "File:Test.jpg", link[:title]
|
||||
|
||||
link = wikimedia_commons_link("foo", "Test")
|
||||
assert_nil link
|
||||
end
|
||||
|
||||
def test_telephone_links
|
||||
links = telephone_links("foo", "Test")
|
||||
assert_nil links
|
||||
|
|
|
@ -68,14 +68,6 @@ class NodeTest < ActiveSupport::TestCase
|
|||
assert_in_delta 76.543 * OldNode::SCALE, node.longitude, 0.000001
|
||||
end
|
||||
|
||||
# Ensure the lat/lon is formatted as a decimal e.g. not 4.0e-05
|
||||
def test_lat_lon_xml_format
|
||||
node = build(:node, :latitude => 0.00004 * OldNode::SCALE, :longitude => 0.00008 * OldNode::SCALE)
|
||||
|
||||
assert_match(/lat="0.0000400"/, node.to_xml.to_s)
|
||||
assert_match(/lon="0.0000800"/, node.to_xml.to_s)
|
||||
end
|
||||
|
||||
# Check that you can create a node and store it
|
||||
def test_create
|
||||
changeset = create(:changeset)
|
||||
|
|
|
@ -170,5 +170,87 @@ module ActiveSupport
|
|||
fill_in "password", :with => "test"
|
||||
click_on "Login", :match => :first
|
||||
end
|
||||
|
||||
def xml_for_node(node)
|
||||
doc = OSM::API.new.get_xml_doc
|
||||
doc.root << xml_node_for_node(node)
|
||||
doc
|
||||
end
|
||||
|
||||
def xml_node_for_node(node)
|
||||
el = XML::Node.new "node"
|
||||
el["id"] = node.id.to_s
|
||||
|
||||
OMHelper.add_metadata_to_xml_node(el, node, {}, {})
|
||||
|
||||
if node.visible?
|
||||
el["lat"] = node.lat.to_s
|
||||
el["lon"] = node.lon.to_s
|
||||
end
|
||||
|
||||
OMHelper.add_tags_to_xml_node(el, node.node_tags)
|
||||
|
||||
el
|
||||
end
|
||||
|
||||
def xml_for_way(way)
|
||||
doc = OSM::API.new.get_xml_doc
|
||||
doc.root << xml_node_for_way(way)
|
||||
doc
|
||||
end
|
||||
|
||||
def xml_node_for_way(way)
|
||||
el = XML::Node.new "way"
|
||||
el["id"] = way.id.to_s
|
||||
|
||||
OMHelper.add_metadata_to_xml_node(el, way, {}, {})
|
||||
|
||||
# make sure nodes are output in sequence_id order
|
||||
ordered_nodes = []
|
||||
way.way_nodes.each do |nd|
|
||||
ordered_nodes[nd.sequence_id] = nd.node_id.to_s if nd.node&.visible?
|
||||
end
|
||||
|
||||
ordered_nodes.each do |nd_id|
|
||||
next unless nd_id && nd_id != "0"
|
||||
|
||||
node_el = XML::Node.new "nd"
|
||||
node_el["ref"] = nd_id
|
||||
el << node_el
|
||||
end
|
||||
|
||||
OMHelper.add_tags_to_xml_node(el, way.way_tags)
|
||||
|
||||
el
|
||||
end
|
||||
|
||||
def xml_for_relation(relation)
|
||||
doc = OSM::API.new.get_xml_doc
|
||||
doc.root << xml_node_for_relation(relation)
|
||||
doc
|
||||
end
|
||||
|
||||
def xml_node_for_relation(relation)
|
||||
el = XML::Node.new "relation"
|
||||
el["id"] = relation.id.to_s
|
||||
|
||||
OMHelper.add_metadata_to_xml_node(el, relation, {}, {})
|
||||
|
||||
relation.relation_members.each do |member|
|
||||
member_el = XML::Node.new "member"
|
||||
member_el["type"] = member.member_type.downcase
|
||||
member_el["ref"] = member.member_id.to_s
|
||||
member_el["role"] = member.member_role
|
||||
el << member_el
|
||||
end
|
||||
|
||||
OMHelper.add_tags_to_xml_node(el, relation.relation_tags)
|
||||
|
||||
el
|
||||
end
|
||||
|
||||
class OMHelper
|
||||
extend ObjectMetadata
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|