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:
inherit_from: .rubocop_todo.yml
require:
+ - rubocop-minitest
- rubocop-performance
- rubocop-rails
AllCops:
TargetRubyVersion: 2.5
+ NewCops: enable
Exclude:
- 'vendor/**/*'
# Work around erblint issues.
# https://github.com/openstreetmap/openstreetmap-website/issues/2472
require:
+ - rubocop-minitest
- rubocop-performance
- rubocop-rails
# 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
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)
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)
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)
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)
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)
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)
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)
rinku (>= 2.0.6)
rotp
rubocop
+ rubocop-minitest
rubocop-performance
rubocop-rails
sanitize
.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;
}
}
+
+@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;
+ }
+ }
+}
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
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
<%= 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 %>
--- /dev/null
+<%= 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 -%>
<meta charset="utf-8">
<title>OpenStreetMap</title>
<%= stylesheet_link_tag "errors", :media => "screen" %>
+ <%= render :partial => "layouts/meta" %>
</head>
<body>
<a href="<%= root_path %>">
<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>
<% 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>
<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>
<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>
+++ /dev/null
-if defined?(Konacha)
- Konacha.configure do |config|
- require "capybara/poltergeist"
- config.spec_dir = "test/javascripts"
- config.driver = :poltergeist
- end
-end
diary_comment: Comentariu del diariu
diary_entry: Entrada del diariu
friend: Amigu
+ issue: Problema
language: Llingua
message: Mensaxe
node: Nuedu
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
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:
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!
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
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
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 !
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:
acl: Zugriffssteuerungsliste
changeset: Änderungssatz
changeset_tag: Änderungssatz-Attribut
- country: Staat
+ country: Land
diary_comment: Blog-Kommentar
diary_entry: Blog-Eintrag
friend: Freund
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
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
message:
sender: Absender
title: Betreff
- body: Textkörper
+ body: Inhalt
recipient: Empfänger
user:
email: E-Mail
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
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:
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})
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}
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}
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>
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!
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
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!"
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!
diary_comment: نظر بر روزنوشت
diary_entry: روزنوشت
friend: دوست
+ issue: مسئله
language: زبان
message: پیام
node: گره
trail: دنباله
trunk: بزرگراه
trunk_link: بزرگراه
+ turning_loop: حلقهٔ گردش
unclassified: جادهٔ فرعی
"yes": جاده
historic:
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 گزارش
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: بازگشایی
ignored: وضعیت مسئله به «نادیده گرفته شد» تغییر کرده است
reopen:
reopened: وضعیت مسئله به «باز» تغییر داده کرده است
+ comments:
+ comment_from_html: نظر از %{user_link} در %{comment_created_at}
reports:
reported_by_html: در %{updated_at}، %{user} آن را بهعنوان %{category} گزارش
کرد
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: سلام بر شما!
حقنشر و پروانه</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:
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،
اگر در حالت زنده ویرایش میکنید، باید راه یا نقطهٔ جاری را از حالت انتخاب
identifiable: قابل شناسایی
private: خصوصی
trackable: قابل ردیابی
- by: تÙ\88سط
+ by: از
in: در
map: نقشه
index:
heading_ct: شرایط مشارکتکننده
read and accept with tou: لطفاً توافقنامهٔ مشارکتکننده و شرایط استفاده را
مطالعه کنید و هر دو گزینه را علامت بزنید و سپس روی دکمهٔ ادامه کلیک کنید.
+ contributor_terms_explain: شرایط این توافقنامه برای مشارکتهای گذشته و آیندهٔ
+ شما نافذ است.
read_ct: شرایط مشارکتکننده را خواندم و با آن موافق هستم
read_tou: شرایط استفاده را خواندم و با آن موافق هستم
consider_pd: علاوه بر موارد بالا، میپذیرم که مشارکتهایم در مالکیت عمومی باشد.
my comments: نظرات من
oauth settings: تنظیمات oauth
blocks on me: مسدودیهای من
- blocks by me: بوک های توسط من
+ blocks by me: مسدودیهای به دست من
send message: ارسال پیام
diary: روزنوشت
edits: ویرایشها
empty: هنوز مسدودیتی ساخته نشده.
revoke:
title: لغو مسدودی از %{block_on}
- heading_html: لغو مسدودی از %{block_on}، مسدودشده توسط %{block_by}
+ heading_html: ابطال مسدودی %{block_on}، مسدودشده به دست %{block_by}
time_future: این مسدودی در %{time} پایان می یابد.
past: این مسدودی %{time} پایان یافته و اکنون قابللغو نیست.
confirm: مطمئنید میخواهید این مسدودی را لغو کنید؟
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: نمایش
out: کوچکنمایی
locate:
title: نمایش مکان من
+ metersPopup:
+ one: شما در یک متری این نقطه هستید
+ other: شما در %{count} متری این نقطه هستید
+ feetPopup:
+ one: شما در یک فوتی این نقطه هستید
+ other: شما در %{count} فوتی این نقطه هستید
base:
standard: استاندارد
cycle_map: نقشه دوچرخه
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: برای ویرایش نقشه بزرگنمایی کنید
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 !
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
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.
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
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!
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
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æ þú!
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>."
- lundur
retail: Smásölusvæði
industrial: Iðnaðarsvæði
- commercial: Skrifstoðusvæði
+ commercial: Verslunarsvæði
heathland: Heiðalönd
lake:
- Vatn
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à!
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:
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
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:
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
lighthouse: Bāka
mine: Raktuves
pipeline: Cauruļvads
+ surveillance: Novērošana
tower: Tornis
watermill: Ūdens dzirnavas
water_tower: Ūdens tornis
place:
allotments: Mazdārziņi
city: Pilsēta
+ city_block: Pilsētas kvartāls
country: Valsts
county: Apgabals
farm: Saimniecība
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
search: Meklēt
status: Statuss
reports: Ziņojumi
+ link_to_reports: Skatīt ziņojumus
states:
ignored: Ignorēts
open: Atvērt
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: Здраво!
diary_comment: Komentarz do dziennika
diary_entry: Wpis do dziennika
friend: Znajomy
+ issue: problem
language: Język
message: Wiadomość
node: Węzeł
relation: Relacja
relation_member: Człon relacji
relation_tag: Tag relacji
+ report: raport
session: Sesja
trace: Ślad
tracepoint: Punkt śladu
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ść!
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}
# Author: Gusta
# Author: Jgpacker
# Author: L
+# Author: Leonardo9387
# Author: Leosls
# Author: Luckas
# Author: Luckas Blade
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'
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}.
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
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.)
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}
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.
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.
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
- dê-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:
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
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
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
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
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>
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
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:
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:
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!
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ı!
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: Привіт!
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: 您好!
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
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
# 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
# ['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
# ['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
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
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)
# 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
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
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
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
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
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
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
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
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
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
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
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])
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
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
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
##
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
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
##
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
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
##
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
##
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
# 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"
# 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
##
"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
"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 }
"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 }
"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
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
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
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
"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
# -------------------------------------
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,
: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,
: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)
: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
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,
: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,
: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
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,
: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,
: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)
: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
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,
: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,
: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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
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
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
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
# 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
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
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
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")
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
# 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
# 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
##
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
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
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
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,
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
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
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
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 <b>made</b> 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
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 <b>made</b> 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
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)
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
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
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
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
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
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)
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)
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)
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
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
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
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
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
##
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"
# 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
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
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
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
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
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
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
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
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
: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
: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
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
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