This commit is contained in:
Mayank Tankhiwale 2019-11-23 20:32:47 +05:30
commit 11cd1c9fc1
93 changed files with 1266 additions and 846 deletions

View file

@ -1,12 +1,12 @@
# This configuration was generated by # This configuration was generated by
# `rubocop --auto-gen-config` # `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 # The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base. # one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new # Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again. # versions of RuboCop, may require this file to be generated again.
# Offense count: 34 # Offense count: 35
# Configuration parameters: AllowSafeAssignment. # Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition: Lint/AssignmentInCondition:
Exclude: Exclude:
@ -32,7 +32,7 @@ Lint/HandleExceptions:
- 'app/controllers/api/amf_controller.rb' - 'app/controllers/api/amf_controller.rb'
- 'app/controllers/users_controller.rb' - 'app/controllers/users_controller.rb'
# Offense count: 700 # Offense count: 701
Metrics/AbcSize: Metrics/AbcSize:
Max: 189 Max: 189
@ -52,11 +52,11 @@ Metrics/BlockNesting:
Metrics/ClassLength: Metrics/ClassLength:
Max: 645 Max: 645
# Offense count: 73 # Offense count: 74
Metrics/CyclomaticComplexity: Metrics/CyclomaticComplexity:
Max: 22 Max: 22
# Offense count: 721 # Offense count: 722
# Configuration parameters: CountComments, ExcludedMethods. # Configuration parameters: CountComments, ExcludedMethods.
Metrics/MethodLength: Metrics/MethodLength:
Max: 179 Max: 179
@ -64,14 +64,14 @@ Metrics/MethodLength:
# Offense count: 2 # Offense count: 2
# Configuration parameters: CountComments. # Configuration parameters: CountComments.
Metrics/ModuleLength: Metrics/ModuleLength:
Max: 107 Max: 117
# Offense count: 4 # Offense count: 4
# Configuration parameters: CountKeywordArgs. # Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists: Metrics/ParameterLists:
Max: 9 Max: 9
# Offense count: 71 # Offense count: 72
Metrics/PerceivedComplexity: Metrics/PerceivedComplexity:
Max: 25 Max: 25
@ -209,7 +209,7 @@ Style/IfUnlessModifier:
Style/NumericLiterals: Style/NumericLiterals:
MinDigits: 11 MinDigits: 11
# Offense count: 3330 # Offense count: 3338
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https # URISchemes: http, https

View file

@ -28,8 +28,7 @@ gem "coffee-rails", "~> 4.2"
gem "jquery-rails" gem "jquery-rails"
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.0' gem "jbuilder", "~> 2.7"
gem "jsonify-rails"
# Reduces boot times through caching; required in config/boot.rb # Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", ">= 1.1.0", :require => false gem "bootsnap", ">= 1.1.0", :require => false

View file

@ -53,25 +53,25 @@ GEM
tzinfo (~> 1.1) tzinfo (~> 1.1)
addressable (2.7.0) addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0) public_suffix (>= 2.0.2, < 5.0)
annotate (3.0.2) annotate (3.0.3)
activerecord (>= 3.2, < 7.0) activerecord (>= 3.2, < 7.0)
rake (>= 10.4, < 13.0) rake (>= 10.4, < 14.0)
arel (9.0.0) arel (9.0.0)
ast (2.4.0) ast (2.4.0)
autoprefixer-rails (8.6.5) autoprefixer-rails (8.6.5)
execjs execjs
aws-eventstream (1.0.3) aws-eventstream (1.0.3)
aws-partitions (1.230.0) aws-partitions (1.241.0)
aws-sdk-core (3.72.0) aws-sdk-core (3.79.0)
aws-eventstream (~> 1.0, >= 1.0.2) aws-eventstream (~> 1.0, >= 1.0.2)
aws-partitions (~> 1, >= 1.228.0) aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1) aws-sigv4 (~> 1.1)
jmespath (~> 1.0) jmespath (~> 1.0)
aws-sdk-kms (1.25.0) aws-sdk-kms (1.25.0)
aws-sdk-core (~> 3, >= 3.71.0) aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1) aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.52.0) aws-sdk-s3 (1.56.0)
aws-sdk-core (~> 3, >= 3.71.0) aws-sdk-core (~> 3, >= 3.77.0)
aws-sdk-kms (~> 1) aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1) aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.0) aws-sigv4 (1.1.0)
@ -93,7 +93,7 @@ GEM
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
bootsnap (1.4.5) bootsnap (1.4.5)
msgpack (~> 1.0) msgpack (~> 1.0)
browser (2.6.1) browser (2.7.0)
builder (3.2.3) builder (3.2.3)
bzip2-ffi (1.0.0) bzip2-ffi (1.0.0)
ffi (~> 1.0) ffi (~> 1.0)
@ -141,7 +141,7 @@ GEM
activerecord (>= 3.0, < 6.1) activerecord (>= 3.0, < 6.1)
delayed_job (>= 3.0, < 5) delayed_job (>= 3.0, < 5)
docile (1.3.2) docile (1.3.2)
dry-configurable (0.8.3) dry-configurable (0.9.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
dry-core (~> 0.4, >= 0.4.7) dry-core (~> 0.4, >= 0.4.7)
dry-container (0.7.2) dry-container (0.7.2)
@ -149,10 +149,10 @@ GEM
dry-configurable (~> 0.1, >= 0.1.3) dry-configurable (~> 0.1, >= 0.1.3)
dry-core (0.4.9) dry-core (0.4.9)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
dry-equalizer (0.2.2) dry-equalizer (0.3.0)
dry-inflector (0.2.0) dry-inflector (0.2.0)
dry-initializer (3.0.1) dry-initializer (3.0.2)
dry-logic (1.0.3) dry-logic (1.0.5)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
dry-core (~> 0.2) dry-core (~> 0.2)
dry-equalizer (~> 0.2) dry-equalizer (~> 0.2)
@ -164,7 +164,7 @@ GEM
dry-initializer (~> 3.0) dry-initializer (~> 3.0)
dry-logic (~> 1.0) dry-logic (~> 1.0)
dry-types (~> 1.2) dry-types (~> 1.2)
dry-types (1.2.0) dry-types (1.2.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
dry-container (~> 0.3) dry-container (~> 0.3)
dry-core (~> 0.4, >= 0.4.4) dry-core (~> 0.4, >= 0.4.4)
@ -190,7 +190,7 @@ GEM
fakefs (0.20.1) fakefs (0.20.1)
faraday (0.17.0) faraday (0.17.0)
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
ffi (1.11.1) ffi (1.11.2)
ffi-libarchive (0.4.10) ffi-libarchive (0.4.10)
ffi (~> 1.0) ffi (~> 1.0)
fspath (3.1.2) fspath (3.1.2)
@ -206,7 +206,7 @@ GEM
http_accept_language (2.0.5) http_accept_language (2.0.5)
i18n (0.9.5) i18n (0.9.5)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
i18n-js (3.4.0) i18n-js (3.5.0)
i18n (>= 0.6.6) i18n (>= 0.6.6)
image_optim (0.26.5) image_optim (0.26.5)
exifr (~> 1.2, >= 1.2.2) exifr (~> 1.2, >= 1.2.2)
@ -221,17 +221,14 @@ GEM
image_size (2.0.2) image_size (2.0.2)
in_threads (1.5.3) in_threads (1.5.3)
jaro_winkler (1.5.4) jaro_winkler (1.5.4)
jbuilder (2.9.1)
activesupport (>= 4.2.0)
jmespath (1.4.0) jmespath (1.4.0)
jquery-rails (4.3.5) jquery-rails (4.3.5)
rails-dom-testing (>= 1, < 3) rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0) railties (>= 4.2.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
json (2.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) jwt (2.2.1)
kgio (2.11.2) kgio (2.11.2)
kramdown (2.1.0) kramdown (2.1.0)
@ -262,9 +259,9 @@ GEM
multi_xml (0.6.0) multi_xml (0.6.0)
multipart-post (2.1.1) multipart-post (2.1.1)
nio4r (2.5.2) nio4r (2.5.2)
nokogiri (1.10.4) nokogiri (1.10.5)
mini_portile2 (~> 2.4.0) mini_portile2 (~> 2.4.0)
nokogumbo (2.0.1) nokogumbo (2.0.2)
nokogiri (~> 1.8, >= 1.8.4) nokogiri (~> 1.8, >= 1.8.4)
oauth (0.4.7) oauth (0.4.7)
oauth-plugin (0.5.1) oauth-plugin (0.5.1)
@ -306,7 +303,7 @@ GEM
multi_json (~> 1.12) multi_json (~> 1.12)
omniauth-oauth2 (~> 1.4) omniauth-oauth2 (~> 1.4)
openstreetmap-deadlock_retry (1.3.0) openstreetmap-deadlock_retry (1.3.0)
parallel (1.18.0) parallel (1.19.0)
parser (2.6.5.0) parser (2.6.5.0)
ast (~> 2.4.0) ast (~> 2.4.0)
pg (1.1.4) pg (1.1.4)
@ -321,7 +318,8 @@ GEM
quad_tile (1.0.1) quad_tile (1.0.1)
r2 (0.2.7) r2 (0.2.7)
rack (2.0.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-openid (1.3.1)
rack (>= 1.1.0) rack (>= 1.1.0)
ruby-openid (>= 2.1.8) ruby-openid (>= 2.1.8)
@ -360,7 +358,7 @@ GEM
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0) thor (>= 0.19.0, < 2.0)
rainbow (3.0.0) rainbow (3.0.0)
rake (12.3.3) rake (13.0.1)
rb-fsevent (0.10.3) rb-fsevent (0.10.3)
rb-inotify (0.10.0) rb-inotify (0.10.0)
ffi (~> 1.0) ffi (~> 1.0)
@ -378,7 +376,7 @@ GEM
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 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 (>= 0.71.0)
rubocop-rails (2.3.2) rubocop-rails (2.3.2)
rack (>= 1.1) rack (>= 1.1)
@ -419,7 +417,7 @@ GEM
thor (0.20.3) thor (0.20.3)
thread_safe (0.3.6) thread_safe (0.3.6)
tilt (2.0.10) tilt (2.0.10)
tins (1.22.0) tins (1.22.2)
tzinfo (1.2.5) tzinfo (1.2.5)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (4.2.0) uglifier (4.2.0)
@ -477,9 +475,9 @@ DEPENDENCIES
http_accept_language (~> 2.0.0) http_accept_language (~> 2.0.0)
i18n-js (>= 3.0.0) i18n-js (>= 3.0.0)
image_optim_rails image_optim_rails
jbuilder (~> 2.7)
jquery-rails jquery-rails
json json
jsonify-rails
kgio kgio
kramdown kramdown
libxml-ruby (>= 2.0.5) libxml-ruby (>= 2.0.5)

View file

@ -34,7 +34,7 @@ class ApiAbility
can [:new, :create], Report can [:new, :create], Report
can [:create, :show, :update, :destroy, :data], Trace can [:create, :show, :update, :destroy, :data], Trace
can [:details, :gpx_files], User 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? if user.terms_agreed?
can [:create, :update, :upload, :close, :subscribe, :unsubscribe, :expand_bbox], Changeset can [:create, :update, :upload, :close, :subscribe, :unsubscribe, :expand_bbox], Changeset

View file

@ -10,8 +10,8 @@ class ApiCapability
can [:create, :update, :destroy], Trace if capability?(token, :allow_write_gpx) can [:create, :update, :destroy], Trace if capability?(token, :allow_write_gpx)
can [:details], User if capability?(token, :allow_read_prefs) can [:details], User if capability?(token, :allow_read_prefs)
can [:gpx_files], User if capability?(token, :allow_read_gpx) can [:gpx_files], User if capability?(token, :allow_read_gpx)
can [:read, :read_one], UserPreference if capability?(token, :allow_read_prefs) can [:index, :show], UserPreference if capability?(token, :allow_read_prefs)
can [:update, :update_one, :delete_one], UserPreference if capability?(token, :allow_write_prefs) can [:update, :update_all, :destroy], UserPreference if capability?(token, :allow_write_prefs)
if token&.user&.terms_agreed? if token&.user&.terms_agreed?
can [:create, :update, :upload, :close, :subscribe, :unsubscribe, :expand_bbox], Changeset if capability?(token, :allow_write_api) can [:create, :update, :upload, :close, :subscribe, :unsubscribe, :expand_bbox], Changeset if capability?(token, :allow_write_api)

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

After

Width:  |  Height:  |  Size: 112 B

Before After
Before After

View file

@ -121,7 +121,7 @@
.shop.shoes::before { content: image-url('browse/shop_shoes.16.png'); } .shop.shoes::before { content: image-url('browse/shop_shoes.16.png'); }
.shop.supermarket::before { content: image-url('browse/shop_supermarket.p.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.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.caravan_site::before { content: image-url('browse/tourism_caravan_site.16.png'); }
.tourism.hostel::before { content: image-url('browse/tourism_hostel.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.museum::before { content: image-url('browse/tourism_museum.16.png'); }
.tourism.picnic_site::before { content: image-url('browse/tourism_picnic_site.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.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 */ /* Ways */
@ -184,6 +185,7 @@
.natural.grassland::before { content: image-url('browse/grassland.png'); } .natural.grassland::before { content: image-url('browse/grassland.png'); }
.natural.heath::before { content: image-url('browse/heathland.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.water::before { content: image-url('browse/lake.png'); }
.natural.wood::before { content: image-url('browse/wood.png'); } .natural.wood::before { content: image-url('browse/wood.png'); }

View file

@ -9,31 +9,22 @@ module Api
## ##
# return all the preferences as an XML document # return all the preferences as an XML document
def read def index
doc = OSM::API.new.get_xml_doc @user_preferences = current_user.preferences
prefs = current_user.preferences render :formats => [:xml]
el1 = XML::Node.new "preferences"
prefs.each do |pref|
el1 << pref.to_xml_node
end
doc.root << el1
render :xml => doc.to_s
end end
## ##
# return the value for a single preference # return the value for a single preference
def read_one def show
pref = UserPreference.find([current_user.id, params[:preference_key]]) pref = UserPreference.find([current_user.id, params[:preference_key]])
render :plain => pref.v.to_s render :plain => pref.v.to_s
end end
# update the entire set of preferences # update the entire set of preferences
def update def update_all
old_preferences = current_user.preferences.each_with_object({}) do |preference, preferences| old_preferences = current_user.preferences.each_with_object({}) do |preference, preferences|
preferences[preference.k] = preference preferences[preference.k] = preference
end end
@ -63,7 +54,7 @@ module Api
## ##
# update the value of a single preference # update the value of a single preference
def update_one def update
begin begin
pref = UserPreference.find([current_user.id, params[:preference_key]]) pref = UserPreference.find([current_user.id, params[:preference_key]])
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
@ -80,7 +71,7 @@ module Api
## ##
# delete a single preference # delete a single preference
def delete_one def destroy
UserPreference.find([current_user.id, params[:preference_key]]).delete UserPreference.find([current_user.id, params[:preference_key]]).delete
render :plain => "" render :plain => ""

View file

@ -17,6 +17,8 @@ module BrowseTagsHelper
link_to(w[:title], w[:url], :title => t("browse.tag_details.wikidata_link", :page => w[:title].strip)) link_to(w[:title], w[:url], :title => t("browse.tag_details.wikidata_link", :page => w[:title].strip))
end end
safe_join(wdt, ";") 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}") elsif url = wiki_link("tag", "#{key}=#{value}")
link_to h(value), url, :title => t("browse.tag_details.wiki_link.tag", :key => key, :value => value) link_to h(value), url, :title => t("browse.tag_details.wiki_link.tag", :key => key, :value => value)
elsif phones = telephone_links(key, value) elsif phones = telephone_links(key, value)
@ -111,6 +113,16 @@ module BrowseTagsHelper
nil nil
end 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) def telephone_links(_key, value)
# Does it look like a global phone number? eg "+1 (234) 567-8901 " # Does it look like a global phone number? eg "+1 (234) 567-8901 "
# or a list of alternate numbers separated by ; # or a list of alternate numbers separated by ;

View file

@ -200,28 +200,6 @@ class Node < ActiveRecord::Base
save_with_history! save_with_history!
end 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 def tags_as_hash
tags tags
end end

View file

@ -121,31 +121,6 @@ class Relation < ActiveRecord::Base
relation relation
end 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? # FIXME: is this really needed?
def members def members
@members ||= relation_members.map do |member| @members ||= relation_members.map do |member|

View file

@ -46,6 +46,8 @@
class User < ActiveRecord::Base class User < ActiveRecord::Base
require "xml/libxml" require "xml/libxml"
self.ignored_columns = ["nearby"]
has_many :traces, -> { where(:visible => true) } has_many :traces, -> { where(:visible => true) }
has_many :diary_entries, -> { order(:created_at => :desc) } has_many :diary_entries, -> { order(:created_at => :desc) }
has_many :diary_comments, -> { order(:created_at => :desc) } has_many :diary_comments, -> { order(:created_at => :desc) }

View file

@ -18,13 +18,4 @@ class UserPreference < ActiveRecord::Base
validates :user, :presence => true, :associated => true validates :user, :presence => true, :associated => true
validates :k, :v, :length => 1..255, :characters => 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 end

View file

@ -106,44 +106,6 @@ class Way < ActiveRecord::Base
way way
end 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 def nds
@nds ||= way_nodes.collect(&:node_id) @nds ||= way_nodes.collect(&:node_id)
end end

View file

@ -2,7 +2,7 @@ json.type "Feature"
json.geometry do json.geometry do
json.type "Point" json.type "Point"
json.coordinates [ note.lon.to_f, note.lat.to_f ] json.coordinates [note.lon.to_f, note.lat.to_f]
end end
json.properties do json.properties do
@ -16,12 +16,12 @@ json.properties do
json.close_url close_note_url(note, :format => params[:format]) json.close_url close_note_url(note, :format => params[:format])
end end
json.date_created note.created_at json.date_created note.created_at.to_s
json.status note.status 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.comments(note.comments) do |comment|
json.date comment.created_at json.date comment.created_at.to_s
if comment.author if comment.author
json.uid comment.author.id json.uid comment.author.id

View file

@ -1,5 +1,5 @@
json.type "FeatureCollection" json.type "FeatureCollection"
json.features(@notes) do |note| json.features(@notes) do |note|
json.ingest! render(note) json.partial! note
end end

View file

@ -0,0 +1 @@
json.partial! @note

View file

@ -1 +0,0 @@
json.ingest! render(@note)

View file

@ -0,0 +1,6 @@
attrs = {
"k" => user_preference.k,
"v" => user_preference.v
}
xml.preference(attrs)

View 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

View file

@ -1,6 +1,6 @@
sotm_asia_2019: sotm_africa_2019:
id: sotm_asia_2019 id: sotm_africa_2019
alt: State of the Map Asia 2019 alt: State of the Map Africa 2019
link: https://stateofthemap.asia/ link: https://2019.stateofthemap.africa/
img: banners/sotm_asia_2019.png img: banners/sotm_africa_2019.png
enddate: 2019-nov-03 enddate: 2019-nov-24

View file

@ -316,6 +316,7 @@ ar:
tag: صفحة وصف الويكي للوسم %{key}=%{value} tag: صفحة وصف الويكي للوسم %{key}=%{value}
wikidata_link: العنصر %{page} على ويكي بيانات wikidata_link: العنصر %{page} على ويكي بيانات
wikipedia_link: مقالة %{page} على ويكيبيديا wikipedia_link: مقالة %{page} على ويكيبيديا
wikimedia_commons_link: العنصر %{page} في ويكيميديا ​​كومنز
telephone_link: اتصل بـ%{phone_number} telephone_link: اتصل بـ%{phone_number}
colour_preview: معاينة اللون %{colour_value} colour_preview: معاينة اللون %{colour_value}
note: note:

View file

@ -283,6 +283,7 @@ ast:
tag: La páxina wiki de descripción de la etiqueta %{key}=%{value} tag: La páxina wiki de descripción de la etiqueta %{key}=%{value}
wikidata_link: L'elementu %{page} en Wikidata wikidata_link: L'elementu %{page} en Wikidata
wikipedia_link: L'artículu %{page} en Wikipedia wikipedia_link: L'artículu %{page} en Wikipedia
wikimedia_commons_link: L'elementu %{page} en Wikimedia Commons
telephone_link: Llamar a %{phone_number} telephone_link: Llamar a %{phone_number}
colour_preview: Entever el color %{colour_value} colour_preview: Entever el color %{colour_value}
note: note:
@ -1279,10 +1280,10 @@ ast:
de cambios' de cambios'
subject_other: '[OpenStreetMap] %{commenter} comentó sobro un conxuntu de subject_other: '[OpenStreetMap] %{commenter} comentó sobro un conxuntu de
cambios que t''interesa' cambios que t''interesa'
your_changeset: '%{commenter} dexó un comentariu n''unu de los tos conxuntos your_changeset: '%{commenter} dexó un comentariu a les %{time} n''unu de los
de cambios creáu el %{time}' tos conxuntos de cambios'
commented_changeset: '%{commenter} dexó un comentariu nun conxuntu de cambios commented_changeset: '%{commenter} dexó un comentariu a les %{time} nun conxuntu
del mapa que tas siguiendo creáu por %{changeset_author} el %{time}' de cambios del mapa que tas siguiendo creáu por %{changeset_author}'
partial_changeset_with_comment: col comentariu '%{changeset_comment}' partial_changeset_with_comment: col comentariu '%{changeset_comment}'
partial_changeset_without_comment: ensin comentarios partial_changeset_without_comment: ensin comentarios
details: Puen alcontrase más detalles del conxuntu de cambios en %{url} details: Puen alcontrase más detalles del conxuntu de cambios en %{url}
@ -1889,7 +1890,9 @@ ast:
newer: Traces más nueves newer: Traces más nueves
trace: trace:
pending: PENDIENTE pending: PENDIENTE
count_points: '%{count} puntos' count_points:
one: 1 puntu
other: '%{count} puntos'
more: más more: más
trace_details: Amosar detalles de la traza trace_details: Amosar detalles de la traza
view_map: Ver el Mapa view_map: Ver el Mapa

View file

@ -17,6 +17,9 @@ be-Tarask:
submit: submit:
diary_comment: diary_comment:
create: Захаваць create: Захаваць
diary_entry:
create: Апублікаваць
update: Абнавіць
issue_comment: issue_comment:
create: Дадаць камэнтар create: Дадаць камэнтар
message: message:
@ -24,6 +27,9 @@ be-Tarask:
client_application: client_application:
create: Рэгістрацыя create: Рэгістрацыя
update: Рэдагаваць update: Рэдагаваць
redaction:
create: Стварыць рэдакцыю
update: Захаваць рэдакцыю
trace: trace:
create: Загрузіць create: Загрузіць
update: Захаваць зьмены update: Захаваць зьмены
@ -33,6 +39,7 @@ be-Tarask:
activerecord: activerecord:
errors: errors:
messages: messages:
invalid_email_address: не падобны на карэктны адрас э-пошты
email_address_not_routable: не маршрутызаваны email_address_not_routable: не маршрутызаваны
models: models:
acl: Сьпіс абмежаваньня доступу acl: Сьпіс абмежаваньня доступу
@ -156,6 +163,15 @@ be-Tarask:
description: Аддаленае кіраваньне (JOSM ці Merkaartor) description: Аддаленае кіраваньне (JOSM ці Merkaartor)
api: api:
notes: 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: entry:
full: Поўны тэкст full: Поўны тэкст
browse: browse:

View file

@ -1339,7 +1339,9 @@ bg:
newer: По-нови следи newer: По-нови следи
trace: trace:
pending: Обработва се pending: Обработва се
count_points: '%{count} точки' count_points:
one: 1 точка
other: '%{count} точки'
view_map: Вижте на картата view_map: Вижте на картата
edit: променяне edit: променяне
edit_map: Редактиране на картата edit_map: Редактиране на картата

View file

@ -9,6 +9,7 @@
# Author: KWiki # Author: KWiki
# Author: Macofe # Author: Macofe
# Author: Maxmus # Author: Maxmus
# Author: Obsuser
# Author: Palapa # Author: Palapa
# Author: Ruila # Author: Ruila
# Author: Srdjan m # Author: Srdjan m
@ -994,7 +995,7 @@ bs:
destroyed: Poruka izbrisana destroyed: Poruka izbrisana
site: site:
about: about:
next: Slijedeće next: Sljedeće
open_data_title: Open Data open_data_title: Open Data
copyright: copyright:
foreign: foreign:
@ -1424,7 +1425,7 @@ bs:
no_apps: Imate li aplikaciju koju želite registrirati za korištenje sa %{oauth} 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 standardom? Morate registrirati Vašu web aplikaciju prije nego ona može slati
OAuth zahtjeve za ovu uslugu 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 register_new: Registrirajte Vašu aplikaciju
form: form:
name: Ime name: Ime

File diff suppressed because it is too large Load diff

View file

@ -342,6 +342,7 @@ de:
tag: Die Wiki-Erläuterungsseite für das Attribut %{key}=%{value} tag: Die Wiki-Erläuterungsseite für das Attribut %{key}=%{value}
wikidata_link: Das Objekt %{page} auf Wikidata wikidata_link: Das Objekt %{page} auf Wikidata
wikipedia_link: Der Artikel zu %{page} in der Wikipedia wikipedia_link: Der Artikel zu %{page} in der Wikipedia
wikimedia_commons_link: Das %{page} Element auf Wikimedia Commons
telephone_link: '%{phone_number} anrufen' telephone_link: '%{phone_number} anrufen'
colour_preview: Farbe %{colour_value} Vorschau colour_preview: Farbe %{colour_value} Vorschau
note: note:

View file

@ -132,7 +132,43 @@ el:
pass_crypt: Κωδικός pass_crypt: Κωδικός
datetime: datetime:
distance_in_words_ago: 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: μισό λεπτό πριν 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: printable_name:
with_version: '%{id}, v%{version}' with_version: '%{id}, v%{version}'
editor: editor:

View file

@ -278,6 +278,7 @@ en:
tag: "The wiki description page for the %{key}=%{value} tag" tag: "The wiki description page for the %{key}=%{value} tag"
wikidata_link: "The %{page} item on Wikidata" wikidata_link: "The %{page} item on Wikidata"
wikipedia_link: "The %{page} article on Wikipedia" wikipedia_link: "The %{page} article on Wikipedia"
wikimedia_commons_link: "The %{page} item on Wikimedia Commons"
telephone_link: "Call %{phone_number}" telephone_link: "Call %{phone_number}"
colour_preview: "Colour %{colour_value} preview" colour_preview: "Colour %{colour_value} preview"
note: note:

View file

@ -297,6 +297,7 @@ eo:
tag: La viki-paĝo priskribanta la etikedon '%{key}=%{value}' tag: La viki-paĝo priskribanta la etikedon '%{key}=%{value}'
wikidata_link: La %{page} elemento en Vikidatumoj wikidata_link: La %{page} elemento en Vikidatumoj
wikipedia_link: La artikolo %{page} en Vikipedio wikipedia_link: La artikolo %{page} en Vikipedio
wikimedia_commons_link: Objekto %{page} ĉe Vikimedia Komunejo
telephone_link: Telefoni %{phone_number} telephone_link: Telefoni %{phone_number}
colour_preview: Antaŭvido de koloro “%{colour_value}” colour_preview: Antaŭvido de koloro “%{colour_value}”
note: note:

View file

@ -1373,7 +1373,7 @@ es:
date: Fecha date: Fecha
no_messages_yet: No tienes aún mensajes. ¿Por qué no te pones en contacto con no_messages_yet: No tienes aún mensajes. ¿Por qué no te pones en contacto con
alguno de los %{people_mapping_nearby_link}? alguno de los %{people_mapping_nearby_link}?
people_mapping_nearby: gente cercana mapeando people_mapping_nearby: gente mapeando cerca
message_summary: message_summary:
unread_button: Marcar como no leído unread_button: Marcar como no leído
read_button: Marcar como leí­do read_button: Marcar como leí­do

View file

@ -914,7 +914,7 @@ fa:
clothes: فروشگاه پوشاک clothes: فروشگاه پوشاک
computer: فروشگاه رایانه computer: فروشگاه رایانه
confectionery: فروشگاه قنادی confectionery: فروشگاه قنادی
convenience: فروشگاه زنجیره ای convenience: سوپرمارکت
copyshop: مغازه فتوکپی copyshop: مغازه فتوکپی
cosmetics: فروشگاه لوازم آرایشی cosmetics: فروشگاه لوازم آرایشی
deli: اغذیه فروشی deli: اغذیه فروشی
@ -966,7 +966,7 @@ fa:
shoes: فروشگاه کفش shoes: فروشگاه کفش
sports: فروشگاه ورزشی sports: فروشگاه ورزشی
stationery: فروشگاه نوشت‌افزار stationery: فروشگاه نوشت‌افزار
supermarket: سوپرمارکت supermarket: فروشگاه بزرگ
tailor: خیاطی tailor: خیاطی
ticket: فروشگاه بلیط ticket: فروشگاه بلیط
tobacco: فروشگاه توتون و تنباکو tobacco: فروشگاه توتون و تنباکو
@ -1159,10 +1159,10 @@ fa:
sign_up_tooltip: ایجاد یک حساب کاربری برای ویرایش sign_up_tooltip: ایجاد یک حساب کاربری برای ویرایش
edit: ویرایش edit: ویرایش
history: تاریخچه history: تاریخچه
export: برون‌بُرد export: برون‌ریزی
issues: موضوع‌ها issues: موضوع‌ها
data: داده‌ها data: داده‌ها
export_data: برون‌بُرد داده‌ها export_data: برون‌ریزی داده‌ها
gps_traces: ردهای GPS gps_traces: ردهای GPS
gps_traces_tooltip: مدیریت ردهای GPS gps_traces_tooltip: مدیریت ردهای GPS
user_diaries: روزنوشت‌های کاربر user_diaries: روزنوشت‌های کاربر
@ -1225,13 +1225,14 @@ fa:
and_the_tags: 'و برچسب‌های زیر:' and_the_tags: 'و برچسب‌های زیر:'
and_no_tags: و بدون برچسب. and_no_tags: و بدون برچسب.
failure: failure:
subject: درون‌برد ناموفق GPX [OpenStreetMap] subject: شکست درون‌ریزی GPX [OpenStreetMap]
failed_to_import: 'درون‌برد با شکست مواجه شد. این خطا رخ داد:' failed_to_import: 'درون‌ریزی با شکست مواجه شد. این خطا رخ داد:'
more_info_1: اطلاعات بیشتر دربارهٔ شکست درون‌برد GPX و چگونگی پیشگیری از more_info_1: اطلاعات بیشتر دربارهٔ شکست درون‌ریزی GPX و چگونگی پیشگیری از
آن
more_info_2: 'آن را در اینجا خواهید یافت:' more_info_2: 'آن را در اینجا خواهید یافت:'
import_failures_url: https://wiki.openstreetmap.org/wiki/Fa:GPX_Import_Failures import_failures_url: https://wiki.openstreetmap.org/wiki/Fa:GPX_Import_Failures
success: success:
subject: درون‌برد موفق GPX [OpenStreetMap] subject: موفقیت درون‌ریزی GPX [OpenStreetMap]
loaded_successfully: با موفقیت و با %{trace_points} نقطه از %{possible_points} loaded_successfully: با موفقیت و با %{trace_points} نقطه از %{possible_points}
نقطهٔ ممکن روی وبسایت قرار گرفته است. نقطهٔ ممکن روی وبسایت قرار گرفته است.
signup_confirm: signup_confirm:
@ -1580,10 +1581,10 @@ fa:
no_iframe_support: مرورگر شما فریم‌های HTML را، که برای این ویژگی لازم است، no_iframe_support: مرورگر شما فریم‌های HTML را، که برای این ویژگی لازم است،
پشتیبانی نمی‌کند. پشتیبانی نمی‌کند.
export: export:
title: برون‌بُرد title: برون‌ریزی
area_to_export: محدوده برای برون‌برد area_to_export: محدوده برای برون‌ریزی
manually_select: به‌صورت دستی منطقه دیگری را انتخاب کنید manually_select: به‌صورت دستی منطقه دیگری را انتخاب کنید
format_to_export: قالب برون‌برد format_to_export: قالب برون‌ریزی
osm_xml_data: OpenStreetMap XML Data osm_xml_data: OpenStreetMap XML Data
map_image: تصویر نقشه (لایهٔ استاندارد را نشان می‌دهد) map_image: تصویر نقشه (لایهٔ استاندارد را نشان می‌دهد)
embeddable_html: HTML توکار embeddable_html: HTML توکار
@ -1591,9 +1592,9 @@ fa:
export_details: داده‌های OpenStreetMap تحت <a href="https://opendatacommons.org/licenses/odbl/1.0/">پروانهٔ export_details: داده‌های OpenStreetMap تحت <a href="https://opendatacommons.org/licenses/odbl/1.0/">پروانهٔ
داده‌های همگانی باز، پایگاه‌دادهٔ باز</a> (ODbL) قرار دارد. داده‌های همگانی باز، پایگاه‌دادهٔ باز</a> (ODbL) قرار دارد.
too_large: too_large:
advice: 'اگر برون‌بَری بالا ناموفق بود، لطفاً یکی از منابع زیر را استفاده advice: 'اگر برون‌ریزی بالا ناموفق بود، لطفاً یکی از منابع زیر را استفاده
کنید:' کنید:'
body: این محدوده برای برون‌بَری در قالب OpenStreetMap XML خیلی بزرگ است. لطفاً body: این محدوده برای برون‌ریزی در قالب OpenStreetMap XML خیلی بزرگ است. لطفاً
بزرگنمایی کنید یا منطقهٔ کوچکتری را انتخاب کنید، یا برای دریافت داده‌های بزرگنمایی کنید یا منطقهٔ کوچکتری را انتخاب کنید، یا برای دریافت داده‌های
انبوه یکی از منابع فهرست زیر را استفاده کنید. انبوه یکی از منابع فهرست زیر را استفاده کنید.
planet: planet:
@ -1624,7 +1625,7 @@ fa:
longitude: 'طول:' longitude: 'طول:'
output: خروجی output: خروجی
paste_html: برای استفادهٔ توکار در وب‌سایت، HTML را کپی و درج کنید paste_html: برای استفادهٔ توکار در وب‌سایت، HTML را کپی و درج کنید
export_button: برون‌بُرد export_button: برون‌ریزی
fixthemap: fixthemap:
title: گزارش مشکل / اصلاح نقشه title: گزارش مشکل / اصلاح نقشه
how_to_help: how_to_help:
@ -1816,7 +1817,7 @@ fa:
paragraph_1_html: قوانین رسمی OpenStreetMap تنها چند مورد است، اما از همهٔ 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'>ویرایش‌های (Import)</a> و <a href='https://wiki.openstreetmap.org/wiki/Automated_Edits_code_of_conduct'>ویرایش‌های
خودکار</a> را بخوانید و از آن‌ها پیروی کنید. خودکار</a> را بخوانید و از آن‌ها پیروی کنید.
questions: questions:
@ -2559,7 +2560,7 @@ fa:
center_marker: مرکز نقشه در نشانگر center_marker: مرکز نقشه در نشانگر
paste_html: برای درج در وب سایت HTML را جایگذاری کنید paste_html: برای درج در وب سایت HTML را جایگذاری کنید
view_larger_map: نمایش نقشه بزرگتر view_larger_map: نمایش نقشه بزرگتر
only_standard_layer: فقط از لایهٔ استاندارد می‌توان خروجی تصویری گرفت only_standard_layer: فقط لایهٔ استاندارد را می‌توان در قالب عکس برون‌ریزی کرد.
embed: embed:
report_problem: گزارش مشکل report_problem: گزارش مشکل
key: key:

View file

@ -298,8 +298,8 @@ fi:
note: merkintä note: merkintä
redacted: redacted:
redaction: Redaktio %{id} redaction: Redaktio %{id}
message_html: Tämän %{type}-tyypin versiota ei voi näyttää koska se on laitostettu. message_html: Tämän %{type}-tyypin versiota %{version} ei voi näyttää koska
Katso lisätietoja %{redaction_link}. se on relaatoitu. Katso lisätietoja %{redaction_link}.
type: type:
node: piste node: piste
way: polku way: polku
@ -2742,12 +2742,12 @@ fi:
redactions: redactions:
edit: edit:
description: Kuvaus description: Kuvaus
heading: Muokkaa laitosta heading: Muokkaa relaatiota
title: Muokkaa laitosta title: Muokkaa relaatiota
index: index:
empty: Ei ole näytettävää laitosta empty: Ei ole näytettävää relaatiota
heading: Laitosten luettelo heading: Relaatioiden luettelo
title: Laitosten luettelo title: Relaatioiden luettelo
new: new:
description: Kuvaus description: Kuvaus
heading: Kirjoita tietoja uudesta laitoksesta heading: Kirjoita tietoja uudesta laitoksesta
@ -2757,7 +2757,7 @@ fi:
heading: Näytetään redaktio ”%{title}” heading: Näytetään redaktio ”%{title}”
title: Näytetään redaktio title: Näytetään redaktio
user: 'Luoja:' user: 'Luoja:'
edit: Muokkaa tätä laitosta edit: Muokkaa tätä relaatiota
destroy: Poista tämä redaktio destroy: Poista tämä redaktio
confirm: Oletko varma? confirm: Oletko varma?
create: create:
@ -2768,7 +2768,7 @@ fi:
not_empty: Redaktio ei ole tyhjä. Poista redaktiotiedot kaikista tähän redaktioon not_empty: Redaktio ei ole tyhjä. Poista redaktiotiedot kaikista tähän redaktioon
liittyvistä versioista ennen sen tuhoamista. liittyvistä versioista ennen sen tuhoamista.
flash: Redaktio tuhottu. flash: Redaktio tuhottu.
error: Laitosta tuhottaessa tapahtui virhe. error: Relaatiota tuhottaessa tapahtui virhe.
validations: validations:
leading_whitespace: tyhjää tilaa alussa leading_whitespace: tyhjää tilaa alussa
trailing_whitespace: tyhjää tilaa lopussa trailing_whitespace: tyhjää tilaa lopussa

View file

@ -59,7 +59,14 @@ fit:
old_way_tag: Vanha viivan tagi old_way_tag: Vanha viivan tagi
relation: Relaatio relation: Relaatio
relation_member: Relaation jäsen 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: Käyttäjä
user_preference: Käyttäjän asetus
user_token: Käyttäjän poletti
way: Viiva way: Viiva
way_node: Viivan piste way_node: Viivan piste
way_tag: Viivan tagi way_tag: Viivan tagi
@ -86,6 +93,7 @@ fit:
description: Kuvvaus description: Kuvvaus
message: message:
sender: Lähättäjä sender: Lähättäjä
title: Aihe
body: Viesti body: Viesti
recipient: Vastaanottaja recipient: Vastaanottaja
user: user:
@ -161,9 +169,16 @@ fit:
reopened_at_by_html: '%{user} aktivoinut uuesti %{when}' reopened_at_by_html: '%{user} aktivoinut uuesti %{when}'
rss: rss:
title: OpenStreetMapin karttailmoitukset 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}) commented: uusi kommentti (lähelä kohetta %{place})
closed: suljettu karttailmoitus (lähellä paikkaa %{place})
reopened: uudelleenavattu karttailmoitus (lähellä paikka %{place})
entry: entry:
comment: Kommentti comment: Kommentti
full: Koko karttailmoitus
browse: browse:
created: Luotu created: Luotu
closed: Ratkaistu closed: Ratkaistu
@ -229,6 +244,7 @@ fit:
entry: Relaatio %{relation_name} entry: Relaatio %{relation_name}
entry_role: Relaatio %{relation_name} (rooli %{relation_role}) entry_role: Relaatio %{relation_name} (rooli %{relation_role})
not_found: not_found:
sorry: 'Pahoittelemme, %{type} #%{id} ei ole olemassa.'
type: type:
node: Pistettä node: Pistettä
way: Polkua way: Polkua
@ -236,6 +252,7 @@ fit:
changeset: muutoskokoelma changeset: muutoskokoelma
note: merkintä note: merkintä
timeout: timeout:
sorry: Tietojen hakeminen (kohde %{type}:%{id}) kesti liian kauan.
type: type:
node: piste node: piste
way: polku way: polku
@ -244,6 +261,8 @@ fit:
note: merkintä note: merkintä
redacted: redacted:
redaction: Redaktio %{id} 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: type:
node: piste node: piste
way: polku way: polku
@ -275,6 +294,9 @@ fit:
commented_by_anonymous: Kommentti tuntemattomalta käyttäjältä <abbr title='%{exact_time}'>%{when}</abbr> 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: 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> 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 report: Ilmianna karttailmotus
query: query:
title: Ominaisuuskysely title: Ominaisuuskysely
@ -320,6 +342,9 @@ fit:
index: index:
title_all: Keskustelu OpenStreetMapin muutoskokoelmasta title_all: Keskustelu OpenStreetMapin muutoskokoelmasta
title_particular: 'OpenStreetMap muutoskokoelma #%{changeset_id} keskustelu' title_particular: 'OpenStreetMap muutoskokoelma #%{changeset_id} keskustelu'
timeout:
sorry: Valitettavasti pyytämäsi muutoskokoelmien kommenttien hakeminen kesti
liian kauan.
diary_entries: diary_entries:
new: new:
title: Uusi päiväkirjamerkintä title: Uusi päiväkirjamerkintä
@ -354,6 +379,9 @@ fit:
login: Lokkaa sisäle login: Lokkaa sisäle
no_such_entry: no_such_entry:
title: Päiväkirjamerkintää ei ole 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: diary_entry:
posted_by: Käyttäjä %{link_user} kirjotti tämän %{created} kielellä %{language_link} posted_by: Käyttäjä %{link_user} kirjotti tämän %{created} kielellä %{language_link}
comment_link: Kommentoi tätä kirjoitusta comment_link: Kommentoi tätä kirjoitusta
@ -408,6 +436,13 @@ fit:
geonames_reverse: Hakuresyltaatit <a href="http://www.geonames.org/">GeoNamesista</a> geonames_reverse: Hakuresyltaatit <a href="http://www.geonames.org/">GeoNamesista</a>
search_osm_nominatim: search_osm_nominatim:
prefix: prefix:
aerialway:
cable_car: Köysirata
chair_lift: Tuolihissi
drag_lift: Vetohissi
gondola: Gondolihissi
platter: Hiihtohissi
pylon: Pylväs
amenity: amenity:
cafe: Kahvila cafe: Kahvila
hospital: Siukhuusi hospital: Siukhuusi
@ -420,6 +455,7 @@ fit:
sauna: Sauna sauna: Sauna
school: Skoulu school: Skoulu
toilets: Tualetit toilets: Tualetit
university: Yniversiteetti
leisure: leisure:
sauna: Sauna sauna: Sauna
office: office:
@ -430,33 +466,89 @@ fit:
tourism: tourism:
museum: Myseymmi museum: Myseymmi
zoo: Elläintarha 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: issues:
index: 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: 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_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: states:
open: Avaa open: Avvaa
resolved: Ratkaistu resolved: Ratkaistu
update:
new_report: Ilmianto on vastaanotettu
successful_update: Ilmianto on päivitetty
provide_details: Täyennä tarvittavat tiot
show: show:
title: '%{status} Tapaus #%{issue_id}'
reports:
zero: Ei ilmiantoa
one: Yksi ilmianto
other: '%{count} ilmiantoa'
report_created_at: Ilmotettu ensimmäisen kerran %{datetime} report_created_at: Ilmotettu ensimmäisen kerran %{datetime}
last_resolved_at: Ratkastu %{datetime} last_resolved_at: Ratkastu %{datetime}
last_updated_at: Viimeisin käsittelijä %{displayname} %{datetime} last_updated_at: Viimeisin käsittelijä %{displayname} %{datetime}
resolve: Ratkase resolve: Ratkase
ignore: Merkitte aiheettomaksi ignore: Merkitte aiheettomaksi
reopen: Avaa uuelleen reopen: Avvaa uuelleen
reports_of_this_issue: Ilmianna tapahtuma reports_of_this_issue: Ilmianna tapahtuma
read_reports: Lue ilmiantoja read_reports: Lue ilmiantoja
new_reports: Uuet ilmiannot new_reports: Uuet ilmiannot
other_issues_against_this_user: Muut tähän käyttäjään kohistetut 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. no_other_issues: Ei muita tähän käyttäjään kohistuvia ilmiantoja.
comments_on_this_issue: Tapauksen kommentit 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: comments:
created_at: '%{datetime}' created_at: '%{datetime}'
reassign_param: Haluatko määrittää tapauksen tilan uuelleen?
reports: reports:
updated_at: '%{datetime}' updated_at: '%{datetime}'
reported_by_html: Käyttäjä %{user} ilmiantanut merkinnällä %{category} 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: reports:
new: new:
title_html: Ilmianna %{link}
missing_params: Ilmotuksen luominen epäonnistui
details: Kuvaile ongelmaa (pakollinen)
select: 'Valitte ilmiannon syy:'
categories: categories:
diary_entry: diary_entry:
other_label: Muu other_label: Muu
@ -544,13 +636,29 @@ fit:
changeset_comment_notification: changeset_comment_notification:
hi: Hei %{to_user}, hi: Hei %{to_user},
greeting: Hei, 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: messages:
inbox: inbox:
title: Saapuneet
my_inbox: Saapuneet my_inbox: Saapuneet
outbox: Lähetetyt 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ä from: Lähättäjä
subject: Otsikko subject: Otsikko
date: Taatumi date: Taatumi
no_messages_yet: Ei viestejä. %{people_mapping_nearby_link}
people_mapping_nearby: Lähiseudun kartoittajat
message_summary: message_summary:
unread_button: Markeeraa lukemattomaksi unread_button: Markeeraa lukemattomaksi
read_button: Markeeraa luetuksi read_button: Markeeraa luetuksi
@ -564,14 +672,39 @@ fit:
back_to_inbox: Takashiin saapuneisiin back_to_inbox: Takashiin saapuneisiin
create: create:
message_sent: Viesti on lähätetty. 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: outbox:
title: Lähätetyt
my_inbox: Minun %{inbox_link} 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 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: show:
title: Lue viesti
from: 'Lähettäjä:'
subject: Otsikko
date: Taatumi date: Taatumi
reply_button: Vastaa
unread_button: Markeeraa lukemattomaksi unread_button: Markeeraa lukemattomaksi
destroy_button: Ota poies destroy_button: Ota poies
back: Takashiin back: Takashiin
to: 'Vastaanottaja:'
sent_message_summary: sent_message_summary:
destroy_button: Ota poies destroy_button: Ota poies
mark: mark:
@ -582,15 +715,82 @@ fit:
site: site:
about: about:
next: Seuraava next: Seuraava
copyright_html: <span>&copy;</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_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: copyright:
foreign: foreign:
title: Tietoja tästä käänöksestä 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: native:
title: Tästä sivusta 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 native_link: meänkielinen versuuni
mapping_link: aloittaa kartoituksen
legal_babble: legal_babble:
title_html: Tekijänoikeus ja lisensi title_html: Tekijänoikeus ja lisensi
intro_1_html: |-
OpenStreetMap<sup><a href="#trademarks">&reg;</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
&quot;&copy; OpenStreetMapin tekijät&quot; tai sen englantinkielinen vastine
&quot;&copy; OpenStreetMap contributors&quot;.
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 contributors_title_html: Meän tekijät
index: index:
permalink: Ikunen länkki permalink: Ikunen länkki
@ -603,12 +803,26 @@ fit:
format_to_export: Eksporteerausmuoto format_to_export: Eksporteerausmuoto
osm_xml_data: OpenStreetMap XML-taatta osm_xml_data: OpenStreetMap XML-taatta
licence: Lisensi licence: Lisensi
too_large:
other:
title: Muut läheet
description: Muut läheet ovat esillä OpenStreetMap-wikissä
options: Inställninkit options: Inställninkit
format: 'Fiilimuoto:' 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 output: Tulos
paste_html: Kopioi ja liitä tämä HTML-kooti verkkosivulesi
export_button: Eksporteeraa export_button: Eksporteeraa
fixthemap: fixthemap:
title: Ilmota ongelmasta / Korjaa karttaa
how_to_help: how_to_help:
title: Kuinka voin auttaa
join_the_community: join_the_community:
title: Liity föreeninkhiin title: Liity föreeninkhiin
help: help:
@ -630,6 +844,11 @@ fit:
search: search:
search: Haku search: Haku
submit_text: Hae submit_text: Hae
key:
table:
entry:
school:
1: yniversiteetti
richtext_area: richtext_area:
edit: Mookkaa edit: Mookkaa
preview: Etukattelu preview: Etukattelu
@ -666,6 +885,16 @@ fit:
trace: trace:
edit: mookkaa edit: mookkaa
edit_map: Mookkaa karttaa 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: oauth_clients:
edit: edit:
title: Mookkaa sovellustasi title: Mookkaa sovellustasi
@ -684,7 +913,11 @@ fit:
lost password link: Unhouttanu sinun salasanan? lost password link: Unhouttanu sinun salasanan?
login_button: Lokkaa sisäle login_button: Lokkaa sisäle
register now: Luo konttu nyt register now: Luo konttu nyt
openid_logo_alt: Lokkaa sisäle OpenID-konttulla
auth_providers: auth_providers:
openid:
title: Lokkaa sisäle OpenID:llä
alt: Lokkaa sisäle OpenID-atressilla
google: google:
title: Lokkaa sisäle Googlella title: Lokkaa sisäle Googlella
facebook: facebook:
@ -696,7 +929,10 @@ fit:
heading: Lokkaa ulos OpenStreetMapista heading: Lokkaa ulos OpenStreetMapista
logout_button: Lokkaa ulos logout_button: Lokkaa ulos
lost_password: lost_password:
title: Unohtunut salasana
heading: Unohditko salasanasi?
email address: 'E-postiatressi:' email address: 'E-postiatressi:'
new password button: Lähätä salasanan palautusohjeet
reset_password: reset_password:
password: 'Salasana:' password: 'Salasana:'
confirm password: 'Vahvista salasana:' confirm password: 'Vahvista salasana:'
@ -799,11 +1035,69 @@ fit:
changesets: changesets:
show: show:
comment: Kommentoi 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: context:
directions_from: Reittiohjeet täältä
directions_to: Reittiohjeet tänne
add_note: Ilmota karttavirheestä
show_address: Näytä atressi show_address: Näytä atressi
query_features: Lähistöllä
centre_map: Keskitä kartta
redactions: redactions:
edit: edit:
description: Kuvvaus
heading: Mookkaa laitosta 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: show:
description: 'Kuvvaus:'
heading: Näytetään redaktio ”%{title}”
title: Näytetään redaktio
user: 'Luoja:'
edit: Mookkaa tätä laitosta 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})
... ...

View file

@ -285,7 +285,7 @@ fr:
title_comment: Groupe de modifications %{id} — %{comment} title_comment: Groupe de modifications %{id} — %{comment}
join_discussion: Se connecter pour rejoindre la discussion join_discussion: Se connecter pour rejoindre la discussion
discussion: Discussion discussion: Discussion
still_open: Ensemble de modifications toujours ouvert la discussion souvrira still_open: Ensemble de modifications toujours ouvert la discussion souvrira
une fois que lensemble de modifications sera fermé. une fois que lensemble de modifications sera fermé.
node: node:
title: 'Nœud : %{name}' title: 'Nœud : %{name}'
@ -348,6 +348,7 @@ fr:
tag: La description de lattribut %{key}=%{value} sur le wiki tag: La description de lattribut %{key}=%{value} sur le wiki
wikidata_link: Lélément %{page} sur Wikidata wikidata_link: Lélément %{page} sur Wikidata
wikipedia_link: Larticle « %{page} » sur Wikipédia wikipedia_link: Larticle « %{page} » sur Wikipédia
wikimedia_commons_link: Lélément %{page} sur Wikimedia Commons
telephone_link: Appeler %{phone_number} telephone_link: Appeler %{phone_number}
colour_preview: Aperçu de la couleur %{colour_value} colour_preview: Aperçu de la couleur %{colour_value}
note: note:
@ -359,13 +360,13 @@ fr:
hidden_title: Note masquée nº %{note_name} hidden_title: Note masquée nº %{note_name}
open_by: Créée par %{user}, <abbr title="%{exact_time}">%{when}</abbr> 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> 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: Commenté par %{user} <abbr title="%{exact_time}">%{when}</abbr>
commented_by_anonymous: Commenté par un utilisateur anonyme <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: 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> 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: 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> 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> hidden_by: Masqué par %{user} <abbr title="%{exact_time}">%{when}</abbr>
report: Signaler cette note report: Signaler cette note
query: query:
title: Requête sur les objets title: Requête sur les objets
@ -375,8 +376,8 @@ fr:
changesets: changesets:
changeset_paging_nav: changeset_paging_nav:
showing_page: Page %{page} showing_page: Page %{page}
next: Suivant » next: Suivant 
previous: « Précédent previous:  Précédent
changeset: changeset:
anonymous: Anonyme anonymous: Anonyme
no_edits: (aucune modification) no_edits: (aucune modification)
@ -404,16 +405,15 @@ fr:
met trop de temps pour être chargée. met trop de temps pour être chargée.
changeset_comments: changeset_comments:
comment: 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} par %{author}
commented_at_by_html: Mis à jour le %{when} par %{user} commented_at_by_html: Mis à jour le %{when} par %{user}
comments: 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} par %{author}
index: index:
title_all: Discussion sur le groupe de modifications OpenStreetMap title_all: Discussion sur le groupe de modifications OpenStreetMap
title_particular: Discussion sur le groupe de modifications OpenStreetMap nº title_particular: Discussion sur le groupe de modifications OpenStreetMap nº%{changeset_id}
%{changeset_id}
timeout: timeout:
sorry: Désolé, la liste des commentaires densembles de modifications que vous sorry: Désolé, la liste des commentaires densembles de modifications que vous
avez demandée est trop longue à récupérer. avez demandée est trop longue à récupérer.
@ -421,12 +421,12 @@ fr:
new: new:
title: Nouvelle entrée du journal title: Nouvelle entrée du journal
form: form:
subject: 'Sujet :' subject: 'Sujet:'
body: 'Corps :' body: 'Corps:'
language: 'Langue :' language: 'Langue:'
location: 'Lieu :' location: 'Lieu:'
latitude: 'Latitude :' latitude: 'Latitude:'
longitude: 'Longitude :' longitude: 'Longitude:'
use_map_link: utiliser la carte use_map_link: utiliser la carte
index: index:
title: Journaux des utilisateurs title: Journaux des utilisateurs
@ -450,8 +450,8 @@ fr:
login_to_leave_a_comment: '%{login_link} pour laisser un commentaire' login_to_leave_a_comment: '%{login_link} pour laisser un commentaire'
login: Se connecter login: Se connecter
no_such_entry: no_such_entry:
title: Pas dentrée du journal correspondante title: Aucune entrée du journal correspondante
heading: 'Aucune entrée avec lid : %{id}' heading: 'Aucune entrée avec lid: %{id}'
body: Désolé, il ny a aucune entrée ou commentaire dans le journal avec lid body: Désolé, il ny a aucune entrée ou commentaire dans le journal avec lid
%{id}. Veuillez vérifier votre orthographe ou la validité du lien que vous %{id}. Veuillez vérifier votre orthographe ou la validité du lien que vous
avez cliqué. avez cliqué.
@ -461,7 +461,7 @@ fr:
reply_link: Répondre à cette entrée reply_link: Répondre à cette entrée
comment_count: comment_count:
zero: Aucun commentaire zero: Aucun commentaire
one: '%{count} commentaire' one: Un commentaire
other: '%{count} commentaires' other: '%{count} commentaires'
edit_link: Modifier cette entrée edit_link: Modifier cette entrée
hide_link: Masquer cette entrée hide_link: Masquer cette entrée
@ -475,7 +475,7 @@ fr:
confirm: Confirmer confirm: Confirmer
report: Signaler ce commentaire report: Signaler ce commentaire
location: location:
location: 'Lieu :' location: 'Lieu:'
view: Afficher view: Afficher
edit: Modifier edit: Modifier
feed: feed:
@ -491,7 +491,7 @@ fr:
description: Entrées récentes des journaux dutilisateurs de OpenStreetMap description: Entrées récentes des journaux dutilisateurs de OpenStreetMap
comments: comments:
has_commented_on: '%{display_name} a commenté les entrées de journal suivantes' has_commented_on: '%{display_name} a commenté les entrées de journal suivantes'
post: Article post: Billet
when: Quand when: Quand
comment: Commentaire comment: Commentaire
newer_comments: Commentaires plus récents newer_comments: Commentaires plus récents
@ -504,8 +504,8 @@ fr:
osm_nominatim: Résultats de <a href="https://nominatim.openstreetmap.org/">OpenStreetMap osm_nominatim: Résultats de <a href="https://nominatim.openstreetmap.org/">OpenStreetMap
Nominatim</a> Nominatim</a>
geonames: Résultats depuis <a href="http://www.geonames.org/">GeoNames</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 osm_nominatim_reverse: Résultats de <a href="https://nominatim.openstreetmap.org/">Nominatim
Nominatim</a> sur OpenStreetMap</a>
geonames_reverse: Résultats de <a href="http://www.geonames.org/">GeoNames</a> geonames_reverse: Résultats de <a href="http://www.geonames.org/">GeoNames</a>
search_osm_nominatim: search_osm_nominatim:
prefix: prefix:
@ -667,7 +667,7 @@ fr:
emergency_access_point: Point daccès durgence emergency_access_point: Point daccès durgence
footway: Chemin piéton footway: Chemin piéton
ford: Gué ford: Gué
give_way: Panneau cédez le passage give_way: Panneau «Cédez le passage»
living_street: Rue en zone de rencontre living_street: Rue en zone de rencontre
milestone: Borne kilométrique milestone: Borne kilométrique
motorway: Autoroute motorway: Autoroute
@ -690,7 +690,7 @@ fr:
services: Services autoroutiers services: Services autoroutiers
speed_camera: Radar de vitesse speed_camera: Radar de vitesse
steps: Escalier steps: Escalier
stop: Signe d'arrêt stop: Panneau «Stop / Arrêt»
street_lamp: Lampadaire street_lamp: Lampadaire
tertiary: Route tertiaire tertiary: Route tertiaire
tertiary_link: Route tertiaire tertiary_link: Route tertiaire
@ -710,7 +710,7 @@ fr:
bunker: Bunker bunker: Bunker
castle: Château castle: Château
church: Église church: Église
city_gate: Porte de ville / porte de fortifications city_gate: Porte de ville / porte fortifiée
citywalls: Remparts / murailles citywalls: Remparts / murailles
fort: Fort fort: Fort
heritage: Site / objet du patrimoine heritage: Site / objet du patrimoine
@ -737,7 +737,7 @@ fr:
basin: Bassin basin: Bassin
brownfield: Friche industrielle brownfield: Friche industrielle
cemetery: Cimetière cemetery: Cimetière
commercial: Zone tertiaire / Zone d'activités commercial: Zone tertiaire / Zone dactivités
conservation: Zone préservée conservation: Zone préservée
construction: Zone en construction construction: Zone en construction
farm: Ferme farm: Ferme
@ -899,12 +899,12 @@ fr:
country: Pays country: Pays
county: Comté county: Comté
farm: Ferme farm: Ferme
hamlet: Hameau ou lieu-dit habité hamlet: Hameau habité
house: Maison house: Maison
houses: Maisons houses: Maisons
island: Île island: Île
islet: Îlot islet: Îlot
isolated_dwelling: Lieu-dit habité isolated_dwelling: Lieu-dit habité isolé
locality: Lieu-dit inhabité locality: Lieu-dit inhabité
municipality: Municipalité municipality: Municipalité
neighbourhood: Quartier neighbourhood: Quartier
@ -996,7 +996,7 @@ fr:
kiosk: Kiosque kiosk: Kiosque
kitchen: Magasin de cuisine kitchen: Magasin de cuisine
laundry: Blanchisserie laundry: Blanchisserie
lottery: Loto lottery: Loterie
mall: Centre commercial mall: Centre commercial
market: Marché market: Marché
massage: Massage massage: Massage
@ -1025,7 +1025,7 @@ fr:
travel_agency: Agence de voyage travel_agency: Agence de voyage
tyres: Magasin de pneus tyres: Magasin de pneus
vacant: Commerce vacant vacant: Commerce vacant
variety_store: Magasin à prix unique ou à bas prix variety_store: Magasin à prix unique ou réduit
video: Magasin de vidéos video: Magasin de vidéos
wine: Caviste wine: Caviste
"yes": Boutique "yes": Boutique
@ -1083,8 +1083,8 @@ fr:
level10: Limite de quartier level10: Limite de quartier
description: description:
title: title:
osm_nominatim: Localisation depuis <a href="https://nominatim.openstreetmap.org/">OpenStreetMap osm_nominatim: Localisation depuis <a href="https://nominatim.openstreetmap.org/">Nominatim
Nominatim</a> sur OpenStreetMap</a>
geonames: Localisation depuis <a href="http://www.geonames.org/">GeoNames</a> geonames: Localisation depuis <a href="http://www.geonames.org/">GeoNames</a>
types: types:
cities: Villes cities: Villes
@ -1102,17 +1102,18 @@ fr:
reported_user: Utilisateur signalé reported_user: Utilisateur signalé
not_updated: Non mis à jour not_updated: Non mis à jour
search: Rechercher search: Rechercher
search_guidance: 'Problèmes de recherche :' search_guidance: 'Problèmes de recherche:'
user_not_found: Lutilisateur nexiste pas user_not_found: Lutilisateur nexiste pas
issues_not_found: Pas trouvé de tel problème issues_not_found: Aucun problème trouvé de ce type
status: État status: État
reports: Rapports reports: Rapports
last_updated: Dernière mise à jour last_updated: Dernière mise à jour
last_updated_time_html: <abbr title='%{title}'>%{time}</abbr> last_updated_time_html: <abbr title="%{title}">%{time}</abbr>
last_updated_time_user_html: à <abbr title='%{title}'>%{time}</abbr> par %{user} last_updated_time_user_html: à <abbr title="%{title}">%{time}</abbr> par %{user}
link_to_reports: Afficher les rapports link_to_reports: Afficher les rapports
reports_count: reports_count:
one: 1 rapport zero: Aucun rapport
one: Un rapport
other: '%{count} rapports' other: '%{count} rapports'
reported_item: Élément signalé reported_item: Élément signalé
states: states:
@ -1124,7 +1125,7 @@ fr:
successful_update: Votre rapport a bien été mis à jour successful_update: Votre rapport a bien été mis à jour
provide_details: Veuillez fournir les détails demandés provide_details: Veuillez fournir les détails demandés
show: show:
title: '%{status} Problème #%{issue_id}' title: Problème %{status} nº%{issue_id}
reports: reports:
zero: Aucun rapport zero: Aucun rapport
one: 1 rapport one: 1 rapport
@ -1134,7 +1135,7 @@ fr:
last_updated_at: Dernière mise à jour à %{datetime} par %{displayname} last_updated_at: Dernière mise à jour à %{datetime} par %{displayname}
resolve: Résoudre resolve: Résoudre
ignore: Ignorer ignore: Ignorer
reopen: Réouvrir reopen: Rouvrir
reports_of_this_issue: Rapports de ce problème reports_of_this_issue: Rapports de ce problème
read_reports: Lire les rapports read_reports: Lire les rapports
new_reports: Nouveaux rapports new_reports: Nouveaux rapports
@ -1142,11 +1143,11 @@ fr:
no_other_issues: Aucun autre problème avec cet utilisateur. no_other_issues: Aucun autre problème avec cet utilisateur.
comments_on_this_issue: Commentaires sur ce problème comments_on_this_issue: Commentaires sur ce problème
resolve: resolve:
resolved: Létat du problème a été mis à 'Résolu' resolved: Létat du problème a été mis à «Résolu»
ignore: ignore:
ignored: Létat du problème a été mis à 'Ignoré' ignored: Létat du problème a été mis à «Ignoré»
reopen: reopen:
reopened: Létat du problème a été mis à 'Ouvert' reopened: Létat du problème a été mis à «Ouvert»
comments: comments:
created_at: Le %{datetime} created_at: Le %{datetime}
reassign_param: Réaffecter le problème? reassign_param: Réaffecter le problème?
@ -1155,8 +1156,8 @@ fr:
reported_by_html: Signalé comme %{category} par %{user} reported_by_html: Signalé comme %{category} par %{user}
helper: helper:
reportable_title: reportable_title:
diary_comment: '%{entry_title}, commentaire #%{comment_id}' diary_comment: '%{entry_title}, commentaire %{comment_id}'
note: 'Note #%{note_id}' note: Note nº%{note_id}
issue_comments: issue_comments:
create: create:
comment_created: Votre commentaire a bien été créé comment_created: Votre commentaire a bien été créé
@ -1165,15 +1166,15 @@ fr:
title_html: Rapport %{link} title_html: Rapport %{link}
missing_params: Impossible de créer un nouveau rapport missing_params: Impossible de créer un nouveau rapport
details: Veuillez fournir plus de détails sur le problème (obligatoire). 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: disclaimer:
intro: 'Avant denvoyer votre rapport aux modérateurs du site, veuillez vous intro: 'Avant denvoyer votre rapport aux modérateurs du site, veuillez vous
assurer que :' assurer que:'
not_just_mistake: Vous êtes certain que le problème nest pas juste une erreur not_just_mistake: vous êtes certain que le problème nest pas juste une erreur;
unable_to_fix: Vous êtes incapable de régler le problème par vous-même ou unable_to_fix: vous êtes incapable de régler le problème par vous-même ou
avec laide des membres de votre communauté avec laide des membres de votre proche communauté;
resolve_with_user: Vous avez déjà essayé de résoudre le problème avec lutilisateur resolve_with_user: vous avez déjà essayé de résoudre le problème avec lutilisateur
concerné concerné.
categories: categories:
diary_entry: diary_entry:
spam_label: Cette entrée de lagenda est/contient du pourriel spam_label: Cette entrée de lagenda est/contient du pourriel
@ -1227,8 +1228,8 @@ fr:
intro_2_create_account: Créez un compte dutilisateur intro_2_create_account: Créez un compte dutilisateur
hosting_partners_html: Lhébergement est pris en charge par %{ucl}, %{bytemark}, hosting_partners_html: Lhébergement est pris en charge par %{ucl}, %{bytemark},
et dautres %{partners}. et dautres %{partners}.
partners_ucl: LUniversity College de Londres partners_ucl: lUniversity College de Londres
partners_bytemark: l'hébergeur Bytemark partners_bytemark: l'Hébergeur Bytemark
partners_partners: partenaires partners_partners: partenaires
tou: Conditions dutilisation tou: Conditions dutilisation
osm_offline: La base de données OpenStreetMap est actuellement hors ligne ; une osm_offline: La base de données OpenStreetMap est actuellement hors ligne ; une
@ -1373,17 +1374,19 @@ fr:
outbox: boîte denvoi outbox: boîte denvoi
messages: Vous avez %{new_messages} et %{old_messages} messages: Vous avez %{new_messages} et %{old_messages}
new_messages: new_messages:
one: '%{count} nouveau message' zero: zéro nouveau message
one: un nouveau message
other: '%{count} nouveaux messages' other: '%{count} nouveaux messages'
old_messages: old_messages:
one: '%{count} ancien message' zero: aucun ancien message
one: un ancien message
other: '%{count} anciens messages' other: '%{count} anciens messages'
from: De from: De
subject: Objet subject: Objet
date: Date date: Date
no_messages_yet: Vous navez actuellement aucun message. Pourquoi ne pas entrer no_messages_yet: Vous navez actuellement aucun message. Pourquoi ne pas entrer
en contact avec quelques %{people_mapping_nearby_link} ? en contact avec quelques %{people_mapping_nearby_link}?
people_mapping_nearby: personnes proche de vous people_mapping_nearby: personnes qui cartographient aux alentours
message_summary: message_summary:
unread_button: Marquer comme non lu unread_button: Marquer comme non lu
read_button: Marquer comme lu read_button: Marquer comme lu
@ -1409,16 +1412,16 @@ fr:
inbox: boîte de réception inbox: boîte de réception
outbox: boîte denvoi outbox: boîte denvoi
messages: messages:
one: Vous avez %{count} message envoyé one: Vous navez aucun message envoyé
other: Vous avez %{count} messages envoyés other: Vous avez %{count} messages envoyés
to: À to: À
subject: Objet subject: Objet
date: Date date: Date
no_sent_messages: Vous navez encore envoyé aucun message. Pourquoi ne pas entrez no_sent_messages: Vous navez 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 people_mapping_nearby: personnes proche de vous
reply: 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 na pas été envoyé à cet utilisateur. Veuillez vous vous souhaitez répondre na pas été envoyé à cet utilisateur. Veuillez vous
connecter avec lidentifiant correct pour pouvoir répondre. connecter avec lidentifiant correct pour pouvoir répondre.
show: show:
@ -1431,20 +1434,20 @@ fr:
destroy_button: Supprimer destroy_button: Supprimer
back: Retour back: Retour
to: À 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 na pas été envoyé par cet utilisateur, ni ne lui a été destiné. Veuillez de lire na pas été envoyé par cet utilisateur, ni ne lui a été destiné. Veuillez
vous connecter avec lidentifiant correct pour pouvoir le lire. vous connecter avec lidentifiant correct pour pouvoir le lire.
sent_message_summary: sent_message_summary:
destroy_button: Supprimer destroy_button: Supprimer
mark: mark:
as_read: Message marqué comme lu as_read: Message marqué comme lu
as_unread: Message marqué comme non-lu as_unread: Message marqué comme non lu
destroy: destroy:
destroyed: Message supprimé destroyed: Message supprimé
site: site:
about: about:
next: Suivant next: Suivant
copyright_html: <span>&copy;</span>Contributeurs<br /> dOpenStreetMap copyright_html: © Contributeurs<br /> dOpenStreetMap
used_by: '%{name} fournit des données cartographiques sur des milliers de sites used_by: '%{name} fournit des données cartographiques sur des milliers de sites
web, applications mobiles et appareils' web, applications mobiles et appareils'
lede_text: OpenStreetMap est bâti par une communauté de cartographes bénévoles 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, et grossit chaque jour. Nos contributeurs incluent des cartographes enthousiastes,
des professionnels du SIG, des ingénieurs qui font fonctionner les serveurs des professionnels du SIG, des ingénieurs qui font fonctionner les serveurs
dOSM, des humanitaires cartographiant les zones dévastées par une catastrophe dOSM, des humanitaires cartographiant les zones dévastées par une catastrophe
et beaucoup dautres.\nPour en savoir plus sur la communauté, consultez \n<a et beaucoup dautres.\nPour en savoir plus sur la communauté, consultez \nle
href='https://blog.openstreetmap.org'>le blogue OpenStreetMap</a>,\n<a href='%{diary_path}'>les <a href=\"https://blog.openstreetmap.org/\">blogue OpenStreetMap</a>,\nles
annuaires dutilisateurs</a>, \n<a href='https://blogs.openstreetmap.org/'>les <a href=\"%{diary_path}\">journaux dutilisateurs</a>, \nles <a href=\"https://blogs.openstreetmap.org/\">blogues
blogues communautaires</a> et \nle site web de la <a href='https://www.osmfoundation.org/'>Fondation communautaires</a> et \nle site web de la <a href=\"https://www.osmfoundation.org/\">Fondation
OSM</a>." OSM</a>."
open_data_title: Données libres open_data_title: Données ouvertes
open_data_html: 'OpenStreetMap est en <i>données ouvertes</i> : vous êtes libre open_data_html: 'OpenStreetMap est en <i>données ouvertes</i>: vous êtes libre
de lutiliser pour nimporte quel but tant que vous créditez OpenStreetMap de lutiliser dans nimporte quel but tant que vous créditez OpenStreetMap
et ses contributeurs. Si vous modifiez ou vous appuyez sur les données dune et ses contributeurs. Si vous modifiez ou vous appuyez sur les données dune
façon quelconque, vous pouvez distribuer le résultat seulement suivant la 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
dauteur et licence</a> pour plus de détails.' dauteur et licence</a> pour plus de détails.'
legal_title: Juridique legal_title: Informations juridiques
legal_html: "Ce site et de nombreux autres services connexes sont formellement legal_html: |-
exploités par la \n<a href=\"https://osmfoundation.org/\">Fondation OpenStreetMap</a> Ce site et de nombreux autres services connexes sont formellement exploités par la
(OSMF) \nau nom de la communauté. Lutilisation de tous les services offerts <a href="https://osmfoundation.org/">Fondation OpenStreetMap</a> (OSMF) au nom de la communauté. Lutilisation de tous les services offerts par lOSMF est sujette
par lOSMF est sujette\nà nos <a href=\"https://wiki.osmfoundation.org/wiki/Terms_of_Use\">Conditions à nos <a href="https://wiki.osmfoundation.org/wiki/Terms_of_Use">Conditions dutilisation</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>.
dutilisation</a>, à notre <a href=\"https://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">\nPolitique <br />
des usages acceptés</a> et à notre <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">Politique Veuillez <a href="https://osmfoundation.org/Contact">contacter lOSMF</a>
de confidentialité</a>.\n<br> \nVeuillez <a href=\"https://osmfoundation.org/Contact\">contacter si vous avez des questions ou problèmes concernant les licences, les droits dauteur ou dautres aspects juridiques.
lOSMF</a> \nsi vous avez des questions ou problèmes concernant les licences, <br />
les droits dauteur ou dautres aspects juridiques.\n<br>\nOpenStreetMap, 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 lOSMF</a>.
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>."
partners_title: Partenaires partners_title: Partenaires
copyright: copyright:
foreign: foreign:
@ -1501,58 +1502,61 @@ fr:
legal_babble: legal_babble:
title_html: Droits dauteur et licence title_html: Droits dauteur et licence
intro_1_html: |- intro_1_html: |-
OpenStreetMap<sup><a href="#trademarks">&reg;</a></sup> est un ensemble de <i>données ouvertes</i>, disponibles sous licence libre <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) auprès de la <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). href="https://osmfoundation.org/">Fondation OpenStreetMap</a> (OSMF).
intro_2_html: Vous êtes libre de copier, distribuer, transmettre et adapter intro_2_html: |-
nos données, à condition que vous créditiez, OpenStreetMap et ses contributeurs. Vous êtes libre de copier, distribuer, transmettre et adapter nos données,
Si vous modifiez ou utilisez nos données dans dautres œuvres dérivées, à condition que vous créditiez OpenStreetMap et ses
vous ne pouvez distribuer celles-ci que sous la même licence. Le <a href="https://opendatacommons.org/licenses/odbl/1.0/">texte contributeurs. Si vous modifiez ou utilisez nos données dans dautres œ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. légal</a> complet détaille vos droits et responsabilités.
intro_3_html: Nos carreaux de rendu cartographiques, ainsi que notre documentation, intro_3_html: |-
sont disponibles sous la licence <a href="https://creativecommons.org/licenses/by-sa/2.0/">Creative 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 à lidentique 2.0</a> (CC-BY-SA). Commons paternité partage à lidentique 2.0</a> (CC-BY-SA).
credit_title_html: Comment créditer OpenStreetMap credit_title_html: Comment créditer OpenStreetMap
credit_1_html: Nous demandons que votre crédit comporte la mention « © les credit_1_html: Nous demandons que votre crédit comporte la mention « © les
contributeurs dOpenStreetMap ». contributeurs dOpenStreetMap».
credit_2_html: |- 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>. <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 ladresse openstreetmap.org), vers opendatacommons.org et, si cest 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 cest pertinent, vers creativecommons.org.
credit_3_html: |- 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: Par exemple:
attribution_example: attribution_example:
alt: Exemple dattribution dOpenStreetMap sur une page internet alt: Exemple dattribution dOpenStreetMap sur une page Internet
title: Exemple dattribution title: Exemple dattribution
more_title_html: Pour trouver plus dinformations more_title_html: Pour trouver plus dinformations
more_1_html: |- more_1_html: |-
Pour obtenir plus dinformations sur la façon de réutiliser nos données et de nous créditer, veuillez lire la <a Pour obtenir plus dinformations 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://osmfoundation.org/Licence"> Licence OSMF</a> et le <a
href="https://wiki.openstreetmap.org/wiki/Legal_FAQ">FAQ Légal</a>. href="https://wiki.openstreetmap.org/wiki/Legal_FAQ">FAQ Légal</a>.
more_2_html: "Bien quOpenStreetMap soit un jeu de données libres et ouvertes, more_2_html: |-
nous ne pouvons pas fournir une API gratuite et en libre accès pour les Bien quOpenStreetMap soit un jeu de données libres et ouvertes, nous ne pouvons pas fournir une
tierces personnes.\nVeuillez vous référer à notre <a href=\"https://operations.osmfoundation.org/policies/api/\">politique API gratuite et en libre accès pour les tierces personnes.
dutilisation de lAPI</a>, \n à notre <a href=\"https://operations.osmfoundation.org/policies/tiles/\">politique Veuillez vous référer à notre <a href="https://operations.osmfoundation.org/policies/api/">politique dutilisation de lAPI</a>,
dutilisation des tuiles</a>, \net à la <a href=\"https://operations.osmfoundation.org/policies/nominatim/\">politique à notre <a href="https://operations.osmfoundation.org/policies/tiles/">politique dutilisation des tuiles</a>
dutilisation de Nominatim</a>." et à la <a href="https://operations.osmfoundation.org/policies/nominatim/">politique dutilisation de Nominatim</a>.
contributors_title_html: Nos contributeurs contributors_title_html: Nos contributeurs
contributors_intro_html: 'Nos contributeurs sont des milliers de personnes. contributors_intro_html: 'Nos contributeurs sont des milliers de personnes.
Nous incluons également des données publiées sous licence ouverte par des Nous incluons également des données publiées sous licence ouverte par des
agences nationales de cartographie et par dautres sources, notamment:' agences nationales de cartographie et par dautres sources, notamment:'
contributors_at_html: '<strong>Autriche</strong>: contient des données sur contributors_at_html: |-
la <a href="https://data.wien.gv.at/">ville de Vienne</a> (sous licence <strong>Autriche</strong>: contient des données sur la <a href="https://data.wien.gv.at/">ville de Vienne</a> (sous
<a href="https://creativecommons.org/licenses/by/3.0/at/deed.de">CC BY</a>), licence <a href="https://creativecommons.org/licenses/by/3.0/at/deed.de">CC BY</a>), la
la <a href="https://www.vorarlberg.at/vorarlberg/bauen_wohnen/bauen/vermessung_geoinformation/weitereinformationen/services/wmsdienste.htm">région <a href="https://www.vorarlberg.at/vorarlberg/bauen_wohnen/bauen/vermessung_geoinformation/weitereinformationen/services/wmsdienste.htm">région du Vorarlberg</a> et la
du Vorarlberg</a> et la région du Tyrol (sous licence <a href="https://www.tirol.gv.at/applikationen/e-government/data/nutzungsbedingungen/">CC région du Tyrol (sous licence <a href="https://www.tirol.gv.at/applikationen/e-government/data/nutzungsbedingungen/">CC BY AT avec amendements</a>).
BY AT avec amendements</a>).' contributors_au_html: |-
contributors_au_html: "<strong>Australie</strong> : contient des données source <strong>Australie</strong>: contient des données sourcées de
de \n<a href=\"https://www.psma.com.au/psma-data-copyright-and-disclaimer\">PSMA <a href="https://www.psma.com.au/psma-data-copyright-and-disclaimer">PSMA Australia Limited</a> publiées sous la licence
Australia Limited</a>\ndont la licence appartient au Commonwealth d'Australie <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a> accordée par le Commonwealth dAustralie.
sous \n<a href=\"https://creativecommons.org/licenses/by/4.0/\">CC BY 4.0</a>."
contributors_ca_html: '<strong>Canada</strong>: contient des données de <em>GeoBase</em>®, 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>GeoGratis</em> (© Département des Ressources naturelles du Canada),
<em>CanVec</em> (© Département des Ressources naturelles du Canada) et <em>StatCan</em> <em>CanVec</em> (© Département des Ressources naturelles du Canada) et <em>StatCan</em>
(Division Géographie, Statistiques du Canada).' (Division Géographie, Statistiques du Canada).'
contributors_fi_html: '<strong>Finlande</strong>: contient des données de contributors_fi_html: '<strong>Finlande</strong>: contient des données de
la Base de données topographique de lInspection nationale du territoire la Base de données topographique de lInspection nationale du territoire
@ -1561,8 +1565,8 @@ fr:
contributors_fr_html: '<strong>France</strong>: contient des données de la 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 <em>Direction générale des finances publiques</em> (anciennement la <em>Direction
générale des impôts</em>).' générale des impôts</em>).'
contributors_nl_html: '<strong>Pays-Bas</strong>: contient des données © contributors_nl_html: '<strong>Pays-Bas</strong>: contient des données ©<abbr
<abbr title="Automotive Navigation Data">AND</abbr>, 2007 (<a href="https://www.and.com">www.and.com</a>).' 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 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> 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 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: |- contributors_za_html: |-
<strong>Afrique du Sud</strong>: contient des données issues de la <a href="http://www.ngi.gov.za/">Direction principaledes <strong>Afrique du Sud</strong>: contient des données issues de la <a href="http://www.ngi.gov.za/">Direction principaledes
Informations Géospatiales Nationales</a>, copyright de lÉtat réservé. Informations Géospatiales Nationales</a>, copyright de lÉtat réservé.
contributors_gb_html: '<strong>Royaume-Uni</strong>: contient des données contributors_gb_html: |-
issues de l<em>Ordnance Survey</em> &copy; 2010-2019 Droits dauteurs et <strong>Royaume-Uni</strong>: contient des données issues de
de la base de données de la Couronne.' l<em>Ordnance Survey</em> © 20102019 Droits dauteurs 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 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 autres sources utilisées pour aider à améliorer OpenStreetMap, consultez
la page des <a href="https://wiki.openstreetmap.org/wiki/Contributors">contributeurs</a> la page des <a href="https://wiki.openstreetmap.org/wiki/Contributors">contributeurs</a>

View file

@ -4,6 +4,7 @@
# Author: Abijeet Patro # Author: Abijeet Patro
# Author: Athena in Wonderland # Author: Athena in Wonderland
# Author: Banjo # Author: Banjo
# Author: Breogan2008
# Author: Elisardojm # Author: Elisardojm
# Author: Gallaecio # Author: Gallaecio
# Author: Iváns # Author: Iváns
@ -296,6 +297,7 @@ gl:
tag: A páxina de descrición da etiqueta %{key}=%{value} tag: A páxina de descrición da etiqueta %{key}=%{value}
wikidata_link: O elemento %{page} no Wikidata wikidata_link: O elemento %{page} no Wikidata
wikipedia_link: O artigo sobre %{page} na Wikipedia wikipedia_link: O artigo sobre %{page} na Wikipedia
wikimedia_commons_link: O elemento %{page} en Wikimedia Comúns
telephone_link: Chamar a %{phone_number} telephone_link: Chamar a %{phone_number}
colour_preview: Previsualización %{colour_value} da cor colour_preview: Previsualización %{colour_value} da cor
note: note:

View file

@ -313,6 +313,7 @@ he:
tag: עמוד התיאור עבור התג %{key}=%{value} tag: עמוד התיאור עבור התג %{key}=%{value}
wikidata_link: פריט %{page} בוויקינתונים wikidata_link: פריט %{page} בוויקינתונים
wikipedia_link: הערך %{page} בוויקיפדיה wikipedia_link: הערך %{page} בוויקיפדיה
wikimedia_commons_link: הפריט %{page} בוויקישיתוף
telephone_link: להתקשר למספר %{phone_number} telephone_link: להתקשר למספר %{phone_number}
colour_preview: תצוגה מקדימה של הצבע %{colour_value} colour_preview: תצוגה מקדימה של הצבע %{colour_value}
note: note:

View file

@ -11,6 +11,7 @@
# Author: Mnalis # Author: Mnalis
# Author: Mvrban # Author: Mvrban
# Author: Nemo bis # Author: Nemo bis
# Author: Obsuser
# Author: Phidrho # Author: Phidrho
# Author: Roberta F. # Author: Roberta F.
# Author: Ruila # Author: Ruila
@ -940,7 +941,7 @@ hr:
greeting: Bok, greeting: Bok,
your_gpx_file: Liči na vašu GPX datoteku your_gpx_file: Liči na vašu GPX datoteku
with_description: s opisom 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 and_no_tags: i bez oznaka
failure: failure:
subject: '[OpenStreetMap] GPX Import nije uspio' subject: '[OpenStreetMap] GPX Import nije uspio'
@ -1506,7 +1507,7 @@ hr:
index: index:
title: Moji OAuth detalji title: Moji OAuth detalji
my_tokens: Moje odobrene aplikacije 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 application: Ime aplikacije
issued_at: Izdano u issued_at: Izdano u
revoke: Opozovi! revoke: Opozovi!
@ -1514,7 +1515,7 @@ hr:
no_apps: Imate li aplikaciju koju želite registrirati za korištenje s %{oauth} no_apps: Imate li aplikaciju koju želite registrirati za korištenje s %{oauth}
standardom? Morate registrirati svoju web aplikaciju prije nego možete dati standardom? Morate registrirati svoju web aplikaciju prije nego možete dati
OAuth zahtjeve za ovu uslugu OAuth zahtjeve za ovu uslugu
registered_apps: 'Imate registrirane slijedeće aplikacije:' registered_apps: 'Imate registrirane sljedeće aplikacije:'
register_new: Registriraj svoju aplikaciju register_new: Registriraj svoju aplikaciju
form: form:
name: Ime name: Ime
@ -1945,7 +1946,7 @@ hr:
status: Status status: Status
revoker_name: Opozvao revoker_name: Opozvao
showing_page: Stranica %{page} showing_page: Stranica %{page}
next: Slijedeća » next: Sljedeća »
previous: « Prethodna previous: « Prethodna
notes: notes:
mine: mine:

View file

@ -148,11 +148,11 @@ hu:
one: kevesebb, mint 1 másodperce one: kevesebb, mint 1 másodperce
other: kevesebb, mint %{count} másodperce other: kevesebb, mint %{count} másodperce
less_than_x_minutes: less_than_x_minutes:
one: kevesebb, mint 1 perce one: kevesebb mint 1 perce
other: kevesebb, mint %{count} perce other: kevesebb mint %{count} perce
over_x_years: over_x_years:
one: több, mint 1 éve one: több mint 1 éve
other: több, mint %{count} éve other: több mint %{count} éve
x_seconds: x_seconds:
one: 1 másodperccel ezelőtt one: 1 másodperccel ezelőtt
other: '%{count} másodperccel ezelőtt' other: '%{count} másodperccel ezelőtt'
@ -324,7 +324,7 @@ hu:
report: Jegyzet jelentése report: Jegyzet jelentése
query: query:
title: Funkciók lekérdezése 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 nearby: Közeli funkciók
enclosing: Bentfoglalt funkciók enclosing: Bentfoglalt funkciók
changesets: changesets:
@ -1282,12 +1282,12 @@ hu:
commented_note: '%{commenter} hozzászólt az egyik jegyzethez, amelyhez te commented_note: '%{commenter} hozzászólt az egyik jegyzethez, amelyhez te
is, %{place} közelében.' is, %{place} közelében.'
closed: 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, subject_other: '[OpenStreetMap] %{commenter} megoldotta az egyik jegyzetet,
amelyet te is figyelsz' amelyet te is figyelsz'
your_note: '[OpenStreetMap] %{commenter} megoldotta az egyik jegyzetedet %{place} your_note: '[OpenStreetMap] %{commenter} megoldotta az egyik jegyzetedet %{place}
közelében.' 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.' %{place} közelében.'
reopened: reopened:
subject_own: '[OpenStreetMap] %{commenter} újra megnyitotta az egyik jegyzetedet' 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_own: '[OpenStreetMap] %{commenter} hozzászólt az egyik változtatáscsomagodhoz'
subject_other: '[OpenStreetMap] %{commenter} hozzászólt az egyik, általad subject_other: '[OpenStreetMap] %{commenter} hozzászólt az egyik, általad
érdekesnek vélt változtatáscsomaghoz' é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} commented_changeset: '%{commenter} egy megjegyzést fűzött %{changeset_author}
%{time}-i módosításcsomagjához, amit figyelsz.' %{time}-i módosításcsomagjához, amit figyelsz.'
partial_changeset_with_comment: „%{changeset_comment}” megjegyzéssel partial_changeset_with_comment: „%{changeset_comment}” megjegyzéssel
@ -1316,7 +1316,7 @@ hu:
messages: messages:
inbox: inbox:
title: Beérkezett üzenetek title: Beérkezett üzenetek
my_inbox: Beérkezett üzenetek my_inbox: Beérkezett üzeneteim
outbox: Elküldött üzenetek outbox: Elküldött üzenetek
messages: '%{new_messages} és %{old_messages} van' messages: '%{new_messages} és %{old_messages} van'
new_messages: new_messages:
@ -1430,9 +1430,9 @@ hu:
english_link: az eredeti angol nyelvű english_link: az eredeti angol nyelvű
native: native:
title: Erről az oldalról title: Erről az oldalról
text: Jelenleg a szerzői jogi oldal angol nyelvű változatát látod. Visszaléphetsz 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 ezen oldalra: %{native_link}, vagy befejezheted a szerzői jogról szóló oldal
olvasását, és %{mapping_link}. és %{mapping_link} olvasását.'
native_link: magyar nyelvű változatára native_link: magyar nyelvű változatára
mapping_link: kezdheted a térképezést mapping_link: kezdheted a térképezést
legal_babble: legal_babble:
@ -1447,14 +1447,14 @@ hu:
href="https://opendatacommons.org/licenses/odbl/1.0/">jogi href="https://opendatacommons.org/licenses/odbl/1.0/">jogi
szabályzat</a> ismerteti a jogaidat és kötelezettségeidet. szabályzat</a> ismerteti a jogaidat és kötelezettségeidet.
intro_3_html: |2- 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 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. 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_title_html: Hogyan kell feltüntetned az OpenStreetMapot?
credit_1_html: Kérjük, hogy forrásként a &ldquo;&copy; OpenStreetMap közreműködők&rdquo; credit_1_html: Kérjük, hogy forrásként a &ldquo;&copy; OpenStreetMap közreműködők&rdquo;
szöveget tüntesd fel. szöveget tüntesd fel.
credit_2_html: Azt is egyértelművé kell tenned, hogy az adatok az Open Database 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ó. 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 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 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>. 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_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, elérhető adatokat is felhasználunk nemzeti térkép intézetektől és más forrásokból,
többek között:' többek között:'
contributors_at_html: |- contributors_at_html: |-
@ -1600,11 +1600,11 @@ hu:
overpass: overpass:
title: Overpass API title: Overpass API
description: A megjelenített befoglaló keret letöltése egy OpenStreetMap description: A megjelenített befoglaló keret letöltése egy OpenStreetMap
tükörserverről tükörszerverről
geofabrik: geofabrik:
title: Geofabrik letöltések title: Geofabrik letöltések
description: Kontinensek, országok és kiválasztott városok rendszeresen description: Kontinensek, országok és kiválasztott városok rendszeresen
frissített kivonata frissített kivonatai
metro: metro:
title: Metro Extracts title: Metro Extracts
description: A főbb városok, valamint a környező területek kivonatai description: A főbb városok, valamint a környező területek kivonatai
@ -1651,7 +1651,7 @@ hu:
welcome: welcome:
url: /welcome url: /welcome
title: Üdvözlünk az OpenStreetMapen title: Üdvözlünk az OpenStreetMapen
description: Eza gyors útmutató megismertet az OpenStreetMap alapjaival. description: Ez a gyors útmutató megismertet az OpenStreetMap alapjaival.
beginners_guide: beginners_guide:
url: https://wiki.openstreetmap.org/wiki/Hu:Beginners%27_guide url: https://wiki.openstreetmap.org/wiki/Hu:Beginners%27_guide
title: Kezdők kézikönyve title: Kezdők kézikönyve

View file

@ -71,7 +71,7 @@ ia:
tracetag: Etiquetta de tracia tracetag: Etiquetta de tracia
user: Usator user: Usator
user_preference: Preferentias de usator user_preference: Preferentias de usator
user_token: Indicio de usator user_token: Token del usator
way: Via way: Via
way_node: Nodo de via way_node: Nodo de via
way_tag: Etiquetta de via way_tag: Etiquetta de via
@ -283,6 +283,7 @@ ia:
tag: Le pagina wiki que describe le etiquetta %{key}=%{value} tag: Le pagina wiki que describe le etiquetta %{key}=%{value}
wikidata_link: Le elemento %{page} in Wikidata wikidata_link: Le elemento %{page} in Wikidata
wikipedia_link: Le articulo %{page} in Wikipedia wikipedia_link: Le articulo %{page} in Wikipedia
wikimedia_commons_link: Le objecto %{page} sur Wikimedia Commons
telephone_link: Telephonar %{phone_number} telephone_link: Telephonar %{phone_number}
colour_preview: Previsualisation del color %{colour_value} colour_preview: Previsualisation del color %{colour_value}
note: note:
@ -1964,9 +1965,9 @@ ia:
authorize_failure: authorize_failure:
title: Requesta de autorisation fallite title: Requesta de autorisation fallite
denied: Tu ha refusate al application %{app_name} le accesso a tu conto. 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: revoke:
flash: Tu ha revocate le indicio pro %{application} flash: Tu ha revocate le token pro %{application}
permissions: permissions:
missing: Tu non ha permittite al application le accesso a iste facilitate missing: Tu non ha permittite al application le accesso a iste facilitate
oauth_clients: oauth_clients:
@ -1978,8 +1979,8 @@ ia:
title: Detalios OAuth pro %{app_name} title: Detalios OAuth pro %{app_name}
key: 'Clave de consumitor:' key: 'Clave de consumitor:'
secret: 'Secreto de consumitor:' secret: 'Secreto de consumitor:'
url: 'URL del indicio de requesta:' url: 'URL del token de requesta:'
access_url: 'URL del indicio de accesso:' access_url: 'URL del token de accesso:'
authorize_url: 'URL de autorisation:' authorize_url: 'URL de autorisation:'
support_notice: Nos supporta le signaturas HMAC-SHA1 (recommendate) e RSA-SHA1. support_notice: Nos supporta le signaturas HMAC-SHA1 (recommendate) e RSA-SHA1.
edit: Modificar detalios edit: Modificar detalios
@ -1996,8 +1997,7 @@ ia:
index: index:
title: Mi detalios OAuth title: Mi detalios OAuth
my_tokens: Mi applicationes autorisate my_tokens: Mi applicationes autorisate
list_tokens: 'Le sequente indicios ha essite emittite a applicationes in tu list_tokens: 'Le sequente tokens ha essite emittite a applicationes in tu nomine:'
nomine:'
application: Nomine del application application: Nomine del application
issued_at: Emittite le issued_at: Emittite le
revoke: Revocar! revoke: Revocar!
@ -2105,7 +2105,7 @@ ia:
confirm password: 'Confirma contrasigno:' confirm password: 'Confirma contrasigno:'
reset: Reinitialisar contrasigno reset: Reinitialisar contrasigno
flash changed: Tu contrasigno ha essite cambiate. 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: new:
title: Crear conto title: Crear conto
no_auto_account_create: Infortunatemente in iste momento non es possibile crear no_auto_account_create: Infortunatemente in iste momento non es possibile crear
@ -2333,7 +2333,7 @@ ia:
adresse de e-mail. adresse de e-mail.
button: Confirmar button: Confirmar
success: Le cambio del adresse de e-mail ha essite confirmate. 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. unknown_token: Iste codice de confirmation ha expirate o non existe.
set_home: set_home:
flash success: Position de origine confirmate con successo flash success: Position de origine confirmate con successo

View file

@ -20,6 +20,7 @@
# Author: Frubino # Author: Frubino
# Author: Gianfranco # Author: Gianfranco
# Author: Isiond # Author: Isiond
# Author: Jlrb+
# Author: Kaitu # Author: Kaitu
# Author: Karika # Author: Karika
# Author: Lollo # Author: Lollo
@ -1637,7 +1638,7 @@ it:
geofabrik: geofabrik:
title: Geofabrik Downloads title: Geofabrik Downloads
description: Estratti aggiornati regolarmente di continenti, paesi, e città description: Estratti aggiornati regolarmente di continenti, paesi, e città
selezionata selezionate
metro: metro:
title: Metro Extracts title: Metro Extracts
description: Estratti per le principali città del mondo e le loro aree circostanti description: Estratti per le principali città del mondo e le loro aree circostanti

View file

@ -37,6 +37,7 @@
# Author: Wrightbus # Author: Wrightbus
# Author: Yusuke1109 # Author: Yusuke1109
# Author: ネイ # Author: ネイ
# Author: 沈澄心
# Author: 神樂坂秀吉 # Author: 神樂坂秀吉
# Author: 青子守歌 # Author: 青子守歌
# Author: 아라 # Author: 아라
@ -1784,7 +1785,9 @@ ja:
newer: 以降のトレース newer: 以降のトレース
trace: trace:
pending: 処理中 pending: 処理中
count_points: '%{count} 個の点' count_points:
one: 1個の点
other: '%{count}個の点'
more: 詳細 more: 詳細
trace_details: トレースの詳細表示 trace_details: トレースの詳細表示
view_map: 地図で表示 view_map: 地図で表示

View file

@ -286,6 +286,7 @@ mk:
tag: Вики-страницата за ознаката %{key}=%{value} tag: Вики-страницата за ознаката %{key}=%{value}
wikidata_link: Предметот за %{page} на Википодатоци wikidata_link: Предметот за %{page} на Википодатоци
wikipedia_link: Статијата %{page} на Википедија wikipedia_link: Статијата %{page} на Википедија
wikimedia_commons_link: Ставката %{page} на Ризницата
telephone_link: Јави се на %{phone_number} telephone_link: Јави се на %{phone_number}
colour_preview: Преглед на бојата %{colour_value} colour_preview: Преглед на бојата %{colour_value}
note: note:

View file

@ -2516,7 +2516,7 @@ nb:
gps: Offentlige GPS-sporinger gps: Offentlige GPS-sporinger
overlays: Aktiver overlag for å feilsøke kartet overlays: Aktiver overlag for å feilsøke kartet
title: Lag 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> donate_link_text: <a class='donate-attr' href='%{donate_url}'>Gi en donasjon</a>
site: site:
edit_tooltip: Rediger kartet edit_tooltip: Rediger kartet

View file

@ -349,6 +349,7 @@ pl:
tag: Strona wiki dla znacznika %{key}=%{value} tag: Strona wiki dla znacznika %{key}=%{value}
wikidata_link: '%{page} element na Wikidata' wikidata_link: '%{page} element na Wikidata'
wikipedia_link: Artykuł %{page} w Wikipedii wikipedia_link: Artykuł %{page} w Wikipedii
wikimedia_commons_link: Plik %{page} na Wikimedia Commons
telephone_link: Zadzwoń pod %{phone_number} telephone_link: Zadzwoń pod %{phone_number}
colour_preview: Podgląd koloru %{colour_value} colour_preview: Podgląd koloru %{colour_value}
note: note:

View file

@ -326,6 +326,7 @@ pt-BR:
tag: A página no wiki com a descrição da etiqueta %{key}=%{value} tag: A página no wiki com a descrição da etiqueta %{key}=%{value}
wikidata_link: O item %{page} no Wikidata wikidata_link: O item %{page} no Wikidata
wikipedia_link: O artigo %{page} na Wikipédia wikipedia_link: O artigo %{page} na Wikipédia
wikimedia_commons_link: A %{page} de item mo Wikimedia Commons
telephone_link: Ligar para %{phone_number} telephone_link: Ligar para %{phone_number}
colour_preview: Pré-visualização da cor %{colour_value} colour_preview: Pré-visualização da cor %{colour_value}
note: note:

View file

@ -311,6 +311,7 @@ pt-PT:
tag: A página wiki com a descrição da etiqueta %{key}=%{value} tag: A página wiki com a descrição da etiqueta %{key}=%{value}
wikidata_link: O item %{page} como Wikidata wikidata_link: O item %{page} como Wikidata
wikipedia_link: A página %{page} na Wikipédia wikipedia_link: A página %{page} na Wikipédia
wikimedia_commons_link: O item %{page} na Wikimedia Commons
telephone_link: Telefonar %{phone_number} telephone_link: Telefonar %{phone_number}
colour_preview: Antevisão da cor %{colour_value} colour_preview: Antevisão da cor %{colour_value}
note: note:

View file

@ -12,6 +12,7 @@
# Author: Erdemaslancan # Author: Erdemaslancan
# Author: George Animal # Author: George Animal
# Author: Gizemb # Author: Gizemb
# Author: Grkn gll
# Author: Hedda # Author: Hedda
# Author: Imabadplayer # Author: Imabadplayer
# Author: Incelemeelemani # Author: Incelemeelemani
@ -314,8 +315,9 @@ tr:
wiki_link: wiki_link:
key: '%{key} parametresi için Viki açıklaması' key: '%{key} parametresi için Viki açıklaması'
tag: '%{key}=%{value} parametresi için Viki açıklaması' tag: '%{key}=%{value} parametresi için Viki açıklaması'
wikidata_link: Vikidatada bulunan %{page} ögesi wikidata_link: Vikidata'da bulunan %{page} öğesi
wikipedia_link: '%{page} hakkında Vikipedi maddesi' wikipedia_link: Vikipedi'deki %{page} makalesi
wikimedia_commons_link: Wikimedia Commons'daki %{page} maddesi
telephone_link: '%{phone_number} ara' telephone_link: '%{phone_number} ara'
colour_preview: Renk %{colour_value} önizleme colour_preview: Renk %{colour_value} önizleme
note: note:

View file

@ -119,6 +119,10 @@ tt:
one: 1 ел элек one: 1 ел элек
other: '%{count} ел элек' other: '%{count} ел элек'
editor: editor:
potlatch:
name: Potlatch 1
id:
name: iD
remote: remote:
name: Дистанцион идарә name: Дистанцион идарә
description: Дистанционн идарә (JOSM яки Merkaartor) description: Дистанционн идарә (JOSM яки Merkaartor)
@ -495,7 +499,7 @@ tt:
fish: Балык кибете fish: Балык кибете
florist: Чәчәк кибете florist: Чәчәк кибете
food: Ашамлыклар food: Ашамлыклар
gallery: Галерея gallery: Җыелма
market: Базар market: Базар
pharmacy: Даруханә pharmacy: Даруханә
tailor: Тегүче tailor: Тегүче
@ -681,7 +685,7 @@ tt:
preview: Алдан карау preview: Алдан карау
markdown_help: markdown_help:
headings: Башлыклар headings: Башлыклар
heading: Башлык heading: Бүлек башы
link: Сылтама link: Сылтама
text: Текст text: Текст
image: Сурәт image: Сурәт

View file

@ -328,6 +328,7 @@ uk:
tag: Сторінка вікі, що описує теґ %{key}=%{value} tag: Сторінка вікі, що описує теґ %{key}=%{value}
wikidata_link: '%{page} елемент на Вікіданих' wikidata_link: '%{page} елемент на Вікіданих'
wikipedia_link: Стаття %{page} у Вікіпедії wikipedia_link: Стаття %{page} у Вікіпедії
wikimedia_commons_link: Сторінка %{page} у Вікісховищі
telephone_link: Зателефонуйте на %{phone_number} telephone_link: Зателефонуйте на %{phone_number}
colour_preview: Перегляд кольору %{colour_value} colour_preview: Перегляд кольору %{colour_value}
note: note:
@ -1329,10 +1330,10 @@ uk:
змін' змін'
subject_other: '[OpenStreetMap] %{commenter} прокоментував набір змін, до subject_other: '[OpenStreetMap] %{commenter} прокоментував набір змін, до
якого ви залишали свій коментар' якого ви залишали свій коментар'
your_changeset: '%{commenter} залишив коментар до одного з ваших наборів змін, your_changeset: '%{commenter} залишив коментар у %{time} до одного з ваших
створених %{time}' наборів змін'
commented_changeset: '%{commenter} залишив коментар до набору змін, що ви commented_changeset: '%{commenter} залишив коментар у %{time} до набору змін,
переглядаєте, створений %{changeset_author}  %{time}' що ви переглядаєте, створений %{changeset_author}'
partial_changeset_with_comment: з коментарем '%{changeset_comment}' partial_changeset_with_comment: з коментарем '%{changeset_comment}'
partial_changeset_without_comment: без коментарів partial_changeset_without_comment: без коментарів
details: |2- details: |2-

View file

@ -42,6 +42,7 @@
# Author: 予弦 # Author: 予弦
# Author: 夢蝶葬花 # Author: 夢蝶葬花
# Author: 水獭很懒 # Author: 水獭很懒
# Author: 沈澄心
# Author: 神樂坂秀吉 # Author: 神樂坂秀吉
# Author: 阿pp # Author: 阿pp
# Author: 아라 # Author: 아라
@ -323,6 +324,7 @@ zh-CN:
tag: '%{key}=%{value} 标签的 wiki 说明页面' tag: '%{key}=%{value} 标签的 wiki 说明页面'
wikidata_link: 维基数据上的%{page}项 wikidata_link: 维基数据上的%{page}项
wikipedia_link: 维基百科上的 %{page} 条目 wikipedia_link: 维基百科上的 %{page} 条目
wikimedia_commons_link: 在维基共享资源上的%{page}项目
telephone_link: 请拨打 %{phone_number} telephone_link: 请拨打 %{phone_number}
colour_preview: '%{colour_value}的颜色预览' colour_preview: '%{colour_value}的颜色预览'
note: note:
@ -1296,8 +1298,8 @@ zh-CN:
commented: commented:
subject_own: '[OpenStreetMap] %{commenter}在您的一个修改集合中做出了评论' subject_own: '[OpenStreetMap] %{commenter}在您的一个修改集合中做出了评论'
subject_other: '[OpenStreetMap] %{commenter} 评论了您感兴趣的一个修改集合' subject_other: '[OpenStreetMap] %{commenter} 评论了您感兴趣的一个修改集合'
your_changeset: '%{commenter} 在您于 %{time} 创建的一个修改集合留了言' your_changeset: '%{commenter} 于 %{time} 在您创建的一个修改集合留了言'
commented_changeset: '%{commenter} 在您监视的由 %{changeset_author} 于 %{time} 创建的一个地图修改集合中留了言' commented_changeset: '%{commenter} 于 %{time} 在您监视的由 %{changeset_author} 创建的一个地图修改集合中留了言'
partial_changeset_with_comment: 带评论“%{changeset_comment}” partial_changeset_with_comment: 带评论“%{changeset_comment}”
partial_changeset_without_comment: 没有评论 partial_changeset_without_comment: 没有评论
details: 更多关于修改集合的详细信息可以在 %{url} 找到。 details: 更多关于修改集合的详细信息可以在 %{url} 找到。
@ -1784,7 +1786,9 @@ zh-CN:
newer: 较新轨迹 newer: 较新轨迹
trace: trace:
pending: 挂起 pending: 挂起
count_points: '%{count} 个点' count_points:
one: 1个点
other: '%{count}个点'
more: 更多 more: 更多
trace_details: 查看轨迹详情 trace_details: 查看轨迹详情
view_map: 查看地图 view_map: 查看地图
@ -2019,7 +2023,7 @@ zh-CN:
read_ct: 我已了解并同意贡献者条款 read_ct: 我已了解并同意贡献者条款
tou_explain_html: 这些%{tou_link}适用于网站方面的使用与其它由OSMF提供的基础内容。请点击链接阅读并同意该条款。 tou_explain_html: 这些%{tou_link}适用于网站方面的使用与其它由OSMF提供的基础内容。请点击链接阅读并同意该条款。
read_tou: 我已阅读并同意使用条款 read_tou: 我已阅读并同意使用条款
consider_pd: 除了上述协议,我同意将我的贡献授权为公共领域 consider_pd: 除了上述协议,我同意将我的贡献释于公有领域
consider_pd_why: 这是什么? consider_pd_why: 这是什么?
consider_pd_why_url: http://www.osmfoundation.org/wiki/License/Why_would_I_want_my_contributions_to_be_public_domain 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> guidance: 帮助理解这些条款的信息:一个<a href="%{summary}">可读的摘要</a>和一些<a href="%{translations}">非正式翻译</a>
@ -2131,7 +2135,7 @@ zh-CN:
agreed: 您已同意新的贡献者条款。 agreed: 您已同意新的贡献者条款。
not yet agreed: 您还没有同意新的贡献者条款。 not yet agreed: 您还没有同意新的贡献者条款。
review link text: 请跟随此链接,方便您查看并接受新的贡献者条款。 review link text: 请跟随此链接,方便您查看并接受新的贡献者条款。
agreed_with_pd: 您也将您的编辑释于公领域。 agreed_with_pd: 您也将您的编辑释于公领域。
link: https://www.osmfoundation.org/wiki/License/Contributor_Terms link: https://www.osmfoundation.org/wiki/License/Contributor_Terms
link text: 这是什么? link text: 这是什么?
profile description: 基本信息说明: profile description: 基本信息说明:

View file

@ -315,6 +315,7 @@ zh-TW:
tag: '%{key}=%{value} 標籤的 Wiki 說明頁面' tag: '%{key}=%{value} 標籤的 Wiki 說明頁面'
wikidata_link: 維基數據上的 %{page} 項目 wikidata_link: 維基數據上的 %{page} 項目
wikipedia_link: 維基百科上的 %{page} 條目 wikipedia_link: 維基百科上的 %{page} 條目
wikimedia_commons_link: 在維基共享資源上的%{page}項目
telephone_link: 致電 %{phone_number} telephone_link: 致電 %{phone_number}
colour_preview: 色彩%{colour_value}預覽 colour_preview: 色彩%{colour_value}預覽
note: note:
@ -1290,8 +1291,8 @@ zh-TW:
commented: commented:
subject_own: '[OpenStreetMap] %{commenter}% 在您的變更集評論' subject_own: '[OpenStreetMap] %{commenter}% 在您的變更集評論'
subject_other: '[OpenStreetMap] %{commenter} 就您感興趣的變更集評論' subject_other: '[OpenStreetMap] %{commenter} 就您感興趣的變更集評論'
your_changeset: '%{commenter} 在您於 %{time} 建立的變更集評論' your_changeset: '%{commenter}於 %{time} 在您的變更集之一裡留下了評論'
commented_changeset: '%{commenter} 在您監視,由 %{changeset_author} 於 %{time} 建立的變更集評論' commented_changeset: '%{commenter}於 %{time} 在您監視的由%{changeset_author}所建立變更集裡留下了評論'
partial_changeset_with_comment: 評論 "%{changeset_comment}" partial_changeset_with_comment: 評論 "%{changeset_comment}"
partial_changeset_without_comment: 沒有評論 partial_changeset_without_comment: 沒有評論
details: 關於變更集的詳情可在 %{url} 找到。 details: 關於變更集的詳情可在 %{url} 找到。

View file

@ -67,11 +67,11 @@ OpenStreetMap::Application.routes.draw do
get "user/gpx_files" => "api/users#gpx_files" get "user/gpx_files" => "api/users#gpx_files"
get "users" => "api/users#index", :as => :api_users get "users" => "api/users#index", :as => :api_users
get "user/preferences" => "api/user_preferences#read" get "user/preferences" => "api/user_preferences#index"
get "user/preferences/:preference_key" => "api/user_preferences#read_one" get "user/preferences/:preference_key" => "api/user_preferences#show"
put "user/preferences" => "api/user_preferences#update" put "user/preferences" => "api/user_preferences#update_all"
put "user/preferences/:preference_key" => "api/user_preferences#update_one" put "user/preferences/:preference_key" => "api/user_preferences#update"
delete "user/preferences/:preference_key" => "api/user_preferences#delete_one" delete "user/preferences/:preference_key" => "api/user_preferences#destroy"
post "gpx/create" => "api/traces#create" post "gpx/create" => "api/traces#create"
get "gpx/:id" => "api/traces#show", :id => /\d+/ get "gpx/:id" => "api/traces#show", :id => /\d+/

View 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

View file

@ -1394,7 +1394,6 @@ CREATE TABLE public.users (
home_lat double precision, home_lat double precision,
home_lon double precision, home_lon double precision,
home_zoom smallint DEFAULT 3, home_zoom smallint DEFAULT 3,
nearby integer DEFAULT 50,
pass_salt character varying, pass_salt character varying,
email_valid boolean DEFAULT false NOT NULL, email_valid boolean DEFAULT false NOT NULL,
new_email character varying, new_email character varying,
@ -3137,6 +3136,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20190623093642'), ('20190623093642'),
('20190702193519'), ('20190702193519'),
('20190716173946'), ('20190716173946'),
('20191120140058'),
('21'), ('21'),
('22'), ('22'),
('23'), ('23'),

View file

@ -100,33 +100,33 @@ class UserApiCapabilityTest < ApiCapabilityTest
test "user preferences" do test "user preferences" do
# a user with no tokens # a user with no tokens
capability = ApiCapability.new nil 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 assert capability.cannot? act, UserPreference
end end
# A user with empty tokens # A user with empty tokens
capability = ApiCapability.new 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 assert capability.cannot? act, UserPreference
end end
capability = ApiCapability.new tokens(:allow_read_prefs) 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 assert capability.cannot? act, UserPreference
end end
[:read, :read_one].each do |act| [:index, :show].each do |act|
assert capability.can? act, UserPreference assert capability.can? act, UserPreference
end end
capability = ApiCapability.new tokens(:allow_write_prefs) capability = ApiCapability.new tokens(:allow_write_prefs)
[:read, :read_one].each do |act| [:index, :show].each do |act|
assert capability.cannot? act, UserPreference assert capability.cannot? act, UserPreference
end end
[:update, :update_one, :delete_one].each do |act| [:update_all, :update, :destroy].each do |act|
assert capability.can? act, UserPreference assert capability.can? act, UserPreference
end end
end end

View file

@ -458,10 +458,10 @@ CHANGESET
diff.root = XML::Node.new "osmChange" diff.root = XML::Node.new "osmChange"
delete = XML::Node.new "delete" delete = XML::Node.new "delete"
diff.root << delete diff.root << delete
delete << super_relation.to_xml_node delete << xml_node_for_relation(super_relation)
delete << used_relation.to_xml_node delete << xml_node_for_relation(used_relation)
delete << used_way.to_xml_node delete << xml_node_for_way(used_way)
delete << used_node.to_xml_node delete << xml_node_for_node(used_node)
# update the changeset to one that this user owns # update the changeset to one that this user owns
%w[node way relation].each do |type| %w[node way relation].each do |type|
@ -590,9 +590,9 @@ CHANGESET
diff.root = XML::Node.new "osmChange" diff.root = XML::Node.new "osmChange"
delete = XML::Node.new "delete" delete = XML::Node.new "delete"
diff.root << delete diff.root << delete
delete << other_relation.to_xml_node delete << xml_node_for_relation(other_relation)
delete << used_way.to_xml_node delete << xml_node_for_way(used_way)
delete << used_node.to_xml_node delete << xml_node_for_node(used_node)
# update the changeset to one that this user owns # update the changeset to one that this user owns
%w[node way relation].each do |type| %w[node way relation].each do |type|
@ -633,9 +633,9 @@ CHANGESET
delete = XML::Node.new "delete" delete = XML::Node.new "delete"
diff.root << delete diff.root << delete
delete["if-unused"] = "" delete["if-unused"] = ""
delete << used_relation.to_xml_node delete << xml_node_for_relation(used_relation)
delete << used_way.to_xml_node delete << xml_node_for_way(used_way)
delete << used_node.to_xml_node delete << xml_node_for_node(used_node)
# update the changeset to one that this user owns # update the changeset to one that this user owns
%w[node way relation].each do |type| %w[node way relation].each do |type|
@ -1137,7 +1137,7 @@ CHANGESET
diff = XML::Document.new diff = XML::Document.new
diff.root = XML::Node.new "osmChange" diff.root = XML::Node.new "osmChange"
modify = XML::Node.new "modify" 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["lat"] = 2.0.to_s
xml_old_node["lon"] = 2.0.to_s xml_old_node["lon"] = 2.0.to_s
xml_old_node["changeset"] = changeset_id.to_s xml_old_node["changeset"] = changeset_id.to_s
@ -1175,7 +1175,7 @@ CHANGESET
diff = XML::Document.new diff = XML::Document.new
diff.root = XML::Node.new "osmChange" diff.root = XML::Node.new "osmChange"
modify = XML::Node.new "modify" 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 = XML::Node.new "nd"
nd_ref["ref"] = create(:node, :lat => 3, :lon => 3).id.to_s nd_ref["ref"] = create(:node, :lat => 3, :lon => 3).id.to_s
xml_old_way << nd_ref xml_old_way << nd_ref
@ -1228,7 +1228,7 @@ CHANGESET
diff.root = XML::Node.new "osmChange" diff.root = XML::Node.new "osmChange"
delete = XML::Node.new "delete" delete = XML::Node.new "delete"
diff.root << delete diff.root << delete
delete << node.to_xml_node delete << xml_node_for_node(node)
# upload it # upload it
error_format "xml" error_format "xml"
@ -1487,7 +1487,7 @@ CHANGESET
# add (delete) a way to it, which contains a point at (3,3) # add (delete) a way to it, which contains a point at (3,3)
with_controller(WaysController.new) do 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 put :delete, :params => { :id => way.id }, :body => xml.to_s
assert_response :success, "Couldn't delete a way." assert_response :success, "Couldn't delete a way."
end end

View file

@ -147,6 +147,15 @@ module Api
assert_response :not_found assert_response :not_found
end 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 # this tests deletion restrictions - basic deletion is tested in the unit
# tests for node! # tests for node!
def test_delete def test_delete
@ -164,22 +173,22 @@ module Api
basic_authorization private_user.email, "test" basic_authorization private_user.email, "test"
# try to delete with an invalid (closed) changeset # 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 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") assert_require_public_data("non-public user shouldn't be able to delete node")
# try to delete with an invalid (non-existent) changeset # 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 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") assert_require_public_data("shouldn't be able to delete node, when user's data is private")
# valid delete now takes a payload # 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 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'") 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 # 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 delete :delete, :params => { :id => private_deleted_node.id }, :body => xml.to_s
assert_require_public_data assert_require_public_data
@ -192,7 +201,7 @@ module Api
private_used_node = create(:node, :changeset => private_user_changeset) private_used_node = create(:node, :changeset => private_user_changeset)
create(:way_node, :node => private_used_node) 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 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})" 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) private_used_node2 = create(:node, :changeset => private_user_changeset)
create(:relation_member, :member => private_used_node2) 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 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})" 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" basic_authorization user.email, "test"
# try to delete with an invalid (closed) changeset # 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 delete :delete, :params => { :id => node.id }, :body => xml.to_s
assert_response :conflict assert_response :conflict
# try to delete with an invalid (non-existent) changeset # 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 delete :delete, :params => { :id => node.id }, :body => xml.to_s
assert_response :conflict assert_response :conflict
# try to delete a node with a different ID # try to delete a node with a different ID
other_node = create(:node) 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 delete :delete, :params => { :id => node.id }, :body => xml.to_s
assert_response :bad_request, assert_response :bad_request,
"should not be able to delete a node with a different ID from the XML" "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" "should not be able to delete a node without a valid XML payload"
# valid delete now takes a 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 delete :delete, :params => { :id => node.id }, :body => xml.to_s
assert_response :success assert_response :success
@ -245,7 +254,7 @@ module Api
"delete request should return a new version number for node" "delete request should return a new version number for node"
# deleting the same node twice doesn't work # 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 delete :delete, :params => { :id => node.id }, :body => xml.to_s
assert_response :gone assert_response :gone
@ -259,7 +268,7 @@ module Api
way_node = create(:way_node, :node => used_node) way_node = create(:way_node, :node => used_node)
way_node2 = 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 delete :delete, :params => { :id => used_node.id }, :body => xml.to_s
assert_response :precondition_failed, assert_response :precondition_failed,
"shouldn't be able to delete a node used in a way (#{@response.body})" "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_member = create(:relation_member, :member => used_node2)
relation_member2 = 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 delete :delete, :params => { :id => used_node2.id }, :body => xml.to_s
assert_response :precondition_failed, assert_response :precondition_failed,
"shouldn't be able to delete a node used in a relation (#{@response.body})" "shouldn't be able to delete a node used in a relation (#{@response.body})"
@ -289,7 +298,7 @@ module Api
user = create(:user) user = create(:user)
node = create(:node, :changeset => create(:changeset, :user => 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 put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :unauthorized assert_response :unauthorized
@ -301,41 +310,41 @@ module Api
## trying to break changesets ## trying to break changesets
# try and update in someone else's changeset # 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) create(:changeset).id)
put :update, :params => { :id => private_node.id }, :body => xml.to_s 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" 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 # 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) create(:changeset, :closed, :user => private_user).id)
put :update, :params => { :id => private_node.id }, :body => xml.to_s 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" assert_require_public_data "update with closed changeset should be forbidden, when data isn't public"
# try and update in a non-existant changeset # 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 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" assert_require_public_data "update with changeset=0 should be forbidden, when data isn't public"
## try and submit invalid updates ## 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 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" 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 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" 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 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" 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 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" 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 ## 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 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" 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 # try and update a node without authorisation
# first try to update node without auth # 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 put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :forbidden assert_response :forbidden
@ -353,36 +362,36 @@ module Api
## trying to break changesets ## trying to break changesets
# try and update in someone else's changeset # try and update in someone else's changeset
xml = update_changeset(node.to_xml, xml = update_changeset(xml_for_node(node),
create(:changeset).id) create(:changeset).id)
put :update, :params => { :id => node.id }, :body => xml.to_s put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :conflict, "update with other user's changeset should be rejected" assert_response :conflict, "update with other user's changeset should be rejected"
# try and update in a closed changeset # 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) create(:changeset, :closed, :user => user).id)
put :update, :params => { :id => node.id }, :body => xml.to_s put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :conflict, "update with closed changeset should be rejected" assert_response :conflict, "update with closed changeset should be rejected"
# try and update in a non-existant changeset # 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 put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :conflict, "update with changeset=0 should be rejected" assert_response :conflict, "update with changeset=0 should be rejected"
## try and submit invalid updates ## 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 put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :bad_request, "node at lat=91 should be rejected" 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 put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :bad_request, "node at lat=-91 should be rejected" 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 put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :bad_request, "node at lon=181 should be rejected" 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 put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :bad_request, "node at lon=-181 should be rejected" assert_response :bad_request, "node at lon=-181 should be rejected"
@ -390,26 +399,26 @@ module Api
current_node_version = node.version current_node_version = node.version
# try and submit a version behind # 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) "version", current_node_version - 1)
put :update, :params => { :id => node.id }, :body => xml.to_s put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :conflict, "should have failed on old version number" assert_response :conflict, "should have failed on old version number"
# try and submit a version ahead # 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) "version", current_node_version + 1)
put :update, :params => { :id => node.id }, :body => xml.to_s put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :conflict, "should have failed on skipped version number" assert_response :conflict, "should have failed on skipped version number"
# try and submit total crap in the version field # 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!") "version", "p1r4t3s!")
put :update, :params => { :id => node.id }, :body => xml.to_s put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :conflict, assert_response :conflict,
"should not be able to put 'p1r4at3s!' in the version field" "should not be able to put 'p1r4at3s!' in the version field"
## try an update with the wrong ID ## 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 put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :bad_request, assert_response :bad_request,
"should not be able to update a node with a different ID from the XML" "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." "should not be able to update a node with non-OSM XML doc."
## finally, produce a good request which should work ## 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 put :update, :params => { :id => node.id }, :body => xml.to_s
assert_response :success, "a valid update request failed" assert_response :success, "a valid update request failed"
end end
@ -474,7 +483,7 @@ module Api
tag_xml["v"] = existing_tag.v tag_xml["v"] = existing_tag.v
# add the tag into the existing xml # 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 node_xml.find("//osm/node").first << tag_xml
# try and upload it # try and upload it

View file

@ -43,7 +43,7 @@ module Api
basic_authorization private_user.email, "test" basic_authorization private_user.email, "test"
# setup a simple XML node # 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 xml_node = xml_doc.find("//osm/node").first
nodeid = private_node.id nodeid = private_node.id
@ -91,7 +91,7 @@ module Api
# setup a simple XML node # setup a simple XML node
xml_doc = node.to_xml xml_doc = xml_for_node(node)
xml_node = xml_doc.find("//osm/node").first xml_node = xml_doc.find("//osm/node").first
nodeid = node.id nodeid = node.id

View file

@ -525,28 +525,28 @@ module Api
assert_response :forbidden assert_response :forbidden
# try to delete with an invalid (closed) changeset # 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) private_user_closed_changeset.id)
delete :delete, :params => { :id => relation.id }, :body => xml.to_s delete :delete, :params => { :id => relation.id }, :body => xml.to_s
assert_response :forbidden assert_response :forbidden
# try to delete with an invalid (non-existent) changeset # 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 delete :delete, :params => { :id => relation.id }, :body => xml.to_s
assert_response :forbidden assert_response :forbidden
# this won't work because the relation is in-use by another relation # 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 delete :delete, :params => { :id => used_relation.id }, :body => xml.to_s
assert_response :forbidden assert_response :forbidden
# this should work when we provide the appropriate payload... # 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 delete :delete, :params => { :id => relation.id }, :body => xml.to_s
assert_response :forbidden assert_response :forbidden
# this won't work since the relation is already deleted # 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 delete :delete, :params => { :id => deleted_relation.id }, :body => xml.to_s
assert_response :forbidden assert_response :forbidden
@ -568,36 +568,36 @@ module Api
assert_match(/Changeset id is missing/, @response.body) assert_match(/Changeset id is missing/, @response.body)
# try to delete with an invalid (closed) changeset # try to delete with an invalid (closed) changeset
xml = update_changeset(relation.to_xml, xml = update_changeset(xml_for_relation(relation),
closed_changeset.id) closed_changeset.id)
delete :delete, :params => { :id => relation.id }, :body => xml.to_s delete :delete, :params => { :id => relation.id }, :body => xml.to_s
assert_response :conflict assert_response :conflict
# try to delete with an invalid (non-existent) changeset # 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 delete :delete, :params => { :id => relation.id }, :body => xml.to_s
assert_response :conflict assert_response :conflict
# this won't work because the relation is in a changeset owned by someone else # 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 delete :delete, :params => { :id => relation.id }, :body => xml.to_s
assert_response :conflict, assert_response :conflict,
"shouldn't be able to delete a relation in a changeset owned by someone else (#{@response.body})" "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 # 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 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" 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 # 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 delete :delete, :params => { :id => used_relation.id }, :body => xml.to_s
assert_response :precondition_failed, assert_response :precondition_failed,
"shouldn't be able to delete a relation used in a relation (#{@response.body})" "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 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... # 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 delete :delete, :params => { :id => multi_tag_relation.id }, :body => xml.to_s
assert_response :success assert_response :success
@ -607,18 +607,18 @@ module Api
"delete request should return a new version number for relation" "delete request should return a new version number for relation"
# this won't work since the relation is already deleted # 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 delete :delete, :params => { :id => deleted_relation.id }, :body => xml.to_s
assert_response :gone assert_response :gone
# Public visible relation needs to be deleted # 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 delete :delete, :params => { :id => super_relation.id }, :body => xml.to_s
assert_response :success assert_response :success
# this works now because the relation which was using this one # this works now because the relation which was using this one
# has been deleted. # 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 delete :delete, :params => { :id => used_relation.id }, :body => xml.to_s
assert_response :success, assert_response :success,
"should be able to delete a relation used in an old relation (#{@response.body})" "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]. # 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| check_changeset_modify(BoundingBox.new(3, 3, 5, 5)) do |changeset_id|
# add a tag to an existing relation # 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 relation_element = relation_xml.find("//osm/relation").first
new_tag = XML::Node.new("tag") new_tag = XML::Node.new("tag")
new_tag["k"] = "some_new_tag" new_tag["k"] = "some_new_tag"
@ -675,7 +675,7 @@ module Api
[node1, node2, way1, way2].each do |element| [node1, node2, way1, way2].each do |element|
bbox = element.bbox.to_unscaled bbox = element.bbox.to_unscaled
check_changeset_modify(bbox) do |changeset_id| 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 relation_element = relation_xml.find("//osm/relation").first
new_member = XML::Node.new("member") new_member = XML::Node.new("member")
new_member["ref"] = element.id.to_s 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| check_changeset_modify(BoundingBox.new(5, 5, 5, 5)) do |changeset_id|
# remove node 5 (5,5) from an existing relation # remove node 5 (5,5) from an existing relation
relation_xml = relation.to_xml relation_xml = xml_for_relation(relation)
relation_xml relation_xml
.find("//osm/relation/member[@type='node'][@ref='#{node2.id}']") .find("//osm/relation/member[@type='node'][@ref='#{node2.id}']")
.first.remove! .first.remove!
@ -879,7 +879,7 @@ OSM
create(:relation_member, :relation => relation, :member => node2) create(:relation_member, :relation => relation, :member => node2)
check_changeset_modify(BoundingBox.new(3, 3, 5, 5)) do |changeset_id| 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 relation_xml
.find("//osm/relation/member") .find("//osm/relation/member")
.each(&:remove!) .each(&:remove!)

View file

@ -7,38 +7,38 @@ module Api
def test_routes def test_routes
assert_routing( assert_routing(
{ :path => "/api/0.6/user/preferences", :method => :get }, { :path => "/api/0.6/user/preferences", :method => :get },
{ :controller => "api/user_preferences", :action => "read" } { :controller => "api/user_preferences", :action => "index" }
) )
assert_routing( assert_routing(
{ :path => "/api/0.6/user/preferences", :method => :put }, { :path => "/api/0.6/user/preferences", :method => :put },
{ :controller => "api/user_preferences", :action => "update" } { :controller => "api/user_preferences", :action => "update_all" }
) )
assert_routing( assert_routing(
{ :path => "/api/0.6/user/preferences/key", :method => :get }, { :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( assert_routing(
{ :path => "/api/0.6/user/preferences/key", :method => :put }, { :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( assert_routing(
{ :path => "/api/0.6/user/preferences/key", :method => :delete }, { :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 end
## ##
# test read action # test showing all preferences
def test_read def test_index
# first try without auth # first try without auth
get :read get :index
assert_response :unauthorized, "should be authenticated" assert_response :unauthorized, "should be authenticated"
# authenticate as a user with no preferences # authenticate as a user with no preferences
basic_authorization create(:user).email, "test" basic_authorization create(:user).email, "test"
# try the read again # try the read again
get :read get :index
assert_select "osm" do assert_select "osm" do
assert_select "preferences", :count => 1 do assert_select "preferences", :count => 1 do
assert_select "preference", :count => 0 assert_select "preference", :count => 0
@ -52,7 +52,7 @@ module Api
basic_authorization user.email, "test" basic_authorization user.email, "test"
# try the read again # try the read again
get :read get :index
assert_response :success assert_response :success
assert_equal "application/xml", @response.content_type assert_equal "application/xml", @response.content_type
assert_select "osm" do assert_select "osm" do
@ -65,39 +65,39 @@ module Api
end end
## ##
# test read_one action # test showing one preference
def test_read_one def test_show
user = create(:user) user = create(:user)
create(:user_preference, :user => user, :k => "key", :v => "value") create(:user_preference, :user => user, :k => "key", :v => "value")
# try a read without auth # try a read without auth
get :read_one, :params => { :preference_key => "key" } get :show, :params => { :preference_key => "key" }
assert_response :unauthorized, "should be authenticated" assert_response :unauthorized, "should be authenticated"
# authenticate as a user with preferences # authenticate as a user with preferences
basic_authorization user.email, "test" basic_authorization user.email, "test"
# try the read again # try the read again
get :read_one, :params => { :preference_key => "key" } get :show, :params => { :preference_key => "key" }
assert_response :success assert_response :success
assert_equal "text/plain", @response.content_type assert_equal "text/plain", @response.content_type
assert_equal "value", @response.body assert_equal "value", @response.body
# try the read again for a non-existent key # 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 assert_response :not_found
end end
## ##
# test update action # test bulk update action
def test_update def test_update_all
user = create(:user) user = create(:user)
create(:user_preference, :user => user, :k => "key", :v => "value") create(:user_preference, :user => user, :k => "key", :v => "value")
create(:user_preference, :user => user, :k => "some_key", :v => "some_value") create(:user_preference, :user => user, :k => "some_key", :v => "some_value")
# try a put without auth # try a put without auth
assert_no_difference "UserPreference.count" do 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 end
assert_response :unauthorized, "should be authenticated" assert_response :unauthorized, "should be authenticated"
assert_equal "value", UserPreference.find([user.id, "key"]).v assert_equal "value", UserPreference.find([user.id, "key"]).v
@ -111,7 +111,7 @@ module Api
# try the put again # try the put again
assert_no_difference "UserPreference.count" do 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 end
assert_response :success assert_response :success
assert_equal "text/plain", @response.content_type assert_equal "text/plain", @response.content_type
@ -124,7 +124,7 @@ module Api
# try a put with duplicate keys # try a put with duplicate keys
assert_no_difference "UserPreference.count" do 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 end
assert_response :bad_request assert_response :bad_request
assert_equal "text/plain", @response.content_type assert_equal "text/plain", @response.content_type
@ -133,20 +133,20 @@ module Api
# try a put with invalid content # try a put with invalid content
assert_no_difference "UserPreference.count" do assert_no_difference "UserPreference.count" do
put :update, :body => "nonsense" put :update_all, :body => "nonsense"
end end
assert_response :bad_request assert_response :bad_request
end end
## ##
# test update_one action # test update action
def test_update_one def test_update
user = create(:user) user = create(:user)
create(:user_preference, :user => user) create(:user_preference, :user => user)
# try a put without auth # try a put without auth
assert_no_difference "UserPreference.count" do 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 end
assert_response :unauthorized, "should be authenticated" assert_response :unauthorized, "should be authenticated"
assert_raises ActiveRecord::RecordNotFound do assert_raises ActiveRecord::RecordNotFound do
@ -158,7 +158,7 @@ module Api
# try adding a new preference # try adding a new preference
assert_difference "UserPreference.count", 1 do 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 end
assert_response :success assert_response :success
assert_equal "text/plain", @response.content_type assert_equal "text/plain", @response.content_type
@ -167,7 +167,7 @@ module Api
# try changing the value of a preference # try changing the value of a preference
assert_no_difference "UserPreference.count" do 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 end
assert_response :success assert_response :success
assert_equal "text/plain", @response.content_type assert_equal "text/plain", @response.content_type
@ -176,14 +176,14 @@ module Api
end end
## ##
# test delete_one action # test destroy action
def test_delete_one def test_destroy
user = create(:user) user = create(:user)
create(:user_preference, :user => user, :k => "key", :v => "value") create(:user_preference, :user => user, :k => "key", :v => "value")
# try a delete without auth # try a delete without auth
assert_no_difference "UserPreference.count" do assert_no_difference "UserPreference.count" do
delete :delete_one, :params => { :preference_key => "key" } delete :destroy, :params => { :preference_key => "key" }
end end
assert_response :unauthorized, "should be authenticated" assert_response :unauthorized, "should be authenticated"
assert_equal "value", UserPreference.find([user.id, "key"]).v assert_equal "value", UserPreference.find([user.id, "key"]).v
@ -193,7 +193,7 @@ module Api
# try the delete again # try the delete again
assert_difference "UserPreference.count", -1 do assert_difference "UserPreference.count", -1 do
get :delete_one, :params => { :preference_key => "key" } get :destroy, :params => { :preference_key => "key" }
end end
assert_response :success assert_response :success
assert_equal "text/plain", @response.content_type assert_equal "text/plain", @response.content_type
@ -204,7 +204,7 @@ module Api
# try the delete again for the same key # try the delete again for the same key
assert_no_difference "UserPreference.count" do assert_no_difference "UserPreference.count" do
get :delete_one, :params => { :preference_key => "key" } get :destroy, :params => { :preference_key => "key" }
end end
assert_response :not_found assert_response :not_found
assert_raises ActiveRecord::RecordNotFound do assert_raises ActiveRecord::RecordNotFound do
@ -214,7 +214,7 @@ module Api
# Ensure that a valid access token with correct capabilities can be used to # Ensure that a valid access token with correct capabilities can be used to
# read preferences # read preferences
def test_read_one_using_token def test_show_using_token
user = create(:user) user = create(:user)
token = create(:access_token, :user => user, :allow_read_prefs => true) token = create(:access_token, :user => user, :allow_read_prefs => true)
create(:user_preference, :user => user, :k => "key", :v => "value") create(:user_preference, :user => user, :k => "key", :v => "value")
@ -224,14 +224,14 @@ module Api
@request.env["oauth.strategies"] = [:token] @request.env["oauth.strategies"] = [:token]
@request.env["oauth.token"] = token @request.env["oauth.token"] = token
get :read_one, :params => { :preference_key => "key" } get :show, :params => { :preference_key => "key" }
assert_response :success assert_response :success
end end
# Ensure that a valid access token with incorrect capabilities can't be used # 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 # to read preferences even, though the owner of that token could read them
# by other methods. # by other methods.
def test_read_one_using_token_fail def test_show_using_token_fail
user = create(:user) user = create(:user)
token = create(:access_token, :user => user, :allow_read_prefs => false) token = create(:access_token, :user => user, :allow_read_prefs => false)
create(:user_preference, :user => user, :k => "key", :v => "value") create(:user_preference, :user => user, :k => "key", :v => "value")
@ -239,7 +239,7 @@ module Api
@request.env["oauth.strategies"] = [:token] @request.env["oauth.strategies"] = [:token]
@request.env["oauth.token"] = token @request.env["oauth.token"] = token
get :read_one, :params => { :preference_key => "key" } get :show, :params => { :preference_key => "key" }
assert_response :forbidden assert_response :forbidden
end end
end end

View file

@ -290,17 +290,17 @@ module Api
assert_response :forbidden assert_response :forbidden
# try to delete with an invalid (closed) changeset # 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 delete :delete, :params => { :id => private_way.id }, :body => xml.to_s
assert_response :forbidden assert_response :forbidden
# try to delete with an invalid (non-existent) changeset # 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 delete :delete, :params => { :id => private_way.id }, :body => xml.to_s
assert_response :forbidden assert_response :forbidden
# Now try with a valid changeset # 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 delete :delete, :params => { :id => private_way.id }, :body => xml.to_s
assert_response :forbidden assert_response :forbidden
@ -311,12 +311,12 @@ module Api
# "delete request should return a new version number for way" # "delete request should return a new version number for way"
# this won't work since the way is already deleted # 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 delete :delete, :params => { :id => private_deleted_way.id }, :body => xml.to_s
assert_response :forbidden assert_response :forbidden
# this shouldn't work as the way is used in a relation # 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 delete :delete, :params => { :id => private_used_way.id }, :body => xml.to_s
assert_response :forbidden, assert_response :forbidden,
"shouldn't be able to delete a way used in a relation (#{@response.body}), when done by a private user" "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 assert_response :bad_request
# try to delete with an invalid (closed) changeset # 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 delete :delete, :params => { :id => way.id }, :body => xml.to_s
assert_response :conflict assert_response :conflict
# try to delete with an invalid (non-existent) changeset # 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 delete :delete, :params => { :id => way.id }, :body => xml.to_s
assert_response :conflict assert_response :conflict
# Now try with a valid changeset # 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 delete :delete, :params => { :id => way.id }, :body => xml.to_s
assert_response :success assert_response :success
@ -360,12 +360,12 @@ module Api
"delete request should return a new version number for way" "delete request should return a new version number for way"
# this won't work since the way is already deleted # 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 delete :delete, :params => { :id => deleted_way.id }, :body => xml.to_s
assert_response :gone assert_response :gone
# this shouldn't work as the way is used in a relation # 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 delete :delete, :params => { :id => used_way.id }, :body => xml.to_s
assert_response :precondition_failed, assert_response :precondition_failed,
"shouldn't be able to delete a way used in a relation (#{@response.body})" "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 ## First test with no user credentials
# try and update a way without authorisation # 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 put :update, :params => { :id => way.id }, :body => xml.to_s
assert_response :unauthorized assert_response :unauthorized
@ -402,33 +402,33 @@ module Api
## trying to break changesets ## trying to break changesets
# try and update in someone else's changeset # 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) create(:changeset).id)
put :update, :params => { :id => private_way.id }, :body => xml.to_s 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" 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 # 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) create(:changeset, :closed, :user => private_user).id)
put :update, :params => { :id => private_way.id }, :body => xml.to_s 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" assert_require_public_data "update with closed changeset should be forbidden, when data isn't public"
# try and update in a non-existant changeset # 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 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") assert_require_public_data("update with changeset=0 should be forbidden, when data isn't public")
## try and submit invalid updates ## 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 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" 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 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" 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 ## 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 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" 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 ## trying to break changesets
# try and update in someone else's changeset # try and update in someone else's changeset
xml = update_changeset(way.to_xml, xml = update_changeset(xml_for_way(way),
create(:changeset).id) create(:changeset).id)
put :update, :params => { :id => way.id }, :body => xml.to_s put :update, :params => { :id => way.id }, :body => xml.to_s
assert_response :conflict, "update with other user's changeset should be rejected" assert_response :conflict, "update with other user's changeset should be rejected"
# try and update in a closed changeset # 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) create(:changeset, :closed, :user => user).id)
put :update, :params => { :id => way.id }, :body => xml.to_s put :update, :params => { :id => way.id }, :body => xml.to_s
assert_response :conflict, "update with closed changeset should be rejected" assert_response :conflict, "update with closed changeset should be rejected"
# try and update in a non-existant changeset # 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 put :update, :params => { :id => way.id }, :body => xml.to_s
assert_response :conflict, "update with changeset=0 should be rejected" assert_response :conflict, "update with changeset=0 should be rejected"
## try and submit invalid updates ## 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 put :update, :params => { :id => way.id }, :body => xml.to_s
assert_response :precondition_failed, "way with non-existent node should be rejected" 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 put :update, :params => { :id => way.id }, :body => xml.to_s
assert_response :precondition_failed, "way with deleted node should be rejected" assert_response :precondition_failed, "way with deleted node should be rejected"
@ -469,26 +469,26 @@ module Api
current_way_version = way.version current_way_version = way.version
# try and submit a version behind # 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) "version", current_way_version - 1)
put :update, :params => { :id => way.id }, :body => xml.to_s put :update, :params => { :id => way.id }, :body => xml.to_s
assert_response :conflict, "should have failed on old version number" assert_response :conflict, "should have failed on old version number"
# try and submit a version ahead # 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) "version", current_way_version + 1)
put :update, :params => { :id => way.id }, :body => xml.to_s put :update, :params => { :id => way.id }, :body => xml.to_s
assert_response :conflict, "should have failed on skipped version number" assert_response :conflict, "should have failed on skipped version number"
# try and submit total crap in the version field # 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!") "version", "p1r4t3s!")
put :update, :params => { :id => way.id }, :body => xml.to_s put :update, :params => { :id => way.id }, :body => xml.to_s
assert_response :conflict, assert_response :conflict,
"should not be able to put 'p1r4at3s!' in the version field" "should not be able to put 'p1r4at3s!' in the version field"
## try an update with the wrong ID ## 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 put :update, :params => { :id => way.id }, :body => xml.to_s
assert_response :bad_request, assert_response :bad_request,
"should not be able to update a way with a different ID from the XML" "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." "should not be able to update a way with non-OSM XML doc."
## finally, produce a good request which should work ## 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 put :update, :params => { :id => way.id }, :body => xml.to_s
assert_response :success, "a valid update request failed" assert_response :success, "a valid update request failed"
end end
@ -527,7 +527,7 @@ module Api
tag_xml["v"] = "yes" tag_xml["v"] = "yes"
# add the tag into the existing xml # 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 way_xml.find("//osm/way").first << tag_xml
# try and upload it # try and upload it
@ -545,7 +545,7 @@ module Api
tag_xml["v"] = "yes" tag_xml["v"] = "yes"
# add the tag into the existing xml # 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 way_xml.find("//osm/way").first << tag_xml
# try and upload it # try and upload it
@ -575,7 +575,7 @@ module Api
tag_xml["v"] = private_existing_tag.v tag_xml["v"] = private_existing_tag.v
# add the tag into the existing xml # 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 way_xml.find("//osm/way").first << tag_xml
# try and upload it # try and upload it
@ -593,7 +593,7 @@ module Api
tag_xml["v"] = existing_tag.v tag_xml["v"] = existing_tag.v
# add the tag into the existing xml # 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 way_xml.find("//osm/way").first << tag_xml
# try and upload it # try and upload it
@ -621,7 +621,7 @@ module Api
tag_xml["v"] = "foobar" tag_xml["v"] = "foobar"
# add the tag into the existing xml # 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 # add two copies of the tag
way_xml.find("//osm/way").first << tag_xml.copy(true) << tag_xml way_xml.find("//osm/way").first << tag_xml.copy(true) << tag_xml
@ -641,7 +641,7 @@ module Api
tag_xml["v"] = "foobar" tag_xml["v"] = "foobar"
# add the tag into the existing xml # add the tag into the existing xml
way_xml = way.to_xml way_xml = xml_for_way(way)
# add two copies of the tag # add two copies of the tag
way_xml.find("//osm/way").first << tag_xml.copy(true) << tag_xml way_xml.find("//osm/way").first << tag_xml.copy(true) << tag_xml

View file

@ -48,6 +48,9 @@ class BrowseTagsHelperTest < ActionView::TestCase
html = format_value("name:etymology:wikidata", "Q123") 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 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") html = format_value("colour", "#f00")
assert_dom_equal %(<span class="colour-preview-box" data-colour="#f00" title="Colour #f00 preview"></span>#f00), html assert_dom_equal %(<span class="colour-preview-box" data-colour="#f00" title="Colour #f00 preview"></span>#f00), html
end end
@ -190,6 +193,34 @@ class BrowseTagsHelperTest < ActionView::TestCase
assert_nil link assert_nil link
end 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 def test_telephone_links
links = telephone_links("foo", "Test") links = telephone_links("foo", "Test")
assert_nil links assert_nil links

View file

@ -68,14 +68,6 @@ class NodeTest < ActiveSupport::TestCase
assert_in_delta 76.543 * OldNode::SCALE, node.longitude, 0.000001 assert_in_delta 76.543 * OldNode::SCALE, node.longitude, 0.000001
end 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 # Check that you can create a node and store it
def test_create def test_create
changeset = create(:changeset) changeset = create(:changeset)

View file

@ -170,5 +170,87 @@ module ActiveSupport
fill_in "password", :with => "test" fill_in "password", :with => "test"
click_on "Login", :match => :first click_on "Login", :match => :first
end 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
end end