]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'openstreetmap/pull/1395'
authorTom Hughes <tom@compton.nu>
Wed, 21 Dec 2016 11:55:19 +0000 (11:55 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 21 Dec 2016 11:55:19 +0000 (11:55 +0000)
101 files changed:
.rubocop_todo.yml
Gemfile
Gemfile.lock
INSTALL.md
app/assets/images/tab-icon.svg [new file with mode: 0644]
app/assets/images/wikipedia.png [new file with mode: 0644]
app/assets/stylesheets/common.scss
app/controllers/application_controller.rb
app/controllers/export_controller.rb
app/controllers/redactions_controller.rb
app/controllers/site_controller.rb
app/helpers/open_graph_helper.rb
app/models/node.rb
app/models/notifier.rb
app/models/relation.rb
app/models/way.rb
app/views/changeset/list.atom.builder
app/views/diary_entry/rss.rss.builder
app/views/layouts/_head.html.erb
app/views/notes/_note.gpx.builder
app/views/notes/_note.json.jsonify
app/views/notes/_note.xml.builder
app/views/notes/index.rss.builder
app/views/trace/georss.rss.builder
app/views/user/login.html.erb
config/example.application.yml
config/initializers/abstract_adapter.rb
config/initializers/omniauth.rb
config/locales/be.yml
config/locales/ca.yml
config/locales/de.yml
config/locales/diq.yml
config/locales/en.yml
config/locales/fi.yml
config/locales/fr.yml
config/locales/ia.yml
config/locales/is.yml
config/locales/ko.yml
config/locales/nb.yml
config/locales/nl.yml
config/locales/pl.yml
config/locales/pt-BR.yml
config/locales/pt-PT.yml
config/locales/ru.yml
config/locales/sl.yml
config/locales/sq.yml
config/locales/sv.yml
config/locales/te.yml
config/locales/zh-CN.yml
config/locales/zh-TW.yml
db/migrate/20150111192335_subscribe_old_changesets.rb
db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb
lib/auth.rb
lib/password_hash.rb
script/deliver-message
test/controllers/amf_controller_test.rb
test/controllers/api_controller_test.rb
test/controllers/changeset_controller_test.rb
test/controllers/node_controller_test.rb
test/controllers/notes_controller_test.rb
test/controllers/old_node_controller_test.rb
test/controllers/old_way_controller_test.rb
test/controllers/relation_controller_test.rb
test/controllers/search_controller_test.rb
test/controllers/user_controller_test.rb
test/controllers/way_controller_test.rb
test/factories/node_tags.rb [new file with mode: 0644]
test/factories/old_node_tags.rb [new file with mode: 0644]
test/factories/old_relation_tags.rb [new file with mode: 0644]
test/factories/old_way_tags.rb [new file with mode: 0644]
test/factories/relation_tags.rb [new file with mode: 0644]
test/factories/way_tags.rb [new file with mode: 0644]
test/fixtures/current_node_tags.yml [deleted file]
test/fixtures/current_relation_tags.yml [deleted file]
test/fixtures/current_way_tags.yml [deleted file]
test/fixtures/node_tags.yml [deleted file]
test/fixtures/relation_tags.yml [deleted file]
test/fixtures/users.yml
test/fixtures/way_tags.yml [deleted file]
test/helpers/application_helper_test.rb
test/helpers/browse_helper_test.rb
test/integration/oauth_test.rb
test/integration/user_creation_test.rb
test/integration/user_login_test.rb
test/lib/bounding_box_test.rb
test/lib/locale_test.rb
test/lib/password_hash_test.rb
test/models/node_tag_test.rb
test/models/node_test.rb
test/models/old_node_tag_test.rb
test/models/old_node_test.rb
test/models/old_relation_tag_test.rb
test/models/old_relation_test.rb
test/models/old_way_tag_test.rb
test/models/old_way_test.rb
test/models/relation_tag_test.rb
test/models/relation_test.rb
test/models/user_test.rb
test/models/way_tag_test.rb
test/models/way_test.rb
test/test_helper.rb

index f1e93f25bfb4cca9988b86bdde67827752574757..a7b456aec43f5031f88cfa8d28b508aaaeeb61f9 100644 (file)
@@ -64,7 +64,7 @@ Metrics/BlockNesting:
 # Offense count: 62
 # Configuration parameters: CountComments.
 Metrics/ClassLength:
-  Max: 1659
+  Max: 1660
 
 # Offense count: 69
 Metrics/CyclomaticComplexity:
diff --git a/Gemfile b/Gemfile
index 829403819659b2ac566e29e426172690b374b480..ef93f0d8ff0960b072d87945805c46c87daecee1 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -64,6 +64,7 @@ gem "omniauth-google-oauth2", ">= 0.2.7"
 gem "omniauth-facebook"
 gem "omniauth-windowslive"
 gem "omniauth-github"
+gem "omniauth-mediawiki", ">= 0.0.3"
 
 # Markdown formatting support
 gem "redcarpet"
index ccf1438efde30a166fd7977cb305fde89441bfc9..5ad974190875fc5b7b4dd8501f43f335faf981d2 100644 (file)
@@ -43,11 +43,11 @@ GEM
       public_suffix (~> 2.0, >= 2.0.2)
     arel (6.0.3)
     ast (2.3.0)
-    autoprefixer-rails (6.5.2)
+    autoprefixer-rails (6.5.3)
       execjs
     bigdecimal (1.1.0)
     builder (3.2.2)
-    capybara (2.10.1)
+    capybara (2.10.2)
       addressable
       mime-types (>= 1.16)
       nokogiri (>= 1.3.3)
@@ -65,15 +65,15 @@ GEM
     coffee-script (2.4.1)
       coffee-script-source
       execjs
-    coffee-script-source (1.10.0)
+    coffee-script-source (1.11.1)
     colorize (0.8.1)
     composite_primary_keys (8.1.4)
       activerecord (~> 4.2.0)
     concurrent-ruby (1.0.2)
-    coveralls (0.8.15)
+    coveralls (0.8.16)
       json (>= 1.8, < 3)
       simplecov (~> 0.12.0)
-      term-ansicolor (~> 1.3)
+      term-ansicolor (~> 1.3.0)
       thor (~> 0.19.1)
       tins (>= 1.6.0, < 2)
     crack (0.4.3)
@@ -97,24 +97,24 @@ GEM
     geoip (1.6.2)
     globalid (0.3.7)
       activesupport (>= 4.1.0)
-    hashdiff (0.3.0)
+    hashdiff (0.3.1)
     hashie (3.4.6)
     htmlentities (4.3.4)
     http_accept_language (2.0.5)
     i18n (0.7.0)
     i18n-js (3.0.0.rc14)
       i18n (~> 0.6, >= 0.6.6)
-    image_optim (0.24.0)
+    image_optim (0.24.1)
       exifr (~> 1.2, >= 1.2.2)
       fspath (~> 3.0)
-      image_size (~> 1.3)
+      image_size (~> 1.5)
       in_threads (~> 1.3)
       progress (~> 3.0, >= 3.0.1)
     image_optim_rails (0.2.0)
       image_optim (~> 0.24.0)
       rails
       sprockets
-    image_size (1.4.2)
+    image_size (1.5.0)
     in_threads (1.3.1)
     jquery-rails (4.2.1)
       rails-dom-testing (>= 1, < 3)
@@ -140,10 +140,10 @@ GEM
       sprockets (>= 2, < 4)
       sprockets-rails (>= 2, < 4)
       tilt
-    libv8 (3.16.14.15)
+    libv8 (3.16.14.17)
     libxml-ruby (2.9.0)
     logstash-event (1.2.02)
-    logstasher (1.0.1)
+    logstasher (1.1.0)
       activerecord (>= 4.0)
       activesupport (>= 4.0)
       logstash-event (~> 1.2.0)
@@ -157,7 +157,7 @@ GEM
     mime-types-data (3.2016.0521)
     mimemagic (0.3.0)
     mini_portile2 (2.1.0)
-    minitest (5.9.1)
+    minitest (5.10.1)
     multi_json (1.12.1)
     multi_xml (0.5.5)
     multipart-post (2.0.0)
@@ -190,6 +190,12 @@ GEM
       multi_json (~> 1.3)
       omniauth (>= 1.1.1)
       omniauth-oauth2 (>= 1.3.1)
+    omniauth-mediawiki (0.0.3)
+      jwt (~> 1.0)
+      omniauth-oauth (~> 1.0)
+    omniauth-oauth (1.1.0)
+      oauth
+      omniauth (~> 1.0)
     omniauth-oauth2 (1.4.0)
       oauth2 (~> 1.0)
       omniauth (~> 1.2)
@@ -205,7 +211,7 @@ GEM
       cocaine (~> 0.5.5)
       mime-types
       mimemagic (= 0.3.0)
-    parser (2.3.1.4)
+    parser (2.3.3.1)
       ast (~> 2.2)
     pg (0.19.0)
     poltergeist (1.11.0)
@@ -214,10 +220,10 @@ GEM
       websocket-driver (>= 0.2.0)
     powerpack (0.1.1)
     progress (3.2.2)
-    psych (2.1.1)
+    psych (2.2.1)
     public_suffix (2.0.4)
     r2 (0.2.6)
-    rack (1.6.4)
+    rack (1.6.5)
     rack-cors (0.4.0)
     rack-openid (1.3.1)
       rack (>= 1.1.0)
@@ -258,7 +264,7 @@ GEM
     ref (2.0.0)
     request_store (1.3.1)
     rinku (2.0.2)
-    rubocop (0.45.0)
+    rubocop (0.46.0)
       parser (>= 2.3.1.1, < 3.0)
       powerpack (~> 0.1)
       rainbow (>= 1.99.1, < 3.0)
@@ -290,19 +296,19 @@ GEM
       actionpack (>= 4.0)
       activesupport (>= 4.0)
       sprockets (>= 3.0.0)
-    term-ansicolor (1.4.0)
+    term-ansicolor (1.3.2)
       tins (~> 1.0)
     therubyracer (0.12.2)
       libv8 (~> 3.16.14.0)
       ref
-    thor (0.19.1)
+    thor (0.19.4)
     thread_safe (0.3.5)
     tilt (2.0.5)
     timecop (0.8.1)
-    tins (1.12.0)
+    tins (1.13.0)
     tzinfo (1.2.2)
       thread_safe (~> 0.1)
-    uglifier (3.0.3)
+    uglifier (3.0.4)
       execjs (>= 0.3.0, < 3)
     unicode-display_width (1.1.1)
     validates_email_format_of (1.6.3)
@@ -353,6 +359,7 @@ DEPENDENCIES
   omniauth-facebook
   omniauth-github
   omniauth-google-oauth2 (>= 0.2.7)
+  omniauth-mediawiki (>= 0.0.3)
   omniauth-openid
   omniauth-windowslive
   paperclip (~> 4.0)
index 53a78384615b571e665291c01fb63bae962fda1d..129b071f1b1e47dd261ad12623c21aa3d2255c4c 100644 (file)
@@ -138,7 +138,7 @@ instructions below as appropriate.
 
 ### PostgreSQL account setup
 
-We need to create a PostgreSQL role (i.e. user account) for your current user, and it needs to be a superuser so that we can create more database.
+We need to create a PostgreSQL role (i.e. user account) for your current user, and it needs to be a superuser so that we can create more databases.
 
 ```
 sudo -u postgres -i
diff --git a/app/assets/images/tab-icon.svg b/app/assets/images/tab-icon.svg
new file mode 100644 (file)
index 0000000..5e8bb31
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+        <g id="Logo_simple" fill="black">
+            <g id="layer1" transform="translate(0.234847, 0.091766)">
+                <path d="M1.75809857,15.5864714 C1.53259286,15.5296771 1.41476714,15.4360657 0.812798571,14.8354114 C0.0965871429,14.1207686 0.0506614286,14.0509914 0.05179,13.6792257 C0.0529328571,13.2638686 -0.0724585714,13.4124171 2.21577,11.1180486 C4.52671571,8.80090286 4.40771571,8.90189143 4.82581857,8.90298 C5.01909286,8.90355143 5.06773,8.91449429 5.22358143,8.99300286 L5.40114714,9.08244857 L5.96119286,8.5224 L6.52124143,7.96235429 L6.38092714,7.74361714 C6.10788714,7.31797429 5.85054429,6.69690286 5.73492714,6.18456286 C5.40852143,4.73815714 5.76038429,3.20801714 6.68624429,2.04756857 C8.28345857,0.0456714286 11.1528186,-0.398394286 13.27489,1.02790857 C14.4393671,1.81058286 15.1962414,3.01958 15.41179,4.44129714 C15.4573557,4.74184571 15.4576157,5.45568571 15.4123614,5.77276857 C15.2546157,6.87590286 14.7850586,7.81346 13.9961871,8.60042571 C13.5897757,9.00585143 13.2639443,9.24073714 12.7466671,9.50116857 C12.1308443,9.81121714 11.6083871,9.95670571 10.8984843,10.0158286 C9.88698143,10.1000686 8.76552714,9.82031714 7.90698143,9.26958571 L7.68824429,9.12927143 L7.12819857,9.68931714 L6.56815,10.2493657 L6.65759857,10.4269286 C6.73610714,10.58278 6.74711571,10.6314171 6.74761857,10.8246943 C6.74876143,11.2423057 6.84782429,11.1252714 4.54627857,13.4239743 C2.77385857,15.1942057 2.50102143,15.4561657 2.36526714,15.5180457 C2.19138714,15.5973029 1.92182714,15.6276857 1.75818714,15.5864714 L1.75809857,15.5864714 Z M11.2712243,9.15195429 C12.5502929,8.91782286 13.6672814,8.06622571 14.2271586,6.89834 C15.11979,5.03633714 14.5194471,2.84804286 12.7986071,1.69118857 C12.3880957,1.41521714 11.81485,1.18257714 11.27685,1.07362 C10.9041357,0.998134286 10.1154929,1.00585429 9.72675286,1.08879143 C9.14647571,1.21259143 8.61371286,1.44346 8.15203571,1.77118 C7.86672714,1.97370571 7.39628429,2.44395714 7.19702143,2.72580286 C6.09283,4.28761714 6.19273,6.36339429 7.44143,7.80428857 C8.08152143,8.54289714 8.96678714,9.02773714 9.94637571,9.17618571 C10.2716957,9.22548571 10.9358843,9.21333714 11.2712243,9.15195714 L11.2712243,9.15195429 Z M8.87038714,13.8891629 C8.10495286,13.6680029 7.47133,13.47936 7.46233286,13.4699514 C7.44547571,13.4523229 8.23654429,10.6468171 8.26791,10.6130286 C8.28353857,10.5962 10.9920157,11.3547 11.1029871,11.4069886 C11.1422157,11.4254743 11.1007014,11.5927571 10.7663043,12.7595514 C10.55651,13.49186 10.3722014,14.1373486 10.35673,14.1939686 C10.3412443,14.2505914 10.3136357,14.2956486 10.2953443,14.2940943 C10.2770586,14.2926657 9.63582143,14.1103229 8.87038714,13.8891629 Z M10.7425129,14.2243971 C10.7425129,14.1901514 11.5295357,11.4412371 11.5420243,11.43186 C11.57051,11.41046 14.31823,10.6433514 14.3287386,10.65386 C14.3411671,10.6662886 13.5606443,13.4390343 13.5401471,13.4552829 C13.5261471,13.4663686 10.8885243,14.2190457 10.8042814,14.2359886 C10.77031,14.2428171 10.7425129,14.2377029 10.7425129,14.2243886 L10.7425129,14.2243971 Z M6.17704429,12.99702 C6.72003857,12.4511857 7.20394143,11.9528 7.25238429,11.8894971 C7.36159286,11.7467771 7.51339,11.4185714 7.55467,11.2359114 C7.57172714,11.1604143 7.58871857,11.00994 7.59241857,10.9015229 L7.59916143,10.7043971 L7.71662429,10.6712457 C7.78122714,10.6530171 7.83903571,10.6430457 7.84508714,10.6491029 C7.86014429,10.66416 7.07001857,13.4236343 7.04369571,13.44788 C7.03212429,13.4585371 6.61025571,13.58476 6.10621857,13.72836 L5.18979,13.9894514 L6.17705857,12.9970257 L6.17704429,12.99702 Z M11.4998186,11.0334343 C11.4942186,11.0240914 11.4770471,10.9704486 11.4616586,10.91426 L11.4336871,10.8121 L11.5342043,10.7951 C12.3954786,10.6493829 13.3179014,10.245 14.0444586,9.69462571 C14.1482557,9.61599714 14.2070786,9.58646 14.2147129,9.60913429 C14.24993,9.71374571 14.3901814,10.2192829 14.38533,10.2241314 C14.3635014,10.24596 11.5078643,11.0468829 11.4998071,11.03344 L11.4998186,11.0334343 Z M1.81592714,10.1996943 C1.78271,10.1727514 1.05799286,7.71489143 1.00331,7.44372286 C0.992367143,7.38943143 1.09760429,7.41535143 2.39921571,7.78740286 C3.76114143,8.17670571 3.80759857,8.19218571 3.82654429,8.26301714 C3.84343,8.32619429 3.83240143,8.34579143 3.74602143,8.40596857 C3.69096429,8.44432571 3.25066714,8.87132571 2.76758143,9.35486 C2.28449857,9.83839429 1.88227,10.2340114 1.87374429,10.2340114 C1.86523,10.2340114 1.83919857,10.2185543 1.81592714,10.1996943 L1.81592714,10.1996943 Z M2.34190143,7.38647714 C1.57939286,7.16728 0.953287143,6.98616 0.950555714,6.98398857 C0.941012857,6.97641714 1.75870714,4.13697714 1.77517286,4.12051143 C1.78951571,4.10616857 4.61573,4.89800571 4.64506714,4.92457429 C4.65103857,4.92997429 4.47244429,5.57706 4.24821,6.36254286 C3.87799286,7.65939714 3.83535,7.79043429 3.78439286,7.78785714 C3.75353,7.78642857 3.10440714,7.60567714 2.34190143,7.38647714 L2.34190143,7.38647714 Z M4.24206143,7.73209429 C4.24986143,7.71146571 4.37809571,7.26840286 4.52699571,6.74748286 L4.79772429,5.80035429 L4.83301571,6.00625143 C4.89416429,6.36299429 5.00259571,6.76962857 5.13113857,7.12424286 C5.19946714,7.31273714 5.25150429,7.47034286 5.24677857,7.47448286 C5.24206429,7.47862571 5.03435286,7.53969143 4.78521571,7.61019429 C4.53607857,7.6807 4.30875286,7.74540286 4.28004714,7.75398 C4.24341857,7.76492286 4.23209,7.75840857 4.24206143,7.73209429 L4.24206143,7.73209429 Z M3.19294143,4.11930571 C2.43043571,3.89996 1.79997286,3.71025429 1.79191,3.69773714 C1.76571,3.65706286 0.991552857,0.923451429 1.00299286,0.912011429 C1.01907857,0.895925714 3.76999,1.68537143 3.79624714,1.71360286 C3.82569571,1.74526571 4.61754429,4.52458857 4.59607857,4.52095429 C4.58685,4.51952571 3.95545,4.33865143 3.19294143,4.11930571 Z M4.57080143,3.01922286 C4.41709,2.48026286 4.26802429,1.95798571 4.23954429,1.85860286 L4.18776429,1.67791143 L5.27576429,1.36771429 C5.87416143,1.19710571 6.38229286,1.05058571 6.40494143,1.04211143 C6.42759857,1.03362571 6.35263286,1.13099714 6.23837,1.25846857 C5.63074143,1.93633143 5.23238143,2.66270571 4.98042143,3.55221714 C4.93345571,3.71803143 4.89502714,3.8802 4.89502714,3.91259429 C4.89502714,4.10048857 4.82103571,3.89659429 4.57080143,3.01922286 Z" id="path3940"></path>
+            </g>
+        </g>
+</svg>
\ No newline at end of file
diff --git a/app/assets/images/wikipedia.png b/app/assets/images/wikipedia.png
new file mode 100644 (file)
index 0000000..784c184
Binary files /dev/null and b/app/assets/images/wikipedia.png differ
index 2a00f1b060c0222e26a4bd77ca5e0b748abe0627..bb0e6f0d44d728b64d5d67cc4d9414d55e3d90aa 100644 (file)
@@ -1182,6 +1182,7 @@ tr.turn:hover {
       width: 50%;
       padding: 6px 10px;
       word-wrap: break-word;
+      white-space: pre-wrap;
     }
 
     .browse-tag-k {
index 0c50276b61ba040d7efb86843633f93e38a9dd31..09a35beb351f67ac3e40e4eb7caa9023fd2e2396 100644 (file)
@@ -343,7 +343,7 @@ class ApplicationController < ActionController::Base
   ##
   # wrap an api call in a timeout
   def api_call_timeout
-    OSM::Timer.timeout(API_TIMEOUT) do
+    OSM::Timer.timeout(API_TIMEOUT, Timeout::Error) do
       yield
     end
   rescue Timeout::Error
@@ -353,17 +353,13 @@ class ApplicationController < ActionController::Base
   ##
   # wrap a web page in a timeout
   def web_timeout
-    OSM::Timer.timeout(WEB_TIMEOUT) do
+    OSM::Timer.timeout(WEB_TIMEOUT, Timeout::Error) do
       yield
     end
   rescue ActionView::Template::Error => ex
     ex = ex.original_exception
 
     if ex.is_a?(ActiveRecord::StatementInvalid) && ex.message =~ /execution expired/
-      ex = Timeout::Error.new
-    end
-
-    if ex.is_a?(Timeout::Error)
       render :action => "timeout"
     else
       raise
@@ -452,6 +448,5 @@ class ApplicationController < ActionController::Base
   end
 
   # override to stop oauth plugin sending errors
-  def invalid_oauth_response
-  end
+  def invalid_oauth_response; end
 end
index bd020f29b6ea11a1b960ec5f8e71d0885a48fd4c..fa7944516620e442064b8f8d5adb118d92042761 100644 (file)
@@ -22,6 +22,5 @@ class ExportController < ApplicationController
     end
   end
 
-  def embed
-  end
+  def embed; end
 end
index 31dd7273f114d2ff217961830c7d80c29ecc41cb..129318191a65c4566ebf5f3a472c4893fc065121 100644 (file)
@@ -32,11 +32,9 @@ class RedactionsController < ApplicationController
     end
   end
 
-  def show
-  end
+  def show; end
 
-  def edit
-  end
+  def edit; end
 
   def update
     # note - don't update the user ID
index 5131629acfd57140e0c3eedf06e0d7cefc87aaaa..1a4c9f148425eef9621568d8d822fd0a49a1a916 100644 (file)
@@ -95,20 +95,15 @@ class SiteController < ApplicationController
     @locale = params[:copyright_locale] || I18n.locale
   end
 
-  def welcome
-  end
+  def welcome; end
 
-  def help
-  end
+  def help; end
 
-  def about
-  end
+  def about; end
 
-  def export
-  end
+  def export; end
 
-  def offline
-  end
+  def offline; end
 
   def preview
     render :text => RichText.new(params[:format], params[:text]).to_html
index e21a5648a7c3be9f4482855d657381215915b076..ab7e230cbec768a7745192934bc5d7ebb40965b1 100644 (file)
@@ -4,9 +4,9 @@ module OpenGraphHelper
       "og:site_name" => t("layouts.project_name.title"),
       "og:title" => [t("layouts.project_name.title"), title].compact.join(" | "),
       "og:type" => "website",
-      "og:image" => image_path("osm_logo_256.png", :host => SERVER_URL, :protocol => "http"),
-      "og:image:secure_url" => image_path("osm_logo_256.png", :host => SERVER_URL, :protocol => "https"),
-      "og:url" => url_for(:host => SERVER_URL),
+      "og:image" => image_url("osm_logo_256.png", :protocol => "http"),
+      "og:image:secure_url" => image_url("osm_logo_256.png", :protocol => "https"),
+      "og:url" => url_for(:only_path => false),
       "og:description" => t("layouts.intro_text")
     }
 
index 2a64259c10c0832d16c4ec8e2008aa7e34985947..f8559dca75d74431153342f4c4c987281a5354e8 100644 (file)
@@ -232,10 +232,14 @@ class Node < ActiveRecord::Base
 
   def save_with_history!
     t = Time.now.getutc
+
+    self.version += 1
+    self.timestamp = t
+
     Node.transaction do
-      self.version += 1
-      self.timestamp = t
-      save!
+      # clone the object before saving it so that the original is
+      # still marked as dirty if we retry the transaction
+      clone.save!
 
       # Create a NodeTag
       tags = self.tags
index a498e4edf6cd88cb45c8e0be9bc8bb4f5d3bff2d..0539bdeb72fe3963bd7f52287427246713d035f0 100644 (file)
@@ -107,7 +107,7 @@ class Notifier < ActionMailer::Base
                           :display_name => comment.user.display_name,
                           :title => "Re: #{comment.diary_entry.title}")
 
-      mail :from => from_address(comment.user.display_name, "c", comment.id, comment.digest),
+      mail :from => from_address(comment.user.display_name, "c", comment.id, comment.digest, recipient.id),
            :to => recipient.email,
            :subject => I18n.t("notifier.diary_comment_notification.subject", :user => comment.user.display_name)
     end
@@ -180,9 +180,13 @@ class Notifier < ActionMailer::Base
     end
   end
 
-  def from_address(name, type, id, digest)
+  def from_address(name, type, id, digest, user_id = nil)
     if Object.const_defined?(:MESSAGES_DOMAIN) && domain = MESSAGES_DOMAIN
-      "#{name} <#{type}-#{id}-#{digest[0, 6]}@#{domain}>"
+      if user_id
+        "#{name} <#{type}-#{id}-#{user_id}-#{digest[0, 6]}@#{domain}>"
+      else
+        "#{name} <#{type}-#{id}-#{digest[0, 6]}@#{domain}>"
+      end
     else
       EMAIL_FROM
     end
index e5e4ec894c8d699ca781e69bc6564b376d8988c5..b78c95ce4ddc9f9c0c9f99b61a6a683ed627c67c 100644 (file)
@@ -281,15 +281,19 @@ class Relation < ActiveRecord::Base
   private
 
   def save_with_history!
+    t = Time.now.getutc
+
+    self.version += 1
+    self.timestamp = t
+
     Relation.transaction do
       # have to be a little bit clever here - to detect if any tags
       # changed then we have to monitor their before and after state.
       tags_changed = false
 
-      t = Time.now.getutc
-      self.version += 1
-      self.timestamp = t
-      save!
+      # clone the object before saving it so that the original is
+      # still marked as dirty if we retry the transaction
+      clone.save!
 
       tags = self.tags.clone
       relation_tags.each do |old_tag|
index 98c4902f9e693cd2396aaf84761df00c0c3a8d83..9877b8bb8ea2b8dcde7a26c3f93b599fb29f8904 100644 (file)
@@ -255,6 +255,9 @@ class Way < ActiveRecord::Base
   def save_with_history!
     t = Time.now.getutc
 
+    self.version += 1
+    self.timestamp = t
+
     # update the bounding box, note that this has to be done both before
     # and after the save, so that nodes from both versions are included in the
     # bbox. we use a copy of the changeset so that it isn't reloaded
@@ -263,9 +266,9 @@ class Way < ActiveRecord::Base
     cs.update_bbox!(bbox) unless nodes.empty?
 
     Way.transaction do
-      self.version += 1
-      self.timestamp = t
-      save!
+      # clone the object before saving it so that the original is
+      # still marked as dirty if we retry the transaction
+      clone.save!
 
       tags = self.tags
       WayTag.delete_all(:way_id => id)
index 979a7492f08efcc1cf4f82cb4690c167dc5d6446..68b4a198505b6204af025356f8a964a538097308 100644 (file)
@@ -5,12 +5,12 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
   feed.title changeset_list_title(params, @user)
 
   feed.updated @edits.map { |e| [e.created_at, e.closed_at].max }.max
-  feed.icon "http://#{SERVER_URL}/favicon.ico"
-  feed.logo "http://#{SERVER_URL}/images/mag_map-rss2.0.png"
+  feed.icon image_url("favicon.ico")
+  feed.logo image_url("mag_map-rss2.0.png")
 
   feed.rights :type => "xhtml" do |xhtml|
     xhtml.a :href => "http://creativecommons.org/licenses/by-sa/2.0/" do |a|
-      a.img :src => "http://#{SERVER_URL}/images/cc_button.png", :alt => "CC by-sa 2.0"
+      a.img :src => image_url("cc_button.png"), :alt => "CC by-sa 2.0"
     end
   end
 
index d9cc40797eae0653c7a02b1648fd600531460dd6..6ff2ed9f363b1305440851bc3cc61ed45d696c06 100644 (file)
@@ -1,29 +1,30 @@
 xml.instruct!
 
 xml.rss("version" => "2.0",
+        "xmlns:dc" => "http://purl.org/dc/elements/1.1/",
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
   xml.channel do
     xml.title @title
     xml.description @description
-    xml.link url_for(:action => "list", :host => SERVER_URL)
+    xml.link url_for(:action => "list", :only_path => false)
     xml.image do
-      xml.url image_path("mag_map-rss2.0.png")
+      xml.url image_url("mag_map-rss2.0.png")
       xml.title @title
       xml.width "100"
       xml.height "100"
-      xml.link url_for(:action => "list", :host => SERVER_URL)
+      xml.link url_for(:action => "list", :only_path => false)
     end
 
     @entries.each do |entry|
       xml.item do
         xml.title entry.title
-        xml.link url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
-        xml.guid url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
+        xml.link url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :only_path => false)
+        xml.guid url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :only_path => false)
         xml.description entry.body.to_html
         xml.dc :creator, entry.user.display_name
         xml.pubDate entry.created_at.to_s(:rfc822)
-        xml.comments url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :anchor => "comments", :host => SERVER_URL)
+        xml.comments url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :anchor => "comments", :only_path => false)
 
         if entry.latitude && entry.longitude
           xml.geo :lat, entry.latitude.to_s
index 118100df62a178980cac212e955df1140f618196..8830a8692319bc1e11d53ee8e176c8e8a17578e1 100644 (file)
@@ -18,6 +18,7 @@
   <%= favicon_link_tag "favicon-96x96.png", :rel => "icon", :sizes => "96x96", :type => "image/png" %>
   <%= favicon_link_tag "android-chrome-192x192.png", :rel => "icon", :sizes => "192x192", :type => "image/png" %>
   <%= favicon_link_tag "favicon-16x16.png", :rel => "icon", :sizes => "16x16", :type => "image/png" %>
+  <%= tag("link", { :rel => "mask-icon", :href => asset_path("tag-icon.svg"), :color => "#7ebc6f" }) %>
   <%= tag("link", { :rel => "manifest", :href => asset_path("manifest.json") }) %>
   <%= tag("meta", { :name => "msapplication-config", :content => asset_path("browserconfig.xml") }) %>
   <%= tag("meta", { :name => "msapplication-TileColor", :content => "#00a300" }) %>
index 9d8ede249d80a711c74b39794700b5bbf30ab014..f6bb39d27dc1347883785c5a76546fa42ecb12d2 100644 (file)
@@ -6,7 +6,7 @@ xml.wpt("lon" => note.lon, "lat" => note.lat) do
     xml.cdata! render(:partial => "description", :object => note, :formats => [:html])
   end
 
-  xml.link("href" => browse_note_url(note, :host => SERVER_URL))
+  xml.link("href" => browse_note_url(note, :only_path => false))
 
   xml.extensions do
     xml.id note.id
index 74ff5ccec621da2a1d38ba0ba129ce30b4c7f43a..5e3ac518e7840990e78654089f06f6433952441f 100644 (file)
@@ -26,7 +26,7 @@ json.properties do
     if comment.author
       json.uid comment.author.id
       json.user comment.author.display_name
-      json.user_url user_url(:display_name => comment.author.display_name, :host => SERVER_URL)
+      json.user_url user_url(:display_name => comment.author.display_name, :only_path => false)
     end
 
     json.action comment.event
index fb6738aaa1c6342a150f8c69670abe0b5987f3ca..adb4e6a5233350f7cb29b477ab283ee849886b3b 100644 (file)
@@ -22,7 +22,7 @@ xml.note("lon" => note.lon, "lat" => note.lat) do
         if comment.author
           xml.uid comment.author.id
           xml.user comment.author.display_name
-          xml.user_url user_url(:display_name => comment.author.display_name, :host => SERVER_URL)
+          xml.user_url user_url(:display_name => comment.author.display_name, :only_path => false)
         end
 
         xml.action comment.event
index ecbbb73263afac0bc5c757b2101195692a9ac372..e912b99216455257bcb91cf80dfd4840cd1a8a4c 100644 (file)
@@ -1,6 +1,7 @@
 xml.instruct!
 
 xml.rss("version" => "2.0",
+        "xmlns:dc" => "http://purl.org/dc/elements/1.1/",
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
   xml.channel do
index 6d3aeebe022d9b6d32dccef09abf2a47ebf3c6a2..8470e85cbedb234fc10b1fa0b25604c1504314ce 100644 (file)
@@ -10,7 +10,7 @@ xml.rss("version" => "2.0",
     xml.link url_for(:controller => :trace, :action => :list, :only_path => false)
 
     xml.image do
-      xml.url image_path("mag_map-rss2.0.png", :host => SERVER_URL)
+      xml.url image_url("mag_map-rss2.0.png")
       xml.title t("trace.georss.title")
       xml.width 100
       xml.height 100
index 3d28a770aa303a3da94a8f1079a122146c282413..26bb8089579130ab849c3511a2021cde6e5fd946 100644 (file)
@@ -58,6 +58,9 @@
           <% if defined?(GITHUB_AUTH_ID) -%>
           <li><%= auth_button "github", "github" %></li>
           <% end -%>
+          <% if defined?(WIKIPEDIA_AUTH_ID) -%>
+          <li><%= auth_button "wikipedia", "wikipedia" %></li>
+          <% end -%>
           <li><%= auth_button "yahoo", "openid", :openid_url => "yahoo.com" %></li>
           <li><%= auth_button "wordpress", "openid", :openid_url => "wordpress.com" %></li>
           <li><%= auth_button "aol", "openid", :openid_url => "aol.com" %></li>
index b5d4db363f054d8b14af4eab88777850b2bf99d2..fd388ad88221dd202570366c14aa6cb207ccff8b 100644 (file)
@@ -107,6 +107,8 @@ defaults: &defaults
   #windowslive_auth_secret: ""
   #github_auth_id: ""
   #github_auth_secret: ""
+  #wikipedia_auth_id: ""
+  #wikipedia_auth_secret: ""
   # MapQuest authentication details
   #mapquest_key: ""
   # Mapzen authentication details
@@ -134,3 +136,5 @@ test:
   windowslive_auth_secret: "dummy"
   github_auth_id: "dummy"
   github_auth_secret: "dummy"
+  wikipedia_auth_id: "dummy"
+  wikipedia_auth_secret: "dummy"
index 89d38456745e8fa9492bc9a0800356f432cc7633..6bb5d10c01bcafcecf142d36fc1c8ce27543d5bd 100644 (file)
@@ -6,23 +6,15 @@ if defined?(ActiveRecord::ConnectionAdaptors::AbstractAdapter)
 
         alias old_log log
 
-        def log(sql, name)
-          if block_given?
-            old_log(sql, name) do
-              yield
-            end
+        def translate_exception_class_with_timeout(e, sql)
+          if e.is_a?(Timeout::Error) || e.is_a?(OSM::APITimeoutError)
+            e
           else
-            old_log(sql, name)
-          end
-        rescue ActiveRecord::StatementInvalid => ex
-          if ex.message =~ /^OSM::APITimeoutError: /
-            raise OSM::APITimeoutError.new
-          elsif ex.message =~ /^Timeout::Error: /
-            raise Timeout::Error.new("time's up!")
-          else
-            raise
+            translate_exception_class_without_timeout(e, sql)
           end
         end
+
+        alias_method_chain :translate_exception_class, :timeout
       end
     end
   end
index f7d0c5f6ac4b0d698a46ac13ea7dfd29942d5d1a..79041372185630a0f32cb7cd29d1922d387f17cb 100644 (file)
@@ -24,6 +24,7 @@ google_options = { :name => "google", :scope => "email", :access_type => "online
 facebook_options = { :name => "facebook", :scope => "email" }
 windowslive_options = { :name => "windowslive", :scope => "wl.signin,wl.emails" }
 github_options = { :name => "github", :scope => "user:email" }
+wikipedia_options = { :name => "wikipedia", :client_options => { :site => "https://commons.wikimedia.org" } }
 
 if defined?(GOOGLE_OPENID_REALM)
   google_options[:openid_realm] = GOOGLE_OPENID_REALM
@@ -35,6 +36,7 @@ Rails.application.config.middleware.use OmniAuth::Builder do
   provider :facebook, FACEBOOK_AUTH_ID, FACEBOOK_AUTH_SECRET, facebook_options if defined?(FACEBOOK_AUTH_ID)
   provider :windowslive, WINDOWSLIVE_AUTH_ID, WINDOWSLIVE_AUTH_SECRET, windowslive_options if defined?(WINDOWSLIVE_AUTH_ID)
   provider :github, GITHUB_AUTH_ID, GITHUB_AUTH_SECRET, github_options if defined?(GITHUB_AUTH_ID)
+  provider :mediawiki, WIKIPEDIA_AUTH_ID, WIKIPEDIA_AUTH_SECRET, wikipedia_options if defined?(WIKIPEDIA_AUTH_ID)
 end
 
 # Pending fix for: https://github.com/intridea/omniauth/pull/795
index b341a3b47e823a17ea4ee7aaab415e64c6d29957..f9619c73eb467bf039b25e62ba9e78e9555196b7 100644 (file)
@@ -1518,6 +1518,8 @@ be:
           private: Прыватны доступ
           destination: Мэтавы доступ
           construction: Дарогі ў стадыі будаўніцтва
+          bicycle_shop: Крама ровараў
+          bicycle_parking: Паркоўка для ровараў
           toilets: Прыбіральні
     richtext_area:
       edit: Рэдагаваць
@@ -1789,6 +1791,7 @@ be:
           alt: Увайсці праз рахунак Windows Live
         github:
           title: Уваход праз GitHub
+          alt: Увайсці праз уліковы запіс GitHub
         yahoo:
           title: Уваход праз Yahoo
           alt: Уваход праз Yahoo OpenID
@@ -1992,6 +1995,8 @@ be:
       gravatar:
         gravatar: Выкарыстоўваць Gravatar
         link text: што гэта?
+        disabled: Граватар быў адключаны.
+        enabled: Паказ вашага Граватара быў уключаны.
       new image: Дадаць выяву
       keep image: Захаваць бягучую выяву
       delete image: Выдаліць бягучую выяву
index a984943dfa36879c6abf8e58b0b2a068ab3953dd..171fd03c531284bc035a55edf54c0a565750c76a 100644 (file)
@@ -1254,16 +1254,19 @@ ca:
       de copyright i llicència</a> per a més detalls.'
     legal_title: Avisos legals
     legal_html: "Aquest lloc web i molts altres serveis relacionats són operats formalment
-      per l' \n<a href=\"http://osmfoundation.org/\">OpenStreetMap Fundació</a> (OSMF)
-      \ en nom de la comunitat.\n<br> \nSi us plau <a href=\"http://osmfoundation.org/Contact\">contacteu
+      per la \n<a href=\"http://osmfoundation.org/\">Fundació OpenStreetMap</a> (OSMF)
+      \ en nom de la comunitat. L'ús de tots els serveis operats per l'OSMF es troba
+      subjecte a les nostres  <a href=\"http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">\npolítiques
+      d'ús acceptable</a> i a les nostres <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">polítiques
+      de privadesa</a>\n<br> \n<a href=\"http://osmfoundation.org/Contact\">Contacteu
       amb l'OSMF</a> \nsi teniu qüestions sobre llicències, drets d'autor o altres
       aspectes legals."
     partners_title: Socis
   notifier:
     diary_comment_notification:
-      subject: '[OpenStreetMap] %{user}, va comentar sobre la vostra entrada del diari'
+      subject: '[OpenStreetMap] %{user} ha comentat en una entrada de diari'
       hi: Hola %{to_user},
-      header: '%{from_user} ha comentat en la vostra recent entrada del diari OpenStreetMap
+      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}
@@ -1883,9 +1886,10 @@ ca:
         de col·laboracio</a>.
       email address: 'Adreça de correu:'
       confirm email address: 'Confirmeu l''adreça de correu electrònic:'
-      not displayed publicly: No es mostrarà públicament (vegeu la <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
-        title="wiki privacy policy including section on email addresses">política
-        de privacitat</a>)
+      not displayed publicly: La vostra adreça no es mostrarà públicament (vegeu la
+        nostra <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy" title="wiki
+        privacy policy including section on email addresses">política de privadesa</a>
+        per a més informació)
       display name: 'Nom visible:'
       display name description: El nom d'usuari que es motrarà públicament. El podeu
         canviar més endavant a les preferències.
@@ -2333,7 +2337,7 @@ ca:
     key:
       title: Llegenda
       tooltip: Llegenda
-      tooltip_disabled: La llegenda només està disponible per a la capa estàndard
+      tooltip_disabled: La llegenda no és disponible per a aquesta capa
     map:
       zoom:
         in: Amplia
@@ -2407,11 +2411,23 @@ ca:
       instructions:
         continue_without_exit: Continuar a %{name}
         slight_right_without_exit: Gira lleugerament a la dreta a %{name}
+        offramp_right_without_exit: Agafeu el carril de la dreta a %{name}
+        onramp_right_without_exit: Gireu a la dreta al carril a %{name}
+        endofroad_right_without_exit: Al final de la carretera gireu a la dreta a
+          %{name}
+        merge_right_without_exit: Incorporeu-vos a la dreta a %{name}
+        fork_right_without_exit: A la cruïlla gireu a la dreta a %{name}
         turn_right_without_exit: Gira a la dreta per %{name}
         sharp_right_without_exit: Gira a la dreta a %{name}
         uturn_without_exit: Canvi de sentit a %{name}
         sharp_left_without_exit: Gira a l'esquerra a %{name}
         turn_left_without_exit: Gira a l'esquerra per %{name}
+        offramp_left_without_exit: Agafeu el carril de l'esquerra a %{name}
+        onramp_left_without_exit: Gireu a l'esquerra al carril a %{name}
+        endofroad_left_without_exit: Al final de la carretera gireu a l'esquerra a
+          %{name}
+        merge_left_without_exit: Incorporeu-vos a l'esquerra a %{name}
+        fork_left_without_exit: A la cruïlla gireu a l'esquerra a %{name}
         slight_left_without_exit: Gira lleugerament a l'esquerra a %{name}
         via_point_without_exit: (pel punt)
         follow_without_exit: Segueix %{name}
@@ -2447,7 +2463,7 @@ ca:
       description: Descripció
       heading: Introduïu informació per una nova redacció
       submit: Crea una redacció
-      title: Creant una nova redacció
+      title: Creació d’una versió nova
     show:
       description: 'Descripció:'
       heading: Mostrant la redacció "%{title}"
index 713a13c9feacaf584b926e94ef1f59c31b65345a..e2adbeefa22ffebf7ec67f411ecfeb62976782c3 100644 (file)
@@ -1079,10 +1079,12 @@ de:
         Mehr Informationen dazu, wie unsere Daten verwendet werden können und wie man auf unsere Urheberschaft hinweist,
         kann man auf unserer <a href="http://osmfoundation.org/Licence">OSMF-Lizenzseite</a> und in den
         <a href="http://wiki.openstreetmap.org/wiki/DE:Legal_FAQ">Häufigen rechtlichen Fragen (Legal FAQ)</a> nachlesen.
-      more_2_html: "Obwohl OpenStreetMap „Open Data“ ist, können wir keine \nunentgeltliche
-        Karten-API für Drittparteienentwickler bereitstellen.\nSiehe unsere <a href=\"http://wiki.openstreetmap.org/wiki/API_usage_policy\">API-Verwendungsrichtlinie</a>,\n<a
-        href=\"http://wiki.openstreetmap.org/wiki/Tile_usage_policy\">Kachelverwendungsrichtlinie</a>\nund
-        <a href=\"http://wiki.openstreetmap.org/wiki/Nominatim#Usage_Policy\">Nominatim-Verwendungsrichtlinie</a>."
+      more_2_html: |-
+        Obwohl OpenStreetMap „Open Data“ ist, können wir keine
+        unentgeltliche Karten-API für Drittparteien bereitstellen.
+        Siehe unsere <a href="http://wiki.openstreetmap.org/wiki/API_usage_policy">API-Verwendungsrichtlinie</a>,
+        die <a href="http://wiki.openstreetmap.org/wiki/Tile_usage_policy">Kachelverwendungsrichtlinie</a>
+        und die <a href="http://wiki.openstreetmap.org/wiki/Nominatim#Usage_Policy">Nominatim-Verwendungsrichtlinie</a>.
       contributors_title_html: Unsere Mitwirkenden
       contributors_intro_html: 'Unsere Mitwirkenden sind tausende einzelne Menschen.
         Wir beziehen auch offen lizenzierte Daten von nationalen Kartenagenturen und
index e0861360468bb9e9adb466af1cf12b74d5a70c3d..64deccef1284b093e45b3d721af241e06d981649 100644 (file)
@@ -1018,8 +1018,8 @@ diq:
       confirm: Tesdiq ke
   user_block:
     new:
-      title: '%{name} i bloqe vırazeno'
-      heading: '%{name} i bloqe vırazeno'
+      title: '%{name}i rê blok vırazeno.'
+      heading: '%{name}i ro blok vırazeno.'
       submit: Bloqe vırazê
       back: Bloqan pêron bıvin
     edit:
index 17d161c87226cbf53f322c845a051f4f96e09e20..a6bbf655f39d4734d32bbeab6909d9cf5e05a260 100644 (file)
@@ -1013,7 +1013,7 @@ en:
         FAQ</a>.
       more_2_html: |
         Although OpenStreetMap is open data, we cannot provide a
-        free-of-charge map API for third-party developers.
+        free-of-charge map API for third-parties.
         See our <a href="https://operations.osmfoundation.org/policies/api/">API Usage Policy</a>,
         <a href="https://operations.osmfoundation.org/policies/tiles/">Tile Usage Policy</a>
         and <a href="https://operations.osmfoundation.org/policies/nominatim/">Nominatim Usage Policy</a>.
@@ -1746,6 +1746,9 @@ en:
         github:
           title: Login with GitHub
           alt: Login with a GitHub Account
+        wikipedia:
+          title: Login with Wikipedia
+          alt: Login with a Wikipedia Account
         yahoo:
           title: Login with Yahoo
           alt: Login with a Yahoo OpenID
index f10d87f1ff21ef9e485f0250575d286181cc2100..f5f263be4034fc19253eb65699672f4881f3b9b0 100644 (file)
@@ -1199,6 +1199,7 @@ fi:
       title: IRC
       description: Interaktiivinen chat monilla eri kielillä ja monista eri aiheista.
     switch2osm:
+      title: switch2osm (Vaihda OSM:iin)
       description: Auta yrityksiä ja organisaatioita vaihtamaan OpenStreetMapiin pohjautuviin
         karttoihin ja muihin palveluihin.
     wiki:
@@ -1229,9 +1230,12 @@ fi:
       tai muuunnellaan, sitä saa levittää eteenpäin vain samalla lisenssillä. Lisätietoja
       on <a href=''%{copyright_path}''>Tekijänoikeus ja lisenssi</a> -sivulla.'
     legal_title: Lakitekninen jako
-    legal_html: |-
-      Tämä ja monet muut OSM-sivustot ovat muodollisesti <a href='http://osmfoundation.org/'>OpenStreetMap-säätiön</a> (OSMF) hallinnoimia OSM-yhteisön puolesta.
-      <a href='http://osmfoundation.org/Contact'>Ota yhteys OSMF:ään</a> lisensointi-, tekijänoikeus- ja muissa lakiteknisissä kysymyksissä.
+    legal_html: "Tämä ja monet muut OSM-sivustot ovat muodollisesti <a href='http://osmfoundation.org/'>OpenStreetMap-säätiön</a>
+      (OSMF) hallinnoimia OSM-yhteisön puolesta. Kaikkien näiden sivustojen käyttöön
+      sovelletaan <a href=\"http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">\nhyväksytyn
+      käytön käytäntöjä</a> ja <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">tietosuojakäytäntöä</a>
+      (molemmat sisällöt saatavilla vain englanniksi).\n<br> \n<a href='http://osmfoundation.org/Contact'>Ota
+      yhteys OSMF:ään</a> lisensointi-, tekijänoikeus- ja muissa lakiteknisissä kysymyksissä."
     partners_title: Kumppanit
   notifier:
     diary_comment_notification:
@@ -2338,11 +2342,21 @@ fi:
       instructions:
         continue_without_exit: Jatka tiellä %{name}
         slight_right_without_exit: Kaarra oikealle tielle %{name}
+        offramp_right_without_exit: Poistu oikealle liittymään tielle %{name}
+        onramp_right_without_exit: Käänny oikealle liittymään tielle %{name}
+        endofroad_right_without_exit: Tienpäässä käänny oikealle tielle %{name}
+        merge_right_without_exit: Liity oikealle tielle %{name}
+        fork_right_without_exit: Liittymässä ryhmity oikealle suuntaan %{name}
         turn_right_without_exit: Käänny oikealle tielle %{name}
         sharp_right_without_exit: Käänny jyrkästi oikealle tielle %{name}
         uturn_without_exit: Tee U-käännös tiellä %{name}
         sharp_left_without_exit: Käänny jyrkästi vasemmalle tielle %{name}
         turn_left_without_exit: Käänny vasemmalle tielle %{name}
+        offramp_left_without_exit: Poistu vasemmalle liittymään tielle %{name}
+        onramp_left_without_exit: Käänny vasemmalle liittymään tielle %{name}
+        endofroad_left_without_exit: Tienpäässä käänny vasemmalle tielle %{name}
+        merge_left_without_exit: Liity vasemmalle tielle %{name}
+        fork_left_without_exit: Liittymässä ryhmity vasemmalle suuntaan %{name}
         slight_left_without_exit: Kaarra vasemmalle tielle %{name}
         via_point_without_exit: (reittipiste)
         follow_without_exit: Seuraa tietä %{name}
index 09203c2ce9cc2ffab66a4e0375f79b59b92cb55d..54ce5904e5b01c8a3f92519472fcaf58a65b3686 100644 (file)
@@ -1243,7 +1243,7 @@ fr:
       description: Aide pour les entreprises et les organisations de commutation à
         OpenStreetMap, en fonction des cartes et d’autres services.
     wiki:
-      url: http://wiki.openstreetmap.org/
+      url: https://wiki.openstreetmap.org/wiki/FR:Page_principale
       title: wiki.openstreetmap.org
       description: Parcourez le wiki pour la documentation approfondie d’OSM
   about_page:
index 902695cb03622f35028ca145ff88dddcc5ed72eb..6dddc7286dd805169972b749a710dfd74ae3fc9d 100644 (file)
@@ -1086,9 +1086,9 @@ ia:
         de remotion</a> o submitte un plancto immediate usante nostre <a href="http://dmca.openstreetmap.org/">formulario
         in linea</a>.
       trademarks_title_html: <span id="trademarks"></span>Marcas commercial
-      trademarks_1_html: OpenStreetMap e le logotypo con le lupa es marcas registrate
-        del Fundation OpenStreetMap. Si vos ha questiones sur le uso de iste marcas,
-        invia los al <a href="http://wiki.osmfoundation.org/wiki/Licensing_Working_Group">gruppo
+      trademarks_1_html: OpenStreetMap, le logotypo con le lupa e "State of the Map"
+        es marcas registrate del Fundation OpenStreetMap. Si vos ha questiones sur
+        le uso de iste marcas, invia los al <a href="http://wiki.osmfoundation.org/wiki/Licensing_Working_Group">gruppo
         de labor sur licentias</a>.
   welcome_page:
     title: Benvenite!
@@ -1218,15 +1218,18 @@ ia:
     legal_title: Juridic
     legal_html: "Iste sito e multe altere servicios associate es formalmente gerite
       per le  \n<a href=\"http://osmfoundation.org/\">Fundation OpenStreetMap</a>
-      (OSMF) \nin nomine del communitate.\n<br> \n<a href=\"http://osmfoundation.org/Contact\">Contacta
+      (OSMF) \nin nomine del communitate. Le uso de tote le servicios gerite per OSMF
+      es subjecte a nostre <a href=\"http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">\npoliticas
+      de uso acceptabile</a> e a nostre <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">politica
+      de confidentialitate</a>\n<br> \n<a href=\"http://osmfoundation.org/Contact\">Contacta
       OSMF</a> \nsi vos ha questiones sur licentias, derectos de autor o altere themas
       juridic."
     partners_title: Partners
   notifier:
     diary_comment_notification:
-      subject: '[OpenStreetMap] %{user} commentava un entrata de tu diario'
+      subject: '[OpenStreetMap] %{user} commentava un entrata de diario'
       hi: Salute %{to_user},
-      header: '%{from_user} ha commentate le entrata recente de tu diario de OpenStreetMap
+      header: '%{from_user} ha commentate le entrata recente de diario OpenStreetMap
         con le subjecto %{subject}:'
       footer: Tu pote tamben leger le commento a %{readurl} e tu pote commentar a
         %{commenturl} o responder a %{replyurl}
@@ -1464,6 +1467,9 @@ ia:
           track: Pista
           bridleway: Sentiero pro cavallos
           cycleway: Via cyclabile
+          cycleway_national: Pista cyclabile national
+          cycleway_regional: Pista cyclabile regional
+          cycleway_local: Pista cyclabile local
           footway: Sentiero pro pedones
           rail: Ferrovia
           subway: Metro
@@ -1516,6 +1522,9 @@ ia:
           private: Accesso private
           destination: Traffico local
           construction: Vias in construction
+          bicycle_shop: Magazin de bicyclettas
+          bicycle_parking: Parcamento de bicyclettas
+          toilets: Toilettes
     richtext_area:
       edit: Modificar
       preview: Previsualisation
@@ -1789,6 +1798,9 @@ ia:
         windowslive:
           title: Aperir session con Windows Live
           alt: Aperir session con un conto de Windows Live
+        github:
+          title: Aperir session con GitHub
+          alt: Aperir session con un conto de GitHub
         yahoo:
           title: Aperir session con Yahoo
           alt: Aperir session con un OpenID de Yahoo
@@ -1837,9 +1849,10 @@ ia:
         de contributor</a>.
       email address: 'Adresse de e-mail:'
       confirm email address: 'Confirmar adresse de e-mail:'
-      not displayed publicly: Non monstrate publicamente (vide le <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
-        title="politica de confidentialitate del wiki includente un section super
-        adresses de e-mail">politica de confidentialitate</a>)
+      not displayed publicly: Tu adresse non es monstrate publicamente. Vide nostre
+        <a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy" title="Politica
+        de confidentialitate de OSMF includente un section sur adresses de e-mail">politica
+        de confidentialitate</a> pro plus information.
       display name: 'Nomine public:'
       display name description: Tu nomine de usator monstrate publicamente. Tu pote
         cambiar lo plus tarde in le preferentias.
@@ -1995,6 +2008,8 @@ ia:
       gravatar:
         gravatar: Usar Gravatar
         link text: que es isto?
+        disabled: Gravatar ha essite disactivate.
+        enabled: Tu Gravatar ha essite activate e essera monstrate desde ora.
       new image: Adder un imagine
       keep image: Retener le imagine actual
       delete image: Remover le imagine actual
@@ -2278,7 +2293,7 @@ ia:
     key:
       title: Legenda
       tooltip: Legenda
-      tooltip_disabled: Le legenda es disponibile solmente pro le strato Standard
+      tooltip_disabled: Le legenda non es disponibile pro iste strato
     map:
       zoom:
         in: Zoom avante
@@ -2351,11 +2366,21 @@ ia:
       instructions:
         continue_without_exit: Continuar sur %{name}
         slight_right_without_exit: Curva suave a dextra verso %{name}
+        offramp_right_without_exit: Prende le rampa a dextra verso %{name}
+        onramp_right_without_exit: Girar a dextra sur le rampa verso %{name}
+        endofroad_right_without_exit: Al fin del strata, girar a dextra verso %{name}
+        merge_right_without_exit: Junger a dextra verso %{name}
+        fork_right_without_exit: Al bifurcation, girar a dextra verso %{name}
         turn_right_without_exit: Girar a dextra verso %{name}
         sharp_right_without_exit: Curva acute a dextra verso %{name}
         uturn_without_exit: Retornar preter %{name}
         sharp_left_without_exit: Curva acute a sinistra verso %{name}
         turn_left_without_exit: Girar a sinistra verso %{name}
+        offramp_left_without_exit: Prende le rampa al sinistra verso %{name}
+        onramp_left_without_exit: Girar a sinistra sur le rampa verso %{name}
+        endofroad_left_without_exit: Al fin del strata, girar a sinistra verso %{name}
+        merge_left_without_exit: Junger a sinistra verso %{name}
+        fork_left_without_exit: Al bifurcation, girar a sinistra verso %{name}
         slight_left_without_exit: Curva suave a sinistra verso %{name}
         via_point_without_exit: (puncto intermedie)
         follow_without_exit: Sequer %{name}
index c2668f66843cc2d0ab46e1f7e24878b7d7b110a1..a8d1323d011633ea13bc6ee38c1f34970100fd66 100644 (file)
@@ -56,8 +56,8 @@ is:
       diary_entry:
         user: Notandi
         title: Fyrirsögn
-        latitude: Lengdargráða
-        longitude: Breiddargráða
+        latitude: Breiddargráða
+        longitude: Lengdargráða
         language: Tungumál
       friend:
         user: Notandi
@@ -67,9 +67,9 @@ is:
         visible: Sýnileg
         name: Nafn
         size: Stærð
-        latitude: Lengdargráða
-        longitude: Breiddargráða
-        public: Sýnileg öllum
+        latitude: Breiddargráða
+        longitude: Lengdargráða
+        public: Opinbert
         description: Lýsing
       message:
         sender: Sendandi
@@ -77,7 +77,7 @@ is:
         body: Texti
         recipient: Móttakandi
       user:
-        email: Netfang
+        email: Tölvupóstfang
         active: Virkur
         display_name: Sýnilegt nafn
         description: Lýsing
@@ -88,8 +88,15 @@ is:
     with_name_html: '%{name} (%{id})'
   editor:
     default: Sjálfgefið (núna %{name})
+    potlatch:
+      name: Potlatch 1
+      description: Potlatch 1 (ritill í vafra)
     id:
       name: iD
+      description: iD (ritill í vafra)
+    potlatch2:
+      name: Potlatch 2
+      description: Potlatch 2 (ritill í vafra)
     remote:
       name: Fjarstýring
       description: Fjarstýring (JOSM eða Merkaartor)
@@ -97,6 +104,12 @@ is:
     created: Búið til
     closed: Lokað
     created_html: Bjó til <abbr title='%{title}'>%{time} síðan</abbr>
+    closed_html: Lokað <abbr title='%{title}'> fyrir %{time} síðan</abbr>
+    created_by_html: Búið til <abbr title='%{title}'> fyrir %{time} síðan</abbr> af
+      %{user}
+    deleted_by_html: Eytt <abbr title='%{title}'> fyrir %{time} síðan</abbr> af %{user}
+    edited_by_html: Breytt <abbr title='%{title}'> fyrir %{time} síðan</abbr> af %{user}
+    closed_by_html: Lokað <abbr title='%{title}'> fyrir %{time} síðan</abbr> af %{user}
     version: Útgáfa
     in_changeset: Breytingasett
     anonymous: nafnlaus
@@ -116,6 +129,9 @@ is:
       relation: Vensl (%{count})
       relation_paginated: Vensl (%{x}-%{y} af %{count})
       comment: Athugasemdir (%{count})
+      hidden_commented_by: Falin umsögn frá %{user} <abbr title='%{exact_time}'>%{when}
+        síðan</abbr>
+      commented_by: Umsögn frá %{user} <abbr title='%{exact_time}'>%{when} síðan</abbr>
       changesetxml: Breytingasetts XML sniði
       osmchangexml: osmChange XML sniði
       feed:
@@ -131,6 +147,8 @@ is:
       history_title: 'Saga leiðar: %{name}'
       nodes: Hnútar
     relation:
+      title: 'Vensl: %{name}'
+      history_title: 'Ferill vensla: %{name}'
       members: Meðlimir
     relation_member:
       entry: '%{type} %{name}'
@@ -165,6 +183,9 @@ is:
         way: leið
         relation: venslum
     start_rjs:
+      feature_warning: Hleð inn %{num_features} fitjum (kortahlutum), sem gæti valdið
+        því að vafrinn þinn verði hægur eða svari ekki. Ertu viss um að þú viljir
+        birta þessi gögn?
       load_data: Hlaða inn gögnum
       loading: Hleð inn gögnum...
     tag_details:
@@ -180,13 +201,18 @@ is:
       new_note: Nýr minnispunktur
       description: Lýsing
       hidden_title: 'Falinn minnispunktur #%{note_name}'
+    query:
+      title: Rannsaka fitjur
+      introduction: Smelltu á kortið til að finna fitjur í nágrenninu.
+      nearby: Nálægar fitjur
+      enclosing: Umlykjandi fitjur
   changeset:
     changeset_paging_nav:
       showing_page: Síða %{page}
       next: Næsta »
-      previous: « Fyrri
+      previous: « Fyrra
     changeset:
-      anonymous: Ónafngreindur
+      anonymous: Nafnlaus
       no_edits: (engar breytingar)
       view_changeset_details: Skoða breytingasett
     changesets:
@@ -235,7 +261,7 @@ is:
       user_title: Blogg %{user}
       leave_a_comment: Bæta við athugasemd
       login_to_leave_a_comment: '%{login_link} til að bæta við athugasemd'
-      login: Innskráðu þig
+      login: Innskrá
       save_button: Vista
     no_such_entry:
       title: Þessi bloggfærsla er ekki til
@@ -300,14 +326,14 @@ is:
         other:
           title: Aðrar heimildir
       options: Valmöguleikar
-      format: 'Snið:'
-      scale: Skali
+      format: Snið
+      scale: Kvarði
       max: hámark
-      image_size: 'Stærð myndar:'
+      image_size: Stærð myndar
       zoom: Aðdráttur
       add_marker: Bæta punkti á kortið
-      latitude: 'Lengdargráða:'
-      longitude: 'Breiddargráða:'
+      latitude: 'Lengd:'
+      longitude: 'Breidd:'
       output: Úttak
       paste_html: Notaðu þennan HTML kóða til að bæta kortinu á vefsíðu
       export_button: Niðurhala
@@ -342,6 +368,7 @@ is:
           taxiway: Akstursbraut
           terminal: Flugstöð
         amenity:
+          animal_shelter: Dýraheimili
           arts_centre: Listamiðstöð
           atm: Hraðbanki
           bank: Banki
@@ -355,13 +382,13 @@ is:
           brothel: Hóruhús
           bureau_de_change: Gjaldeyrisskipti
           bus_station: Strætóstöð
-          cafe: Kaffihús
+          cafe: Kaffihús
           car_rental: Bílaleigan
           car_wash: Bílaþvottastöðin
           casino: Spilavíti
           charging_station: Hleðslustöð
           childcare: Barnagæsla
-          cinema: Kvikmyndarhús
+          cinema: Kvikmyndahús
           clinic: Heilsugæsla
           clock: Klukka
           college: Framhaldskóli
@@ -432,6 +459,7 @@ is:
           village_hall: Hreppsskrifstofa
           waste_basket: Ruslafata
           waste_disposal: Ruslsöfnun
+          youth_centre: Ungmennamiðstöð
         boundary:
           administrative: Stjórnsýslumörk
           census: Manntalsmörk
@@ -452,7 +480,7 @@ is:
           gardener: Garðyrkjumaður
           painter: Málari
           photographer: Ljósmyndari
-          plumber: Pípari
+          plumber: Pípulagningamaður
           shoemaker: Skósmiður
           tailor: Klæðskeri
           "yes": Handverkshús
@@ -477,6 +505,8 @@ is:
           platform: Kerfishögun
           primary: Stofnvegur
           primary_link: Stofnvegur
+          proposed: Tillaga um veglagningu
+          raceway: Keppnisbraut
           residential: Íbúðagata
           rest_area: Hvíldarsvæði
           road: Vegur
@@ -487,6 +517,7 @@ is:
           steps: Tröppur
           street_lamp: Ljósastaur
           track: Spor
+          traffic_signals: Umferðarljós
           trail: Slóði
           trunk: Stofnbraut
           trunk_link: Stofnbraut
@@ -506,9 +537,11 @@ is:
           heritage: Sögulegur staður
           house: Hús
           icon: Táknmynd
+          manor: Herragarður
           memorial: Minnismerki
           mine: Náma
           monument: Minnisvarði
+          roman_road: Rómverskur vegur
           ruins: Rústir
           stone: Steinn
           tomb: Gröf
@@ -518,6 +551,7 @@ is:
           "yes": Tenging
         landuse:
           allotments: Úthlutuð svæði
+          basin: Lægð
           cemetery: Grafreitur
           commercial: Verslunarsvæði
           farm: Býli
@@ -535,13 +569,16 @@ is:
           railway: Lestarteinar
           reservoir: Uppistöðulón
           residential: Íbúðasvæði
+          vineyard: Vínekra
+          "yes": Landnotkun
         leisure:
           bird_hide: Fuglaskoðunarhús
           club: Klúbbur
+          common: Almenningur
           fitness_centre: Líkamsræktarstöð
           garden: Garður
           golf_course: Golfvöllur
-          horse_riding: Festaferðir
+          horse_riding: Hestaferðir
           ice_rink: Skautahöll
           marina: Bátalægi
           miniature_golf: Mínigolf
@@ -588,6 +625,7 @@ is:
           land: Land
           marsh: Votlendi
           moor: Mýri
+          mud: Leir
           peak: Tindur
           point: Nes
           reef: Sker
@@ -595,6 +633,7 @@ is:
           rock: Rokk
           saddle: Söðull
           sand: Sandur
+          scrub: Kjarr
           spring: Lind
           stone: Steinn
           strait: Sund
@@ -603,14 +642,15 @@ is:
           volcano: Eldfjall
           water: Vatn
           wetland: Votlendi
-          wood: Náttúrulegur skógur
+          wood: Skógur
         office:
           accountant: Bókari
           administrative: Stjórnsýsla
           architect: Arkítektar
           company: Fyrirtæki
           estate_agent: Fasteignasali
-          travel_agent: Ferðaskrifstofan
+          lawyer: Lögmaður
+          travel_agent: Ferðaskrifstofa
           "yes": Skrifstofa
         place:
           allotments: Úthlutuð svæði
@@ -618,8 +658,8 @@ is:
           airport: Flugvöllur
           city: Borg
           country: Land
-          county: Landið
-          farm: Sveitabærinn
+          county: Sýsla
+          farm: Býli
           hamlet: Byggðakjarni
           house: Hús
           houses: Hús
@@ -650,6 +690,7 @@ is:
           books: Bókabúð
           butcher: Slátrari
           car: Bílavöruverslun
+          car_parts: Bílapartar
           carpet: Teppabúð
           clothes: Fataverslun
           computer: Tölvuverslun
@@ -662,7 +703,7 @@ is:
           florist: Blómabúð
           food: Matvöruverslun
           funeral_directors: Útfararstjóri
-          furniture: Húsgagnaverslun
+          furniture: Húsgögn
           gallery: Gallerí
           garden_centre: Garðyrkja
           general: Almenn verslun
@@ -733,7 +774,7 @@ is:
           rapids: Flúðir
           river: Á
           stream: Lækur
-          waterfall: Fossinn
+          waterfall: Foss
           "yes": Siglingaleið
       admin_levels:
         level5: Héraðsmörk
@@ -764,7 +805,7 @@ is:
     start_mapping: Hefja kortlagningu
     sign_up_tooltip: Stofnaðu aðgang til að geta breytt kortinu
     edit: Breyta
-    history: Breytingaskrá
+    history: Sagnfræði
     export: Niðurhala
     data: Gögn
     export_data: Flytja út gögn
@@ -948,7 +989,7 @@ is:
       outbox: úthólf
       from: Frá
       subject: Titill
-      date: Dagsetning
+      date: Döðlur
       no_messages_yet: Þú hefur ekki fengið nein skilboð. Hví ekki að hafa samband
         við einhverja %{people_mapping_nearby_link}?
       people_mapping_nearby: nálæga notendur
@@ -1038,7 +1079,7 @@ is:
       to: Til
       where_am_i: Hvar er ég?
       where_am_i_title: Notar leitarvélina til að lýsa núverandi staðsetningu á kortinu
-      submit_text: Ok
+      submit_text: Fara
     key:
       table:
         entry:
@@ -1058,7 +1099,7 @@ is:
           - Smálest
           - sporvagn
           cable:
-          - Skíðalyfta
+          - Kláflyfta
           - stólalyfta
           runway:
           - Flugbraut
@@ -1100,7 +1141,7 @@ is:
           - tindur
           tunnel: Umkringt punktalínum = göng
           bridge: Umkringt svartri línu = brú
-          private: Í einkaeigu
+          private: Einkaaðgangur
           destination: Umferð leyfileg á ákveðinn áfangastað
           construction: Vegir í byggingu
     richtext_area:
@@ -1327,6 +1368,8 @@ is:
         windowslive:
           title: Skrá inn með Windows Live
           alt: Skrá inn með Windows Live aðgangi
+        github:
+          title: Skrá inn með GitHub
         yahoo:
           title: Skrá inn með Yahoo
           alt: Skrá inn með Yahoo OpenID-aðgangi
@@ -1733,6 +1776,8 @@ is:
       createnote_tooltip: Bæta við minnispunkti á kortið
       map_notes_zoom_in_tooltip: Renndu að til að sjá minnispunkta á kortinu
       map_data_zoom_in_tooltip: Renndu að til að skoða gögn kortsins
+      queryfeature_tooltip: Rannsaka fitjur
+      queryfeature_disabled_tooltip: Renndu inn til að rannsaka fitjur
     changesets:
       show:
         comment: Athugasemd
@@ -1767,6 +1812,7 @@ is:
       node: Hnútur
       way: Leið
       relation: Vensl
+      nothing_found: Engar fitjur fundust
   redaction:
     edit:
       description: Lýsing
index 274889adb50bd18f28a2d7cad8a2382210e13ea5..c2f7ad2eee5d2b46e07a15d0f33430e0d3ef918d 100644 (file)
@@ -969,7 +969,7 @@ ko:
     copyright: 저작권
     community: 커뮤니티
     community_blogs: 커뮤니티 블로그
-    community_blogs_title: OpenStreetMap 커뮤니티의 구성원에서의 블로그
+    community_blogs_title: OpenStreetMap 커뮤니티의 원에서의 블로그
     foundation: 재단
     foundation_title: OpenStreetMap 재단
     make_a_donation:
@@ -1443,6 +1443,7 @@ ko:
           bridleway: 승마로
           cycleway: 자전거 도로
           cycleway_national: 국립 자전거 도로
+          cycleway_regional: 지역별 자전거 도로
           cycleway_local: 일반 자전거 도로
           footway: 보도
           rail: 철도
@@ -1803,8 +1804,9 @@ ko:
         약관</a>에 동의해야합니다.
       email address: '이메일 주소:'
       confirm email address: '이메일 주소 확인:'
-      not displayed publicly: 공개적으로 표시되지 않습니다 (<a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
-        title="이메일 주소 부분을 포함한 위키 개인정보 정책">개인 정보 정책</a>을 참조하세요)
+      not displayed publicly: 당신의 주소는 공개되지 않습니다. 자세한 내용은 <a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy"
+        title="OSMF privacy policy including section on email addresses">개인정보 정책</a>을
+        참조하시기 바랍니다.
       display name: '표시 이름:'
       display name description: 공개적으로 표시되는 사용자 이름입니다. 나중에 환경 설정에서 바꿀 수 있습니다.
       external auth: '제3자 인증:'
@@ -1956,7 +1958,7 @@ ko:
       latitude: '위도:'
       longitude: '경도:'
       update home location on click: 지도에서 클릭하면 집 위치로 업데이트할까요?
-      save changes button: 변경 사항 저장
+      save changes button: 변경사항 저장
       make edits public button: 내 편집을 공개하기
       return to profile: 프로필로 돌아가기
       flash update success confirm needed: 사용자 정보를 성공적으로 업데이트했습니다. 새 이메일 주소를 확인하기
@@ -2277,16 +2279,20 @@ ko:
       instructions:
         continue_without_exit: '%{name}(으)로 계속 가세요'
         slight_right_without_exit: '%{name}을(를) 따라 오른쪽으로 완만하게 도세요'
+        offramp_right_without_exit: '%{name}을(를) 향해 램프로 우회전'
         onramp_right_without_exit: 경사로에서 %{name}(으)로 우회전
         endofroad_right_without_exit: 길 끝쪽에서 %{name}(으)로 우회전
+        merge_right_without_exit: '%{name}을(를) 따라 우회전'
         fork_right_without_exit: 분기점에서 %{name}(으)로 우회전
         turn_right_without_exit: '%{name}을(를) 따라 오른쪽으로 도세요'
         sharp_right_without_exit: '%{name}을(를) 따라 오른쪽으로 꺾으세요'
         uturn_without_exit: '%{name}을(를) 따라 유턴하세요'
         sharp_left_without_exit: '%{name}을(를) 따라 왼쪽으로 꺾으세요'
         turn_left_without_exit: '%{name}을(를) 따라 왼쪽으로 도세요'
+        offramp_left_without_exit: '%{name}을(를) 향해 램프로 좌회전'
         onramp_left_without_exit: 경사로에서 %{name}(으)로 좌회전
         endofroad_left_without_exit: 길 끝쪽에서 %{name}(으)로 좌회전
+        merge_left_without_exit: '%{name}을(를) 따라 좌회전'
         fork_left_without_exit: 분기점에서 %{name}(으)로 좌회전
         slight_left_without_exit: '%{name}을(를) 따라 왼쪽으로 완만하게 도세요'
         via_point_without_exit: (점을 통해)
index b44d0897b8ae58c64c6526535ed063bb03b58cf6..2dd25cbe358129c0403d60a195fe81e9222855d7 100644 (file)
@@ -1226,16 +1226,16 @@ nb:
       og lisenssiden</a> for detaljer.'
     legal_title: Juridisk
     legal_html: |-
-      Dette nettstedet og mange tilknyttede tjenester drives formelt av <a href='http://osmfoundation.org/'>OpenStreetMap Foundation</a> (OSMF) på vegne av fellesskapet.
+      Dette nettstedet og mange tilknyttede tjenester drives formelt av <a href='http://osmfoundation.org/'>OpenStreetMap Foundation</a> (OSMF) på vegne av fellesskapet. Bruken av alle OSMF-drevne tjenester er gjenstand for vår <a href="http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy">politikk for akseptabel bruk</a> og vår <a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy">personvernspolitikk</a>
       <br>
       Vennligst <a href='http://osmfoundation.org/Contact'>kontakt OSMF</a> om du har spørsmål knyttet til lisensiering, opphavsrett eller andre juridiske spørsmål.
     partners_title: Partnere
   notifier:
     diary_comment_notification:
-      subject: '[OpenStreetMap] %{user} kommenterte et innlegg i dagboka di'
+      subject: '[OpenStreetMap] %{user} kommenterte et dagbokinnlegg'
       hi: Hei %{to_user},
-      header: '%{from_user} har kommentert på ditt siste OpenStreetMap-dagbokinnlegg
-        med emnet %{subject}:'
+      header: '%{from_user} har kommentert på OpenStreetMap-dagbokinnlegget med emnet
+        %{subject}:'
       footer: Du kan også lese kommentaren på %{readurl} og du kan kommentere på %{commenturl}
         eller svare på %{replyurl}
     message_notification:
@@ -1840,9 +1840,9 @@ nb:
       license_agreement: Når du bekrefter kontoen din må du godkjenne <a href="http://www.osmfoundation.org/wiki/License/Contributor_Terms">bidragsytervilkårene</a>.
       email address: 'E-postadresse:'
       confirm email address: 'Bekreft e-postadresse:'
-      not displayed publicly: Ikke vist offentlig (se <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
+      not displayed publicly: Adressa di vises ikke offentlig, se <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
         title="Personvernpolitikk for Wiki-en inklusiv avsnitt om e-postadressser">vår
-        personvernpolitikk</a>)
+        personvernpolitikk</a> for mer informasjon.
       display name: 'Visningsnavn:'
       display name description: Ditt offentlig fremviste brukernavn. Du kan endre
         dette senere i innstillingene.
@@ -2273,7 +2273,7 @@ nb:
     key:
       title: Kartsymbol
       tooltip: Kartsymbol
-      tooltip_disabled: Kartnøkkel bare tilgjengelig for standardlag
+      tooltip_disabled: Kartnøkkel ikke tilgjengelig for dette laget
     map:
       zoom:
         in: Forstørr utvalg
index 2b46b49a907cdae2553925d82faa62075f126af5..6058a632523b602ed9bf4a5ed8fb6ba46681ffb2 100644 (file)
@@ -753,7 +753,7 @@ nl:
           volcano: Vulkaan
           water: Water
           wetland: Moeras
-          wood: Bos
+          wood: Bomen
         office:
           accountant: Boekhouder
           administrative: Administratie
@@ -1266,15 +1266,18 @@ nl:
     legal_title: Juridisch
     legal_html: "Deze site en tal van andere diensten worden formeel beheerd door
       \n<a href=\"http://osmfoundation.org/\">OpenStreetMap Foundation</a> (OSMF)
-      \nnamens de gemeenschap.\n<br> \n<a href=\"http://osmfoundation.org/Contact\">Neem
-      contact op met de OSMF</a> \nals u vragen of problemen hebt in verband met licenties,
-      auteursrechten of andere juridische zaken."
+      \nnamens de gemeenschap. Het gebruik van alle door OSMF aangeboden diensten
+      is onderworpen\naan ons <a href=\"http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">\nBeleid
+      voor aanvaardbaar gebruik</a> en ons <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">Privacybeleid</a>.\n<br>
+      \n<a href=\"http://osmfoundation.org/Contact\">Neem contact op met de OSMF</a>
+      \nals u vragen of problemen hebt in verband met licenties, auteursrechten of
+      andere juridische zaken."
     partners_title: Partners
   notifier:
     diary_comment_notification:
       subject: '[OpenStreetMap] %{user} heeft een reactie bij uw dagboek geplaatst'
       hi: Hallo %{to_user},
-      header: '%{from_user} heeft een reactie geplaatst bij uw recente OpenStreetMap-dagboekbericht
+      header: '%{from_user} heeft een reactie geplaatst bij uw OpenStreetMap-dagboekbericht
         met het onderwerp %{subject}:'
       footer: U kunt de reactie ook lezen op %{readurl} en u kunt zelf ook reageren
         op %{commenturl} of antwoorden op %{replyurl}
@@ -1514,11 +1517,11 @@ nl:
           track: Spoor
           bridleway: Ruiterpad
           cycleway: Fietspad
-          cycleway_national: Nationale fietsweg
-          cycleway_regional: Regionale fietsweg
-          cycleway_local: Lokaal fietspad
-          footway: Voetpad
-          rail: Spoor
+          cycleway_national: Nationale fietsroute
+          cycleway_regional: Regionale fietsroute
+          cycleway_local: Lokale fietsroute
+          footway: Wandelpad of voetpad
+          rail: Spoorweg
           subway: Metro
           tram:
           - Licht spoor
@@ -1534,16 +1537,16 @@ nl:
           - terminal
           admin: Bestuurlijke grens
           forest: Bos
-          wood: Bos
+          wood: Bomen
           golf: Golfbaan
           park: Park
           resident: Bewoond gebied
           common:
-          - Algemeen
+          - Gemene grond
           - weide
           retail: Winkelgebied
           industrial: Industriegebied
-          commercial: Winkelgebied
+          commercial: Commercieel gebied
           heathland: Heide
           lake:
           - Meer
@@ -1884,7 +1887,7 @@ nl:
       no_auto_account_create: Helaas is het niet mogelijk om automatisch een gebruiker
         voor u aan te maken.
       contact_webmaster: Neem contact op met de <a href="%{webmaster}">webmaster</a>
-        om een gebruiker te laten maken. We proberen uw aanvraag dan zo snel mogelijk
+        om een account te laten maken. We proberen uw aanvraag dan zo snel mogelijk
         af te handelen.
       about:
         header: Open en te bewerken
@@ -1896,8 +1899,9 @@ nl:
         voor bijdragen</a>.
       email address: 'E-mailadres:'
       confirm email address: 'E-mailadres bevestigen:'
-      not displayed publicly: Niet openbaar gemaakt. Zie <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
-        title="wiki privacyovereenkomst met een sectie over e-mailadressen">Privacyovereenkomst</a>.
+      not displayed publicly: Uw adres wordt niet openbaar gemaakt, zie ons <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
+        title="OSMF privacybeleid met een paragraaf over e-mailadressen">Privacybeleid</a>
+        voor meer informatie.
       display name: 'Weergavenaam:'
       display name description: Uw openbare gebruikersnaam. U kunt deze later in uw
         voorkeuren wijzigen.
@@ -2088,7 +2092,7 @@ nl:
         opnieuw laten verzenden</a>.
     confirm_resend:
       success: Er is ter bevestiging een e-mail verstuurd naar %{email} en als u uw
-        gebruiker hebt bevestigd, kunt u gaan mappen.<br /><br />Als u een spamfilter
+        account hebt bevestigd, kunt u gaan mappen.<br /><br />Als u een spamfilter
         gebruikt die per e-mail een bevestiging stuurt, zorg er dan voor dat u %{sender}
         toestaat. Dit systeem stuurt geen antwoord op bevestigingsverzoeken.
       failure: De gebruiker %{name} is niet gevonden.
@@ -2336,7 +2340,7 @@ nl:
     key:
       title: Legenda
       tooltip: Legenda
-      tooltip_disabled: Legenda is alleen beschikbaar voor standaardlaag
+      tooltip_disabled: Legenda is niet beschikbaar voor deze laag
     map:
       zoom:
         in: Inzoomen
@@ -2412,9 +2416,9 @@ nl:
         slight_right_without_exit: Flauwe bocht naar rechts naar %{name}
         offramp_right_without_exit: Neem de oprit aan de rechterkant naar %{name}
         onramp_right_without_exit: Sla rechtsaf op de oprit naar %{name}
-        endofroad_right_without_exit: Sla op het einde van de weg rechtsaf naar %{name}
+        endofroad_right_without_exit: Sla rechtsaf aan het einde van de weg naar %{name}
         merge_right_without_exit: Voeg rechts in naar %{name}
-        fork_right_without_exit: Sla bij de splitsing rechtsaf naar %{name}
+        fork_right_without_exit: Sla rechtsaf bij de splitsing naar %{name}
         turn_right_without_exit: Sla rechtsaf naar %{name}
         sharp_right_without_exit: Scherp rechtsaf naar %{name}
         uturn_without_exit: U-bocht langs %{name}
@@ -2422,9 +2426,9 @@ nl:
         turn_left_without_exit: Sla linksaf naar %{name}
         offramp_left_without_exit: Neem de oprit aan de linkerkant naar %{name}
         onramp_left_without_exit: Sla linksaf op de oprit naar %{name}
-        endofroad_left_without_exit: Sla op het einde van de weg linksaf naar %{name}
+        endofroad_left_without_exit: Sla linksaf bij het einde van de weg naar %{name}
         merge_left_without_exit: Voeg links in naar %{name}
-        fork_left_without_exit: Sla bij de splitsing linksaf naar %{name}
+        fork_left_without_exit: Sla linksaf bij de splitsing naar %{name}
         slight_left_without_exit: Flauwe bocht naar links naar %{name}
         via_point_without_exit: (via punt)
         follow_without_exit: Volg %{name}
index 806b72c9cb411fc4289368977ae73acd055a0476..7f3ac029426936a56ef1510a419dc7efc71eb96a 100644 (file)
@@ -133,7 +133,7 @@ pl:
       name: Potlatch 2
       description: Potlatch 2 (w przeglądarce)
     remote:
-      name: Zewnętrzny edytor
+      name: Zdalny program
       description: Zdalny program (JOSM lub Merkaartor)
   browse:
     created: Utworzone
@@ -2310,7 +2310,7 @@ pl:
   javascripts:
     close: Zamknij
     share:
-      title: Udostępnij
+      title: Udostępnianie
       cancel: Anuluj
       image: Obraz
       link: Odnośnik lub HTML
@@ -2344,9 +2344,9 @@ pl:
         popup: Jesteś w promieniu {distance} {unit} od tego punktu
       base:
         standard: Podstawowa
-        cycle_map: Mapa rowerowa
-        transport_map: Transport publiczny
-        hot: Pomoc humanitarna
+        cycle_map: Rowerowa
+        transport_map: Transportu publicznego
+        hot: Pomocy humanitarnej
       layers:
         header: Warstwy mapy
         notes: Uwagi
index 32ec470d5ca080d43c5ff3db29bcb10dd4b0624d..e80f8969533191192248278b9fd9bbd1411f49c5 100644 (file)
@@ -1151,7 +1151,7 @@ pt-BR:
         como o nome de um restaurante ou o limite de velocidade de uma rodovia.
     rules:
       title: Regras!
-      paragraph_1_html: O OpenStreetMap tem poucas regras formas mas espera que todos
+      paragraph_1_html: O OpenStreetMap tem poucas regras formais mas espera que todos
         os participantes contribuam e se comuniquem com a comunidade. Se estiver pensando
         em atividades que não sejam editar manualmente, lei a e siga as orientações
         em <a href='http://wiki.openstreetmap.org/wiki/Pt:Import/Guidelines'>Importações</a>
index 16dd0fc3ccb0bd140188130ad6fca1c0a42cc162..8aaf8bc13fb907032396fafbc6539fb41d92b991 100644 (file)
@@ -1239,16 +1239,19 @@ pt-PT:
     legal_title: Termos legais
     legal_html: "Este site e outros serviços relacionados são formalmente geridos
       pela  \n<a href='http://osmfoundation.org/'>OpenStreetMap Foundation</a> (OSMF)
-      \nem nome da comunidade.\n<br> \nPor favor <a href='http://osmfoundation.org/Contact'>contacte
-      a OSMF</a> \nse tiver questões sobre a licença, direitos de autor, questões
-      legais ou problemas."
+      \nem nome da comunidade. A utilização de todos os serviços operados pela OSMF
+      está sujeita às nossas normas de <a href=\"http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">Utilização
+      Aceitável</a> e de <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">Privacidade</a>\n<br>
+      \nPor favor <a href='http://osmfoundation.org/Contact'>contacte a OSMF</a> \nse
+      tiver questões relacionadas com licenças, direitos de autor, questões legais
+      ou problemas."
     partners_title: Parceiros
   notifier:
     diary_comment_notification:
-      subject: '[OpenStreetMap] %{user} comentou numa entrada do seu diário'
+      subject: '[OpenStreetMap] %{user} comentou uma entrada de diário'
       hi: Olá %{to_user},
-      header: '%{from_user} comentou na sua entrada recente do diário no OpenStreetMap
-        com o assunto %{subject}:'
+      header: '%{from_user} comentou a entrada do diário OpenStreetMap com o assunto
+        %{subject}:'
       footer: Também pode ler o comentário em %{readurl} e comentar em %{commenturl}
         ou responder em %{replyurl}
     message_notification:
@@ -1959,16 +1962,16 @@ pt-PT:
         revoke:
           administrator: Retirar acesso de administrador
           moderator: Retirar acesso de moderador
-      block_history: bloqueios recebidos
-      moderator_history: bloqueios feitos
+      block_history: Bloqueios ativos
+      moderator_history: Bloqueios feitos
       comments: Comentários
-      create_block: bloquear este utilizador
-      activate_user: ativar este utilizador
-      deactivate_user: desativar este utilizador
+      create_block: Bloquear este utilizador
+      activate_user: Ativar este utilizador
+      deactivate_user: Desativar este utilizador
       confirm_user: Confirmar esse utilizador
-      hide_user: ocultar este utilizador
-      unhide_user: descobrir este utilizador
-      delete_user: eliminar este utilizador
+      hide_user: Ocultar este utilizador
+      unhide_user: Desocultar este utilizador
+      delete_user: Eliminar este utilizador
       confirm: Confirmar
       friends_changesets: alterações dos amigos
       friends_diaries: ver as entradas em diários dos amigos
@@ -2309,7 +2312,7 @@ pt-PT:
     key:
       title: Legenda do mapa
       tooltip: Legenda do mapa
-      tooltip_disabled: Legenda do Mapa disponível apenas no Mapa Padrão
+      tooltip_disabled: Legenda do Mapa indisponível para esta camada
     map:
       zoom:
         in: Aproximar
index da17a474f7ca4c39ded3d13679c252f195f92ce1..e1826e75ed97f688c3b585f58e7812f8c738b301 100644 (file)
@@ -2363,7 +2363,7 @@ ru:
     key:
       title: Легенда карты
       tooltip: Условные знаки
-      tooltip_disabled: Ð\9aлÑ\8eÑ\87евÑ\8bе ÐºÐ°Ñ\80Ñ\82Ñ\8b не доступны для этого слоя
+      tooltip_disabled: Ð£Ñ\81ловнÑ\8bе Ð·Ð½Ð°ÐºÐ¸ не доступны для этого слоя
     map:
       zoom:
         in: Приблизить
@@ -2414,8 +2414,8 @@ ru:
         hide: Скрыть
         resolve: Обработать
         reactivate: Переоткрыть
-        comment_and_resolve: Ð\9fÑ\80окомменÑ\82иÑ\80овать и обработать
-        comment: Ð\9fÑ\80окомменÑ\82иÑ\80овать
+        comment_and_resolve: Ð\9eÑ\82веÑ\82ить и обработать
+        comment: Ð\9eÑ\82веÑ\82ить
     edit_help: Передвиньте карту и увеличьте место, которые вы хотите править, затем
       кликните здесь.
     directions:
index 0dd9afa504da132c621b821b53d5de08a7f8aa53..ea25dd56cbb090bc21dcf7642799e166893d7ad0 100644 (file)
@@ -164,12 +164,13 @@ sl:
       entry: Zveza %{relation_name}
       entry_role: Zveza %{relation_name} (kot %{relation_role})
     not_found:
-      sorry: 'Oprostite, %{type} #%{id} ni mogoče najti.'
+      sorry: 'Žal %{type} #%{id} ni mogoče najti.'
       type:
         node: vozlišče
         way: pot
         relation: zveza
         changeset: Paket sprememb
+        note: opomba
     timeout:
       sorry: Oprostite, podatki za %{type} z ID-jem %{id} se predolgo prenašajo.
       type:
@@ -177,6 +178,7 @@ sl:
         way: pot
         relation: zveza
         changeset: Paket sprememb
+        note: opomba
     redacted:
       redaction: Redakcija %{id}
       message_html: Verzija %{version} te %{type} ne more biti prikazana, ker je bila
@@ -239,12 +241,19 @@ sl:
       title_user: Paketi sprememb uporabnika %{user}
       title_friend: Paket sprememb vaših prijateljev
       title_nearby: Paketi sprememb bližnjih uporabnikov
-      empty: Ni najdenih množic sprememb.
-      empty_area: Na tem področju ni množic sprememb.
+      empty: Ni najdenih paketov sprememb.
+      empty_area: Na tem področju ni paketov sprememb.
+      empty_user: Ni paketov sprememb tega uporabnika.
+      no_more: Ni najdenih več paketov sprememb.
+      no_more_area: Ni več paketov sprememb na tem področju.
+      no_more_user: Ni več paketov sprememb tega uporabnika.
       load_more: Naloži več
     timeout:
       sorry: Žal je seznam zahtevanih sprememb predolg za prenos.
     rss:
+      title_all: Razprava o paketu sprememb OpenStreetMap
+      title_particular: 'Razprava o paketu sprememb OpenStreetMap #%{changeset_id}'
+      comment: 'Nov komentar o paketu sprememb #%{changeset_id} uporabnika %{author}'
       commented_at_html: Posodobljeno %{when} nazaj
       commented_at_by_html: Posodobil %{user} %{when} nazaj
       full: Celoten pogovor
@@ -346,6 +355,10 @@ sl:
         planet:
           title: Planet OSM
           description: Redno posodabljane kopije celotne podatkovne zbirke OpenStreetMap
+        overpass:
+          title: Overpass API
+          description: Prenesi to območje iz zrcalnega strežnika podatkovne zbirke
+            OpenStreetMap
         geofabrik:
           title: Prenosi Geofabrik
           description: Redno posodabljani izvlečki celin, držav in izbranih mest
@@ -422,7 +435,7 @@ sl:
           cinema: Kinematograf
           clinic: Klinika
           clock: Ura
-          college: Srednja šola
+          college: Fakulteta
           community_centre: Center skupnosti
           courthouse: Sodišče
           crematorium: Krematorij
@@ -454,12 +467,12 @@ sl:
           motorcycle_parking: Parkirišče motornih koles
           nightclub: Nočni klub
           nursery: Vrtec
-          nursing_home: Dom za ostarele
+          nursing_home: Dom za starejše
           office: Pisarne
           parking: Parkirišče
           parking_entrance: Vhod v parkirišče
           pharmacy: Lekarna
-          place_of_worship: Cerkev
+          place_of_worship: Mesto za čaščenje
           police: Policija
           post_box: Poštni nabiralnik
           post_office: Pošta
@@ -493,7 +506,7 @@ sl:
           waste_basket: Koš za odpadke
           youth_centre: Mladinski center
         boundary:
-          administrative: Upravne meje
+          administrative: Upravna meja
           census: Popisna meja
           national_park: Nacionalni Park
           protected_area: Zavarovano območje
@@ -525,7 +538,7 @@ sl:
           bridleway: Jahalna pot
           bus_guideway: Turistični avtobus
           bus_stop: Avtobusna postaja
-          construction: Autocesta v izgradnji
+          construction: Cesta v izgradnji
           cycleway: Kolesarska steza
           elevator: Dvigalo
           emergency_access_point: Dostop za interventna vozila
@@ -604,7 +617,7 @@ sl:
           garages: Garaže
           grass: Travnik
           greenfield: Pripravljeno za gradbišče
-          industrial: Industrijska cona
+          industrial: Industrijsko podočje
           landfill: Smetišče
           meadow: Travnik
           military: Vojaško območje
@@ -676,7 +689,7 @@ sl:
           island: Otok
           land: Otok
           marsh: Močvirje
-          moor: Močvirje
+          moor: Pušča
           mud: Blato
           peak: Vrh
           point: Točka
@@ -697,7 +710,7 @@ sl:
           wetland: Mokrišče
           wood: Pragozd
         office:
-          accountant: Računovodja
+          accountant: Računovodstvo
           administrative: Administracija
           architect: Arhitekt
           company: Podjetje
@@ -724,7 +737,7 @@ sl:
           islet: Otoček
           isolated_dwelling: Osamljena hiša
           locality: Krajevno ime
-          moor: Muring
+          moor: Pušča
           municipality: Občina
           neighbourhood: Mestna četrt
           postcode: Poštna številka
@@ -769,7 +782,7 @@ sl:
           bakery: Pekarna
           beauty: Salon lepote
           beverages: Trgovina pijač
-          bicycle: Trgovina koles
+          bicycle: Kolesarska trgovina
           books: Knjigarna
           boutique: Butik
           butcher: Mesar
@@ -777,20 +790,20 @@ sl:
           car_parts: Avtomobilski deli
           car_repair: Avtoservis
           carpet: Prodajalna preprog
-          charity: Dobrodelni trgovina
+          charity: Trgovina za dobrodelne namene
           chemist: Kemična trgovina
           clothes: Trgovina z oblekami
           computer: Računalniška trgovina
-          confectionery: Trgovina sladkarij
+          confectionery: Slaščičarna
           convenience: Minimarket
           copyshop: Kopirnica
-          cosmetics: Drogerija
+          cosmetics: Trgovina s kozmetiko
           deli: Delikatesna trgovina
           department_store: Trgovska hiša
           discount: Outlet
           doityourself: Orodjarna
           dry_cleaning: Čistilnica
-          electronics: Elektronska trgovina
+          electronics: Trgovina z elektroniko
           estate_agent: Nepremičninska agencija
           farm: Kmečka trgovina
           fashion: Modna trgovina
@@ -820,7 +833,7 @@ sl:
           newsagent: Trafika
           optician: Optik
           organic: Trgovina z ekološko hrano
-          outdoor: Trgovina na prostem
+          outdoor: Trgovina za dejavnosti na prostem
           pet: Trgovina za male živali
           pharmacy: Lekarna
           photo: Fotograf
@@ -846,7 +859,7 @@ sl:
           cabin: Nočitev
           camp_site: Kamp
           caravan_site: Kamp
-          chalet: Apartma
+          chalet: Počitniška hišica
           gallery: Galerija
           guest_house: Penzion
           hostel: Hostel
@@ -870,8 +883,8 @@ sl:
           ditch: Jarek
           dock: Dok
           drain: Jarek
-          lock: Zapornica
-          lock_gate: Velika zapornica
+          lock: Velika zapornica
+          lock_gate: Zapornica
           mooring: Sidrišče
           rapids: Brzice
           river: Reka
@@ -912,7 +925,7 @@ sl:
     sign_up_tooltip: Ustvarite si nov uporabniški račun za urejanje
     edit: Uredi
     history: Zgodovina
-    export: Izvoz
+    export: Izvozi
     data: Podatki
     export_data: Izvoz podatkov
     gps_traces: Sledi GPS
@@ -942,7 +955,7 @@ sl:
     community_blogs: Blogi skupnosti
     community_blogs_title: Blogi članov skupnosti OpenStreetMap
     foundation: Fundacija
-    foundation_title: OpenStreetMap Fubdacija
+    foundation_title: Fundacija OpenStreetMap
     make_a_donation:
       title: Podprite OpenStreetMap z denarnim prispevkom
       text: Prispevajte finančna sredstva
@@ -1314,7 +1327,7 @@ sl:
           - Travniki
           - travnik
           retail: Trgovsko območje
-          industrial: Industrijsko območje
+          industrial: Industrijsko področje
           commercial: Poslovno območje
           heathland: Grmičevje
           lake:
@@ -1341,6 +1354,9 @@ sl:
           private: Zasebni dostop
           destination: Dovoljeno za dostavo
           construction: Ceste v gradnji
+          bicycle_shop: Kolesarska trgovina
+          bicycle_parking: Parkirišče za kolesa
+          toilets: Stranišče
     richtext_area:
       edit: Uredi
       preview: Predogled
@@ -1838,7 +1854,7 @@ sl:
         pošte pred sprejemom sporočil neznanih pošiljateljev zahteva potrditev, vas
         prosimo, da pošiljatelja %{sender} uvrstite na seznam dovoljenih pošiljateljev.
         Sistem pač ne zmore dovolj inteligentno odgovarjati na vse take zahtevke.
-      failure: Ne najdem uporabnika %{name}.
+      failure: Uporabnika %{name} ni bilo mogoče najti.
     confirm_email:
       heading: Potrdite spremembo naslova e-pošte
       press confirm button: Za potrditev spremembe vašega naslova elektronske pošte
@@ -1874,7 +1890,7 @@ sl:
       summary_no_ip: '%{name} ustvarjen dne %{date}'
       confirm: Potrdi izbrane uporabnike
       hide: Skrij izbrane uporabnike
-      empty: Ne najdem nobenega uporabnika
+      empty: Nobenega uporabnika ni bilo mogoče najti
     suspended:
       title: Račun zaklenjen
       heading: Račun zaklenjen
@@ -1913,7 +1929,7 @@ sl:
       non_moderator_update: Morate biti moderator da ustvarite ali popravite blokado.
       non_moderator_revoke: Morate biti moderator da prekličete blokado.
     not_found:
-      sorry: Žal blokade uporabnika z ID %{id} ni bilo mogoče najti.
+      sorry: Žal blokade uporabnika z ID-jem %{id} ni bilo mogoče najti.
       back: Nazaj na kazalo
     new:
       title: Ustvarjanje blokade za %{name}
@@ -2088,10 +2104,11 @@ sl:
       edit_tooltip: Urejanje zemljevida
       edit_disabled_tooltip: Povečajte za urejanje zemljevida
       createnote_tooltip: Dodaj opombo na zemljevid
-      createnote_disabled_tooltip: Povečaj za dodati opombo na zemljevid
-      map_notes_zoom_in_tooltip: Povečaj za prikaz opomb zemljevida
-      map_data_zoom_in_tooltip: Povečaj za prikaz podatkov zemljevida
+      createnote_disabled_tooltip: Povečajte za dodajanje opomb na zemljevid
+      map_notes_zoom_in_tooltip: Povečajte za prikaz opomb zemljevida
+      map_data_zoom_in_tooltip: Povečajte za prikaz podatkov zemljevida
       queryfeature_tooltip: Poišči značilnosti
+      queryfeature_disabled_tooltip: Povečajte za iskanje značilnosti
     changesets:
       show:
         comment: Komentiraj
@@ -2141,6 +2158,7 @@ sl:
       node: Vozlišče
       way: Pot
       relation: Zveza
+      nothing_found: Značilnosti ni bilo mogoče najti
   redaction:
     edit:
       description: Opis
index f73c985aa13a41665b3b03a63ba030fd0b1ab8b2..dcc6e827b21e3b5092da622c2d69c6e7f878a599 100644 (file)
@@ -782,19 +782,24 @@ sq:
           disused_station: Stacion hekurudhor jashtë përdorimi
           funicular: Linjë teleferiku
           halt: Stacion hekerudhor
+          historic_station: Stacion hekurudhor historik
           junction: Nyje hekurudhore
           level_crossing: Kryqzim hekurudhor
           light_rail: Hekurudhë e lehtë
+          miniature: Hekurudhudhë në miniaturë
           monorail: Hekurudhë me një shinë
+          narrow_gauge: Ngushticë hekurudhe
           platform: Platformë hekurudhore
           preserved: Hekurudhë muze
           proposed: Hekurudhë e planifikuar
+          spur: Hekurudhë
           stop: Stacion hekurudhor
           subway: Metro
           subway_entrance: Hyrje metroje
         shop:
           bakery: Furrë buke
           butcher: Mishtore
+          car: Sallon automobilash
           car_parts: Autopjesë
           car_repair: Autoservis
           carpet: Dyqan qilimash
@@ -930,15 +935,18 @@ sq:
     legal_babble:
       title_html: Të drejtat autoriale dhe licensa
       intro_1_html: |-
-        OpenStreetMap is <i>open data</i>, licensed under the <a
+        OpenStreetMap<sup><a href="#trademarks">&reg;</a></sup> përmban <i>të dhëna të hapura</i>, të licencuara nën <a
         href="http://opendatacommons.org/licenses/odbl/">Open Data
-        Commons Open Database License</a> (ODbL).
-      intro_2_html: "  Ju jeni të lirë të kopjoni, shpërndani, transmetoni dhe adoptoni
-        hartat\n  dhe të dhënat tona, duke pasur parasysh citimin e OpenStreetMap
-        dhe \n  kontribuuesve të saj. Nëse ndryshoni apo ndërtoni mbi hartat apo të
-        dhënat tona, ju\n  mund të shpërndani rezultatet nën licencën e njëjtë. Licenca
-        e\n  e plotë <a\n  href=\"http://creativecommons.org/licenses/by-sa/2.0/legalcode\">legal\n
+        Commons Open Database License</a> (ODbL) by the  <a
+        href="http://osmfoundation.org/">OpenStreetMap Foundation</a> (OSMF).
+      intro_2_html: "Ju jeni të lirë të kopjoni, shpërndani, transmetoni dhe adoptoni
+        dhe të dhënat tona, \nduke pasur parasysh citimin e OpenStreetMap dhe kontribuuesve
+        të saj. Nëse ndryshoni apo ndërtoni mbi hartat apo të dhënat tona, ju\nmund
+        të shpërndani rezultatet nën licencën e njëjtë. Licenca e plotë <a\n  href=\"http://creativecommons.org/licenses/by-sa/2.0/legalcode\">legal\n
         \ code</a> shpjegon të drejtat dhe përgjegjësitë tuaja."
+      intro_3_html: |-
+        Hartografimi i pjesëve tona, dhe dokumantacioni ynë, janë të licencuara nën licensë të <a href="http://creativecommons.org/licenses/by-sa/2.0/">Creative
+        Commons Attribution-ShareAlike 2.0</a>(CC BY-SA).
       credit_title_html: Si të citoni OpenStreetMap
       credit_1_html: Ne kërkojmë që ju të përdorni kreditet e &ldquo;&copy; OpenStreetMap
         contributors&rdquo;.
@@ -984,6 +992,16 @@ sq:
     title: Mirësevjen
     whats_on_the_map:
       title: Çfarë ka në hartë?
+    basic_terms:
+      title: Termat bazë për hartografim
+      paragraph_1_html: OpenStreetMap ka disa shprehje në zhargonin e vet. Këtu janë
+        disa fjalë kyçe mund të jenë të dobishme.
+      editor_html: Një <strong>redaktor</strong> është një program apo faqe të cilën
+        mund ta përdorni për ta redaktuar hartën.
+      node_html: Një <strong>nyje</strong> është një pikë në hartë, si një restorant
+        i vetëm ose një pemë.
+      way_html: Një <strong>rrugë</strong> është një linjë apo fushë, si një rrugë,
+        lumë, liqen apo ndërtesë.
     rules:
       title: Rregullat!
     start_mapping: Fillo hartografimin
@@ -991,10 +1009,21 @@ sq:
       title: Nuk ke kohë për të redaktuar? Shto një shënim!
   help_page:
     title: Merr ndihmë
+    welcome:
+      url: Mirësevjen
+      title: Mirësevjen në OSM
     beginners_guide:
       url: http://wiki.openstreetmap.org/wiki/Sq:Beginners%27_guide
+      title: Udhëzues për fillestarë.
+      description: Një udhëzues për fillestarë që mirëmbahet nga komuniteti.
+    help:
+      url: https://help.openstreetmap.org/
+      title: help.openstreetmap.org
     forums:
       title: Forumet
+  about_page:
+    next: Tjetra
+    copyright_html: <span>&copy;</span>OpenStreetMap<br>kontribuesit
   notifier:
     diary_comment_notification:
       hi: Përshëndetje %{to_user},
@@ -1024,6 +1053,8 @@ sq:
       greeting: Përshëndetje,
     changeset_comment_notification:
       greeting: Përshëndetje,
+      commented:
+        partial_changeset_without_comment: pa koment
   message:
     inbox:
       title: Kutia mbërritëse
index 7f1ac3311b7f4e2bb8ff0c4b0b36e1013569e2ba..f9ef716a11bc853e4fa4e3d8ba7e43091b622791 100644 (file)
@@ -1261,9 +1261,12 @@ sv:
     legal_title: Juridik
     legal_html: "Denna sida och många andra liknande tjänster drivs formellt av \n<a
       href=\"http://osmfoundation.org/\">OpenStreetMap Foundation</a> (OSMF) \npå
-      gemenskapens vägnar.\n<br> \nVänligen <a href=\"http://osmfoundation.org/Contact\">kontakta
-      OSMF</a> \nom du har frågor eller funderingar om licenser, upphovsrätt eller
-      andra rättsliga frågor."
+      gemenskapens vägnar. Användning av alla OSMF-opererade tjänster är föremål\nför
+      våra <a href=\"http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">\npolicyer
+      för acceptabel användning</a> och vår <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">integritetspolicy</a>\n<br>
+      \nVänligen <a href=\"http://osmfoundation.org/Contact\">kontakta OSMF</a> \nom
+      du har frågor eller funderingar om licenser, upphovsrätt eller andra rättsliga
+      frågor."
     partners_title: Partners
   notifier:
     diary_comment_notification:
@@ -1691,7 +1694,7 @@ sv:
       title: OpenStreetMap GPS-spår
     description:
       description_with_count:
-        one: GPX-fil med %{count} punkter från %{user}
+        one: GPX-fil med %{count} punkt från %{user}
         other: GPX-fil med %{count} punkter från %{user}
       description_without_count: GPX-fil från %{user}
   application:
@@ -1880,8 +1883,9 @@ sv:
       license_agreement: När du bekräftar ditt konto måste du samtycka till <a href="http://www.osmfoundation.org/wiki/License/Contributor_Terms">bidragsgivarvillkoren</a>.
       email address: 'E-postadress:'
       confirm email address: 'Bekräfta e-postadress:'
-      not displayed publicly: Visas inte offentligt (se <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
-        title="wikins integritetspolicy (inkluderar avsnitt om e-postadresser)">integritetspolicyn</a>)
+      not displayed publicly: Din adress visas inte offentligt, se vår <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
+        title="OSMF-integritetspolicy som inkluderar avsnitt om e-postadresser">integritetspolicy</a>
+        för mer information
       display name: 'Visat namn:'
       display name description: Ditt offentligt visade användarnamn. Du kan ändra
         detta senare i inställningarna.
index 9a4cb23c3aca513c8d8db5f75a6f9eaa75822770..01b6842765044a6f9ed39de7a65fcd0efbceee0f 100644 (file)
@@ -16,6 +16,7 @@ te:
   activerecord:
     models:
       acl: అనుమతి నియంత్రణ జాబితా
+      changeset: మార్పుల సమితి
       country: దేశం
       diary_comment: డైరీ వ్యాఖ్య
       diary_entry: దినచర్య పద్దు
@@ -90,7 +91,10 @@ te:
       relation: సంబంధాలు (%{count})
       relation_paginated: '%{count} లో %{x}-%{y} యొక్క సంబంధాలు'
       comment: వ్యాఖ్యలు (%{count})
+      commented_by: '%{user} నుండి వ్యాఖ్య <abbr title=''%{exact_time}''>%{when} క్రితం</abbr>'
       discussion: చర్చ
+    node:
+      title: 'బిందువు: %{name}'
     relation:
       title: 'సంబంధం: %{name}'
       history_title: 'సంబంధపు చరిత్ర: %{name}'
@@ -124,7 +128,7 @@ te:
       new_note: కొత్త గమనిక
       description: వివరణ
     query:
-      nearby: daggarlo unna lakshanalu
+      nearby: దగ్గర్లోని విశేషాలు
   changeset:
     changeset_paging_nav:
       showing_page: పేజీ %{page}
@@ -147,9 +151,11 @@ te:
   diary_entry:
     new:
       title: కొత్త దినచర్య పద్దు
+      publish_button: ప్రచురించు
     list:
       title: వాడుకరుల డైరీలు
       title_friends: స్నేహితుల దినచర్యలు
+      title_nearby: చుట్టుపక్కల వాడుకరుల డైరీలు
       user_title: '%{user} యొక్క దినచర్య'
       in_language_title: '%{language}లో ఉన్న డైరీ పద్దులు'
       new: కొత్త దినచర్య పద్దు
@@ -158,7 +164,7 @@ te:
       older_entries: పాత పద్దులు
       newer_entries: కొత్త పద్దులు
     edit:
-      title: dairy lo unna entry ni marchu
+      title: డైరీ పద్దును మార్చు
       subject: 'విషయం:'
       body: 'వివరణ:'
       language: 'భాష:'
@@ -281,6 +287,7 @@ te:
           marketplace: సంత
           nursery: పిల్లల బడి
           office: కార్యాలయం
+          parking: పార్కింగు
           pharmacy: మందుల దుకాణం
           place_of_worship: పూజా స్థలం
           police: పోలీసు
@@ -306,7 +313,7 @@ te:
         building:
           "yes": భవనం
         craft:
-          painter: chitrakarudu
+          painter: పెయింటర్
           photographer: చాయాగ్రాహకుడు
           tailor: దర్జీ
         highway:
@@ -323,6 +330,7 @@ te:
           secondary_link: ద్వితీయ శ్రేణి రహదారి
           steps: మెట్లు
           street_lamp: వీధి దీపం
+          "yes": దారి
         historic:
           battlefield: యుద్ధరంగం
           boundary_stone: సరిహద్దు రాయి
@@ -339,6 +347,8 @@ te:
           ruins: శిథిలాలు
           tomb: సమాధి
           tower: గోపురం
+        junction:
+          "yes": కూడలి
         landuse:
           cemetery: శ్మశానం
           commercial: వాణిజ్య ప్రదేశం
@@ -359,6 +369,7 @@ te:
           reservoir: జలాశయం
           reservoir_watershed: జలాశయం
           residential: నివాస ప్రాంతం
+          "yes": భూఉపయోగం
         leisure:
           beach_resort: బీచి రిసార్టు
           bird_hide: పక్షులకు ఆవాసం
@@ -419,6 +430,7 @@ te:
           toys: బొమ్మల అంగడి
           "yes": దుకాణం
         tourism:
+          apartment: అపార్టుమెంట్
           hotel: హోటెల్
           information: సమాచారం
           museum: ప్రదర్శన శాల
@@ -503,6 +515,10 @@ te:
     local_knowledge_title: స్థానిక పరిజ్ఞానం
     partners_title: భాగస్వాములు
   notifier:
+    diary_comment_notification:
+      hi: హలో %{to_user},
+    message_notification:
+      hi: హలో %{to_user},
     gpx_notification:
       with_description: వివరణతో
     signup_confirm:
@@ -583,6 +599,7 @@ te:
           building: ప్రముఖ కట్టడము
           station: రైల్వే స్టేషన్
           construction: నిర్మాణంలో ఉన్న రహదార్లు
+          toilets: మరుగుదొడ్లు
     richtext_area:
       edit: మార్చు
       preview: మునుజూపు
@@ -667,9 +684,9 @@ te:
       title: నమోదవ్వండి
       email address: 'ఈమెయిలు చిరునామా:'
       confirm email address: 'ఈమెయిలు చిరునామాని నిర్ధారించండి:'
-      not displayed publicly: à°¬à°¹à°¿à°°à°\82à°\97à°\82à°\97à°¾ à°\9aà±\82పిà°\82à°\9aబడదà±\81 (<a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
-        title="wiki privacy policy including section on email addresses">గోప్యతా విధానాన్ని</a>
-        à°\9aà±\82à°¡à°\82à°¡à°¿)
+      not displayed publicly: à°®à±\80 à°\9aà°¿à°°à±\81నామా à°¬à°¹à°¿à°°à°\82à°\97à°\82à°\97à°¾ à°\9aà±\82పబడదà±\81, à°®à°°à°¿à°\82à°¤ à°¸à°®à°¾à°\9aారà°\82 à°\95à±\8bà°¸à°\82 à°®à°¾
+        <a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy" title="OSMF గోప్యతా
+        à°µà°¿à°§à°¾à°¨à°\82, à°\88à°®à±\86యిలà±\81 à°\9aà°¿à°°à±\81నామాల à°µà°¿à°­à°¾à°\97à°\82 à°\95à±\82à°¡à°¾ à°\89à°\82ది">à°\97à±\8bà°ªà±\8dయతా à°µà°¿à°§à°¾à°¨à°¾à°¨à±\8dని</a> à°\9aà±\82à°¡à°\82à°¡à°¿
       display name: 'చూపించే పేరు:'
       password: 'సంకేతపదం:'
       confirm password: 'సంకేతపదాన్ని నిర్ధారించండి:'
@@ -731,8 +748,10 @@ te:
       new email address: 'కొత్త ఈమెయిల్ చిరునామా:'
       email never displayed publicly: (బహిరంగంగా ఎన్నటికీ చూపించబడదు)
       openid:
+        link: https://wiki.openstreetmap.org/wiki/OpenID
         link text: ఇది ఏమిటి?
       public editing:
+        enabled link: https://wiki.openstreetmap.org/wiki/Anonymous_edits
         enabled link text: ఇది ఏమిటి?
         disabled link text: నేను ఎందుకు మార్చలేను?
       contributor terms:
@@ -845,6 +864,7 @@ te:
       layers:
         notes: పటపు గమనికలు
         data: పటం భోగట్టా
+      copyright: © <a href='%{copyright_url}'>ఓపెన్‌స్ట్రీట్‌మాప్ తోడ్పాటుదార్లు</a>
       donate_link_text: <a class='donate-attr' href='%{donate_url}'>విరాళం ఇవ్వండి</a>
     changesets:
       show:
@@ -854,6 +874,11 @@ te:
         hide: దాచు
         comment_and_resolve: వ్యాఖ్యానించి పరిష్కరించండి
         comment: వ్యాఖ్యానించండి
+    directions:
+      distance: దూరం
+      time: సమయం
+    query:
+      relation: సంబంధం
   redaction:
     edit:
       description: వివరణ
index 70398557b64b1f2d8a4e1848d9c162b6c8307b36..51a3ceb5fb1877fb18e8a292d82c3aebff58a9c3 100644 (file)
@@ -1018,7 +1018,7 @@ zh-CN:
         请在<a
         href="http://osmfoundation.org/Licence">OSMF许可协议页面</a>和<a
         href="http://wiki.openstreetmap.org/wiki/Legal_FAQ">法律常见问题</a>阅读更多关于使用我们的数据,以及如何表明我们是作者的信息。
-      more_2_html: 尽管 OpenStreetMap 开放数据,但是我们无法为第三方开发人员提供免费的地图 API。详见我们的 <a href="http://wiki.openstreetmap.org/wiki/API_usage_policy">API使用政策</a>、<a
+      more_2_html: 尽管 OpenStreetMap 开放数据,但是我们无法为第三方提供免费的地图 API。详见我们的 <a href="http://wiki.openstreetmap.org/wiki/API_usage_policy">API使用政策</a>、<a
         href="http://wiki.openstreetmap.org/wiki/Zh-hans:Tile_usage_policy">地图图块使用政策</a>及<a
         href="http://wiki.openstreetmap.org/wiki/Zh-hans:Nominatim#使用政策">名称服务使用政策</a>。
       contributors_title_html: 我们的贡献者
index 579d419a280e80e278abc538992f83977b68b428..3529d2b7c332e180f1e7e39b5f7af82b28f67c42 100644 (file)
@@ -337,7 +337,7 @@ zh-TW:
         description: OpenStreetMap 使用者最近的日記項目
     comments:
       has_commented_on: '%{display_name} 在以下的日記項目發表了評論'
-      post: 發表
+      post: 貼文
       when: 於
       comment: 評論
       ago: '%{ago} 前'
@@ -1009,7 +1009,7 @@ zh-TW:
         在<a
         href="http://osmfoundation.org/Licence">OSMF 授權條款頁面</a>與<a
         href="http://wiki.openstreetmap.org/wiki/Zh-hant:Legal_FAQ">法律上的常見問題</a>中,可閱讀更多關於使用我們的資料,以及如何標明我們是作者的資料。
-      more_2_html: 雖然 OpenStreetMap 是開放資料,但我們無法為第三方開發人員提供免費的地圖 API。詳見我們的<a href="http://wiki.openstreetmap.org/wiki/API_usage_policy">API
+      more_2_html: 雖然 OpenStreetMap 是開放資料,但我們無法為第三方提供免費的地圖 API。詳見我們的<a href="http://wiki.openstreetmap.org/wiki/API_usage_policy">API
         使用政策</a>、<a href="http://wiki.openstreetmap.org/wiki/Tile_usage_policy">地圖影像塊使用政策</a>及<a
         href="http://wiki.openstreetmap.org/wiki/Zh-hant:Nominatim#使用政策">Nominatim
         服務使用政策</a>。
index cd0938318d7b83a4eca608abe36f2728520b4d50..cca8293f55ef9e34f5fa7ebebf5cd7f9609d5060 100644 (file)
@@ -5,6 +5,5 @@ class SubscribeOldChangesets < ActiveRecord::Migration
     end
   end
 
-  def down
-  end
+  def down; end
 end
index 2dfbbf2c8c84360ca428d2f3e4a11493ed41e778..3fcbdf5fb3e9a8477645d2a4d3fce67bd8e8561e 100644 (file)
@@ -5,6 +5,5 @@ class SubscribeAuthorsToDiaryEntries < ActiveRecord::Migration
     end
   end
 
-  def down
-  end
+  def down; end
 end
index 16102ed203fa1c0d15dd0a9940c8decf5b4516b0..434994329d7b62a435335dbbeb6da5c3489ee4b5 100644 (file)
@@ -4,5 +4,6 @@ module Auth
     providers["Facebook"] = "facebook" if defined?(FACEBOOK_AUTH_ID)
     providers["Windows Live"] = "windowslive" if defined?(WINDOWSLIVE_AUTH_ID)
     providers["GitHub"] = "github" if defined?(GITHUB_AUTH_ID)
+    providers["Wikipedia"] = "wikipedia" if defined?(WIKIPEDIA_AUTH_ID)
   end.freeze
 end
index 4faac4da858ac2c7fbcd997cb91d9a0079b7ed92..c65df2c4fd7fc070496cf8dac2c5851e3e12f25a 100644 (file)
@@ -6,7 +6,7 @@ require "digest/md5"
 module PasswordHash
   SALT_BYTE_SIZE = 32
   HASH_BYTE_SIZE = 32
-  PBKDF2_ITERATIONS = 1000
+  PBKDF2_ITERATIONS = 10000
   DIGEST_ALGORITHM = "sha512".freeze
 
   def self.create(password)
index 04dcb881bc0699b3b948a9119b53d567565ecd6a..c15d365962e45124e6a7148c51f89dc6a22c6e88 100755 (executable)
@@ -2,23 +2,25 @@
 
 require File.dirname(__FILE__) + "/../config/environment"
 
-exit 0 unless recipient = ARGV[0].match(/^([cm])-(\d+)-(.*)$/)
-
-if recipient[1] == "c"
-  comment = DiaryComment.find(recipient[2])
+if recipient = ARGV[0].match(/^c-(\d+)-(\d+)-(.*)$/)
+  comment = DiaryComment.find(recipient[1])
   digest = comment.digest
-  date = diary_comment.created_at
-  from = comment.diary_entry.user
+  date = comment.created_at
+  from = User.find(recipient[2])
   to = comment.user
-else
-  message = Message.find(recipient[2])
+  token = recipient[3]
+elsif recipient = ARGV[0].match(/^m-(\d+)-(.*)$/)
+  message = Message.find(recipient[1])
   digest = message.digest
   date = message.sent_on
   from = message.recipient
   to = message.sender
+  token = recipient[2]
+else
+  exit 0
 end
 
-exit 0 unless recipient[3] == digest[0, 6]
+exit 0 unless token == digest[0, 6]
 exit 0 if date < 1.month.ago
 
 message.update_attribute(:message_read, true) if message
index 7c8c64ba085813f597d7353a9f86a8c49e5a024b..fde8883b053f30dbbd9ce6b36637570a1fd09133 100644 (file)
@@ -531,7 +531,10 @@ class AmfControllerTest < ActionController::TestCase
 
   def test_findrelations_by_tags
     visible_relation = current_relations(:visible_relation)
+    create(:relation_tag, :relation => visible_relation, :k => "test", :v => "yes")
     used_relation = current_relations(:used_relation)
+    create(:relation_tag, :relation => used_relation, :k => "test", :v => "yes")
+    create(:relation_tag, :relation => used_relation, :k => "name", :v => "Test Relation")
 
     amf_content "findrelations", "/1", ["yes"]
     post :amf_read
index 0a185baae3ebed1808a3bc7a5ea47814b8727132..bcc5442633a228a5ecc0dd4a8f7dfd3267074999 100644 (file)
@@ -53,6 +53,7 @@ class ApiControllerTest < ActionController::TestCase
 
   def test_map
     node = current_nodes(:used_node_1)
+    tag = create(:node_tag, :node => node)
     # Need to split the min/max lat/lon out into their own variables here
     # so that we can test they are returned later.
     minlon = node.lon - 0.1
@@ -70,7 +71,7 @@ class ApiControllerTest < ActionController::TestCase
       assert_select "bounds[minlon='#{minlon}'][minlat='#{minlat}'][maxlon='#{maxlon}'][maxlat='#{maxlat}']", :count => 1
       assert_select "node[id='#{node.id}'][lat='#{node.lat}'][lon='#{node.lon}'][version='#{node.version}'][changeset='#{node.changeset_id}'][visible='#{node.visible}'][timestamp='#{node.timestamp.xmlschema}']", :count => 1 do
         # This should really be more generic
-        assert_select "tag[k='test'][v='yes']"
+        assert_select "tag[k='#{tag.k}'][v='#{tag.v}']"
       end
       assert_select "way", :count => 2
       assert_select "way[id='1']", :count => 1
@@ -84,6 +85,7 @@ class ApiControllerTest < ActionController::TestCase
   # the same as the node we are looking at
   def test_map_inclusive
     node = current_nodes(:used_node_1)
+    tag = create(:node_tag, :node => node)
     bbox = "#{node.lon},#{node.lat},#{node.lon},#{node.lat}"
     get :map, :bbox => bbox
     assert_response :success, "The map call should have succeeded"
@@ -91,7 +93,7 @@ class ApiControllerTest < ActionController::TestCase
       assert_select "bounds[minlon='#{node.lon}'][minlat='#{node.lat}'][maxlon='#{node.lon}'][maxlat='#{node.lat}']", :count => 1
       assert_select "node[id='#{node.id}'][lat='#{node.lat}'][lon='#{node.lon}'][version='#{node.version}'][changeset='#{node.changeset_id}'][visible='#{node.visible}'][timestamp='#{node.timestamp.xmlschema}']", :count => 1 do
         # This should really be more generic
-        assert_select "tag[k='test'][v='yes']"
+        assert_select "tag[k='#{tag.k}'][v='#{tag.v}']"
       end
       assert_select "way", :count => 2
       assert_select "way[id='1']", :count => 1
index efdf22e54f8b25ad7d2c5613098054dc342fdc26..ca2ff8e159ee1339bd48d3b0a0a43e1cac86c24b 100644 (file)
@@ -1388,7 +1388,10 @@ EOF
   end
 
   def test_changeset_download
+    tag = create(:old_node_tag, :old_node => nodes(:used_node_2))
+
     get :download, :id => changesets(:normal_user_first_change).id
+
     assert_response :success
     assert_template nil
     # print @response.body
@@ -1396,7 +1399,7 @@ EOF
     assert_select "osmChange[version='#{API_VERSION}'][generator='#{GENERATOR}']" do
       assert_select "create", :count => 5
       assert_select "create>node[id='#{nodes(:used_node_2).node_id}'][visible='#{nodes(:used_node_2).visible?}'][version='#{nodes(:used_node_2).version}']" do
-        assert_select "tag[k='#{node_tags(:t3).k}'][v='#{node_tags(:t3).v}']"
+        assert_select "tag[k='#{tag.k}'][v='#{tag.v}']"
       end
       assert_select "create>node[id='#{nodes(:visible_node).node_id}']"
     end
index 0cfc2267cd8f5712a1676dcf36786563f34f9eca..ffc86b2f6c3e1ee440c62eab7cc2027a933a82be 100644 (file)
@@ -437,13 +437,14 @@ class NodeControllerTest < ActionController::TestCase
   ##
   # test adding tags to a node
   def test_duplicate_tags
+    existing = create(:node_tag, :node => current_nodes(:public_visible_node))
     # setup auth
     basic_authorization(users(:public_user).email, "test")
 
     # add an identical tag to the node
     tag_xml = XML::Node.new("tag")
-    tag_xml["k"] = current_node_tags(:public_v_t1).k
-    tag_xml["v"] = current_node_tags(:public_v_t1).v
+    tag_xml["k"] = existing.k
+    tag_xml["v"] = existing.v
 
     # add the tag into the existing xml
     node_xml = current_nodes(:public_visible_node).to_xml
@@ -454,7 +455,7 @@ class NodeControllerTest < ActionController::TestCase
     put :update, :id => current_nodes(:public_visible_node).id
     assert_response :bad_request,
                     "adding duplicate tags to a node should fail with 'bad request'"
-    assert_equal "Element node/#{current_nodes(:public_visible_node).id} has duplicate tags with key #{current_node_tags(:t1).k}", @response.body
+    assert_equal "Element node/#{current_nodes(:public_visible_node).id} has duplicate tags with key #{existing.k}", @response.body
   end
 
   # test whether string injection is possible
index 4b1d9f4ad68f424d88a3afee0cdf83807aecf3c6..ab63bbca2408a3938c9f4d58d9f6744c2a36c489 100644 (file)
@@ -545,7 +545,7 @@ class NotesControllerTest < ActionController::TestCase
         assert_select "time", :count => 1
         assert_select "name", "Note: #{open_note.id}"
         assert_select "desc", :count => 1
-        assert_select "link[href='http://www.openstreetmap.org/note/#{open_note.id}']", :count => 1
+        assert_select "link[href='http://test.host/note/#{open_note.id}']", :count => 1
         assert_select "extensions", :count => 1 do
           assert_select "id", open_note.id.to_s
           assert_select "url", note_url(open_note, :format => "gpx")
index f2658b1231294554bc119e136cb9912f55869342..181d132917a73d3b2a8d43789298b450f1537fab 100644 (file)
@@ -86,10 +86,14 @@ class OldNodeControllerTest < ActionController::TestCase
     basic_authorization(users(:public_user).email, "test")
 
     # setup a simple XML node
+    create_list(:node_tag, 2, :node => current_nodes(:node_with_versions))
     xml_doc = current_nodes(:node_with_versions).to_xml
     xml_node = xml_doc.find("//osm/node").first
     nodeid = current_nodes(:node_with_versions).id
 
+    # Ensure that the current tags are propagated to the history too
+    propagate_tags(current_nodes(:node_with_versions), nodes(:node_with_versions_v4))
+
     # keep a hash of the versions => string, as we'll need something
     # to test against later
     versions = {}
@@ -161,6 +165,17 @@ class OldNodeControllerTest < ActionController::TestCase
   # Test that getting the current version is identical to picking
   # that version with the version URI call.
   def test_current_version
+    create(:node_tag, :node => current_nodes(:visible_node))
+    create(:node_tag, :node => current_nodes(:used_node_1))
+    create(:node_tag, :node => current_nodes(:used_node_2))
+    create(:node_tag, :node => current_nodes(:node_used_by_relationship))
+    create(:node_tag, :node => current_nodes(:node_with_versions))
+    propagate_tags(current_nodes(:visible_node), nodes(:visible_node))
+    propagate_tags(current_nodes(:used_node_1), nodes(:used_node_1))
+    propagate_tags(current_nodes(:used_node_2), nodes(:used_node_2))
+    propagate_tags(current_nodes(:node_used_by_relationship), nodes(:node_used_by_relationship))
+    propagate_tags(current_nodes(:node_with_versions), nodes(:node_with_versions_v4))
+
     check_current_version(current_nodes(:visible_node))
     check_current_version(current_nodes(:used_node_1))
     check_current_version(current_nodes(:used_node_2))
@@ -377,4 +392,10 @@ class OldNodeControllerTest < ActionController::TestCase
   def precision(f)
     (f * GeoRecord::SCALE).round.to_f / GeoRecord::SCALE
   end
+
+  def propagate_tags(node, old_node)
+    node.tags.each do |k, v|
+      create(:old_node_tag, :old_node => old_node, :k => k, :v => v)
+    end
+  end
 end
index 612b4a6a48545bf127cdfee855be615291914281..8d3bc6955a80f5873cc4082dd7d0cfdc9279a72d 100644 (file)
@@ -46,6 +46,13 @@ class OldWayControllerTest < ActionController::TestCase
   ##
   # check that we can retrieve versions of a way
   def test_version
+    create(:way_tag, :way => current_ways(:visible_way))
+    create(:way_tag, :way => current_ways(:used_way))
+    create(:way_tag, :way => current_ways(:way_with_versions))
+    propagate_tags(current_ways(:visible_way), ways(:visible_way))
+    propagate_tags(current_ways(:used_way), ways(:used_way))
+    propagate_tags(current_ways(:way_with_versions), ways(:way_with_versions_v4))
+
     check_current_version(current_ways(:visible_way).id)
     check_current_version(current_ways(:used_way).id)
     check_current_version(current_ways(:way_with_versions).id)
@@ -276,4 +283,10 @@ class OldWayControllerTest < ActionController::TestCase
     # now redact it
     post :redact, :id => way.way_id, :version => way.version, :redaction => redaction.id
   end
+
+  def propagate_tags(way, old_way)
+    way.tags.each do |k, v|
+      create(:old_way_tag, :old_way => old_way, :k => k, :v => v)
+    end
+  end
 end
index ab0aca45ed1233e97576b737427c0ad9eaa45f1d..0366ceef03a47812f13d88ba17353de44e5df045 100644 (file)
@@ -337,6 +337,7 @@ class RelationControllerTest < ActionController::TestCase
   def test_update_relation_tags
     basic_authorization "test@example.com", "test"
     rel_id = current_relations(:multi_tag_relation).id
+    create_list(:relation_tag, 4, :relation => current_relations(:multi_tag_relation))
     cs_id = changesets(:public_user_first_change).id
 
     with_relation(rel_id) do |rel|
@@ -366,6 +367,7 @@ class RelationControllerTest < ActionController::TestCase
   def test_update_relation_tags_via_upload
     basic_authorization users(:public_user).email, "test"
     rel_id = current_relations(:multi_tag_relation).id
+    create_list(:relation_tag, 4, :relation => current_relations(:multi_tag_relation))
     cs_id = changesets(:public_user_first_change).id
 
     with_relation(rel_id) do |rel|
index d3300452b05d15f3eeab17a13728b171dc3ace40..2e835a58758dbb88a995e85f698da6370ab4d7de 100644 (file)
@@ -43,6 +43,11 @@ class SearchControllerTest < ActionController::TestCase
   ##
   # test searching ways
   def test_search_ways
+    [:visible_way, :invisible_way, :used_way].each do |way|
+      create(:way_tag, :way => current_ways(way), :k => "test", :v => "yes")
+    end
+    create(:way_tag, :way => current_ways(:used_way), :k => "name", :v => "Test Way")
+
     get :search_ways, :type => "test"
     assert_response :service_unavailable
     assert_equal "Searching for a key without value is currently unavailable", response.headers["Error"]
@@ -59,6 +64,11 @@ class SearchControllerTest < ActionController::TestCase
   ##
   # test searching relations
   def test_search_relations
+    [:visible_relation, :invisible_relation, :used_relation].each do |relation|
+      create(:relation_tag, :relation => current_relations(relation), :k => "test", :v => "yes")
+    end
+    create(:relation_tag, :relation => current_relations(:used_relation), :k => "name", :v => "Test Relation")
+
     get :search_relations, :type => "test"
     assert_response :service_unavailable
     assert_equal "Searching for a key without value is currently unavailable", response.headers["Error"]
index e309b1662b0d49073d23d552e0231cd937331c83..95eccb2c5b8acff30962f896329bedb073c37ca0 100644 (file)
@@ -1384,7 +1384,7 @@ class UserControllerTest < ActionController::TestCase
     get :list, :page => 3
     assert_response :success
     assert_template :list
-    assert_select "table#user_list tr", :count => 25
+    assert_select "table#user_list tr", :count => 26
   end
 
   def test_list_post_confirm
index ccf29945579ab1571551ab94aa7362151d5dd5be..650977078a1c31c1899e453ebd63e79bb1fcdaf1 100644 (file)
@@ -538,10 +538,12 @@ class WayControllerTest < ActionController::TestCase
     # setup auth
     basic_authorization(users(:normal_user).email, "test")
 
+    existing = create(:way_tag, :way => current_ways(:visible_way))
+
     # add an identical tag to the way
     tag_xml = XML::Node.new("tag")
-    tag_xml["k"] = current_way_tags(:t1).k
-    tag_xml["v"] = current_way_tags(:t1).v
+    tag_xml["k"] = existing.k
+    tag_xml["v"] = existing.v
 
     # add the tag into the existing xml
     way_xml = current_ways(:visible_way).to_xml
@@ -559,8 +561,8 @@ class WayControllerTest < ActionController::TestCase
 
     # add an identical tag to the way
     tag_xml = XML::Node.new("tag")
-    tag_xml["k"] = current_way_tags(:t1).k
-    tag_xml["v"] = current_way_tags(:t1).v
+    tag_xml["k"] = existing.k
+    tag_xml["v"] = existing.v
 
     # add the tag into the existing xml
     way_xml = current_ways(:visible_way).to_xml
@@ -571,7 +573,7 @@ class WayControllerTest < ActionController::TestCase
     put :update, :id => current_ways(:visible_way).id
     assert_response :bad_request,
                     "adding a duplicate tag to a way should fail with 'bad request'"
-    assert_equal "Element way/#{current_ways(:visible_way).id} has duplicate tags with key #{current_way_tags(:t1).k}", @response.body
+    assert_equal "Element way/#{current_ways(:visible_way).id} has duplicate tags with key #{existing.k}", @response.body
   end
 
   ##
diff --git a/test/factories/node_tags.rb b/test/factories/node_tags.rb
new file mode 100644 (file)
index 0000000..267309e
--- /dev/null
@@ -0,0 +1,9 @@
+FactoryGirl.define do
+  factory :node_tag do
+    sequence(:k) { |n| "Key #{n}" }
+    sequence(:v) { |n| "Value #{n}" }
+
+    # Fixme requires node factory
+    node_id 1
+  end
+end
diff --git a/test/factories/old_node_tags.rb b/test/factories/old_node_tags.rb
new file mode 100644 (file)
index 0000000..5c63f32
--- /dev/null
@@ -0,0 +1,10 @@
+FactoryGirl.define do
+  factory :old_node_tag do
+    sequence(:k) { |n| "Key #{n}" }
+    sequence(:v) { |n| "Value #{n}" }
+
+    # Fixme requires old_node factory
+    node_id 1
+    version 1
+  end
+end
diff --git a/test/factories/old_relation_tags.rb b/test/factories/old_relation_tags.rb
new file mode 100644 (file)
index 0000000..08e4171
--- /dev/null
@@ -0,0 +1,10 @@
+FactoryGirl.define do
+  factory :old_relation_tag do
+    sequence(:k) { |n| "Key #{n}" }
+    sequence(:v) { |n| "Value #{n}" }
+
+    # Fixme requires old_relation factory
+    relation_id 1
+    version 1
+  end
+end
diff --git a/test/factories/old_way_tags.rb b/test/factories/old_way_tags.rb
new file mode 100644 (file)
index 0000000..c639c06
--- /dev/null
@@ -0,0 +1,10 @@
+FactoryGirl.define do
+  factory :old_way_tag do
+    sequence(:k) { |n| "Key #{n}" }
+    sequence(:v) { |n| "Value #{n}" }
+
+    # Fixme requires old_way factory
+    way_id 1
+    version 1
+  end
+end
diff --git a/test/factories/relation_tags.rb b/test/factories/relation_tags.rb
new file mode 100644 (file)
index 0000000..00ad4db
--- /dev/null
@@ -0,0 +1,9 @@
+FactoryGirl.define do
+  factory :relation_tag do
+    sequence(:k) { |n| "Key #{n}" }
+    sequence(:v) { |n| "Value #{n}" }
+
+    # Fixme requires relation factory
+    relation_id 1
+  end
+end
diff --git a/test/factories/way_tags.rb b/test/factories/way_tags.rb
new file mode 100644 (file)
index 0000000..3bc3192
--- /dev/null
@@ -0,0 +1,9 @@
+FactoryGirl.define do
+  factory :way_tag do
+    sequence(:k) { |n| "Key #{n}" }
+    sequence(:v) { |n| "Value #{n}" }
+
+    # Fixme requires way factory
+    way_id 1
+  end
+end
diff --git a/test/fixtures/current_node_tags.yml b/test/fixtures/current_node_tags.yml
deleted file mode 100644 (file)
index d299998..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-t1:
-  node_id: 1
-  k: 'testvisible'
-  v: 'yes'
-
-t2:
-  node_id: 2
-  k: 'testused'
-  v: 'yes'
-
-t3:
-  node_id: 3
-  k: 'test'
-  v: 'yes'
-
-t4:
-  node_id: 4
-  k: 'test'
-  v: 'yes'
-
-nv_t1:
-  node_id: 15
-  k: 'testing'
-  v: 'added in node version 3'
-
-nv_t2:
-  node_id: 15
-  k: 'testing two'
-  v: 'modified in node version 4'
-  
-public_v_t1:
-  node_id: 16
-  k: 'testvisible'
-  v: 'yes'
-
-nwn_name:
-  node_id: 18
-  k: 'name'
-  v: 'Test Node'
-
-nwn_name_pt:
-  node_id: 18
-  k: 'name:pt'
-  v: 'Nó teste'
-
-nwn_building:
-  node_id: 18
-  k: 'building'
-  v: 'yes'
-
-nwn_tourism:
-  node_id: 18
-  k: 'tourism'
-  v: 'museum'
-
-nwn_shop:
-  node_id: 18
-  k: 'shop'
-  v: 'gift'
-
-nwrwn_ref:
-  node_id: 19
-  k: 'ref'
-  v: '3.1415926'
diff --git a/test/fixtures/current_relation_tags.yml b/test/fixtures/current_relation_tags.yml
deleted file mode 100644 (file)
index 505a761..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-t1:
-  relation_id: 1
-  k: 'test'
-  v: 'yes'
-
-t2:
-  relation_id: 2
-  k: 'test'
-  v: 'yes'
-
-t3:
-  relation_id: 3
-  k: 'test'
-  v: 'yes'
-
-t3_2:
-  relation_id: 3
-  k: 'name'
-  v: 'Test Relation'
-
-mt_1:
-  relation_id: 4
-  k: 'tag1'
-  v: 'val1'
-
-mt_2:
-  relation_id: 4
-  k: 'tag2'
-  v: 'val2'
-
-mt_3:
-  relation_id: 4
-  k: 'tag3'
-  v: 'val3'
-
-mt_4:
-  relation_id: 4
-  k: 'tag4'
-  v: 'val4'
-
-rv_t1:
-  relation_id: 8
-  k: 'testing'
-  v: 'added in relation version 3'
-
-rv_t2:
-  relation_id: 8
-  k: 'testing two'
-  v: 'modified in relation version 4'
diff --git a/test/fixtures/current_way_tags.yml b/test/fixtures/current_way_tags.yml
deleted file mode 100644 (file)
index 2566c54..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-t1:
-  way_id: 1
-  k: 'test'
-  v: 'yes'
-
-t2:
-  way_id: 2
-  k: 'test'
-  v: 'yes'
-
-t3:
-  way_id: 3
-  k: 'test'
-  v: 'yes'
-
-t3_t2:
-  way_id: 3
-  k: 'name'
-  v: 'Test Way'
-
-wv_t1:
-  way_id: 4
-  k: 'testing'
-  v: 'added in way version 3'
-
-wv_t2:
-  way_id: 4
-  k: 'testing two'
-  v: 'modified in way version 4'
diff --git a/test/fixtures/node_tags.yml b/test/fixtures/node_tags.yml
deleted file mode 100644 (file)
index d9001b7..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-t1:
-  node_id: 1
-  k: 'testvisible'
-  v: 'yes'
-  version: 1
-
-t2:
-  node_id: 3
-  k: 'test'
-  v: 'yes'
-  version: 1
-
-t3:
-  node_id: 4
-  k: 'test'
-  v: 'yes'
-  version: 1
-
-nv3_t1:
-  node_id: 15
-  k: 'testing'
-  v: 'added in node version 3'
-  version: 3
-
-nv3_t2:
-  node_id: 15
-  k: 'testing two'
-  v: 'added in node version 3'
-  version: 3
-
-nv3_t3:
-  node_id: 15
-  k: 'testing three'
-  v: 'added in node version 3'
-  version: 3
-
-nv4_t1:
-  node_id: 15
-  k: 'testing'
-  v: 'added in node version 3'
-  version: 4
-
-nv4_t2:
-  node_id: 15
-  k: 'testing two'
-  v: 'modified in node version 4'
-  version: 4
-  
-public_v_t1:
-  node_id: 16
-  k: 'testvisible'
-  v: 'yes'
-  version: 1
-
-nwnv1_name:
-  node_id: 18
-  k: 'name'
-  v: 'Test Node'
-  version: 1
-
-nwnv1_name_pt:
-  node_id: 18
-  k: 'name:pt'
-  v: 'Nó teste'
-  version: 1
-
-nwnv1_building:
-  node_id: 18
-  k: 'building'
-  v: 'yes'
-  version: 1
-
-nwnv1_tourism:
-  node_id: 18
-  k: 'tourism'
-  v: 'museum'
-  version: 1
-
-nwnv1_shop:
-  node_id: 18
-  k: 'shop'
-  v: 'gift'
-  version: 1
-
-nwnv2_name:
-  node_id: 18
-  k: 'name'
-  v: 'Test Node'
-  version: 2
-
-nwnv2_name_pt:
-  node_id: 18
-  k: 'name:pt'
-  v: 'Nó teste'
-  version: 2
-
-nwnv2_building:
-  node_id: 18
-  k: 'building'
-  v: 'yes'
-  version: 2
-
-nwnv2_tourism:
-  node_id: 18
-  k: 'tourism'
-  v: 'museum'
-  version: 2
-
-nwnv2_shop:
-  node_id: 18
-  k: 'shop'
-  v: 'gift'
-  version: 2
diff --git a/test/fixtures/relation_tags.yml b/test/fixtures/relation_tags.yml
deleted file mode 100644 (file)
index daf3c6d..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-t1:
-  relation_id: 1
-  k: 'test'
-  v: 'yes'
-  version: 1
-
-t2:
-  relation_id: 2
-  k: 'test'
-  v: 'yes'
-  version: 1
-
-t3:
-  relation_id: 3
-  k: 'test'
-  v: 'yes'
-  version: 1
-
-t3_2:
-  relation_id: 3
-  k: 'name'
-  v: 'Test Relation'
-  version: 1
-
-mt_1:
-  relation_id: 4
-  k: 'tag1'
-  v: 'val1'
-  version: 1
-
-mt_2:
-  relation_id: 4
-  k: 'tag2'
-  v: 'val2'
-  version: 1
-
-mt_3:
-  relation_id: 4
-  k: 'tag3'
-  v: 'val3'
-  version: 1
-
-mt_4:
-  relation_id: 4
-  k: 'tag4'
-  v: 'val4'
-  version: 1
-
-rv3_t1:
-  relation_id: 8
-  k: 'testing'
-  v: 'added in relation version 3'
-  version: 3
-
-rv3_t2:
-  relation_id: 8
-  k: 'testing two'
-  v: 'added in relation version 3'
-  version: 3
-
-rv3_t3:
-  relation_id: 8
-  k: 'testing three'
-  v: 'added in relation version 3'
-  version: 3
-
-rv4_t1:
-  relation_id: 8
-  k: 'testing'
-  v: 'added in relation version 3'
-  version: 4
-
-rv4_t2:
-  relation_id: 8
-  k: 'testing two'
-  v: 'modified in relation version 4'
-  version: 4
index bee5aa282f64d7f4e42de78091bd300b6d34397c..18b33f6bfc5753ff2bc876ceca5f5757202ef7c8 100644 (file)
@@ -333,3 +333,17 @@ second_gravatar_user:
   terms_agreed: "2010-01-01 11:22:33"
   terms_seen: true
   creation_ip: "1.2.3.4"
+
+wikipedia_user:
+  id: 25
+  email: wikipedia-user@example.com
+  status: active
+  pass_crypt: <%= Digest::MD5.hexdigest('test') %>
+  creation_time: "2008-05-01 01:23:45"
+  display_name: wikipediauser
+  data_public: true
+  auth_provider: wikipedia
+  auth_uid: 123456789
+  terms_agreed: "2010-01-01 11:22:33"
+  terms_seen: true
+  languages: en
diff --git a/test/fixtures/way_tags.yml b/test/fixtures/way_tags.yml
deleted file mode 100644 (file)
index 3361f74..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-t1:
-  way_id: 1
-  k: 'test'
-  v: 'yes'
-  version: 1
-
-t2:
-  way_id: 2
-  k: 'test'
-  v: 'yes'
-  version: 1
-
-t3:
-  way_id: 3
-  k: 'test'
-  v: 'yes'
-  version: 1
-
-t3_t2:
-  way_id: 3
-  k: 'name'
-  v: 'Test Way'
-  version: 1
-
-wv3_t1:
-  way_id: 4
-  k: 'testing'
-  v: 'added in way version 3'
-  version: 3
-
-wv3_t2:
-  way_id: 4
-  k: 'testing two'
-  v: 'added in way version 3'
-  version: 3
-
-wv3_t3:
-  way_id: 4
-  k: 'testing three'
-  v: 'added in way version 3'
-  version: 3
-
-wv4_t1:
-  way_id: 4
-  k: 'testing'
-  v: 'added in way version 3'
-  version: 4
-
-wv4_t2:
-  way_id: 4
-  k: 'testing two'
-  v: 'modified in way version 4'
-  version: 4
-
-t6_v1:
-  way_id: 6
-  k: 'test'
-  v: 'yes'
-  version: 1
-
-t6_v2:
-  way_id: 6
-  k: 'test'
-  v: 'yes'
-  version: 2
-
-t6_v3:
-  way_id: 6
-  k: 'test'
-  v: 'yes'
-  version: 3
-
-t6_v4:
-  way_id: 6
-  k: 'test'
-  v: 'yes'
-  version: 4
index 97b35467bff15cec351610f93ed9c4fd38eba9f0..a25bae99d4da5bb901b6c9a0c73c3b793e8ec798 100644 (file)
@@ -183,9 +183,7 @@ class ApplicationHelperTest < ActionView::TestCase
     assert_match %r{^<span title=".*">4 months</span>$}, date
   end
 
-  def test_body_class
-  end
+  def test_body_class; end
 
-  def test_current_page_class
-  end
+  def test_current_page_class; end
 end
index 798c69b438e4fd3f2d83aac6619c53929ddd1129..32cf96c6b2441b3b792abaf55e9003b6acfebff9 100644 (file)
@@ -17,6 +17,12 @@ class BrowseHelperTest < ActionView::TestCase
   end
 
   def test_printable_name
+    add_tags_selection(current_nodes(:node_with_name))
+    create(:node_tag, :node => current_nodes(:node_with_ref_without_name), :k => "ref", :v => "3.1415926")
+    add_old_tags_selection(nodes(:node_with_name_current_version))
+    add_old_tags_selection(nodes(:node_with_name_redacted_version))
+
+    # current_nodes(:redacted_node) is deleted, so has no tags.
     assert_dom_equal "17", printable_name(current_nodes(:redacted_node))
     assert_dom_equal "<bdi>Test Node</bdi> (<bdi>18</bdi>)", printable_name(current_nodes(:node_with_name))
     assert_dom_equal "<bdi>Test Node</bdi> (<bdi>18</bdi>)", printable_name(nodes(:node_with_name_current_version))
@@ -57,19 +63,29 @@ class BrowseHelperTest < ActionView::TestCase
   end
 
   def test_link_class
+    add_tags_selection(current_nodes(:node_with_name))
+
     assert_equal "node", link_class("node", current_nodes(:visible_node))
     assert_equal "node deleted", link_class("node", current_nodes(:invisible_node))
     assert_equal "node deleted", link_class("node", current_nodes(:redacted_node))
     assert_equal "node building yes shop gift tourism museum", link_class("node", current_nodes(:node_with_name))
+
+    add_old_tags_selection(nodes(:node_with_name_current_version))
+    add_old_tags_selection(nodes(:node_with_name_redacted_version))
     assert_equal "node building yes shop gift tourism museum", link_class("node", nodes(:node_with_name_current_version))
     assert_equal "node deleted", link_class("node", nodes(:node_with_name_redacted_version))
   end
 
   def test_link_title
+    add_tags_selection(current_nodes(:node_with_name))
+
     assert_equal "", link_title(current_nodes(:visible_node))
     assert_equal "", link_title(current_nodes(:invisible_node))
     assert_equal "", link_title(current_nodes(:redacted_node))
     assert_equal "building=yes, shop=gift, and tourism=museum", link_title(current_nodes(:node_with_name))
+
+    add_old_tags_selection(nodes(:node_with_name_current_version))
+    add_old_tags_selection(nodes(:node_with_name_redacted_version))
     assert_equal "building=yes, shop=gift, and tourism=museum", link_title(nodes(:node_with_name_current_version))
     assert_equal "", link_title(nodes(:node_with_name_redacted_version))
   end
@@ -106,12 +122,17 @@ class BrowseHelperTest < ActionView::TestCase
   end
 
   def test_icon_tags
+    add_tags_selection(current_nodes(:node_with_name))
+
     tags = icon_tags(current_nodes(:node_with_name))
     assert_equal 3, tags.count
     assert tags.include?(%w(building yes))
     assert tags.include?(%w(tourism museum))
     assert tags.include?(%w(shop gift))
 
+    add_old_tags_selection(nodes(:node_with_name_current_version))
+    add_old_tags_selection(nodes(:node_with_name_redacted_version))
+
     tags = icon_tags(nodes(:node_with_name_current_version))
     assert_equal 3, tags.count
     assert tags.include?(%w(building yes))
@@ -306,4 +327,24 @@ class BrowseHelperTest < ActionView::TestCase
     link = telephone_link("phone", "+1 (234) 567-890")
     assert_equal "tel:+1(234)567-890", link
   end
+
+  def add_old_tags_selection(old_node)
+    { "building" => "yes",
+      "shop" => "gift",
+      "tourism" => "museum",
+      "name" => "Test Node",
+      "name:pt" => "Nó teste" }.each do |key, value|
+      create(:old_node_tag, :old_node => old_node, :k => key, :v => value)
+    end
+  end
+
+  def add_tags_selection(node)
+    { "building" => "yes",
+      "shop" => "gift",
+      "tourism" => "museum",
+      "name" => "Test Node",
+      "name:pt" => "Nó teste" }.each do |key, value|
+      create(:node_tag, :node => node, :k => key, :v => value)
+    end
+  end
 end
index 2452e6e6b8c76cfebd6eb8bd87956410e0511d40..c10699f2aa1e422d9d37e0c9ec07848a0b08e712 100644 (file)
@@ -333,7 +333,7 @@ class OAuthTest < ActionDispatch::IntegrationTest
     assert_not_nil token.created_at
     assert_nil token.authorized_at
     assert_nil token.invalidated_at
-    assert_equal options[:oauth_callback], token.callback_url
+    assert_equal_allowing_nil options[:oauth_callback], token.callback_url
     assert_allowed token, client.permissions
 
     token
index cdf4fcfe9cffafb1d924a7286dc34a6d7851a556..db35be5f350e8db3bd7b223cab7d8f6c6a8ca56d 100644 (file)
@@ -19,6 +19,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest
     OmniAuth.config.mock_auth[:facebook] = nil
     OmniAuth.config.mock_auth[:windowslive] = nil
     OmniAuth.config.mock_auth[:github] = nil
+    OmniAuth.config.mock_auth[:wikipedia] = nil
     OmniAuth.config.test_mode = false
   end
 
@@ -725,4 +726,117 @@ class UserCreationTest < ActionDispatch::IntegrationTest
     assert_response :success
     assert_template "site/welcome"
   end
+
+  def test_user_create_wikipedia_success
+    OmniAuth.config.add_mock(:wikipedia, :uid => "123454321")
+
+    new_email = "newtester-wikipedia@osm.org"
+    display_name = "new_tester-wikipedia"
+    password = "testtest"
+    assert_difference("User.count") do
+      assert_difference("ActionMailer::Base.deliveries.size", 1) do
+        post "/user/new",
+             :user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :auth_provider => "wikipedia", :pass_crypt => "", :pass_crypt_confirmation => "" }
+        assert_response :redirect
+        assert_redirected_to auth_path(:provider => "wikipedia", :origin => "/user/new")
+        follow_redirect!
+        assert_response :redirect
+        assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/user/new")
+        follow_redirect!
+        assert_response :redirect
+        assert_redirected_to "/user/terms"
+        post "/user/save",
+             :user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :auth_provider => "wikipedia", :auth_uid => "123454321", :pass_crypt => password, :pass_crypt_confirmation => password }
+        assert_response :redirect
+        follow_redirect!
+      end
+    end
+
+    # Check the page
+    assert_response :success
+    assert_template "user/confirm"
+
+    ActionMailer::Base.deliveries.clear
+  end
+
+  def test_user_create_wikipedia_failure
+    OmniAuth.config.mock_auth[:wikipedia] = :connection_failed
+
+    new_email = "newtester-wikipedia2@osm.org"
+    display_name = "new_tester-wikipedia2"
+    assert_difference("User.count", 0) do
+      assert_difference("ActionMailer::Base.deliveries.size", 0) do
+        post "/user/new",
+             :user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :auth_provider => "wikipedia", :pass_crypt => "", :pass_crypt_confirmation => "" }
+        assert_response :redirect
+        assert_redirected_to auth_path(:provider => "wikipedia", :origin => "/user/new")
+        follow_redirect!
+        assert_response :redirect
+        assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/user/new")
+        follow_redirect!
+        assert_response :redirect
+        assert_redirected_to auth_failure_path(:strategy => "wikipedia", :message => "connection_failed", :origin => "/user/new")
+        follow_redirect!
+        assert_response :redirect
+        follow_redirect!
+        assert_response :success
+        assert_template "user/new"
+      end
+    end
+
+    ActionMailer::Base.deliveries.clear
+  end
+
+  def test_user_create_wikipedia_redirect
+    OmniAuth.config.add_mock(:wikipedia, :uid => "123454321")
+
+    new_email = "redirect_tester_wikipedia@osm.org"
+    display_name = "redirect_tester_wikipedia"
+    # nothing special about this page, just need a protected page to redirect back to.
+    referer = "/traces/mine"
+    assert_difference("User.count") do
+      assert_difference("ActionMailer::Base.deliveries.size", 1) do
+        post "/user/new",
+             :user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :auth_provider => "wikipedia", :pass_crypt => "", :pass_crypt_confirmation => "" }, :referer => referer
+        assert_response :redirect
+        assert_redirected_to auth_path(:provider => "wikipedia", :origin => "/user/new")
+        follow_redirect!
+        assert_response :redirect
+        assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/user/new")
+        follow_redirect!
+        assert_response :redirect
+        assert_redirected_to "/user/terms"
+        post_via_redirect "/user/save",
+                          :user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :auth_provider => "wikipedia", :auth_uid => "http://localhost:1123/new.tester", :pass_crypt => "testtest", :pass_crypt_confirmation => "testtest" }
+      end
+    end
+
+    # Check the e-mail
+    register_email = ActionMailer::Base.deliveries.first
+
+    assert_equal register_email.to[0], new_email
+    # Check that the confirm account url is correct
+    confirm_regex = Regexp.new("/user/redirect_tester_wikipedia/confirm\\?confirm_string=([a-zA-Z0-9]*)")
+    register_email.parts.each do |part|
+      assert_match confirm_regex, part.body.to_s
+    end
+    confirm_string = register_email.parts[0].body.match(confirm_regex)[1]
+
+    # Check the page
+    assert_response :success
+    assert_template "user/confirm"
+
+    ActionMailer::Base.deliveries.clear
+
+    # Go to the confirmation page
+    get "/user/#{display_name}/confirm", :confirm_string => confirm_string
+    assert_response :success
+    assert_template "user/confirm"
+
+    post "/user/#{display_name}/confirm", :confirm_string => confirm_string
+    assert_response :redirect
+    follow_redirect!
+    assert_response :success
+    assert_template "site/welcome"
+  end
 end
index d027334d0d3cad5b85eff9b2903334854b8e8dcd..e442eba6841a1998a3df87413d6cd9a634bcbbdf 100644 (file)
@@ -13,6 +13,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest
     OmniAuth.config.mock_auth[:facebook] = nil
     OmniAuth.config.mock_auth[:windowslive] = nil
     OmniAuth.config.mock_auth[:github] = nil
+    OmniAuth.config.mock_auth[:wikipedia] = nil
     OmniAuth.config.test_mode = false
   end
 
@@ -824,6 +825,94 @@ class UserLoginTest < ActionDispatch::IntegrationTest
     assert_select "span.username", false
   end
 
+  def test_login_wikipedia_success
+    OmniAuth.config.add_mock(:wikipedia, :uid => "123456789")
+
+    get "/login", :referer => "/history"
+    assert_response :redirect
+    assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history"
+    follow_redirect!
+    assert_response :success
+    assert_template "user/login"
+    get auth_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+    assert_response :redirect
+    assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+    follow_redirect!
+    assert_response :redirect
+    follow_redirect!
+    assert_response :success
+    assert_template "changeset/history"
+    assert_select "span.username", "wikipediauser"
+  end
+
+  def test_login_wikipedia_connection_failed
+    OmniAuth.config.mock_auth[:wikipedia] = :connection_failed
+
+    get "/login", :referer => "/history"
+    assert_response :redirect
+    assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history"
+    follow_redirect!
+    assert_response :success
+    assert_template "user/login"
+    get auth_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+    assert_response :redirect
+    assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+    follow_redirect!
+    assert_response :redirect
+    assert_redirected_to auth_failure_path(:strategy => "wikipedia", :message => "connection_failed", :origin => "/login?referer=%2Fhistory")
+    follow_redirect!
+    assert_response :redirect
+    follow_redirect!
+    assert_response :success
+    assert_template "login"
+    assert_select "div.flash.error", "Connection to authentication provider failed"
+    assert_select "span.username", false
+  end
+
+  def test_login_wikipedia_invalid_credentials
+    OmniAuth.config.mock_auth[:wikipedia] = :invalid_credentials
+
+    get "/login", :referer => "/history"
+    assert_response :redirect
+    assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history"
+    follow_redirect!
+    assert_response :success
+    assert_template "user/login"
+    get auth_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+    assert_response :redirect
+    assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+    follow_redirect!
+    assert_response :redirect
+    assert_redirected_to auth_failure_path(:strategy => "wikipedia", :message => "invalid_credentials", :origin => "/login?referer=%2Fhistory")
+    follow_redirect!
+    assert_response :redirect
+    follow_redirect!
+    assert_response :success
+    assert_template "login"
+    assert_select "div.flash.error", "Invalid authentication credentials"
+    assert_select "span.username", false
+  end
+
+  def test_login_wikipedia_unknown
+    OmniAuth.config.add_mock(:wikipedia, :uid => "987654321")
+
+    get "/login", :referer => "/history"
+    assert_response :redirect
+    assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history"
+    follow_redirect!
+    assert_response :success
+    assert_template "user/login"
+    get auth_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+    assert_response :redirect
+    assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+    follow_redirect!
+    assert_response :redirect
+    follow_redirect!
+    assert_response :success
+    assert_template "user/new"
+    assert_select "span.username", false
+  end
+
   private
 
   def try_password_login(username, password, remember_me = nil)
index 5fb81a4cb88d6a2180f383a1269170f86a239cf9..dc62531f532414ec885c9d72e8a3d5efc1b80716 100644 (file)
@@ -312,9 +312,9 @@ class BoundingBoxTest < ActiveSupport::TestCase
   end
 
   def check_bbox(bbox, result)
-    assert_equal result[0], bbox.min_lon, "min_lon"
-    assert_equal result[1], bbox.min_lat, "min_lat"
-    assert_equal result[2], bbox.max_lon, "max_lon"
-    assert_equal result[3], bbox.max_lat, "max_lat"
+    assert_equal_allowing_nil result[0], bbox.min_lon, "min_lon"
+    assert_equal_allowing_nil result[1], bbox.min_lat, "min_lat"
+    assert_equal_allowing_nil result[2], bbox.max_lon, "max_lon"
+    assert_equal_allowing_nil result[3], bbox.max_lat, "max_lat"
   end
 end
index a100515c8178316c7e0f6f8ed229d523ef398695..65c7ea398799e3333423f04afcfca10081d06e2e 100644 (file)
@@ -32,39 +32,39 @@ class LocaleTest < ActiveSupport::TestCase
   end
 
   def test_script
-    assert_equal EN.script, Locale.tag("en").script
-    assert_equal EN_GB.script, Locale.tag("en-GB").script
-    assert_equal FR.script, Locale.tag("fr").script
-    assert_equal ZH_HANS.script, Locale.tag("zh-Hans").script
-    assert_equal ZH_HANT_TW.script, Locale.tag("zh-Hant-TW").script
-    assert_equal ZH_YUE.script, Locale.tag("zh-yue").script
-    assert_equal ZH_YUE.script, Locale.tag("zh-YUE").script
-    assert_equal BE_TARASK.script, Locale.tag("be-tarask").script
-    assert_equal BE_TARASK.script, Locale.tag("be-Tarask").script
+    assert_equal_allowing_nil EN.script, Locale.tag("en").script
+    assert_equal_allowing_nil EN_GB.script, Locale.tag("en-GB").script
+    assert_equal_allowing_nil FR.script, Locale.tag("fr").script
+    assert_equal_allowing_nil ZH_HANS.script, Locale.tag("zh-Hans").script
+    assert_equal_allowing_nil ZH_HANT_TW.script, Locale.tag("zh-Hant-TW").script
+    assert_equal_allowing_nil ZH_YUE.script, Locale.tag("zh-yue").script
+    assert_equal_allowing_nil ZH_YUE.script, Locale.tag("zh-YUE").script
+    assert_equal_allowing_nil BE_TARASK.script, Locale.tag("be-tarask").script
+    assert_equal_allowing_nil BE_TARASK.script, Locale.tag("be-Tarask").script
   end
 
   def test_region
-    assert_equal EN.region, Locale.tag("en").region
-    assert_equal EN_GB.region, Locale.tag("en-GB").region
-    assert_equal FR.region, Locale.tag("fr").region
-    assert_equal ZH_HANS.region, Locale.tag("zh-Hans").region
-    assert_equal ZH_HANT_TW.region, Locale.tag("zh-Hant-TW").region
-    assert_equal ZH_YUE.region, Locale.tag("zh-yue").region
-    assert_equal ZH_YUE.region, Locale.tag("zh-YUE").region
-    assert_equal BE_TARASK.region, Locale.tag("be-tarask").region
-    assert_equal BE_TARASK.region, Locale.tag("be-Tarask").region
+    assert_equal_allowing_nil EN.region, Locale.tag("en").region
+    assert_equal_allowing_nil EN_GB.region, Locale.tag("en-GB").region
+    assert_equal_allowing_nil FR.region, Locale.tag("fr").region
+    assert_equal_allowing_nil ZH_HANS.region, Locale.tag("zh-Hans").region
+    assert_equal_allowing_nil ZH_HANT_TW.region, Locale.tag("zh-Hant-TW").region
+    assert_equal_allowing_nil ZH_YUE.region, Locale.tag("zh-yue").region
+    assert_equal_allowing_nil ZH_YUE.region, Locale.tag("zh-YUE").region
+    assert_equal_allowing_nil BE_TARASK.region, Locale.tag("be-tarask").region
+    assert_equal_allowing_nil BE_TARASK.region, Locale.tag("be-Tarask").region
   end
 
   def test_variant
-    assert_equal EN.variant, Locale.tag("en").variant
-    assert_equal EN_GB.variant, Locale.tag("en-GB").variant
-    assert_equal FR.variant, Locale.tag("fr").variant
-    assert_equal ZH_HANS.variant, Locale.tag("zh-Hans").variant
-    assert_equal ZH_HANT_TW.variant, Locale.tag("zh-Hant-TW").variant
-    assert_equal ZH_YUE.variant, Locale.tag("zh-yue").variant
-    assert_equal ZH_YUE.variant, Locale.tag("zh-YUE").variant
-    assert_equal BE_TARASK.variant, Locale.tag("be-tarask").variant
-    assert_equal BE_TARASK.variant, Locale.tag("be-Tarask").variant
+    assert_equal_allowing_nil EN.variant, Locale.tag("en").variant
+    assert_equal_allowing_nil EN_GB.variant, Locale.tag("en-GB").variant
+    assert_equal_allowing_nil FR.variant, Locale.tag("fr").variant
+    assert_equal_allowing_nil ZH_HANS.variant, Locale.tag("zh-Hans").variant
+    assert_equal_allowing_nil ZH_HANT_TW.variant, Locale.tag("zh-Hant-TW").variant
+    assert_equal_allowing_nil ZH_YUE.variant, Locale.tag("zh-yue").variant
+    assert_equal_allowing_nil ZH_YUE.variant, Locale.tag("zh-YUE").variant
+    assert_equal_allowing_nil BE_TARASK.variant, Locale.tag("be-tarask").variant
+    assert_equal_allowing_nil BE_TARASK.variant, Locale.tag("be-Tarask").variant
   end
 
   def test_list
index c481cc767d0933ce2904d586e9357091da3648ab..6f54a0d7adb276130b960d13e0364ee51ba9a1b6 100644 (file)
@@ -14,6 +14,20 @@ class PasswordHashTest < ActiveSupport::TestCase
     assert_equal true, PasswordHash.upgrade?("67a1e09bb1f83f5007dc119c14d663aa", "salt")
   end
 
+  def test_pbkdf2_1000_32_sha512
+    assert_equal true, PasswordHash.check("ApT/28+FsTBLa/J8paWfgU84SoRiTfeY8HjKWhgHy08=", "sha512!1000!HR4z+hAvKV2ra1gpbRybtoNzm/CNKe4cf7bPKwdUNrk=", "password")
+    assert_equal false, PasswordHash.check("ApT/28+FsTBLa/J8paWfgU84SoRiTfeY8HjKWhgHy08=", "sha512!1000!HR4z+hAvKV2ra1gpbRybtoNzm/CNKe4cf7bPKwdUNrk=", "wrong")
+    assert_equal false, PasswordHash.check("ApT/28+FsTBLa/J8paWfgU84SoRiTfeY8HjKWhgHy08=", "sha512!1000!HR4z+hAvKV2ra1gwrongtoNzm/CNKe4cf7bPKwdUNrk=", "password")
+    assert_equal true, PasswordHash.upgrade?("ApT/28+FsTBLa/J8paWfgU84SoRiTfeY8HjKWhgHy08=", "sha512!1000!HR4z+hAvKV2ra1gpbRybtoNzm/CNKe4cf7bPKwdUNrk=")
+  end
+
+  def test_pbkdf2_10000_32_sha512
+    assert_equal true, PasswordHash.check("3wYbPiOxk/tU0eeIDjUhdvi8aDP3AbFtwYKKxF1IhGg=", "sha512!10000!OUQLgtM7eD8huvanFT5/WtWaCwdOdrir8QOtFwxhO0A=", "password")
+    assert_equal false, PasswordHash.check("3wYbPiOxk/tU0eeIDjUhdvi8aDP3AbFtwYKKxF1IhGg=", "sha512!10000!OUQLgtM7eD8huvanFT5/WtWaCwdOdrir8QOtFwxhO0A=", "wrong")
+    assert_equal false, PasswordHash.check("3wYbPiOxk/tU0eeIDjUhdvi8aDP3AbFtwYKKxF1IhGg=", "sha512!10000!OUQLgtMwronguvanFT5/WtWaCwdOdrir8QOtFwxhO0A=", "password")
+    assert_equal false, PasswordHash.upgrade?("3wYbPiOxk/tU0eeIDjUhdvi8aDP3AbFtwYKKxF1IhGg=", "sha512!10000!OUQLgtM7eD8huvanFT5/WtWaCwdOdrir8QOtFwxhO0A=")
+  end
+
   def test_default
     hash1, salt1 = PasswordHash.create("password")
     hash2, salt2 = PasswordHash.create("password")
index 0196b6fefb59af25955d0ca7bf5e99979e758aa8..f1d8750a0efa2cedd077ec000d122b9d426c7105 100644 (file)
@@ -3,62 +3,34 @@ require "test_helper"
 class NodeTagTest < ActiveSupport::TestCase
   api_fixtures
 
-  def test_tag_count
-    assert_equal 13, NodeTag.count
-    node_tag_count(:visible_node, 1)
-    node_tag_count(:invisible_node, 1)
-    node_tag_count(:used_node_1, 1)
-    node_tag_count(:used_node_2, 1)
-    node_tag_count(:node_with_versions, 2)
-  end
-
-  def node_tag_count(node, count)
-    nod = current_nodes(node)
-    assert_equal count, nod.node_tags.count
-  end
-
   def test_length_key_valid
-    key = "k"
+    tag = create(:node_tag)
     (0..255).each do |i|
-      tag = NodeTag.new
-      tag.node_id = current_node_tags(:t1).node_id
-      tag.k = key * i
-      tag.v = "v"
+      tag.k = "k" * i
       assert tag.valid?
     end
   end
 
   def test_length_value_valid
-    val = "v"
+    tag = create(:node_tag)
     (0..255).each do |i|
-      tag = NodeTag.new
-      tag.node_id = current_node_tags(:t1).node_id
-      tag.k = "k"
-      tag.v = val * i
+      tag.v = "v" * i
       assert tag.valid?
     end
   end
 
   def test_length_key_invalid
-    ["k" * 256].each do |i|
-      tag = NodeTag.new
-      tag.node_id = current_node_tags(:t1).node_id
-      tag.k = i
-      tag.v = "v"
-      assert !tag.valid?, "Key should be too long"
-      assert tag.errors[:k].any?
-    end
+    tag = create(:node_tag)
+    tag.k = "k" * 256
+    assert !tag.valid?, "Key should be too long"
+    assert tag.errors[:k].any?
   end
 
   def test_length_value_invalid
-    ["k" * 256].each do |i|
-      tag = NodeTag.new
-      tag.node_id = current_node_tags(:t1).node_id
-      tag.k = "k"
-      tag.v = i
-      assert !tag.valid?, "Value should be too long"
-      assert tag.errors[:v].any?
-    end
+    tag = create(:node_tag)
+    tag.v = "v" * 256
+    assert !tag.valid?, "Value should be too long"
+    assert tag.errors[:v].any?
   end
 
   def test_empty_node_tag_invalid
@@ -68,10 +40,11 @@ class NodeTagTest < ActiveSupport::TestCase
   end
 
   def test_uniqueness
+    existing = create(:node_tag)
     tag = NodeTag.new
-    tag.node_id = current_node_tags(:t1).node_id
-    tag.k = current_node_tags(:t1).k
-    tag.v = current_node_tags(:t1).v
+    tag.node_id = existing.node_id
+    tag.k = existing.k
+    tag.v = existing.v
     assert tag.new_record?
     assert !tag.valid?
     assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
index ff833d0ed262ef56c8c3ec4b083fb3dd94f3a88c..7d43362d22983fa6d61d0443e8526552479e4946 100644 (file)
@@ -316,20 +316,23 @@ class NodeTest < ActiveSupport::TestCase
 
   def test_node_tags
     node = current_nodes(:node_with_versions)
+    taglist = create_list(:node_tag, 2, :node => node)
     tags = Node.find(node.id).node_tags.order(:k)
-    assert_equal 2, tags.count
-    assert_equal "testing", tags[0].k
-    assert_equal "added in node version 3", tags[0].v
-    assert_equal "testing two", tags[1].k
-    assert_equal "modified in node version 4", tags[1].v
+    assert_equal taglist.count, tags.count
+    taglist.sort_by!(&:k).each_index do |i|
+      assert_equal taglist[i].k, tags[i].k
+      assert_equal taglist[i].v, tags[i].v
+    end
   end
 
   def test_tags
     node = current_nodes(:node_with_versions)
+    taglist = create_list(:node_tag, 2, :node => node)
     tags = Node.find(node.id).tags
-    assert_equal 2, tags.size
-    assert_equal "added in node version 3", tags["testing"]
-    assert_equal "modified in node version 4", tags["testing two"]
+    assert_equal taglist.count, tags.count
+    taglist.each do |tag|
+      assert_equal tag.v, tags[tag.k]
+    end
   end
 
   def test_containing_relation_members
index 2ac60ab428f23794f4f9a2db60d38ad178add3bb..f49be9256660d94a7dad0392ab101b459bab9f2d 100644 (file)
@@ -3,56 +3,34 @@ require "test_helper"
 class OldNodeTagTest < ActiveSupport::TestCase
   api_fixtures
 
-  def test_old_node_tag_count
-    assert_equal 19, OldNodeTag.count, "Unexpected number of fixtures loaded."
-  end
-
   def test_length_key_valid
-    key = "k"
+    tag = create(:old_node_tag)
     (0..255).each do |i|
-      tag = OldNodeTag.new
-      tag.node_id = node_tags(:t1).node_id
-      tag.version = node_tags(:t1).version
-      tag.k = key * i
-      tag.v = "v"
+      tag.k = "k" * i
       assert tag.valid?
     end
   end
 
   def test_length_value_valid
-    val = "v"
+    tag = create(:old_node_tag)
     (0..255).each do |i|
-      tag = OldNodeTag.new
-      tag.node_id = node_tags(:t1).node_id
-      tag.version = node_tags(:t1).version
-      tag.k = "k"
-      tag.v = val * i
+      tag.v = "v" * i
       assert tag.valid?
     end
   end
 
   def test_length_key_invalid
-    ["k" * 256].each do |i|
-      tag = OldNodeTag.new
-      tag.node_id = node_tags(:t1).node_id
-      tag.version = node_tags(:t1).version
-      tag.k = i
-      tag.v = "v", "Key should be too long"
-      assert !tag.valid?
-      assert tag.errors[:k].any?
-    end
+    tag = create(:old_node_tag)
+    tag.k = "k" * 256
+    assert !tag.valid?
+    assert tag.errors[:k].any?
   end
 
   def test_length_value_invalid
-    ["k" * 256].each do |i|
-      tag = OldNodeTag.new
-      tag.node_id = node_tags(:t1).node_id
-      tag.version = node_tags(:t1).version
-      tag.k = "k"
-      tag.v = i
-      assert !tag.valid?, "Value should be too long"
-      assert tag.errors[:v].any?
-    end
+    tag = create(:old_node_tag)
+    tag.v = "v" * 256
+    assert !tag.valid?, "Value should be too long"
+    assert tag.errors[:v].any?
   end
 
   def test_empty_tag_invalid
@@ -62,11 +40,12 @@ class OldNodeTagTest < ActiveSupport::TestCase
   end
 
   def test_uniqueness
+    existing = create(:old_node_tag)
     tag = OldNodeTag.new
-    tag.node_id = node_tags(:t1).node_id
-    tag.version = node_tags(:t1).version
-    tag.k = node_tags(:t1).k
-    tag.v = node_tags(:t1).v
+    tag.node_id = existing.node_id
+    tag.version = existing.version
+    tag.k = existing.k
+    tag.v = existing.v
     assert tag.new_record?
     assert !tag.valid?
     assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
index 03aead2e9927888f3300260fd0b5544acb684eda..d7e363edbfb0af0587e76ce1538a68cf3349cba9 100644 (file)
@@ -76,6 +76,9 @@ class OldNodeTest < ActiveSupport::TestCase
   end
 
   def test_node_tags
+    taglist_v3 = create_list(:old_node_tag, 3, :old_node => nodes(:node_with_versions_v3))
+    taglist_v4 = create_list(:old_node_tag, 2, :old_node => nodes(:node_with_versions_v4))
+
     node = nodes(:node_with_versions_v1)
     tags = OldNode.find(node.id).old_tags.order(:k)
     assert_equal 0, tags.count
@@ -86,24 +89,25 @@ class OldNodeTest < ActiveSupport::TestCase
 
     node = nodes(:node_with_versions_v3)
     tags = OldNode.find(node.id).old_tags.order(:k)
-    assert_equal 3, tags.count
-    assert_equal "testing", tags[0].k
-    assert_equal "added in node version 3", tags[0].v
-    assert_equal "testing three", tags[1].k
-    assert_equal "added in node version 3", tags[1].v
-    assert_equal "testing two", tags[2].k
-    assert_equal "added in node version 3", tags[2].v
+    assert_equal taglist_v3.count, tags.count
+    taglist_v3.sort_by!(&:k).each_index do |i|
+      assert_equal taglist_v3[i].k, tags[i].k
+      assert_equal taglist_v3[i].v, tags[i].v
+    end
 
     node = nodes(:node_with_versions_v4)
     tags = OldNode.find(node.id).old_tags.order(:k)
-    assert_equal 2, tags.count
-    assert_equal "testing", tags[0].k
-    assert_equal "added in node version 3", tags[0].v
-    assert_equal "testing two", tags[1].k
-    assert_equal "modified in node version 4", tags[1].v
+    assert_equal taglist_v4.count, tags.count
+    taglist_v4.sort_by!(&:k).each_index do |i|
+      assert_equal taglist_v4[i].k, tags[i].k
+      assert_equal taglist_v4[i].v, tags[i].v
+    end
   end
 
   def test_tags
+    taglist_v3 = create_list(:old_node_tag, 3, :old_node => nodes(:node_with_versions_v3))
+    taglist_v4 = create_list(:old_node_tag, 2, :old_node => nodes(:node_with_versions_v4))
+
     node = nodes(:node_with_versions_v1)
     tags = OldNode.find(node.id).tags
     assert_equal 0, tags.size
@@ -114,15 +118,16 @@ class OldNodeTest < ActiveSupport::TestCase
 
     node = nodes(:node_with_versions_v3)
     tags = OldNode.find(node.id).tags
-    assert_equal 3, tags.size
-    assert_equal "added in node version 3", tags["testing"]
-    assert_equal "added in node version 3", tags["testing two"]
-    assert_equal "added in node version 3", tags["testing three"]
+    assert_equal taglist_v3.count, tags.count
+    taglist_v3.each do |tag|
+      assert_equal tag.v, tags[tag.k]
+    end
 
     node = nodes(:node_with_versions_v4)
     tags = OldNode.find(node.id).tags
-    assert_equal 2, tags.size
-    assert_equal "added in node version 3", tags["testing"]
-    assert_equal "modified in node version 4", tags["testing two"]
+    assert_equal taglist_v4.count, tags.count
+    taglist_v4.each do |tag|
+      assert_equal tag.v, tags[tag.k]
+    end
   end
 end
index 2c9638a2d809389e31ec15f6cfef7a105a4c2f55..5c27ef3ea57f63db34280dc52fa8585b546e81e8 100644 (file)
@@ -3,56 +3,34 @@ require "test_helper"
 class OldRelationTagTest < ActiveSupport::TestCase
   api_fixtures
 
-  def test_tag_count
-    assert_equal 13, OldRelationTag.count
-  end
-
   def test_length_key_valid
-    key = "k"
+    tag = create(:old_relation_tag)
     (0..255).each do |i|
-      tag = OldRelationTag.new
-      tag.relation_id = relation_tags(:t1).relation_id
-      tag.version = 1
-      tag.k = key * i
-      tag.v = "v"
+      tag.k = "k" * i
       assert tag.valid?
     end
   end
 
   def test_length_value_valid
-    val = "v"
+    tag = create(:old_relation_tag)
     (0..255).each do |i|
-      tag = OldRelationTag.new
-      tag.relation_id = relation_tags(:t1).relation_id
-      tag.version = 1
-      tag.k = "k"
-      tag.v = val * i
+      tag.v = "v" * i
       assert tag.valid?
     end
   end
 
   def test_length_key_invalid
-    ["k" * 256].each do |i|
-      tag = OldRelationTag.new
-      tag.relation_id = relation_tags(:t1).relation_id
-      tag.version = 1
-      tag.k = i
-      tag.v = "v"
-      assert !tag.valid?, "Key should be too long"
-      assert tag.errors[:k].any?
-    end
+    tag = create(:old_relation_tag)
+    tag.k = "k" * 256
+    assert !tag.valid?, "Key should be too long"
+    assert tag.errors[:k].any?
   end
 
   def test_length_value_invalid
-    ["k" * 256].each do |i|
-      tag = OldRelationTag.new
-      tag.relation_id = relation_tags(:t1).relation_id
-      tag.version = 1
-      tag.k = "k"
-      tag.v = i
-      assert !tag.valid?, "Value should be too long"
-      assert tag.errors[:v].any?
-    end
+    tag = create(:old_relation_tag)
+    tag.v = "v" * 256
+    assert !tag.valid?, "Value should be too long"
+    assert tag.errors[:v].any?
   end
 
   def test_empty_tag_invalid
@@ -62,11 +40,12 @@ class OldRelationTagTest < ActiveSupport::TestCase
   end
 
   def test_uniqueness
+    existing = create(:old_relation_tag)
     tag = OldRelationTag.new
-    tag.relation_id = relation_tags(:t1).relation_id
-    tag.version = relation_tags(:t1).version
-    tag.k = relation_tags(:t1).k
-    tag.v = relation_tags(:t1).v
+    tag.relation_id = existing.relation_id
+    tag.version = existing.version
+    tag.k = existing.k
+    tag.v = existing.v
     assert tag.new_record?
     assert !tag.valid?
     assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
index c11cdcf72889105538d2410bf953a135afb0e49c..d2aa4b6b6d8b78f77c95ab463d6e4b7e0e64ac6e 100644 (file)
@@ -8,6 +8,9 @@ class OldRelationTest < ActiveSupport::TestCase
   end
 
   def test_relation_tags
+    taglist_v3 = create_list(:old_relation_tag, 3, :old_relation => relations(:relation_with_versions_v3))
+    taglist_v4 = create_list(:old_relation_tag, 2, :old_relation => relations(:relation_with_versions_v4))
+
     relation = relations(:relation_with_versions_v1)
     tags = OldRelation.find(relation.id).old_tags.order(:k)
     assert_equal 0, tags.count
@@ -18,21 +21,19 @@ class OldRelationTest < ActiveSupport::TestCase
 
     relation = relations(:relation_with_versions_v3)
     tags = OldRelation.find(relation.id).old_tags.order(:k)
-    assert_equal 3, tags.count
-    assert_equal "testing", tags[0].k
-    assert_equal "added in relation version 3", tags[0].v
-    assert_equal "testing three", tags[1].k
-    assert_equal "added in relation version 3", tags[1].v
-    assert_equal "testing two", tags[2].k
-    assert_equal "added in relation version 3", tags[2].v
+    assert_equal taglist_v3.count, tags.count
+    taglist_v3.sort_by!(&:k).each_index do |i|
+      assert_equal taglist_v3[i].k, tags[i].k
+      assert_equal taglist_v3[i].v, tags[i].v
+    end
 
     relation = relations(:relation_with_versions_v4)
     tags = OldRelation.find(relation.id).old_tags.order(:k)
-    assert_equal 2, tags.count
-    assert_equal "testing", tags[0].k
-    assert_equal "added in relation version 3", tags[0].v
-    assert_equal "testing two", tags[1].k
-    assert_equal "modified in relation version 4", tags[1].v
+    assert_equal taglist_v4.count, tags.count
+    taglist_v4.sort_by!(&:k).each_index do |i|
+      assert_equal taglist_v4[i].k, tags[i].k
+      assert_equal taglist_v4[i].v, tags[i].v
+    end
   end
 
   def test_relation_members
@@ -100,6 +101,9 @@ class OldRelationTest < ActiveSupport::TestCase
   end
 
   def test_tags
+    taglist_v3 = create_list(:old_relation_tag, 3, :old_relation => relations(:relation_with_versions_v3))
+    taglist_v4 = create_list(:old_relation_tag, 2, :old_relation => relations(:relation_with_versions_v4))
+
     relation = relations(:relation_with_versions_v1)
     tags = OldRelation.find(relation.id).tags
     assert_equal 0, tags.size
@@ -110,15 +114,16 @@ class OldRelationTest < ActiveSupport::TestCase
 
     relation = relations(:relation_with_versions_v3)
     tags = OldRelation.find(relation.id).tags
-    assert_equal 3, tags.size
-    assert_equal "added in relation version 3", tags["testing"]
-    assert_equal "added in relation version 3", tags["testing two"]
-    assert_equal "added in relation version 3", tags["testing three"]
+    assert_equal taglist_v3.count, tags.count
+    taglist_v3.each do |tag|
+      assert_equal tag.v, tags[tag.k]
+    end
 
     relation = relations(:relation_with_versions_v4)
     tags = OldRelation.find(relation.id).tags
-    assert_equal 2, tags.size
-    assert_equal "added in relation version 3", tags["testing"]
-    assert_equal "modified in relation version 4", tags["testing two"]
+    assert_equal taglist_v4.count, tags.count
+    taglist_v4.each do |tag|
+      assert_equal tag.v, tags[tag.k]
+    end
   end
 end
index b8757d572e61f1d55cc2d7874dd668d4fa8bc86e..9a258ffb91f76fbab187dba69a71d2649b3025a0 100644 (file)
@@ -3,56 +3,34 @@ require "test_helper"
 class OldWayTagTest < ActiveSupport::TestCase
   api_fixtures
 
-  def test_tag_count
-    assert_equal 13, OldWayTag.count
-  end
-
   def test_length_key_valid
-    key = "k"
+    tag = create(:old_way_tag)
     (0..255).each do |i|
-      tag = OldWayTag.new
-      tag.way_id = way_tags(:t1).way_id
-      tag.version = 1
-      tag.k = key * i
-      tag.v = "v"
+      tag.k = "k" * i
       assert tag.valid?
     end
   end
 
   def test_length_value_valid
-    val = "v"
+    tag = create(:old_way_tag)
     (0..255).each do |i|
-      tag = OldWayTag.new
-      tag.way_id = way_tags(:t1).way_id
-      tag.version = 1
-      tag.k = "k"
-      tag.v = val * i
+      tag.v = "v" * i
       assert tag.valid?
     end
   end
 
   def test_length_key_invalid
-    ["k" * 256].each do |i|
-      tag = OldWayTag.new
-      tag.way_id = way_tags(:t1).way_id
-      tag.version = 1
-      tag.k = i
-      tag.v = "v"
-      assert !tag.valid?, "Key should be too long"
-      assert tag.errors[:k].any?
-    end
+    tag = create(:old_way_tag)
+    tag.k = "k" * 256
+    assert !tag.valid?, "Key should be too long"
+    assert tag.errors[:k].any?
   end
 
   def test_length_value_invalid
-    ["k" * 256].each do |i|
-      tag = OldWayTag.new
-      tag.way_id = way_tags(:t1).way_id
-      tag.version = 1
-      tag.k = "k"
-      tag.v = i
-      assert !tag.valid?, "Value should be too long"
-      assert tag.errors[:v].any?
-    end
+    tag = create(:old_way_tag)
+    tag.v = "v" * 256
+    assert !tag.valid?, "Value should be too long"
+    assert tag.errors[:v].any?
   end
 
   def test_empty_tag_invalid
@@ -62,11 +40,12 @@ class OldWayTagTest < ActiveSupport::TestCase
   end
 
   def test_uniqueness
+    existing = create(:old_way_tag)
     tag = OldWayTag.new
-    tag.way_id = way_tags(:t1).way_id
-    tag.version = way_tags(:t1).version
-    tag.k = way_tags(:t1).k
-    tag.v = way_tags(:t1).v
+    tag.way_id = existing.way_id
+    tag.version = existing.version
+    tag.k = existing.k
+    tag.v = existing.v
     assert tag.new_record?
     assert !tag.valid?
     assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
index 37dfccad346f59e50617a1525b4a7c966cf615bc..84255c8807d5432f2adf84de3b0eceffe13358f1 100644 (file)
@@ -38,6 +38,9 @@ class OldWayTest < ActiveSupport::TestCase
   end
 
   def test_way_tags
+    taglist_v3 = create_list(:old_way_tag, 3, :old_way => ways(:way_with_versions_v3))
+    taglist_v4 = create_list(:old_way_tag, 2, :old_way => ways(:way_with_versions_v4))
+
     way = ways(:way_with_versions_v1)
     tags = OldWay.find(way.id).old_tags.order(:k)
     assert_equal 0, tags.count
@@ -48,24 +51,25 @@ class OldWayTest < ActiveSupport::TestCase
 
     way = ways(:way_with_versions_v3)
     tags = OldWay.find(way.id).old_tags.order(:k)
-    assert_equal 3, tags.count
-    assert_equal "testing", tags[0].k
-    assert_equal "added in way version 3", tags[0].v
-    assert_equal "testing three", tags[1].k
-    assert_equal "added in way version 3", tags[1].v
-    assert_equal "testing two", tags[2].k
-    assert_equal "added in way version 3", tags[2].v
+    assert_equal taglist_v3.count, tags.count
+    taglist_v3.sort_by!(&:k).each_index do |i|
+      assert_equal taglist_v3[i].k, tags[i].k
+      assert_equal taglist_v3[i].v, tags[i].v
+    end
 
     way = ways(:way_with_versions_v4)
     tags = OldWay.find(way.id).old_tags.order(:k)
-    assert_equal 2, tags.count
-    assert_equal "testing", tags[0].k
-    assert_equal "added in way version 3", tags[0].v
-    assert_equal "testing two", tags[1].k
-    assert_equal "modified in way version 4", tags[1].v
+    assert_equal taglist_v4.count, tags.count
+    taglist_v4.sort_by!(&:k).each_index do |i|
+      assert_equal taglist_v4[i].k, tags[i].k
+      assert_equal taglist_v4[i].v, tags[i].v
+    end
   end
 
   def test_tags
+    taglist_v3 = create_list(:old_way_tag, 3, :old_way => ways(:way_with_versions_v3))
+    taglist_v4 = create_list(:old_way_tag, 2, :old_way => ways(:way_with_versions_v4))
+
     way = ways(:way_with_versions_v1)
     tags = OldWay.find(way.id).tags
     assert_equal 0, tags.size
@@ -76,29 +80,33 @@ class OldWayTest < ActiveSupport::TestCase
 
     way = ways(:way_with_versions_v3)
     tags = OldWay.find(way.id).tags
-    assert_equal 3, tags.size
-    assert_equal "added in way version 3", tags["testing"]
-    assert_equal "added in way version 3", tags["testing two"]
-    assert_equal "added in way version 3", tags["testing three"]
+    assert_equal taglist_v3.count, tags.count
+    taglist_v3.each do |tag|
+      assert_equal tag.v, tags[tag.k]
+    end
 
     way = ways(:way_with_versions_v4)
     tags = OldWay.find(way.id).tags
-    assert_equal 2, tags.size
-    assert_equal "added in way version 3", tags["testing"]
-    assert_equal "modified in way version 4", tags["testing two"]
+    assert_equal taglist_v4.count, tags.count
+    taglist_v4.each do |tag|
+      assert_equal tag.v, tags[tag.k]
+    end
   end
 
   def test_get_nodes_undelete
     way = ways(:way_with_versions_v3)
+    node_tag = create(:node_tag, :node => current_nodes(:node_with_versions))
+    node_tag2 = create(:node_tag, :node => current_nodes(:used_node_1))
     nodes = OldWay.find(way.id).get_nodes_undelete
     assert_equal 2, nodes.size
-    assert_equal [1.0, 1.0, 15, 4, { "testing" => "added in node version 3", "testing two" => "modified in node version 4" }, true], nodes[0]
-    assert_equal [3.0, 3.0, 3, 1, { "test" => "yes" }, true], nodes[1]
+    assert_equal [1.0, 1.0, 15, 4, { node_tag.k => node_tag.v }, true], nodes[0]
+    assert_equal [3.0, 3.0, 3, 1, { node_tag2.k => node_tag2.v }, true], nodes[1]
 
     way = ways(:way_with_redacted_versions_v2)
+    node_tag3 = create(:node_tag, :node => current_nodes(:invisible_node))
     nodes = OldWay.find(way.id).get_nodes_undelete
     assert_equal 2, nodes.size
-    assert_equal [3.0, 3.0, 3, 1, { "test" => "yes" }, true], nodes[0]
-    assert_equal [2.0, 2.0, 2, 1, { "testused" => "yes" }, false], nodes[1]
+    assert_equal [3.0, 3.0, 3, 1, { node_tag2.k => node_tag2.v }, true], nodes[0]
+    assert_equal [2.0, 2.0, 2, 1, { node_tag3.k => node_tag3.v }, false], nodes[1]
   end
 end
index ef635cc945855aeddc5e3ff2a650e613fe4dc949..f221f78cc9fac44c112b82f03f904e8503104e17 100644 (file)
@@ -3,52 +3,34 @@ require "test_helper"
 class RelationTagTest < ActiveSupport::TestCase
   api_fixtures
 
-  def test_relation_tag_count
-    assert_equal 10, RelationTag.count
-  end
-
   def test_length_key_valid
-    key = "k"
+    tag = create(:relation_tag)
     (0..255).each do |i|
-      tag = RelationTag.new
-      tag.relation_id = 1
-      tag.k = key * i
-      tag.v = "v"
+      tag.k = "k" * i
       assert tag.valid?
     end
   end
 
   def test_length_value_valid
-    val = "v"
+    tag = create(:relation_tag)
     (0..255).each do |i|
-      tag = RelationTag.new
-      tag.relation_id = 1
-      tag.k = "k"
-      tag.v = val * i
+      tag.v = "v" * i
       assert tag.valid?
     end
   end
 
   def test_length_key_invalid
-    ["k" * 256].each do |i|
-      tag = RelationTag.new
-      tag.relation_id = 1
-      tag.k = i
-      tag.v = "v"
-      assert !tag.valid?, "Key #{i} should be too long"
-      assert tag.errors[:k].any?
-    end
+    tag = create(:relation_tag)
+    tag.k = "k" * 256
+    assert !tag.valid?, "Key should be too long"
+    assert tag.errors[:k].any?
   end
 
   def test_length_value_invalid
-    ["v" * 256].each do |i|
-      tag = RelationTag.new
-      tag.relation_id = 1
-      tag.k = "k"
-      tag.v = i
-      assert !tag.valid?, "Value #{i} should be too long"
-      assert tag.errors[:v].any?
-    end
+    tag = create(:relation_tag)
+    tag.v = "v" * 256
+    assert !tag.valid?, "Value should be too long"
+    assert tag.errors[:v].any?
   end
 
   def test_empty_tag_invalid
@@ -58,10 +40,11 @@ class RelationTagTest < ActiveSupport::TestCase
   end
 
   def test_uniquness
+    existing = create(:relation_tag)
     tag = RelationTag.new
-    tag.relation_id = current_relation_tags(:t1).relation_id
-    tag.k = current_relation_tags(:t1).k
-    tag.v = current_relation_tags(:t1).v
+    tag.relation_id = existing.relation_id
+    tag.k = existing.k
+    tag.v = existing.v
     assert tag.new_record?
     assert !tag.valid?
     assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
index 028cd7d48fc95789aea4b132a09444d6fd7cc027..b095024a64b8c23a771b7fa1a5132b2d0d905ef4 100644 (file)
@@ -129,20 +129,25 @@ class RelationTest < ActiveSupport::TestCase
 
   def test_relation_tags
     relation = current_relations(:relation_with_versions)
+    taglist = create_list(:relation_tag, 2, :relation => relation)
+
     tags = Relation.find(relation.id).relation_tags.order(:k)
-    assert_equal 2, tags.count
-    assert_equal "testing", tags[0].k
-    assert_equal "added in relation version 3", tags[0].v
-    assert_equal "testing two", tags[1].k
-    assert_equal "modified in relation version 4", tags[1].v
+    assert_equal taglist.count, tags.count
+    taglist.sort_by!(&:k).each_index do |i|
+      assert_equal taglist[i].k, tags[i].k
+      assert_equal taglist[i].v, tags[i].v
+    end
   end
 
   def test_tags
     relation = current_relations(:relation_with_versions)
+    taglist = create_list(:relation_tag, 2, :relation => relation)
+
     tags = Relation.find(relation.id).tags
-    assert_equal 2, tags.size
-    assert_equal "added in relation version 3", tags["testing"]
-    assert_equal "modified in relation version 4", tags["testing two"]
+    assert_equal taglist.count, tags.count
+    taglist.each do |tag|
+      assert_equal tag.v, tags[tag.k]
+    end
   end
 
   def test_containing_relation_members
index d480849dd5c49336d44edbe4d8d56c6c39413bc8..f8f46cfaff85cc7b788397cd04d3983e5ad51464 100644 (file)
@@ -151,7 +151,7 @@ class UserTest < ActiveSupport::TestCase
 
   def test_user_preferred_editor
     user = users(:normal_user)
-    assert_equal nil, user.preferred_editor
+    assert_nil user.preferred_editor
     user.preferred_editor = "potlatch"
     assert_equal "potlatch", user.preferred_editor
     user.save!
@@ -161,7 +161,7 @@ class UserTest < ActiveSupport::TestCase
   end
 
   def test_visible
-    assert_equal 22, User.visible.count
+    assert_equal 23, User.visible.count
     assert_raise ActiveRecord::RecordNotFound do
       User.visible.find(users(:suspended_user).id)
     end
@@ -171,7 +171,7 @@ class UserTest < ActiveSupport::TestCase
   end
 
   def test_active
-    assert_equal 21, User.active.count
+    assert_equal 22, User.active.count
     assert_raise ActiveRecord::RecordNotFound do
       User.active.find(users(:inactive_user).id)
     end
@@ -184,7 +184,7 @@ class UserTest < ActiveSupport::TestCase
   end
 
   def test_identifiable
-    assert_equal 23, User.identifiable.count
+    assert_equal 24, User.identifiable.count
     assert_raise ActiveRecord::RecordNotFound do
       User.identifiable.find(users(:normal_user).id)
     end
@@ -244,8 +244,8 @@ class UserTest < ActiveSupport::TestCase
     user.delete
     assert_equal "user_#{user.id}", user.display_name
     assert user.description.blank?
-    assert_equal nil, user.home_lat
-    assert_equal nil, user.home_lon
+    assert_nil user.home_lat
+    assert_nil user.home_lon
     assert_equal false, user.image.file?
     assert_equal "deleted", user.status
     assert_equal false, user.visible?
index 46be06c9417c03b887de63b4fd12c74459223a4d..ae8be73b3f5183587e3e036b7e47f99546a5aac6 100644 (file)
@@ -3,52 +3,34 @@ require "test_helper"
 class WayTagTest < ActiveSupport::TestCase
   api_fixtures
 
-  def test_way_tag_count
-    assert_equal 6, WayTag.count
-  end
-
   def test_length_key_valid
-    key = "k"
+    tag = create(:way_tag)
     (0..255).each do |i|
-      tag = WayTag.new
-      tag.way_id = current_way_tags(:t1).way_id
-      tag.k = key * i
-      tag.v = current_way_tags(:t1).v
+      tag.k = "k" * i
       assert tag.valid?
     end
   end
 
   def test_length_value_valid
-    val = "v"
+    tag = create(:way_tag)
     (0..255).each do |i|
-      tag = WayTag.new
-      tag.way_id = current_way_tags(:t1).way_id
-      tag.k = "k"
-      tag.v = val * i
+      tag.v = "v" * i
       assert tag.valid?
     end
   end
 
   def test_length_key_invalid
-    ["k" * 256].each do |i|
-      tag = WayTag.new
-      tag.way_id = current_way_tags(:t1).way_id
-      tag.k = i
-      tag.v = "v"
-      assert !tag.valid?, "Key #{i} should be too long"
-      assert tag.errors[:k].any?
-    end
+    tag = create(:way_tag)
+    tag.k = "k" * 256
+    assert !tag.valid?, "Key should be too long"
+    assert tag.errors[:k].any?
   end
 
   def test_length_value_invalid
-    ["v" * 256].each do |i|
-      tag = WayTag.new
-      tag.way_id = current_way_tags(:t1).way_id
-      tag.k = "k"
-      tag.v = i
-      assert !tag.valid?, "Value #{i} should be too long"
-      assert tag.errors[:v].any?
-    end
+    tag = create(:way_tag)
+    tag.v = "v" * 256
+    assert !tag.valid?, "Value should be too long"
+    assert tag.errors[:v].any?
   end
 
   def test_empty_tag_invalid
@@ -58,10 +40,11 @@ class WayTagTest < ActiveSupport::TestCase
   end
 
   def test_uniqueness
+    existing = create(:way_tag)
     tag = WayTag.new
-    tag.way_id = current_way_tags(:t1).way_id
-    tag.k = current_way_tags(:t1).k
-    tag.v = current_way_tags(:t1).v
+    tag.way_id = existing.way_id
+    tag.k = existing.k
+    tag.v = existing.v
     assert tag.new_record?
     assert !tag.valid?
     assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
index 6c8b0f80b52eb60e1196b456417017981a9cac37..807b71d5bf63d200b151ec7f80e0a6a9eda37751 100644 (file)
@@ -165,20 +165,23 @@ class WayTest < ActiveSupport::TestCase
 
   def test_way_tags
     way = current_ways(:way_with_versions)
+    taglist = create_list(:way_tag, 2, :way => way)
     tags = Way.find(way.id).way_tags.order(:k)
-    assert_equal 2, tags.count
-    assert_equal "testing", tags[0].k
-    assert_equal "added in way version 3", tags[0].v
-    assert_equal "testing two", tags[1].k
-    assert_equal "modified in way version 4", tags[1].v
+    assert_equal taglist.count, tags.count
+    taglist.sort_by!(&:k).each_index do |i|
+      assert_equal taglist[i].k, tags[i].k
+      assert_equal taglist[i].v, tags[i].v
+    end
   end
 
   def test_tags
     way = current_ways(:way_with_versions)
+    taglist = create_list(:way_tag, 2, :way => way)
     tags = Way.find(way.id).tags
-    assert_equal 2, tags.size
-    assert_equal "added in way version 3", tags["testing"]
-    assert_equal "modified in way version 4", tags["testing two"]
+    assert_equal taglist.count, tags.count
+    taglist.each do |tag|
+      assert_equal tag.v, tags[tag.k]
+    end
   end
 
   def test_containing_relation_members
index 88cfe4831150440f4b67c2af6c41a61965768521..9633989cda4d109278d828b049688545b832159b 100644 (file)
@@ -21,37 +21,29 @@ module ActiveSupport
       set_fixture_class :current_nodes => Node
       set_fixture_class :nodes => OldNode
 
-      fixtures :current_node_tags, :node_tags
-      set_fixture_class :current_node_tags => NodeTag
-      set_fixture_class :node_tags => OldNodeTag
-
       fixtures :current_ways
       set_fixture_class :current_ways => Way
 
-      fixtures :current_way_nodes, :current_way_tags
+      fixtures :current_way_nodes
       set_fixture_class :current_way_nodes => WayNode
-      set_fixture_class :current_way_tags => WayTag
 
       fixtures :ways
       set_fixture_class :ways => OldWay
 
-      fixtures :way_nodes, :way_tags
+      fixtures :way_nodes
       set_fixture_class :way_nodes => OldWayNode
-      set_fixture_class :way_tags => OldWayTag
 
       fixtures :current_relations
       set_fixture_class :current_relations => Relation
 
-      fixtures :current_relation_members, :current_relation_tags
+      fixtures :current_relation_members
       set_fixture_class :current_relation_members => RelationMember
-      set_fixture_class :current_relation_tags => RelationTag
 
       fixtures :relations
       set_fixture_class :relations => OldRelation
 
-      fixtures :relation_members, :relation_tags
+      fixtures :relation_members
       set_fixture_class :relation_members => OldRelationMember
-      set_fixture_class :relation_tags => OldRelationTag
 
       fixtures :gpx_files, :gps_points, :gpx_file_tags
       set_fixture_class :gpx_files => Trace
@@ -77,6 +69,19 @@ module ActiveSupport
       end
     end
 
+    ##
+    # work round minitest insanity that causes it to tell you
+    # to use assert_nil to test for nil, which is fine if you're
+    # comparing to a nil constant but not if you're comparing
+    # an expression that might be nil sometimes
+    def assert_equal_allowing_nil(exp, act, msg = nil)
+      if exp.nil?
+        assert_nil act, msg
+      else
+        assert_equal exp, act, msg
+      end
+    end
+
     ##
     # for some reason assert_equal a, b fails when the relations are
     # actually equal, so this method manually checks the fields...