]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/2596'
authorTom Hughes <tom@compton.nu>
Wed, 22 Apr 2020 12:44:17 +0000 (13:44 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 22 Apr 2020 12:44:17 +0000 (13:44 +0100)
67 files changed:
.erb-lint.yml
.rubocop.yml
.rubocop_todo.yml
Gemfile
Gemfile.lock
app/assets/stylesheets/small.scss
app/controllers/issues_controller.rb
app/models/client_application.rb
app/models/trace.rb
app/views/layouts/_head.html.erb
app/views/layouts/_meta.html.erb [new file with mode: 0644]
app/views/layouts/error.html.erb
app/views/notifier/gpx_success.html.erb
app/views/traces/show.html.erb
app/views/users/account.html.erb
app/views/users/new.html.erb
config/initializers/konacha.rb [deleted file]
config/locales/ast.yml
config/locales/br.yml
config/locales/de.yml
config/locales/en.yml
config/locales/eo.yml
config/locales/fa.yml
config/locales/fr.yml
config/locales/gl.yml
config/locales/ia.yml
config/locales/is.yml
config/locales/it.yml
config/locales/lv.yml
config/locales/mk.yml
config/locales/pl.yml
config/locales/pt-BR.yml
config/locales/pt-PT.yml
config/locales/tr.yml
config/locales/uk.yml
config/locales/zh-TW.yml
lib/auth.rb
test/controllers/api/amf_controller_test.rb
test/controllers/api/changeset_comments_controller_test.rb
test/controllers/api/changesets_controller_test.rb
test/controllers/api/nodes_controller_test.rb
test/controllers/api/relations_controller_test.rb
test/controllers/api/traces_controller_test.rb
test/controllers/api/ways_controller_test.rb
test/controllers/diary_entries_controller_test.rb
test/controllers/issues_controller_test.rb
test/controllers/messages_controller_test.rb
test/controllers/traces_controller_test.rb
test/controllers/user_blocks_controller_test.rb
test/controllers/users_controller_test.rb
test/helpers/application_helper_test.rb
test/helpers/browse_helper_test.rb
test/lib/i18n_test.rb
test/lib/locale_test.rb
test/lib/password_hash_test.rb
test/lib/utf8_test.rb
test/models/client_application_test.rb
test/models/node_test.rb
test/models/note_test.rb
test/models/oauth_nonce_test.rb
test/models/oauth_token_test.rb
test/models/old_node_test.rb
test/models/redaction_test.rb
test/models/request_token_test.rb
test/models/trace_test.rb
test/models/user_preference_test.rb
test/models/user_test.rb

index 7737aee0634b0cdb6ee70497740f16700daa6029..0c729d38f8426e5f564d2bb311ffb2f230b42b8f 100644 (file)
@@ -16,14 +16,14 @@ linters:
         Enabled: false
       Layout/TrailingWhitespace:
         Enabled: false
-      Naming/FileName:
-        Enabled: false
-      Style/FrozenStringLiteralComment:
-        Enabled: false
       Lint/UselessAssignment:
         Enabled: false
+      Naming/FileName:
+        Enabled: false
       Rails/OutputSafety:
         Enabled: false
+      Style/FrozenStringLiteralComment:
+        Enabled: false
   SelfClosingTag:
     enabled: false
   SpaceInHtmlTag:
index 1c41c027a68b40d4e79fb07f081cd891ae31a731..d9fcce7c67a9abe93226b4f6df91b67c799533fa 100644 (file)
@@ -1,11 +1,13 @@
 inherit_from: .rubocop_todo.yml
 
 require:
+  - rubocop-minitest
   - rubocop-performance
   - rubocop-rails
 
 AllCops:
   TargetRubyVersion: 2.5
+  NewCops: enable
   Exclude:
     - 'vendor/**/*'
 
index 06a9c76f07b2ac4dcf2752113aa2cfee8dc5f45b..307a23f4b035c56539cc9d7dd2d7c841252758f0 100644 (file)
@@ -9,6 +9,7 @@
 # Work around erblint issues.
 # https://github.com/openstreetmap/openstreetmap-website/issues/2472
 require:
+  - rubocop-minitest
   - rubocop-performance
   - rubocop-rails
 
diff --git a/Gemfile b/Gemfile
index 7c96217346a29af732c925d31f4258d8047b0c59..f79e13a8f8ae87b422fa4fb9e8283b1d7b720a0c 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -138,21 +138,18 @@ end
 
 # Gems needed for running tests
 group :test do
-  gem "minitest", "~> 5.1", :platforms => [:ruby_19, :ruby_20]
-  gem "rails-controller-testing"
-  gem "rubocop"
-  gem "rubocop-performance"
-  gem "rubocop-rails"
-  gem "webmock"
-end
-
-# Needed in development as well so rake can see konacha tasks
-group :development, :test do
   gem "capybara", ">= 2.15"
   gem "coveralls", :require => false
   gem "erb_lint", :require => false
   gem "factory_bot_rails"
+  gem "minitest", "~> 5.1"
   gem "poltergeist"
   gem "puma", "~> 3.11"
+  gem "rails-controller-testing"
+  gem "rubocop"
+  gem "rubocop-minitest"
+  gem "rubocop-performance"
+  gem "rubocop-rails"
   gem "selenium-webdriver"
+  gem "webmock"
 end
index 80c30dc5befeba2eb7ca35c12c4d9a49b6317d6a..9cd8f51c5cb9cb6310370ba41145a0f7a816a893 100644 (file)
@@ -73,10 +73,10 @@ GEM
     ast (2.4.0)
     autoprefixer-rails (9.7.6)
       execjs
-    aws-eventstream (1.0.3)
-    aws-partitions (1.295.0)
-    aws-sdk-core (3.93.0)
-      aws-eventstream (~> 1.0, >= 1.0.2)
+    aws-eventstream (1.1.0)
+    aws-partitions (1.298.0)
+    aws-sdk-core (3.94.0)
+      aws-eventstream (~> 1, >= 1.0.2)
       aws-partitions (~> 1, >= 1.239.0)
       aws-sigv4 (~> 1.1)
       jmespath (~> 1.0)
@@ -87,7 +87,7 @@ GEM
       aws-sdk-core (~> 3, >= 3.83.0)
       aws-sdk-kms (~> 1)
       aws-sigv4 (~> 1.1)
-    aws-sigv4 (1.1.1)
+    aws-sigv4 (1.1.2)
       aws-eventstream (~> 1.0, >= 1.0.2)
     better_errors (2.6.0)
       coderay (>= 1.0.0)
@@ -322,7 +322,7 @@ GEM
       omniauth-oauth2 (~> 1.4)
     openstreetmap-deadlock_retry (1.3.0)
     parallel (1.19.1)
-    parser (2.7.1.0)
+    parser (2.7.1.1)
       ast (~> 2.4.0)
     pg (1.2.3)
     poltergeist (1.18.1)
@@ -390,7 +390,7 @@ GEM
     rinku (2.0.6)
     rotp (5.1.0)
       addressable (~> 2.5)
-    rubocop (0.81.0)
+    rubocop (0.82.0)
       jaro_winkler (~> 1.5.1)
       parallel (~> 1.10)
       parser (>= 2.7.0.1)
@@ -398,9 +398,11 @@ GEM
       rexml
       ruby-progressbar (~> 1.7)
       unicode-display_width (>= 1.4.0, < 2.0)
+    rubocop-minitest (0.9.0)
+      rubocop (>= 0.74)
     rubocop-performance (1.5.2)
       rubocop (>= 0.71.0)
-    rubocop-rails (2.5.1)
+    rubocop-rails (2.5.2)
       activesupport
       rack (>= 1.1)
       rubocop (>= 0.72.0)
@@ -412,7 +414,7 @@ GEM
       crass (~> 1.0.2)
       nokogiri (>= 1.8.0)
       nokogumbo (~> 2.0)
-    sassc (2.2.1)
+    sassc (2.3.0)
       ffi (~> 1.9)
     sassc-rails (2.1.2)
       railties (>= 4.0.0)
@@ -437,7 +439,7 @@ GEM
       actionpack (>= 4.0)
       activesupport (>= 4.0)
       sprockets (>= 3.0.0)
-    strong_migrations (0.6.3)
+    strong_migrations (0.6.4)
       activerecord (>= 5)
     sync (0.5.0)
     term-ansicolor (1.7.1)
@@ -538,6 +540,7 @@ DEPENDENCIES
   rinku (>= 2.0.6)
   rotp
   rubocop
+  rubocop-minitest
   rubocop-performance
   rubocop-rails
   sanitize
index e5634e11d0e71aaa28df3ca0aaf72cdd2044a0ac..83b112ce7a0241367564379cc3214a68ddd412ee 100644 (file)
@@ -91,34 +91,7 @@ body.small {
   .compact-hide {
     display: inline-block;
   }
-
-  &.map-layout {
-    #sidebar, #map {
-      position: relative;
-      overflow-x: hidden;
-      width: 100%;
-      height: 50%;
-    }
-
-    .overlay-sidebar {
-      #sidebar {
-        position: absolute;
-        width: 300px;
-        height: auto;
-        overflow: hidden;
-      }
-
-      #map {
-        height: 100%;
-      }
-    }
-
-    #map-ui {
-      z-index: 9999;
-      width: 100%;
-      overflow-y: scroll;
-    }
-  }
+  
 
   .overlay-sidebar #sidebar .welcome.visible {
     display: none;
@@ -181,3 +154,33 @@ body.small {
   }
 
 }
+
+@media (max-width: 767.98px) {
+  body.map-layout {
+    #sidebar, #map {
+      position: relative;
+      overflow-x: hidden;
+      width: 100%;
+      height: 50%;
+    }
+
+    .overlay-sidebar {
+      #sidebar {
+        position: absolute;
+        width: 300px;
+        height: auto;
+        overflow: hidden;
+      }
+
+      #map {
+        height: 100%;
+      }
+    }
+
+    #map-ui {
+      z-index: 9999;
+      width: 100%;
+      overflow-y: scroll;
+    }
+  }
+}
index d136e7230a4b7baf3ccd6eebfda383843598fdc2..cd3584f027536b00e067f04050d234893b68f921 100644 (file)
@@ -82,6 +82,6 @@ class IssuesController < ApplicationController
   def find_issue
     @issue = Issue.visible_to(current_user).find(params[:id])
   rescue ActiveRecord::RecordNotFound
-    head :not_found
+    redirect_to :controller => "errors", :action => "not_found"
   end
 end
index 67ff075f1adb5bd1d8d6109077cdefd08233c26d..4e3dffb998aba0081a61dd56b145420f47a7f3df 100644 (file)
@@ -39,9 +39,9 @@ class ClientApplication < ApplicationRecord
 
   validates :key, :presence => true, :uniqueness => true
   validates :name, :url, :secret, :presence => true
-  validates :url, :format => %r{\Ahttp(s?)://(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(/|/([\w#!:.?+=&%@!\-/]))?}i
-  validates :support_url, :allow_blank => true, :format => %r{\Ahttp(s?)://(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(/|/([\w#!:.?+=&%@!\-/]))?}i
-  validates :callback_url, :allow_blank => true, :format => %r{\A[a-z][a-z0-9.+-]*://(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(/|/([\w#!:.?+=&%@!\-/]))?}i
+  validates :url, :format => /\A#{URI::DEFAULT_PARSER.make_regexp(%w[http https])}\z/
+  validates :support_url, :allow_blank => true, :format => /\A#{URI::DEFAULT_PARSER.make_regexp(%w[http https])}\z/
+  validates :callback_url, :allow_blank => true, :format => /\A#{URI::DEFAULT_PARSER.make_regexp}\z/
 
   before_validation :generate_keys, :on => :create
 
index d500784af882892ab065d8134fcfdf236c9be353..959d82e1c790b720173d7596d4cdca4ea80d0e48 100644 (file)
@@ -117,7 +117,7 @@ class Trace < ApplicationRecord
   end
 
   def mime_type
-    filetype = `/usr/bin/file -Lbz #{trace_name}`.chomp
+    filetype = Open3.capture2("/usr/bin/file", "-Lbz", trace_name).first.chomp
     gzipped = filetype =~ /gzip compressed/
     bzipped = filetype =~ /bzip2 compressed/
     zipped = filetype =~ /Zip archive/
@@ -139,7 +139,7 @@ class Trace < ApplicationRecord
   end
 
   def extension_name
-    filetype = `/usr/bin/file -Lbz #{trace_name}`.chomp
+    filetype = Open3.capture2("/usr/bin/file", "-Lbz", trace_name).first.chomp
     gzipped = filetype =~ /gzip compressed/
     bzipped = filetype =~ /bzip2 compressed/
     zipped = filetype =~ /Zip archive/
@@ -208,8 +208,7 @@ class Trace < ApplicationRecord
   end
 
   def xml_file
-    # TODO: *nix specific, could do to work on windows... would be functionally inferior though - check for '.gz'
-    filetype = `/usr/bin/file -Lbz #{trace_name}`.chomp
+    filetype = Open3.capture2("/usr/bin/file", "-Lbz", trace_name).first.chomp
     gzipped = filetype =~ /gzip compressed/
     bzipped = filetype =~ /bzip2 compressed/
     zipped = filetype =~ /Zip archive/
index a9d127835ebb097fd3de77735416e8c7c10502ba..3300dc89cb85e9b7e3b8a9a7298bf38cce71d273 100644 (file)
@@ -9,31 +9,7 @@
   <%= stylesheet_link_tag "screen-#{dir}", :media => "screen" %>
   <%= stylesheet_link_tag "print-#{dir}", :media => "print" %>
   <%= stylesheet_link_tag "leaflet-all", :media => "screen, print" %>
-  <%= favicon_link_tag "favicon.ico" if browser.ie? %>
-  <% [57, 60, 72, 76, 114, 120, 144, 152, 180].each do |size| -%>
-  <%= favicon_link_tag "apple-touch-icon-#{size}x#{size}.png", :rel => "apple-touch-icon", :sizes => "#{size}x#{size}", :type => "image/png" %>
-  <% end -%>
-  <%= favicon_link_tag "favicon-32x32.png", :rel => "icon", :sizes => "32x32", :type => "image/png" %>
-  <%= favicon_link_tag "favicon-194x194.png", :rel => "icon", :sizes => "194x194", :type => "image/png" %>
-  <%= 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("tab-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") %>
-  <%= tag("meta", :name => "msapplication-TileImage", :content => image_path("mstile-144x144.png")) %>
-  <%= tag("meta", :name => "theme-color", :content => "#ffffff") %>
-  <%= canonical_tag %>
-  <% if Settings.key?(:publisher_url) -%>
-  <%= tag("link", :rel => "publisher", :href => Settings.publisher_url) %>
-  <% end -%>
-  <%= tag("link", :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => asset_path("osm.xml")) %>
-  <%= tag("meta", :name => "description", :content => "OpenStreetMap is the free wiki world map.") %>
-  <%= opengraph_tags(@title) %>
-  <% if flash[:piwik_goal] -%>
-  <%= tag("meta", :name => "piwik-goal", :content => flash[:piwik_goal]) %>
-  <% end -%>
+  <%= render :partial => "layouts/meta" %>
   <%= yield :head %>
   <%= yield :auto_discovery_link_tag %>
   <%= csrf_meta_tag %>
diff --git a/app/views/layouts/_meta.html.erb b/app/views/layouts/_meta.html.erb
new file mode 100644 (file)
index 0000000..dc08424
--- /dev/null
@@ -0,0 +1,25 @@
+<%= favicon_link_tag "favicon.ico" if browser.ie? %>
+<% [57, 60, 72, 76, 114, 120, 144, 152, 180].each do |size| -%>
+<%= favicon_link_tag "apple-touch-icon-#{size}x#{size}.png", :rel => "apple-touch-icon", :sizes => "#{size}x#{size}", :type => "image/png" %>
+<% end -%>
+<%= favicon_link_tag "favicon-32x32.png", :rel => "icon", :sizes => "32x32", :type => "image/png" %>
+<%= favicon_link_tag "favicon-194x194.png", :rel => "icon", :sizes => "194x194", :type => "image/png" %>
+<%= 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("tab-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") %>
+<%= tag("meta", :name => "msapplication-TileImage", :content => image_path("mstile-144x144.png")) %>
+<%= tag("meta", :name => "theme-color", :content => "#ffffff") %>
+<%= canonical_tag %>
+<% if Settings.key?(:publisher_url) -%>
+<%= tag("link", :rel => "publisher", :href => Settings.publisher_url) %>
+<% end -%>
+<%= tag("link", :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => asset_path("osm.xml")) %>
+<%= tag("meta", :name => "description", :content => "OpenStreetMap is the free wiki world map.") %>
+<%= opengraph_tags(@title) %>
+<% if flash[:piwik_goal] -%>
+<%= tag("meta", :name => "piwik-goal", :content => flash[:piwik_goal]) %>
+<% end -%>
index 2b769958e5018d536aff6c5c195f952e211e6d7e..db6179769ded9e4c8a23d67812b6a40d5dd7e27b 100644 (file)
@@ -4,6 +4,7 @@
     <meta charset="utf-8">
     <title>OpenStreetMap</title>
     <%= stylesheet_link_tag "errors", :media => "screen" %>
+    <%= render :partial => "layouts/meta" %>
   </head>
   <body>
     <a href="<%= root_path %>">
index 7601a621dc752c8d427628ce601e9b873721955f..1571f3798041b42916e54dd981b2a62af989c99e 100644 (file)
@@ -2,5 +2,6 @@
 
 <p>
   <%= render :partial => "gpx_description" %>
-  <%= t "notifier.gpx_notification.success.loaded_successfully", :trace_points => @trace_points, :possible_points => @possible_points %>
+  <%= t("notifier.gpx_notification.success.loaded_successfully",
+        :trace_points => @trace_points, :possible_points => @possible_points, :count => @possible_points) %>
 </p>
index 19d1b06b823e7b6c7a6a3d45bd8b0858aaf4ae2d..f7517c8021b22ddc167ec849a50ac4c333e19282 100644 (file)
@@ -22,7 +22,7 @@
   <% if @trace.inserted? %>
   <tr>
     <td><%= t ".points" %></td>
-    <td><%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/, '\1,') %></td></tr>
+    <td><%= number_with_delimiter(@trace.size) %></td></tr>
   <tr>
     <td><%= t ".start_coordinates" %></td>
     <td><div class="d-inline"><span class="latitude"><%= @trace.latitude %></span>; <span class="longitude"><%= @trace.longitude %></span></div> (<%= link_to t(".map"), :controller => "site", :action => "index", :mlat => @trace.latitude, :mlon => @trace.longitude, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%= link_to t(".edit"), :controller => "site", :action => "edit", :gpx => @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>)</td>
index fadb74f4c4abcec2cd1d88d813a14e6f476c8c61..51c933b5d51f7341dc2a0091f4b219ffdb19e4ae 100644 (file)
@@ -48,7 +48,7 @@
   <fieldset>
     <div class="standard-form-row">
       <label class="standard-label"><%= t ".external auth" %></label>
-      <%= f.select :auth_provider, Auth::PROVIDERS %>
+      <%= f.select :auth_provider, Auth.providers %>
       <%= f.text_field :auth_uid %>
       <span class="form-help deemphasize">(<a href="<%= t ".openid.link" %>" target="_new"><%= t ".openid.link text" %></a>)</span>
     </div>
index ba0987c33a85a3ef156a2b6404d781e1d468647f..6f97a284a583559d94c977fb2ab0de4f332c4ae6 100644 (file)
@@ -52,7 +52,7 @@
           <label for="openid_url" class="standard-label">
             <%= t ".external auth" %>
           </label>
-          <%= f.select(:auth_provider, Auth::PROVIDERS, :default => "", :tabindex => 4) %>
+          <%= f.select(:auth_provider, Auth.providers, :default => "", :tabindex => 4) %>
           <%= f.text_field(:auth_uid, :tabindex => 5) %>
           <%= f.error_message_on(:auth_uid) %>
         </div>
diff --git a/config/initializers/konacha.rb b/config/initializers/konacha.rb
deleted file mode 100644 (file)
index f0145f5..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-if defined?(Konacha)
-  Konacha.configure do |config|
-    require "capybara/poltergeist"
-    config.spec_dir = "test/javascripts"
-    config.driver   = :poltergeist
-  end
-end
index 36e983fa609050d4b9aeeed1210ff619630c9380..84f1edba78a1a9b53bb2173022e2f7904b5a5d96 100644 (file)
@@ -49,6 +49,7 @@ ast:
       diary_comment: Comentariu del diariu
       diary_entry: Entrada del diariu
       friend: Amigu
+      issue: Problema
       language: Llingua
       message: Mensaxe
       node: Nuedu
@@ -65,6 +66,7 @@ ast:
       relation: Rellación
       relation_member: Miembru de la rellación
       relation_tag: Etiqueta de la rellación
+      report: Informe
       session: Sesión
       trace: Traza
       tracepoint: Puntu de traza
@@ -161,6 +163,15 @@ ast:
     remote:
       name: Control remotu
       description: Control remotu (JOSM o Merkaartor)
+  auth:
+    providers:
+      none: Nengunu
+      openid: OpenID
+      google: Google
+      facebook: Facebook
+      windowslive: Windows Live
+      github: GitHub
+      wikipedia: Wikipedia
   api:
     notes:
       comment:
@@ -1211,8 +1222,10 @@ ast:
         more_info_2: 'se puen alcontrar en:'
       success:
         subject: '[OpenStreetMap] importación GPX correuta'
-        loaded_successfully: cargóse correutamente con %{trace_points} de %{possible_points}
-          puntos posibles.
+        loaded_successfully:
+          one: cargóse correutamente con %{trace_points} de 1 puntu posible.
+          other: cargóse correutamente con %{trace_points} de %{possible_points} puntos
+            posibles.
     signup_confirm:
       subject: '[OpenStreetMap] Bienllegáu a OpenStreetMap'
       greeting: ¡Hola!
@@ -2580,6 +2593,12 @@ ast:
         out: Amenorgar
       locate:
         title: Ver el mio allugamientu
+        metersPopup:
+          one: Tas a menos d'un metru d'esti puntu
+          other: Tas a menos de %{count} metros d'esti puntu
+        feetPopup:
+          one: Tas a menos d'un pie d'esti puntu
+          other: Tas a menos de %{count} pies d'esti puntu
       base:
         standard: Estándar
         cycle_map: Mapa ciclista
@@ -2596,6 +2615,11 @@ ast:
       donate_link_text: <a class='donate-attr' href='%{donate_url}'>Faiga una donación</a>
       terms: <a href='%{terms_url}' target='_blank'>Condiciones del sitiu web y de
         la API</a>
+      thunderforest: Mosaicu cortesía de <a href='%{thunderforest_url}' target='_blank'>Andy
+        Allan</a>
+      hotosm: Estilu del mosaicu por <a href='%{hotosm_url}' target='_blank'>Equipu
+        Humanitariu d'OpenStreetMap</a> agospiáu por <a href='%{osmfrance_url}' target='_blank'>OpenStreetMap
+        Francia</a>
     site:
       edit_tooltip: Editar el mapa
       edit_disabled_tooltip: Aumenta pa editar el mapa
index 635a851832e0dfcea11a1a65681ce62cb764200f..5f11470a1f89de5befc89b626f5605df522f390d 100644 (file)
@@ -1196,8 +1196,11 @@ br:
         more_info_2: 'a c''hall bezañ kavet war :'
       success:
         subject: '[OpenStreetMap] Graet eo an enporzhiadenn GPX'
-        loaded_successfully: karget gant %{trace_points} diwar %{possible_points}
-          poent posupl.
+        loaded_successfully:
+          one: karget ervat gant %{trace_points} diwar 1 poent posupl.
+          two: karget ervat gant %{trace_points}
+          other: karget ervat gant %{trace_points} diwar %{possible_points} poent
+            posupl.
     signup_confirm:
       subject: '[OpenStreetMap] Degemer mat en OpenStreetMap'
       greeting: Demat !
index f0d96ee4b6cf0b21c4cd88c3ea4ea0846ebfabc2..c8dfcfd3538037b6ab46d4d7de31f8d6260c612a 100644 (file)
@@ -80,20 +80,20 @@ de:
         create: Veröffentlichen
         update: Aktualisieren
       issue_comment:
-        create: Kommentar hinzufügen
+        create: Kommentieren
       message:
         create: Senden
       client_application:
         create: Registrieren
         update: Bearbeiten
       redaction:
-        create: Redaction erstellen
-        update: Redaction speichern
+        create: Schwärzen
+        update: Schwärzung speichern
       trace:
         create: Hochladen
         update: Änderungen speichern
       user_block:
-        create: Sperre einrichten
+        create: Sperren
         update: Sperre aktualisieren
   activerecord:
     errors:
@@ -104,7 +104,7 @@ de:
       acl: Zugriffssteuerungsliste
       changeset: Änderungssatz
       changeset_tag: Änderungssatz-Attribut
-      country: Staat
+      country: Land
       diary_comment: Blog-Kommentar
       diary_entry: Blog-Eintrag
       friend: Freund
@@ -113,7 +113,7 @@ de:
       message: Nachricht
       node: Knoten
       node_tag: Knoten-Attribut
-      notifier: Benachrichtiger
+      notifier: Melder
       old_node: Alter Knoten
       old_node_tag: Altes Knoten-Attribut
       old_relation: Alte Relation
@@ -127,18 +127,18 @@ de:
       relation_tag: Relation-Attribut
       report: Meldung
       session: Sitzung
-      trace: Track
-      tracepoint: Trackpunkt
-      tracetag: Track-Attribut
+      trace: Spur
+      tracepoint: Spurmarke
+      tracetag: Spur-Attribut
       user: Benutzer
       user_preference: Benutzereinstellung
       user_token: Benutzer-Token
-      way: Linie
-      way_node: Linienknoten
-      way_tag: Linie-Attribut
+      way: Weg
+      way_node: Wegmarke
+      way_tag: Weg-Attribut
     attributes:
       diary_comment:
-        body: Textkörper
+        body: Text
       diary_entry:
         user: Benutzer
         title: Betreff
@@ -160,7 +160,7 @@ de:
       message:
         sender: Absender
         title: Betreff
-        body: Textkörper
+        body: Inhalt
         recipient: Empfänger
       user:
         email: E-Mail
@@ -247,12 +247,12 @@ de:
       rss:
         title: OpenStreetMap Hinweise
         description_area: Übersicht der gemeldeten, kommentierten oder geschlossen
-          Hinweise/Fehler im Bereich [(%{min_lat}|%{min_lon}) -- (%{max_lat}|%{max_lon})].
-        description_item: Ein RSS-Feed für Hinweis/Fehler %{id}
-        opened: neuer Hinweis/Fehler (in der Nähe von %{place})
+          Hinweise im Bereich [(%{min_lat}|%{min_lon}) -- (%{max_lat}|%{max_lon})].
+        description_item: Ein RSS-Feed für Hinweis %{id}
+        opened: neuer Hinweis (in der Nähe von %{place})
         commented: neuer Kommentar (in der Nähe von %{place})
-        closed: geschlossener Hinweis/Fehler (in der Nähe von %{place})
-        reopened: reaktivierter Hinweis/Fehler (in der Nähe von %{place})
+        closed: geschlossener Hinweis (in der Nähe von %{place})
+        reopened: reaktivierter Hinweis (in der Nähe von %{place})
       entry:
         comment: Kommentieren
         full: Vollständiger Hinweis
@@ -267,11 +267,11 @@ de:
     closed_by_html: Geschlossen <abbr title='%{title}'>%{time}</abbr> von %{user}
     version: Version
     in_changeset: Änderungssatz
-    anonymous: Anonym
+    anonymous: anonym
     no_comment: (kein Kommentar)
     part_of: Teil von
     download_xml: XML herunterladen
-    view_history: Chronik anzeigen
+    view_history: Verlauf anzeigen
     view_details: Details anzeigen
     location: 'Standort:'
     changeset:
@@ -279,8 +279,8 @@ de:
       belongs_to: Autor
       node: Knoten (%{count})
       node_paginated: Knoten (%{x}–%{y} von %{count})
-      way: Linien (%{count})
-      way_paginated: Linien (%{x}–%{y} von %{count})
+      way: Wege (%{count})
+      way_paginated: Wege (%{x}–%{y} von %{count})
       relation: Relationen (%{count})
       relation_paginated: Relationen (%{x}–%{y} von %{count})
       comment: Kommentare (%{count})
@@ -298,23 +298,23 @@ de:
         sobald der Änderungssatz geschlossen ist.
     node:
       title_html: 'Knoten: %{name}'
-      history_title_html: 'Chronik des Knotens: %{name}'
+      history_title_html: 'Knotenverlauf: %{name}'
     way:
-      title_html: 'Linie: %{name}'
-      history_title_html: 'Chronik der Linie: %{name}'
+      title_html: 'Weg: %{name}'
+      history_title_html: 'Wegverlauf: %{name}'
       nodes: Knoten
       also_part_of_html:
-        one: Teil der Linie %{related_ways}
-        other: Teil der Linien %{related_ways}
+        one: Teil des Wegs %{related_ways}
+        other: Teil der Wege %{related_ways}
     relation:
       title_html: 'Relation: %{name}'
-      history_title_html: 'Chronik der Relation: %{name}'
+      history_title_html: 'Relationverlauf: %{name}'
       members: Mitglieder
     relation_member:
       entry_role_html: '%{type} %{name} als %{role}'
       type:
         node: Knoten
-        way: Linie
+        way: Weg
         relation: Relation
     containing_relation:
       entry_html: Relation %{relation_name}
@@ -322,35 +322,34 @@ de:
     not_found:
       sorry: '%{type} mit der Nummer %{id} konnte leider nicht gefunden werden.'
       type:
-        node: Der Knoten
-        way: Die Linie
+        node: Knoten
+        way: Weg
         relation: Die Relation
         changeset: Der Änderungssatz
         note: Hinweis
     timeout:
-      sorry: Entschuldigung, es dauerte zu lange, die Daten für %{type} mit der ID
-        %{id} abzurufen.
+      sorry: Es dauerte leider zu lange, die Daten für %{type} mit der ID %{id} abzurufen.
       type:
-        node: den Knoten
-        way: die Linie
+        node: Knoten
+        way: Weg
         relation: die Relation
         changeset: den Änderungssatz
         note: Hinweis
     redacted:
-      redaction: Redigierung %{id}
-      message_html: 'Version %{version} diese%{type} kann nicht angezeigt werden,
-        da hier redigiert wurde. Weitere Informationen gibt es hier: %{redaction_link}.'
+      redaction: Schwärzung %{id}
+      message_html: 'Weil hier etwas geschwärzt wurde kann Version %{version} diese%{type}
+        nicht angezeigt werden. Mehr erfahren: %{redaction_link}.'
       type:
         node: s Knotens
-        way: r Linie
+        way: s Weges
         relation: r Relation
     start_rjs:
-      feature_warning: Laden von %{num_features} Funktionen, was deinen Browser langsam
-        machen kann. Willst du diese Daten wirklich anzeigen?
+      feature_warning: Laden von %{num_features} Funktionen kann deinen Browser langsamer
+        machen oder einfrieren. Sollen diese Daten wirklich angezeigt werden?
       load_data: Daten laden
       loading: Lade …
     tag_details:
-      tags: Attribute
+      tags: Tags
       wiki_link:
         key: Die Wiki-Erläuterungsseite für den Schlüssel %{key}
         tag: Die Wiki-Erläuterungsseite für das Attribut %{key}=%{value}
@@ -360,12 +359,12 @@ de:
       telephone_link: '%{phone_number} anrufen'
       colour_preview: Farbe %{colour_value} Vorschau
     note:
-      title: 'Kartenfehler: %{id}'
-      new_note: Neuer Kartenfehler
+      title: 'Hinweis: %{id}'
+      new_note: Neuer Hinweis
       description: Beschreibung
-      open_title: Unerledigter Kartenfehler Nr. %{note_name}
-      closed_title: Erledigter Kartenfehler Nr. %{note_name}
-      hidden_title: Versteckter Kartenfehler Nr. %{note_name}
+      open_title: Ungelöster Hinweis Nr. %{note_name}
+      closed_title: Erledigter Hinweis Nr. %{note_name}
+      hidden_title: Versteckter Hinweis Nr. %{note_name}
       opened_by: Erstellt von %{user} <abbr title='%{exact_time}'>%{when}</abbr>
       opened_by_anonymous: Erstellt von Anonym <abbr title='%{exact_time}'>%{when}</abbr>
       commented_by: Kommentar von %{user} <abbr title='%{exact_time}'>%{when}</abbr>
@@ -1293,9 +1292,10 @@ de:
         more_info_2: 'finden sich hier:'
       success:
         subject: '[OpenStreetMap] GPX-Import erfolgreich'
-        loaded_successfully: |-
-          %{trace_points} von
-          %{possible_points} möglichen Punkten wurden erfolgreich importiert.
+        loaded_successfully:
+          one: mit %{trace_points} von 1 möglichem Punkt erfolgreich geladen.
+          other: mit %{trace_points} von %{possible_points} möglichen Punkten erfolgreich
+            geladen.
     signup_confirm:
       subject: '[OpenStreetMap] Willkommen bei OpenStreetMap'
       greeting: Hallo!
@@ -2706,6 +2706,12 @@ de:
         out: Verkleinern
       locate:
         title: Aktuellen Standort anzeigen
+        metersPopup:
+          one: Du bist weniger als 1 Meter von diesem Punkt entfernt
+          other: Du bist weniger als %{count} Meter von diesem Punkt entfernt
+        feetPopup:
+          one: Du bist weniger als 1 Fuß von diesem Punkt entfernt
+          other: Du bist weniger als %{count} Fuß von diesem Punkt entfernt
       base:
         standard: Standard
         cycle_map: Radfahrerkarte
index 089c31a44301c9d8459f166b24e86f9636884203..f9ea78ef3704abf956ec42d09d7e31a736d6866f 100644 (file)
@@ -1210,7 +1210,9 @@ en:
         import_failures_url: "https://wiki.openstreetmap.org/wiki/GPX_Import_Failures"
       success:
         subject: "[OpenStreetMap] GPX Import success"
-        loaded_successfully: loaded successfully with %{trace_points} out of a possible %{possible_points} points.
+        loaded_successfully:
+          one: loaded successfully with %{trace_points} out of a possible 1 point.
+          other: loaded successfully with %{trace_points} out of a possible %{possible_points} points.
     signup_confirm:
       subject: "[OpenStreetMap] Welcome to OpenStreetMap"
       greeting: "Hi there!"
index 7484f2921898cf90c9058a9fa43a3e2ff3ae8fb2..9845e2e37aa4a9c006a8c95f7b93bb42f473b51e 100644 (file)
@@ -1232,8 +1232,10 @@ eo:
         more_info_2: 'ilin vi povas trovi je:'
       success:
         subject: '[OpenStreetMap] GPX-dosiero enportita sukcese'
-        loaded_successfully: estas sukcese ŝargita kun %{trace_points} el %{possible_points}
-          punktoj.
+        loaded_successfully:
+          one: estas sukcese enlegita kun %{trace_points} el 1 punkto.
+          other: estas sukcese enlegita kun %{trace_points} el %{possible_points}
+            punktoj.
     signup_confirm:
       subject: '[OpenStreetMap] Bonvenon al OpenStreetMap'
       greeting: Saluton!
index 72ca3dfee832b055f941212b231efef16dd0cc55..e58b44c07d48db98aba8e9743e1a85919dfbee06 100644 (file)
@@ -78,6 +78,7 @@ fa:
       diary_comment: نظر بر روزنوشت
       diary_entry: روزنوشت
       friend: دوست
+      issue: مسئله
       language: زبان
       message: پیام
       node: گره
@@ -662,6 +663,7 @@ fa:
           trail: دنباله
           trunk: بزرگراه
           trunk_link: بزرگراه
+          turning_loop: حلقهٔ گردش
           unclassified: جادهٔ فرعی
           "yes": جاده
         historic:
@@ -1066,7 +1068,7 @@ fa:
       reports: گزارش‌ها
       last_updated: آخرین روزآمدسازی
       last_updated_time_html: <abbr title='%{title}'>%{time}</abbr>
-      last_updated_time_user_html: <abbr title='%{title}'>%{time}</abbr> ØªÙ\88سط %{user}
+      last_updated_time_user_html: <abbr title='%{title}'>%{time}</abbr> Ø¨Ù\87 Ø¯Ø³Øª %{user}
       link_to_reports: نمایش گزارش‌ها
       reports_count:
         one: 1 گزارش
@@ -1088,7 +1090,7 @@ fa:
         other: '%{count} گزارش'
       report_created_at: اولین بار %{datetime} گزارش شد
       last_resolved_at: آخرین بار %{datetime} حل شد
-      last_updated_at: Ø¢Ø®Ø±Û\8cÙ\86 Ø¨Ø§Ø± Ø¯Ø± %{datetime} ØªÙ\88سط %{displayname} Ø±Ù\88زآÙ\85د Ø´Ø¯Ù\87 Ø§Ø³Øª.
+      last_updated_at: Ø¢Ø®Ø±Û\8cÙ\86 Ø±Ù\88زآÙ\85دسازÛ\8c Ø¯Ø± %{datetime} Ø¨Ù\87 Ø¯Ø³Øª %{displayname}
       resolve: حل شد
       ignore: نادیده گرفتن
       reopen: بازگشایی
@@ -1104,6 +1106,8 @@ fa:
       ignored: وضعیت مسئله به «نادیده گرفته شد» تغییر کرده است
     reopen:
       reopened: وضعیت مسئله به «باز» تغییر داده کرده است
+    comments:
+      comment_from_html: نظر از %{user_link} در %{comment_created_at}
     reports:
       reported_by_html: در %{updated_at}،‏ %{user} آن را به‌عنوان %{category} گزارش
         کرد
@@ -1239,8 +1243,10 @@ fa:
         import_failures_url: https://wiki.openstreetmap.org/wiki/Fa:GPX_Import_Failures
       success:
         subject: موفقیت درون‌برد GPX‏ [OpenStreetMap]
-        loaded_successfully: با موفقیت و با %{trace_points} نقطه از %{possible_points}
-          نقطهٔ ممکن روی وبسایت قرار گرفته است.
+        loaded_successfully:
+          one: با موفقیت %{trace_points} نقطه از 1 نقطهٔ ممکن بار شد.
+          other: با موفقیت %{trace_points} نقطه از %{possible_points} نقطهٔ ممکن بار
+            شد.
     signup_confirm:
       subject: به OpenStreetMap خوش آمدید [OpenStreetMap]
       greeting: ‎سلام بر شما!
@@ -1425,12 +1431,16 @@ fa:
         حق‌نشر و پروانه</a> را ببینید.'
       legal_title: قانونی
       legal_1_html: |-
-        این سایت و خدمات فراوان دیگری که به آن وابسته‌اند به‌طور رسمی و به‌نمایندگی از جامعه توسط <a href='https://osmfoundation.org/'>بنیاد OpenStreetMap</a> ‏(OSMF) هدایت می‌شود. استفاده از همهٔ خدماتی که تحت رهبری OSMF قرار دارد منوط به پذیرش <a href="https://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy">
+        این سایت و خدمات فراوان دیگری که به آن وابسته‌اند به‌طور رسمی و به‌نمایندگی از جامعه تحت رهبری <a href='https://osmfoundation.org/'>بنیاد OpenStreetMap</a> ‏(OSMF) دایر است. استفاده از همهٔ خدماتی که تحت رهبری OSMF قرار دارد منوط به پذیرش <a href="https://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy">
         سیاست استفادهٔ قابل‌قبول</a>، <a href="https://wiki.osmfoundation.org/wiki/Terms_of_Use">شرایط استفاده</a> و <a href="https://wiki.osmfoundation.org/wiki/Privacy_Policy">سیاست حریم خصوصی</a> ماست.
         <br>
         اگر در رابطه با پروانه، حق‌نشر یا سایر موارد قانونی سؤالی دارید لطفاً <a href='https://osmfoundation.org/Contact'>با OSMF تماس بگیرید</a>.
         <br>
         OpenStreetMap،‏ نشان‌وارهٔ ذره‌بین‌دار و State of the Map <a href="https://wiki.osmfoundation.org/wiki/Trademark_Policy">نشان‌های تجاری ثبت‌شده و متعلق به بنیاد OpenStreetMap</a> هستند.
+      legal_2_html: |-
+        اگر دربارهٔ پروانه، حق‌نشر یا سایر مسائل حقوقی پرسشی دارید لطفاً <a href='https://osmfoundation.org/Contact'>با OSMF تماس بگیرید</a>.
+        <br>
+        OpenStreetMap، نشان‌وارهٔ ذره‌بین‌دار و State of the Map <a href="https://wiki.osmfoundation.org/wiki/Trademark_Policy">نشان‌های تجاری متعلق به OSMF</a> هستند.
       partners_title: شرکای تجاری
     copyright:
       foreign:
@@ -1575,7 +1585,7 @@ fa:
       anon_edits_link_text: بفهمید چرا این‌طور است.
       flash_player_required_html: برای استفاده از  Potlatch (ویرایشگر فلش  OpenStreetMap)
         به فلش‌پلیر نیاز دارید. می‌توانید <a href="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">فلش‌پلیر
-        را از  Adobe.com دانلود کنید</a>. <a href="http://wiki.openstreetmap.org/wiki/Editing">چندین
+        را از  Adobe.com دانلود کنید</a>. <a href="http://wiki.openstreetmap.org/wiki/Fa:Editing">چندین
         گزینهٔ دیگر</a> نیز برای ویرایش OpenStreetMap وجود دارد.
       potlatch_unsaved_changes: شما تغییرات ذخیره‌نشده دارید. (برای ذخیره در Potlatch،
         اگر در حالت زنده ویرایش می‌کنید، باید راه یا نقطهٔ جاری را از حالت انتخاب
@@ -1932,7 +1942,7 @@ fa:
       identifiable: قابل شناسایی
       private: خصوصی
       trackable: قابل ردیابی
-      by: ØªÙ\88سط
+      by: Ø§Ø²
       in: در
       map: نقشه
     index:
@@ -2182,6 +2192,8 @@ fa:
       heading_ct: شرایط مشارکت‌کننده
       read and accept with tou: لطفاً توافق‌نامهٔ مشارکت‌کننده و شرایط استفاده را
         مطالعه کنید و هر دو گزینه را علامت بزنید و سپس روی دکمهٔ ادامه کلیک کنید.
+      contributor_terms_explain: شرایط این توافقنامه برای مشارکت‌های گذشته و آیندهٔ
+        شما نافذ است.
       read_ct: شرایط مشارکت‌کننده را خواندم و با آن موافق هستم
       read_tou: شرایط استفاده را خواندم و با آن موافق هستم
       consider_pd: علاوه بر موارد بالا، می‌پذیرم که مشارکت‌هایم در مالکیت عمومی باشد.
@@ -2217,7 +2229,7 @@ fa:
       my comments: نظرات من
       oauth settings: تنظیمات oauth
       blocks on me: مسدودی‌های من
-      blocks by me: بوک های توسط من
+      blocks by me: مسدودی‌های به دست من
       send message: ارسال پیام
       diary: روزنوشت
       edits: ویرایش‌ها
@@ -2482,7 +2494,7 @@ fa:
       empty: هنوز مسدودیتی ساخته نشده.
     revoke:
       title: لغو مسدودی از %{block_on}
-      heading_html: لغو مسدودی از %{block_on}، مسدودشده توسط %{block_by}
+      heading_html: ابطال مسدودی %{block_on}، مسدودشده به دست %{block_by}
       time_future: این مسدودی در %{time} پایان می یابد.
       past: این مسدودی %{time} پایان یافته و اکنون قابل‌لغو نیست.
       confirm: مطمئنید می‌خواهید این مسدودی را لغو کنید؟
@@ -2505,14 +2517,14 @@ fa:
     blocks_on:
       title: مسدودی‌های کاربری %{name}
       heading_html: فهرست مسدودی‌های %{name}
-      empty: '%{name} تاکنون مسدود نشده است.'
+      empty: '%{name} تا کنون مسدود نشده است.'
     blocks_by:
       title: مسدودسازی‌های %{name}
       heading_html: فهرست مسدودسازی‌های %{name}
-      empty: '%{name} تاکنون مسدود نکرده.'
+      empty: '%{name} تا کنون مسدود نکرده است.'
     show:
-      title: '%{block_on} ØªÙ\88سط %{block_by} مسدود شده'
-      heading_html: '%{block_on} ØªÙ\88سط %{block_by} مسدود شده'
+      title: '%{block_on} Ø¨Ù\87 Ø¯Ø³Øª %{block_by} مسدود شده'
+      heading_html: '%{block_on} Ø¨Ù\87 Ø¯Ø³Øª %{block_by} مسدود شده'
       created: زمان ایجاد
       status: وضعیت
       show: نمایش
@@ -2581,6 +2593,12 @@ fa:
         out: کوچک‌نمایی
       locate:
         title: نمایش مکان من
+        metersPopup:
+          one: شما در یک متری این نقطه هستید
+          other: شما در %{count} متری این نقطه هستید
+        feetPopup:
+          one: شما در یک فوتی این نقطه هستید
+          other: شما در %{count} فوتی این نقطه هستید
       base:
         standard: استاندارد
         cycle_map: نقشه دوچرخه
@@ -2596,6 +2614,11 @@ fa:
       copyright: © <a href='%{copyright_url}'>مشارکت‌کنندگان OpenStreetMap</a>
       donate_link_text: <a class='donate-attr' href='%{donate_url}'>کمک مالی</a>
       terms: <a href='%{terms_url}' target='_blank'>شرایط وبسایت و API</a>
+      thunderforest: کاشی‌ها با لطف <a href='%{thunderforest_url}' target='_blank'>Andy
+        Allan</a>
+      hotosm: سبک کاشی‌ها از <a href='%{hotosm_url}' target='_blank'>Humanitarian
+        OpenStreetMap Team</a> میزبانی با <a href='%{osmfrance_url}' target='_blank'>اوپن‌استریت‌مپ
+        فرانسه </a>
     site:
       edit_tooltip: ویرایش نقشه
       edit_disabled_tooltip: برای ویرایش نقشه بزرگنمایی کنید
index ccafbe3fe3de6b0651bece31811f7006bcb7a178..e7d5e5af31cb38a04ce8d108a2a94ca34588459a 100644 (file)
@@ -1297,8 +1297,10 @@ fr:
         more_info_2: 'peuvent être trouvés sur :'
       success:
         subject: '[OpenStreetMap] Import GPX réussi'
-        loaded_successfully: s’est chargé correctement avec %{trace_points} des %{possible_points}
-          points possibles.
+        loaded_successfully:
+          one: s’est chargé correctement avec %{trace_points} du point possible.
+          other: s’est chargé correctement avec %{trace_points} des %{possible_points}
+            points possibles.
     signup_confirm:
       subject: '[OpenStreetMap] Bienvenue dans OpenStreetMap'
       greeting: Bonjour !
index 8dc4d62e19a1eeea302e5a0d8f25f5a858a60c17..ad2dbbdd993974ae073a5aaee6d2c15c84834ea3 100644 (file)
@@ -923,7 +923,7 @@ gl:
           chemist: Farmacia
           clothes: Tenda de roupa
           computer: Tenda informática
-          confectionery: Pastelaría
+          confectionery: Tenda de larpeiradas
           convenience: Tenda de ultramarinos
           copyshop: Copistaría
           cosmetics: Tenda de cosméticos
@@ -2102,7 +2102,7 @@ gl:
       register now: Rexístrese agora
       with username: 'Xa tes unha conta no OpenStreetMap? Accede ó sistema co teu
         nome de usuario e contrasinal:'
-      with external: 'Ou ben, empregue un servizo de terceiros para accederes:'
+      with external: 'Ou ben, emprega un servizo de terceiros para acceder:'
       new to osm: É novo no OpenStreetMap?
       to make changes: Para facer as modificacións nos datos do OpenStreetMap, cómpre
         ter unha conta.
@@ -2194,7 +2194,7 @@ gl:
       external auth: 'Autenticación de terceiros:'
       password: 'Contrasinal:'
       confirm password: 'Confirmar o contrasinal:'
-      use external auth: Ou ben, empregue un servizo de terceiros para acceder
+      use external auth: Ou ben, emprega un servizo de terceiros para acceder
       auth no password: Coa autenticación de terceiros non se precisa un contrasinal,
         aínda que hai algunhas ferramentas e servidores que aínda a solicitan.
       continue: Rexistrarse
index f6c3a471752c1392ec92e302f3772a35cef67106..c4fcf7c1788ebeb688a8d4c2737ace77453fc3bf 100644 (file)
@@ -1227,8 +1227,11 @@ ia:
         more_info_2: 'los se trova a:'
       success:
         subject: '[OpenStreetMap] Importation GPX succedite'
-        loaded_successfully: ha essite cargate con successo con %{trace_points} ex
-          un maximo de %{possible_points} punctos.
+        loaded_successfully:
+          one: ha essite cargate con successo con %{trace_points} ex un maximo de
+            1 puncto.
+          other: ha essite cargate con successo con %{trace_points} ex un maximo de
+            %{possible_points} punctos.
     signup_confirm:
       subject: '[OpenStreetMap] Benvenite a OpenStreetMap'
       greeting: Bon die!
index b2e842e4d64c2e0b40ebf074612ee6b424658217..0d376e98fe9d238e828baf5277238460fc3481ef 100644 (file)
@@ -320,14 +320,11 @@ is:
         síðan</abbr>
       commented_by: Umsögn frá %{user} <abbr title='%{exact_time}'> %{when}</abbr>
       commented_by_anonymous: Umsögn frá nafnlausum notanda <abbr title='%{exact_time}'>%{when}</abbr>
-      closed_by: Leyst af %{user} <abbr title='%{exact_time}'>fyrir %{when} síðan</abbr>
-      closed_by_anonymous: Leyst af nafnlausum notanda fyrir <abbr title='%{exact_time}'>%{when}
-        síðan</abbr>
-      reopened_by: Endurvirkjað af %{user} <abbr title='%{exact_time}'>fyrir %{when}
-        síðan</abbr>
-      reopened_by_anonymous: Endurvirkjað af nafnlausum notanda fyrir <abbr title='%{exact_time}'>%{when}
-        síðan</abbr>
-      hidden_by: Falið af %{user} <abbr title='%{exact_time}'>fyrir %{when} síðan</abbr>
+      closed_by: Leyst af %{user} <abbr title='%{exact_time}'> %{when}</abbr>
+      closed_by_anonymous: Leyst af nafnlausum notanda fyrir <abbr title='%{exact_time}'>%{when}</abbr>
+      reopened_by: Endurvirkjað af %{user} <abbr title='%{exact_time}'> %{when}</abbr>
+      reopened_by_anonymous: Endurvirkjað af nafnlausum notanda fyrir <abbr title='%{exact_time}'>%{when}</abbr>
+      hidden_by: Falið af %{user} <abbr title='%{exact_time}'> %{when}</abbr>
       report: Tilkynna þennan minnispunkt
     query:
       title: Rannsaka fitjur
@@ -1241,8 +1238,10 @@ is:
         import_failures_url: https://wiki.openstreetmap.org/wiki/GPX_Import_Failures
       success:
         subject: '[OpenStreetMap] GPX skrá innflutt'
-        loaded_successfully: var innflutt með %{trace_points} punkta af %{possible_points}
-          mögulegum.
+        loaded_successfully:
+          one: var hlaðið inn með %{trace_points} af 1 punkti mögulegum.
+          other: var hlaðið inn með %{trace_points} punktum af %{possible_points}
+            mögulegum.
     signup_confirm:
       subject: '[OpenStreetMap] Velkomin í OpenStreetMap'
       greeting: Hæ þú!
@@ -1439,10 +1438,12 @@ is:
       legal_1_html: "Þetta vefsvæði ásamt mörgum tengdum þjónustum er formlega rekið
         af\n<a href='https://osmfoundation.org/'>OpenStreetMap Foundation</a> (OSMF)
         \nfyrir hönd samfélagsins. Notkun allrar þjónustu á vegum OSMF fellur undir
-        \n<a href=\"https://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">notkunarskilmála
-        okkar</a> og einnig <a href=\"https://wiki.osmfoundation.org/wiki/Privacy_Policy\">persónuverndarstefnu
-        okkar</a>\n.<br> \nEndilega <a href='https://osmfoundation.org/Contact'>hafðu
-        samband við OSMF</a> \nef þú ert með spurningar eða beiðnir varðandi notkunarleyfi,
+        \n<a href=\"https://wiki.osmfoundation.org/wiki/Terms_of_Use\">notkunarskilmála
+        okkar</a>, <a href=\"https://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">ásættanlega
+        notkunarskilmála</a> og einnig <a href=\"https://wiki.osmfoundation.org/wiki/Privacy_Policy\">persónuverndarstefnu
+        okkar</a>."
+      legal_2_html: "Endilega <a href='https://osmfoundation.org/Contact'>hafðu samband
+        við OSMF</a> \nef þú ert með spurningar eða beiðnir varðandi notkunarleyfi,
         höfundarrétt eða önnur lögfræðileg málefni.\n<br>\nOpenStreetMap, táknmerkið
         með stækkunarglerinu og ástand kortsins eru <a href=\"https://wiki.osmfoundation.org/wiki/Trademark_Policy\">skrásett
         vörumerki OSMF</a>."
@@ -1781,7 +1782,7 @@ is:
           - lundur
           retail: Smásölusvæði
           industrial: Iðnaðarsvæði
-          commercial: Skrifstoðusvæði
+          commercial: Verslunarsvæði
           heathland: Heiðalönd
           lake:
           - Vatn
index 92c1a27502d90301289f5a8626e6252cddd8d55a..91f727600df4275b6821351d9bab963d32ad59e9 100644 (file)
@@ -1269,8 +1269,10 @@ it:
         more_info_2: 'possono essere trovate su:'
       success:
         subject: '[OpenStreetMap] Importazione GPX completata con successo'
-        loaded_successfully: caricato con successo con %{trace_points} dei possibili
-          %{possible_points} punti.
+        loaded_successfully:
+          one: caricato con successo con %{trace_points} di 1 punto possibile.
+          other: caricato con successo con %{trace_points} dei possibili %{possible_points}
+            punti.
     signup_confirm:
       subject: '[OpenStreetMap] Benvenuti su OpenStreetMap'
       greeting: Ehilà!
index d692f3e6a9d1d3379168b473c34ebbbaeb7ac7e3..077d6b7e7e8d7ffd968113ec17427de975107d79 100644 (file)
@@ -131,6 +131,14 @@ lv:
     remote:
       name: Attālinātā palaišana
       description: Attālinātā palaišana  (JOSM vai Merkaartor)
+  auth:
+    providers:
+      openid: OpenID
+      google: Google
+      facebook: Facebook
+      windowslive: Windows Live
+      github: GitHub
+      wikipedia: Vikipēdija
   api:
     notes:
       comment:
@@ -366,7 +374,9 @@ lv:
     diary_comment:
       comment_from_html: Komentārs no %{link_user} @ %{comment_created_at}
       hide_link: Paslēpt šo komentāru
+      unhide_link: Atcelt komentāra slēpšanu
       confirm: Apstiprināt
+      report: Ziņot par šo komentāru
     location:
       location: 'Atrašanās vieta:'
       view: Skatīt
@@ -387,7 +397,7 @@ lv:
       post: Publicēt
       when: Kad
       comment: Komentārs
-      newer_comments: Jaunākie komentāri
+      newer_comments: Jaunāki komentāri
       older_comments: Vecāki komentāri
   geocoder:
     search:
@@ -541,11 +551,13 @@ lv:
           bus_guideway: Vadāmais Autobuss
           bus_stop: Autobusa pietura
           construction: Automaģistrāle būvniecības stadijā
+          corridor: Koridors
           cycleway: Veloceliņš
           elevator: Lifts
           emergency_access_point: Ārkārtas piekļuves punkts
           footway: Taka
           ford: Fjords
+          give_way: Dodiet ceļu zīme
           living_street: Dzīvojamā zona
           milestone: Ceļa stabs
           motorway: Automaģistrāle
@@ -674,6 +686,7 @@ lv:
           lighthouse: Bāka
           mine: Raktuves
           pipeline: Cauruļvads
+          surveillance: Novērošana
           tower: Tornis
           watermill: Ūdens dzirnavas
           water_tower: Ūdens tornis
@@ -743,6 +756,7 @@ lv:
         place:
           allotments: Mazdārziņi
           city: Pilsēta
+          city_block: Pilsētas kvartāls
           country: Valsts
           county: Apgabals
           farm: Saimniecība
@@ -859,8 +873,10 @@ lv:
           stationery: Kancelejas preču veikals
           supermarket: Lielveikals
           tailor: Drēbnieks
+          tobacco: Tabakas veikals
           toys: Rotaļlietu veikals
           travel_agency: Tūrisma aģentūra
+          tyres: Riepu veikals
           video: Video veikals
           wine: Vīna veikals
           "yes": Veikals
@@ -932,6 +948,7 @@ lv:
       search: Meklēt
       status: Statuss
       reports: Ziņojumi
+      link_to_reports: Skatīt ziņojumus
       states:
         ignored: Ignorēts
         open: Atvērt
index f257bd6d2ba83f02879b2760fc3ceb9822ed618e..269467c2c78dbf9609a416fd37a83a64f41fc62b 100644 (file)
@@ -1230,8 +1230,9 @@ mk:
         import_failures_url: https://wiki.openstreetmap.org/wiki/GPX_Import_Failures?uselang=mk
       success:
         subject: '[OpenStreetMap] Успешен увоз на GPX-податотека'
-        loaded_successfully: успешно се вчита со %{trace_points} од вкупно можни %{possible_points}
-          точки.
+        loaded_successfully:
+          one: успешно вчитана %{trace_points} од можната една точка.
+          other: успешно вчитани %{trace_points} од можните %{possible_points} точки.
     signup_confirm:
       subject: '[OpenStreetMap] Добре дојдовте на OpenStreetMap'
       greeting: Здраво!
index b6cc58b1c046ef3d8a06eef668ce292be1f6dc75..513533b2a60c84c786a1aa1a91666bb08cece04e 100644 (file)
@@ -100,6 +100,7 @@ pl:
       diary_comment: Komentarz do dziennika
       diary_entry: Wpis do dziennika
       friend: Znajomy
+      issue: problem
       language: Język
       message: Wiadomość
       node: Węzeł
@@ -116,6 +117,7 @@ pl:
       relation: Relacja
       relation_member: Człon relacji
       relation_tag: Tag relacji
+      report: raport
       session: Sesja
       trace: Ślad
       tracepoint: Punkt śladu
@@ -1295,8 +1297,11 @@ pl:
         import_failures_url: http://wiki.openstreetmap.org/wiki/GPX_Import_Failures
       success:
         subject: '[OpenStreetMap] Zaimportowano plik GPX'
-        loaded_successfully: wczytano wraz z %{trace_points} z %{possible_points}
-          punktów łącznie.
+        loaded_successfully:
+          one: wczytano wraz z %{trace_points} z 1 punktu łącznie.
+          few: wczytano wraz z %{trace_points} z %{possible_points} punktów łącznie.
+          many: wczytano wraz z %{trace_points} z %{possible_points} punktów łącznie.
+          other: wczytano wraz z %{trace_points} z %{possible_points} punktów łącznie.
     signup_confirm:
       subject: '[OpenStreetMap] Witamy w OpenStreetMap'
       greeting: Cześć!
@@ -2794,7 +2799,7 @@ pl:
         onramp_left: Skręć w lewo na łącznik
         endofroad_left_without_exit: Na końcu tej drogi skręć w lewo w kierunku %{name}
         merge_left_without_exit: Skręć w lewo w kierunku %{name}
-        fork_left_without_exit: Na rozwidleniu dróg skręć w prawo w kierunku %{name}
+        fork_left_without_exit: Na rozwidleniu dróg skręć w lewo w kierunku %{name}
         slight_left_without_exit: Lekko w lewo w %{name}
         via_point_without_exit: (przez punkt)
         follow_without_exit: Jedź wzdłuż %{name}
index bc487287a54f3678d48f22a75546205619967120..7f74583de0f024f2d85ae9b2e6656ee4e6eea022 100644 (file)
@@ -23,6 +23,7 @@
 # Author: Gusta
 # Author: Jgpacker
 # Author: L
+# Author: Leonardo9387
 # Author: Leosls
 # Author: Luckas
 # Author: Luckas Blade
@@ -1275,7 +1276,7 @@ pt-BR:
       success:
         subject: '[OpenStreetMap] Sucesso ao importar arquivo GPX'
         loaded_successfully: |-
-          carregado com sucesso com %{trace_points} pontos além dos
+          carregado com sucesso com %{trace_points} de um 1 possível ponto.|carregado com sucesso com %{trace_points} de um possível
           %{possible_points} pontos possíveis."
     signup_confirm:
       subject: '[OpenStreetMap] Bem-vindo(a) ao OpenStreetMap'
index bef0ff02127f09d45a17809dfc566c0e8d3d81e5..187d20724266bf51e2e9de79aca497dfcff5d592 100644 (file)
@@ -1229,18 +1229,18 @@ pt-PT:
   notifier:
     diary_comment_notification:
       subject: '[OpenStreetMap] %{user} comentou uma publicação de diário'
-      hi: Olá %{to_user},
+      hi: Olá, %{to_user}.
       header: '%{from_user} comentou a publicação de diário OpenStreetMap com o assunto
         %{subject}:'
       footer: Também podes ler o comentário em %{readurl} e comentar em %{commenturl}
         ou responder em %{replyurl}
     message_notification:
-      hi: Olá %{to_user},
+      hi: Olá, %{to_user}.
       header: '%{from_user} enviou-te uma mensagem através do OpenStreetMap com o
         assunto %{subject}:'
       footer_html: Também podes ler a mensagem em %{readurl} e responder em %{replyurl}
     friend_notification:
-      hi: Olá %{to_user},
+      hi: Olá, %{to_user}.
       subject: '[OpenStreetMap] %{user} adicionou-te como amigo'
       had_added_you: '%{user} adicionou-te como amigo no OpenStreetMap.'
       see_their_profile: Podes ver o perfil dele em %{userurl}.
@@ -1324,7 +1324,7 @@ pt-PT:
           perto de %{place}.'
       details: Podes ver mais detalhes sobre a nota em %{url}.
     changeset_comment_notification:
-      hi: Olá %{to_user},
+      hi: Olá, %{to_user}.
       greeting: Olá,
       commented:
         subject_own: '[OpenStreetMap] %{commenter} comentou um dos teus conjuntos
@@ -1594,10 +1594,10 @@ pt-PT:
       user_page_link: página de utilizador
       anon_edits_html: (%{link})
       anon_edits_link_text: Descobre a que se deve isto.
-      flash_player_required_html: Precisas do Flash instalado e ativado para usar
-        o Potlatch, o editor Flash do OpenStreetMap. Podes <a href="https://get.adobe.com/flashplayer/">transferir
-        o Flash do sítio Adobe.com</a>. <a href="https://wiki.openstreetmap.org/wiki/Editing">Também
-        estão disponíveis outras opções</a> para editar o OpenStreetMap.
+      flash_player_required_html: Precisas do Flash Player instalado e ativado para
+        usar o Potlatch, o editor Flash do OpenStreetMap. Podes <a href="https://get.adobe.com/flashplayer/">transferir
+        o Flash do sítio Adobe.com</a>.<br><a href="https://wiki.openstreetmap.org/wiki/Editing">Também
+        há outras opções disponíveis</a> para editares o OpenStreetMap.
       potlatch_unsaved_changes: Tens alterações por gravar. (Para gravar no Potlatch,
         deves desmarcar o ponto ou linha atual, se estiveres a editar no modo direto,
         ou clicar no botão gravar se este estiver disponível.)
@@ -1963,7 +1963,7 @@ pt-PT:
       map: mapa
     index:
       public_traces: Rotas de GPS Públicas
-      my_traces: As minhas rotas GPS
+      my_traces: As Minhas Rotas GPS
       public_traces_from: Rotas GPS públicas do utilizador %{user}
       description: Explorar as rotas GPS enviadas recentemente
       tagged_with: etiquetada com %{tags}
@@ -2006,7 +2006,7 @@ pt-PT:
         Não precisas de aceitar os termos, mas tens de os ver.
   oauth:
     authorize:
-      title: Autorizar acesso à tua conta
+      title: Autorizar Acesso À Tua Conta
       request_access_html: A aplicação %{app_name} está a pedir acesso à tua conta,
         %{user}. Por favor, confere se queres dar à aplicação as seguintes funcionalidades.
         Podes escolher as que quiseres e quantas quiseres.
@@ -2019,7 +2019,7 @@ pt-PT:
       allow_read_gpx: para ler as tuas rotas de GPS privadas.
       allow_write_gpx: para enviar rotas GPS.
       allow_write_notes: para modificar notas.
-      grant_access: Dar Acesso
+      grant_access: Dar acesso
     authorize_success:
       title: Pedido de autorização permitido
       allowed_html: Concedeste à aplicação %{app_name} acesso à tua conta.
@@ -2517,34 +2517,35 @@ pt-PT:
       needs_view: O utilizador precisa de iniciar sessão antes de o bloqueio ser revogado?
     filter:
       block_expired: Este bloqueio já expirou e não pode ser editado.
-      block_period: O período de tempo do bloqueio tem de ser um dos valores da lista
-        deslizante.
+      block_period: O período de bloqueio tem de corresponder a um dos valores selecionáveis
+        da lista.
     create:
-      try_contacting: Por favor tente contactar o utilizador antes de o bloquear e
-        -lhe algum tempo para responder.
-      try_waiting: Por favor dê um tempo razoável para o utilizador responder antes
-        de o bloquear.
-      flash: Bloqueou o utilizador %{name}.
+      try_contacting: Por favor, tenta contactar o utilizador antes de o bloqueares
+        e dá-lhe algum tempo para responder.
+      try_waiting: Por favor, dá um tempo razoável para o utilizador responder antes
+        de o bloqueares.
+      flash: Bloqueaste o utilizador %{name}.
     update:
-      only_creator_can_edit: Apenas o moderador que criou este bloqueio pode editá-lo.
+      only_creator_can_edit: Este bloqueio só pode ser editado pelo moderador que
+        o criou.
       success: Bloqueio atualizado.
     index:
-      title: Bloqueio de utilizador
-      heading: Lista de bloqueios de utilizadores
+      title: Bloqueios do utilizador
+      heading: Lista de bloqueios do utilizador
       empty: Ainda não foram feitos bloqueios.
     revoke:
-      title: Revocando bloqueio de %{block_on}
-      heading_html: Revocando bloqueio de %{block_on} por %{block_by}
+      title: A retirar o bloqueio de %{block_on}
+      heading_html: A retirar o bloqueio de %{block_on} por %{block_by}
       time_future: Este bloqueio terminará em %{time}.
       past: Este bloqueio terminou a %{time} e já não pode ser revogado.
-      confirm: Tem a certeza que quer revocar este bloqueio?
+      confirm: Tens a certeza de que queres revogar este bloqueio?
       revoke: Revogar!
       flash: Este bloqueio foi revogado.
     helper:
       time_future: Termina em %{time}.
-      until_login: Ativo até o utilizador entrar na conta.
-      time_future_and_until_login: Termina em %{time} e após o utilizador entrar na
-        conta.
+      until_login: Ativo até o utilizador iniciar sessão.
+      time_future_and_until_login: Termina em %{time} e depois de o utilizador iniciar
+        sessão.
       time_past: Terminou a %{time}.
       block_duration:
         hours:
@@ -2578,11 +2579,11 @@ pt-PT:
       show: Mostrar
       edit: Editar
       revoke: Revogar!
-      confirm: Tem a certeza?
+      confirm: Tens a certeza?
       reason: 'Razão do bloqueio:'
       back: Ver todos os bloqueios
-      revoker: 'Revogador:'
-      needs_view: O utilizador necessita de autenticar-se antes deste bloqueio terminar.
+      revoker: 'Quem revogou:'
+      needs_view: O utilizador tem de iniciar sessão antes de este bloqueio terminar.
     block:
       not_revoked: (não revogado)
       show: Mostrar
@@ -2599,13 +2600,13 @@ pt-PT:
       previous: « Anterior
   notes:
     mine:
-      title: Erros reportados ou comentados por %{user}
-      heading: Erros reportados por %{user}
-      subheading_html: Erros reportados ou comentados por %{user}
-      id: Identificador
+      title: Notas submetidas ou comentadas por %{user}
+      heading: Notas de %{user}
+      subheading_html: Notas submetidas ou comentadas por %{user}
+      id: Id
       creator: Criador
       description: Descrição
-      created_at: Criado em
+      created_at: Criada em
       last_changed: Última alteração
   javascripts:
     close: Fechar
@@ -2614,8 +2615,8 @@ pt-PT:
       cancel: Cancelar
       image: Imagem
       link: Ligação ou HTML
-      long_link: Link
-      short_link: Lig.Curta
+      long_link: Ligação
+      short_link: Ligação curta
       geo_uri: Geo URI
       embed: HTML
       custom_dimensions: Definir dimensões
@@ -2628,13 +2629,13 @@ pt-PT:
       center_marker: Centrar o mapa no marcador
       paste_html: Colar HTML para incorporar na página web
       view_larger_map: Ver mapa maior
-      only_standard_layer: Apenas a Camada Padrão pode ser exportada como imagem
+      only_standard_layer: Só a camada padrão pode ser exportada como imagem
     embed:
-      report_problem: Reportar problema
+      report_problem: Reportar um problema
     key:
-      title: Legenda do mapa
+      title: Legenda
       tooltip: Legenda do mapa
-      tooltip_disabled: Legenda do Mapa indisponível para esta camada
+      tooltip_disabled: Não há legenda do mapa disponível para esta camada
     map:
       zoom:
         in: Aproximar
@@ -2653,10 +2654,10 @@ pt-PT:
         transport_map: Transportes Públicos
         hot: Humanitário
       layers:
-        header: Camadas do Mapa
-        notes: Erros reportados no mapa
-        data: Dados técnicos do mapa
-        gps: Trilhos GPS Públicos
+        header: Camadas do mapa
+        notes: Notas no mapa
+        data: Dados do mapa
+        gps: Rotas de GPS públicas
         overlays: Ativar camadas para solucionar problemas no mapa
         title: Camadas
       copyright: © <a href='%{copyright_url}'>Colaboradores do OpenStreetMap</a>
@@ -2670,12 +2671,11 @@ pt-PT:
         França</a>
     site:
       edit_tooltip: Editar o mapa
-      edit_disabled_tooltip: Área demasiado grande. Amplie para poder editar
-      createnote_tooltip: Reportar erro no mapa
-      createnote_disabled_tooltip: A área exibida é demasiado grande. Amplia o mapa
-        para poderes reportar um erro.
+      edit_disabled_tooltip: Amplia o mapa para poderes editar
+      createnote_tooltip: Adicionar uma nota ao mapa
+      createnote_disabled_tooltip: Amplia para adicionares uma nota ao mapa.
       map_notes_zoom_in_tooltip: Aproxime para ver erros reportados
-      map_data_zoom_in_tooltip: Aproxime para ver dados do mapa
+      map_data_zoom_in_tooltip: Amplia para veres os dados do mapa
       queryfeature_tooltip: Consultar elementos em redor
       queryfeature_disabled_tooltip: Aproxime a vista para consultar elementos em
         redor
@@ -2699,9 +2699,9 @@ pt-PT:
         anonymous_warning: Este erro reportado inclui comentários de utilizadores
           anónimos que devem ser confirmados por fonte independente.
         hide: Esconder
-        resolve: Marcar como Resolvido
+        resolve: Marcar como resolvido
         reactivate: Reabrir
-        comment_and_resolve: Gravar como Resolvido
+        comment_and_resolve: Gravar como resolvido
         comment: Gravar
     edit_help: Move o mapa, amplia-o no local que pretendes editar e clica aqui.
     directions:
@@ -2810,7 +2810,7 @@ pt-PT:
       directions_to: Indicações para aqui
       add_note: Adicionar uma nota aqui
       show_address: Mostrar endereço
-      query_features: Consular elementos
+      query_features: Consultar elementos
       centre_map: Centrar mapa aqui
   redactions:
     edit:
index d3cacdf58eb612f39d72437e637a1ae979fbf725..add0a587774eb03b8accee64f92655f24d109df8 100644 (file)
@@ -1273,8 +1273,9 @@ tr:
         more_info_2: 'şu adresten edinebilirsiniz:'
       success:
         subject: '[OpenStreetMap] GPX dosyası başarıyla alındı'
-        loaded_successfully: Olası bir %{possible_points} noktalarından %{trace_points}
-          ile başarıyla yüklendi.
+        loaded_successfully:
+          one: '%{trace_points} olası 1 puan üzerinden başarıyla yüklendi.'
+          other: '%{trace_points} olası %{possible_points} puanından başarıyla yüklendi.'
     signup_confirm:
       subject: '[OpenStreetMap]''e hoşgeldin'
       greeting: Merhaba!
@@ -1965,7 +1966,7 @@ tr:
       owner: 'Gönderen:'
       description: 'Açıklama:'
       tags: 'Etiketler:'
-      none: Yok
+      none: Hiçbiri
       edit_trace: Bu iz düzenle
       delete_trace: Bu izi sil
       trace_not_found: İz bulunmadı!
index 2ec0c94db41b2cb2d642e78320c845fa6ecd6fb3..ca332339d880fcabc31e3f88db2d20a8aac35efd 100644 (file)
@@ -1275,8 +1275,11 @@ uk:
         more_info_2: 'можна знайти на:'
       success:
         subject: '[OpenStreetMap] Імпорт GPX пройшов успішно'
-        loaded_successfully: успішно завантажено %{trace_points} точок з %{possible_points}
-          можливих.
+        loaded_successfully:
+          one: успішно завантажено 1 точку з 1 можливої.
+          few: успішно завантажено %{trace_points} точки з %{possible_points} можливих.
+          many: успішно завантажено %{trace_points} точок з %{possible_points} можливих.
+          other: успішно завантажено %{trace_points} точок з %{possible_points} можливих.
     signup_confirm:
       subject: '[OpenStreetMap] Ласкаво просимо до OpenStreetMap'
       greeting: Привіт!
index dc4063ec433d24cea6d002c067a532782aacab36..e7e1a8dc3c5433399d834db427eca00381683009 100644 (file)
@@ -1248,9 +1248,13 @@ zh-TW:
         import_failures_url: https://wiki.openstreetmap.org/wiki/GPX_Import_Failures
       success:
         subject: '[OpenStreetMap] GPX 匯入成功'
-        loaded_successfully: |-
-          成功載入可能為 %{possible_points} 點中的
-          %{trace_points} 點。
+        loaded_successfully:
+          one: |-
+            成功載入 1 點中的
+            %{trace_points}。
+          other: |-
+            l成功載入 %{possible_points} 點中的
+            %{trace_points}。
     signup_confirm:
       subject: '[OpenStreetMap] 歡迎加入 OpenStreetMap'
       greeting: 您好!
index ff9a226632358272b9214cfb361c8949022f03ec..bc1ee8ec6446e75a7d4d70e4710d5c522c8b3dc5 100644 (file)
@@ -1,12 +1,16 @@
 module Auth
-  PROVIDERS = {
-    I18n.t("auth.providers.none") => "",
-    I18n.t("auth.providers.openid") => "openid"
-  }.tap do |providers|
-    providers[I18n.t("auth.providers.google")] = "google" if Settings.key?(:google_auth_id)
-    providers[I18n.t("auth.providers.facebook")] = "facebook" if Settings.key?(:facebook_auth_id)
-    providers[I18n.t("auth.providers.windowslive")] = "windowslive" if Settings.key?(:windowslive_auth_id)
-    providers[I18n.t("auth.providers.github")] = "github" if Settings.key?(:github_auth_id)
-    providers[I18n.t("auth.providers.wikipedia")] = "wikipedia" if Settings.key?(:wikipedia_auth_id)
-  end.freeze
+  @providers = {}
+
+  def self.providers
+    @providers[I18n.locale] ||= {
+      I18n.t("auth.providers.none") => "",
+      I18n.t("auth.providers.openid") => "openid"
+    }.tap do |providers|
+      providers[I18n.t("auth.providers.google")] = "google" if Settings.key?(:google_auth_id)
+      providers[I18n.t("auth.providers.facebook")] = "facebook" if Settings.key?(:facebook_auth_id)
+      providers[I18n.t("auth.providers.windowslive")] = "windowslive" if Settings.key?(:windowslive_auth_id)
+      providers[I18n.t("auth.providers.github")] = "github" if Settings.key?(:github_auth_id)
+      providers[I18n.t("auth.providers.wikipedia")] = "wikipedia" if Settings.key?(:wikipedia_auth_id)
+    end.freeze
+  end
 end
index 2240504bd543087d0eed604b7dc7169f7ef7bdb7..241efa9376b6657faae75a0e938d8280db5de4b6 100644 (file)
@@ -181,32 +181,32 @@ module Api
       assert_equal Array, map[4].class, 'map "relations" element should be an array'
       map[2].each do |w|
         assert_equal 2, w.length, "way should be (id, version) pair"
-        assert w[0] == w[0].floor, "way ID should be an integer"
-        assert w[1] == w[1].floor, "way version should be an integer"
+        assert_equal w[0], w[0].floor, "way ID should be an integer"
+        assert_equal w[1], w[1].floor, "way version should be an integer"
       end
 
       map[3].each do |n|
         assert_equal 5, w.length, "node should be (id, lat, lon, [tags], version) tuple"
-        assert n[0] == n[0].floor, "node ID should be an integer"
+        assert_equal n[0], n[0].floor, "node ID should be an integer"
         assert n[1] >= minlat - 0.01, "node lat should be greater than min"
         assert n[1] <= maxlat - 0.01, "node lat should be less than max"
         assert n[2] >= minlon - 0.01, "node lon should be greater than min"
         assert n[2] <= maxlon - 0.01, "node lon should be less than max"
         assert_equal Array, a[3].class, "node tags should be array"
-        assert n[4] == n[4].floor, "node version should be an integer"
+        assert_equal n[4], n[4].floor, "node version should be an integer"
       end
 
       map[4].each do |r|
         assert_equal 2, r.length, "relation should be (id, version) pair"
-        assert r[0] == r[0].floor, "relation ID should be an integer"
-        assert r[1] == r[1].floor, "relation version should be an integer"
+        assert_equal r[0], r[0].floor, "relation ID should be an integer"
+        assert_equal r[1], r[1].floor, "relation version should be an integer"
       end
 
       # TODO: looks like amf_controller changed since this test was written
       # so someone who knows what they're doing should check this!
       ways = map[2].collect { |x| x[0] }
-      assert ways.include?(way.id),
-             "map should include used way"
+      assert_includes ways, way.id,
+                      "map should include used way"
       assert_not ways.include?(deleted_way.id),
                  "map should not include deleted way"
     end
@@ -271,8 +271,8 @@ module Api
       # so someone who knows what they're doing should check this!
       assert_not map[2].include?(way.id),
                  "map should not include visible way"
-      assert map[2].include?(deleted_way.id),
-             "map should include deleted way"
+      assert_includes map[2], deleted_way.id,
+                      "map should include deleted way"
     end
 
     def test_whichways_deleted_toobig
@@ -428,7 +428,7 @@ module Api
       # ['way',wayid,history]
       assert_equal history[0], "way"
       assert_equal history[1], 0
-      assert history[2].empty?
+      assert_empty history[2]
     end
 
     def test_getnode_history
@@ -466,7 +466,7 @@ module Api
       # ['node',nodeid,history]
       assert_equal history[0], "node"
       assert_equal history[1], 0
-      assert history[2].empty?
+      assert_empty history[2]
     end
 
     def test_findgpx_bad_user
@@ -847,7 +847,7 @@ module Api
       assert_equal nd.version + 1, result[4]
 
       current_node = Node.find(result[3].to_i)
-      assert_equal false, current_node.visible
+      assert_not current_node.visible
     end
 
     # try deleting a node that is already deleted
@@ -978,14 +978,14 @@ module Api
 
       new_node = Node.find(new_node_id)
       assert_equal 1, new_node.version
-      assert_equal true, new_node.visible
+      assert new_node.visible
       assert_equal 4.56, new_node.lon
       assert_equal 12.34, new_node.lat
       assert_equal({ "test" => "new" }, new_node.tags)
 
       changed_node = Node.find(d)
       assert_equal 2, changed_node.version
-      assert_equal true, changed_node.visible
+      assert changed_node.visible
       assert_equal 12.34, changed_node.lon
       assert_equal 4.56, changed_node.lat
       assert_equal({ "test" => "ok" }, changed_node.tags)
@@ -993,7 +993,7 @@ module Api
       # node is not deleted because our other ways are using it
       deleted_node = Node.find(a)
       assert_equal 1, deleted_node.version
-      assert_equal true, deleted_node.visible
+      assert deleted_node.visible
     end
 
     # check that we can update a way
@@ -1073,21 +1073,21 @@ module Api
 
       new_node = Node.find(new_node_id)
       assert_equal 1, new_node.version
-      assert_equal true, new_node.visible
+      assert new_node.visible
       assert_equal 4.56, new_node.lon
       assert_equal 12.34, new_node.lat
       assert_equal({ "test" => "new" }, new_node.tags)
 
       changed_node = Node.find(b)
       assert_equal 2, changed_node.version
-      assert_equal true, changed_node.visible
+      assert changed_node.visible
       assert_equal 12.34, changed_node.lon
       assert_equal 4.56, changed_node.lat
       assert_equal({ "test" => "ok" }, changed_node.tags)
 
       deleted_node = Node.find(d)
       assert_equal 2, deleted_node.version
-      assert_equal false, deleted_node.visible
+      assert_not deleted_node.visible
     end
 
     # check that we can delete a way
@@ -1120,7 +1120,7 @@ module Api
 
       new_way = Way.find(way.id)
       assert_equal way.version + 1, new_way.version
-      assert_equal false, new_way.visible
+      assert_not new_way.visible
 
       way.nds.each do |node_id|
         assert_equal result[4][node_id.to_s].nil?, Node.find(node_id).visible
@@ -1146,10 +1146,10 @@ module Api
 
       new_way = Way.find(way.id)
       assert_equal way.version, new_way.version
-      assert_equal true, new_way.visible
+      assert new_way.visible
 
       way.nds.each do |node_id|
-        assert_equal true, Node.find(node_id).visible
+        assert Node.find(node_id).visible
       end
     end
 
@@ -1180,7 +1180,7 @@ module Api
       assert_equal 1, new_relation.version
       assert_equal [["Node", node.id, "node"], ["Way", way.id, "way"], ["Relation", relation.id, "relation"]], new_relation.members
       assert_equal({ "test" => "new" }, new_relation.tags)
-      assert_equal true, new_relation.visible
+      assert new_relation.visible
     end
 
     # check that we can update a relation
@@ -1207,7 +1207,7 @@ module Api
       assert_equal relation.version + 1, new_relation.version
       assert_equal relation.members, new_relation.members
       assert_equal({ "test" => "ok" }, new_relation.tags)
-      assert_equal true, new_relation.visible
+      assert new_relation.visible
     end
 
     # check that we can delete a relation
@@ -1234,7 +1234,7 @@ module Api
       assert_equal relation.version + 1, new_relation.version
       assert_equal [], new_relation.members
       assert_equal({}, new_relation.tags)
-      assert_equal false, new_relation.visible
+      assert_not new_relation.visible
     end
 
     # check that we can't delete a relation that is in use
@@ -1258,7 +1258,7 @@ module Api
       assert_equal relation.version, new_relation.version
       assert_equal relation.members, new_relation.members
       assert_equal relation.tags, new_relation.tags
-      assert_equal true, new_relation.visible
+      assert new_relation.visible
     end
 
     # check that we can open a changeset
@@ -1276,7 +1276,7 @@ module Api
       assert_equal "", result[1]
 
       cs = Changeset.find(new_cs_id)
-      assert_equal true, cs.is_open?
+      assert cs.is_open?
       assert_equal({ "comment" => "new", "source" => "new" }, cs.tags)
 
       old_cs_id = new_cs_id
@@ -1294,11 +1294,11 @@ module Api
       assert_equal "", result[1]
 
       cs = Changeset.find(old_cs_id)
-      assert_equal false, cs.is_open?
+      assert_not cs.is_open?
       assert_equal({ "comment" => "newer", "source" => "new" }, cs.tags)
 
       cs = Changeset.find(new_cs_id)
-      assert_equal true, cs.is_open?
+      assert cs.is_open?
       assert_equal({ "comment" => "newer", "source" => "newer" }, cs.tags)
 
       old_cs_id = new_cs_id
@@ -1314,7 +1314,7 @@ module Api
       assert_nil result[2]
 
       cs = Changeset.find(old_cs_id)
-      assert_equal false, cs.is_open?
+      assert_not cs.is_open?
       assert_equal({ "comment" => "newer", "source" => "newer" }, cs.tags)
     end
 
@@ -1334,7 +1334,7 @@ module Api
       assert_equal "", result[1]
 
       cs = Changeset.find(cs_id)
-      assert_equal true, cs.is_open?
+      assert cs.is_open?
       assert_equal({ "comment" => "new", "source" => "new" }, cs.tags)
 
       post :amf_write, :body => amf_content("startchangeset", "/1", ["#{user2.email}:test", {}, cs_id, "delete", 0])
@@ -1347,7 +1347,7 @@ module Api
       assert_equal "The user doesn't own that changeset", result[1]
 
       cs = Changeset.find(cs_id)
-      assert_equal true, cs.is_open?
+      assert cs.is_open?
       assert_equal({ "comment" => "new", "source" => "new" }, cs.tags)
     end
 
@@ -1369,7 +1369,7 @@ module Api
       assert_equal "", result[1]
 
       cs = Changeset.find(new_cs_id)
-      assert_equal true, cs.is_open?
+      assert cs.is_open?
       assert_equal({ "comment" => "foobar" }, cs.tags)
     end
 
index 24228c28c966134f589ede377ada83b2e3ed2a98..ba2068d84855d4e9b84aa2a457e78d3bd0b5f905 100644 (file)
@@ -125,38 +125,38 @@ module Api
     def test_destroy_comment_fail
       # unauthorized
       comment = create(:changeset_comment)
-      assert_equal true, comment.visible
+      assert comment.visible
 
       post :destroy, :params => { :id => comment.id }
       assert_response :unauthorized
-      assert_equal true, comment.reload.visible
+      assert comment.reload.visible
 
       basic_authorization create(:user).email, "test"
 
       # not a moderator
       post :destroy, :params => { :id => comment.id }
       assert_response :forbidden
-      assert_equal true, comment.reload.visible
+      assert comment.reload.visible
 
       basic_authorization create(:moderator_user).email, "test"
 
       # bad comment id
       post :destroy, :params => { :id => 999111 }
       assert_response :not_found
-      assert_equal true, comment.reload.visible
+      assert comment.reload.visible
     end
 
     ##
     # test hide comment succes
     def test_hide_comment_success
       comment = create(:changeset_comment)
-      assert_equal true, comment.visible
+      assert comment.visible
 
       basic_authorization create(:moderator_user).email, "test"
 
       post :destroy, :params => { :id => comment.id }
       assert_response :success
-      assert_equal false, comment.reload.visible
+      assert_not comment.reload.visible
     end
 
     ##
@@ -164,38 +164,38 @@ module Api
     def test_restore_comment_fail
       # unauthorized
       comment = create(:changeset_comment, :visible => false)
-      assert_equal false, comment.visible
+      assert_not comment.visible
 
       post :restore, :params => { :id => comment.id }
       assert_response :unauthorized
-      assert_equal false, comment.reload.visible
+      assert_not comment.reload.visible
 
       basic_authorization create(:user).email, "test"
 
       # not a moderator
       post :restore, :params => { :id => comment.id }
       assert_response :forbidden
-      assert_equal false, comment.reload.visible
+      assert_not comment.reload.visible
 
       basic_authorization create(:moderator_user).email, "test"
 
       # bad comment id
       post :restore, :params => { :id => 999111 }
       assert_response :not_found
-      assert_equal false, comment.reload.visible
+      assert_not comment.reload.visible
     end
 
     ##
     # test unhide comment succes
     def test_unhide_comment_success
       comment = create(:changeset_comment, :visible => false)
-      assert_equal false, comment.visible
+      assert_not comment.visible
 
       basic_authorization create(:moderator_user).email, "test"
 
       post :restore, :params => { :id => comment.id }
       assert_response :success
-      assert_equal true, comment.reload.visible
+      assert comment.reload.visible
     end
 
     # This test ensures that token capabilities behave correctly for a method that
index 7579ffee794cbc56d4dd4723bd9eadab9960290a..29b3d5dac4e22c2824949654b31cbf8ae5e58b7c 100644 (file)
@@ -477,10 +477,10 @@ module Api
       assert_select "diffResult>relation", 2
 
       # check that everything was deleted
-      assert_equal false, Node.find(used_node.id).visible
-      assert_equal false, Way.find(used_way.id).visible
-      assert_equal false, Relation.find(super_relation.id).visible
-      assert_equal false, Relation.find(used_relation.id).visible
+      assert_not Node.find(used_node.id).visible
+      assert_not Way.find(used_way.id).visible
+      assert_not Relation.find(super_relation.id).visible
+      assert_not Relation.find(used_relation.id).visible
     end
 
     ##
@@ -502,7 +502,7 @@ module Api
       assert_select "diffResult>node", 1
 
       # check that everything was deleted
-      assert_equal false, Node.find(node.id).visible
+      assert_not Node.find(node.id).visible
     end
 
     def test_repeated_changeset_create
@@ -604,10 +604,10 @@ module Api
       assert_equal "Precondition failed: Way #{used_way.id} is still used by relations #{relation.id}.", @response.body
 
       # check that nothing was, in fact, deleted
-      assert_equal true, Node.find(used_node.id).visible
-      assert_equal true, Way.find(used_way.id).visible
-      assert_equal true, Relation.find(relation.id).visible
-      assert_equal true, Relation.find(other_relation.id).visible
+      assert Node.find(used_node.id).visible
+      assert Way.find(used_way.id).visible
+      assert Relation.find(relation.id).visible
+      assert Relation.find(other_relation.id).visible
     end
 
     ##
@@ -670,9 +670,9 @@ module Api
       assert_equal used_relation.version, doc.find("//diffResult/relation").first["new_version"].to_i
 
       # check that nothing was, in fact, deleted
-      assert_equal true, Node.find(used_node.id).visible
-      assert_equal true, Way.find(used_way.id).visible
-      assert_equal true, Relation.find(used_relation.id).visible
+      assert Node.find(used_node.id).visible
+      assert Way.find(used_way.id).visible
+      assert Relation.find(used_relation.id).visible
     end
 
     ##
index e2174a12603c2400c2a248c3d407bf34ef938430..5720ccb1fc482a01af71a2ca67f17430616bebf5 100644 (file)
@@ -82,7 +82,7 @@ module Api
       assert_in_delta lat * 10000000, checknode.latitude, 1, "saved node does not match requested latitude"
       assert_in_delta lon * 10000000, checknode.longitude, 1, "saved node does not match requested longitude"
       assert_equal changeset.id, checknode.changeset_id, "saved node does not belong to changeset that it was created in"
-      assert_equal true, checknode.visible, "saved node is not visible"
+      assert checknode.visible, "saved node is not visible"
     end
 
     def test_create_invalid_xml
@@ -494,7 +494,7 @@ module Api
     # test adding tags to a node
     def test_duplicate_tags
       existing_tag = create(:node_tag)
-      assert_equal true, existing_tag.node.changeset.user.data_public
+      assert existing_tag.node.changeset.user.data_public
       # setup auth
       basic_authorization existing_tag.node.changeset.user.email, "test"
 
@@ -556,7 +556,7 @@ module Api
 
       # check the tags are not corrupted
       assert_equal checknode.tags, apinode.tags
-      assert apinode.tags.include?("\#{@user.inspect}")
+      assert_includes apinode.tags, "\#{@user.inspect}"
     end
 
     ##
index da18099bda33d5aa10b05a6b569b9da255c5de09..5116ddb02ef196c296cc0c99482d724b784b815b 100644 (file)
@@ -304,8 +304,8 @@ module Api
                    "saved relation does not belong in the changeset it was assigned to"
       assert_equal user.id, checkrelation.changeset.user_id,
                    "saved relation does not belong to user that created it"
-      assert_equal true, checkrelation.visible,
-                   "saved relation is not visible"
+      assert checkrelation.visible,
+             "saved relation is not visible"
       # ok the relation is there but can we also retrieve it?
       get :show, :params => { :id => relationid }
       assert_response :success
@@ -334,8 +334,8 @@ module Api
                    "saved relation does not belong in the changeset it was assigned to"
       assert_equal user.id, checkrelation.changeset.user_id,
                    "saved relation does not belong to user that created it"
-      assert_equal true, checkrelation.visible,
-                   "saved relation is not visible"
+      assert checkrelation.visible,
+             "saved relation is not visible"
       # ok the relation is there but can we also retrieve it?
 
       get :show, :params => { :id => relationid }
@@ -364,8 +364,8 @@ module Api
                    "saved relation does not belong in the changeset it was assigned to"
       assert_equal user.id, checkrelation.changeset.user_id,
                    "saved relation does not belong to user that created it"
-      assert_equal true, checkrelation.visible,
-                   "saved relation is not visible"
+      assert checkrelation.visible,
+             "saved relation is not visible"
       # ok the relation is there but can we also retrieve it?
 
       get :show, :params => { :id => relationid }
@@ -395,8 +395,8 @@ module Api
                    "saved relation does not belong in the changeset it was assigned to"
       assert_equal user.id, checkrelation.changeset.user_id,
                    "saved relation does not belong to user that created it"
-      assert_equal true, checkrelation.visible,
-                   "saved relation is not visible"
+      assert checkrelation.visible,
+             "saved relation is not visible"
       # ok the relation is there but can we also retrieve it?
       get :show, :params => { :id => relationid }
       assert_response :success
index 88c6fa90f82dbff3f885feaea1d73a32c7189792..14136ec20b5b1a9ce1afddc9fc143ec033a40bea 100644 (file)
@@ -210,7 +210,7 @@ module Api
       assert_equal "New Trace", trace.description
       assert_equal %w[new trace], trace.tags.order(:tag).collect(&:tag)
       assert_equal "trackable", trace.visibility
-      assert_equal false, trace.inserted
+      assert_not trace.inserted
       assert_equal File.new(fixture).read, File.new(trace.trace_name).read
       trace.destroy
       assert_equal "trackable", user.preferences.where(:k => "gps.trace.visibility").first.v
@@ -228,7 +228,7 @@ module Api
       assert_equal "New Trace", trace.description
       assert_equal %w[new trace], trace.tags.order(:tag).collect(&:tag)
       assert_equal "public", trace.visibility
-      assert_equal false, trace.inserted
+      assert_not trace.inserted
       assert_equal File.new(fixture).read, File.new(trace.trace_name).read
       trace.destroy
       assert_equal "public", user.preferences.where(:k => "gps.trace.visibility").first.v
@@ -247,7 +247,7 @@ module Api
       assert_equal "New Trace", trace.description
       assert_equal %w[new trace], trace.tags.order(:tag).collect(&:tag)
       assert_equal "private", trace.visibility
-      assert_equal false, trace.inserted
+      assert_not trace.inserted
       assert_equal File.new(fixture).read, File.new(trace.trace_name).read
       trace.destroy
       assert_equal "private", second_user.preferences.where(:k => "gps.trace.visibility").first.v
index e4b9f36632952ac32839296dd5ff90fe5135a157..ae7f1816120dd5a67aea0024b2009d883fc7bf80 100644 (file)
@@ -190,8 +190,8 @@ module Api
                    "saved way does not belong to the correct changeset"
       assert_equal user.id, checkway.changeset.user_id,
                    "saved way does not belong to user that created it"
-      assert_equal true, checkway.visible,
-                   "saved way is not visible"
+      assert checkway.visible,
+             "saved way is not visible"
     end
 
     # -------------------------------------
index 0f071914e08190418a1a7180aec6ce677f9af3ff..8996e40eee330a9550e3aa108e8b709165fa860c 100644 (file)
@@ -740,7 +740,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
     post :hide,
          :params => { :display_name => user.display_name, :id => diary_entry.id }
     assert_response :forbidden
-    assert_equal true, DiaryEntry.find(diary_entry.id).visible
+    assert DiaryEntry.find(diary_entry.id).visible
 
     # Now try as a normal user
     post :hide,
@@ -748,7 +748,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
          :session => { :user => user }
     assert_response :redirect
     assert_redirected_to :controller => :errors, :action => :forbidden
-    assert_equal true, DiaryEntry.find(diary_entry.id).visible
+    assert DiaryEntry.find(diary_entry.id).visible
 
     # Now try as a moderator
     post :hide,
@@ -756,7 +756,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
          :session => { :user => create(:moderator_user) }
     assert_response :redirect
     assert_redirected_to :action => :index, :display_name => user.display_name
-    assert_equal false, DiaryEntry.find(diary_entry.id).visible
+    assert_not DiaryEntry.find(diary_entry.id).visible
 
     # Reset
     diary_entry.reload.update(:visible => true)
@@ -767,7 +767,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
          :session => { :user => create(:administrator_user) }
     assert_response :redirect
     assert_redirected_to :action => :index, :display_name => user.display_name
-    assert_equal false, DiaryEntry.find(diary_entry.id).visible
+    assert_not DiaryEntry.find(diary_entry.id).visible
   end
 
   def test_unhide
@@ -778,7 +778,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
     post :unhide,
          :params => { :display_name => user.display_name, :id => diary_entry.id }
     assert_response :forbidden
-    assert_equal false, DiaryEntry.find(diary_entry.id).visible
+    assert_not DiaryEntry.find(diary_entry.id).visible
 
     # Now try as a normal user
     post :unhide,
@@ -786,7 +786,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
          :session => { :user => user }
     assert_response :redirect
     assert_redirected_to :controller => :errors, :action => :forbidden
-    assert_equal false, DiaryEntry.find(diary_entry.id).visible
+    assert_not DiaryEntry.find(diary_entry.id).visible
 
     # Finally try as an administrator
     post :unhide,
@@ -794,7 +794,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
          :session => { :user => create(:administrator_user) }
     assert_response :redirect
     assert_redirected_to :action => :index, :display_name => user.display_name
-    assert_equal true, DiaryEntry.find(diary_entry.id).visible
+    assert DiaryEntry.find(diary_entry.id).visible
   end
 
   def test_hidecomment
@@ -806,7 +806,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
     post :hidecomment,
          :params => { :display_name => user.display_name, :id => diary_entry.id, :comment => diary_comment.id }
     assert_response :forbidden
-    assert_equal true, DiaryComment.find(diary_comment.id).visible
+    assert DiaryComment.find(diary_comment.id).visible
 
     # Now try as a normal user
     post :hidecomment,
@@ -814,7 +814,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
          :session => { :user => user }
     assert_response :redirect
     assert_redirected_to :controller => :errors, :action => :forbidden
-    assert_equal true, DiaryComment.find(diary_comment.id).visible
+    assert DiaryComment.find(diary_comment.id).visible
 
     # Try as a moderator
     post :hidecomment,
@@ -822,7 +822,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
          :session => { :user => create(:moderator_user) }
     assert_response :redirect
     assert_redirected_to :action => :show, :display_name => user.display_name, :id => diary_entry.id
-    assert_equal false, DiaryComment.find(diary_comment.id).visible
+    assert_not DiaryComment.find(diary_comment.id).visible
 
     # Reset
     diary_comment.reload.update(:visible => true)
@@ -833,7 +833,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
          :session => { :user => create(:administrator_user) }
     assert_response :redirect
     assert_redirected_to :action => :show, :display_name => user.display_name, :id => diary_entry.id
-    assert_equal false, DiaryComment.find(diary_comment.id).visible
+    assert_not DiaryComment.find(diary_comment.id).visible
   end
 
   def test_unhidecomment
@@ -845,7 +845,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
     post :unhidecomment,
          :params => { :display_name => user.display_name, :id => diary_entry.id, :comment => diary_comment.id }
     assert_response :forbidden
-    assert_equal false, DiaryComment.find(diary_comment.id).visible
+    assert_not DiaryComment.find(diary_comment.id).visible
 
     # Now try as a normal user
     post :unhidecomment,
@@ -853,7 +853,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
          :session => { :user => user }
     assert_response :redirect
     assert_redirected_to :controller => :errors, :action => :forbidden
-    assert_equal false, DiaryComment.find(diary_comment.id).visible
+    assert_not DiaryComment.find(diary_comment.id).visible
 
     # Finally try as an administrator
     post :unhidecomment,
@@ -861,7 +861,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
          :session => { :user => administrator_user }
     assert_response :redirect
     assert_redirected_to :action => :show, :display_name => user.display_name, :id => diary_entry.id
-    assert_equal true, DiaryComment.find(diary_comment.id).visible
+    assert DiaryComment.find(diary_comment.id).visible
   end
 
   def test_comments
index d16f664554117818c96539ebdee7a02ba2c75c29..141c7b20d99678ebdc65e2d977a43cec2dabd96b 100644 (file)
@@ -42,7 +42,7 @@ class IssuesControllerTest < ActionController::TestCase
     # Access issue as administrator
     session[:user] = create(:administrator_user).id
     get :show, :params => { :id => issue.id }
-    assert_response :not_found
+    assert_redirected_to :controller => :errors, :action => :not_found
 
     # Access issue as moderator
     session[:user] = create(:moderator_user).id
@@ -68,7 +68,7 @@ class IssuesControllerTest < ActionController::TestCase
     # Access issue as moderator
     session[:user] = create(:moderator_user).id
     get :show, :params => { :id => issue.id }
-    assert_response :not_found
+    assert_redirected_to :controller => :errors, :action => :not_found
 
     # Access issue as administrator
     session[:user] = create(:administrator_user).id
@@ -94,14 +94,14 @@ class IssuesControllerTest < ActionController::TestCase
     # Resolve issue as administrator
     session[:user] = create(:administrator_user).id
     get :resolve, :params => { :id => issue.id }
-    assert_response :not_found
-    assert_equal false, issue.reload.resolved?
+    assert_redirected_to :controller => :errors, :action => :not_found
+    assert_not issue.reload.resolved?
 
     # Resolve issue as moderator
     session[:user] = create(:moderator_user).id
     get :resolve, :params => { :id => issue.id }
     assert_response :redirect
-    assert_equal true, issue.reload.resolved?
+    assert issue.reload.resolved?
   end
 
   def test_resolve_administrator
@@ -122,14 +122,14 @@ class IssuesControllerTest < ActionController::TestCase
     # Resolve issue as moderator
     session[:user] = create(:moderator_user).id
     get :resolve, :params => { :id => issue.id }
-    assert_response :not_found
-    assert_equal false, issue.reload.resolved?
+    assert_redirected_to :controller => :errors, :action => :not_found
+    assert_not issue.reload.resolved?
 
     # Resolve issue as administrator
     session[:user] = create(:administrator_user).id
     get :resolve, :params => { :id => issue.id }
     assert_response :redirect
-    assert_equal true, issue.reload.resolved?
+    assert issue.reload.resolved?
   end
 
   def test_ignore_moderator
@@ -150,14 +150,14 @@ class IssuesControllerTest < ActionController::TestCase
     # Ignore issue as administrator
     session[:user] = create(:administrator_user).id
     get :ignore, :params => { :id => issue.id }
-    assert_response :not_found
-    assert_equal false, issue.reload.ignored?
+    assert_redirected_to :controller => :errors, :action => :not_found
+    assert_not issue.reload.ignored?
 
     # Ignore issue as moderator
     session[:user] = create(:moderator_user).id
     get :ignore, :params => { :id => issue.id }
     assert_response :redirect
-    assert_equal true, issue.reload.ignored?
+    assert issue.reload.ignored?
   end
 
   def test_ignore_administrator
@@ -178,14 +178,14 @@ class IssuesControllerTest < ActionController::TestCase
     # Ignore issue as moderator
     session[:user] = create(:moderator_user).id
     get :ignore, :params => { :id => issue.id }
-    assert_response :not_found
-    assert_equal false, issue.reload.ignored?
+    assert_redirected_to :controller => :errors, :action => :not_found
+    assert_not issue.reload.ignored?
 
     # Ignore issue as administrator
     session[:user] = create(:administrator_user).id
     get :ignore, :params => { :id => issue.id }
     assert_response :redirect
-    assert_equal true, issue.reload.ignored?
+    assert issue.reload.ignored?
   end
 
   def test_reopen_moderator
@@ -208,14 +208,14 @@ class IssuesControllerTest < ActionController::TestCase
     # Reopen issue as administrator
     session[:user] = create(:administrator_user).id
     get :reopen, :params => { :id => issue.id }
-    assert_response :not_found
-    assert_equal false, issue.reload.open?
+    assert_redirected_to :controller => :errors, :action => :not_found
+    assert_not issue.reload.open?
 
     # Reopen issue as moderator
     session[:user] = create(:moderator_user).id
     get :reopen, :params => { :id => issue.id }
     assert_response :redirect
-    assert_equal true, issue.reload.open?
+    assert issue.reload.open?
   end
 
   def test_reopen_administrator
@@ -238,13 +238,13 @@ class IssuesControllerTest < ActionController::TestCase
     # Reopen issue as moderator
     session[:user] = create(:moderator_user).id
     get :reopen, :params => { :id => issue.id }
-    assert_response :not_found
-    assert_equal false, issue.reload.open?
+    assert_redirected_to :controller => :errors, :action => :not_found
+    assert_not issue.reload.open?
 
     # Reopen issue as administrator
     session[:user] = create(:administrator_user).id
     get :reopen, :params => { :id => issue.id }
     assert_response :redirect
-    assert_equal true, issue.reload.open?
+    assert issue.reload.open?
   end
 end
index 35bd4dc9f6b65dce19930b2a93229e5d9e14a1ee..d07f6c83d737f9c720fc7d348bd43101988a30bf 100644 (file)
@@ -266,7 +266,7 @@ class MessagesControllerTest < ActionController::TestCase
       assert_select "textarea#message_body", :count => 1
       assert_select "input[type='submit'][value='Send']", :count => 1
     end
-    assert_equal true, Message.find(unread_message.id).message_read
+    assert Message.find(unread_message.id).message_read
 
     # Asking to reply to a message with no ID should fail
     assert_raise ActionController::UrlGenerationError do
@@ -306,7 +306,7 @@ class MessagesControllerTest < ActionController::TestCase
     get :show, :params => { :id => unread_message.id }
     assert_response :success
     assert_template "show"
-    assert_equal false, Message.find(unread_message.id).message_read
+    assert_not Message.find(unread_message.id).message_read
 
     # Login as the message recipient
     session[:user] = recipient_user.id
@@ -315,7 +315,7 @@ class MessagesControllerTest < ActionController::TestCase
     get :show, :params => { :id => unread_message.id }
     assert_response :success
     assert_template "show"
-    assert_equal true, Message.find(unread_message.id).message_read
+    assert Message.find(unread_message.id).message_read
 
     # Asking to read a message with no ID should fail
     assert_raise ActionController::UrlGenerationError do
@@ -399,24 +399,24 @@ class MessagesControllerTest < ActionController::TestCase
     # Check that the marking a message read works
     post :mark, :params => { :message_id => unread_message.id, :mark => "read" }
     assert_redirected_to inbox_messages_path
-    assert_equal true, Message.find(unread_message.id).message_read
+    assert Message.find(unread_message.id).message_read
 
     # Check that the marking a message unread works
     post :mark, :params => { :message_id => unread_message.id, :mark => "unread" }
     assert_redirected_to inbox_messages_path
-    assert_equal false, Message.find(unread_message.id).message_read
+    assert_not Message.find(unread_message.id).message_read
 
     # Check that the marking a message read via XHR works
     post :mark, :xhr => true, :params => { :message_id => unread_message.id, :mark => "read" }
     assert_response :success
     assert_template "mark"
-    assert_equal true, Message.find(unread_message.id).message_read
+    assert Message.find(unread_message.id).message_read
 
     # Check that the marking a message unread via XHR works
     post :mark, :xhr => true, :params => { :message_id => unread_message.id, :mark => "unread" }
     assert_response :success
     assert_template "mark"
-    assert_equal false, Message.find(unread_message.id).message_read
+    assert_not Message.find(unread_message.id).message_read
 
     # Asking to mark a message with no ID should fail
     assert_raise ActionController::UrlGenerationError do
@@ -458,16 +458,16 @@ class MessagesControllerTest < ActionController::TestCase
     assert_redirected_to inbox_messages_path
     assert_equal "Message deleted", flash[:notice]
     m = Message.find(read_message.id)
-    assert_equal true, m.from_user_visible
-    assert_equal false, m.to_user_visible
+    assert m.from_user_visible
+    assert_not m.to_user_visible
 
     # Check that the destroying a sent message works
     delete :destroy, :params => { :id => sent_message.id, :referer => outbox_messages_path }
     assert_redirected_to outbox_messages_path
     assert_equal "Message deleted", flash[:notice]
     m = Message.find(sent_message.id)
-    assert_equal false, m.from_user_visible
-    assert_equal true, m.to_user_visible
+    assert_not m.from_user_visible
+    assert m.to_user_visible
 
     # Asking to destroy a message with no ID should fail
     assert_raise ActionController::UrlGenerationError do
index 7e13ff54f2f64821d0c53fc6b01c30b651ce3644..7765bde46c47a2f45f662d1e3667c74383436a15 100644 (file)
@@ -565,7 +565,7 @@ class TracesControllerTest < ActionController::TestCase
     assert_equal "New Trace", trace.description
     assert_equal %w[new trace], trace.tags.order(:tag).collect(&:tag)
     assert_equal "trackable", trace.visibility
-    assert_equal false, trace.inserted
+    assert_not trace.inserted
     assert_equal File.new(fixture).read, File.new(trace.trace_name).read
     trace.destroy
     assert_equal "trackable", user.preferences.where(:k => "gps.trace.visibility").first.v
@@ -673,7 +673,7 @@ class TracesControllerTest < ActionController::TestCase
     assert_response :redirect
     assert_redirected_to :action => :index, :display_name => public_trace_file.user.display_name
     trace = Trace.find(public_trace_file.id)
-    assert_equal false, trace.visible
+    assert_not trace.visible
 
     # Finally with a trace that is destroyed by an admin
     public_trace_file = create(:trace, :visibility => "public")
@@ -683,7 +683,7 @@ class TracesControllerTest < ActionController::TestCase
     assert_response :redirect
     assert_redirected_to :action => :index, :display_name => public_trace_file.user.display_name
     trace = Trace.find(public_trace_file.id)
-    assert_equal false, trace.visible
+    assert_not trace.visible
   end
 
   private
index 326f2335afc69ecc8f320fb08ee114ff5ac12179..5338858f7ee356fbb0ea9622e2a3b03198af95b4 100644 (file)
@@ -120,7 +120,7 @@ class UserBlocksControllerTest < ActionController::TestCase
     # Viewing an active block should work, but shouldn't mark it as seen
     get :show, :params => { :id => active_block.id }
     assert_response :success
-    assert_equal true, UserBlock.find(active_block.id).needs_view
+    assert UserBlock.find(active_block.id).needs_view
 
     # Login as the blocked user
     session[:user] = active_block.user.id
@@ -128,7 +128,7 @@ class UserBlocksControllerTest < ActionController::TestCase
     # Now viewing it should mark it as seen
     get :show, :params => { :id => active_block.id }
     assert_response :success
-    assert_equal false, UserBlock.find(active_block.id).needs_view
+    assert_not UserBlock.find(active_block.id).needs_view
   end
 
   ##
@@ -261,7 +261,7 @@ class UserBlocksControllerTest < ActionController::TestCase
     assert_in_delta Time.now, b.created_at, 1
     assert_in_delta Time.now, b.updated_at, 1
     assert_in_delta Time.now + 12.hours, b.ends_at, 1
-    assert_equal false, b.needs_view
+    assert_not b.needs_view
     assert_equal "Vandalism", b.reason
     assert_equal "markdown", b.reason_format
     assert_equal moderator_user.id, b.creator_id
@@ -334,7 +334,7 @@ class UserBlocksControllerTest < ActionController::TestCase
     assert_equal "Block updated.", flash[:notice]
     b = UserBlock.find(active_block.id)
     assert_in_delta Time.now, b.updated_at, 1
-    assert_equal true, b.needs_view
+    assert b.needs_view
     assert_equal "Vandalism", b.reason
 
     # We should get an error if no block ID is specified
index 8f3471baa9aac6e920466e5d77aabb150d6b2a38..a0d85ada36dd03ce8eba699ff4e7e8009d5c3575 100644 (file)
@@ -632,9 +632,9 @@ class UsersControllerTest < ActionController::TestCase
 
     user.reload
 
-    assert_equal true, user.consider_pd
+    assert user.consider_pd
     assert_not_nil user.terms_agreed
-    assert_equal true, user.terms_seen
+    assert user.terms_seen
   end
 
   def test_terms_not_seen_with_referer
@@ -653,9 +653,9 @@ class UsersControllerTest < ActionController::TestCase
 
     user.reload
 
-    assert_equal true, user.consider_pd
+    assert user.consider_pd
     assert_not_nil user.terms_agreed
-    assert_equal true, user.terms_seen
+    assert user.terms_seen
   end
 
   # Check that if you haven't seen the terms, and make a request that requires authentication,
@@ -674,7 +674,7 @@ class UsersControllerTest < ActionController::TestCase
     post :go_public, :session => { :user => user }
     assert_response :redirect
     assert_redirected_to :action => :account, :display_name => user.display_name
-    assert_equal true, User.find(user.id).data_public
+    assert User.find(user.id).data_public
   end
 
   def test_lost_password
@@ -792,7 +792,7 @@ class UsersControllerTest < ActionController::TestCase
     assert_equal user.id, session[:user]
     user.reload
     assert_equal "active", user.status
-    assert_equal true, user.email_valid
+    assert user.email_valid
     assert_equal user, User.authenticate(:username => user.email, :password => "new_password")
   end
 
@@ -1304,8 +1304,8 @@ class UsersControllerTest < ActionController::TestCase
     assert_equal "", user.description
     assert_nil user.home_lat
     assert_nil user.home_lon
-    assert_equal false, user.avatar.attached?
-    assert_equal false, user.email_valid
+    assert_not user.avatar.attached?
+    assert_not user.email_valid
     assert_nil user.new_email
     assert_nil user.auth_provider
     assert_nil user.auth_uid
index dc45a6c07bce919a59bb880e41be58f37b5a73d9..fe4587b87c50455d7d936ef21ea2d32fe26baa75 100644 (file)
@@ -16,11 +16,11 @@ class ApplicationHelperTest < ActionView::TestCase
       text = "Test #{link} is <b>made</b> into a link"
 
       html = linkify(text)
-      assert_equal true, html.html_safe?
+      assert html.html_safe?
       assert_dom_equal "Test <a href=\"#{link}\" rel=\"nofollow\">#{link}</a> is &lt;b&gt;made&lt;/b&gt; into a link", html
 
       html = linkify(text.html_safe)
-      assert_equal true, html.html_safe?
+      assert html.html_safe?
       assert_dom_equal "Test <a href=\"#{link}\" rel=\"nofollow\">#{link}</a> is <b>made</b> into a link", html
     end
 
@@ -28,11 +28,11 @@ class ApplicationHelperTest < ActionView::TestCase
       text = "Test #{link} is not <b>made</b> into a link"
 
       html = linkify(text)
-      assert_equal true, html.html_safe?
+      assert html.html_safe?
       assert_dom_equal "Test #{link} is not &lt;b&gt;made&lt;/b&gt; into a link", html
 
       html = linkify(text.html_safe)
-      assert_equal true, html.html_safe?
+      assert html.html_safe?
       assert_dom_equal "Test #{link} is not <b>made</b> into a link", html
     end
   end
index 9c666c0b849ed1ab64ecf93127af3aada42d45f8..4f05d5f7acf39f341789e7c72dd591dae425c13d 100644 (file)
@@ -112,24 +112,24 @@ class BrowseHelperTest < ActionView::TestCase
 
     tags = icon_tags(node)
     assert_equal 3, tags.count
-    assert tags.include?(%w[building yes])
-    assert tags.include?(%w[tourism museum])
-    assert tags.include?(%w[shop gift])
+    assert_includes tags, %w[building yes]
+    assert_includes tags, %w[tourism museum]
+    assert_includes tags, %w[shop gift]
 
     add_old_tags_selection(node_v2)
     add_old_tags_selection(node_v1)
 
     tags = icon_tags(node_v2)
     assert_equal 3, tags.count
-    assert tags.include?(%w[building yes])
-    assert tags.include?(%w[tourism museum])
-    assert tags.include?(%w[shop gift])
+    assert_includes tags, %w[building yes]
+    assert_includes tags, %w[tourism museum]
+    assert_includes tags, %w[shop gift]
 
     tags = icon_tags(node_v1)
     assert_equal 3, tags.count
-    assert tags.include?(%w[building yes])
-    assert tags.include?(%w[tourism museum])
-    assert tags.include?(%w[shop gift])
+    assert_includes tags, %w[building yes]
+    assert_includes tags, %w[tourism museum]
+    assert_includes tags, %w[shop gift]
   end
 
   def add_old_tags_selection(old_node)
index cdfd234af46c284a3e71d727e26bbf110b8365d5..8145c3613db0812a9d4e427bc8006dee1049e3ac 100644 (file)
@@ -36,19 +36,19 @@ class I18nTest < ActiveSupport::TestCase
               next if subvalue.nil?
 
               subvalue.scan(/%\{(\w+)\}/) do
-                assert variables.include?(Regexp.last_match(1)), "#{key}.#{subkey} uses unknown interpolation variable #{Regexp.last_match(1)}"
+                assert_includes variables, Regexp.last_match(1), "#{key}.#{subkey} uses unknown interpolation variable #{Regexp.last_match(1)}"
               end
             end
           else
             assert value.is_a?(String), "#{key} is not a string"
 
             value.scan(/%\{(\w+)\}/) do
-              assert variables.include?(Regexp.last_match(1)), "#{key} uses unknown interpolation variable #{Regexp.last_match(1)}"
+              assert_includes variables, Regexp.last_match(1), "#{key} uses unknown interpolation variable #{Regexp.last_match(1)}"
             end
           end
         end
 
-        assert %w[ltr rtl].include?(I18n.t("html.dir", :locale => locale)), "html.dir must be ltr or rtl"
+        assert_includes %w[ltr rtl], I18n.t("html.dir", :locale => locale), "html.dir must be ltr or rtl"
       end
     end
   end
index 65c7ea398799e3333423f04afcfca10081d06e2e..4d457116013e55ca6c84bfb208018801de3d4136 100644 (file)
@@ -92,8 +92,8 @@ class LocaleTest < ActiveSupport::TestCase
     assert_equal "zh-TW", Locale.available.preferred(Locale.list("zh-Hant-TW", "de")).to_s
     assert_equal "zh-TW", Locale.available.preferred(Locale.list("zh-TW", "de")).to_s
     assert_equal "zh-HK", Locale.available.preferred(Locale.list("yue", "zh-HK", "de")).to_s
-    assert_equal "zh-yue", Locale.available. preferred(Locale.list("yue", "zh-yue", "zh-HK", "de")).to_s
-    assert_equal "zh-yue", Locale.available. preferred(Locale.list("yue", "zh-YUE", "zh-HK", "de")).to_s
+    assert_equal "zh-yue", Locale.available.preferred(Locale.list("yue", "zh-yue", "zh-HK", "de")).to_s
+    assert_equal "zh-yue", Locale.available.preferred(Locale.list("yue", "zh-YUE", "zh-HK", "de")).to_s
     assert_equal "en", Locale.available.preferred(Locale.list("yue")).to_s
   end
 end
index 6f54a0d7adb276130b960d13e0364ee51ba9a1b6..1440b35c4d24b55ca8bef97961f2676abc61cbef 100644 (file)
@@ -2,30 +2,30 @@ require "test_helper"
 
 class PasswordHashTest < ActiveSupport::TestCase
   def test_md5_without_salt
-    assert_equal true, PasswordHash.check("5f4dcc3b5aa765d61d8327deb882cf99", nil, "password")
-    assert_equal false, PasswordHash.check("5f4dcc3b5aa765d61d8327deb882cf99", nil, "wrong")
-    assert_equal true, PasswordHash.upgrade?("5f4dcc3b5aa765d61d8327deb882cf99", nil)
+    assert PasswordHash.check("5f4dcc3b5aa765d61d8327deb882cf99", nil, "password")
+    assert_not PasswordHash.check("5f4dcc3b5aa765d61d8327deb882cf99", nil, "wrong")
+    assert PasswordHash.upgrade?("5f4dcc3b5aa765d61d8327deb882cf99", nil)
   end
 
   def test_md5_with_salt
-    assert_equal true, PasswordHash.check("67a1e09bb1f83f5007dc119c14d663aa", "salt", "password")
-    assert_equal false, PasswordHash.check("67a1e09bb1f83f5007dc119c14d663aa", "salt", "wrong")
-    assert_equal false, PasswordHash.check("67a1e09bb1f83f5007dc119c14d663aa", "wrong", "password")
-    assert_equal true, PasswordHash.upgrade?("67a1e09bb1f83f5007dc119c14d663aa", "salt")
+    assert PasswordHash.check("67a1e09bb1f83f5007dc119c14d663aa", "salt", "password")
+    assert_not PasswordHash.check("67a1e09bb1f83f5007dc119c14d663aa", "salt", "wrong")
+    assert_not PasswordHash.check("67a1e09bb1f83f5007dc119c14d663aa", "wrong", "password")
+    assert 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=")
+    assert PasswordHash.check("ApT/28+FsTBLa/J8paWfgU84SoRiTfeY8HjKWhgHy08=", "sha512!1000!HR4z+hAvKV2ra1gpbRybtoNzm/CNKe4cf7bPKwdUNrk=", "password")
+    assert_not PasswordHash.check("ApT/28+FsTBLa/J8paWfgU84SoRiTfeY8HjKWhgHy08=", "sha512!1000!HR4z+hAvKV2ra1gpbRybtoNzm/CNKe4cf7bPKwdUNrk=", "wrong")
+    assert_not PasswordHash.check("ApT/28+FsTBLa/J8paWfgU84SoRiTfeY8HjKWhgHy08=", "sha512!1000!HR4z+hAvKV2ra1gwrongtoNzm/CNKe4cf7bPKwdUNrk=", "password")
+    assert 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=")
+    assert PasswordHash.check("3wYbPiOxk/tU0eeIDjUhdvi8aDP3AbFtwYKKxF1IhGg=", "sha512!10000!OUQLgtM7eD8huvanFT5/WtWaCwdOdrir8QOtFwxhO0A=", "password")
+    assert_not PasswordHash.check("3wYbPiOxk/tU0eeIDjUhdvi8aDP3AbFtwYKKxF1IhGg=", "sha512!10000!OUQLgtM7eD8huvanFT5/WtWaCwdOdrir8QOtFwxhO0A=", "wrong")
+    assert_not PasswordHash.check("3wYbPiOxk/tU0eeIDjUhdvi8aDP3AbFtwYKKxF1IhGg=", "sha512!10000!OUQLgtMwronguvanFT5/WtWaCwdOdrir8QOtFwxhO0A=", "password")
+    assert_not PasswordHash.upgrade?("3wYbPiOxk/tU0eeIDjUhdvi8aDP3AbFtwYKKxF1IhGg=", "sha512!10000!OUQLgtM7eD8huvanFT5/WtWaCwdOdrir8QOtFwxhO0A=")
   end
 
   def test_default
@@ -33,11 +33,11 @@ class PasswordHashTest < ActiveSupport::TestCase
     hash2, salt2 = PasswordHash.create("password")
     assert_not_equal hash1, hash2
     assert_not_equal salt1, salt2
-    assert_equal true, PasswordHash.check(hash1, salt1, "password")
-    assert_equal false, PasswordHash.check(hash1, salt1, "wrong")
-    assert_equal true, PasswordHash.check(hash2, salt2, "password")
-    assert_equal false, PasswordHash.check(hash2, salt2, "wrong")
-    assert_equal false, PasswordHash.upgrade?(hash1, salt1)
-    assert_equal false, PasswordHash.upgrade?(hash2, salt2)
+    assert PasswordHash.check(hash1, salt1, "password")
+    assert_not PasswordHash.check(hash1, salt1, "wrong")
+    assert PasswordHash.check(hash2, salt2, "password")
+    assert_not PasswordHash.check(hash2, salt2, "wrong")
+    assert_not PasswordHash.upgrade?(hash1, salt1)
+    assert_not PasswordHash.upgrade?(hash2, salt2)
   end
 end
index 4ad6f0c9e45fbd5a695512e87080f9091b90ece6..d90d5efa9787d6cf99cdf560d929faa3b02e3dcc 100644 (file)
@@ -2,16 +2,16 @@ require "test_helper"
 
 class UTF8Test < ActiveSupport::TestCase
   def test_valid?
-    assert_equal true, UTF8.valid?("test")
-    assert_equal true, UTF8.valid?("vergrößern")
-    assert_equal true, UTF8.valid?("ルシステムにも対応します")
-    assert_equal true, UTF8.valid?("輕觸搖晃的遊戲")
+    assert UTF8.valid?("test")
+    assert UTF8.valid?("vergrößern")
+    assert UTF8.valid?("ルシステムにも対応します")
+    assert UTF8.valid?("輕觸搖晃的遊戲")
 
-    assert_equal false, UTF8.valid?("\xC0")         # always invalid utf8
-    assert_equal false, UTF8.valid?("\xC2\x4a")     # 2-byte multibyte identifier, followed by plain ASCII
-    assert_equal false, UTF8.valid?("\xC2\xC2")     # 2-byte multibyte identifier, followed by another one
-    assert_equal false, UTF8.valid?("\x4a\x82")     # plain ASCII, followed by multibyte continuation
-    assert_equal false, UTF8.valid?("\x82\x82")     # multibyte continuations without multibyte identifier
-    assert_equal false, UTF8.valid?("\xe1\x82\x4a") # three-byte identifier, contination and (incorrectly) plain ASCII
+    assert_not UTF8.valid?("\xC0")         # always invalid utf8
+    assert_not UTF8.valid?("\xC2\x4a")     # 2-byte multibyte identifier, followed by plain ASCII
+    assert_not UTF8.valid?("\xC2\xC2")     # 2-byte multibyte identifier, followed by another one
+    assert_not UTF8.valid?("\x4a\x82")     # plain ASCII, followed by multibyte continuation
+    assert_not UTF8.valid?("\x82\x82")     # multibyte continuations without multibyte identifier
+    assert_not UTF8.valid?("\xe1\x82\x4a") # three-byte identifier, contination and (incorrectly) plain ASCII
   end
 end
index 8e5b21aff7c55500b376644bf7db16218e03fe03..c0b7b7977fcd6d84a7e4b6c5a9422768c5caccce 100644 (file)
@@ -3,7 +3,7 @@ require "test_helper"
 class ClientApplicationTest < ActiveSupport::TestCase
   def test_url_valid
     ok = ["http://example.com/test", "https://example.com/test"]
-    bad = ["", "ftp://example.com/test", "myapp://somewhere"]
+    bad = ["", "ftp://example.com/test", "myapp://somewhere", "http://example.com\nhttp://example.net"]
 
     ok.each do |url|
       app = build(:client_application)
@@ -20,7 +20,7 @@ class ClientApplicationTest < ActiveSupport::TestCase
 
   def test_support_url_valid
     ok = ["", "http://example.com/test", "https://example.com/test"]
-    bad = ["ftp://example.com/test", "myapp://somewhere", "gibberish"]
+    bad = ["ftp://example.com/test", "myapp://somewhere", "gibberish", "http://example.com\nhttp://example.net"]
 
     ok.each do |url|
       app = build(:client_application)
@@ -37,7 +37,7 @@ class ClientApplicationTest < ActiveSupport::TestCase
 
   def test_callback_url_valid
     ok = ["", "http://example.com/test", "https://example.com/test", "ftp://example.com/test", "myapp://somewhere"]
-    bad = ["gibberish"]
+    bad = ["gibberish", "http://example.com\nhttp://example.net"]
 
     ok.each do |url|
       app = build(:client_application)
index e8a572fd8fd4f64da2fa31bdad3d431fa6101b68..5733d5063033399ef40f1fb4a8e47eef2ad5abcc 100644 (file)
@@ -4,55 +4,55 @@ class NodeTest < ActiveSupport::TestCase
   def test_node_too_far_north
     node = build(:node, :latitude => 90.01 * OldNode::SCALE)
     node.validate
-    assert node.errors.full_messages.include?("Node is not in the world")
+    assert_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_north_limit
     node = build(:node, :latitude => 90 * OldNode::SCALE)
     node.validate
-    assert_equal false, node.errors.full_messages.include?("Node is not in the world")
+    assert_not_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_too_far_south
     node = build(:node, :latitude => -90.01 * OldNode::SCALE)
     node.validate
-    assert node.errors.full_messages.include?("Node is not in the world")
+    assert_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_south_limit
     node = build(:node, :latitude => -90 * OldNode::SCALE)
     node.validate
-    assert_equal false, node.errors.full_messages.include?("Node is not in the world")
+    assert_not_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_too_far_west
     node = build(:node, :longitude => -180.01 * OldNode::SCALE)
     node.validate
-    assert node.errors.full_messages.include?("Node is not in the world")
+    assert_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_west_limit
     node = build(:node, :longitude => -180 * OldNode::SCALE)
     node.validate
-    assert_equal false, node.errors.full_messages.include?("Node is not in the world")
+    assert_not_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_too_far_east
     node = build(:node, :longitude => 180.01 * OldNode::SCALE)
     node.validate
-    assert node.errors.full_messages.include?("Node is not in the world")
+    assert_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_east_limit
     node = build(:node, :longitude => 180 * OldNode::SCALE)
     node.validate
-    assert_equal false, node.errors.full_messages.include?("Node is not in the world")
+    assert_not_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_totally_wrong
     node = build(:node, :latitude => 200 * OldNode::SCALE, :longitude => 200 * OldNode::SCALE)
     node.validate
-    assert node.errors.full_messages.include?("Node is not in the world")
+    assert_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_lat_lon
@@ -147,7 +147,7 @@ class NodeTest < ActiveSupport::TestCase
     assert_equal node_template.latitude, node.latitude
     assert_equal node_template.longitude, node.longitude
     assert_equal node_template.changeset_id, node.changeset_id
-    assert_equal false, node.visible
+    assert_not node.visible
     # assert_equal node_template.tags, node.tags
 
     assert_equal OldNode.where(:node_id => node_template.id).count, 2
@@ -156,7 +156,7 @@ class NodeTest < ActiveSupport::TestCase
     assert_equal node_template.latitude, old_node.latitude
     assert_equal node_template.longitude, old_node.longitude
     assert_equal node_template.changeset_id, old_node.changeset_id
-    assert_equal false, old_node.visible
+    assert_not old_node.visible
     # assert_equal node_template.tags, old_node.tags
   end
 
index 2010fe20204047f4a4f78eaea9387ba5ff8fc762..2385125b5487e85bf64ad7637e3847f9d2c7170a 100644 (file)
@@ -37,14 +37,14 @@ class NoteTest < ActiveSupport::TestCase
   end
 
   def test_visible?
-    assert_equal true, create(:note, :status => "open").visible?
-    assert_equal true, create(:note, :status => "closed").visible?
-    assert_equal false, create(:note, :status => "hidden").visible?
+    assert create(:note, :status => "open").visible?
+    assert create(:note, :status => "closed").visible?
+    assert_not create(:note, :status => "hidden").visible?
   end
 
   def test_closed?
-    assert_equal true, create(:note, :status => "closed", :closed_at => Time.now).closed?
-    assert_equal false, create(:note, :status => "open", :closed_at => nil).closed?
+    assert create(:note, :status => "closed", :closed_at => Time.now).closed?
+    assert_not create(:note, :status => "open", :closed_at => nil).closed?
   end
 
   def test_author
index dd97278c132415ad50040705191d90dd87685161..56178fb5fc63fb48cbe215e2c21be38f3d25d74e 100644 (file)
@@ -12,7 +12,7 @@ class OauthNonceTest < ActiveSupport::TestCase
     assert_not_equal false, nonce1, "First nonce should be unique. Check your test database is empty."
 
     nonce2 = OauthNonce.remember(string, timestamp)
-    assert_equal false, nonce2, "Shouldn't be able to remember the same nonce twice."
+    assert_not nonce2, "Shouldn't be able to remember the same nonce twice."
   end
 
   ##
@@ -21,7 +21,7 @@ class OauthNonceTest < ActiveSupport::TestCase
     string = "0123456789ABCDEF"
 
     nonce1 = OauthNonce.remember(string, Time.now.to_i - 86430)
-    assert_equal false, nonce1, "Nonces over a day in the past should be rejected"
+    assert_not nonce1, "Nonces over a day in the past should be rejected"
 
     nonce2 = OauthNonce.remember(string, Time.now.to_i - 86370)
     assert_not_equal false, nonce2, "Nonces under a day in the past should be rejected"
index 4b0e39e9a59f97d776e4e59cd331ad670485df0d..3e3aaae7c8738fc80774b8af34163c9a12bbf10e 100644 (file)
@@ -5,19 +5,19 @@ class OauthTokenTest < ActiveSupport::TestCase
   # check that after calling invalidate! on a token, it is invalid.
   def test_token_invalidation
     tok = OauthToken.new
-    assert_equal false, tok.invalidated?, "Token should be created valid."
+    assert_not tok.invalidated?, "Token should be created valid."
     tok.invalidate!
-    assert_equal true, tok.invalidated?, "Token should now be invalid."
+    assert tok.invalidated?, "Token should now be invalid."
   end
 
   ##
   # check that an authorized token is authorised and can be invalidated
   def test_token_authorisation
     tok = RequestToken.create(:client_application => create(:client_application))
-    assert_equal false, tok.authorized?, "Token should be created unauthorised."
+    assert_not tok.authorized?, "Token should be created unauthorised."
     tok.authorize!(create(:user))
-    assert_equal true, tok.authorized?, "Token should now be authorised."
+    assert tok.authorized?, "Token should now be authorised."
     tok.invalidate!
-    assert_equal false, tok.authorized?, "Token should now be invalid."
+    assert_not tok.authorized?, "Token should now be invalid."
   end
 end
index 12d34473020ea392c5c80906ad45a0147c7abe3a..eade6130a11873a0768e1034909ad61713172ad0 100644 (file)
@@ -4,55 +4,55 @@ class OldNodeTest < ActiveSupport::TestCase
   def test_node_too_far_north
     node = build(:old_node, :latitude => 90.01 * OldNode::SCALE)
     node.validate
-    assert node.errors.full_messages.include?("Node is not in the world")
+    assert_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_north_limit
     node = build(:old_node, :latitude => 90 * OldNode::SCALE)
     node.validate
-    assert_equal false, node.errors.full_messages.include?("Node is not in the world")
+    assert_not_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_too_far_south
     node = build(:old_node, :latitude => -90.01 * OldNode::SCALE)
     node.validate
-    assert node.errors.full_messages.include?("Node is not in the world")
+    assert_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_south_limit
     node = build(:old_node, :latitude => -90 * OldNode::SCALE)
     node.validate
-    assert_equal false, node.errors.full_messages.include?("Node is not in the world")
+    assert_not_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_too_far_west
     node = build(:old_node, :longitude => -180.01 * OldNode::SCALE)
     node.validate
-    assert node.errors.full_messages.include?("Node is not in the world")
+    assert_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_west_limit
     node = build(:old_node, :longitude => -180 * OldNode::SCALE)
     node.validate
-    assert_equal false, node.errors.full_messages.include?("Node is not in the world")
+    assert_not_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_too_far_east
     node = build(:old_node, :longitude => 180.01 * OldNode::SCALE)
     node.validate
-    assert node.errors.full_messages.include?("Node is not in the world")
+    assert_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_node_east_limit
     node = build(:old_node, :longitude => 180 * OldNode::SCALE)
     node.validate
-    assert_equal false, node.errors.full_messages.include?("Node is not in the world")
+    assert_not_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_totally_wrong
     node = build(:old_node, :latitude => 200 * OldNode::SCALE, :longitude => 200 * OldNode::SCALE)
     node.validate
-    assert node.errors.full_messages.include?("Node is not in the world")
+    assert_includes node.errors.full_messages, "Node is not in the world"
   end
 
   def test_lat_lon
index fb232b81b4396ef4bc3f6ae0aef27f10980d34f9..d74a9117969ba2ac89868889dbfd15351c0b30cc 100644 (file)
@@ -4,7 +4,7 @@ class RedactionTest < ActiveSupport::TestCase
   def test_cannot_redact_current
     n = create(:node)
     r = create(:redaction)
-    assert_equal(false, n.redacted?, "Expected node to not be redacted already.")
+    assert_not(n.redacted?, "Expected node to not be redacted already.")
     assert_raise(OSM::APICannotRedactError) do
       n.redact!(r)
     end
@@ -14,7 +14,7 @@ class RedactionTest < ActiveSupport::TestCase
     node = create(:node, :with_history)
     node_v1 = node.old_nodes.find_by(:version => 1)
     r = create(:redaction)
-    assert_equal(false, node_v1.redacted?, "Expected node to not be redacted already.")
+    assert_not(node_v1.redacted?, "Expected node to not be redacted already.")
     assert_raise(OSM::APICannotRedactError) do
       node_v1.redact!(r)
     end
@@ -26,11 +26,11 @@ class RedactionTest < ActiveSupport::TestCase
     node_v2 = node.old_nodes.find_by(:version => 2)
     r = create(:redaction)
 
-    assert_equal(false, node_v1.redacted?, "Expected node to not be redacted already.")
+    assert_not(node_v1.redacted?, "Expected node to not be redacted already.")
     assert_nothing_raised do
       node_v1.redact!(r)
     end
-    assert_equal(true, node_v1.redacted?, "Expected node version 1 to be redacted after redact! call.")
-    assert_equal(false, node_v2.redacted?, "Expected node version 2 to not be redacted after redact! call.")
+    assert(node_v1.redacted?, "Expected node version 1 to be redacted after redact! call.")
+    assert_not(node_v2.redacted?, "Expected node version 2 to not be redacted after redact! call.")
   end
 end
index 7bfed5a56287d551c98b373c08b8921a459f4ed5..c231371cefeb684a698b10a11640499b3c2257e2 100644 (file)
@@ -2,9 +2,9 @@ require "test_helper"
 
 class RequestTokenTest < ActiveSupport::TestCase
   def test_oob
-    assert_equal true, RequestToken.new.oob?
-    assert_equal true, RequestToken.new(:callback_url => "oob").oob?
-    assert_equal true, RequestToken.new(:callback_url => "OOB").oob?
-    assert_equal false, RequestToken.new(:callback_url => "http://test.host/").oob?
+    assert RequestToken.new.oob?
+    assert RequestToken.new(:callback_url => "oob").oob?
+    assert RequestToken.new(:callback_url => "OOB").oob?
+    assert_not RequestToken.new(:callback_url => "http://test.host/").oob?
   end
 end
index 2955be3ad67768103b26f3446b5cd63734a3c03c..bf4e0196bf562c4e74ad795a991cadf391370dbe 100644 (file)
@@ -108,27 +108,27 @@ class TraceTest < ActiveSupport::TestCase
   end
 
   def test_public?
-    assert_equal true, build(:trace, :visibility => "public").public?
-    assert_equal false, build(:trace, :visibility => "private").public?
-    assert_equal false, build(:trace, :visibility => "trackable").public?
-    assert_equal true, build(:trace, :visibility => "identifiable").public?
-    assert_equal true, build(:trace, :deleted, :visibility => "public").public?
+    assert build(:trace, :visibility => "public").public?
+    assert_not build(:trace, :visibility => "private").public?
+    assert_not build(:trace, :visibility => "trackable").public?
+    assert build(:trace, :visibility => "identifiable").public?
+    assert build(:trace, :deleted, :visibility => "public").public?
   end
 
   def test_trackable?
-    assert_equal false, build(:trace, :visibility => "public").trackable?
-    assert_equal false, build(:trace, :visibility => "private").trackable?
-    assert_equal true, build(:trace, :visibility => "trackable").trackable?
-    assert_equal true, build(:trace, :visibility => "identifiable").trackable?
-    assert_equal false, build(:trace, :deleted, :visibility => "public").trackable?
+    assert_not build(:trace, :visibility => "public").trackable?
+    assert_not build(:trace, :visibility => "private").trackable?
+    assert build(:trace, :visibility => "trackable").trackable?
+    assert build(:trace, :visibility => "identifiable").trackable?
+    assert_not build(:trace, :deleted, :visibility => "public").trackable?
   end
 
   def test_identifiable?
-    assert_equal false, build(:trace, :visibility => "public").identifiable?
-    assert_equal false, build(:trace, :visibility => "private").identifiable?
-    assert_equal false, build(:trace, :visibility => "trackable").identifiable?
-    assert_equal true, build(:trace, :visibility => "identifiable").identifiable?
-    assert_equal false, build(:trace, :deleted, :visibility => "public").identifiable?
+    assert_not build(:trace, :visibility => "public").identifiable?
+    assert_not build(:trace, :visibility => "private").identifiable?
+    assert_not build(:trace, :visibility => "trackable").identifiable?
+    assert build(:trace, :visibility => "identifiable").identifiable?
+    assert_not build(:trace, :deleted, :visibility => "public").identifiable?
   end
 
   def test_mime_type
@@ -218,22 +218,22 @@ class TraceTest < ActiveSupport::TestCase
     trace = create(:trace, :fixture => "a")
     icon_path = File.join(Settings.gpx_image_dir, "#{trace.id}_icon.gif")
     FileUtils.rm(icon_path)
-    assert_equal false, File.exist?(icon_path)
+    assert_not File.exist?(icon_path)
 
     trace.import
 
-    assert_equal true, File.exist?(icon_path)
+    assert File.exist?(icon_path)
   end
 
   def test_import_creates_large_picture
     trace = create(:trace, :fixture => "a")
     large_picture_path = File.join(Settings.gpx_image_dir, "#{trace.id}.gif")
     FileUtils.rm(large_picture_path)
-    assert_equal false, File.exist?(large_picture_path)
+    assert_not File.exist?(large_picture_path)
 
     trace.import
 
-    assert_equal true, File.exist?(large_picture_path)
+    assert File.exist?(large_picture_path)
   end
 
   def test_import_handles_bz2
index bceec0719718bdb36048ee7315f26159a942c028..952289d940d20a30cf32df656c70bfb8ea0ccbfc 100644 (file)
@@ -36,7 +36,7 @@ class UserPreferenceTest < ActiveSupport::TestCase
       up.user = create(:user)
       up.k = key * i
       up.v = val * i
-      assert_equal false, up.valid?
+      assert_not up.valid?
       assert_raise(ActiveRecord::RecordInvalid) { up.save! }
     end
   end
index 2368960e163b2b1bf8d75d6823447d507524d0bf..330f40df28d13bf4e7ac3579a76109fefbb29345 100644 (file)
@@ -26,7 +26,7 @@ class UserTest < ActiveSupport::TestCase
       :description => "desc"
     )
     assert_not new_user.save
-    assert new_user.errors[:email].include?("has already been taken")
+    assert_includes new_user.errors[:email], "has already been taken"
   end
 
   def test_unique_display_name
@@ -40,7 +40,7 @@ class UserTest < ActiveSupport::TestCase
       :description => "desc"
     )
     assert_not new_user.save
-    assert new_user.errors[:display_name].include?("has already been taken")
+    assert_includes new_user.errors[:display_name], "has already been taken"
   end
 
   def test_email_valid
@@ -224,36 +224,36 @@ class UserTest < ActiveSupport::TestCase
   end
 
   def test_visible?
-    assert_equal true, build(:user, :pending).visible?
-    assert_equal true, build(:user, :active).visible?
-    assert_equal true, build(:user, :confirmed).visible?
-    assert_equal false, build(:user, :suspended).visible?
-    assert_equal false, build(:user, :deleted).visible?
+    assert build(:user, :pending).visible?
+    assert build(:user, :active).visible?
+    assert build(:user, :confirmed).visible?
+    assert_not build(:user, :suspended).visible?
+    assert_not build(:user, :deleted).visible?
   end
 
   def test_active?
-    assert_equal false, build(:user, :pending).active?
-    assert_equal true, build(:user, :active).active?
-    assert_equal true, build(:user, :confirmed).active?
-    assert_equal false, build(:user, :suspended).active?
-    assert_equal false, build(:user, :deleted).active?
+    assert_not build(:user, :pending).active?
+    assert build(:user, :active).active?
+    assert build(:user, :confirmed).active?
+    assert_not build(:user, :suspended).active?
+    assert_not build(:user, :deleted).active?
   end
 
   def test_moderator?
-    assert_equal false, create(:user).moderator?
-    assert_equal true, create(:moderator_user).moderator?
+    assert_not create(:user).moderator?
+    assert create(:moderator_user).moderator?
   end
 
   def test_administrator?
-    assert_equal false, create(:user).administrator?
-    assert_equal true, create(:administrator_user).administrator?
+    assert_not create(:user).administrator?
+    assert create(:administrator_user).administrator?
   end
 
   def test_has_role?
-    assert_equal false, create(:user).has_role?("administrator")
-    assert_equal false, create(:user).has_role?("moderator")
-    assert_equal true, create(:administrator_user).has_role?("administrator")
-    assert_equal true, create(:moderator_user).has_role?("moderator")
+    assert_not create(:user).has_role?("administrator")
+    assert_not create(:user).has_role?("moderator")
+    assert create(:administrator_user).has_role?("administrator")
+    assert create(:moderator_user).has_role?("moderator")
   end
 
   def test_delete
@@ -263,10 +263,10 @@ class UserTest < ActiveSupport::TestCase
     assert user.description.blank?
     assert_nil user.home_lat
     assert_nil user.home_lon
-    assert_equal false, user.avatar.attached?
+    assert_not user.avatar.attached?
     assert_equal "deleted", user.status
-    assert_equal false, user.visible?
-    assert_equal false, user.active?
+    assert_not user.visible?
+    assert_not user.active?
   end
 
   def test_to_xml