From: Mayank Tankhiwale Date: Sat, 23 Nov 2019 15:02:47 +0000 (+0530) Subject: Merge branch 'master' of https://github.com/tankhiwale/openstreetmap-website X-Git-Tag: live~2872^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/11cd1c9fc1417f5e6b52991897b29bb94a4288a4?hp=9f7ec064e448a745e0ea2615a089f0988215dec6 Merge branch 'master' of https://github.com/tankhiwale/openstreetmap-website --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 57f876bd9..518e1eda4 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,12 +1,12 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2019-10-07 20:37:25 +0100 using RuboCop version 0.75.0. +# on 2019-10-19 16:05:52 +0000 using RuboCop version 0.75.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 34 +# Offense count: 35 # Configuration parameters: AllowSafeAssignment. Lint/AssignmentInCondition: Exclude: @@ -32,7 +32,7 @@ Lint/HandleExceptions: - 'app/controllers/api/amf_controller.rb' - 'app/controllers/users_controller.rb' -# Offense count: 700 +# Offense count: 701 Metrics/AbcSize: Max: 189 @@ -52,11 +52,11 @@ Metrics/BlockNesting: Metrics/ClassLength: Max: 645 -# Offense count: 73 +# Offense count: 74 Metrics/CyclomaticComplexity: Max: 22 -# Offense count: 721 +# Offense count: 722 # Configuration parameters: CountComments, ExcludedMethods. Metrics/MethodLength: Max: 179 @@ -64,14 +64,14 @@ Metrics/MethodLength: # Offense count: 2 # Configuration parameters: CountComments. Metrics/ModuleLength: - Max: 107 + Max: 117 # Offense count: 4 # Configuration parameters: CountKeywordArgs. Metrics/ParameterLists: Max: 9 -# Offense count: 71 +# Offense count: 72 Metrics/PerceivedComplexity: Max: 25 @@ -209,7 +209,7 @@ Style/IfUnlessModifier: Style/NumericLiterals: MinDigits: 11 -# Offense count: 3330 +# Offense count: 3338 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https diff --git a/Gemfile b/Gemfile index c2bb066b7..d157a3ecc 100644 --- a/Gemfile +++ b/Gemfile @@ -28,8 +28,7 @@ gem "coffee-rails", "~> 4.2" gem "jquery-rails" # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder -# gem 'jbuilder', '~> 2.0' -gem "jsonify-rails" +gem "jbuilder", "~> 2.7" # Reduces boot times through caching; required in config/boot.rb gem "bootsnap", ">= 1.1.0", :require => false diff --git a/Gemfile.lock b/Gemfile.lock index ebc633ff3..147ab83e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,25 +53,25 @@ GEM tzinfo (~> 1.1) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) - annotate (3.0.2) + annotate (3.0.3) activerecord (>= 3.2, < 7.0) - rake (>= 10.4, < 13.0) + rake (>= 10.4, < 14.0) arel (9.0.0) ast (2.4.0) autoprefixer-rails (8.6.5) execjs aws-eventstream (1.0.3) - aws-partitions (1.230.0) - aws-sdk-core (3.72.0) + aws-partitions (1.241.0) + aws-sdk-core (3.79.0) aws-eventstream (~> 1.0, >= 1.0.2) - aws-partitions (~> 1, >= 1.228.0) + aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) aws-sdk-kms (1.25.0) aws-sdk-core (~> 3, >= 3.71.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.52.0) - aws-sdk-core (~> 3, >= 3.71.0) + aws-sdk-s3 (1.56.0) + aws-sdk-core (~> 3, >= 3.77.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) aws-sigv4 (1.1.0) @@ -93,7 +93,7 @@ GEM debug_inspector (>= 0.0.1) bootsnap (1.4.5) msgpack (~> 1.0) - browser (2.6.1) + browser (2.7.0) builder (3.2.3) bzip2-ffi (1.0.0) ffi (~> 1.0) @@ -141,7 +141,7 @@ GEM activerecord (>= 3.0, < 6.1) delayed_job (>= 3.0, < 5) docile (1.3.2) - dry-configurable (0.8.3) + dry-configurable (0.9.0) concurrent-ruby (~> 1.0) dry-core (~> 0.4, >= 0.4.7) dry-container (0.7.2) @@ -149,10 +149,10 @@ GEM dry-configurable (~> 0.1, >= 0.1.3) dry-core (0.4.9) concurrent-ruby (~> 1.0) - dry-equalizer (0.2.2) + dry-equalizer (0.3.0) dry-inflector (0.2.0) - dry-initializer (3.0.1) - dry-logic (1.0.3) + dry-initializer (3.0.2) + dry-logic (1.0.5) concurrent-ruby (~> 1.0) dry-core (~> 0.2) dry-equalizer (~> 0.2) @@ -164,7 +164,7 @@ GEM dry-initializer (~> 3.0) dry-logic (~> 1.0) dry-types (~> 1.2) - dry-types (1.2.0) + dry-types (1.2.1) concurrent-ruby (~> 1.0) dry-container (~> 0.3) dry-core (~> 0.4, >= 0.4.4) @@ -190,7 +190,7 @@ GEM fakefs (0.20.1) faraday (0.17.0) multipart-post (>= 1.2, < 3) - ffi (1.11.1) + ffi (1.11.2) ffi-libarchive (0.4.10) ffi (~> 1.0) fspath (3.1.2) @@ -206,7 +206,7 @@ GEM http_accept_language (2.0.5) i18n (0.9.5) concurrent-ruby (~> 1.0) - i18n-js (3.4.0) + i18n-js (3.5.0) i18n (>= 0.6.6) image_optim (0.26.5) exifr (~> 1.2, >= 1.2.2) @@ -221,17 +221,14 @@ GEM image_size (2.0.2) in_threads (1.5.3) jaro_winkler (1.5.4) + jbuilder (2.9.1) + activesupport (>= 4.2.0) jmespath (1.4.0) jquery-rails (4.3.5) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) json (2.2.0) - jsonify (0.3.1) - multi_json (~> 1.0) - jsonify-rails (0.3.2) - actionpack - jsonify (< 0.4.0) jwt (2.2.1) kgio (2.11.2) kramdown (2.1.0) @@ -262,9 +259,9 @@ GEM multi_xml (0.6.0) multipart-post (2.1.1) nio4r (2.5.2) - nokogiri (1.10.4) + nokogiri (1.10.5) mini_portile2 (~> 2.4.0) - nokogumbo (2.0.1) + nokogumbo (2.0.2) nokogiri (~> 1.8, >= 1.8.4) oauth (0.4.7) oauth-plugin (0.5.1) @@ -306,7 +303,7 @@ GEM multi_json (~> 1.12) omniauth-oauth2 (~> 1.4) openstreetmap-deadlock_retry (1.3.0) - parallel (1.18.0) + parallel (1.19.0) parser (2.6.5.0) ast (~> 2.4.0) pg (1.1.4) @@ -321,7 +318,8 @@ GEM quad_tile (1.0.1) r2 (0.2.7) rack (2.0.7) - rack-cors (1.0.3) + rack-cors (1.0.6) + rack (>= 1.6.0) rack-openid (1.3.1) rack (>= 1.1.0) ruby-openid (>= 2.1.8) @@ -360,7 +358,7 @@ GEM rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) rainbow (3.0.0) - rake (12.3.3) + rake (13.0.1) rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) @@ -378,7 +376,7 @@ GEM rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) - rubocop-performance (1.5.0) + rubocop-performance (1.5.1) rubocop (>= 0.71.0) rubocop-rails (2.3.2) rack (>= 1.1) @@ -419,7 +417,7 @@ GEM thor (0.20.3) thread_safe (0.3.6) tilt (2.0.10) - tins (1.22.0) + tins (1.22.2) tzinfo (1.2.5) thread_safe (~> 0.1) uglifier (4.2.0) @@ -477,9 +475,9 @@ DEPENDENCIES http_accept_language (~> 2.0.0) i18n-js (>= 3.0.0) image_optim_rails + jbuilder (~> 2.7) jquery-rails json - jsonify-rails kgio kramdown libxml-ruby (>= 2.0.5) diff --git a/app/abilities/api_ability.rb b/app/abilities/api_ability.rb index 6d62ece51..217fe9713 100644 --- a/app/abilities/api_ability.rb +++ b/app/abilities/api_ability.rb @@ -34,7 +34,7 @@ class ApiAbility can [:new, :create], Report can [:create, :show, :update, :destroy, :data], Trace can [:details, :gpx_files], User - can [:read, :read_one, :update, :update_one, :delete_one], UserPreference + can [:index, :show, :update, :update_all, :destroy], UserPreference if user.terms_agreed? can [:create, :update, :upload, :close, :subscribe, :unsubscribe, :expand_bbox], Changeset diff --git a/app/abilities/api_capability.rb b/app/abilities/api_capability.rb index 7d8a13364..64861f1d6 100644 --- a/app/abilities/api_capability.rb +++ b/app/abilities/api_capability.rb @@ -10,8 +10,8 @@ class ApiCapability can [:create, :update, :destroy], Trace if capability?(token, :allow_write_gpx) can [:details], User if capability?(token, :allow_read_prefs) can [:gpx_files], User if capability?(token, :allow_read_gpx) - can [:read, :read_one], UserPreference if capability?(token, :allow_read_prefs) - can [:update, :update_one, :delete_one], UserPreference if capability?(token, :allow_write_prefs) + can [:index, :show], UserPreference if capability?(token, :allow_read_prefs) + can [:update, :update_all, :destroy], UserPreference if capability?(token, :allow_write_prefs) if token&.user&.terms_agreed? can [:create, :update, :upload, :close, :subscribe, :unsubscribe, :expand_bbox], Changeset if capability?(token, :allow_write_api) diff --git a/app/assets/images/banners/sotm_africa_2019.png b/app/assets/images/banners/sotm_africa_2019.png new file mode 100644 index 000000000..aefd48819 Binary files /dev/null and b/app/assets/images/banners/sotm_africa_2019.png differ diff --git a/app/assets/images/banners/sotm_asia_2019.png b/app/assets/images/banners/sotm_asia_2019.png deleted file mode 100644 index ef2f1c20b..000000000 Binary files a/app/assets/images/banners/sotm_asia_2019.png and /dev/null differ diff --git a/app/assets/images/browse/alpinehut.p.16.png b/app/assets/images/browse/alpinehut.p.16.png deleted file mode 100644 index 0499c586a..000000000 Binary files a/app/assets/images/browse/alpinehut.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/brownfield.png b/app/assets/images/browse/brownfield.png index 1b1603399..c245020ce 100644 Binary files a/app/assets/images/browse/brownfield.png and b/app/assets/images/browse/brownfield.png differ diff --git a/app/assets/images/browse/building.png b/app/assets/images/browse/building.png index fd37114c9..e83961d81 100644 Binary files a/app/assets/images/browse/building.png and b/app/assets/images/browse/building.png differ diff --git a/app/assets/images/browse/cemetery.png b/app/assets/images/browse/cemetery.png index f89cf18e2..53ae8536f 100644 Binary files a/app/assets/images/browse/cemetery.png and b/app/assets/images/browse/cemetery.png differ diff --git a/app/assets/images/browse/commercial.png b/app/assets/images/browse/commercial.png index 3008f1809..a18dc4114 100644 Binary files a/app/assets/images/browse/commercial.png and b/app/assets/images/browse/commercial.png differ diff --git a/app/assets/images/browse/farmland.png b/app/assets/images/browse/farmland.png index c894c8455..bfd959150 100644 Binary files a/app/assets/images/browse/farmland.png and b/app/assets/images/browse/farmland.png differ diff --git a/app/assets/images/browse/farmyard.png b/app/assets/images/browse/farmyard.png index ca41410a8..6be69f2f0 100644 Binary files a/app/assets/images/browse/farmyard.png and b/app/assets/images/browse/farmyard.png differ diff --git a/app/assets/images/browse/forest.png b/app/assets/images/browse/forest.png index da748f81d..6bd4403fa 100644 Binary files a/app/assets/images/browse/forest.png and b/app/assets/images/browse/forest.png differ diff --git a/app/assets/images/browse/golf.png b/app/assets/images/browse/golf.png index 4f7afc4fa..a485580d5 100644 Binary files a/app/assets/images/browse/golf.png and b/app/assets/images/browse/golf.png differ diff --git a/app/assets/images/browse/grass.png b/app/assets/images/browse/grass.png index 79baac3ee..c909bfa87 100644 Binary files a/app/assets/images/browse/grass.png and b/app/assets/images/browse/grass.png differ diff --git a/app/assets/images/browse/grassland.png b/app/assets/images/browse/grassland.png index 79baac3ee..c909bfa87 100644 Binary files a/app/assets/images/browse/grassland.png and b/app/assets/images/browse/grassland.png differ diff --git a/app/assets/images/browse/heathland.png b/app/assets/images/browse/heathland.png index cb2fc225d..c35d96fee 100644 Binary files a/app/assets/images/browse/heathland.png and b/app/assets/images/browse/heathland.png differ diff --git a/app/assets/images/browse/industrial.png b/app/assets/images/browse/industrial.png index 4ad4e5193..3b3be37f9 100644 Binary files a/app/assets/images/browse/industrial.png and b/app/assets/images/browse/industrial.png differ diff --git a/app/assets/images/browse/lake.png b/app/assets/images/browse/lake.png index c838303f6..2fee498ed 100644 Binary files a/app/assets/images/browse/lake.png and b/app/assets/images/browse/lake.png differ diff --git a/app/assets/images/browse/meadow.png b/app/assets/images/browse/meadow.png index 79baac3ee..c909bfa87 100644 Binary files a/app/assets/images/browse/meadow.png and b/app/assets/images/browse/meadow.png differ diff --git a/app/assets/images/browse/park.png b/app/assets/images/browse/park.png index a60755dd0..0922b56f9 100644 Binary files a/app/assets/images/browse/park.png and b/app/assets/images/browse/park.png differ diff --git a/app/assets/images/browse/pitch.png b/app/assets/images/browse/pitch.png index a49af3010..7d18def41 100644 Binary files a/app/assets/images/browse/pitch.png and b/app/assets/images/browse/pitch.png differ diff --git a/app/assets/images/browse/residential.png b/app/assets/images/browse/residential.png index e3b850e46..429fcd0d1 100644 Binary files a/app/assets/images/browse/residential.png and b/app/assets/images/browse/residential.png differ diff --git a/app/assets/images/browse/retail.png b/app/assets/images/browse/retail.png index 23b097ba4..62309746f 100644 Binary files a/app/assets/images/browse/retail.png and b/app/assets/images/browse/retail.png differ diff --git a/app/assets/images/browse/school.png b/app/assets/images/browse/school.png deleted file mode 100644 index 9361041fc..000000000 Binary files a/app/assets/images/browse/school.png and /dev/null differ diff --git a/app/assets/images/browse/scrub.png b/app/assets/images/browse/scrub.png new file mode 100644 index 000000000..ca85ab8f5 Binary files /dev/null and b/app/assets/images/browse/scrub.png differ diff --git a/app/assets/images/browse/tourism_alpine_hut.16.png b/app/assets/images/browse/tourism_alpine_hut.16.png new file mode 100644 index 000000000..adeb45778 Binary files /dev/null and b/app/assets/images/browse/tourism_alpine_hut.16.png differ diff --git a/app/assets/images/browse/tourism_wilderness_hut.16.png b/app/assets/images/browse/tourism_wilderness_hut.16.png new file mode 100644 index 000000000..33ccbfba0 Binary files /dev/null and b/app/assets/images/browse/tourism_wilderness_hut.16.png differ diff --git a/app/assets/images/browse/wood.png b/app/assets/images/browse/wood.png index 329bfa483..6bd4403fa 100644 Binary files a/app/assets/images/browse/wood.png and b/app/assets/images/browse/wood.png differ diff --git a/app/assets/stylesheets/browse.scss b/app/assets/stylesheets/browse.scss index 2db397a07..7c6f4b365 100644 --- a/app/assets/stylesheets/browse.scss +++ b/app/assets/stylesheets/browse.scss @@ -121,7 +121,7 @@ .shop.shoes::before { content: image-url('browse/shop_shoes.16.png'); } .shop.supermarket::before { content: image-url('browse/shop_supermarket.p.16.png'); } - .tourism.alpine_hut::before { content: image-url('browse/alpinehut.p.16.png'); } + .tourism.alpine_hut::before { content: image-url('browse/tourism_alpine_hut.16.png'); } .tourism.camp_site::before { content: image-url('browse/tourism_camp_site.16.png'); } .tourism.caravan_site::before { content: image-url('browse/tourism_caravan_site.16.png'); } .tourism.hostel::before { content: image-url('browse/tourism_hostel.16.png'); } @@ -130,6 +130,7 @@ .tourism.museum::before { content: image-url('browse/tourism_museum.16.png'); } .tourism.picnic_site::before { content: image-url('browse/tourism_picnic_site.16.png'); } .tourism.viewpoint::before { content: image-url('browse/view_point.p.16.png'); } + .tourism.wilderness_hut::before { content: image-url('browse/tourism_wilderness_hut.16.png'); } /* Ways */ @@ -184,6 +185,7 @@ .natural.grassland::before { content: image-url('browse/grassland.png'); } .natural.heath::before { content: image-url('browse/heathland.png'); } + .natural.scrub::before { content: image-url('browse/scrub.png'); } .natural.water::before { content: image-url('browse/lake.png'); } .natural.wood::before { content: image-url('browse/wood.png'); } diff --git a/app/controllers/api/user_preferences_controller.rb b/app/controllers/api/user_preferences_controller.rb index 39e0dff30..83e28bc4e 100644 --- a/app/controllers/api/user_preferences_controller.rb +++ b/app/controllers/api/user_preferences_controller.rb @@ -9,31 +9,22 @@ module Api ## # return all the preferences as an XML document - def read - doc = OSM::API.new.get_xml_doc + def index + @user_preferences = current_user.preferences - prefs = current_user.preferences - - el1 = XML::Node.new "preferences" - - prefs.each do |pref| - el1 << pref.to_xml_node - end - - doc.root << el1 - render :xml => doc.to_s + render :formats => [:xml] end ## # return the value for a single preference - def read_one + def show pref = UserPreference.find([current_user.id, params[:preference_key]]) render :plain => pref.v.to_s end # update the entire set of preferences - def update + def update_all old_preferences = current_user.preferences.each_with_object({}) do |preference, preferences| preferences[preference.k] = preference end @@ -63,7 +54,7 @@ module Api ## # update the value of a single preference - def update_one + def update begin pref = UserPreference.find([current_user.id, params[:preference_key]]) rescue ActiveRecord::RecordNotFound @@ -80,7 +71,7 @@ module Api ## # delete a single preference - def delete_one + def destroy UserPreference.find([current_user.id, params[:preference_key]]).delete render :plain => "" diff --git a/app/helpers/browse_tags_helper.rb b/app/helpers/browse_tags_helper.rb index 375300e14..bbf6f3cf7 100644 --- a/app/helpers/browse_tags_helper.rb +++ b/app/helpers/browse_tags_helper.rb @@ -17,6 +17,8 @@ module BrowseTagsHelper link_to(w[:title], w[:url], :title => t("browse.tag_details.wikidata_link", :page => w[:title].strip)) end safe_join(wdt, ";") + elsif wmc = wikimedia_commons_link(key, value) + link_to h(wmc[:title]), wmc[:url], :title => t("browse.tag_details.wikimedia_commons_link", :page => wmc[:title]) elsif url = wiki_link("tag", "#{key}=#{value}") link_to h(value), url, :title => t("browse.tag_details.wiki_link.tag", :key => key, :value => value) elsif phones = telephone_links(key, value) @@ -111,6 +113,16 @@ module BrowseTagsHelper nil end + def wikimedia_commons_link(key, value) + if key == "wikimedia_commons" && value =~ /^(?:file|category):/i + return { + :url => "//commons.wikimedia.org/wiki/#{value}?uselang=#{I18n.locale}", + :title => value + } + end + nil + end + def telephone_links(_key, value) # Does it look like a global phone number? eg "+1 (234) 567-8901 " # or a list of alternate numbers separated by ; diff --git a/app/models/node.rb b/app/models/node.rb index c5df1f79e..2e71813ff 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -200,28 +200,6 @@ class Node < ActiveRecord::Base save_with_history! end - def to_xml - doc = OSM::API.new.get_xml_doc - doc.root << to_xml_node - doc - end - - def to_xml_node(changeset_cache = {}, user_display_name_cache = {}) - el = XML::Node.new "node" - el["id"] = id.to_s - - add_metadata_to_xml_node(el, self, changeset_cache, user_display_name_cache) - - if visible? - el["lat"] = lat.to_s - el["lon"] = lon.to_s - end - - add_tags_to_xml_node(el, node_tags) - - el - end - def tags_as_hash tags end diff --git a/app/models/relation.rb b/app/models/relation.rb index dc2b71ac4..a73d63183 100644 --- a/app/models/relation.rb +++ b/app/models/relation.rb @@ -121,31 +121,6 @@ class Relation < ActiveRecord::Base relation end - def to_xml - doc = OSM::API.new.get_xml_doc - doc.root << to_xml_node - doc - end - - def to_xml_node(changeset_cache = {}, user_display_name_cache = {}) - el = XML::Node.new "relation" - el["id"] = id.to_s - - add_metadata_to_xml_node(el, self, changeset_cache, user_display_name_cache) - - relation_members.each do |member| - member_el = XML::Node.new "member" - member_el["type"] = member.member_type.downcase - member_el["ref"] = member.member_id.to_s - member_el["role"] = member.member_role - el << member_el - end - - add_tags_to_xml_node(el, relation_tags) - - el - end - # FIXME: is this really needed? def members @members ||= relation_members.map do |member| diff --git a/app/models/user.rb b/app/models/user.rb index 1095dc6ea..36ae0b55c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -46,6 +46,8 @@ class User < ActiveRecord::Base require "xml/libxml" + self.ignored_columns = ["nearby"] + has_many :traces, -> { where(:visible => true) } has_many :diary_entries, -> { order(:created_at => :desc) } has_many :diary_comments, -> { order(:created_at => :desc) } diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index 583ced3c5..37bab38b0 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -18,13 +18,4 @@ class UserPreference < ActiveRecord::Base validates :user, :presence => true, :associated => true validates :k, :v, :length => 1..255, :characters => true - - # Turn this Node in to an XML Node without the wrapper. - def to_xml_node - el1 = XML::Node.new "preference" - el1["k"] = k - el1["v"] = v - - el1 - end end diff --git a/app/models/way.rb b/app/models/way.rb index b3466213c..3284c47f3 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -106,44 +106,6 @@ class Way < ActiveRecord::Base way end - # Find a way given it's ID, and in a single SQL call also grab its nodes and tags - def to_xml - doc = OSM::API.new.get_xml_doc - doc.root << to_xml_node - doc - end - - def to_xml_node(visible_nodes = nil, changeset_cache = {}, user_display_name_cache = {}) - el = XML::Node.new "way" - el["id"] = id.to_s - - add_metadata_to_xml_node(el, self, changeset_cache, user_display_name_cache) - - # make sure nodes are output in sequence_id order - ordered_nodes = [] - way_nodes.each do |nd| - if visible_nodes - # if there is a list of visible nodes then use that to weed out deleted nodes - ordered_nodes[nd.sequence_id] = nd.node_id.to_s if visible_nodes[nd.node_id] - else - # otherwise, manually go to the db to check things - ordered_nodes[nd.sequence_id] = nd.node_id.to_s if nd.node&.visible? - end - end - - ordered_nodes.each do |nd_id| - next unless nd_id && nd_id != "0" - - node_el = XML::Node.new "nd" - node_el["ref"] = nd_id - el << node_el - end - - add_tags_to_xml_node(el, way_tags) - - el - end - def nds @nds ||= way_nodes.collect(&:node_id) end diff --git a/app/views/api/notes/_note.json.jsonify b/app/views/api/notes/_note.json.jbuilder similarity index 81% rename from app/views/api/notes/_note.json.jsonify rename to app/views/api/notes/_note.json.jbuilder index b96439922..34f796880 100644 --- a/app/views/api/notes/_note.json.jsonify +++ b/app/views/api/notes/_note.json.jbuilder @@ -2,7 +2,7 @@ json.type "Feature" json.geometry do json.type "Point" - json.coordinates [ note.lon.to_f, note.lat.to_f ] + json.coordinates [note.lon.to_f, note.lat.to_f] end json.properties do @@ -16,12 +16,12 @@ json.properties do json.close_url close_note_url(note, :format => params[:format]) end - json.date_created note.created_at + json.date_created note.created_at.to_s json.status note.status - json.closed_at note.closed_at if note.closed? + json.closed_at note.closed_at.to_s if note.closed? json.comments(note.comments) do |comment| - json.date comment.created_at + json.date comment.created_at.to_s if comment.author json.uid comment.author.id diff --git a/app/views/api/notes/index.json.jsonify b/app/views/api/notes/index.json.jbuilder similarity index 70% rename from app/views/api/notes/index.json.jsonify rename to app/views/api/notes/index.json.jbuilder index bfc8ffcf8..7909391f5 100644 --- a/app/views/api/notes/index.json.jsonify +++ b/app/views/api/notes/index.json.jbuilder @@ -1,5 +1,5 @@ json.type "FeatureCollection" json.features(@notes) do |note| - json.ingest! render(note) + json.partial! note end diff --git a/app/views/api/notes/show.json.jbuilder b/app/views/api/notes/show.json.jbuilder new file mode 100644 index 000000000..71d9408c2 --- /dev/null +++ b/app/views/api/notes/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! @note diff --git a/app/views/api/notes/show.json.jsonify b/app/views/api/notes/show.json.jsonify deleted file mode 100644 index 10d127291..000000000 --- a/app/views/api/notes/show.json.jsonify +++ /dev/null @@ -1 +0,0 @@ -json.ingest! render(@note) diff --git a/app/views/api/user_preferences/_user_preference.xml.builder b/app/views/api/user_preferences/_user_preference.xml.builder new file mode 100644 index 000000000..ae830bed3 --- /dev/null +++ b/app/views/api/user_preferences/_user_preference.xml.builder @@ -0,0 +1,6 @@ +attrs = { + "k" => user_preference.k, + "v" => user_preference.v +} + +xml.preference(attrs) diff --git a/app/views/api/user_preferences/index.xml.builder b/app/views/api/user_preferences/index.xml.builder new file mode 100644 index 000000000..0a852b269 --- /dev/null +++ b/app/views/api/user_preferences/index.xml.builder @@ -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 diff --git a/app/views/messages/destroy.json.jsonify b/app/views/messages/destroy.json.jbuilder similarity index 100% rename from app/views/messages/destroy.json.jsonify rename to app/views/messages/destroy.json.jbuilder diff --git a/app/views/messages/mark.json.jsonify b/app/views/messages/mark.json.jbuilder similarity index 100% rename from app/views/messages/mark.json.jsonify rename to app/views/messages/mark.json.jbuilder diff --git a/config/banners.yml b/config/banners.yml index d8b8ecb49..75e95d741 100644 --- a/config/banners.yml +++ b/config/banners.yml @@ -1,6 +1,6 @@ -sotm_asia_2019: - id: sotm_asia_2019 - alt: State of the Map Asia 2019 - link: https://stateofthemap.asia/ - img: banners/sotm_asia_2019.png - enddate: 2019-nov-03 +sotm_africa_2019: + id: sotm_africa_2019 + alt: State of the Map Africa 2019 + link: https://2019.stateofthemap.africa/ + img: banners/sotm_africa_2019.png + enddate: 2019-nov-24 diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 8c7ee56e0..ae4e7c05d 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -316,6 +316,7 @@ ar: tag: صفحة وصف الويكي للوسم %{key}=%{value} wikidata_link: العنصر %{page} على ويكي بيانات wikipedia_link: مقالة %{page} على ويكيبيديا + wikimedia_commons_link: العنصر %{page} في ويكيميديا ​​كومنز telephone_link: اتصل بـ%{phone_number} colour_preview: معاينة اللون %{colour_value} note: diff --git a/config/locales/ast.yml b/config/locales/ast.yml index 3cc37c646..757b8682b 100644 --- a/config/locales/ast.yml +++ b/config/locales/ast.yml @@ -283,6 +283,7 @@ ast: tag: La páxina wiki de descripción de la etiqueta %{key}=%{value} wikidata_link: L'elementu %{page} en Wikidata wikipedia_link: L'artículu %{page} en Wikipedia + wikimedia_commons_link: L'elementu %{page} en Wikimedia Commons telephone_link: Llamar a %{phone_number} colour_preview: Entever el color %{colour_value} note: @@ -1279,10 +1280,10 @@ ast: de cambios' subject_other: '[OpenStreetMap] %{commenter} comentó sobro un conxuntu de cambios que t''interesa' - your_changeset: '%{commenter} dexó un comentariu n''unu de los tos conxuntos - de cambios creáu el %{time}' - commented_changeset: '%{commenter} dexó un comentariu nun conxuntu de cambios - del mapa que tas siguiendo creáu por %{changeset_author} el %{time}' + your_changeset: '%{commenter} dexó un comentariu a les %{time} n''unu de los + tos conxuntos de cambios' + commented_changeset: '%{commenter} dexó un comentariu a les %{time} nun conxuntu + de cambios del mapa que tas siguiendo creáu por %{changeset_author}' partial_changeset_with_comment: col comentariu '%{changeset_comment}' partial_changeset_without_comment: ensin comentarios details: Puen alcontrase más detalles del conxuntu de cambios en %{url} @@ -1889,7 +1890,9 @@ ast: newer: Traces más nueves trace: pending: PENDIENTE - count_points: '%{count} puntos' + count_points: + one: 1 puntu + other: '%{count} puntos' more: más trace_details: Amosar detalles de la traza view_map: Ver el Mapa diff --git a/config/locales/be-Tarask.yml b/config/locales/be-Tarask.yml index 68c7c5a50..646655b26 100644 --- a/config/locales/be-Tarask.yml +++ b/config/locales/be-Tarask.yml @@ -17,6 +17,9 @@ be-Tarask: submit: diary_comment: create: Захаваць + diary_entry: + create: Апублікаваць + update: Абнавіць issue_comment: create: Дадаць камэнтар message: @@ -24,6 +27,9 @@ be-Tarask: client_application: create: Рэгістрацыя update: Рэдагаваць + redaction: + create: Стварыць рэдакцыю + update: Захаваць рэдакцыю trace: create: Загрузіць update: Захаваць зьмены @@ -33,6 +39,7 @@ be-Tarask: activerecord: errors: messages: + invalid_email_address: не падобны на карэктны адрас э-пошты email_address_not_routable: не маршрутызаваны models: acl: Сьпіс абмежаваньня доступу @@ -156,6 +163,15 @@ be-Tarask: description: Аддаленае кіраваньне (JOSM ці Merkaartor) api: notes: + comment: + opened_at_html: Створана %{when} + opened_at_by_html: Створана %{when} удзельнікам %{user} + commented_at_html: Абноўлена %{when} + commented_at_by_html: Абноўлена %{when} удзельнікам %{user} + closed_at_html: Разьвязана %{when} + closed_at_by_html: Разьвізана %{when} удзельнікам %{user} + reopened_at_html: Пераадкрыта %{when} + reopened_at_by_html: Пераадкрыта %{when} удзельнікам %{user} entry: full: Поўны тэкст browse: diff --git a/config/locales/bg.yml b/config/locales/bg.yml index be785a2ba..f52404543 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1339,7 +1339,9 @@ bg: newer: По-нови следи trace: pending: Обработва се - count_points: '%{count} точки' + count_points: + one: 1 точка + other: '%{count} точки' view_map: Вижте на картата edit: променяне edit_map: Редактиране на картата diff --git a/config/locales/bs.yml b/config/locales/bs.yml index 011c3654b..a02492ee7 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -9,6 +9,7 @@ # Author: KWiki # Author: Macofe # Author: Maxmus +# Author: Obsuser # Author: Palapa # Author: Ruila # Author: Srdjan m @@ -994,7 +995,7 @@ bs: destroyed: Poruka izbrisana site: about: - next: Slijedeće + next: Sljedeće open_data_title: Open Data copyright: foreign: @@ -1424,7 +1425,7 @@ bs: no_apps: Imate li aplikaciju koju želite registrirati za korištenje sa %{oauth} standardom? Morate registrirati Vašu web aplikaciju prije nego ona može slati OAuth zahtjeve za ovu uslugu - registered_apps: 'Imate registrirane slijedeće klijentske aplikacije:' + registered_apps: 'Imate registrirane sljedeće klijentske aplikacije:' register_new: Registrirajte Vašu aplikaciju form: name: Ime diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 9fbd9a13f..3187b7758 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -310,6 +310,7 @@ ca: tag: La pàgina de descripció del wiki per a l'etiqueta %{key}=%{value} wikidata_link: L'element %{page} a Wikidata wikipedia_link: L'article %{page} a la Viquipèdia + wikimedia_commons_link: L'element %{page} a Wikimedia Commons telephone_link: Telefona %{phone_number} colour_preview: Previsualització de color %{colour_value} note: @@ -892,7 +893,7 @@ ca: platform: Andana preserved: Ferrocarril conservat proposed: Ferrocarril projectat - spur: Esperó de ferrocarril + spur: Branc ferroviari station: Estació de tren stop: Parada de trens subway: Metro @@ -912,22 +913,22 @@ ca: books: Llibreria boutique: Boutique butcher: Carnisseria - car: Venda de Cotxes + car: Venda de cotxes car_parts: Recanvis per a cotxes car_repair: Taller mecànic carpet: Botiga de catifes - charity: Botiga de caritat + charity: Botiga de beneficència chemist: Farmàcia clothes: Botiga de roba computer: Botiga d'informàtica - confectionery: Confiteria botiga + confectionery: Confiteria convenience: Botiga de conveniència copyshop: Copisteria - cosmetics: Botiga Cosmètica - deli: Botiga de comestibles - department_store: Department Store - discount: Botiga d'articles de descompte - doityourself: Bricolatge + cosmetics: Botiga cosmètica + deli: Botiga gastronòmica + department_store: Grans magatzems + discount: Botiga de descompte + doityourself: Botiga de bricolatge dry_cleaning: Tintoreria electronics: Botiga d'electrònica estate_agent: Immobiliària @@ -935,73 +936,73 @@ ca: fashion: Botiga de moda fish: Peixateria florist: Floristeria - food: Botiga de menjar - funeral_directors: Funeral d'administració + food: Botiga d'alimentació + funeral_directors: Funerària furniture: Mobles - gallery: Galeria de fotos - garden_centre: Centre de jardí - general: Magatzem General + gallery: Galeria + garden_centre: Jardineria + general: Botiga generalista gift: Botiga de regals - greengrocer: Greengrocer + greengrocer: Verduleria grocery: Botiga de queviures - hairdresser: Perruqueria o barberia - hardware: Botiga de maquinari - hifi: Hi-Fi + hairdresser: Perruqueria + hardware: Ferreteria + hifi: Botiga de Hi-Fi houseware: Botiga d'objectes per a la llar interior_decoration: Decoració d'interiors jewelry: Joieria - kiosk: Quiosc botiga + kiosk: Quiosc kitchen: Botiga de cuina laundry: Bugaderia lottery: Loteria mall: Centre comercial market: Mercat - massage: Massatge - mobile_phone: Botiga de telèfon mòbil + massage: Massatgista + mobile_phone: Botiga de telèfons mòbils motorcycle: Botiga de motocicletes music: Botiga de música - newsagent: Quiosc + newsagent: Quiosc de premsa optician: Òptica - organic: Botiga d'aliments orgànics - outdoor: Botiga exterior + organic: Botiga d'aliments ecològics + outdoor: Botiga d'esports d'aventura paint: Botiga de pintures pawnbroker: Casa de penyores pet: Botiga d'animals pharmacy: Farmàcia - photo: Botiga de foto + photo: Fotògraf seafood: Marisc second_hand: Botiga de segona mà shoes: Sabateria sports: Botiga d'esports - stationery: Botiga de papereria + stationery: Papereria supermarket: Supermercat tailor: Sastreria - ticket: Botiga de tiquets + ticket: Venda d'entrades tobacco: Estanc toys: Botiga de joguines travel_agency: Agència de viatges tyres: Botiga de pneumàtics - vacant: Botiga vacant - variety_store: Botiga de varietats - video: Video de la botiga + vacant: Botiga tancada + variety_store: Botiga de preus baixos + video: Videoclub wine: Vinateria "yes": Botiga tourism: - alpine_hut: Cabanya alpina + alpine_hut: Refugi de muntanya apartment: Apartament de vacances - artwork: Il·lustració + artwork: Obra d'art attraction: Atracció - bed_and_breakfast: Llit i esmorzar (B&B) + bed_and_breakfast: Bed and breakfast cabin: Cabanya - camp_site: Campament + camp_site: Càmping caravan_site: Càmping per a caravanes chalet: Xalet gallery: Galeria - guest_house: Alberg - hostel: Hostal + guest_house: Pensió + hostel: Alberg hotel: Hotel information: Informació - motel: Motel + motel: Hotel de carretera museum: Museu picnic_site: Àrea de pícnic theme_park: Parc temàtic @@ -1016,52 +1017,52 @@ ca: boatyard: Drassana canal: Canal dam: Dam - derelict_canal: Hi Canal - ditch: Séquia - dock: No obstant això, - drain: De drenatge - lock: Pany - lock_gate: Porta de panys - mooring: Amarradors + derelict_canal: Canal abandonat + ditch: Rasa + dock: Moll + drain: Canal de drenatge + lock: Resclosa + lock_gate: Comporta de la resclosa + mooring: Amarratge rapids: Ràpids river: Riu - stream: Stream - wadi: Torrent + stream: Rierol + wadi: Riera waterfall: Cascada - weir: Weir + weir: Assut "yes": Curs d'aigua admin_levels: - level2: Frontera internacional - level4: Límit d'estat - level5: Límit de regió - level6: Frontera - level8: Límit de municipi - level9: Límit de districte - level10: Límit de barri + level2: Frontera internacional (nivell 2) + level4: Límit estatal (nivell 4) + level5: Límit regional (nivell 5) + level6: Límit comarcal (nivell 6) + level8: Límit municipal (nivell 8) + level9: Límit intramunicipal (nivell 9) + level10: Límit intramunicipal (nivell 10) description: title: - osm_nominatim: Ubicació des de OpenStreetMap + osm_nominatim: Ubicació segons OpenStreetMap Nominatim - geonames: Localització des de GeoNames + geonames: Ubicació segons GeoNames types: cities: Ciutats - towns: Municipis + towns: Viles places: Llocs results: - no_results: No hi ha resultats + no_results: Cap resultat trobat more_results: Més resultats issues: index: - title: Problemes + title: Incidències select_status: Selecciona l'estat select_type: Selecciona el tipus select_last_updated_by: Selecció la darrera actualització feta per - reported_user: Usuari denunciat + reported_user: Usuari reportat not_updated: No actualitzat search: Cerca search_guidance: 'Cerca incidències:' user_not_found: El compte d’usuari no existeix - issues_not_found: No s'ha trobat cap incidència + issues_not_found: No s'ha trobat cap incidència d'aquest tipus status: Estat reports: Informes last_updated: Darrera actualització @@ -1146,12 +1147,12 @@ ca: offensive_label: Aquest perfil d'usuari és ofensiu/obscè threat_label: Aquest perfil d'usuari conté una amenaça vandal_label: Aquest usuari és un vàndal - other_label: Altre + other_label: Un altre note: spam_label: Aquesta nota és brossa personal_label: Aquesta nota conté dades personals abusive_label: Aquesta nota és injuriosa - other_label: Altre + other_label: Un altre create: successful_report: El vostre informe s'ha registrat correctament provide_details: Proporcioneu els detalls demanats @@ -1160,15 +1161,15 @@ ca: title: OpenStreetMap h1: OpenStreetMap logo: - alt_text: logotip de l'OpenStreetMap + alt_text: Logotip de l'OpenStreetMap home: Vés a la ubicació d'inici logout: Finalitza la sessió log_in: Inicia sessió log_in_tooltip: Inicia una sessió amb un compte existent - sign_up: Registre + sign_up: Crea un compte start_mapping: Comença a cartografiar - sign_up_tooltip: Crea un usuari per editar - edit: Modificació + sign_up_tooltip: Crea un compte per a col·laborar + edit: Modifica history: Historial export: Exporta issues: Incidències @@ -1179,29 +1180,28 @@ ca: user_diaries: Diaris d'usuari user_diaries_tooltip: Mostra els diaris d'usuari edit_with: Modifica amb %{editor} - tag_line: El mapa wiki lliure mundial - intro_header: Benvinguts a l'OpenStreetMap! - intro_text: L'OpenStreetMap és un mapa del món, creat per persones com tu i d'ús + tag_line: El wikimapamundi lliure + intro_header: OpenStreetMap us dona la benviguda + intro_text: L'OpenStreetMap és un mapa del món creat per persones com tu i d'ús lliure sota una llicència oberta. intro_2_create_account: Crea un compte d'usuari hosting_partners_html: L'allotjament és a càrrec de %{ucl}, %{bytemark} i d'altres %{partners}. partners_ucl: UCL - partners_bytemark: Allotjament Bytemark + partners_bytemark: Bytemark Hosting partners_partners: socis tou: Condicions d’ús - osm_offline: La base de dades OpenStreetMap és fora de línia, mentre es fan actuacions - de manteniment necessàries. - osm_read_only: La base de dades OpenStreetMap actualment és en el mode read-only - mentre que les actuacions de manteniment essencials de base de dades es porta - a terme. - donate: Suport OpenStreetMap %{link} el fons de rampa de maquinari. + osm_offline: La base de dades OpenStreetMap és fora de línia mentre es fan les + actuacions de manteniment necessàries. + osm_read_only: La base de dades OpenStreetMap actualment és en el mode només de + lectura mentre es fan les actuacions de manteniment necessàries. + donate: Ajudeu l'OpenStreetMap amb %{link} al Fons de Modernització del Maquinari. help: Ajuda about: Informació copyright: Drets d'autor community: Comunitat - community_blogs: Blocs de comunitat - community_blogs_title: Blocs dels membres de la comunitat OpenStreetMap + community_blogs: Blogs de la comunitat + community_blogs_title: Blogs dels membres de la comunitat OpenStreetMap foundation: Fundació foundation_title: La Fundació OpenStreetMap make_a_donation: @@ -1211,15 +1211,15 @@ ca: more: Més notifier: diary_comment_notification: - subject: '[OpenStreetMap] %{user} ha comentat en una entrada de diari' + subject: '[OpenStreetMap] %{user} ha comentat una entrada de diari' hi: Hola %{to_user}, - header: '%{from_user} ha comentat en una entrada de diari de l''OpenStreetMap - amb el tema %{subject}:' - footer: També podeu llegir el comentari a les %{readurl} i es pot comentar als - %{commenturl} o respondre a les %{replyurl} + header: '%{from_user} ha comentat l''entrada de diari de l''OpenStreetMap amb + el tema %{subject}:' + footer: També podeu llegir el comentari a %{readurl} i comentar a %{commenturl} + o respondre a %{replyurl} message_notification: hi: Hola %{to_user}, - header: '%{from_user} ha enviat un missatge a través de OpenStreetMap amb el + header: '%{from_user} ha enviat un missatge a través d''OpenStreetMap amb el tema %{subject}:' footer_html: També podeu llegir el missatge a %{readurl} i podeu respondre'l a %{replyurl} @@ -1237,94 +1237,93 @@ ca: and_no_tags: i cap etiqueta. failure: subject: '[OpenStreetMap] Error d''importació de GPX' - failed_to_import: 'no es pot importar. Aquí està l''error:' - more_info_1: Més informació en relació a errades d'importació GPX i com evitar-les - more_info_2: 'ells es pot trobar a:' + failed_to_import: 'no es pot importar. L''error ha estat:' + more_info_1: Més informació en relació a errades d'importació de GPX i com + evitar-les + more_info_2: 'els podeu trobar a:' success: - subject: '[OpenStreetMap] L''èxit de GPX importació' - loaded_successfully: carregat amb %{trace_points} fora d'un punts possibles - %{possible_points}. + subject: '[OpenStreetMap] Importació de GPX correcta' + loaded_successfully: carregat correctament amb %{trace_points} punts d'un + total de %{possible_points} punts possibles. signup_confirm: - subject: '[OpenStreetMap] Benvinguts a OpenStreetMap' - greeting: Hola! + subject: '[OpenStreetMap] OpenStreetMap us dona la benvinguda' + greeting: Hola created: Algú (suposem que vós mateix) acaba de crear un compte a %{site_url}. - confirm: 'Primer de tot hem de confirmar que aquesta petició ha estat feta per - vostè, si ha estat així, si us plau, premeu sobre el següent enllaç per tal - confirmar la vostra petició de creació del compte d''usuari:' - welcome: Una vegada hàgiu confirmat el compte, us donarem alguna informació - addicional perquè pugueu començar. + confirm: 'Primer de tot, hem de confirmar que aquesta petició de creació de + compte és vostra; si ho és, premeu sobre el següent enllaç per tal de confirmar-la:' + welcome: Quan confirmeu el compte, us donarem informació addicional perquè pugueu + començar. email_confirm: subject: '[OpenStreetMap] Confirmeu l''adreça de correu' email_confirm_plain: greeting: Hola, - hopefully_you: Algú (esperem que vostè) vol canviar la vostra adreça electrònica + hopefully_you: Algú (esperem que vós) vol canviar la vostra adreça electrònica a %{server_url} per %{new_address}. - click_the_link: Si sou vós mateix, feu clic a l'enllaç inferior per confirmar + click_the_link: Si sou vós mateix, feu clic a l'enllaç de sota per confirmar el canvi. email_confirm_html: greeting: Hola, - hopefully_you: Algú (esperem que vostè) vol canviar la vostra adreça electrònica + hopefully_you: Algú (esperem que vós) vol canviar la vostra adreça electrònica a %{server_url} per %{new_address}. - click_the_link: Si això és vostè, si us plau, feu clic a l'enllaç sota per confirmar + click_the_link: Si sou vós mateix, feu clic a l'enllaç de sota per confirmar el canvi. lost_password: subject: '[OpenStreetMap] Sol·licitud de reinicialització de contrasenya' lost_password_plain: greeting: Hola, - hopefully_you: Algú (possiblement vostè) ha demanat que la contrasenya d'aquest - compte d'openstreetmap.org li siga reiniciada a la vostra adreça de correu - electrònic. - click_the_link: Si això és vostè, si us plau, feu clic a l'enllaç de sota per - restaurar la seva contrasenya. + hopefully_you: Algú (possiblement vós) ha demanat reincialitzar la contrasenya + del compte d'openstreetmap.org associat a aquesta adreça de correu electrònic. + click_the_link: Si sou vós mateix, feu clic a l'enllaç de sota per reinicialitzar + la contrasenya. lost_password_html: greeting: Hola, - hopefully_you: Algú (possiblement vostè) ha demanat per a la contrasenya restaurar - el compte de openstreetmap.org d'aquesta adreça de correu electrònic. - click_the_link: Si sou vós, feu clic a l'enllaç de sota per restaurar la vostra - contrasenya. + hopefully_you: Algú (possiblement vós) ha demanat reincialitzar la contrasenya + del compte d'openstreetmap.org associat a aquesta adreça de correu electrònic. + click_the_link: Si sou vós, feu clic a l'enllaç de sota per reinicialitzar la + vostra contrasenya. note_comment_notification: anonymous: Un usuari anònim greeting: Hola, commented: - subject_own: '[OpenStreetMap] %{commenter} ha comentat en una de les teves + subject_own: '[OpenStreetMap] %{commenter} ha comentat una de les vostres notes' - subject_other: '[OpenStreetMap] %{commenter} ha comentat en una nota la qual - teniu interès' - your_note: '%{commenter} ha fet un comentari en una de les teves notes del - mapa aprop de %{place}.' - commented_note: '%{commenter} ha fet un comentari en una nota de mapa a la - qual has comentat. Aquesta nota és aprop de %{place}.' + subject_other: '[OpenStreetMap] %{commenter} ha comentat una nota que us interessa' + your_note: '%{commenter} ha fet un comentari en una de les vostres notes de + mapa a prop de %{place}.' + commented_note: '%{commenter} ha fet un comentari en una nota de mapa que + havíeu comentat. Aquesta nota és a prop de %{place}.' closed: - subject_own: '[OpenStreetMap] %{commenter} ha solucionat una de les teves + subject_own: '[OpenStreetMap] %{commenter} ha solucionat una de les vostres notes' - subject_other: '[OpenStreetMap] %{commenter} ha solucionat una nota que t''interessa' + subject_other: '[OpenStreetMap] %{commenter} ha solucionat una nota que us + interessa' your_note: '%{commenter} ha resolt una de les notes de mapa a prop %{place}.' - commented_note: '%{commenter} ha resolt una nota de mapa en la qual has comentat. - Aquesta nota és aprop de %{place}.' + commented_note: '%{commenter} ha resolt una nota de mapa que havíeu comentat. + Aquesta nota és a prop de %{place}.' reopened: subject_own: '[OpenStreetMap] %{commenter} ha reactivat una de les vostres notes' - subject_other: '[OpenStreetMap] %{commenter} ha reactivat una nota en que - vostè està interessat' - your_note: '%{commenter} ha reactivat una de les notes de mapa a prop %{place}.' - commented_note: '%{commenter} ha reactivat una nota de mapa en la qual hi - heu comentat. La nota és a prop de %{place}.' + subject_other: '[OpenStreetMap] %{commenter} ha reactivat una nota que us + interessa' + your_note: '%{commenter} ha reactivat una de les notes de mapa a prop de %{place}.' + commented_note: '%{commenter} ha reactivat una nota de mapa que havíeu comentat. + La nota és a prop de %{place}.' details: Podeu trobar més detalls de la nota a %{url}. changeset_comment_notification: hi: Hola %{to_user}, greeting: Hola, commented: - subject_own: '[OpenStreetMap] %{commenter} ha comentat en un dels vostres - conjunts de canvis' - subject_other: '[OpenStreetMap] %{commenter} ha comentat en un conjunt de - canvis el qual hi esteu interessat' + subject_own: '[OpenStreetMap] %{commenter} ha comentat un dels vostres conjunts + de canvis' + subject_other: '[OpenStreetMap] %{commenter} ha comentat un conjunt de canvis + que us interessa' your_changeset: '%{commenter} ha fet un comentari a %{time} en un dels vostres conjunts de canvis' commented_changeset: '%{commenter} ha fet un comentari a %{time} en un conjunt de canvis de %{changeset_author} que esteu mirant' partial_changeset_with_comment: amb comentari '%{changeset_comment}' - partial_changeset_without_comment: sense comentari - details: Més detalls del conjunt de canvis es poden trobar a %{url} + partial_changeset_without_comment: cap comentari + details: Podeu trobar més detalls del conjunt de canvis a %{url} unsubscribe: Per deixar de seguir les actualitzacions d'aquest conjunt de canvis, visita %{url} i clica "Deixa de seguir" messages: @@ -1342,8 +1341,8 @@ ca: from: De subject: Assumpte date: Data - no_messages_yet: No teniu cap missatge. Per què no entreu en contacte amb %{people_mapping_nearby_link}? - people_mapping_nearby: gent propera que cartografia + no_messages_yet: No teniu cap missatge. Per què no contacteu amb %{people_mapping_nearby_link}? + people_mapping_nearby: gent que cartografia a prop message_summary: unread_button: Marca com a no llegit read_button: Marca com a llegit @@ -1351,36 +1350,36 @@ ca: destroy_button: Suprimeix new: title: Envia un missatge - send_message_to: Envia un missatge nou per a %{name} + send_message_to: Envia un missatge nou a %{name} subject: Assumpte body: Cos back_to_inbox: Torna a la safata d'entrada create: message_sent: S'ha enviat el missatge - limit_exceeded: Heu enviat un munt de missatges recentment. Espereu una estona - abans d'intentar d'enviar més missatges. + limit_exceeded: Heu enviat molts missatges recentment. Espereu una estona abans + d'enviar-ne d'altres. no_such_message: - title: No existeix aquest missatge - heading: No existeix aquest missatge - body: Trist que no hi ha cap missatge amb que id. + title: Aquest missatge no existeix + heading: Aquest missatge no existeix + body: No hi ha cap missatge amb aquesta id. outbox: - title: Sortida - my_inbox: El meu %{inbox_link} - inbox: Entrada - outbox: sortida + title: Safata de sortida + my_inbox: La meva %{inbox_link} + inbox: safata d'entrada + outbox: safata de sortida messages: one: Teniu %{count} missatge enviat other: Teniu %{count} missatges enviats - to: A + to: Per a subject: Assumpte date: Data - no_sent_messages: Encara no has enviat cap missatge. Per què no entrar en contacte - amb alguns dels %{people_mapping_nearby_link}? - people_mapping_nearby: gent propera que cartografia + no_sent_messages: Encara no heu enviat cap missatge. Per què no contacteu amb + algunes de les %{people_mapping_nearby_link}? + people_mapping_nearby: gent que cartografia a prop reply: - wrong_user: Heu iniciat la sessió com "%{user}", però el missatge que han demanat - de respondre a no s'ha enviat a aquest usuari. Si us plau connecti's com l'usuari - correcte per a respondre. + wrong_user: Heu iniciat la sessió com a "%{user}", però el missatge que voleu + respondre no s'ha enviat a aquest usuari. Per a poder respondre, inicieu la + sessió amb l'usuari correcte. show: title: Llegeix el missatge from: De @@ -1391,9 +1390,9 @@ ca: destroy_button: Suprimeix back: Enrere to: Per a - wrong_user: Heu iniciat la sessió com a "%{user}", però el missatge que voleu - llegir no va ser enviat per o adreçat a aquest usuari. Connecteu-vos com l'usuari - correcte per a poder llegir-lo. + wrong_user: Heu iniciat la sessió com a "%{user}", però aquest usuari no ha + escrit ni ha rebut el missatge que voleu llegir. Per a poder llegir-lo, inicieu + la sessió amb l'usuari correcte. sent_message_summary: destroy_button: Suprimeix mark: @@ -1404,25 +1403,25 @@ ca: site: about: next: Següent - copyright_html: Col·laboradors de
©OpenStreetMap - used_by: '%{name} integra dades de mapes en milers de llocs web, aplicacions - per a mòbils i dispositius de maquinari' - lede_text: OpenStreetMap està construït per una comunitats de catògrafs que - contibueixen i mantenen dades sobre carreteres, senders, cafeteries, estacions - de ferrocarril, i molt més, per tot el món. + copyright_html: ©Col·laboradors d'
OpenStreetMap + used_by: '%{name} proporciona dades cartogràfiques a milers de llocs web, aplicacions + per a mòbils i dispositius' + lede_text: OpenStreetMap està fet per una comunitat de cartògrafs que aporten + i actualitzen dades sobre carreteres, senders, cafeteries, estacions de ferrocarril + i molt més arreu del món. local_knowledge_title: Coneixement local - local_knowledge_html: OpenStreetMap potencia el coneixement local. Els contribuïdors - usen imatges aèries, dispositius GPS, i mapes de baixa tecnologia per tal - de verificar que OSM és precís i està actualitzat. - community_driven_title: Dirigit per la comunitat + local_knowledge_html: OpenStreetMap valora el coneixement local. Els col·laboradors + usen imatges aèries, dispositius GPS i mapes de paper per tal de verificar + que OSM és correcte i està actualitzat. + community_driven_title: Impulsat per la comunitat community_driven_html: |- - La comunitat d'OpenStreetMap és diversa, apassionada, i creix cada dia. Entre els nostres contribuïdors hi ha cartògrafs entusiastes, professionals de GIS, enginyers que posen en funcionament els servidors d'OSM, voluntaris que cartografien les zones afectades per desastres, i molt més. - Si voleu conèixer més sobre la comunitat, vegeu els diaris d'usuari, els blogs de la comunitat, i la pàgina web de la Fundació OSM. + La comunitat d'OpenStreetMap és diversa, apassionada i creix cada dia. Entre els nostres contribuïdors hi ha cartògrafs entusiastes, professionals de GIS, enginyers que gestionen els servidors d'OSM, voluntaris que cartografien les zones afectades per desastres i molta més gent. + Si voleu conèixer més sobre la comunitat, visiteu els diaris d'usuari, els blogs de la comunitat, i la pàgina web de la Fundació OSM. open_data_title: Dades obertes open_data_html: 'OpenStreetMap són dades lliures: sou lliures d''usar-lo - per a qualsevol propòsit, sempre que doneu crèdit a OpenStreetMap i els seus - contribuïdors. Si modifiqueu o construïu sobre les dades en alguna manera - concreta, podeu distribuir el resultat només sota la mateixa llicència. Vegeu + per a qualsevol propòsit, sempre que especifiqueu que són obra d''OpenStreetMap + i els seus col·laboradors. Si modifiqueu o amplieu les dades de determinades + maneres, només podreu distribuir el resultat sota la mateixa llicència. Vegeu la pàgina de copyright i llicència per a més detalls.' legal_title: Avisos legals @@ -1442,59 +1441,54 @@ ca: foreign: title: Quant a la traducció text: En cas de conflicte entre aquesta pàgina traduïda i %{english_original_link}, - la pàgina en anglès té prioritat + la pàgina en anglès té prevalènça english_link: l'original en anglès native: title: Sobre aquesta pàgina text: Esteu veient la versió anglesa de la pàgina de drets d'autor. Podeu tornar a la %{native_link} d'aquesta pàgina o podeu deixar de llegir sobre - el copyright i anar a %{mapping_link}. - native_link: versió català + els drets d'autor i %{mapping_link}. + native_link: Versió en català mapping_link: Comença a cartografiar legal_babble: title_html: Drets d'autor i llicència intro_1_html: |- - Les dades obertes d'OpenStreetMap® estan publicades sota la open data d'OpenStreetMap® estan publicades sota la llicència de base de dades oberta (ODbL) per la Fundació OpenStreetMap (OSMF). - intro_2_html: "Sou lliure de copiar, distribuir, comunicar públicament i fer-ne - obres \nderivades de les nostres dades, sempre que atribuïu els crèdits - a \nOpenStreetMap i els seus col·laboradors. Si modifiqueu o utilitzeu les\nnostres - dades fer fer obres derivades, només podreu distribuir l'obra \nresultant - amb la mateixa llicència. Aquest \ntext - legal\ncode sencer que explica detalladament els vostres drets i responsabbilitats." - intro_3_html: |- - La cartografia de les nostres tessel·les i la nostra documentació són ofertes - sota llicència Text de la llicència de Creative Commons Reconeixement-Compartir Igual 2.0(CC-BY-SA). - credit_title_html: Com a crèdit OpenStreetMap - credit_1_html: |- - Exigim que l'atribució de drets d'autor sigui “© Col·laboradors d'OpenStreetMap - ”. + intro_2_html: "Sou lliure de copiar, distribuir, comunicar públicament i fer + obres derivades de les nostres dades, sempre que especifiqueu que són obra + d'OpenStreetMap i els seus col·laboradors. Si modifiqueu o amplieu les\nnostres + dades, només podreu distribuir l'obra \nresultant amb la mateixa llicència. + El\ncodi legal + complet explica detalladament els vostres drets i responsabilitats." + intro_3_html: La cartografia de les nostres tessel·les i la nostra documentació + són disponibles sota llicència Text + de la llicència de Creative Commons Reconeixement-Compartir Igual 2.0(CC-BY-SA). + credit_title_html: Com atribuir autoria a OpenStreetMap + credit_1_html: Demanem que es reconegui “© Col·laboradors d'OpenStreetMap” + com a autors. credit_2_html: També heu de deixar clar que les dades són disponibles sota - llicència obereta, i si s'utilitzen les nostres tessel·les de mapes, que - la cartografia és llicenciada com CC-BY-SA. Podeu fer això enllaçant a aquest pàgina de copyright. - D'altra banda, i com a requisit obligatori si voleu distribuir OSM en forma - de dades en brut, podeu citar i enllaçar directament a la llicència. En - el cas d'utilitzar suports on els enllaços d'hipertext no són possibles - (per exemple, obres impreses), us suggerim d'adreçar els lectors a openstreetmap.org - (potser indicant l'adreça completa d'OpenStreetMap), a opendatacommons.org - i si s'escau, a creativecommons.org. + llicència de base de dades oberta i, si utilitzeu els nostres mapes, que + la cartografia té llicència CC-BY-SA. Podeu fer-ho enllaçant a aquesta + pàgina de copyright. De manera alternativa, però com a requisit obligatori + si distribuïu OSM en forma de dades en brut, podeu citar i enllaçar directament + a la llicència. En el cas d'utilitzar suports on els enllaços d'hipertext + no són possibles (per exemple, obres impreses), us suggerim d'adreçar els + lectors a openstreetmap.org (potser indicant l'adreça completa d'OpenStreetMap), + a opendatacommons.org i, si s'escau, a creativecommons.org. credit_3_html: |- En el cas d'un mapa electrònic navegable, els crèdits han d'aparèixer a la cantonada del mapa. Per exemple: attribution_example: - alt: Exemple de com atribuir OpenStreetMap a una pàgina web - title: Exemple d'atribució + alt: Exemple de com atribuir l'autoria a OpenStreetMap en una pàgina web + title: Exemple d'atribució d'autoria more_title_html: Saber-ne més more_1_html: |- - Llegiu més informació sobre com utilitzar les nostres dades, i com donar-ne crèdit, a la pàgina de llicència OSMF i a les Preguntes - Freqüents sobre legalitat. + Per a més informació sobre com utilitzar les nostres dades i com atribuir-ne l'autorita, visiteu la pàgina de llicència de la OSMF. more_2_html: Encara que les dades d'OpenStreetMap són dades obertes, no podem - oferir una API gratuïta per als desenvolupadors de terceres parts. Vegeu - la política + oferir una API gratuïta a tercers. Vegeu la política d'ús de l'API, la política d'ús de les tessel·les i la política d'ús de Nominatim. @@ -1502,32 +1496,31 @@ ca: contributors_intro_html: 'Els nostres col·laboradors són milers de persones. També incloem dades amb llicència oberta de les agències públiques de cartografia i d''altres fonts, entre elles:' - contributors_at_html: |- - Àustria: conté dades de - Stadt Wien sota - CC BY. - contributors_au_html: |- - Austràlia: conté dades suburbi basats - en les dades d'Austràlia Oficina d'estadístiques. - contributors_ca_html: |- - Canadà: conté dades de - GeoBase ®, GeoGratis (© Departament de Natural - Recursos Canadà), CanVec (© Departament de Natural - Recursos Canadà) i StatCan (Divisió de Geografia, - Canadà de Estadístiques). + contributors_at_html: 'Àustria: conté dades de Stadt + Wien (sota CC + BY), el Land + Voralberg i el Land Tirol (sota CC + BY AT amb correccions.' + contributors_au_html: 'Austràlia: Conté dades de PSMA + Autralia Limited publicades per Commonwealth of Australia sota els termes + de CC BY 4.0.' + contributors_ca_html: 'Canadà: conté dades de GeoBase ®, + GeoGratis (© Departament de Recursos Naturals de Canadà), CanVec (© Departament + de Recursos Naturals de Canadà) i StatCan (Divisió de Geografia, Institut + d''Estadística de Canadà).' contributors_fi_html: 'Finlàndia: Conté dades de la base de dades topogràfica del National Land Survey of Finland i d''altres bases - de dades, sota la llicència + de dades sota la llicència NLSFI.' contributors_fr_html: |- - França: conté dades d'origen de - Direcció Générale des Impôts. + França: conté dades de la + Direction Générale des Impôts. contributors_nl_html: 'Països Baixos: Conté © dades d''Automotive Navigation Data (AND), 2007 (www.and.com)' contributors_nz_html: 'Nova Zelanda: Conté dades de LINZ Data Service amb permís per a reutilització sota .' contributors_si_html: 'Eslovènia: Conté dades de l''Autoritat - de Topografia i Cartografia i el Ministeri + de Topografia i Cartografia i del Ministeri d''Agricultura, Silvicultura i Alimentació (informació pública d''Eslovènia).' contributors_es_html: |- Spain: Conté dades de l'Institut Geogràfic Nacional espanyol(IGN) i del Sistema Cartgràfic Nacional (SCNE) @@ -1535,16 +1528,15 @@ ca: contributors_za_html: |- Sud-àfrica: conté dades del Chief Directorate: - National Geo-Spatial Information, drets d'autor reservat per l'estat. + National Geo-Spatial Information, drets d'autor reservats per l'estat. contributors_gb_html: 'Regne Unit: Conté dades del Ordnance Survey © Drets d''autor de la Corona i de la base de dades 2010-19.' contributors_footer_1_html: |- Per a més detalls sobre aquesta i d'altres fonts que han estat utilitzades per millorar els mapes de l'OpenStreetMap, visiteu la pàgina dedicada als Col·laboradors del wiki d'OSM. - contributors_footer_2_html: |- - Inclusió de dades en OpenStreetMap no implica que l'original - el proveïdor de dades recolza OpenStreetMap, proporciona cap garantia, o - accepta qualsevol responsabilitat. + contributors_footer_2_html: La inclusió de dades a l'OpenStreetMap no implica + que el proveïdor original de les dades dona suport a l'OpenStreetMap, proporciona + cap garantia o accepta cap responsabilitat. infringement_title_html: Violació dels drets d'autor infringement_1_html: Recordem als col·laboradors de l'OSM que mai no s'han d'afegir dades de cap font amb drets d'autor registrats (com Google Maps @@ -1561,8 +1553,8 @@ ca: sobre l’ús de les marques, consulteu la política de marques registrades. index: - js_1: Tampoc està utilitzant un navegador que no suporta JavaScript o té deshabilitat - JavaScript. + js_1: O bé esteu utilitzant un navegador no compatible amb JavaScript o bé teniu + JavaScript deshabilitat. js_2: L'OpenStreetMap utilitza JavaScript per al mapa lliscant. permalink: Enllaç permanent shortlink: Enllaç curt @@ -1570,60 +1562,59 @@ ca: license: copyright: Copyright d'OpenStreetMap i els seus col·laboradors sota llicència oberta - remote_failed: L'edició ha fallat. Assegureu-vos que el JOSM, o el Merkaartor, - esta executant-se i que l'opció de comandament a distància està habilitada + remote_failed: L'edició ha fallat. Assegureu-vos que el JOSM o el Merkaartor + està executant-se i que l'opció de comandament a distància està habilitada edit: - not_public: No heu fet les configuracions necessàries perquè les vostres modificacions - siguin públiques. + not_public: No heu configurat les vostres modificacions perquè siguin públiques. not_public_description: Ja no podeu modificar el mapa a menys que feu públics els vostres canvis. Podeu configurar les modificacions com a públiques a la vostra %{user_page}. user_page_link: pàgina d'usuari - anon_edits_link_text: Esbrina perquè aquest és el cas. + anon_edits_link_text: Llegeix aquí perquè. flash_player_required: Necessiteu un reproductor de Flash per a usar el Potlatch, l'editor Flash de l'OpenStreetMap. Podeu baixar el reproductor Flash Player des del web Adobe.com. També hi ha altres opcions per a editar l'OpenStreetMap. potlatch_unsaved_changes: Teniu canvis sense desar. (Per desar els canvis al - Potlatch, heu de desseleccionar la via o el punt actual, si esteu en l'edicó - en viu, o fer clic a "desa", si teniu un botó "desa".) + Potlatch, desseleccioneu la via o el punt actuals si esteu en mode d'edició + en viu o feu clic a "Desa" si teniu un botó "Desa".) potlatch2_not_configured: No s'ha configurat el Potlatch 2 - mireu http://wiki.openstreetmap.org/wiki/The_Rails_Port#Potlatch_2 per a més informació potlatch2_unsaved_changes: Teniu canvis sense desar. (Per desar els canvis al - Potlatch 2, heu de fer clic a "desa".) + Potlatch 2, feu clic a "Desa".) id_not_configured: iD no s'ha configurat - no_iframe_support: El navegador no suporta iframes HTML, que són necessàries - per a aquesta funcionalitat. + no_iframe_support: El vostre navegador no és compatible amb iframes HTML, que + són necessàries per a aquesta funcionalitat. export: - title: Exportar + title: Exporta area_to_export: Àrea a exportar manually_select: Selecciona manualment una àrea diferent format_to_export: Format d'exportació - osm_xml_data: OpenStreetMap XML Data + osm_xml_data: Dades XML d'OpenStreetMap map_image: Imatge de mapa (mostra una capa estàndard) - embeddable_html: HTML que es pot incloure + embeddable_html: HTML incrustable licence: Llicència export_details: Les dades d'OpenStreetMap són publicades sota el termes de la - llicència Creative - Commons Attribution-ShareAlike 2.0. + Open Data Commons + Open Database License (ODbL). too_large: - advice: 'Si falla l''exportació anterior, si us plau, penseu a utilitzar una - de les fonts llistades a continuació:' - body: Aquesta zona és massa gran per ser exportada com a dades XML de OpenStreetMap. - Si us plau seleccioneu una àrea més petita o bé una de les següents fonts + advice: 'Si l''exportació anterior falla, proveu-ho amb alguna de les fonts + incloses a la llista següent:' + body: Aquesta zona és massa gran per ser exportada com a dades XML d'OpenStreetMap. + Feu zoom, seleccioneu una àrea més petita o useu una de les següents fonts per descarregar quantitats grans de dades. planet: title: Planeta OSM description: Còpies actualitzades regularment de la base de dades d'OpenStreetMap al complet overpass: - title: API Overpass - description: Descarrega aquest requadre des d'una rèplica de la base de - dades d'OpenStreetMap + title: Overpass API + description: Descarrega aquest requadre delimitador des d'una rèplica de + la base de dades d'OpenStreetMap geofabrik: title: Descàrregues de Geofabrik description: Extractes actualitzats regularment de continents, països i - de les ciutats seleccionades + ciutats seleccionades metro: title: Extractes de Metro description: Extractes per a les ciutats més grans del món i les seves àrees @@ -1641,7 +1632,7 @@ ca: latitude: 'Lat:' longitude: 'Lon:' output: Sortida - paste_html: Enganxa HTML per incloure'l al lloc web + paste_html: Enganxa HTML per incrustar-lo al lloc web export_button: Exporta fixthemap: title: Informeu d'un problema / Corregiu el mapa @@ -1649,29 +1640,29 @@ ca: title: Com contribuir join_the_community: title: Afegiu-vos a la comunitat - explanation_html: Si heu trobat un problema amb les nostres dades del mapa, - com per exemple l'omissió d'una carretera o bé de la vostra adreça, la - millor forma d'arreglar-ho és unint-se a la comunitat d'OpenStreetMap - i afegir o bé corregir les dades vós mateix. + explanation_html: Si heu trobat un error en el mapa, com per exemple una + carretera que falta o bé la vostra adreça, la millor forma d'arreglar-ho + és unint-vos a la comunitat d'OpenStreetMap i afegir o bé corregir les + dades vós mateix. add_a_note: instructions_html: Feu clic a o a la mateixa icona sobre el mapa. Això afegirà un marcador al mapa, que podeu desplaçar arrossegant-lo. Afegiu el vostre missatge, deseu-lo i els altres usuaris ho investigaran. other_concerns: - title: Altres aspectes - explanation_html: Si us preocupa la utilització de les nostres dades o bé - el contingut d'aquestes, consulteu la pàgina de drets - d'autor per a més informació, o bé contacteu el grup + title: Altres qüestions + explanation_html: Si us preocupa el contingut de les nostres dades o l'ús + que se'n fa, consulteu la pàgina de drets d'autor + per a més informació, o bé contacteu amb el grup de treball d'OSMF corresponent. help: - title: Obtenir ajuda - introduction: OpenStreetMap té multitud de recursos per conèixer aquest projecte, - per plantejar i respondre preguntes, i per participar en discussions col·laboratives - i documentar temes de cartografia. + title: Com obtenir ajuda + introduction: OpenStreetMap té diversos recursos per conèixer el projecte, per + plantejar i respondre preguntes, i per discutir i documentar temes de cartografia + de manera col·laborativa. welcome: url: /welcome title: Benvingut a OpenStreetMap - description: Comença amb aquesta guia ràpida sobre els aspectes bàsics de + description: Comenceu amb aquesta guia ràpida sobre els aspectes bàsics de l'OpenStreetMap. beginners_guide: url: http://wiki.openstreetmap.org/wiki/Ca:Beginners%27_guide @@ -1684,12 +1675,12 @@ ca: i respostes d'OpenStreetMap. mailing_lists: title: Llistes de correu - description: Pregunta o debat sobre qüestions interessants en relació a una - àmplia sèrie de llistes de correu tòpiques o regionals. + description: Pregunta o debat sobre qüestions interessants en un ampli ventall + de llistes de correu temàtiques i regionals. forums: title: Fòrums - description: Preguntes i debats, per a aquells que prefereixen l'estil de - la interfície d'un tauler d'anuncis. + description: Preguntes i debats per als que prefereixen un estil d'interfície + de tauler d'anuncis. irc: title: IRC description: Xat interactiu en llengües diferents i sobre diferents temes. @@ -1703,7 +1694,7 @@ ca: description: Ets amb una organització que vol usar OpenStreetMap? Troba el que et cal saber a la nostra estoreta de benviguda. wiki: - url: http://wiki.openstreetmap.org/ + url: https://wiki.openstreetmap.org/ title: Wiki d'OpenStreetMap description: Navegueu per la wiki per a trobar documentació detallada d'OpenStreetMap. sidebar: @@ -1711,7 +1702,7 @@ ca: close: Tanca search: search: Cerca - get_directions: Obtenir indicacions + get_directions: Obtén indicacions get_directions_title: Trobeu indicacions entre dos punts from: De to: A @@ -1731,9 +1722,9 @@ ca: track: Pista bridleway: Camí de ferradura cycleway: Carril bici - cycleway_national: Via ciclista nacional - cycleway_regional: Via ciclista regional - cycleway_local: Via ciclista local + cycleway_national: Carril bici nacional + cycleway_regional: Carril bici regional + cycleway_local: Carril bici local footway: Camí de vianants rail: Ferrocarril subway: Metro @@ -1741,24 +1732,24 @@ ca: - Tren lleuger - tramvia cable: - - Cable car + - Telefèric - telecadira runway: - Pista d'aeroport - - carril de taxi + - carrer de rodada apron: - - Davantal de l'Aeroport + - Estacionament d'avions - terminal - admin: Límits administratius + admin: Límit administratiu forest: Bosc wood: Fusta golf: Camp de golf park: Parc resident: Zona residencial common: - - Comú - - Prat - retail: Zona de venda al detall + - Àrea comunal + - prat + retail: Àrea comercial industrial: Zona industrial commercial: Zona comercial heathland: Bruguerar @@ -1766,7 +1757,7 @@ ca: - Llac - Embassament farm: Granja - brownfield: Lloc Brownfield + brownfield: Àrea industrial abandonada cemetery: Cementiri allotments: Horts pitch: Camp d'esports @@ -1781,13 +1772,13 @@ ca: summit: - Cim - pic - tunnel: Carcassa de guions = túnel - bridge: Embolcall negre = bridge + tunnel: Línia discontínua = túnel + bridge: Línia negra = bridge private: Accés privat destination: Accés de destinació construction: Carreteres en construcció bicycle_shop: Botiga de bicicletes - bicycle_parking: Aparcament de bicicleta + bicycle_parking: Aparcament de bicicletes toilets: Lavabos richtext_area: edit: Modifica @@ -1807,43 +1798,42 @@ ca: alt: Text alternatiu url: URL welcome: - title: Benvingut! - introduction_html: Us donem la benvinguda a l'OpenStreetMap, el mapa lliure - i editable del món. Ara que ja us heu registrat, ja ho teniu tot a punt per - començar a editar el mapa. Aquí hi ha una guia ràpida amb les coses més importants + title: Us donem la benvinguda! + introduction_html: Us donem la benvinguda a l'OpenStreetMap, el mapamundi lliure + i editable. Ara que ja us heu registrat, ja ho teniu tot a punt per començar + a editar el mapa. Aquí hi ha una guia ràpida amb les coses més importants que cal saber whats_on_the_map: title: Què hi ha al mapa - on_html: L'OpenStreetMap és un lloc per incloure al mapa coses que són reals - i normals- això inclou milions d'edificis, carreteres, i altres detalls - sobre llocs. Pots cartografiar totes les característiques del món real que - et semblin interessants. + on_html: L'OpenStreetMap cartografia coses que són reals i actuals- + això inclou milions d'edificis, carreteres i altres detalls sobre llocs. + Pots cartografiar totes els elements del món real que et semblin interessants. off_html: El que no inclou són dades subjectives com ara puntuacions, - característiques històriques o hipotètiques i dades de fonts subjectes a - copyright. A no ser que posseeixis un permís especial no copiïs res de mapes - de paper o en línia. + característiques històriques o hipotètiques i dades de fonts amb drets d'autor. + Tret que posseeixis un permís especial, no copiïs res de mapes de paper + o en línia. basic_terms: title: Condicions bàsiques per editar el mapa - paragraph_1_html: l'OpenStreetMap té algunes paraules del seu propi argot. - Aquí hi han unes quantes paraules clau que et poden venir bé. + paragraph_1_html: L'OpenStreetMap té un argot propi. Aquí tens unes quantes + paraules clau que et poden venir bé. editor_html: Un editor és un programa o pàgina web que pots utilitzar per editar el mapa. node_html: Un node és un punt al mapa, com ara un restaurant o un arbre. way_html: Una via és una línia o àrea, com ara una carretera, - sèquia, llac o edifici. + un rierol, un llac o un edifici. tag_html: Una etiqueta és un recull de dades sobre un node o una via, com ara el nom d'un restaurant o la velocitat màxima d'una carretera. rules: title: Regles - paragraph_1_html: "OpenStreetMap té poques les regles formals, pel que esperem + paragraph_1_html: "L'OpenStreetMap té poques les regles formals però esperem que tots els participants col·laborin i es comuniquin amb la comunitat. - Si està considerant\naltres activitats que no sigui l'edició manual, si - us plau, llegiu i seguiu les directrius d' \nImportació + Si voler dur a terme\naltres activitats que no siguin l'edició manual, llegiu + i seguiu les directrius d' \nImportació i \nEdició Automàtica." questions: - title: Alguna pregunta més? + title: Alguna pregunta? paragraph_1_html: "OpenStreetMap té diversos recursos per a conèixer aquest projecte, per a plantejar i respondre preguntes, i per a debatre i documentar de forma col·laborativa qüestions de cartografia. \nAjuda. @@ -1851,23 +1841,24 @@ ca: un cop d'ull a la nostra estoreta de benviguda." start_mapping: Comença a editar el mapa add_a_note: - title: No tens temps per editar? Afegeix una nota! + title: No tens temps per editar? Escriu una nota paragraph_1_html: Si només voleu fer una petita modificació però no disposeu - del temps per registrar-vos i aprendre com editar, deixeu una nota al mapa. + del temps per registrar-vos i aprendre a editar, deixeu una nota al mapa. paragraph_2_html: 'Només cal que us dirigiu almapa - i cliqueu l''icona de la nota: . Això afegirà + i cliqueu la icona de la nota: . Això afegirà un marcador al mapa que podeu moure arrossegant-lo. Afegiu el vostre missatge, - cliqueu el botó de desat, i altres usuaris ho investigaran.' + cliqueu el botó de desar, i altres usuaris ho investigaran.' traces: visibility: - private: Privat (només compartit com anònim, el punts són desordenats) - public: Públic (mostrat en llista de traça i com anònims, desordenada punts) - trackable: Seguiments (només compartit com punts anònims, ordenades amb timestamps) - identifiable: Identifiable (mostrat en llista de traça i com a punts d'identificació, - ordenades amb timestamps) + private: Privat (només compartit com a punts anònims no ordenats) + public: Públic (mostrat a la llista de traces i com a punts anònims no ordenats) + trackable: Traçable (només compartit com a punts anònims ordenats segons marques + temporals) + identifiable: Identificable (mostrat a la llista de traes i com a punts identificables + ordenats segons marques temporals) new: - upload_trace: Carrega una traça GPS - upload_gpx: 'Carregui l''arxiu GPX:' + upload_trace: Puja una traça GPS + upload_gpx: 'Puja l''arxiu GPX:' description: 'Descripció:' tags: 'Etiquetes:' tags_help: separat per comes @@ -1878,7 +1869,7 @@ ca: help: Ajuda help_url: https://wiki.openstreetmap.org/wiki/Upload create: - upload_trace: Pujar traça de GPS + upload_trace: Puja una traça de GPS trace_uploaded: El fitxer GPX s'ha pujat i està pendent d'inserció a la base de dades. Això passarà en general dins d'una mitja hora, i se us enviarà un correu electrònic en finalitzar. diff --git a/config/locales/de.yml b/config/locales/de.yml index 188469dd8..adda1e55a 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -342,6 +342,7 @@ de: tag: Die Wiki-Erläuterungsseite für das Attribut %{key}=%{value} wikidata_link: Das Objekt %{page} auf Wikidata wikipedia_link: Der Artikel zu %{page} in der Wikipedia + wikimedia_commons_link: Das %{page} Element auf Wikimedia Commons telephone_link: '%{phone_number} anrufen' colour_preview: Farbe %{colour_value} Vorschau note: diff --git a/config/locales/el.yml b/config/locales/el.yml index 88f7dfb81..f45f37695 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -132,7 +132,43 @@ el: pass_crypt: Κωδικός datetime: distance_in_words_ago: + about_x_hours: + one: περίπου μία ώρα πριν + other: περίπου %{count} ώρες πριν + about_x_months: + one: περίπου έναν μήνα πριν + other: περίπου %{count} μήνες πριν + about_x_years: + one: περίπου έναν χρόνο πριν + other: περίπου %{count} χρόνια πριν + almost_x_years: + one: σχεδόν ένα χρόνο πριν + other: σχεδόν %{count} χρόνια πριν half_a_minute: μισό λεπτό πριν + less_than_x_seconds: + one: λιγότερο από ένα δευτερόλεπτο πριν + other: λιγότερο από %{count} δευτερόλεπτα πριν + less_than_x_minutes: + one: λιγότερο από ένα λεπτό πριν + other: λιγότερο από %{count} λεπτά πριν + over_x_years: + one: πάνω από έναν χρόνο πριν + other: πάνω από %{count} χρόνια πριν + x_seconds: + one: ένα δευτερόλεπτο πριν + other: '%{count} δευτερόλεπτα πριν' + x_minutes: + one: ένα λεπτό πριν + other: '%{count} λεπτά πριν' + x_days: + one: μία ημέρα πριν + other: '%{count} ημέρες πριν' + x_months: + one: έναν μήνα πριν + other: '%{count} μήνες πριν' + x_years: + one: ένα χρόνο πριν + other: '%{count} χρόνια πριν' printable_name: with_version: '%{id}, v%{version}' editor: diff --git a/config/locales/en.yml b/config/locales/en.yml index 35da13709..917c06a95 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -278,6 +278,7 @@ en: tag: "The wiki description page for the %{key}=%{value} tag" wikidata_link: "The %{page} item on Wikidata" wikipedia_link: "The %{page} article on Wikipedia" + wikimedia_commons_link: "The %{page} item on Wikimedia Commons" telephone_link: "Call %{phone_number}" colour_preview: "Colour %{colour_value} preview" note: diff --git a/config/locales/eo.yml b/config/locales/eo.yml index bb143a1a0..6410d3c40 100644 --- a/config/locales/eo.yml +++ b/config/locales/eo.yml @@ -297,6 +297,7 @@ eo: tag: La viki-paĝo priskribanta la etikedon '%{key}=%{value}' wikidata_link: La %{page} elemento en Vikidatumoj wikipedia_link: La artikolo %{page} en Vikipedio + wikimedia_commons_link: Objekto %{page} ĉe Vikimedia Komunejo telephone_link: Telefoni %{phone_number} colour_preview: AntaÅ­vido de koloro “%{colour_value}” note: diff --git a/config/locales/es.yml b/config/locales/es.yml index 6b5611e52..69cd1cefb 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1373,7 +1373,7 @@ es: date: Fecha no_messages_yet: No tienes aún mensajes. ¿Por qué no te pones en contacto con alguno de los %{people_mapping_nearby_link}? - people_mapping_nearby: gente cercana mapeando + people_mapping_nearby: gente mapeando cerca message_summary: unread_button: Marcar como no leído read_button: Marcar como leí­do diff --git a/config/locales/fa.yml b/config/locales/fa.yml index f93ce0762..e4b95945b 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -914,7 +914,7 @@ fa: clothes: فروشگاه پوشاک computer: فروشگاه رایانه confectionery: فروشگاه قنادی - convenience: فروشگاه زنجیره ای + convenience: سوپرمارکت copyshop: مغازه فتوکپی cosmetics: فروشگاه لوازم آرایشی deli: اغذیه فروشی @@ -966,7 +966,7 @@ fa: shoes: فروشگاه کفش sports: فروشگاه ورزشی stationery: فروشگاه نوشت‌افزار - supermarket: سوپرمارکت + supermarket: فروشگاه بزرگ tailor: خیاطی ticket: فروشگاه بلیط tobacco: فروشگاه توتون و تنباکو @@ -1159,10 +1159,10 @@ fa: sign_up_tooltip: ایجاد یک حساب کاربری برای ویرایش edit: ویرایش history: تاریخچه - export: برون‌بُرد + export: برون‌ریزی issues: موضوع‌ها data: داده‌ها - export_data: برون‌بُرد داده‌ها + export_data: برون‌ریزی داده‌ها gps_traces: ردهای GPS gps_traces_tooltip: مدیریت ردهای GPS user_diaries: روزنوشت‌های کاربر @@ -1225,13 +1225,14 @@ fa: and_the_tags: 'و برچسب‌های زیر:' and_no_tags: و بدون برچسب. failure: - subject: درون‌برد ناموفق GPX‏ [OpenStreetMap] - failed_to_import: 'درون‌برد با شکست مواجه شد. این خطا رخ داد:' - more_info_1: اطلاعات بیشتر دربارهٔ شکست درون‌برد GPX و چگونگی پیشگیری از + subject: شکست درون‌ریزی GPX‏ [OpenStreetMap] + failed_to_import: 'درون‌ریزی با شکست مواجه شد. این خطا رخ داد:' + more_info_1: اطلاعات بیشتر دربارهٔ شکست درون‌ریزی GPX و چگونگی پیشگیری از + آن more_info_2: 'آن را در اینجا خواهید یافت:' import_failures_url: https://wiki.openstreetmap.org/wiki/Fa:GPX_Import_Failures success: - subject: درون‌برد موفق GPX‏ [OpenStreetMap] + subject: موفقیت درون‌ریزی GPX‏ [OpenStreetMap] loaded_successfully: با موفقیت و با %{trace_points} نقطه از %{possible_points} نقطهٔ ممکن روی وبسایت قرار گرفته است. signup_confirm: @@ -1580,10 +1581,10 @@ fa: no_iframe_support: مرورگر شما فریم‌های HTML را، که برای این ویژگی لازم است، پشتیبانی نمی‌کند. export: - title: برون‌بُرد - area_to_export: محدوده برای برون‌برد + title: برون‌ریزی + area_to_export: محدوده برای برون‌ریزی manually_select: به‌صورت دستی منطقه دیگری را انتخاب کنید - format_to_export: قالب برون‌برد + format_to_export: قالب برون‌ریزی osm_xml_data: OpenStreetMap XML Data map_image: تصویر نقشه (لایهٔ استاندارد را نشان می‌دهد) embeddable_html: HTML توکار @@ -1591,9 +1592,9 @@ fa: export_details: داده‌های OpenStreetMap تحت پروانهٔ داده‌های همگانی باز، پایگاه‌دادهٔ باز (ODbL) قرار دارد. too_large: - advice: 'اگر برون‌بَری بالا ناموفق بود، لطفاً یکی از منابع زیر را استفاده + advice: 'اگر برون‌ریزی بالا ناموفق بود، لطفاً یکی از منابع زیر را استفاده کنید:' - body: این محدوده برای برون‌بَری در قالب OpenStreetMap XML خیلی بزرگ است. لطفاً + body: این محدوده برای برون‌ریزی در قالب OpenStreetMap XML خیلی بزرگ است. لطفاً بزرگنمایی کنید یا منطقهٔ کوچکتری را انتخاب کنید، یا برای دریافت داده‌های انبوه یکی از منابع فهرست زیر را استفاده کنید. planet: @@ -1624,7 +1625,7 @@ fa: longitude: 'طول:' output: خروجی paste_html: برای استفادهٔ توکار در وب‌سایت، HTML را کپی و درج کنید - export_button: برون‌بُرد + export_button: برون‌ریزی fixthemap: title: گزارش مشکل / اصلاح نقشه how_to_help: @@ -1816,7 +1817,7 @@ fa: paragraph_1_html: قوانین رسمی OpenStreetMap تنها چند مورد است، اما از همهٔ مشارکت‌کنندگان انتظار داریم با جامعه همکاری کنند و ارتباط داشته باشند. اگر می‌خواهید هرگونه فعالیتی به غیر از ویرایش دستی انجام دهید، لطفاً رهنمودهای - مربوط به درون‌بُرد + مربوط به درون‌ریزی (Import) و ویرایش‌های خودکار را بخوانید و از آن‌ها پیروی کنید. questions: @@ -2559,7 +2560,7 @@ fa: center_marker: مرکز نقشه در نشانگر paste_html: برای درج در وب سایت HTML را جایگذاری کنید view_larger_map: نمایش نقشه بزرگتر - only_standard_layer: فقط از لایهٔ استاندارد می‌توان خروجی تصویری گرفت + only_standard_layer: فقط لایهٔ استاندارد را می‌توان در قالب عکس برون‌ریزی کرد. embed: report_problem: گزارش مشکل key: diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 606727a99..34326536e 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -298,8 +298,8 @@ fi: note: merkintä redacted: redaction: Redaktio %{id} - message_html: Tämän %{type}-tyypin versiota ei voi näyttää koska se on laitostettu. - Katso lisätietoja %{redaction_link}. + message_html: Tämän %{type}-tyypin versiota %{version} ei voi näyttää koska + se on relaatoitu. Katso lisätietoja %{redaction_link}. type: node: piste way: polku @@ -2742,12 +2742,12 @@ fi: redactions: edit: description: Kuvaus - heading: Muokkaa laitosta - title: Muokkaa laitosta + heading: Muokkaa relaatiota + title: Muokkaa relaatiota index: - empty: Ei ole näytettävää laitosta - heading: Laitosten luettelo - title: Laitosten luettelo + empty: Ei ole näytettävää relaatiota + heading: Relaatioiden luettelo + title: Relaatioiden luettelo new: description: Kuvaus heading: Kirjoita tietoja uudesta laitoksesta @@ -2757,7 +2757,7 @@ fi: heading: Näytetään redaktio ”%{title}” title: Näytetään redaktio user: 'Luoja:' - edit: Muokkaa tätä laitosta + edit: Muokkaa tätä relaatiota destroy: Poista tämä redaktio confirm: Oletko varma? create: @@ -2768,7 +2768,7 @@ fi: not_empty: Redaktio ei ole tyhjä. Poista redaktiotiedot kaikista tähän redaktioon liittyvistä versioista ennen sen tuhoamista. flash: Redaktio tuhottu. - error: Laitosta tuhottaessa tapahtui virhe. + error: Relaatiota tuhottaessa tapahtui virhe. validations: leading_whitespace: tyhjää tilaa alussa trailing_whitespace: tyhjää tilaa lopussa diff --git a/config/locales/fit.yml b/config/locales/fit.yml index d3bdbe4e4..d0ab149bd 100644 --- a/config/locales/fit.yml +++ b/config/locales/fit.yml @@ -59,7 +59,14 @@ fit: old_way_tag: Vanha viivan tagi relation: Relaatio relation_member: Relaation jäsen + relation_tag: Relaation tagi + session: Istunto + trace: Jälki + tracepoint: Jälkipiste + tracetag: Jäljen tagi user: Käyttäjä + user_preference: Käyttäjän asetus + user_token: Käyttäjän poletti way: Viiva way_node: Viivan piste way_tag: Viivan tagi @@ -86,6 +93,7 @@ fit: description: Kuvvaus message: sender: Lähättäjä + title: Aihe body: Viesti recipient: Vastaanottaja user: @@ -161,9 +169,16 @@ fit: reopened_at_by_html: '%{user} aktivoinut uuesti %{when}' rss: title: OpenStreetMapin karttailmoitukset + description_area: Lista raportoiduista, kommentoiduista tai suljetuista huomautuksista + omalla alueellasi [( %{min_lat}|%{min_lon})--( %{max_lat}|%{max_lon})] + description_item: Karttailmotuksen %{id} RSS-syöte + opened: uusi huomautus (lähellä kohdetta %{place}) commented: uusi kommentti (lähelä kohetta %{place}) + closed: suljettu karttailmoitus (lähellä paikkaa %{place}) + reopened: uudelleenavattu karttailmoitus (lähellä paikka %{place}) entry: comment: Kommentti + full: Koko karttailmoitus browse: created: Luotu closed: Ratkaistu @@ -229,6 +244,7 @@ fit: entry: Relaatio %{relation_name} entry_role: Relaatio %{relation_name} (rooli %{relation_role}) not_found: + sorry: 'Pahoittelemme, %{type} #%{id} ei ole olemassa.' type: node: Pistettä way: Polkua @@ -236,6 +252,7 @@ fit: changeset: muutoskokoelma note: merkintä timeout: + sorry: Tietojen hakeminen (kohde %{type}:%{id}) kesti liian kauan. type: node: piste way: polku @@ -244,6 +261,8 @@ fit: note: merkintä redacted: redaction: Redaktio %{id} + message_html: Tämän %{type}-tyypin versuunia %{version} ei voi näyttää koska + se on relaatoitu. Katso lisätietoja %{redaction_link}. type: node: piste way: polku @@ -275,6 +294,9 @@ fit: commented_by_anonymous: Kommentti tuntemattomalta käyttäjältä %{when} closed_by: Ratkaissut käyttäjä %{user} %{when} closed_by_anonymous: Ratkaissut tuntematon käyttäjä %{when} + reopened_by: Avvannut uudelleen käyttäjä %{user} %{when} + reopened_by_anonymous: Avvannut uudelleen tuntematon käyttäjä %{when} + hidden_by: Piilottanut käyttäjä %{user} %{when} report: Ilmianna karttailmotus query: title: Ominaisuuskysely @@ -320,6 +342,9 @@ fit: index: title_all: Keskustelu OpenStreetMapin muutoskokoelmasta title_particular: 'OpenStreetMap muutoskokoelma #%{changeset_id} keskustelu' + timeout: + sorry: Valitettavasti pyytämäsi muutoskokoelmien kommenttien hakeminen kesti + liian kauan. diary_entries: new: title: Uusi päiväkirjamerkintä @@ -354,6 +379,9 @@ fit: login: Lokkaa sisäle no_such_entry: title: Päiväkirjamerkintää ei ole + heading: Tunnuksella %{id} ei ole päiväkirjamerkintää. + body: Tunnuksella %{id} ei ole päiväkirjamerkintää. Joko saamasi linkki oli + virheellinen tai kirjoitit sen väärin. diary_entry: posted_by: Käyttäjä %{link_user} kirjotti tämän %{created} kielellä %{language_link} comment_link: Kommentoi tätä kirjoitusta @@ -408,6 +436,13 @@ fit: geonames_reverse: Hakuresyltaatit GeoNamesista search_osm_nominatim: prefix: + aerialway: + cable_car: Köysirata + chair_lift: Tuolihissi + drag_lift: Vetohissi + gondola: Gondolihissi + platter: Hiihtohissi + pylon: Pylväs amenity: cafe: Kahvila hospital: Siukhuusi @@ -420,6 +455,7 @@ fit: sauna: Sauna school: Skoulu toilets: Tualetit + university: Yniversiteetti leisure: sauna: Sauna office: @@ -430,33 +466,89 @@ fit: tourism: museum: Myseymmi zoo: Elläintarha + description: + title: + osm_nominatim: Sijainti OpenStreetMap + Nominatimista + geonames: Sijainti palvelusta GeoNames + types: + cities: Kaupunkit + towns: Kylät + places: Paikat + results: + no_results: Ei hakuresyltaatteja + more_results: Lissää resyltaatteja issues: index: + title: Tapaukset + select_status: Valitte tila + select_type: Valitte tyyppi + select_last_updated_by: Valitte viimiisin päivittäjä + reported_user: Ilmiannettu + not_updated: Ei päivitetty search: Hakea + search_guidance: 'Eti tapauksia:' + user_not_found: Käyttäjää ei löydy + issues_not_found: Tapahtumia ei löytynyt + status: Tila + reports: Ilmiannot + last_updated: Päivitetty last_updated_time_html: %{time} + last_updated_time_user_html: käyttäjä %{user} %{time} + link_to_reports: Näytä ilmiannot + reports_count: + one: 1 ilmoitus + other: '%{count} ilmiantoa' states: - open: Avaa + open: Avvaa resolved: Ratkaistu + update: + new_report: Ilmianto on vastaanotettu + successful_update: Ilmianto on päivitetty + provide_details: Täyennä tarvittavat tiot show: + title: '%{status} Tapaus #%{issue_id}' + reports: + zero: Ei ilmiantoa + one: Yksi ilmianto + other: '%{count} ilmiantoa' report_created_at: Ilmotettu ensimmäisen kerran %{datetime} last_resolved_at: Ratkastu %{datetime} last_updated_at: Viimeisin käsittelijä %{displayname} %{datetime} resolve: Ratkase ignore: Merkitte aiheettomaksi - reopen: Avaa uuelleen + reopen: Avvaa uuelleen reports_of_this_issue: Ilmianna tapahtuma read_reports: Lue ilmiantoja new_reports: Uuet ilmiannot other_issues_against_this_user: Muut tähän käyttäjään kohistetut ilmiannot no_other_issues: Ei muita tähän käyttäjään kohistuvia ilmiantoja. comments_on_this_issue: Tapauksen kommentit + resolve: + resolved: Tapaus on markeerattu ratkaistuksi + ignore: + ignored: Tapaus on markeerattu aiheettomaksi + reopen: + reopened: Tapaus on markeerattu käsittelyssä olevaksi comments: created_at: '%{datetime}' + reassign_param: Haluatko määrittää tapauksen tilan uuelleen? reports: updated_at: '%{datetime}' reported_by_html: Käyttäjä %{user} ilmiantanut merkinnällä %{category} + helper: + reportable_title: + diary_comment: '%{entry_title}, kommenttitunnus %{comment_id}' + note: Karttailmoitustunnus %{note_id} + issue_comments: + create: + comment_created: Kommentti jätetty reports: new: + title_html: Ilmianna %{link} + missing_params: Ilmotuksen luominen epäonnistui + details: Kuvaile ongelmaa (pakollinen) + select: 'Valitte ilmiannon syy:' categories: diary_entry: other_label: Muu @@ -544,13 +636,29 @@ fit: changeset_comment_notification: hi: Hei %{to_user}, greeting: Hei, + commented: + partial_changeset_with_comment: kommentin kanssa '%{changeset_comment}' + partial_changeset_without_comment: ei kommenttia + details: 'Lisätioja muutoskokoelmasta: %{url}' + unsubscribe: Peruaksesi tilauksen päivityksistä tähän muutoskokoelmaan, vieraile + sivula %{url} ja klikkaa "Unsubscribe". messages: inbox: + title: Saapuneet my_inbox: Saapuneet outbox: Lähetetyt + messages: Kansiossa on %{new_messages} ja %{old_messages}. + new_messages: + one: '%{count} lukematon viesti' + other: '%{count} lukematonta viestiä' + old_messages: + one: '%{count} luettu viesti' + other: '%{count} luettua viestiä' from: Lähättäjä subject: Otsikko date: Taatumi + no_messages_yet: Ei viestejä. %{people_mapping_nearby_link} + people_mapping_nearby: Lähiseudun kartoittajat message_summary: unread_button: Markeeraa lukemattomaksi read_button: Markeeraa luetuksi @@ -564,14 +672,39 @@ fit: back_to_inbox: Takashiin saapuneisiin create: message_sent: Viesti on lähätetty. + limit_exceeded: Olet lähettänyt runsaasti viestejä lyhyessä ajassa. Odota hetki + ennen kuin yrität lähettää lisää. + no_such_message: + title: Ei sellaista viestiä + heading: Ei sellaista viestiä outbox: + title: Lähätetyt my_inbox: Minun %{inbox_link} + inbox: Saapuneet + outbox: Lähätetyt + messages: + one: Kansiossa on %{count} lähätetty viesti. + other: Kansiossa on %{count} lähätettyä viestiä. + to: Vastaanottaja + subject: Otsikko date: Taatumi + no_sent_messages: Et ole lähettänyt vielä viestejä. Miksi et ottaisi yhteyttä + joihinkin %{people_mapping_nearby_link}? + people_mapping_nearby: lähellä kartoittaviin käyttäjiin + reply: + wrong_user: Olet lokannu sisäle konttulla `%{user}' mutta viestiä, johon tahot + vastata, ei ole lähätetty kyseiselle käyttäjälle. Ole hyvä ja lokkaa sisäle + oikealla käyttäjäkonttulla vastataksesi. show: + title: Lue viesti + from: 'Lähettäjä:' + subject: Otsikko date: Taatumi + reply_button: Vastaa unread_button: Markeeraa lukemattomaksi destroy_button: Ota poies back: Takashiin + to: 'Vastaanottaja:' sent_message_summary: destroy_button: Ota poies mark: @@ -582,15 +715,82 @@ fit: site: about: next: Seuraava + copyright_html: ©OpenStreetMapin
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 OpenStreetMap-blogia, käyttäjien päiväkirjoja, + yhteisöblogeja ja + OSM-säätiön verkkosivua. open_data_title: Avoin taatta + open_data_html: 'OpenStreetMap on avointa taattaa: 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 Tekijänoikeus ja lisensi + -sivula.' + legal_title: Lakitekninen jako + legal_html: "Tämä ja monet muut OSM-sivustot ovat muodollisesti OpenStreetMap-säätiön + (OSMF) hallinnoimia OSM-yhteisön puolesta. Kaikkien näiden sivustojen käyttöön + sovelletaan \nsallitun + käytön käytäntöjä, käyttöehtoja + ja tietosuojakäytäntöä + (molemmat sisällöt saatavilla vain englanniksi).\n
\nOta + yhteys OSMF:ään lisensointi-, tekijänoikeus- ja muissa lakiteknisissä + kysymyksissä.\n
\nNimi OpenStreetMap, suurennuslasilogo ja slogan State + of the Map ovat säätiön + rekisteröimiä tavaramerkkejä." + partners_title: Kumppanit copyright: foreign: title: Tietoja tästä käänöksestä + text: Jos tämän käänätyn sivun ja %{english_original_link} välillä on eroja, + englantinkielinen sivu on aina etusijalla. + english_link: englantinkielisen alkuperäisversuunin native: title: Tästä sivusta + text: Tällä sivula on alkuperänen englanninkielinen versuuni tekijäoikeuksista. + Saatavilla on myös %{native_link}. Voit myös lopettaa tekijänoikeuksien + lukemisen ja %{mapping_link}. native_link: meänkielinen versuuni + mapping_link: aloittaa kartoituksen legal_babble: title_html: Tekijänoikeus ja lisensi + intro_1_html: |- + OpenStreetMap® on avointa taattaa, jonka OpenStreetMap Foundation (OSMF) on lisensoinut Open Data Commons Open Database -lisensillä (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ä.\nLakitekstissä + mainitaan levittäjän oikeudet ja velvollisuudet." + intro_3_html: |- + Kartta-aineisto ja dokumentaatio on lisensoitu Creative + Commons Nimeä-Jaa samoin 2.0 -lisensillä (CC-BY-SA). + credit_title_html: OpenStreetMapin mainitseminen + credit_1_html: OpenStreetMapin sisältöä levitettäessä on mainittava teksti + "© OpenStreetMapin tekijät" tai sen englantinkielinen vastine + "© OpenStreetMap contributors". + credit_2_html: "Levittäjän tulee tehdä selväksi, että aineisto on saatavilla + Open Database -lisenssillä\nja kartta-aineisto CC-BY-SA-lisenssillä. Tämä + voidaan tehdä sijoittamalla sivulle linkki\ntälle + tekijänoikeussivulle. \nJos linkkien käyttö ei ole mahdollista (esimerkiksi + paperille tulostettu aineisto),\nsuosittelemme ohjaamaan lukijat osoitteisiin + www.openstreetmap.org, opendatacommons.org ja tarvittaessa myös creativecommons.org." + credit_3_html: 'Sivustolle upotetun interaktiivisen karttaikkunan tulee sisältää + tekijän nimi kartan alaosassa:' + attribution_example: + alt: Esimerkki siitä, miten nimetä OpenStreetMap nettisivulla + title: Nimeämisesimerkki + more_title_html: Lisätietoja contributors_title_html: Meän tekijät index: permalink: Ikunen länkki @@ -603,12 +803,26 @@ fit: format_to_export: Eksporteerausmuoto osm_xml_data: OpenStreetMap XML-taatta licence: Lisensi + too_large: + other: + title: Muut läheet + description: Muut läheet ovat esillä OpenStreetMap-wikissä options: Inställninkit format: 'Fiilimuoto:' + scale: Mittakaava + max: eninthään + image_size: Kuvan koko + zoom: Suurennostaso + add_marker: Lissää vietävään kartaan kohemerkki + latitude: 'Lev:' + longitude: 'Pit:' output: Tulos + paste_html: Kopioi ja liitä tämä HTML-kooti verkkosivulesi export_button: Eksporteeraa fixthemap: + title: Ilmota ongelmasta / Korjaa karttaa how_to_help: + title: Kuinka voin auttaa join_the_community: title: Liity föreeninkhiin help: @@ -630,6 +844,11 @@ fit: search: search: Haku submit_text: Hae + key: + table: + entry: + school: + 1: yniversiteetti richtext_area: edit: Mookkaa preview: Etukattelu @@ -666,6 +885,16 @@ fit: trace: edit: mookkaa edit_map: Mookkaa karttaa + public: JULKINEN + identifiable: TUNNISTETTAVA + private: YKSITYINEN + trackable: SEURATTAVA + by: käyttäjältä + in: avainsanoilla + map: sijainti kartalla + index: + public_traces: Julkiset GPS-jäljet + my_traces: Minun GPS-jäljet oauth_clients: edit: title: Mookkaa sovellustasi @@ -684,7 +913,11 @@ fit: lost password link: Unhouttanu sinun salasanan? login_button: Lokkaa sisäle register now: Luo konttu nyt + openid_logo_alt: Lokkaa sisäle OpenID-konttulla auth_providers: + openid: + title: Lokkaa sisäle OpenID:llä + alt: Lokkaa sisäle OpenID-atressilla google: title: Lokkaa sisäle Googlella facebook: @@ -696,7 +929,10 @@ fit: heading: Lokkaa ulos OpenStreetMapista logout_button: Lokkaa ulos lost_password: + title: Unohtunut salasana + heading: Unohditko salasanasi? email address: 'E-postiatressi:' + new password button: Lähätä salasanan palautusohjeet reset_password: password: 'Salasana:' confirm password: 'Vahvista salasana:' @@ -799,11 +1035,69 @@ fit: changesets: show: comment: Kommentoi + directions: + instructions: + unnamed: nimetön tie + courtesy: Reittiohjeet tarjoaa %{link} + exit_counts: + first: ensimmäisestä + second: toisesta + third: "3." + fourth: "4." + fifth: "5." + sixth: "6." + seventh: "7." + eighth: "8." + ninth: "9." + tenth: "10." + time: Matka-aika + query: + node: Piste + way: Viiva + relation: Relaatio + nothing_found: Karttakohteita ei löytynyt + error: 'Yhteysvirhe palvelimeen %{server}: %{error}' + timeout: Yhteyden aikakatkaisu palvelimeen %{server} context: + directions_from: Reittiohjeet täältä + directions_to: Reittiohjeet tänne + add_note: Ilmota karttavirheestä show_address: Näytä atressi + query_features: Lähistöllä + centre_map: Keskitä kartta redactions: edit: + description: Kuvvaus heading: Mookkaa laitosta + title: Mookkaa laitosta + index: + empty: Ei ole näytettävää laitosta + heading: Laitosten luettelo + title: Laitosten luettelo + new: + description: Kuvvaus + heading: Kirjota tietoja uudesta laitoksesta + title: Luodaan uusi redaktio show: + description: 'Kuvvaus:' + heading: Näytetään redaktio ”%{title}” + title: Näytetään redaktio + user: 'Luoja:' edit: Mookkaa tätä laitosta + destroy: Ota poies tämä redaktio + confirm: Oletko varma? + create: + flash: Redaktio luotu. + update: + flash: Muutokset on säästetty. + destroy: + not_empty: Redaktio ei ole tyhjä. Ota poies redaktiotiot kaikista tähän redaktioon + liittyvistä versuuneista ennen sen tuhoamista. + flash: Redaktio tuhottu. + error: Redaktiota tuhottaessa tapahtui virhe. + validations: + leading_whitespace: tyhjää tilaa alussa + trailing_whitespace: tyhjää tilaa lopussa + invalid_characters: sisälthää virheellisiä merkkejä + url_characters: sisälthää erikoismerkkejä URL:ssa (%{characters}) ... diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 9e17d884c..63e2d34d5 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -285,7 +285,7 @@ fr: title_comment: Groupe de modifications %{id} — %{comment} join_discussion: Se connecter pour rejoindre la discussion discussion: Discussion - still_open: Ensemble de modifications toujours ouvert — la discussion s’ouvrira + still_open: Ensemble de modifications toujours ouvert – la discussion s’ouvrira une fois que l’ensemble de modifications sera fermé. node: title: 'Nœud : %{name}' @@ -348,6 +348,7 @@ fr: tag: La description de l’attribut %{key}=%{value} sur le wiki wikidata_link: L’élément %{page} sur Wikidata wikipedia_link: L’article « %{page} » sur Wikipédia + wikimedia_commons_link: L’élément %{page} sur Wikimedia Commons telephone_link: Appeler %{phone_number} colour_preview: Aperçu de la couleur %{colour_value} note: @@ -359,13 +360,13 @@ fr: hidden_title: Note masquée nº %{note_name} open_by: Créée par %{user}, %{when} open_by_anonymous: Créée par un utilisateur anonyme, %{when} - commented_by: Commenté par %{user} %{when} - commented_by_anonymous: Commenté par un utilisateur anonyme %{when} - closed_by: Résolu par %{user} %{when} - closed_by_anonymous: Résolu par un utilisateur anonyme le %{when} + commented_by: Commenté par %{user} %{when} + commented_by_anonymous: Commenté par un utilisateur anonyme %{when} + closed_by: Résolu par %{user} %{when} + closed_by_anonymous: Résolu par un utilisateur anonyme le %{when} reopened_by: Réactivée par %{user}, %{when} - reopened_by_anonymous: Réactivé par un utilisateur anonyme %{when} - hidden_by: Masqué par %{user} %{when} + reopened_by_anonymous: Réactivé par un utilisateur anonyme %{when} + hidden_by: Masqué par %{user} %{when} report: Signaler cette note query: title: Requête sur les objets @@ -375,8 +376,8 @@ fr: changesets: changeset_paging_nav: showing_page: Page %{page} - next: Suivant » - previous: « Précédent + next: Suivant ›› + previous: ‹‹ Précédent changeset: anonymous: Anonyme no_edits: (aucune modification) @@ -404,16 +405,15 @@ fr: met trop de temps pour être chargée. changeset_comments: comment: - comment: Nouveau commentaire sur le groupe de modifications nº %{changeset_id} + comment: Nouveau commentaire sur le groupe de modifications nº %{changeset_id} par %{author} commented_at_by_html: Mis à jour le %{when} par %{user} comments: - comment: Nouveau commentaire sur le groupe de modifications n° %{changeset_id} + comment: Nouveau commentaire sur le groupe de modifications nº %{changeset_id} par %{author} index: title_all: Discussion sur le groupe de modifications OpenStreetMap - title_particular: Discussion sur le groupe de modifications OpenStreetMap nº - %{changeset_id} + title_particular: Discussion sur le groupe de modifications OpenStreetMap nº %{changeset_id} timeout: sorry: Désolé, la liste des commentaires d’ensembles de modifications que vous avez demandée est trop longue à récupérer. @@ -421,12 +421,12 @@ fr: new: title: Nouvelle entrée du journal form: - subject: 'Sujet :' - body: 'Corps :' - language: 'Langue :' - location: 'Lieu :' - latitude: 'Latitude :' - longitude: 'Longitude :' + subject: 'Sujet :' + body: 'Corps :' + language: 'Langue :' + location: 'Lieu :' + latitude: 'Latitude :' + longitude: 'Longitude :' use_map_link: utiliser la carte index: title: Journaux des utilisateurs @@ -450,8 +450,8 @@ fr: login_to_leave_a_comment: '%{login_link} pour laisser un commentaire' login: Se connecter no_such_entry: - title: Pas d’entrée du journal correspondante - heading: 'Aucune entrée avec l’id : %{id}' + title: Aucune entrée du journal correspondante + heading: 'Aucune entrée avec l’id : %{id}' body: Désolé, il n’y a aucune entrée ou commentaire dans le journal avec l’id %{id}. Veuillez vérifier votre orthographe ou la validité du lien que vous avez cliqué. @@ -461,7 +461,7 @@ fr: reply_link: Répondre à cette entrée comment_count: zero: Aucun commentaire - one: '%{count} commentaire' + one: Un commentaire other: '%{count} commentaires' edit_link: Modifier cette entrée hide_link: Masquer cette entrée @@ -475,7 +475,7 @@ fr: confirm: Confirmer report: Signaler ce commentaire location: - location: 'Lieu :' + location: 'Lieu :' view: Afficher edit: Modifier feed: @@ -491,7 +491,7 @@ fr: description: Entrées récentes des journaux d’utilisateurs de OpenStreetMap comments: has_commented_on: '%{display_name} a commenté les entrées de journal suivantes' - post: Article + post: Billet when: Quand comment: Commentaire newer_comments: Commentaires plus récents @@ -504,8 +504,8 @@ fr: osm_nominatim: Résultats de OpenStreetMap Nominatim geonames: Résultats depuis GeoNames - osm_nominatim_reverse: Résultats de OpenStreetMap - Nominatim + osm_nominatim_reverse: Résultats de Nominatim + sur OpenStreetMap geonames_reverse: Résultats de GeoNames search_osm_nominatim: prefix: @@ -667,7 +667,7 @@ fr: emergency_access_point: Point d’accès d’urgence footway: Chemin piéton ford: Gué - give_way: Panneau cédez le passage + give_way: Panneau « Cédez le passage » living_street: Rue en zone de rencontre milestone: Borne kilométrique motorway: Autoroute @@ -690,7 +690,7 @@ fr: services: Services autoroutiers speed_camera: Radar de vitesse steps: Escalier - stop: Signe d'arrêt + stop: Panneau « Stop / Arrêt » street_lamp: Lampadaire tertiary: Route tertiaire tertiary_link: Route tertiaire @@ -710,7 +710,7 @@ fr: bunker: Bunker castle: Château church: Église - city_gate: Porte de ville / porte de fortifications + city_gate: Porte de ville / porte fortifiée citywalls: Remparts / murailles fort: Fort heritage: Site / objet du patrimoine @@ -737,7 +737,7 @@ fr: basin: Bassin brownfield: Friche industrielle cemetery: Cimetière - commercial: Zone tertiaire / Zone d'activités + commercial: Zone tertiaire / Zone d’activités conservation: Zone préservée construction: Zone en construction farm: Ferme @@ -899,12 +899,12 @@ fr: country: Pays county: Comté farm: Ferme - hamlet: Hameau ou lieu-dit habité + hamlet: Hameau habité house: Maison houses: Maisons island: Île islet: Îlot - isolated_dwelling: Lieu-dit habité + isolated_dwelling: Lieu-dit habité isolé locality: Lieu-dit inhabité municipality: Municipalité neighbourhood: Quartier @@ -996,7 +996,7 @@ fr: kiosk: Kiosque kitchen: Magasin de cuisine laundry: Blanchisserie - lottery: Loto + lottery: Loterie mall: Centre commercial market: Marché massage: Massage @@ -1025,7 +1025,7 @@ fr: travel_agency: Agence de voyage tyres: Magasin de pneus vacant: Commerce vacant - variety_store: Magasin à prix unique ou à bas prix + variety_store: Magasin à prix unique ou réduit video: Magasin de vidéos wine: Caviste "yes": Boutique @@ -1083,8 +1083,8 @@ fr: level10: Limite de quartier description: title: - osm_nominatim: Localisation depuis OpenStreetMap - Nominatim + osm_nominatim: Localisation depuis Nominatim + sur OpenStreetMap geonames: Localisation depuis GeoNames types: cities: Villes @@ -1102,17 +1102,18 @@ fr: reported_user: Utilisateur signalé not_updated: Non mis à jour search: Rechercher - search_guidance: 'Problèmes de recherche :' + search_guidance: 'Problèmes de recherche :' user_not_found: L’utilisateur n’existe pas - issues_not_found: Pas trouvé de tel problème + issues_not_found: Aucun problème trouvé de ce type status: État reports: Rapports last_updated: Dernière mise à jour - last_updated_time_html: %{time} - last_updated_time_user_html: à %{time} par %{user} + last_updated_time_html: %{time} + last_updated_time_user_html: à %{time} par %{user} link_to_reports: Afficher les rapports reports_count: - one: 1 rapport + zero: Aucun rapport + one: Un rapport other: '%{count} rapports' reported_item: Élément signalé states: @@ -1124,7 +1125,7 @@ fr: successful_update: Votre rapport a bien été mis à jour provide_details: Veuillez fournir les détails demandés show: - title: '%{status} Problème #%{issue_id}' + title: Problème %{status} nº %{issue_id} reports: zero: Aucun rapport one: 1 rapport @@ -1134,7 +1135,7 @@ fr: last_updated_at: Dernière mise à jour à %{datetime} par %{displayname} resolve: Résoudre ignore: Ignorer - reopen: Réouvrir + reopen: Rouvrir reports_of_this_issue: Rapports de ce problème read_reports: Lire les rapports new_reports: Nouveaux rapports @@ -1142,11 +1143,11 @@ fr: no_other_issues: Aucun autre problème avec cet utilisateur. comments_on_this_issue: Commentaires sur ce problème resolve: - resolved: L’état du problème a été mis à 'Résolu' + resolved: L’état du problème a été mis à « Résolu » ignore: - ignored: L’état du problème a été mis à 'Ignoré' + ignored: L’état du problème a été mis à « Ignoré » reopen: - reopened: L’état du problème a été mis à 'Ouvert' + reopened: L’état du problème a été mis à « Ouvert » comments: created_at: Le %{datetime} reassign_param: Réaffecter le problème ? @@ -1155,8 +1156,8 @@ fr: reported_by_html: Signalé comme %{category} par %{user} helper: reportable_title: - diary_comment: '%{entry_title}, commentaire #%{comment_id}' - note: 'Note #%{note_id}' + diary_comment: '%{entry_title}, commentaire nº %{comment_id}' + note: Note nº %{note_id} issue_comments: create: comment_created: Votre commentaire a bien été créé @@ -1165,15 +1166,15 @@ fr: title_html: Rapport %{link} missing_params: Impossible de créer un nouveau rapport details: Veuillez fournir plus de détails sur le problème (obligatoire). - select: 'Sélectionner un motif pour votre rapport :' + select: 'Sélectionnez un motif pour votre rapport :' disclaimer: intro: 'Avant d’envoyer votre rapport aux modérateurs du site, veuillez vous - assurer que :' - not_just_mistake: Vous êtes certain que le problème n’est pas juste une erreur - unable_to_fix: Vous êtes incapable de régler le problème par vous-même ou - avec l’aide des membres de votre communauté - resolve_with_user: Vous avez déjà essayé de résoudre le problème avec l’utilisateur - concerné + assurer que :' + not_just_mistake: vous êtes certain que le problème n’est pas juste une erreur ; + unable_to_fix: vous êtes incapable de régler le problème par vous-même ou + avec l’aide des membres de votre proche communauté ; + resolve_with_user: vous avez déjà essayé de résoudre le problème avec l’utilisateur + concerné. categories: diary_entry: spam_label: Cette entrée de l’agenda est/contient du pourriel @@ -1227,8 +1228,8 @@ fr: intro_2_create_account: Créez un compte d’utilisateur hosting_partners_html: L’hébergement est pris en charge par %{ucl}, %{bytemark}, et d’autres %{partners}. - partners_ucl: L’University College de Londres - partners_bytemark: l'hébergeur Bytemark + partners_ucl: l’University College de Londres + partners_bytemark: l'Hébergeur Bytemark partners_partners: partenaires tou: Conditions d’utilisation osm_offline: La base de données OpenStreetMap est actuellement hors ligne ; une @@ -1373,17 +1374,19 @@ fr: outbox: boîte d’envoi messages: Vous avez %{new_messages} et %{old_messages} new_messages: - one: '%{count} nouveau message' + zero: zéro nouveau message + one: un nouveau message other: '%{count} nouveaux messages' old_messages: - one: '%{count} ancien message' + zero: aucun ancien message + one: un ancien message other: '%{count} anciens messages' from: De subject: Objet date: Date no_messages_yet: Vous n’avez actuellement aucun message. Pourquoi ne pas entrer - en contact avec quelques %{people_mapping_nearby_link} ? - people_mapping_nearby: personnes proche de vous + en contact avec quelques %{people_mapping_nearby_link} ? + people_mapping_nearby: personnes qui cartographient aux alentours message_summary: unread_button: Marquer comme non lu read_button: Marquer comme lu @@ -1409,16 +1412,16 @@ fr: inbox: boîte de réception outbox: boîte d’envoi messages: - one: Vous avez %{count} message envoyé + one: Vous n’avez aucun message envoyé other: Vous avez %{count} messages envoyés to: À subject: Objet date: Date no_sent_messages: Vous n’avez encore envoyé aucun message. Pourquoi ne pas entrez - en contact avec quelques %{people_mapping_nearby_link} ? + en contact avec quelques %{people_mapping_nearby_link} ? people_mapping_nearby: personnes proche de vous reply: - wrong_user: Vous êtes identifié(e) comme « %{user} » mais le message auquel + wrong_user: Vous êtes identifié(e) comme « %{user} » mais le message auquel vous souhaitez répondre n’a pas été envoyé à cet utilisateur. Veuillez vous connecter avec l’identifiant correct pour pouvoir répondre. show: @@ -1431,20 +1434,20 @@ fr: destroy_button: Supprimer back: Retour to: À - wrong_user: Vous êtes identifié comme « %{user} » mais le message que vous essayez + wrong_user: Vous êtes identifié comme « %{user} » mais le message que vous essayez de lire n’a pas été envoyé par cet utilisateur, ni ne lui a été destiné. Veuillez vous connecter avec l’identifiant correct pour pouvoir le lire. sent_message_summary: destroy_button: Supprimer mark: as_read: Message marqué comme lu - as_unread: Message marqué comme non-lu + as_unread: Message marqué comme non lu destroy: destroyed: Message supprimé site: about: next: Suivant - copyright_html: ©Contributeurs
d’OpenStreetMap + copyright_html: © Contributeurs
d’OpenStreetMap used_by: '%{name} fournit des données cartographiques sur des milliers de sites web, applications mobiles et appareils' lede_text: OpenStreetMap est bâti par une communauté de cartographes bénévoles @@ -1460,30 +1463,28 @@ fr: et grossit chaque jour. Nos contributeurs incluent des cartographes enthousiastes, des professionnels du SIG, des ingénieurs qui font fonctionner les serveurs d’OSM, des humanitaires cartographiant les zones dévastées par une catastrophe - et beaucoup d’autres.\nPour en savoir plus sur la communauté, consultez \nle blogue OpenStreetMap,\nles - annuaires d’utilisateurs, \nles - blogues communautaires et \nle site web de la Fondation + et beaucoup d’autres.\nPour en savoir plus sur la communauté, consultez \nle + blogue OpenStreetMap,\nles + journaux d’utilisateurs, \nles blogues + communautaires et \nle site web de la Fondation OSM." - open_data_title: Données libres - open_data_html: 'OpenStreetMap est en données ouvertes : vous êtes libre - de l’utiliser pour n’importe quel but tant que vous créditez OpenStreetMap + open_data_title: Données ouvertes + open_data_html: 'OpenStreetMap est en données ouvertes : vous êtes libre + de l’utiliser dans n’importe quel but tant que vous créditez OpenStreetMap et ses contributeurs. Si vous modifiez ou vous appuyez sur les données d’une façon quelconque, vous pouvez distribuer le résultat seulement suivant la - même licence. Consultez la page sur les droits + même licence. Consultez la page sur les droits d’auteur et licence pour plus de détails.' - legal_title: Juridique - legal_html: "Ce site et de nombreux autres services connexes sont formellement - exploités par la \nFondation OpenStreetMap - (OSMF) \nau nom de la communauté. L’utilisation de tous les services offerts - par l’OSMF est sujette\nà nos Conditions - d’utilisation, à notre \nPolitique - des usages acceptés et à notre Politique - de confidentialité.\n
\nVeuillez contacter - l’OSMF \nsi vous avez des questions ou problèmes concernant les licences, - les droits d’auteur ou d’autres aspects juridiques.\n
\nOpenStreetMap, - le logo avec la loupe et ''State of the Map'' sont des - marques déposées de OSMF." + legal_title: Informations juridiques + legal_html: |- + Ce site et de nombreux autres services connexes sont formellement exploités par la + Fondation OpenStreetMap (OSMF) au nom de la communauté. L’utilisation de tous les services offerts par l’OSMF est sujette + à nos Conditions d’utilisation, à notre Politique des usages acceptés et à notre Politique de confidentialité. +
+ Veuillez contacter l’OSMF + si vous avez des questions ou problèmes concernant les licences, les droits d’auteur ou d’autres aspects juridiques. +
+ OpenStreetMap, le logo avec la loupe et ''State of the Map'' sont des marques déposées de l’OSMF. partners_title: Partenaires copyright: foreign: @@ -1501,58 +1502,61 @@ fr: legal_babble: title_html: Droits d’auteur et licence intro_1_html: |- - OpenStreetMap® est un ensemble de données ouvertes, disponibles sous licence libre Open Data Commons Open Database License (ODbL) auprès de la ® est un ensemble de données ouvertes, disponibles sous la licence libre Open Data Commons Open Database License (ODbL) accordée par la Fondation OpenStreetMap (OSMF). - intro_2_html: Vous êtes libre de copier, distribuer, transmettre et adapter - nos données, à condition que vous créditiez, OpenStreetMap et ses contributeurs. - Si vous modifiez ou utilisez nos données dans d’autres œuvres dérivées, - vous ne pouvez distribuer celles-ci que sous la même licence. Le texte + intro_2_html: |- + Vous êtes libre de copier, distribuer, transmettre et adapter nos données, + à condition que vous créditiez OpenStreetMap et ses + contributeurs. Si vous modifiez ou utilisez nos données dans d’autres œuvres dérivées, vous + ne pouvez distribuer celles-ci que sous la même licence. Le texte légal complet détaille vos droits et responsabilités. - intro_3_html: Nos carreaux de rendu cartographiques, ainsi que notre documentation, - sont disponibles sous la licence Creative + intro_3_html: |- + Nos carreaux de rendu cartographiques, ainsi que notre documentation, sont disponibles sous + la licence Creative Commons paternité – partage à l’identique 2.0 (CC-BY-SA). credit_title_html: Comment créditer OpenStreetMap - credit_1_html: Nous demandons que votre crédit comporte la mention « © les - contributeurs d’OpenStreetMap ». + credit_1_html: Nous demandons que votre crédit comporte la mention « © les + contributeurs d’OpenStreetMap ». credit_2_html: |- - Vous devez également préciser clairement que les données sont disponibles sous la licence ODbL et, si vous utilisez les tuiles de notre carte, que la carte est sous la licence CC-BY-SA. Vous pouvez mentionner ceci avec un lien hypertexte vers + Vous devez également préciser clairement que les données sont disponibles sous la licence + ODbL (Open Database License) et, si vous utilisez les tuiles de notre carte, que la carte est sous la + licence CC BY-SA. Vous pouvez mentionner ceci avec un lien hypertexte vers cette page de mentions légales. - Alternativement, et obligatoirement si vous distribuez OpenStreetMap sous forme de données brutes, vous pouvez directement nommer et fournir un lien vers la ou les licences. Sur les supports où les liens hypertexte sont impossibles (par exemple sur un support papier), nous vous suggérons de rediriger vos lecteurs vers le site openstreetmap.org (éventuellement en développant « OpenStreetMap » en l’adresse openstreetmap.org), vers opendatacommons.org et, si c’est pertinent, vers creativecommons.org. + Alternativement, et obligatoirement si vous distribuez OpenStreetMap sous forme de données brutes, vous pouvez directement nommer et fournir un lien vers la ou les licences. Sur les supports où les liens hypertexte sont impossibles (par exemple sur un support papier), nous vous suggérons de rediriger vos lecteurs vers le site openstreetmap.org (éventuellement en développant « OpenStreetMap » en son adresse complète openstreetmap.org), vers opendatacommons.org et, si c’est pertinent, vers creativecommons.org. credit_3_html: |- - Pour une carte électronique navigable, le crédit devrait apparaître dans le coin de la carte. + Pour une carte électronique navigable, le crédit devrait apparaître dans un coin de la carte. Par exemple : attribution_example: - alt: Exemple d’attribution d’OpenStreetMap sur une page internet + alt: Exemple d’attribution d’OpenStreetMap sur une page Internet title: Exemple d’attribution more_title_html: Pour trouver plus d’informations more_1_html: |- Pour obtenir plus d’informations sur la façon de réutiliser nos données et de nous créditer, veuillez lire la Licence OSMF et le FAQ Légal. - more_2_html: "Bien qu’OpenStreetMap soit un jeu de données libres et ouvertes, - nous ne pouvons pas fournir une API gratuite et en libre accès pour les - tierces personnes.\nVeuillez vous référer à notre politique - d’utilisation de l’API, \n à notre politique - d’utilisation des tuiles, \net à la politique - d’utilisation de Nominatim." + more_2_html: |- + Bien qu’OpenStreetMap soit un jeu de données libres et ouvertes, nous ne pouvons pas fournir une + API gratuite et en libre accès pour les tierces personnes. + Veuillez vous référer à notre politique d’utilisation de l’API, + à notre politique d’utilisation des tuiles + et à la politique d’utilisation de Nominatim. contributors_title_html: Nos contributeurs contributors_intro_html: 'Nos contributeurs sont des milliers de personnes. Nous incluons également des données publiées sous licence ouverte par des agences nationales de cartographie et par d’autres sources, notamment :' - contributors_at_html: 'Autriche : contient des données sur - la ville de Vienne (sous licence - CC BY), - la région - du Vorarlberg et la région du Tyrol (sous licence CC - BY AT avec amendements).' - contributors_au_html: "Australie : contient des données source - de \nPSMA - Australia Limited\ndont la licence appartient au Commonwealth d'Australie - sous \nCC BY 4.0." + contributors_at_html: |- + Autriche : contient des données sur la ville de Vienne (sous + licence CC BY), la + région du Vorarlberg et la + région du Tyrol (sous licence CC BY AT avec amendements). + contributors_au_html: |- + Australie : contient des données sourcées de + PSMA Australia Limited publiées sous la licence + CC BY 4.0 accordée par le Commonwealth d’Australie. contributors_ca_html: 'Canada : contient des données de GeoBase®, - GeoGratis (© Département des Ressources naturelles du Canada), - CanVec (© Département des Ressources naturelles du Canada) et StatCan + GeoGratis (© Département des Ressources naturelles du Canada), + CanVec (© Département des Ressources naturelles du Canada) et StatCan (Division Géographie, Statistiques du Canada).' contributors_fi_html: 'Finlande : contient des données de la Base de données topographique de l’Inspection nationale du territoire @@ -1561,8 +1565,8 @@ fr: contributors_fr_html: 'France : contient des données de la Direction générale des finances publiques (anciennement la Direction générale des impôts).' - contributors_nl_html: 'Pays-Bas : contient des données © - AND, 2007 (www.and.com).' + contributors_nl_html: 'Pays-Bas : contient des données © AND, 2007 (www.and.com).' contributors_nz_html: "Nouvelle-Zélande : contient des données provenant du service de données LINZ et pour la réutilisation, sous licence \nCC @@ -1579,9 +1583,10 @@ fr: contributors_za_html: |- Afrique du Sud : contient des données issues de la Direction principale des Informations Géospatiales Nationales, copyright de l’État réservé. - contributors_gb_html: 'Royaume-Uni : contient des données - issues de l’Ordnance Survey © 2010-2019 Droits d’auteurs et - de la base de données de la Couronne.' + contributors_gb_html: |- + Royaume-Uni : contient des données issues de + l’Ordnance Survey © 2010–2019 Droits d’auteurs et de la + base de données de la Couronne. contributors_footer_1_html: Pour plus de détails sur celles-ci et sur les autres sources utilisées pour aider à améliorer OpenStreetMap, consultez la page des contributeurs diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 56e793f40..562444cb1 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -4,6 +4,7 @@ # Author: Abijeet Patro # Author: Athena in Wonderland # Author: Banjo +# Author: Breogan2008 # Author: Elisardojm # Author: Gallaecio # Author: Iváns @@ -296,6 +297,7 @@ gl: tag: A páxina de descrición da etiqueta %{key}=%{value} wikidata_link: O elemento %{page} no Wikidata wikipedia_link: O artigo sobre %{page} na Wikipedia + wikimedia_commons_link: O elemento %{page} en Wikimedia Comúns telephone_link: Chamar a %{phone_number} colour_preview: Previsualización %{colour_value} da cor note: diff --git a/config/locales/he.yml b/config/locales/he.yml index 930026422..b52b8bcae 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -313,6 +313,7 @@ he: tag: עמוד התיאור עבור התג %{key}=%{value} wikidata_link: פריט %{page} בוויקינתונים wikipedia_link: הערך %{page} בוויקיפדיה + wikimedia_commons_link: הפריט %{page} בוויקישיתוף telephone_link: להתקשר למספר %{phone_number} colour_preview: תצוגה מקדימה של הצבע %{colour_value} note: diff --git a/config/locales/hr.yml b/config/locales/hr.yml index c505bc87b..8451f877d 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -11,6 +11,7 @@ # Author: Mnalis # Author: Mvrban # Author: Nemo bis +# Author: Obsuser # Author: Phidrho # Author: Roberta F. # Author: Ruila @@ -940,7 +941,7 @@ hr: greeting: Bok, your_gpx_file: Liči na vaÅ¡u GPX datoteku with_description: s opisom - and_the_tags: 'i sa slijedećim oznakama:' + and_the_tags: 'i sa sljedećim oznakama:' and_no_tags: i bez oznaka failure: subject: '[OpenStreetMap] GPX Import nije uspio' @@ -1506,7 +1507,7 @@ hr: index: title: Moji OAuth detalji my_tokens: Moje odobrene aplikacije - list_tokens: 'Slijedeći tokeni su izdani aplikacijama na vaÅ¡e ime:' + list_tokens: 'Sljedeći tokeni su izdani aplikacijama na VaÅ¡e ime:' application: Ime aplikacije issued_at: Izdano u revoke: Opozovi! @@ -1514,7 +1515,7 @@ hr: no_apps: Imate li aplikaciju koju želite registrirati za koriÅ¡tenje s %{oauth} standardom? Morate registrirati svoju web aplikaciju prije nego možete dati OAuth zahtjeve za ovu uslugu - registered_apps: 'Imate registrirane slijedeće aplikacije:' + registered_apps: 'Imate registrirane sljedeće aplikacije:' register_new: Registriraj svoju aplikaciju form: name: Ime @@ -1945,7 +1946,7 @@ hr: status: Status revoker_name: Opozvao showing_page: Stranica %{page} - next: Slijedeća » + next: Sljedeća » previous: « Prethodna notes: mine: diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 57d02de70..831abb846 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -148,11 +148,11 @@ hu: one: kevesebb, mint 1 másodperce other: kevesebb, mint %{count} másodperce less_than_x_minutes: - one: kevesebb, mint 1 perce - other: kevesebb, mint %{count} perce + one: kevesebb mint 1 perce + other: kevesebb mint %{count} perce over_x_years: - one: több, mint 1 éve - other: több, mint %{count} éve + one: több mint 1 éve + other: több mint %{count} éve x_seconds: one: 1 másodperccel ezelőtt other: '%{count} másodperccel ezelőtt' @@ -324,7 +324,7 @@ hu: report: Jegyzet jelentése query: title: Funkciók lekérdezése - introduction: Kattintson a térképen, a közeli funkciók kereséséhez. + introduction: Kattintson a térképen a közeli funkciók kereséséhez. nearby: Közeli funkciók enclosing: Bentfoglalt funkciók changesets: @@ -1282,12 +1282,12 @@ hu: commented_note: '%{commenter} hozzászólt az egyik jegyzethez, amelyhez te is, %{place} közelében.' closed: - subject_own: '[OpenStreetMap] %{commenter} megoldotta az egyik jegyztetedet' + subject_own: '[OpenStreetMap] %{commenter} megoldotta az egyik jegyzetedet' subject_other: '[OpenStreetMap] %{commenter} megoldotta az egyik jegyzetet, amelyet te is figyelsz' your_note: '[OpenStreetMap] %{commenter} megoldotta az egyik jegyzetedet %{place} közelében.' - commented_note: '%{commenter} megoldotta az egyik jegyzetet amelyhez hozzászóltál, + commented_note: '%{commenter} megoldotta az egyik jegyzetet, amelyhez hozzászóltál, %{place} közelében.' reopened: subject_own: '[OpenStreetMap] %{commenter} újra megnyitotta az egyik jegyzetedet' @@ -1304,7 +1304,7 @@ hu: subject_own: '[OpenStreetMap] %{commenter} hozzászólt az egyik változtatáscsomagodhoz' subject_other: '[OpenStreetMap] %{commenter} hozzászólt az egyik, általad érdekesnek vélt változtatáscsomaghoz' - your_changeset: '%{commenter} egy megjegyzést fűzött a %{time}-i módosításcsomagodhoz.' + your_changeset: '%{commenter} megjegyzést fűzött a %{time}-i módosításcsomagodhoz.' commented_changeset: '%{commenter} egy megjegyzést fűzött %{changeset_author} %{time}-i módosításcsomagjához, amit figyelsz.' partial_changeset_with_comment: „%{changeset_comment}” megjegyzéssel @@ -1316,7 +1316,7 @@ hu: messages: inbox: title: Beérkezett üzenetek - my_inbox: Beérkezett üzenetek + my_inbox: Beérkezett üzeneteim outbox: Elküldött üzenetek messages: '%{new_messages} és %{old_messages} van' new_messages: @@ -1430,9 +1430,9 @@ hu: english_link: az eredeti angol nyelvű native: title: Erről az oldalról - text: Jelenleg a szerzői jogi oldal angol nyelvű változatát látod. Visszaléphetsz - ezen oldal %{native_link}, vagy befejezheted a szerzői jogról szóló oldal - olvasását, és %{mapping_link}. + text: 'Jelenleg a szerzői jogi oldal angol nyelvű változatát látod. Visszaléphetsz + ezen oldalra: %{native_link}, vagy befejezheted a szerzői jogról szóló oldal + és %{mapping_link} olvasását.' native_link: magyar nyelvű változatára mapping_link: kezdheted a térképezést legal_babble: @@ -1447,14 +1447,14 @@ hu: href="https://opendatacommons.org/licenses/odbl/1.0/">jogi szabályzat ismerteti a jogaidat és kötelezettségeidet. intro_3_html: |2- - Az OpenStreetMap térképeire a térképeire és dokumentumaira a Creative Commons Nevezd meg! - Így add tovább! 2.0 licenc (CC BY-SA) vonatkozik. credit_title_html: Hogyan kell feltüntetned az OpenStreetMapot? credit_1_html: Kérjük, hogy forrásként a “© OpenStreetMap közreműködők” szöveget tüntesd fel. credit_2_html: Azt is egyértelművé kell tenned, hogy az adatok az Open Database - Licenc alatt elérhetőek, illetve ha a mi térkép csempéinket használod akkor + Licenc alatt elérhetőek, illetve ha a mi térkép csempéinket használod, akkor azt, hogy a grafikai megjelenítés a CC BY-SA licenc feltételeivel használható. Ezt megteheted egy erre a copyright oldalra való hivatkozással. Alternatívaként, ha az OSM-et adatokként @@ -1479,7 +1479,7 @@ hu: Lásd az API Felhasználási Irányelveinket, a Csempe Felhasználási Irányelveinket és a Nominatim Felhasználási Irányelveinket. contributors_title_html: Közreműködőink - contributors_intro_html: 'Többszáz egyéni közreműködőnk van. További, szabadon + contributors_intro_html: 'Több ezer egyéni közreműködőnk van. További, szabadon elérhető adatokat is felhasználunk nemzeti térkép intézetektől és más forrásokból, többek között:' contributors_at_html: |- @@ -1600,11 +1600,11 @@ hu: overpass: title: Overpass API description: A megjelenített befoglaló keret letöltése egy OpenStreetMap - tükörserverről + tükörszerverről geofabrik: title: Geofabrik letöltések description: Kontinensek, országok és kiválasztott városok rendszeresen - frissített kivonata + frissített kivonatai metro: title: Metro Extracts description: A főbb városok, valamint a környező területek kivonatai @@ -1651,7 +1651,7 @@ hu: welcome: url: /welcome 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: url: https://wiki.openstreetmap.org/wiki/Hu:Beginners%27_guide title: Kezdők kézikönyve diff --git a/config/locales/ia.yml b/config/locales/ia.yml index 4d7b0090d..9dbba8edb 100644 --- a/config/locales/ia.yml +++ b/config/locales/ia.yml @@ -71,7 +71,7 @@ ia: tracetag: Etiquetta de tracia user: Usator user_preference: Preferentias de usator - user_token: Indicio de usator + user_token: Token del usator way: Via way_node: Nodo de via way_tag: Etiquetta de via @@ -283,6 +283,7 @@ ia: tag: Le pagina wiki que describe le etiquetta %{key}=%{value} wikidata_link: Le elemento %{page} in Wikidata wikipedia_link: Le articulo %{page} in Wikipedia + wikimedia_commons_link: Le objecto %{page} sur Wikimedia Commons telephone_link: Telephonar %{phone_number} colour_preview: Previsualisation del color %{colour_value} note: @@ -1964,9 +1965,9 @@ ia: authorize_failure: title: Requesta de autorisation fallite denied: Tu ha refusate al application %{app_name} le accesso a tu conto. - invalid: Le indicio de autorisation non es valide. + invalid: Le token de autorisation non es valide. revoke: - flash: Tu ha revocate le indicio pro %{application} + flash: Tu ha revocate le token pro %{application} permissions: missing: Tu non ha permittite al application le accesso a iste facilitate oauth_clients: @@ -1978,8 +1979,8 @@ ia: title: Detalios OAuth pro %{app_name} key: 'Clave de consumitor:' secret: 'Secreto de consumitor:' - url: 'URL del indicio de requesta:' - access_url: 'URL del indicio de accesso:' + url: 'URL del token de requesta:' + access_url: 'URL del token de accesso:' authorize_url: 'URL de autorisation:' support_notice: Nos supporta le signaturas HMAC-SHA1 (recommendate) e RSA-SHA1. edit: Modificar detalios @@ -1996,8 +1997,7 @@ ia: index: title: Mi detalios OAuth my_tokens: Mi applicationes autorisate - list_tokens: 'Le sequente indicios ha essite emittite a applicationes in tu - nomine:' + list_tokens: 'Le sequente tokens ha essite emittite a applicationes in tu nomine:' application: Nomine del application issued_at: Emittite le revoke: Revocar! @@ -2105,7 +2105,7 @@ ia: confirm password: 'Confirma contrasigno:' reset: Reinitialisar contrasigno flash changed: Tu contrasigno ha essite cambiate. - flash token bad: Indicio non trovate. Verifica le URL. + flash token bad: Token non trovate. Verifica le URL. new: title: Crear conto no_auto_account_create: Infortunatemente in iste momento non es possibile crear @@ -2333,7 +2333,7 @@ ia: adresse de e-mail. button: Confirmar success: Le cambio del adresse de e-mail ha essite confirmate. - failure: Un adresse de e-mail ha ja essite confirmate con iste indicio. + failure: Un adresse de e-mail ha ja essite confirmate con iste token. unknown_token: Iste codice de confirmation ha expirate o non existe. set_home: flash success: Position de origine confirmate con successo diff --git a/config/locales/it.yml b/config/locales/it.yml index f76d2dbf2..0f66be34f 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -20,6 +20,7 @@ # Author: Frubino # Author: Gianfranco # Author: Isiond +# Author: Jlrb+ # Author: Kaitu # Author: Karika # Author: Lollo @@ -1637,7 +1638,7 @@ it: geofabrik: title: Geofabrik Downloads description: Estratti aggiornati regolarmente di continenti, paesi, e città - selezionata + selezionate metro: title: Metro Extracts description: Estratti per le principali città del mondo e le loro aree circostanti diff --git a/config/locales/ja.yml b/config/locales/ja.yml index f520cc1b2..02e7e7840 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -37,6 +37,7 @@ # Author: Wrightbus # Author: Yusuke1109 # Author: ネイ +# Author: 沈澄心 # Author: 神樂坂秀吉 # Author: 青子守歌 # Author: 아라 @@ -1784,7 +1785,9 @@ ja: newer: 以降のトレース trace: pending: 処理中 - count_points: '%{count} 個の点' + count_points: + one: 1個の点 + other: '%{count}個の点' more: 詳細 trace_details: トレースの詳細表示 view_map: 地図で表示 diff --git a/config/locales/mk.yml b/config/locales/mk.yml index cb625873f..9acddb2e9 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -286,6 +286,7 @@ mk: tag: Вики-страницата за ознаката %{key}=%{value} wikidata_link: Предметот за %{page} на Википодатоци wikipedia_link: Статијата %{page} на Википедија + wikimedia_commons_link: Ставката %{page} на Ризницата telephone_link: Јави се на %{phone_number} colour_preview: Преглед на бојата %{colour_value} note: diff --git a/config/locales/nb.yml b/config/locales/nb.yml index bb5d48691..9a710e4c2 100644 --- a/config/locales/nb.yml +++ b/config/locales/nb.yml @@ -2516,7 +2516,7 @@ nb: gps: Offentlige GPS-sporinger overlays: Aktiver overlag for Ã¥ feilsøke kartet title: Lag - copyright: © OpenStreetMap bidragsytere + copyright: © OpenStreetMaps bidragsytere donate_link_text: site: edit_tooltip: Rediger kartet diff --git a/config/locales/pl.yml b/config/locales/pl.yml index b525a170c..8358a874f 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -349,6 +349,7 @@ pl: tag: Strona wiki dla znacznika %{key}=%{value} wikidata_link: '%{page} element na Wikidata' wikipedia_link: Artykuł %{page} w Wikipedii + wikimedia_commons_link: Plik %{page} na Wikimedia Commons telephone_link: Zadzwoń pod %{phone_number} colour_preview: Podgląd koloru %{colour_value} note: diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index dbca5e248..001af78c1 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -326,6 +326,7 @@ pt-BR: tag: A página no wiki com a descrição da etiqueta %{key}=%{value} wikidata_link: O item %{page} no Wikidata wikipedia_link: O artigo %{page} na Wikipédia + wikimedia_commons_link: A %{page} de item mo Wikimedia Commons telephone_link: Ligar para %{phone_number} colour_preview: Pré-visualização da cor %{colour_value} note: diff --git a/config/locales/pt-PT.yml b/config/locales/pt-PT.yml index 5888fa03b..2bed5c27e 100644 --- a/config/locales/pt-PT.yml +++ b/config/locales/pt-PT.yml @@ -311,6 +311,7 @@ pt-PT: tag: A página wiki com a descrição da etiqueta %{key}=%{value} wikidata_link: O item %{page} como Wikidata wikipedia_link: A página %{page} na Wikipédia + wikimedia_commons_link: O item %{page} na Wikimedia Commons telephone_link: Telefonar %{phone_number} colour_preview: Antevisão da cor %{colour_value} note: diff --git a/config/locales/tr.yml b/config/locales/tr.yml index b1467095e..bfa9c9110 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -12,6 +12,7 @@ # Author: Erdemaslancan # Author: George Animal # Author: Gizemb +# Author: Grkn gll # Author: Hedda # Author: Imabadplayer # Author: Incelemeelemani @@ -314,8 +315,9 @@ tr: wiki_link: key: '%{key} parametresi için Viki açıklaması' tag: '%{key}=%{value} parametresi için Viki açıklaması' - wikidata_link: Vikidatada bulunan %{page} ögesi - wikipedia_link: '%{page} hakkında Vikipedi maddesi' + wikidata_link: Vikidata'da bulunan %{page} öğesi + wikipedia_link: Vikipedi'deki %{page} makalesi + wikimedia_commons_link: Wikimedia Commons'daki %{page} maddesi telephone_link: '%{phone_number} ara' colour_preview: Renk %{colour_value} önizleme note: diff --git a/config/locales/tt.yml b/config/locales/tt.yml index 18855c4a4..24cb0968d 100644 --- a/config/locales/tt.yml +++ b/config/locales/tt.yml @@ -119,6 +119,10 @@ tt: one: 1 ел элек other: '%{count} ел элек' editor: + potlatch: + name: Potlatch 1 + id: + name: iD remote: name: Дистанцион идарә description: Дистанционн идарә (JOSM яки Merkaartor) @@ -495,7 +499,7 @@ tt: fish: Балык кибете florist: Чәчәк кибете food: Ашамлыклар - gallery: Галерея + gallery: Җыелма market: Базар pharmacy: Даруханә tailor: Тегүче @@ -681,7 +685,7 @@ tt: preview: Алдан карау markdown_help: headings: Башлыклар - heading: Башлык + heading: Бүлек башы link: Сылтама text: Текст image: Сурәт diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 6653739d2..1281e0ae1 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -328,6 +328,7 @@ uk: tag: Сторінка вікі, що описує теґ %{key}=%{value} wikidata_link: '%{page} елемент на Вікіданих' wikipedia_link: Стаття %{page} у Вікіпедії + wikimedia_commons_link: Сторінка %{page} у Вікісховищі telephone_link: Зателефонуйте на %{phone_number} colour_preview: Перегляд кольору %{colour_value} note: @@ -1329,10 +1330,10 @@ uk: змін' subject_other: '[OpenStreetMap] %{commenter} прокоментував набір змін, до якого ви залишали свій коментар' - your_changeset: '%{commenter} залишив коментар до одного з ваших наборів змін, - створених %{time}' - commented_changeset: '%{commenter} залишив коментар до набору змін, що ви - переглядаєте, створений %{changeset_author} – %{time}' + your_changeset: '%{commenter} залишив коментар у %{time} до одного з ваших + наборів змін' + commented_changeset: '%{commenter} залишив коментар у %{time} до набору змін, + що ви переглядаєте, створений %{changeset_author}' partial_changeset_with_comment: з коментарем '%{changeset_comment}' partial_changeset_without_comment: без коментарів details: |2- diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 8be63f091..416dda744 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -42,6 +42,7 @@ # Author: 予弦 # Author: 夢蝶葬花 # Author: 水獭很懒 +# Author: 沈澄心 # Author: 神樂坂秀吉 # Author: 阿pp # Author: 아라 @@ -323,6 +324,7 @@ zh-CN: tag: '%{key}=%{value} 标签的 wiki 说明页面' wikidata_link: 维基数据上的%{page}项 wikipedia_link: 维基百科上的 %{page} 条目 + wikimedia_commons_link: 在维基共享资源上的%{page}项目 telephone_link: 请拨打 %{phone_number} colour_preview: '%{colour_value}的颜色预览' note: @@ -1296,8 +1298,8 @@ zh-CN: commented: subject_own: '[OpenStreetMap] %{commenter}在您的一个修改集合中做出了评论' subject_other: '[OpenStreetMap] %{commenter} 评论了您感兴趣的一个修改集合' - your_changeset: '%{commenter} 在您于 %{time} 创建的一个修改集合留了言' - commented_changeset: '%{commenter} 在您监视的由 %{changeset_author} 于 %{time} 创建的一个地图修改集合中留了言' + your_changeset: '%{commenter} 于 %{time} 在您创建的一个修改集合留了言' + commented_changeset: '%{commenter} 于 %{time} 在您监视的由 %{changeset_author} 创建的一个地图修改集合中留了言' partial_changeset_with_comment: 带评论“%{changeset_comment}” partial_changeset_without_comment: 没有评论 details: 更多关于修改集合的详细信息可以在 %{url} 找到。 @@ -1784,7 +1786,9 @@ zh-CN: newer: 较新轨迹 trace: pending: 挂起 - count_points: '%{count} 个点' + count_points: + one: 1个点 + other: '%{count}个点' more: 更多 trace_details: 查看轨迹详情 view_map: 查看地图 @@ -2019,7 +2023,7 @@ zh-CN: read_ct: 我已了解并同意贡献者条款 tou_explain_html: 这些%{tou_link}适用于网站方面的使用,与其它由OSMF提供的基础内容。请点击链接,阅读并同意该条款。 read_tou: 我已阅读并同意使用条款 - consider_pd: 除了上述协议,我同意将我的贡献授权为公共领域 + consider_pd: 除了上述协议,我同意将我的贡献释于公有领域 consider_pd_why: 这是什么? consider_pd_why_url: http://www.osmfoundation.org/wiki/License/Why_would_I_want_my_contributions_to_be_public_domain guidance: 帮助理解这些条款的信息:一个可读的摘要和一些非正式翻译 @@ -2131,7 +2135,7 @@ zh-CN: agreed: 您已同意新的贡献者条款。 not yet agreed: 您还没有同意新的贡献者条款。 review link text: 请跟随此链接,方便您查看并接受新的贡献者条款。 - agreed_with_pd: 您也将您的编辑释于公共领域。 + agreed_with_pd: 您也将您的编辑释于公有领域。 link: https://www.osmfoundation.org/wiki/License/Contributor_Terms link text: 这是什么? profile description: 基本信息说明: diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 64170d513..b8fce95ae 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -315,6 +315,7 @@ zh-TW: tag: '%{key}=%{value} 標籤的 Wiki 說明頁面' wikidata_link: 維基數據上的 %{page} 項目 wikipedia_link: 維基百科上的 %{page} 條目 + wikimedia_commons_link: 在維基共享資源上的%{page}項目 telephone_link: 致電 %{phone_number} colour_preview: 色彩%{colour_value}預覽 note: @@ -1290,8 +1291,8 @@ zh-TW: commented: subject_own: '[OpenStreetMap] %{commenter}% 在您的變更集評論' subject_other: '[OpenStreetMap] %{commenter} 就您感興趣的變更集評論' - your_changeset: '%{commenter} 在您於 %{time} 建立的變更集評論' - commented_changeset: '%{commenter} 在您監視,由 %{changeset_author} 於 %{time} 建立的變更集評論' + your_changeset: '%{commenter}於 %{time} 在您的變更集之一裡留下了評論' + commented_changeset: '%{commenter}於 %{time} 在您監視的由%{changeset_author}所建立變更集裡留下了評論' partial_changeset_with_comment: 評論 "%{changeset_comment}" partial_changeset_without_comment: 沒有評論 details: 關於變更集的詳情可在 %{url} 找到。 diff --git a/config/routes.rb b/config/routes.rb index 2c904fc48..6764335d6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -67,11 +67,11 @@ OpenStreetMap::Application.routes.draw do get "user/gpx_files" => "api/users#gpx_files" get "users" => "api/users#index", :as => :api_users - get "user/preferences" => "api/user_preferences#read" - get "user/preferences/:preference_key" => "api/user_preferences#read_one" - put "user/preferences" => "api/user_preferences#update" - put "user/preferences/:preference_key" => "api/user_preferences#update_one" - delete "user/preferences/:preference_key" => "api/user_preferences#delete_one" + get "user/preferences" => "api/user_preferences#index" + get "user/preferences/:preference_key" => "api/user_preferences#show" + put "user/preferences" => "api/user_preferences#update_all" + put "user/preferences/:preference_key" => "api/user_preferences#update" + delete "user/preferences/:preference_key" => "api/user_preferences#destroy" post "gpx/create" => "api/traces#create" get "gpx/:id" => "api/traces#show", :id => /\d+/ diff --git a/db/migrate/20191120140058_remove_nearby_from_users.rb b/db/migrate/20191120140058_remove_nearby_from_users.rb new file mode 100644 index 000000000..7d9383dc6 --- /dev/null +++ b/db/migrate/20191120140058_remove_nearby_from_users.rb @@ -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 diff --git a/db/structure.sql b/db/structure.sql index 6370eb95a..78e58d4be 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1394,7 +1394,6 @@ CREATE TABLE public.users ( home_lat double precision, home_lon double precision, home_zoom smallint DEFAULT 3, - nearby integer DEFAULT 50, pass_salt character varying, email_valid boolean DEFAULT false NOT NULL, new_email character varying, @@ -3137,6 +3136,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20190623093642'), ('20190702193519'), ('20190716173946'), +('20191120140058'), ('21'), ('22'), ('23'), diff --git a/test/abilities/api_capability_test.rb b/test/abilities/api_capability_test.rb index 8d0e682f6..8a98f29e0 100644 --- a/test/abilities/api_capability_test.rb +++ b/test/abilities/api_capability_test.rb @@ -100,33 +100,33 @@ class UserApiCapabilityTest < ApiCapabilityTest test "user preferences" do # a user with no tokens capability = ApiCapability.new nil - [:read, :read_one, :update, :update_one, :delete_one].each do |act| + [:index, :show, :update_all, :update, :destroy].each do |act| assert capability.cannot? act, UserPreference end # A user with empty tokens capability = ApiCapability.new tokens - [:read, :read_one, :update, :update_one, :delete_one].each do |act| + [:index, :show, :update_all, :update, :destroy].each do |act| assert capability.cannot? act, UserPreference end capability = ApiCapability.new tokens(:allow_read_prefs) - [:update, :update_one, :delete_one].each do |act| + [:update_all, :update, :destroy].each do |act| assert capability.cannot? act, UserPreference end - [:read, :read_one].each do |act| + [:index, :show].each do |act| assert capability.can? act, UserPreference end capability = ApiCapability.new tokens(:allow_write_prefs) - [:read, :read_one].each do |act| + [:index, :show].each do |act| assert capability.cannot? act, UserPreference end - [:update, :update_one, :delete_one].each do |act| + [:update_all, :update, :destroy].each do |act| assert capability.can? act, UserPreference end end diff --git a/test/controllers/api/changesets_controller_test.rb b/test/controllers/api/changesets_controller_test.rb index 3716ae707..a4583a928 100644 --- a/test/controllers/api/changesets_controller_test.rb +++ b/test/controllers/api/changesets_controller_test.rb @@ -458,10 +458,10 @@ CHANGESET diff.root = XML::Node.new "osmChange" delete = XML::Node.new "delete" diff.root << delete - delete << super_relation.to_xml_node - delete << used_relation.to_xml_node - delete << used_way.to_xml_node - delete << used_node.to_xml_node + delete << xml_node_for_relation(super_relation) + delete << xml_node_for_relation(used_relation) + delete << xml_node_for_way(used_way) + delete << xml_node_for_node(used_node) # update the changeset to one that this user owns %w[node way relation].each do |type| @@ -590,9 +590,9 @@ CHANGESET diff.root = XML::Node.new "osmChange" delete = XML::Node.new "delete" diff.root << delete - delete << other_relation.to_xml_node - delete << used_way.to_xml_node - delete << used_node.to_xml_node + delete << xml_node_for_relation(other_relation) + delete << xml_node_for_way(used_way) + delete << xml_node_for_node(used_node) # update the changeset to one that this user owns %w[node way relation].each do |type| @@ -633,9 +633,9 @@ CHANGESET delete = XML::Node.new "delete" diff.root << delete delete["if-unused"] = "" - delete << used_relation.to_xml_node - delete << used_way.to_xml_node - delete << used_node.to_xml_node + delete << xml_node_for_relation(used_relation) + delete << xml_node_for_way(used_way) + delete << xml_node_for_node(used_node) # update the changeset to one that this user owns %w[node way relation].each do |type| @@ -1137,7 +1137,7 @@ CHANGESET diff = XML::Document.new diff.root = XML::Node.new "osmChange" modify = XML::Node.new "modify" - xml_old_node = old_node.to_xml_node + xml_old_node = xml_node_for_node(old_node) xml_old_node["lat"] = 2.0.to_s xml_old_node["lon"] = 2.0.to_s xml_old_node["changeset"] = changeset_id.to_s @@ -1175,7 +1175,7 @@ CHANGESET diff = XML::Document.new diff.root = XML::Node.new "osmChange" modify = XML::Node.new "modify" - xml_old_way = old_way.to_xml_node + xml_old_way = xml_node_for_way(old_way) nd_ref = XML::Node.new "nd" nd_ref["ref"] = create(:node, :lat => 3, :lon => 3).id.to_s xml_old_way << nd_ref @@ -1228,7 +1228,7 @@ CHANGESET diff.root = XML::Node.new "osmChange" delete = XML::Node.new "delete" diff.root << delete - delete << node.to_xml_node + delete << xml_node_for_node(node) # upload it error_format "xml" @@ -1487,7 +1487,7 @@ CHANGESET # add (delete) a way to it, which contains a point at (3,3) with_controller(WaysController.new) do - xml = update_changeset(way.to_xml, changeset_id) + xml = update_changeset(xml_for_way(way), changeset_id) put :delete, :params => { :id => way.id }, :body => xml.to_s assert_response :success, "Couldn't delete a way." end diff --git a/test/controllers/api/nodes_controller_test.rb b/test/controllers/api/nodes_controller_test.rb index 6d990a84c..aee41d515 100644 --- a/test/controllers/api/nodes_controller_test.rb +++ b/test/controllers/api/nodes_controller_test.rb @@ -147,6 +147,15 @@ module Api assert_response :not_found end + # Ensure the lat/lon is formatted as a decimal e.g. not 4.0e-05 + def test_lat_lon_xml_format + node = create(:node, :latitude => (0.00004 * OldNode::SCALE).to_i, :longitude => (0.00008 * OldNode::SCALE).to_i) + + get :show, :params => { :id => node.id } + assert_match(/lat="0.0000400"/, response.body) + assert_match(/lon="0.0000800"/, response.body) + end + # this tests deletion restrictions - basic deletion is tested in the unit # tests for node! def test_delete @@ -164,22 +173,22 @@ module Api basic_authorization private_user.email, "test" # try to delete with an invalid (closed) changeset - xml = update_changeset(private_node.to_xml, private_user_closed_changeset.id) + xml = update_changeset(xml_for_node(private_node), private_user_closed_changeset.id) delete :delete, :params => { :id => private_node.id }, :body => xml.to_s assert_require_public_data("non-public user shouldn't be able to delete node") # try to delete with an invalid (non-existent) changeset - xml = update_changeset(private_node.to_xml, 0) + xml = update_changeset(xml_for_node(private_node), 0) delete :delete, :params => { :id => private_node.id }, :body => xml.to_s assert_require_public_data("shouldn't be able to delete node, when user's data is private") # valid delete now takes a payload - xml = private_node.to_xml + xml = xml_for_node(private_node) delete :delete, :params => { :id => private_node.id }, :body => xml.to_s assert_require_public_data("shouldn't be able to delete node when user's data isn't public'") # this won't work since the node is already deleted - xml = private_deleted_node.to_xml + xml = xml_for_node(private_deleted_node) delete :delete, :params => { :id => private_deleted_node.id }, :body => xml.to_s assert_require_public_data @@ -192,7 +201,7 @@ module Api private_used_node = create(:node, :changeset => private_user_changeset) create(:way_node, :node => private_used_node) - xml = private_used_node.to_xml + xml = xml_for_node(private_used_node) delete :delete, :params => { :id => private_used_node.id }, :body => xml.to_s assert_require_public_data "shouldn't be able to delete a node used in a way (#{@response.body})" @@ -200,7 +209,7 @@ module Api private_used_node2 = create(:node, :changeset => private_user_changeset) create(:relation_member, :member => private_used_node2) - xml = private_used_node2.to_xml + xml = xml_for_node(private_used_node2) delete :delete, :params => { :id => private_used_node2.id }, :body => xml.to_s assert_require_public_data "shouldn't be able to delete a node used in a relation (#{@response.body})" @@ -212,18 +221,18 @@ module Api basic_authorization user.email, "test" # try to delete with an invalid (closed) changeset - xml = update_changeset(node.to_xml, closed_changeset.id) + xml = update_changeset(xml_for_node(node), closed_changeset.id) delete :delete, :params => { :id => node.id }, :body => xml.to_s assert_response :conflict # try to delete with an invalid (non-existent) changeset - xml = update_changeset(node.to_xml, 0) + xml = update_changeset(xml_for_node(node), 0) delete :delete, :params => { :id => node.id }, :body => xml.to_s assert_response :conflict # try to delete a node with a different ID other_node = create(:node) - xml = other_node.to_xml + xml = xml_for_node(other_node) delete :delete, :params => { :id => node.id }, :body => xml.to_s assert_response :bad_request, "should not be able to delete a node with a different ID from the XML" @@ -235,7 +244,7 @@ module Api "should not be able to delete a node without a valid XML payload" # valid delete now takes a payload - xml = node.to_xml + xml = xml_for_node(node) delete :delete, :params => { :id => node.id }, :body => xml.to_s assert_response :success @@ -245,7 +254,7 @@ module Api "delete request should return a new version number for node" # deleting the same node twice doesn't work - xml = node.to_xml + xml = xml_for_node(node) delete :delete, :params => { :id => node.id }, :body => xml.to_s assert_response :gone @@ -259,7 +268,7 @@ module Api way_node = create(:way_node, :node => used_node) way_node2 = create(:way_node, :node => used_node) - xml = used_node.to_xml + xml = xml_for_node(used_node) delete :delete, :params => { :id => used_node.id }, :body => xml.to_s assert_response :precondition_failed, "shouldn't be able to delete a node used in a way (#{@response.body})" @@ -270,7 +279,7 @@ module Api relation_member = create(:relation_member, :member => used_node2) relation_member2 = create(:relation_member, :member => used_node2) - xml = used_node2.to_xml + xml = xml_for_node(used_node2) delete :delete, :params => { :id => used_node2.id }, :body => xml.to_s assert_response :precondition_failed, "shouldn't be able to delete a node used in a relation (#{@response.body})" @@ -289,7 +298,7 @@ module Api user = create(:user) node = create(:node, :changeset => create(:changeset, :user => user)) - xml = node.to_xml + xml = xml_for_node(node) put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :unauthorized @@ -301,41 +310,41 @@ module Api ## trying to break changesets # try and update in someone else's changeset - xml = update_changeset(private_node.to_xml, + xml = update_changeset(xml_for_node(private_node), create(:changeset).id) put :update, :params => { :id => private_node.id }, :body => xml.to_s assert_require_public_data "update with other user's changeset should be forbidden when data isn't public" # try and update in a closed changeset - xml = update_changeset(private_node.to_xml, + xml = update_changeset(xml_for_node(private_node), create(:changeset, :closed, :user => private_user).id) put :update, :params => { :id => private_node.id }, :body => xml.to_s assert_require_public_data "update with closed changeset should be forbidden, when data isn't public" # try and update in a non-existant changeset - xml = update_changeset(private_node.to_xml, 0) + xml = update_changeset(xml_for_node(private_node), 0) put :update, :params => { :id => private_node.id }, :body => xml.to_s assert_require_public_data "update with changeset=0 should be forbidden, when data isn't public" ## try and submit invalid updates - xml = xml_attr_rewrite(private_node.to_xml, "lat", 91.0) + xml = xml_attr_rewrite(xml_for_node(private_node), "lat", 91.0) put :update, :params => { :id => private_node.id }, :body => xml.to_s assert_require_public_data "node at lat=91 should be forbidden, when data isn't public" - xml = xml_attr_rewrite(private_node.to_xml, "lat", -91.0) + xml = xml_attr_rewrite(xml_for_node(private_node), "lat", -91.0) put :update, :params => { :id => private_node.id }, :body => xml.to_s assert_require_public_data "node at lat=-91 should be forbidden, when data isn't public" - xml = xml_attr_rewrite(private_node.to_xml, "lon", 181.0) + xml = xml_attr_rewrite(xml_for_node(private_node), "lon", 181.0) put :update, :params => { :id => private_node.id }, :body => xml.to_s assert_require_public_data "node at lon=181 should be forbidden, when data isn't public" - xml = xml_attr_rewrite(private_node.to_xml, "lon", -181.0) + xml = xml_attr_rewrite(xml_for_node(private_node), "lon", -181.0) put :update, :params => { :id => private_node.id }, :body => xml.to_s assert_require_public_data "node at lon=-181 should be forbidden, when data isn't public" ## finally, produce a good request which still won't work - xml = private_node.to_xml + xml = xml_for_node(private_node) put :update, :params => { :id => private_node.id }, :body => xml.to_s assert_require_public_data "should have failed with a forbidden when data isn't public" @@ -343,7 +352,7 @@ module Api # try and update a node without authorisation # first try to update node without auth - xml = node.to_xml + xml = xml_for_node(node) put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :forbidden @@ -353,36 +362,36 @@ module Api ## trying to break changesets # try and update in someone else's changeset - xml = update_changeset(node.to_xml, + xml = update_changeset(xml_for_node(node), create(:changeset).id) put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :conflict, "update with other user's changeset should be rejected" # try and update in a closed changeset - xml = update_changeset(node.to_xml, + xml = update_changeset(xml_for_node(node), create(:changeset, :closed, :user => user).id) put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :conflict, "update with closed changeset should be rejected" # try and update in a non-existant changeset - xml = update_changeset(node.to_xml, 0) + xml = update_changeset(xml_for_node(node), 0) put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :conflict, "update with changeset=0 should be rejected" ## try and submit invalid updates - xml = xml_attr_rewrite(node.to_xml, "lat", 91.0) + xml = xml_attr_rewrite(xml_for_node(node), "lat", 91.0) put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :bad_request, "node at lat=91 should be rejected" - xml = xml_attr_rewrite(node.to_xml, "lat", -91.0) + xml = xml_attr_rewrite(xml_for_node(node), "lat", -91.0) put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :bad_request, "node at lat=-91 should be rejected" - xml = xml_attr_rewrite(node.to_xml, "lon", 181.0) + xml = xml_attr_rewrite(xml_for_node(node), "lon", 181.0) put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :bad_request, "node at lon=181 should be rejected" - xml = xml_attr_rewrite(node.to_xml, "lon", -181.0) + xml = xml_attr_rewrite(xml_for_node(node), "lon", -181.0) put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :bad_request, "node at lon=-181 should be rejected" @@ -390,26 +399,26 @@ module Api current_node_version = node.version # try and submit a version behind - xml = xml_attr_rewrite(node.to_xml, + xml = xml_attr_rewrite(xml_for_node(node), "version", current_node_version - 1) put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :conflict, "should have failed on old version number" # try and submit a version ahead - xml = xml_attr_rewrite(node.to_xml, + xml = xml_attr_rewrite(xml_for_node(node), "version", current_node_version + 1) put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :conflict, "should have failed on skipped version number" # try and submit total crap in the version field - xml = xml_attr_rewrite(node.to_xml, + xml = xml_attr_rewrite(xml_for_node(node), "version", "p1r4t3s!") put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :conflict, "should not be able to put 'p1r4at3s!' in the version field" ## try an update with the wrong ID - xml = create(:node).to_xml + xml = xml_for_node(create(:node)) put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :bad_request, "should not be able to update a node with a different ID from the XML" @@ -421,7 +430,7 @@ module Api "should not be able to update a node with non-OSM XML doc." ## finally, produce a good request which should work - xml = node.to_xml + xml = xml_for_node(node) put :update, :params => { :id => node.id }, :body => xml.to_s assert_response :success, "a valid update request failed" end @@ -474,7 +483,7 @@ module Api tag_xml["v"] = existing_tag.v # add the tag into the existing xml - node_xml = existing_tag.node.to_xml + node_xml = xml_for_node(existing_tag.node) node_xml.find("//osm/node").first << tag_xml # try and upload it diff --git a/test/controllers/api/old_nodes_controller_test.rb b/test/controllers/api/old_nodes_controller_test.rb index 0f8954541..941787d0a 100644 --- a/test/controllers/api/old_nodes_controller_test.rb +++ b/test/controllers/api/old_nodes_controller_test.rb @@ -43,7 +43,7 @@ module Api basic_authorization private_user.email, "test" # setup a simple XML node - xml_doc = private_node.to_xml + xml_doc = xml_for_node(private_node) xml_node = xml_doc.find("//osm/node").first nodeid = private_node.id @@ -91,7 +91,7 @@ module Api # setup a simple XML node - xml_doc = node.to_xml + xml_doc = xml_for_node(node) xml_node = xml_doc.find("//osm/node").first nodeid = node.id diff --git a/test/controllers/api/relations_controller_test.rb b/test/controllers/api/relations_controller_test.rb index 4d2969026..1b54e4863 100644 --- a/test/controllers/api/relations_controller_test.rb +++ b/test/controllers/api/relations_controller_test.rb @@ -525,28 +525,28 @@ module Api assert_response :forbidden # try to delete with an invalid (closed) changeset - xml = update_changeset(relation.to_xml, + xml = update_changeset(xml_for_relation(relation), private_user_closed_changeset.id) delete :delete, :params => { :id => relation.id }, :body => xml.to_s assert_response :forbidden # try to delete with an invalid (non-existent) changeset - xml = update_changeset(relation.to_xml, 0) + xml = update_changeset(xml_for_relation(relation), 0) delete :delete, :params => { :id => relation.id }, :body => xml.to_s assert_response :forbidden # this won't work because the relation is in-use by another relation - xml = used_relation.to_xml + xml = xml_for_relation(used_relation) delete :delete, :params => { :id => used_relation.id }, :body => xml.to_s assert_response :forbidden # this should work when we provide the appropriate payload... - xml = relation.to_xml + xml = xml_for_relation(relation) delete :delete, :params => { :id => relation.id }, :body => xml.to_s assert_response :forbidden # this won't work since the relation is already deleted - xml = deleted_relation.to_xml + xml = xml_for_relation(deleted_relation) delete :delete, :params => { :id => deleted_relation.id }, :body => xml.to_s assert_response :forbidden @@ -568,36 +568,36 @@ module Api assert_match(/Changeset id is missing/, @response.body) # try to delete with an invalid (closed) changeset - xml = update_changeset(relation.to_xml, + xml = update_changeset(xml_for_relation(relation), closed_changeset.id) delete :delete, :params => { :id => relation.id }, :body => xml.to_s assert_response :conflict # try to delete with an invalid (non-existent) changeset - xml = update_changeset(relation.to_xml, 0) + xml = update_changeset(xml_for_relation(relation), 0) delete :delete, :params => { :id => relation.id }, :body => xml.to_s assert_response :conflict # this won't work because the relation is in a changeset owned by someone else - xml = update_changeset(relation.to_xml, create(:changeset).id) + xml = update_changeset(xml_for_relation(relation), create(:changeset).id) delete :delete, :params => { :id => relation.id }, :body => xml.to_s assert_response :conflict, "shouldn't be able to delete a relation in a changeset owned by someone else (#{@response.body})" # this won't work because the relation in the payload is different to that passed - xml = update_changeset(relation.to_xml, changeset.id) + xml = update_changeset(xml_for_relation(relation), changeset.id) delete :delete, :params => { :id => create(:relation).id }, :body => xml.to_s assert_response :bad_request, "shouldn't be able to delete a relation when payload is different to the url" # this won't work because the relation is in-use by another relation - xml = update_changeset(used_relation.to_xml, changeset.id) + xml = update_changeset(xml_for_relation(used_relation), changeset.id) delete :delete, :params => { :id => used_relation.id }, :body => xml.to_s assert_response :precondition_failed, "shouldn't be able to delete a relation used in a relation (#{@response.body})" assert_equal "Precondition failed: The relation #{used_relation.id} is used in relation #{super_relation.id}.", @response.body # this should work when we provide the appropriate payload... - xml = update_changeset(multi_tag_relation.to_xml, changeset.id) + xml = update_changeset(xml_for_relation(multi_tag_relation), changeset.id) delete :delete, :params => { :id => multi_tag_relation.id }, :body => xml.to_s assert_response :success @@ -607,18 +607,18 @@ module Api "delete request should return a new version number for relation" # this won't work since the relation is already deleted - xml = update_changeset(deleted_relation.to_xml, changeset.id) + xml = update_changeset(xml_for_relation(deleted_relation), changeset.id) delete :delete, :params => { :id => deleted_relation.id }, :body => xml.to_s assert_response :gone # Public visible relation needs to be deleted - xml = update_changeset(super_relation.to_xml, changeset.id) + xml = update_changeset(xml_for_relation(super_relation), changeset.id) delete :delete, :params => { :id => super_relation.id }, :body => xml.to_s assert_response :success # this works now because the relation which was using this one # has been deleted. - xml = update_changeset(used_relation.to_xml, changeset.id) + xml = update_changeset(xml_for_relation(used_relation), changeset.id) delete :delete, :params => { :id => used_relation.id }, :body => xml.to_s assert_response :success, "should be able to delete a relation used in an old relation (#{@response.body})" @@ -643,7 +643,7 @@ module Api # indirectly via the way), so the bbox should be [3,3,5,5]. check_changeset_modify(BoundingBox.new(3, 3, 5, 5)) do |changeset_id| # add a tag to an existing relation - relation_xml = relation.to_xml + relation_xml = xml_for_relation(relation) relation_element = relation_xml.find("//osm/relation").first new_tag = XML::Node.new("tag") new_tag["k"] = "some_new_tag" @@ -675,7 +675,7 @@ module Api [node1, node2, way1, way2].each do |element| bbox = element.bbox.to_unscaled check_changeset_modify(bbox) do |changeset_id| - relation_xml = Relation.find(relation.id).to_xml + relation_xml = xml_for_relation(Relation.find(relation.id)) relation_element = relation_xml.find("//osm/relation").first new_member = XML::Node.new("member") new_member["ref"] = element.id.to_s @@ -710,7 +710,7 @@ module Api check_changeset_modify(BoundingBox.new(5, 5, 5, 5)) do |changeset_id| # remove node 5 (5,5) from an existing relation - relation_xml = relation.to_xml + relation_xml = xml_for_relation(relation) relation_xml .find("//osm/relation/member[@type='node'][@ref='#{node2.id}']") .first.remove! @@ -879,7 +879,7 @@ OSM create(:relation_member, :relation => relation, :member => node2) check_changeset_modify(BoundingBox.new(3, 3, 5, 5)) do |changeset_id| - relation_xml = relation.to_xml + relation_xml = xml_for_relation(relation) relation_xml .find("//osm/relation/member") .each(&:remove!) diff --git a/test/controllers/api/user_preferences_controller_test.rb b/test/controllers/api/user_preferences_controller_test.rb index 99dad9597..ac377848c 100644 --- a/test/controllers/api/user_preferences_controller_test.rb +++ b/test/controllers/api/user_preferences_controller_test.rb @@ -7,38 +7,38 @@ module Api def test_routes assert_routing( { :path => "/api/0.6/user/preferences", :method => :get }, - { :controller => "api/user_preferences", :action => "read" } + { :controller => "api/user_preferences", :action => "index" } ) assert_routing( { :path => "/api/0.6/user/preferences", :method => :put }, - { :controller => "api/user_preferences", :action => "update" } + { :controller => "api/user_preferences", :action => "update_all" } ) assert_routing( { :path => "/api/0.6/user/preferences/key", :method => :get }, - { :controller => "api/user_preferences", :action => "read_one", :preference_key => "key" } + { :controller => "api/user_preferences", :action => "show", :preference_key => "key" } ) assert_routing( { :path => "/api/0.6/user/preferences/key", :method => :put }, - { :controller => "api/user_preferences", :action => "update_one", :preference_key => "key" } + { :controller => "api/user_preferences", :action => "update", :preference_key => "key" } ) assert_routing( { :path => "/api/0.6/user/preferences/key", :method => :delete }, - { :controller => "api/user_preferences", :action => "delete_one", :preference_key => "key" } + { :controller => "api/user_preferences", :action => "destroy", :preference_key => "key" } ) end ## - # test read action - def test_read + # test showing all preferences + def test_index # first try without auth - get :read + get :index assert_response :unauthorized, "should be authenticated" # authenticate as a user with no preferences basic_authorization create(:user).email, "test" # try the read again - get :read + get :index assert_select "osm" do assert_select "preferences", :count => 1 do assert_select "preference", :count => 0 @@ -52,7 +52,7 @@ module Api basic_authorization user.email, "test" # try the read again - get :read + get :index assert_response :success assert_equal "application/xml", @response.content_type assert_select "osm" do @@ -65,39 +65,39 @@ module Api end ## - # test read_one action - def test_read_one + # test showing one preference + def test_show user = create(:user) create(:user_preference, :user => user, :k => "key", :v => "value") # try a read without auth - get :read_one, :params => { :preference_key => "key" } + get :show, :params => { :preference_key => "key" } assert_response :unauthorized, "should be authenticated" # authenticate as a user with preferences basic_authorization user.email, "test" # try the read again - get :read_one, :params => { :preference_key => "key" } + get :show, :params => { :preference_key => "key" } assert_response :success assert_equal "text/plain", @response.content_type assert_equal "value", @response.body # try the read again for a non-existent key - get :read_one, :params => { :preference_key => "unknown_key" } + get :show, :params => { :preference_key => "unknown_key" } assert_response :not_found end ## - # test update action - def test_update + # test bulk update action + def test_update_all user = create(:user) create(:user_preference, :user => user, :k => "key", :v => "value") create(:user_preference, :user => user, :k => "some_key", :v => "some_value") # try a put without auth assert_no_difference "UserPreference.count" do - put :update, :body => "" + put :update_all, :body => "" end assert_response :unauthorized, "should be authenticated" assert_equal "value", UserPreference.find([user.id, "key"]).v @@ -111,7 +111,7 @@ module Api # try the put again assert_no_difference "UserPreference.count" do - put :update, :body => "" + put :update_all, :body => "" end assert_response :success assert_equal "text/plain", @response.content_type @@ -124,7 +124,7 @@ module Api # try a put with duplicate keys assert_no_difference "UserPreference.count" do - put :update, :body => "" + put :update_all, :body => "" end assert_response :bad_request assert_equal "text/plain", @response.content_type @@ -133,20 +133,20 @@ module Api # try a put with invalid content assert_no_difference "UserPreference.count" do - put :update, :body => "nonsense" + put :update_all, :body => "nonsense" end assert_response :bad_request end ## - # test update_one action - def test_update_one + # test update action + def test_update user = create(:user) create(:user_preference, :user => user) # try a put without auth assert_no_difference "UserPreference.count" do - put :update_one, :params => { :preference_key => "new_key" }, :body => "new_value" + put :update, :params => { :preference_key => "new_key" }, :body => "new_value" end assert_response :unauthorized, "should be authenticated" assert_raises ActiveRecord::RecordNotFound do @@ -158,7 +158,7 @@ module Api # try adding a new preference assert_difference "UserPreference.count", 1 do - put :update_one, :params => { :preference_key => "new_key" }, :body => "new_value" + put :update, :params => { :preference_key => "new_key" }, :body => "new_value" end assert_response :success assert_equal "text/plain", @response.content_type @@ -167,7 +167,7 @@ module Api # try changing the value of a preference assert_no_difference "UserPreference.count" do - put :update_one, :params => { :preference_key => "new_key" }, :body => "newer_value" + put :update, :params => { :preference_key => "new_key" }, :body => "newer_value" end assert_response :success assert_equal "text/plain", @response.content_type @@ -176,14 +176,14 @@ module Api end ## - # test delete_one action - def test_delete_one + # test destroy action + def test_destroy user = create(:user) create(:user_preference, :user => user, :k => "key", :v => "value") # try a delete without auth assert_no_difference "UserPreference.count" do - delete :delete_one, :params => { :preference_key => "key" } + delete :destroy, :params => { :preference_key => "key" } end assert_response :unauthorized, "should be authenticated" assert_equal "value", UserPreference.find([user.id, "key"]).v @@ -193,7 +193,7 @@ module Api # try the delete again assert_difference "UserPreference.count", -1 do - get :delete_one, :params => { :preference_key => "key" } + get :destroy, :params => { :preference_key => "key" } end assert_response :success assert_equal "text/plain", @response.content_type @@ -204,7 +204,7 @@ module Api # try the delete again for the same key assert_no_difference "UserPreference.count" do - get :delete_one, :params => { :preference_key => "key" } + get :destroy, :params => { :preference_key => "key" } end assert_response :not_found assert_raises ActiveRecord::RecordNotFound do @@ -214,7 +214,7 @@ module Api # Ensure that a valid access token with correct capabilities can be used to # read preferences - def test_read_one_using_token + def test_show_using_token user = create(:user) token = create(:access_token, :user => user, :allow_read_prefs => true) create(:user_preference, :user => user, :k => "key", :v => "value") @@ -224,14 +224,14 @@ module Api @request.env["oauth.strategies"] = [:token] @request.env["oauth.token"] = token - get :read_one, :params => { :preference_key => "key" } + get :show, :params => { :preference_key => "key" } assert_response :success end # Ensure that a valid access token with incorrect capabilities can't be used # to read preferences even, though the owner of that token could read them # by other methods. - def test_read_one_using_token_fail + def test_show_using_token_fail user = create(:user) token = create(:access_token, :user => user, :allow_read_prefs => false) create(:user_preference, :user => user, :k => "key", :v => "value") @@ -239,7 +239,7 @@ module Api @request.env["oauth.strategies"] = [:token] @request.env["oauth.token"] = token - get :read_one, :params => { :preference_key => "key" } + get :show, :params => { :preference_key => "key" } assert_response :forbidden end end diff --git a/test/controllers/api/ways_controller_test.rb b/test/controllers/api/ways_controller_test.rb index c390e8bc2..433b43f27 100644 --- a/test/controllers/api/ways_controller_test.rb +++ b/test/controllers/api/ways_controller_test.rb @@ -290,17 +290,17 @@ module Api assert_response :forbidden # try to delete with an invalid (closed) changeset - xml = update_changeset(private_way.to_xml, private_closed_changeset.id) + xml = update_changeset(xml_for_way(private_way), private_closed_changeset.id) delete :delete, :params => { :id => private_way.id }, :body => xml.to_s assert_response :forbidden # try to delete with an invalid (non-existent) changeset - xml = update_changeset(private_way.to_xml, 0) + xml = update_changeset(xml_for_way(private_way), 0) delete :delete, :params => { :id => private_way.id }, :body => xml.to_s assert_response :forbidden # Now try with a valid changeset - xml = private_way.to_xml + xml = xml_for_way(private_way) delete :delete, :params => { :id => private_way.id }, :body => xml.to_s assert_response :forbidden @@ -311,12 +311,12 @@ module Api # "delete request should return a new version number for way" # this won't work since the way is already deleted - xml = private_deleted_way.to_xml + xml = xml_for_way(private_deleted_way) delete :delete, :params => { :id => private_deleted_way.id }, :body => xml.to_s assert_response :forbidden # this shouldn't work as the way is used in a relation - xml = private_used_way.to_xml + xml = xml_for_way(private_used_way) delete :delete, :params => { :id => private_used_way.id }, :body => xml.to_s assert_response :forbidden, "shouldn't be able to delete a way used in a relation (#{@response.body}), when done by a private user" @@ -339,17 +339,17 @@ module Api assert_response :bad_request # try to delete with an invalid (closed) changeset - xml = update_changeset(way.to_xml, closed_changeset.id) + xml = update_changeset(xml_for_way(way), closed_changeset.id) delete :delete, :params => { :id => way.id }, :body => xml.to_s assert_response :conflict # try to delete with an invalid (non-existent) changeset - xml = update_changeset(way.to_xml, 0) + xml = update_changeset(xml_for_way(way), 0) delete :delete, :params => { :id => way.id }, :body => xml.to_s assert_response :conflict # Now try with a valid changeset - xml = way.to_xml + xml = xml_for_way(way) delete :delete, :params => { :id => way.id }, :body => xml.to_s assert_response :success @@ -360,12 +360,12 @@ module Api "delete request should return a new version number for way" # this won't work since the way is already deleted - xml = deleted_way.to_xml + xml = xml_for_way(deleted_way) delete :delete, :params => { :id => deleted_way.id }, :body => xml.to_s assert_response :gone # this shouldn't work as the way is used in a relation - xml = used_way.to_xml + xml = xml_for_way(used_way) delete :delete, :params => { :id => used_way.id }, :body => xml.to_s assert_response :precondition_failed, "shouldn't be able to delete a way used in a relation (#{@response.body})" @@ -390,7 +390,7 @@ module Api ## First test with no user credentials # try and update a way without authorisation - xml = way.to_xml + xml = xml_for_way(way) put :update, :params => { :id => way.id }, :body => xml.to_s assert_response :unauthorized @@ -402,33 +402,33 @@ module Api ## trying to break changesets # try and update in someone else's changeset - xml = update_changeset(private_way.to_xml, + xml = update_changeset(xml_for_way(private_way), create(:changeset).id) put :update, :params => { :id => private_way.id }, :body => xml.to_s assert_require_public_data "update with other user's changeset should be forbidden when date isn't public" # try and update in a closed changeset - xml = update_changeset(private_way.to_xml, + xml = update_changeset(xml_for_way(private_way), create(:changeset, :closed, :user => private_user).id) put :update, :params => { :id => private_way.id }, :body => xml.to_s assert_require_public_data "update with closed changeset should be forbidden, when data isn't public" # try and update in a non-existant changeset - xml = update_changeset(private_way.to_xml, 0) + xml = update_changeset(xml_for_way(private_way), 0) put :update, :params => { :id => private_way.id }, :body => xml.to_s assert_require_public_data("update with changeset=0 should be forbidden, when data isn't public") ## try and submit invalid updates - xml = xml_replace_node(private_way.to_xml, node.id, 9999) + xml = xml_replace_node(xml_for_way(private_way), node.id, 9999) put :update, :params => { :id => private_way.id }, :body => xml.to_s assert_require_public_data "way with non-existent node should be forbidden, when data isn't public" - xml = xml_replace_node(private_way.to_xml, node.id, create(:node, :deleted).id) + xml = xml_replace_node(xml_for_way(private_way), node.id, create(:node, :deleted).id) put :update, :params => { :id => private_way.id }, :body => xml.to_s assert_require_public_data "way with deleted node should be forbidden, when data isn't public" ## finally, produce a good request which will still not work - xml = private_way.to_xml + xml = xml_for_way(private_way) put :update, :params => { :id => private_way.id }, :body => xml.to_s assert_require_public_data "should have failed with a forbidden when data isn't public" @@ -440,28 +440,28 @@ module Api ## trying to break changesets # try and update in someone else's changeset - xml = update_changeset(way.to_xml, + xml = update_changeset(xml_for_way(way), create(:changeset).id) put :update, :params => { :id => way.id }, :body => xml.to_s assert_response :conflict, "update with other user's changeset should be rejected" # try and update in a closed changeset - xml = update_changeset(way.to_xml, + xml = update_changeset(xml_for_way(way), create(:changeset, :closed, :user => user).id) put :update, :params => { :id => way.id }, :body => xml.to_s assert_response :conflict, "update with closed changeset should be rejected" # try and update in a non-existant changeset - xml = update_changeset(way.to_xml, 0) + xml = update_changeset(xml_for_way(way), 0) put :update, :params => { :id => way.id }, :body => xml.to_s assert_response :conflict, "update with changeset=0 should be rejected" ## try and submit invalid updates - xml = xml_replace_node(way.to_xml, node.id, 9999) + xml = xml_replace_node(xml_for_way(way), node.id, 9999) put :update, :params => { :id => way.id }, :body => xml.to_s assert_response :precondition_failed, "way with non-existent node should be rejected" - xml = xml_replace_node(way.to_xml, node.id, create(:node, :deleted).id) + xml = xml_replace_node(xml_for_way(way), node.id, create(:node, :deleted).id) put :update, :params => { :id => way.id }, :body => xml.to_s assert_response :precondition_failed, "way with deleted node should be rejected" @@ -469,26 +469,26 @@ module Api current_way_version = way.version # try and submit a version behind - xml = xml_attr_rewrite(way.to_xml, + xml = xml_attr_rewrite(xml_for_way(way), "version", current_way_version - 1) put :update, :params => { :id => way.id }, :body => xml.to_s assert_response :conflict, "should have failed on old version number" # try and submit a version ahead - xml = xml_attr_rewrite(way.to_xml, + xml = xml_attr_rewrite(xml_for_way(way), "version", current_way_version + 1) put :update, :params => { :id => way.id }, :body => xml.to_s assert_response :conflict, "should have failed on skipped version number" # try and submit total crap in the version field - xml = xml_attr_rewrite(way.to_xml, + xml = xml_attr_rewrite(xml_for_way(way), "version", "p1r4t3s!") put :update, :params => { :id => way.id }, :body => xml.to_s assert_response :conflict, "should not be able to put 'p1r4at3s!' in the version field" ## try an update with the wrong ID - xml = create(:way).to_xml + xml = xml_for_way(create(:way)) put :update, :params => { :id => way.id }, :body => xml.to_s assert_response :bad_request, "should not be able to update a way with a different ID from the XML" @@ -500,7 +500,7 @@ module Api "should not be able to update a way with non-OSM XML doc." ## finally, produce a good request which should work - xml = way.to_xml + xml = xml_for_way(way) put :update, :params => { :id => way.id }, :body => xml.to_s assert_response :success, "a valid update request failed" end @@ -527,7 +527,7 @@ module Api tag_xml["v"] = "yes" # add the tag into the existing xml - way_xml = private_way.to_xml + way_xml = xml_for_way(private_way) way_xml.find("//osm/way").first << tag_xml # try and upload it @@ -545,7 +545,7 @@ module Api tag_xml["v"] = "yes" # add the tag into the existing xml - way_xml = way.to_xml + way_xml = xml_for_way(way) way_xml.find("//osm/way").first << tag_xml # try and upload it @@ -575,7 +575,7 @@ module Api tag_xml["v"] = private_existing_tag.v # add the tag into the existing xml - way_xml = private_way.to_xml + way_xml = xml_for_way(private_way) way_xml.find("//osm/way").first << tag_xml # try and upload it @@ -593,7 +593,7 @@ module Api tag_xml["v"] = existing_tag.v # add the tag into the existing xml - way_xml = way.to_xml + way_xml = xml_for_way(way) way_xml.find("//osm/way").first << tag_xml # try and upload it @@ -621,7 +621,7 @@ module Api tag_xml["v"] = "foobar" # add the tag into the existing xml - way_xml = private_way.to_xml + way_xml = xml_for_way(private_way) # add two copies of the tag way_xml.find("//osm/way").first << tag_xml.copy(true) << tag_xml @@ -641,7 +641,7 @@ module Api tag_xml["v"] = "foobar" # add the tag into the existing xml - way_xml = way.to_xml + way_xml = xml_for_way(way) # add two copies of the tag way_xml.find("//osm/way").first << tag_xml.copy(true) << tag_xml diff --git a/test/helpers/browse_tags_helper_test.rb b/test/helpers/browse_tags_helper_test.rb index 222c7c669..a6390df38 100644 --- a/test/helpers/browse_tags_helper_test.rb +++ b/test/helpers/browse_tags_helper_test.rb @@ -48,6 +48,9 @@ class BrowseTagsHelperTest < ActionView::TestCase html = format_value("name:etymology:wikidata", "Q123") assert_dom_equal "Q123", html + html = format_value("wikimedia_commons", "File:Test.jpg") + assert_dom_equal "File:Test.jpg", html + html = format_value("colour", "#f00") assert_dom_equal %(#f00), html end @@ -190,6 +193,34 @@ class BrowseTagsHelperTest < ActionView::TestCase assert_nil link end + def test_wikimedia_commons_link + link = wikimedia_commons_link("wikimedia_commons", "http://commons.wikimedia.org/wiki/File:Full%20URL.jpg") + assert_nil link + + link = wikimedia_commons_link("wikimedia_commons", "https://commons.wikimedia.org/wiki/File:Full%20URL.jpg") + assert_nil link + + link = wikimedia_commons_link("wikimedia_commons", "Test.jpg") + assert_nil link + + link = wikimedia_commons_link("wikimedia_commons", "File:Test.jpg") + assert_equal "//commons.wikimedia.org/wiki/File:Test.jpg?uselang=en", link[:url] + assert_equal "File:Test.jpg", link[:title] + + link = wikimedia_commons_link("wikimedia_commons", "Category:Test_Category") + assert_equal "//commons.wikimedia.org/wiki/Category:Test_Category?uselang=en", link[:url] + assert_equal "Category:Test_Category", link[:title] + + I18n.locale = "pt-BR" + + link = wikimedia_commons_link("wikimedia_commons", "File:Test.jpg") + assert_equal "//commons.wikimedia.org/wiki/File:Test.jpg?uselang=pt-BR", link[:url] + assert_equal "File:Test.jpg", link[:title] + + link = wikimedia_commons_link("foo", "Test") + assert_nil link + end + def test_telephone_links links = telephone_links("foo", "Test") assert_nil links diff --git a/test/models/node_test.rb b/test/models/node_test.rb index d6fa1cd8f..e8a572fd8 100644 --- a/test/models/node_test.rb +++ b/test/models/node_test.rb @@ -68,14 +68,6 @@ class NodeTest < ActiveSupport::TestCase assert_in_delta 76.543 * OldNode::SCALE, node.longitude, 0.000001 end - # Ensure the lat/lon is formatted as a decimal e.g. not 4.0e-05 - def test_lat_lon_xml_format - node = build(:node, :latitude => 0.00004 * OldNode::SCALE, :longitude => 0.00008 * OldNode::SCALE) - - assert_match(/lat="0.0000400"/, node.to_xml.to_s) - assert_match(/lon="0.0000800"/, node.to_xml.to_s) - end - # Check that you can create a node and store it def test_create changeset = create(:changeset) diff --git a/test/test_helper.rb b/test/test_helper.rb index e66d782ff..05385b4f9 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -170,5 +170,87 @@ module ActiveSupport fill_in "password", :with => "test" click_on "Login", :match => :first end + + def xml_for_node(node) + doc = OSM::API.new.get_xml_doc + doc.root << xml_node_for_node(node) + doc + end + + def xml_node_for_node(node) + el = XML::Node.new "node" + el["id"] = node.id.to_s + + OMHelper.add_metadata_to_xml_node(el, node, {}, {}) + + if node.visible? + el["lat"] = node.lat.to_s + el["lon"] = node.lon.to_s + end + + OMHelper.add_tags_to_xml_node(el, node.node_tags) + + el + end + + def xml_for_way(way) + doc = OSM::API.new.get_xml_doc + doc.root << xml_node_for_way(way) + doc + end + + def xml_node_for_way(way) + el = XML::Node.new "way" + el["id"] = way.id.to_s + + OMHelper.add_metadata_to_xml_node(el, way, {}, {}) + + # make sure nodes are output in sequence_id order + ordered_nodes = [] + way.way_nodes.each do |nd| + ordered_nodes[nd.sequence_id] = nd.node_id.to_s if nd.node&.visible? + end + + ordered_nodes.each do |nd_id| + next unless nd_id && nd_id != "0" + + node_el = XML::Node.new "nd" + node_el["ref"] = nd_id + el << node_el + end + + OMHelper.add_tags_to_xml_node(el, way.way_tags) + + el + end + + def xml_for_relation(relation) + doc = OSM::API.new.get_xml_doc + doc.root << xml_node_for_relation(relation) + doc + end + + def xml_node_for_relation(relation) + el = XML::Node.new "relation" + el["id"] = relation.id.to_s + + OMHelper.add_metadata_to_xml_node(el, relation, {}, {}) + + relation.relation_members.each do |member| + member_el = XML::Node.new "member" + member_el["type"] = member.member_type.downcase + member_el["ref"] = member.member_id.to_s + member_el["role"] = member.member_role + el << member_el + end + + OMHelper.add_tags_to_xml_node(el, relation.relation_tags) + + el + end + + class OMHelper + extend ObjectMetadata + end end end