Merge branch 'master' into moderation

This commit is contained in:
Andy Allan 2017-08-02 12:12:57 +01:00
commit e31376e28d
127 changed files with 4889 additions and 2105 deletions

View file

@ -1,7 +1,7 @@
source "https://rubygems.org" source "https://rubygems.org"
# Require rails # Require rails
gem "rails", "5.0.4" gem "rails", "5.0.5"
# Require things which have moved to gems in ruby 1.9 # Require things which have moved to gems in ruby 1.9
gem "bigdecimal", "~> 1.1.0", :platforms => :ruby_19 gem "bigdecimal", "~> 1.1.0", :platforms => :ruby_19

View file

@ -3,41 +3,41 @@ GEM
specs: specs:
SystemTimer (1.2.3) SystemTimer (1.2.3)
aasm (4.1.0) aasm (4.1.0)
actioncable (5.0.4) actioncable (5.0.5)
actionpack (= 5.0.4) actionpack (= 5.0.5)
nio4r (>= 1.2, < 3.0) nio4r (>= 1.2, < 3.0)
websocket-driver (~> 0.6.1) websocket-driver (~> 0.6.1)
actionmailer (5.0.4) actionmailer (5.0.5)
actionpack (= 5.0.4) actionpack (= 5.0.5)
actionview (= 5.0.4) actionview (= 5.0.5)
activejob (= 5.0.4) activejob (= 5.0.5)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
actionpack (5.0.4) actionpack (5.0.5)
actionview (= 5.0.4) actionview (= 5.0.5)
activesupport (= 5.0.4) activesupport (= 5.0.5)
rack (~> 2.0) rack (~> 2.0)
rack-test (~> 0.6.3) rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionpack-page_caching (1.1.0) actionpack-page_caching (1.1.0)
actionpack (>= 4.0.0, < 6) actionpack (>= 4.0.0, < 6)
actionview (5.0.4) actionview (5.0.5)
activesupport (= 5.0.4) activesupport (= 5.0.5)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3) rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.0.4) activejob (5.0.5)
activesupport (= 5.0.4) activesupport (= 5.0.5)
globalid (>= 0.3.6) globalid (>= 0.3.6)
activemodel (5.0.4) activemodel (5.0.5)
activesupport (= 5.0.4) activesupport (= 5.0.5)
activerecord (5.0.4) activerecord (5.0.5)
activemodel (= 5.0.4) activemodel (= 5.0.5)
activesupport (= 5.0.4) activesupport (= 5.0.5)
arel (~> 7.0) arel (~> 7.0)
activesupport (5.0.4) activesupport (5.0.5)
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7) i18n (~> 0.7)
minitest (~> 5.1) minitest (~> 5.1)
@ -46,13 +46,13 @@ GEM
public_suffix (~> 2.0, >= 2.0.2) public_suffix (~> 2.0, >= 2.0.2)
arel (7.1.4) arel (7.1.4)
ast (2.3.0) ast (2.3.0)
autoprefixer-rails (7.1.1.2) autoprefixer-rails (7.1.2.3)
execjs execjs
bigdecimal (1.1.0) bigdecimal (1.1.0)
builder (3.2.3) builder (3.2.3)
canonical-rails (0.2.0) canonical-rails (0.2.1)
rails (>= 4.1, < 5.2) rails (>= 4.1, < 5.2)
capybara (2.14.3) capybara (2.14.4)
addressable addressable
mime-types (>= 1.16) mime-types (>= 1.16)
nokogiri (>= 1.3.3) nokogiri (>= 1.3.3)
@ -88,13 +88,13 @@ GEM
dynamic_form (1.1.4) dynamic_form (1.1.4)
erubis (2.7.0) erubis (2.7.0)
execjs (2.7.0) execjs (2.7.0)
exifr (1.2.5) exifr (1.3.1)
factory_girl (4.8.0) factory_girl (4.8.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
factory_girl_rails (4.8.0) factory_girl_rails (4.8.0)
factory_girl (~> 4.8.0) factory_girl (~> 4.8.0)
railties (>= 3.0.0) railties (>= 3.0.0)
faraday (0.12.1) faraday (0.12.2)
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
ffi (1.9.18) ffi (1.9.18)
fspath (3.1.0) fspath (3.1.0)
@ -102,20 +102,20 @@ GEM
globalid (0.4.0) globalid (0.4.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
hashdiff (0.3.4) hashdiff (0.3.4)
hashie (3.5.5) hashie (3.5.6)
htmlentities (4.3.4) htmlentities (4.3.4)
http_accept_language (2.0.5) http_accept_language (2.0.5)
i18n (0.8.4) i18n (0.8.6)
i18n-js (3.0.0) i18n-js (3.0.0)
i18n (~> 0.6, >= 0.6.6) i18n (~> 0.6, >= 0.6.6)
image_optim (0.24.3) image_optim (0.25.0)
exifr (~> 1.2, >= 1.2.2) exifr (~> 1.2, >= 1.2.2)
fspath (~> 3.0) fspath (~> 3.0)
image_size (~> 1.5) image_size (~> 1.5)
in_threads (~> 1.3) in_threads (~> 1.3)
progress (~> 3.0, >= 3.0.1) progress (~> 3.0, >= 3.0.1)
image_optim_rails (0.4.0) image_optim_rails (0.4.1)
image_optim (~> 0.24.0) image_optim (~> 0.24)
rails rails
sprockets sprockets
image_size (1.5.0) image_size (1.5.0)
@ -157,7 +157,7 @@ GEM
mime-types-data (3.2016.0521) mime-types-data (3.2016.0521)
mimemagic (0.3.0) mimemagic (0.3.0)
mini_portile2 (2.2.0) mini_portile2 (2.2.0)
minitest (5.10.2) minitest (5.10.3)
multi_json (1.12.1) multi_json (1.12.1)
multi_xml (0.6.0) multi_xml (0.6.0)
multipart-post (2.0.0) multipart-post (2.0.0)
@ -186,7 +186,7 @@ GEM
omniauth-github (1.3.0) omniauth-github (1.3.0)
omniauth (~> 1.5) omniauth (~> 1.5)
omniauth-oauth2 (>= 1.4.0, < 2.0) omniauth-oauth2 (>= 1.4.0, < 2.0)
omniauth-google-oauth2 (0.5.0) omniauth-google-oauth2 (0.5.2)
jwt (~> 1.5) jwt (~> 1.5)
multi_json (~> 1.3) multi_json (~> 1.3)
omniauth (>= 1.1.1) omniauth (>= 1.1.1)
@ -212,7 +212,7 @@ GEM
cocaine (~> 0.5.5) cocaine (~> 0.5.5)
mime-types mime-types
mimemagic (= 0.3.0) mimemagic (= 0.3.0)
parallel (1.11.2) parallel (1.12.0)
parser (2.4.0.0) parser (2.4.0.0)
ast (~> 2.2) ast (~> 2.2)
pg (0.21.0) pg (0.21.0)
@ -224,26 +224,26 @@ GEM
progress (3.3.1) progress (3.3.1)
psych (2.2.4) psych (2.2.4)
public_suffix (2.0.5) public_suffix (2.0.5)
r2 (0.2.6) r2 (0.2.7)
rack (2.0.3) rack (2.0.3)
rack-cors (0.4.1) rack-cors (1.0.1)
rack-openid (1.3.1) rack-openid (1.3.1)
rack (>= 1.1.0) rack (>= 1.1.0)
ruby-openid (>= 2.1.8) ruby-openid (>= 2.1.8)
rack-test (0.6.3) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
rack-uri_sanitizer (0.0.2) rack-uri_sanitizer (0.0.2)
rails (5.0.4) rails (5.0.5)
actioncable (= 5.0.4) actioncable (= 5.0.5)
actionmailer (= 5.0.4) actionmailer (= 5.0.5)
actionpack (= 5.0.4) actionpack (= 5.0.5)
actionview (= 5.0.4) actionview (= 5.0.5)
activejob (= 5.0.4) activejob (= 5.0.5)
activemodel (= 5.0.4) activemodel (= 5.0.5)
activerecord (= 5.0.4) activerecord (= 5.0.5)
activesupport (= 5.0.4) activesupport (= 5.0.5)
bundler (>= 1.3.0, < 2.0) bundler (>= 1.3.0)
railties (= 5.0.4) railties (= 5.0.5)
sprockets-rails (>= 2.0.0) sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2) rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1) actionpack (~> 5.x, >= 5.0.1)
@ -257,16 +257,16 @@ GEM
rails-i18n (4.0.2) rails-i18n (4.0.2)
i18n (~> 0.6) i18n (~> 0.6)
rails (>= 4.0) rails (>= 4.0)
railties (5.0.4) railties (5.0.5)
actionpack (= 5.0.4) actionpack (= 5.0.5)
activesupport (= 5.0.4) activesupport (= 5.0.5)
method_source method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rainbow (2.2.2) rainbow (2.2.2)
rake rake
rake (12.0.0) rake (12.0.0)
rb-fsevent (0.9.8) rb-fsevent (0.10.2)
rb-inotify (0.9.10) rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2) ffi (>= 0.5.0, < 2)
record_tag_helper (1.0.0) record_tag_helper (1.0.0)
@ -291,14 +291,18 @@ GEM
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.4.4) nokogiri (>= 1.4.4)
nokogumbo (~> 1.4.1) nokogumbo (~> 1.4.1)
sass (3.4.24) sass (3.5.1)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.6) sass-rails (5.0.6)
railties (>= 4.0.0, < 6) railties (>= 4.0.0, < 6)
sass (~> 3.1) sass (~> 3.1)
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0) sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3) tilt (>= 1.1, < 3)
secure_headers (3.6.5) secure_headers (3.6.7)
useragent useragent
simplecov (0.14.1) simplecov (0.14.1)
docile (~> 1.1.0) docile (~> 1.1.0)
@ -319,8 +323,8 @@ GEM
ref ref
thor (0.19.4) thor (0.19.4)
thread_safe (0.3.6) thread_safe (0.3.6)
tilt (2.0.7) tilt (2.0.8)
tins (1.14.0) tins (1.15.0)
tzinfo (1.2.3) tzinfo (1.2.3)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (3.2.0) uglifier (3.2.0)
@ -387,7 +391,7 @@ DEPENDENCIES
r2 r2
rack-cors rack-cors
rack-uri_sanitizer rack-uri_sanitizer
rails (= 5.0.4) rails (= 5.0.5)
rails-controller-testing rails-controller-testing
rails-i18n (~> 4.0.0) rails-i18n (~> 4.0.0)
record_tag_helper record_tag_helper

View file

@ -31,7 +31,7 @@ folder 'vendor/assets' do
folder 'img', 'src/img' folder 'img', 'src/img'
end end
from 'git://github.com/domoritz/leaflet-locatecontrol.git', :tag => 'v0.54.0' do from 'git://github.com/domoritz/leaflet-locatecontrol.git', :tag => 'v0.62.0' do
file 'leaflet.locate.js', 'src/L.Control.Locate.js' file 'leaflet.locate.js', 'src/L.Control.Locate.js'
end end

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View file

@ -305,7 +305,7 @@ class ApiController < ApplicationController
def permissions def permissions
@permissions = if current_token.present? @permissions = if current_token.present?
ClientApplication.all_permissions.select { |p| current_token.read_attribute(p) } ClientApplication.all_permissions.select { |p| current_token.read_attribute(p) }
elsif @user elsif current_user
ClientApplication.all_permissions ClientApplication.all_permissions
else else
[] []

View file

@ -5,11 +5,14 @@ class ApplicationController < ActionController::Base
before_action :fetch_body before_action :fetch_body
attr_accessor :current_user
helper_method :current_user
def authorize_web def authorize_web
if session[:user] if session[:user]
@user = User.where(:id => session[:user]).where("status IN ('active', 'confirmed', 'suspended')").first self.current_user = User.where(:id => session[:user]).where("status IN ('active', 'confirmed', 'suspended')").first
if @user.status == "suspended" if current_user.status == "suspended"
session.delete(:user) session.delete(:user)
session_expires_automatically session_expires_automatically
@ -17,7 +20,7 @@ class ApplicationController < ActionController::Base
# don't allow access to any auth-requiring part of the site unless # don't allow access to any auth-requiring part of the site unless
# the new CTs have been seen (and accept/decline chosen). # the new CTs have been seen (and accept/decline chosen).
elsif !@user.terms_seen && flash[:skip_terms].nil? elsif !current_user.terms_seen && flash[:skip_terms].nil?
flash[:notice] = t "user.terms.you need to accept or decline" flash[:notice] = t "user.terms.you need to accept or decline"
if params[:referer] if params[:referer]
redirect_to :controller => "user", :action => "terms", :referer => params[:referer] redirect_to :controller => "user", :action => "terms", :referer => params[:referer]
@ -26,18 +29,18 @@ class ApplicationController < ActionController::Base
end end
end end
elsif session[:token] elsif session[:token]
if @user = User.authenticate(:token => session[:token]) if self.current_user = User.authenticate(:token => session[:token])
session[:user] = @user.id session[:user] = current_user.id
end end
end end
rescue StandardError => ex rescue StandardError => ex
logger.info("Exception authorizing user: #{ex}") logger.info("Exception authorizing user: #{ex}")
reset_session reset_session
@user = nil self.current_user = nil
end end
def require_user def require_user
unless @user unless current_user
if request.get? if request.get?
redirect_to :controller => "user", :action => "login", :referer => request.fullpath redirect_to :controller => "user", :action => "login", :referer => request.fullpath
else else
@ -47,7 +50,7 @@ class ApplicationController < ActionController::Base
end end
def require_oauth def require_oauth
@oauth = @user.access_token(OAUTH_KEY) if @user && defined? OAUTH_KEY @oauth = current_user.access_token(OAUTH_KEY) if current_user && defined? OAUTH_KEY
end end
## ##
@ -100,7 +103,7 @@ class ApplicationController < ActionController::Base
def require_allow_write_api def require_allow_write_api
require_capability(:allow_write_api) require_capability(:allow_write_api)
if REQUIRE_TERMS_AGREED && @user.terms_agreed.nil? if REQUIRE_TERMS_AGREED && current_user.terms_agreed.nil?
report_error "You must accept the contributor terms before you can edit.", :forbidden report_error "You must accept the contributor terms before you can edit.", :forbidden
return false return false
end end
@ -122,7 +125,7 @@ class ApplicationController < ActionController::Base
# require that the user is a moderator, or fill out a helpful error message # require that the user is a moderator, or fill out a helpful error message
# and return them to the index for the controller this is wrapped from. # and return them to the index for the controller this is wrapped from.
def require_moderator def require_moderator
unless @user.moderator? unless current_user.moderator?
if request.get? if request.get?
flash[:error] = t("application.require_moderator.not_a_moderator") flash[:error] = t("application.require_moderator.not_a_moderator")
redirect_to :action => "index" redirect_to :action => "index"
@ -133,7 +136,7 @@ class ApplicationController < ActionController::Base
end end
## ##
# sets up the @user object for use by other methods. this is mostly called # sets up the current_user for use by other methods. this is mostly called
# from the authorize method, but can be called elsewhere if authorisation # from the authorize method, but can be called elsewhere if authorisation
# is optional. # is optional.
def setup_user_auth def setup_user_auth
@ -141,7 +144,7 @@ class ApplicationController < ActionController::Base
unless Authenticator.new(self, [:token]).allow? unless Authenticator.new(self, [:token]).allow?
username, passwd = get_auth_data # parse from headers username, passwd = get_auth_data # parse from headers
# authenticate per-scheme # authenticate per-scheme
@user = if username.nil? self.current_user = if username.nil?
nil # no authentication provided - perhaps first connect (client should retry after 401) nil # no authentication provided - perhaps first connect (client should retry after 401)
elsif username == "token" elsif username == "token"
User.authenticate(:token => passwd) # preferred - random token for user from db, passed in basic auth User.authenticate(:token => passwd) # preferred - random token for user from db, passed in basic auth
@ -151,9 +154,9 @@ class ApplicationController < ActionController::Base
end end
# have we identified the user? # have we identified the user?
if @user if current_user
# check if the user has been banned # check if the user has been banned
user_block = @user.blocks.active.take user_block = current_user.blocks.active.take
unless user_block.nil? unless user_block.nil?
set_locale set_locale
if user_block.zero_hour? if user_block.zero_hour?
@ -166,7 +169,7 @@ class ApplicationController < ActionController::Base
# if the user hasn't seen the contributor terms then don't # if the user hasn't seen the contributor terms then don't
# allow editing - they have to go to the web site and see # allow editing - they have to go to the web site and see
# (but can decline) the CTs to continue. # (but can decline) the CTs to continue.
if REQUIRE_TERMS_SEEN && !@user.terms_seen && flash[:skip_terms].nil? if REQUIRE_TERMS_SEEN && !current_user.terms_seen && flash[:skip_terms].nil?
set_locale set_locale
report_error t("application.setup_user_auth.need_to_see_terms"), :forbidden report_error t("application.setup_user_auth.need_to_see_terms"), :forbidden
end end
@ -178,7 +181,7 @@ class ApplicationController < ActionController::Base
setup_user_auth setup_user_auth
# handle authenticate pass/fail # handle authenticate pass/fail
unless @user unless current_user
# no auth, the user does not exist or the password was wrong # no auth, the user does not exist or the password was wrong
response.headers["WWW-Authenticate"] = "Basic realm=\"#{realm}\"" response.headers["WWW-Authenticate"] = "Basic realm=\"#{realm}\""
render :plain => errormessage, :status => :unauthorized render :plain => errormessage, :status => :unauthorized
@ -196,7 +199,7 @@ class ApplicationController < ActionController::Base
# good idea to do that in this branch. # good idea to do that in this branch.
def authorize_moderator(errormessage = "Access restricted to moderators") def authorize_moderator(errormessage = "Access restricted to moderators")
# check user is a moderator # check user is a moderator
unless @user.moderator? unless current_user.moderator?
render :plain => errormessage, :status => :forbidden render :plain => errormessage, :status => :forbidden
false false
end end
@ -266,7 +269,7 @@ class ApplicationController < ActionController::Base
end end
def require_public_data def require_public_data
unless @user.data_public? unless current_user.data_public?
report_error "You must make your edits public to upload new data", :forbidden report_error "You must make your edits public to upload new data", :forbidden
false false
end end
@ -297,8 +300,8 @@ class ApplicationController < ActionController::Base
def preferred_languages def preferred_languages
@languages ||= if params[:locale] @languages ||= if params[:locale]
Locale.list(params[:locale]) Locale.list(params[:locale])
elsif @user elsif current_user
@user.preferred_languages current_user.preferred_languages
else else
Locale.list(http_accept_language.user_preferred_languages) Locale.list(http_accept_language.user_preferred_languages)
end end
@ -307,9 +310,9 @@ class ApplicationController < ActionController::Base
helper_method :preferred_languages helper_method :preferred_languages
def set_locale def set_locale
if @user && @user.languages.empty? && !http_accept_language.user_preferred_languages.empty? if current_user && current_user.languages.empty? && !http_accept_language.user_preferred_languages.empty?
@user.languages = http_accept_language.user_preferred_languages current_user.languages = http_accept_language.user_preferred_languages
@user.save current_user.save
end end
I18n.locale = Locale.available.preferred(preferred_languages) I18n.locale = Locale.available.preferred(preferred_languages)
@ -427,8 +430,8 @@ class ApplicationController < ActionController::Base
def preferred_editor def preferred_editor
editor = if params[:editor] editor = if params[:editor]
params[:editor] params[:editor]
elsif @user && @user.preferred_editor elsif current_user && current_user.preferred_editor
@user.preferred_editor current_user.preferred_editor
else else
DEFAULT_EDITOR DEFAULT_EDITOR
end end
@ -466,16 +469,6 @@ class ApplicationController < ActionController::Base
[user, pass] [user, pass]
end end
# used by oauth plugin to get the current user
def current_user
@user
end
# used by oauth plugin to set the current user
def current_user=(user)
@user = user
end
# override to stop oauth plugin sending errors # override to stop oauth plugin sending errors
def invalid_oauth_response; end def invalid_oauth_response; end
end end

View file

@ -58,7 +58,7 @@ class BrowseController < ApplicationController
def changeset def changeset
@type = "changeset" @type = "changeset"
@changeset = Changeset.find(params[:id]) @changeset = Changeset.find(params[:id])
@comments = if @user && @user.moderator? @comments = if current_user && current_user.moderator?
@changeset.comments.unscope(:where => :visible).includes(:author) @changeset.comments.unscope(:where => :visible).includes(:author)
else else
@changeset.comments.includes(:author) @changeset.comments.includes(:author)
@ -77,7 +77,7 @@ class BrowseController < ApplicationController
def note def note
@type = "note" @type = "note"
if @user && @user.moderator? if current_user && current_user.moderator?
@note = Note.find(params[:id]) @note = Note.find(params[:id])
@note_comments = @note.comments.unscope(:where => :visible) @note_comments = @note.comments.unscope(:where => :visible)
else else

View file

@ -28,11 +28,11 @@ class ChangesetController < ApplicationController
cs = Changeset.from_xml(request.raw_post, true) cs = Changeset.from_xml(request.raw_post, true)
# Assume that Changeset.from_xml has thrown an exception if there is an error parsing the xml # Assume that Changeset.from_xml has thrown an exception if there is an error parsing the xml
cs.user_id = @user.id cs.user_id = current_user.id
cs.save_with_tags! cs.save_with_tags!
# Subscribe user to changeset comments # Subscribe user to changeset comments
cs.subscribers << @user cs.subscribers << current_user
render :plain => cs.id.to_s render :plain => cs.id.to_s
end end
@ -53,7 +53,7 @@ class ChangesetController < ApplicationController
assert_method :put assert_method :put
changeset = Changeset.find(params[:id]) changeset = Changeset.find(params[:id])
check_changeset_consistency(changeset, @user) check_changeset_consistency(changeset, current_user)
# to close the changeset, we'll just set its closed_at time to # to close the changeset, we'll just set its closed_at time to
# now. this might not be enough if there are concurrency issues, # now. this might not be enough if there are concurrency issues,
@ -75,7 +75,7 @@ class ChangesetController < ApplicationController
assert_method :post assert_method :post
cs = Changeset.find(params[:id]) cs = Changeset.find(params[:id])
check_changeset_consistency(cs, @user) check_changeset_consistency(cs, current_user)
# keep an array of lons and lats # keep an array of lons and lats
lon = [] lon = []
@ -127,7 +127,7 @@ class ChangesetController < ApplicationController
assert_method :post assert_method :post
changeset = Changeset.find(params[:id]) changeset = Changeset.find(params[:id])
check_changeset_consistency(changeset, @user) check_changeset_consistency(changeset, current_user)
diff_reader = DiffReader.new(request.raw_post, changeset) diff_reader = DiffReader.new(request.raw_post, changeset)
Changeset.transaction do Changeset.transaction do
@ -242,8 +242,8 @@ class ChangesetController < ApplicationController
changeset = Changeset.find(params[:id]) changeset = Changeset.find(params[:id])
new_changeset = Changeset.from_xml(request.raw_post) new_changeset = Changeset.from_xml(request.raw_post)
check_changeset_consistency(changeset, @user) check_changeset_consistency(changeset, current_user)
changeset.update_from(new_changeset, @user) changeset.update_from(new_changeset, current_user)
render :xml => changeset.to_xml.to_s render :xml => changeset.to_xml.to_s
end end
@ -265,7 +265,7 @@ class ChangesetController < ApplicationController
end end
end end
if (@params[:friends] || @params[:nearby]) && !@user if (@params[:friends] || @params[:nearby]) && !current_user
require_user require_user
return return
end end
@ -277,17 +277,17 @@ class ChangesetController < ApplicationController
changesets = conditions_nonempty(Changeset.all) changesets = conditions_nonempty(Changeset.all)
if @params[:display_name] if @params[:display_name]
changesets = if user.data_public? || user == @user changesets = if user.data_public? || user == current_user
changesets.where(:user_id => user.id) changesets.where(:user_id => user.id)
else else
changesets.where("false") changesets.where("false")
end end
elsif @params[:bbox] elsif @params[:bbox]
changesets = conditions_bbox(changesets, BoundingBox.from_bbox_params(params)) changesets = conditions_bbox(changesets, BoundingBox.from_bbox_params(params))
elsif @params[:friends] && @user elsif @params[:friends] && current_user
changesets = changesets.where(:user_id => @user.friend_users.identifiable) changesets = changesets.where(:user_id => current_user.friend_users.identifiable)
elsif @params[:nearby] && @user elsif @params[:nearby] && current_user
changesets = changesets.where(:user_id => @user.nearby) changesets = changesets.where(:user_id => current_user.nearby)
end end
if @params[:max_id] if @params[:max_id]
@ -324,17 +324,17 @@ class ChangesetController < ApplicationController
# Add a comment to the changeset # Add a comment to the changeset
comment = changeset.comments.create(:changeset => changeset, comment = changeset.comments.create(:changeset => changeset,
:body => body, :body => body,
:author => @user) :author => current_user)
# Notify current subscribers of the new comment # Notify current subscribers of the new comment
changeset.subscribers.visible.each do |user| changeset.subscribers.visible.each do |user|
if @user != user if current_user != user
Notifier.changeset_comment_notification(comment, user).deliver_now Notifier.changeset_comment_notification(comment, user).deliver_now
end end
end end
# Add the commenter to the subscribers if necessary # Add the commenter to the subscribers if necessary
changeset.subscribers << @user unless changeset.subscribers.exists?(@user.id) changeset.subscribers << current_user unless changeset.subscribers.exists?(current_user.id)
# Return a copy of the updated changeset # Return a copy of the updated changeset
render :xml => changeset.to_xml.to_s render :xml => changeset.to_xml.to_s
@ -352,10 +352,10 @@ class ChangesetController < ApplicationController
# Find the changeset and check it is valid # Find the changeset and check it is valid
changeset = Changeset.find(id) changeset = Changeset.find(id)
raise OSM::APIChangesetNotYetClosedError.new(changeset) if changeset.is_open? raise OSM::APIChangesetNotYetClosedError.new(changeset) if changeset.is_open?
raise OSM::APIChangesetAlreadySubscribedError.new(changeset) if changeset.subscribers.exists?(@user.id) raise OSM::APIChangesetAlreadySubscribedError.new(changeset) if changeset.subscribers.exists?(current_user.id)
# Add the subscriber # Add the subscriber
changeset.subscribers << @user changeset.subscribers << current_user
# Return a copy of the updated changeset # Return a copy of the updated changeset
render :xml => changeset.to_xml.to_s render :xml => changeset.to_xml.to_s
@ -373,10 +373,10 @@ class ChangesetController < ApplicationController
# Find the changeset and check it is valid # Find the changeset and check it is valid
changeset = Changeset.find(id) changeset = Changeset.find(id)
raise OSM::APIChangesetNotYetClosedError.new(changeset) if changeset.is_open? raise OSM::APIChangesetNotYetClosedError.new(changeset) if changeset.is_open?
raise OSM::APIChangesetNotSubscribedError.new(changeset) unless changeset.subscribers.exists?(@user.id) raise OSM::APIChangesetNotSubscribedError.new(changeset) unless changeset.subscribers.exists?(current_user.id)
# Remove the subscriber # Remove the subscriber
changeset.subscribers.delete(@user) changeset.subscribers.delete(current_user)
# Return a copy of the updated changeset # Return a copy of the updated changeset
render :xml => changeset.to_xml.to_s render :xml => changeset.to_xml.to_s
@ -496,7 +496,7 @@ class ChangesetController < ApplicationController
# changesets if they're non-public # changesets if they're non-public
setup_user_auth setup_user_auth
raise OSM::APINotFoundError if @user.nil? || @user.id != u.id raise OSM::APINotFoundError if current_user.nil? || current_user.id != u.id
end end
changesets.where(:user_id => u.id) changesets.where(:user_id => u.id)

View file

@ -14,27 +14,27 @@ class DiaryEntryController < ApplicationController
if request.post? if request.post?
@diary_entry = DiaryEntry.new(entry_params) @diary_entry = DiaryEntry.new(entry_params)
@diary_entry.user = @user @diary_entry.user = current_user
if @diary_entry.save if @diary_entry.save
default_lang = @user.preferences.where(:k => "diary.default_language").first default_lang = current_user.preferences.where(:k => "diary.default_language").first
if default_lang if default_lang
default_lang.v = @diary_entry.language_code default_lang.v = @diary_entry.language_code
default_lang.save! default_lang.save!
else else
@user.preferences.create(:k => "diary.default_language", :v => @diary_entry.language_code) current_user.preferences.create(:k => "diary.default_language", :v => @diary_entry.language_code)
end end
# Subscribe user to diary comments # Subscribe user to diary comments
@diary_entry.subscriptions.create(:user => @user) @diary_entry.subscriptions.create(:user => current_user)
redirect_to :action => "list", :display_name => @user.display_name redirect_to :action => "list", :display_name => current_user.display_name
else else
render :action => "edit" render :action => "edit"
end end
else else
default_lang = @user.preferences.where(:k => "diary.default_language").first default_lang = current_user.preferences.where(:k => "diary.default_language").first
lang_code = default_lang ? default_lang.v : @user.preferred_language lang_code = default_lang ? default_lang.v : current_user.preferred_language
@diary_entry = DiaryEntry.new(entry_params.merge(:language_code => lang_code)) @diary_entry = DiaryEntry.new(entry_params.merge(:language_code => lang_code))
set_map_location set_map_location
render :action => "edit" render :action => "edit"
@ -45,7 +45,7 @@ class DiaryEntryController < ApplicationController
@title = t "diary_entry.edit.title" @title = t "diary_entry.edit.title"
@diary_entry = DiaryEntry.find(params[:id]) @diary_entry = DiaryEntry.find(params[:id])
if @user != @diary_entry.user if current_user != @diary_entry.user
redirect_to :action => "view", :id => params[:id] redirect_to :action => "view", :id => params[:id]
elsif params[:diary_entry] && @diary_entry.update_attributes(entry_params) elsif params[:diary_entry] && @diary_entry.update_attributes(entry_params)
redirect_to :action => "view", :id => params[:id] redirect_to :action => "view", :id => params[:id]
@ -59,18 +59,18 @@ class DiaryEntryController < ApplicationController
def comment def comment
@entry = DiaryEntry.find(params[:id]) @entry = DiaryEntry.find(params[:id])
@diary_comment = @entry.comments.build(comment_params) @diary_comment = @entry.comments.build(comment_params)
@diary_comment.user = @user @diary_comment.user = current_user
if @diary_comment.save if @diary_comment.save
# Notify current subscribers of the new comment # Notify current subscribers of the new comment
@entry.subscribers.visible.each do |user| @entry.subscribers.visible.each do |user|
if @user != user if current_user != user
Notifier.diary_comment_notification(@diary_comment, user).deliver_now Notifier.diary_comment_notification(@diary_comment, user).deliver_now
end end
end end
# Add the commenter to the subscribers if necessary # Add the commenter to the subscribers if necessary
@entry.subscriptions.create(:user => @user) unless @entry.subscribers.exists?(@user.id) @entry.subscriptions.create(:user => current_user) unless @entry.subscribers.exists?(current_user.id)
redirect_to :action => "view", :display_name => @entry.user.display_name, :id => @entry.id redirect_to :action => "view", :display_name => @entry.user.display_name, :id => @entry.id
else else
@ -83,7 +83,7 @@ class DiaryEntryController < ApplicationController
def subscribe def subscribe
diary_entry = DiaryEntry.find(params[:id]) diary_entry = DiaryEntry.find(params[:id])
diary_entry.subscriptions.create(:user => @user) unless diary_entry.subscribers.exists?(@user.id) diary_entry.subscriptions.create(:user => current_user) unless diary_entry.subscribers.exists?(current_user.id)
redirect_to :action => "view", :display_name => diary_entry.user.display_name, :id => diary_entry.id redirect_to :action => "view", :display_name => diary_entry.user.display_name, :id => diary_entry.id
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
@ -93,7 +93,7 @@ class DiaryEntryController < ApplicationController
def unsubscribe def unsubscribe
diary_entry = DiaryEntry.find(params[:id]) diary_entry = DiaryEntry.find(params[:id])
diary_entry.subscriptions.where(:user => @user).delete_all if diary_entry.subscribers.exists?(@user.id) diary_entry.subscriptions.where(:user => current_user).delete_all if diary_entry.subscribers.exists?(current_user.id)
redirect_to :action => "view", :display_name => diary_entry.user.display_name, :id => diary_entry.id redirect_to :action => "view", :display_name => diary_entry.user.display_name, :id => diary_entry.id
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
@ -112,17 +112,17 @@ class DiaryEntryController < ApplicationController
return return
end end
elsif params[:friends] elsif params[:friends]
if @user if current_user
@title = t "diary_entry.list.title_friends" @title = t "diary_entry.list.title_friends"
@entries = DiaryEntry.where(:user_id => @user.friend_users) @entries = DiaryEntry.where(:user_id => current_user.friend_users)
else else
require_user require_user
return return
end end
elsif params[:nearby] elsif params[:nearby]
if @user if current_user
@title = t "diary_entry.list.title_nearby" @title = t "diary_entry.list.title_nearby"
@entries = DiaryEntry.where(:user_id => @user.nearby) @entries = DiaryEntry.where(:user_id => current_user.nearby)
else else
require_user require_user
return return
@ -237,7 +237,7 @@ class DiaryEntryController < ApplicationController
# require that the user is a administrator, or fill out a helpful error message # require that the user is a administrator, or fill out a helpful error message
# and return them to the user page. # and return them to the user page.
def require_administrator def require_administrator
unless @user.administrator? unless current_user.administrator?
flash[:error] = t("user.filter.not_an_administrator") flash[:error] = t("user.filter.not_an_administrator")
redirect_to :action => "view" redirect_to :action => "view"
end end
@ -250,13 +250,13 @@ class DiaryEntryController < ApplicationController
@lon = @diary_entry.longitude @lon = @diary_entry.longitude
@lat = @diary_entry.latitude @lat = @diary_entry.latitude
@zoom = 12 @zoom = 12
elsif @user.home_lat.nil? || @user.home_lon.nil? elsif current_user.home_lat.nil? || current_user.home_lon.nil?
@lon = params[:lon] || -0.1 @lon = params[:lon] || -0.1
@lat = params[:lat] || 51.5 @lat = params[:lat] || 51.5
@zoom = params[:zoom] || 4 @zoom = params[:zoom] || 4
else else
@lon = @user.home_lon @lon = current_user.home_lon
@lat = @user.home_lat @lat = current_user.home_lat
@zoom = 12 @zoom = 12
end end
end end

View file

@ -14,18 +14,18 @@ class MessageController < ApplicationController
# The display_name param is the display name of the user that the message is being sent to. # The display_name param is the display name of the user that the message is being sent to.
def new def new
if request.post? if request.post?
if @user.sent_messages.where("sent_on >= ?", Time.now.getutc - 1.hour).count >= MAX_MESSAGES_PER_HOUR if current_user.sent_messages.where("sent_on >= ?", Time.now.getutc - 1.hour).count >= MAX_MESSAGES_PER_HOUR
flash[:error] = t "message.new.limit_exceeded" flash[:error] = t "message.new.limit_exceeded"
else else
@message = Message.new(message_params) @message = Message.new(message_params)
@message.to_user_id = @this_user.id @message.to_user_id = @this_user.id
@message.from_user_id = @user.id @message.from_user_id = current_user.id
@message.sent_on = Time.now.getutc @message.sent_on = Time.now.getutc
if @message.save if @message.save
flash[:notice] = t "message.new.message_sent" flash[:notice] = t "message.new.message_sent"
Notifier.message_notification(@message).deliver_now Notifier.message_notification(@message).deliver_now
redirect_to :action => "inbox", :display_name => @user.display_name redirect_to :action => "inbox", :display_name => current_user.display_name
end end
end end
end end
@ -38,7 +38,7 @@ class MessageController < ApplicationController
def reply def reply
message = Message.find(params[:message_id]) message = Message.find(params[:message_id])
if message.to_user_id == @user.id if message.to_user_id == current_user.id
message.update(:message_read => true) message.update(:message_read => true)
@message = Message.new( @message = Message.new(
@ -51,7 +51,7 @@ class MessageController < ApplicationController
render :action => "new" render :action => "new"
else else
flash[:notice] = t "message.reply.wrong_user", :user => @user.display_name flash[:notice] = t "message.reply.wrong_user", :user => current_user.display_name
redirect_to :controller => "user", :action => "login", :referer => request.fullpath redirect_to :controller => "user", :action => "login", :referer => request.fullpath
end end
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
@ -64,11 +64,11 @@ class MessageController < ApplicationController
@title = t "message.read.title" @title = t "message.read.title"
@message = Message.find(params[:message_id]) @message = Message.find(params[:message_id])
if @message.to_user_id == @user.id || @message.from_user_id == @user.id if @message.to_user_id == current_user.id || @message.from_user_id == current_user.id
@message.message_read = true if @message.to_user_id == @user.id @message.message_read = true if @message.to_user_id == current_user.id
@message.save @message.save
else else
flash[:notice] = t "message.read.wrong_user", :user => @user.display_name flash[:notice] = t "message.read.wrong_user", :user => current_user.display_name
redirect_to :controller => "user", :action => "login", :referer => request.fullpath redirect_to :controller => "user", :action => "login", :referer => request.fullpath
end end
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
@ -79,24 +79,24 @@ class MessageController < ApplicationController
# Display the list of messages that have been sent to the user. # Display the list of messages that have been sent to the user.
def inbox def inbox
@title = t "message.inbox.title" @title = t "message.inbox.title"
if @user && params[:display_name] == @user.display_name if current_user && params[:display_name] == current_user.display_name
else else
redirect_to :action => "inbox", :display_name => @user.display_name redirect_to :action => "inbox", :display_name => current_user.display_name
end end
end end
# Display the list of messages that the user has sent to other users. # Display the list of messages that the user has sent to other users.
def outbox def outbox
@title = t "message.outbox.title" @title = t "message.outbox.title"
if @user && params[:display_name] == @user.display_name if current_user && params[:display_name] == current_user.display_name
else else
redirect_to :action => "outbox", :display_name => @user.display_name redirect_to :action => "outbox", :display_name => current_user.display_name
end end
end end
# Set the message as being read or unread. # Set the message as being read or unread.
def mark def mark
@message = Message.where("to_user_id = ? OR from_user_id = ?", @user.id, @user.id).find(params[:message_id]) @message = Message.where("to_user_id = ? OR from_user_id = ?", current_user.id, current_user.id).find(params[:message_id])
if params[:mark] == "unread" if params[:mark] == "unread"
message_read = false message_read = false
notice = t "message.mark.as_unread" notice = t "message.mark.as_unread"
@ -107,7 +107,7 @@ class MessageController < ApplicationController
@message.message_read = message_read @message.message_read = message_read
if @message.save && !request.xhr? if @message.save && !request.xhr?
flash[:notice] = notice flash[:notice] = notice
redirect_to :action => "inbox", :display_name => @user.display_name redirect_to :action => "inbox", :display_name => current_user.display_name
end end
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
@title = t "message.no_such_message.title" @title = t "message.no_such_message.title"
@ -116,16 +116,16 @@ class MessageController < ApplicationController
# Delete the message. # Delete the message.
def delete def delete
@message = Message.where("to_user_id = ? OR from_user_id = ?", @user.id, @user.id).find(params[:message_id]) @message = Message.where("to_user_id = ? OR from_user_id = ?", current_user.id, current_user.id).find(params[:message_id])
@message.from_user_visible = false if @message.sender == @user @message.from_user_visible = false if @message.sender == current_user
@message.to_user_visible = false if @message.recipient == @user @message.to_user_visible = false if @message.recipient == current_user
if @message.save && !request.xhr? if @message.save && !request.xhr?
flash[:notice] = t "message.delete.deleted" flash[:notice] = t "message.delete.deleted"
if params[:referer] if params[:referer]
redirect_to params[:referer] redirect_to params[:referer]
else else
redirect_to :action => "inbox", :display_name => @user.display_name redirect_to :action => "inbox", :display_name => current_user.display_name
end end
end end
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound

View file

@ -18,7 +18,7 @@ class NodeController < ApplicationController
node = Node.from_xml(request.raw_post, true) node = Node.from_xml(request.raw_post, true)
# Assume that Node.from_xml has thrown an exception if there is an error parsing the xml # Assume that Node.from_xml has thrown an exception if there is an error parsing the xml
node.create_with_history @user node.create_with_history current_user
render :plain => node.id.to_s render :plain => node.id.to_s
end end
@ -44,7 +44,7 @@ class NodeController < ApplicationController
raise OSM::APIBadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})") raise OSM::APIBadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})")
end end
node.update_from(new_node, @user) node.update_from(new_node, current_user)
render :plain => node.version.to_s render :plain => node.version.to_s
end end
@ -58,7 +58,7 @@ class NodeController < ApplicationController
unless new_node && new_node.id == node.id unless new_node && new_node.id == node.id
raise OSM::APIBadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})") raise OSM::APIBadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})")
end end
node.delete_with_history!(new_node, @user) node.delete_with_history!(new_node, current_user)
render :plain => node.version.to_s render :plain => node.version.to_s
end end

View file

@ -160,7 +160,7 @@ class NotesController < ApplicationController
# Find the note and check it is valid # Find the note and check it is valid
@note = Note.find_by(:id => id) @note = Note.find_by(:id => id)
raise OSM::APINotFoundError unless @note raise OSM::APINotFoundError unless @note
raise OSM::APIAlreadyDeletedError.new("note", @note.id) unless @note.visible? || @user.moderator? raise OSM::APIAlreadyDeletedError.new("note", @note.id) unless @note.visible? || current_user.moderator?
raise OSM::APINoteAlreadyOpenError.new(@note) unless @note.closed? || !@note.visible? raise OSM::APINoteAlreadyOpenError.new(@note) unless @note.closed? || !@note.visible?
# Reopen the note and add a comment # Reopen the note and add a comment
@ -286,7 +286,7 @@ class NotesController < ApplicationController
@page = (params[:page] || 1).to_i @page = (params[:page] || 1).to_i
@page_size = 10 @page_size = 10
@notes = @this_user.notes @notes = @this_user.notes
@notes = @notes.visible unless @user && @user.moderator? @notes = @notes.visible unless current_user && current_user.moderator?
@notes = @notes.order("updated_at DESC, id").distinct.offset((@page - 1) * @page_size).limit(@page_size).preload(:comments => :author).to_a @notes = @notes.order("updated_at DESC, id").distinct.offset((@page - 1) * @page_size).limit(@page_size).preload(:comments => :author).to_a
else else
@title = t "user.no_such_user.title" @title = t "user.no_such_user.title"
@ -341,8 +341,8 @@ class NotesController < ApplicationController
def add_comment(note, text, event, notify = true) def add_comment(note, text, event, notify = true)
attributes = { :visible => true, :event => event, :body => text } attributes = { :visible => true, :event => event, :body => text }
if @user if current_user
attributes[:author_id] = @user.id attributes[:author_id] = current_user.id
else else
attributes[:author_ip] = request.remote_ip attributes[:author_ip] = request.remote_ip
end end
@ -350,7 +350,7 @@ class NotesController < ApplicationController
comment = note.comments.create!(attributes) comment = note.comments.create!(attributes)
note.comments.map(&:author).uniq.each do |user| note.comments.map(&:author).uniq.each do |user|
if notify && user && user != @user && user.visible? if notify && user && user != current_user && user.visible?
Notifier.note_comment_notification(comment, user).deliver_now Notifier.note_comment_notification(comment, user).deliver_now
end end
end end

View file

@ -6,8 +6,8 @@ class OauthClientsController < ApplicationController
before_action :require_user before_action :require_user
def index def index
@client_applications = @user.client_applications @client_applications = current_user.client_applications
@tokens = @user.oauth_tokens.authorized @tokens = current_user.oauth_tokens.authorized
end end
def new def new
@ -15,7 +15,7 @@ class OauthClientsController < ApplicationController
end end
def create def create
@client_application = @user.client_applications.build(application_params) @client_application = current_user.client_applications.build(application_params)
if @client_application.save if @client_application.save
flash[:notice] = t "oauth_clients.create.flash" flash[:notice] = t "oauth_clients.create.flash"
redirect_to :action => "show", :id => @client_application.id redirect_to :action => "show", :id => @client_application.id
@ -25,21 +25,21 @@ class OauthClientsController < ApplicationController
end end
def show def show
@client_application = @user.client_applications.find(params[:id]) @client_application = current_user.client_applications.find(params[:id])
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
@type = "client application" @type = "client application"
render :action => "not_found", :status => :not_found render :action => "not_found", :status => :not_found
end end
def edit def edit
@client_application = @user.client_applications.find(params[:id]) @client_application = current_user.client_applications.find(params[:id])
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
@type = "client application" @type = "client application"
render :action => "not_found", :status => :not_found render :action => "not_found", :status => :not_found
end end
def update def update
@client_application = @user.client_applications.find(params[:id]) @client_application = current_user.client_applications.find(params[:id])
if @client_application.update_attributes(application_params) if @client_application.update_attributes(application_params)
flash[:notice] = t "oauth_clients.update.flash" flash[:notice] = t "oauth_clients.update.flash"
redirect_to :action => "show", :id => @client_application.id redirect_to :action => "show", :id => @client_application.id
@ -52,7 +52,7 @@ class OauthClientsController < ApplicationController
end end
def destroy def destroy
@client_application = @user.client_applications.find(params[:id]) @client_application = current_user.client_applications.find(params[:id])
@client_application.destroy @client_application.destroy
flash[:notice] = t "oauth_clients.destroy.flash" flash[:notice] = t "oauth_clients.destroy.flash"
redirect_to :action => "index" redirect_to :action => "index"

View file

@ -70,6 +70,6 @@ class OldController < ApplicationController
private private
def show_redactions? def show_redactions?
@user && @user.moderator? && params[:show_redactions] == "true" current_user && current_user.moderator? && params[:show_redactions] == "true"
end end
end end

View file

@ -19,7 +19,7 @@ class RedactionsController < ApplicationController
def create def create
@redaction = Redaction.new @redaction = Redaction.new
@redaction.user = @user @redaction.user = current_user
@redaction.title = params[:redaction][:title] @redaction.title = params[:redaction][:title]
@redaction.description = params[:redaction][:description] @redaction.description = params[:redaction][:description]
# note that the description format will default to 'markdown' # note that the description format will default to 'markdown'

View file

@ -15,7 +15,7 @@ class RelationController < ApplicationController
relation = Relation.from_xml(request.raw_post, true) relation = Relation.from_xml(request.raw_post, true)
# Assume that Relation.from_xml has thrown an exception if there is an error parsing the xml # Assume that Relation.from_xml has thrown an exception if there is an error parsing the xml
relation.create_with_history @user relation.create_with_history current_user
render :plain => relation.id.to_s render :plain => relation.id.to_s
end end
@ -39,7 +39,7 @@ class RelationController < ApplicationController
raise OSM::APIBadUserInput.new("The id in the url (#{relation.id}) is not the same as provided in the xml (#{new_relation.id})") raise OSM::APIBadUserInput.new("The id in the url (#{relation.id}) is not the same as provided in the xml (#{new_relation.id})")
end end
relation.update_from new_relation, @user relation.update_from new_relation, current_user
render :plain => relation.version.to_s render :plain => relation.version.to_s
end end
@ -47,7 +47,7 @@ class RelationController < ApplicationController
relation = Relation.find(params[:id]) relation = Relation.find(params[:id])
new_relation = Relation.from_xml(request.raw_post) new_relation = Relation.from_xml(request.raw_post)
if new_relation && new_relation.id == relation.id if new_relation && new_relation.id == relation.id
relation.delete_with_history!(new_relation, @user) relation.delete_with_history!(new_relation, current_user)
render :plain => relation.version.to_s render :plain => relation.version.to_s
else else
head :bad_request head :bad_request

View file

@ -92,8 +92,8 @@ class SiteController < ApplicationController
@lat = note.lat @lat = note.lat
@lon = note.lon @lon = note.lon
@zoom = 17 @zoom = 17
elsif params[:gpx] && @user elsif params[:gpx] && current_user
trace = Trace.visible_to(@user).find(params[:gpx]) trace = Trace.visible_to(current_user).find(params[:gpx])
@lat = trace.latitude @lat = trace.latitude
@lon = trace.longitude @lon = trace.longitude
@zoom = 16 @zoom = 16

View file

@ -32,7 +32,7 @@ class TraceController < ApplicationController
# set title # set title
@title = if target_user.nil? @title = if target_user.nil?
t "trace.list.public_traces" t "trace.list.public_traces"
elsif @user && @user == target_user elsif current_user && current_user == target_user
t "trace.list.your_traces" t "trace.list.your_traces"
else else
t "trace.list.public_traces_from", :user => target_user.display_name t "trace.list.public_traces_from", :user => target_user.display_name
@ -46,13 +46,13 @@ class TraceController < ApplicationController
# 3 - user's traces, logged in as same user = all user's traces # 3 - user's traces, logged in as same user = all user's traces
# 4 - user's traces, not logged in as that user = all user's public traces # 4 - user's traces, not logged in as that user = all user's public traces
@traces = if target_user.nil? # all traces @traces = if target_user.nil? # all traces
if @user if current_user
Trace.visible_to(@user) # 1 Trace.visible_to(current_user) # 1
else else
Trace.visible_to_all # 2 Trace.visible_to_all # 2
end end
elsif @user && @user == target_user elsif current_user && current_user == target_user
@user.traces # 3 (check vs user id, so no join + can't pick up non-public traces by changing name) current_user.traces # 3 (check vs user id, so no join + can't pick up non-public traces by changing name)
else else
target_user.traces.visible_to_all # 4 target_user.traces.visible_to_all # 4
end end
@ -86,14 +86,14 @@ class TraceController < ApplicationController
end end
def mine def mine
redirect_to :action => :list, :display_name => @user.display_name redirect_to :action => :list, :display_name => current_user.display_name
end end
def view def view
@trace = Trace.find(params[:id]) @trace = Trace.find(params[:id])
if @trace && @trace.visible? && if @trace && @trace.visible? &&
(@trace.public? || @trace.user == @user) (@trace.public? || @trace.user == current_user)
@title = t "trace.view.title", :name => @trace.name @title = t "trace.view.title", :name => @trace.name
else else
flash[:error] = t "trace.view.trace_not_found" flash[:error] = t "trace.view.trace_not_found"
@ -119,18 +119,18 @@ class TraceController < ApplicationController
if @trace.id if @trace.id
flash[:notice] = t "trace.create.trace_uploaded" flash[:notice] = t "trace.create.trace_uploaded"
if @user.traces.where(:inserted => false).count > 4 if current_user.traces.where(:inserted => false).count > 4
flash[:warning] = t "trace.trace_header.traces_waiting", :count => @user.traces.where(:inserted => false).count flash[:warning] = t "trace.trace_header.traces_waiting", :count => current_user.traces.where(:inserted => false).count
end end
redirect_to :action => :list, :display_name => @user.display_name redirect_to :action => :list, :display_name => current_user.display_name
end end
else else
@trace = Trace.new(:name => "Dummy", @trace = Trace.new(:name => "Dummy",
:tagstring => params[:trace][:tagstring], :tagstring => params[:trace][:tagstring],
:description => params[:trace][:description], :description => params[:trace][:description],
:visibility => params[:trace][:visibility], :visibility => params[:trace][:visibility],
:inserted => false, :user => @user, :inserted => false, :user => current_user,
:timestamp => Time.now.getutc) :timestamp => Time.now.getutc)
@trace.valid? @trace.valid?
@trace.errors.add(:gpx_file, "can't be blank") @trace.errors.add(:gpx_file, "can't be blank")
@ -145,7 +145,7 @@ class TraceController < ApplicationController
def data def data
trace = Trace.find(params[:id]) trace = Trace.find(params[:id])
if trace.visible? && (trace.public? || (@user && @user == trace.user)) if trace.visible? && (trace.public? || (current_user && current_user == trace.user))
if Acl.no_trace_download(request.remote_ip) if Acl.no_trace_download(request.remote_ip)
head :forbidden head :forbidden
elsif request.format == Mime[:xml] elsif request.format == Mime[:xml]
@ -167,7 +167,7 @@ class TraceController < ApplicationController
if !@trace.visible? if !@trace.visible?
head :not_found head :not_found
elsif @user.nil? || @trace.user != @user elsif current_user.nil? || @trace.user != current_user
head :forbidden head :forbidden
else else
@title = t "trace.edit.title", :name => @trace.name @title = t "trace.edit.title", :name => @trace.name
@ -177,7 +177,7 @@ class TraceController < ApplicationController
@trace.tagstring = params[:trace][:tagstring] @trace.tagstring = params[:trace][:tagstring]
@trace.visibility = params[:trace][:visibility] @trace.visibility = params[:trace][:visibility]
if @trace.save if @trace.save
redirect_to :action => "view", :display_name => @user.display_name redirect_to :action => "view", :display_name => current_user.display_name
end end
end end
end end
@ -190,13 +190,13 @@ class TraceController < ApplicationController
if !trace.visible? if !trace.visible?
head :not_found head :not_found
elsif @user.nil? || trace.user != @user elsif current_user.nil? || trace.user != current_user
head :forbidden head :forbidden
else else
trace.visible = false trace.visible = false
trace.save trace.save
flash[:notice] = t "trace.delete.scheduled_for_deletion" flash[:notice] = t "trace.delete.scheduled_for_deletion"
redirect_to :action => :list, :display_name => @user.display_name redirect_to :action => :list, :display_name => current_user.display_name
end end
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
head :not_found head :not_found
@ -219,7 +219,7 @@ class TraceController < ApplicationController
trace = Trace.find(params[:id]) trace = Trace.find(params[:id])
if trace.visible? && trace.inserted? if trace.visible? && trace.inserted?
if trace.public? || (@user && @user == trace.user) if trace.public? || (current_user && current_user == trace.user)
expires_in 7.days, :private => !trace.public?, :public => trace.public? expires_in 7.days, :private => !trace.public?, :public => trace.public?
send_file(trace.large_picture_name, :filename => "#{trace.id}.gif", :type => "image/gif", :disposition => "inline") send_file(trace.large_picture_name, :filename => "#{trace.id}.gif", :type => "image/gif", :disposition => "inline")
else else
@ -236,7 +236,7 @@ class TraceController < ApplicationController
trace = Trace.find(params[:id]) trace = Trace.find(params[:id])
if trace.visible? && trace.inserted? if trace.visible? && trace.inserted?
if trace.public? || (@user && @user == trace.user) if trace.public? || (current_user && current_user == trace.user)
expires_in 7.days, :private => !trace.public?, :public => trace.public? expires_in 7.days, :private => !trace.public?, :public => trace.public?
send_file(trace.icon_picture_name, :filename => "#{trace.id}_icon.gif", :type => "image/gif", :disposition => "inline") send_file(trace.icon_picture_name, :filename => "#{trace.id}_icon.gif", :type => "image/gif", :disposition => "inline")
else else
@ -252,7 +252,7 @@ class TraceController < ApplicationController
def api_read def api_read
trace = Trace.visible.find(params[:id]) trace = Trace.visible.find(params[:id])
if trace.public? || trace.user == @user if trace.public? || trace.user == current_user
render :xml => trace.to_xml.to_s render :xml => trace.to_xml.to_s
else else
head :forbidden head :forbidden
@ -262,7 +262,7 @@ class TraceController < ApplicationController
def api_update def api_update
trace = Trace.visible.find(params[:id]) trace = Trace.visible.find(params[:id])
if trace.user == @user if trace.user == current_user
new_trace = Trace.from_xml(request.raw_post) new_trace = Trace.from_xml(request.raw_post)
unless new_trace && new_trace.id == trace.id unless new_trace && new_trace.id == trace.id
@ -283,7 +283,7 @@ class TraceController < ApplicationController
def api_delete def api_delete
trace = Trace.visible.find(params[:id]) trace = Trace.visible.find(params[:id])
if trace.user == @user if trace.user == current_user
trace.visible = false trace.visible = false
trace.save! trace.save!
@ -296,7 +296,7 @@ class TraceController < ApplicationController
def api_data def api_data
trace = Trace.visible.find(params[:id]) trace = Trace.visible.find(params[:id])
if trace.public? || trace.user == @user if trace.public? || trace.user == current_user
if request.format == Mime[:xml] if request.format == Mime[:xml]
send_file(trace.xml_file, :filename => "#{trace.id}.xml", :type => request.format.to_s, :disposition => "attachment") send_file(trace.xml_file, :filename => "#{trace.id}.xml", :type => request.format.to_s, :disposition => "attachment")
elsif request.format == Mime[:gpx] elsif request.format == Mime[:gpx]
@ -357,7 +357,7 @@ class TraceController < ApplicationController
:description => description, :description => description,
:visibility => visibility, :visibility => visibility,
:inserted => true, :inserted => true,
:user => @user, :user => current_user,
:timestamp => Time.now.getutc :timestamp => Time.now.getutc
) )
@ -390,11 +390,11 @@ class TraceController < ApplicationController
end end
# Finally save the user's preferred privacy level # Finally save the user's preferred privacy level
if pref = @user.preferences.where(:k => "gps.trace.visibility").first if pref = current_user.preferences.where(:k => "gps.trace.visibility").first
pref.v = visibility pref.v = visibility
pref.save pref.save
else else
@user.preferences.create(:k => "gps.trace.visibility", :v => visibility) current_user.preferences.create(:k => "gps.trace.visibility", :v => visibility)
end end
end end
@ -407,11 +407,11 @@ class TraceController < ApplicationController
end end
def default_visibility def default_visibility
visibility = @user.preferences.where(:k => "gps.trace.visibility").first visibility = current_user.preferences.where(:k => "gps.trace.visibility").first
if visibility if visibility
visibility.v visibility.v
elsif @user.preferences.where(:k => "gps.trace.public", :v => "default").first.nil? elsif current_user.preferences.where(:k => "gps.trace.public", :v => "default").first.nil?
"private" "private"
else else
"public" "public"

View file

@ -20,7 +20,7 @@ class UserBlocksController < ApplicationController
end end
def show def show
if @user && @user.id == @user_block.user_id if current_user && current_user.id == @user_block.user_id
@user_block.needs_view = false @user_block.needs_view = false
@user_block.save! @user_block.save!
end end
@ -38,7 +38,7 @@ class UserBlocksController < ApplicationController
if @valid_params if @valid_params
@user_block = UserBlock.new( @user_block = UserBlock.new(
:user_id => @this_user.id, :user_id => @this_user.id,
:creator_id => @user.id, :creator_id => current_user.id,
:reason => params[:user_block][:reason], :reason => params[:user_block][:reason],
:ends_at => Time.now.getutc + @block_period.hours, :ends_at => Time.now.getutc + @block_period.hours,
:needs_view => params[:user_block][:needs_view] :needs_view => params[:user_block][:needs_view]
@ -57,7 +57,7 @@ class UserBlocksController < ApplicationController
def update def update
if @valid_params if @valid_params
if @user_block.creator_id != @user.id if @user_block.creator_id != current_user.id
flash[:error] = t("user_block.update.only_creator_can_edit") flash[:error] = t("user_block.update.only_creator_can_edit")
redirect_to :action => "edit" redirect_to :action => "edit"
elsif @user_block.update_attributes( elsif @user_block.update_attributes(
@ -79,7 +79,7 @@ class UserBlocksController < ApplicationController
# revokes the block, setting the end_time to now # revokes the block, setting the end_time to now
def revoke def revoke
if params[:confirm] if params[:confirm]
if @user_block.revoke! @user if @user_block.revoke! current_user
flash[:notice] = t "user_block.revoke.flash" flash[:notice] = t "user_block.revoke.flash"
redirect_to(@user_block) redirect_to(@user_block)
end end

View file

@ -28,10 +28,10 @@ class UserController < ApplicationController
else else
@title = t "user.terms.title" @title = t "user.terms.title"
if @user && @user.terms_agreed? if current_user && current_user.terms_agreed?
# Already agreed to terms, so just show settings # Already agreed to terms, so just show settings
redirect_to :action => :account, :display_name => @user.display_name redirect_to :action => :account, :display_name => current_user.display_name
elsif @user.nil? && session[:new_user].nil? elsif current_user.nil? && session[:new_user].nil?
redirect_to :action => :login, :referer => request.fullpath redirect_to :action => :login, :referer => request.fullpath
end end
end end
@ -41,52 +41,52 @@ class UserController < ApplicationController
@title = t "user.new.title" @title = t "user.new.title"
if params[:decline] if params[:decline]
if @user if current_user
@user.terms_seen = true current_user.terms_seen = true
if @user.save if current_user.save
flash[:notice] = t("user.new.terms declined", :url => t("user.new.terms declined url")).html_safe flash[:notice] = t("user.new.terms declined", :url => t("user.new.terms declined url")).html_safe
end end
if params[:referer] if params[:referer]
redirect_to params[:referer] redirect_to params[:referer]
else else
redirect_to :action => :account, :display_name => @user.display_name redirect_to :action => :account, :display_name => current_user.display_name
end end
else else
redirect_to t("user.terms.declined") redirect_to t("user.terms.declined")
end end
elsif @user elsif current_user
unless @user.terms_agreed? unless current_user.terms_agreed?
@user.consider_pd = params[:user][:consider_pd] current_user.consider_pd = params[:user][:consider_pd]
@user.terms_agreed = Time.now.getutc current_user.terms_agreed = Time.now.getutc
@user.terms_seen = true current_user.terms_seen = true
flash[:notice] = t "user.new.terms accepted" if @user.save flash[:notice] = t "user.new.terms accepted" if current_user.save
end end
if params[:referer] if params[:referer]
redirect_to params[:referer] redirect_to params[:referer]
else else
redirect_to :action => :account, :display_name => @user.display_name redirect_to :action => :account, :display_name => current_user.display_name
end end
else else
@user = session.delete(:new_user) self.current_user = session.delete(:new_user)
if check_signup_allowed(@user.email) if check_signup_allowed(current_user.email)
@user.data_public = true current_user.data_public = true
@user.description = "" if @user.description.nil? current_user.description = "" if current_user.description.nil?
@user.creation_ip = request.remote_ip current_user.creation_ip = request.remote_ip
@user.languages = http_accept_language.user_preferred_languages current_user.languages = http_accept_language.user_preferred_languages
@user.terms_agreed = Time.now.getutc current_user.terms_agreed = Time.now.getutc
@user.terms_seen = true current_user.terms_seen = true
if @user.auth_uid.blank? if current_user.auth_uid.blank?
@user.auth_provider = nil current_user.auth_provider = nil
@user.auth_uid = nil current_user.auth_uid = nil
end end
if @user.save if current_user.save
flash[:piwik_goal] = PIWIK["goals"]["signup"] if defined?(PIWIK) flash[:piwik_goal] = PIWIK["goals"]["signup"] if defined?(PIWIK)
referer = welcome_path referer = welcome_path
@ -103,13 +103,13 @@ class UserController < ApplicationController
# Use default # Use default
end end
if @user.status == "active" if current_user.status == "active"
session[:referer] = referer session[:referer] = referer
successful_login(@user) successful_login(current_user)
else else
session[:token] = @user.tokens.create.token session[:token] = current_user.tokens.create.token
Notifier.signup_confirm(@user, @user.tokens.create(:referer => referer)).deliver_now Notifier.signup_confirm(current_user, current_user.tokens.create(:referer => referer)).deliver_now
redirect_to :action => "confirm", :display_name => @user.display_name redirect_to :action => "confirm", :display_name => current_user.display_name
end end
else else
render :action => "new", :referer => params[:referer] render :action => "new", :referer => params[:referer]
@ -120,29 +120,29 @@ class UserController < ApplicationController
def account def account
@title = t "user.account.title" @title = t "user.account.title"
@tokens = @user.oauth_tokens.authorized @tokens = current_user.oauth_tokens.authorized
if params[:user] && params[:user][:display_name] && params[:user][:description] if params[:user] && params[:user][:display_name] && params[:user][:description]
if params[:user][:auth_provider].blank? || if params[:user][:auth_provider].blank? ||
(params[:user][:auth_provider] == @user.auth_provider && (params[:user][:auth_provider] == current_user.auth_provider &&
params[:user][:auth_uid] == @user.auth_uid) params[:user][:auth_uid] == current_user.auth_uid)
update_user(@user, params) update_user(current_user, params)
else else
session[:new_user_settings] = params session[:new_user_settings] = params
redirect_to auth_url(params[:user][:auth_provider], params[:user][:auth_uid]) redirect_to auth_url(params[:user][:auth_provider], params[:user][:auth_uid])
end end
elsif errors = session.delete(:user_errors) elsif errors = session.delete(:user_errors)
errors.each do |attribute, error| errors.each do |attribute, error|
@user.errors.add(attribute, error) current_user.errors.add(attribute, error)
end end
end end
end end
def go_public def go_public
@user.data_public = true current_user.data_public = true
@user.save current_user.save
flash[:notice] = t "user.go_public.flash success" flash[:notice] = t "user.go_public.flash success"
redirect_to :action => "account", :display_name => @user.display_name redirect_to :action => "account", :display_name => current_user.display_name
end end
def lost_password def lost_password
@ -175,18 +175,18 @@ class UserController < ApplicationController
token = UserToken.find_by(:token => params[:token]) token = UserToken.find_by(:token => params[:token])
if token if token
@user = token.user self.current_user = token.user
if params[:user] if params[:user]
@user.pass_crypt = params[:user][:pass_crypt] current_user.pass_crypt = params[:user][:pass_crypt]
@user.pass_crypt_confirmation = params[:user][:pass_crypt_confirmation] current_user.pass_crypt_confirmation = params[:user][:pass_crypt_confirmation]
@user.status = "active" if @user.status == "pending" current_user.status = "active" if current_user.status == "pending"
@user.email_valid = true current_user.email_valid = true
if @user.save if current_user.save
token.destroy token.destroy
flash[:notice] = t "user.reset_password.flash changed" flash[:notice] = t "user.reset_password.flash changed"
successful_login(@user) successful_login(current_user)
end end
end end
else else
@ -202,7 +202,7 @@ class UserController < ApplicationController
@title = t "user.new.title" @title = t "user.new.title"
@referer = params[:referer] || session[:referer] @referer = params[:referer] || session[:referer]
if @user if current_user
# The user is logged in already, so don't show them the signup # The user is logged in already, so don't show them the signup
# page, instead send them to the home page # page, instead send them to the home page
if @referer if @referer
@ -211,7 +211,7 @@ class UserController < ApplicationController
redirect_to :controller => "site", :action => "index" redirect_to :controller => "site", :action => "index"
end end
elsif params.key?(:auth_provider) && params.key?(:auth_uid) elsif params.key?(:auth_provider) && params.key?(:auth_uid)
@user = User.new(:email => params[:email], self.current_user = User.new(:email => params[:email],
:email_confirmation => params[:email], :email_confirmation => params[:email],
:display_name => params[:nickname], :display_name => params[:nickname],
:auth_provider => params[:auth_provider], :auth_provider => params[:auth_provider],
@ -220,34 +220,36 @@ class UserController < ApplicationController
flash.now[:notice] = render_to_string :partial => "auth_association" flash.now[:notice] = render_to_string :partial => "auth_association"
else else
check_signup_allowed check_signup_allowed
self.current_user = User.new
end end
end end
def create def create
@user = User.new(user_params) self.current_user = User.new(user_params)
if check_signup_allowed(@user.email) if check_signup_allowed(current_user.email)
session[:referer] = params[:referer] session[:referer] = params[:referer]
@user.status = "pending" current_user.status = "pending"
if @user.auth_provider.present? && @user.pass_crypt.empty? if current_user.auth_provider.present? && current_user.pass_crypt.empty?
# We are creating an account with external authentication and # We are creating an account with external authentication and
# no password was specified so create a random one # no password was specified so create a random one
@user.pass_crypt = SecureRandom.base64(16) current_user.pass_crypt = SecureRandom.base64(16)
@user.pass_crypt_confirmation = @user.pass_crypt current_user.pass_crypt_confirmation = current_user.pass_crypt
end end
if @user.invalid? if current_user.invalid?
# Something is wrong with a new user, so rerender the form # Something is wrong with a new user, so rerender the form
render :action => "new" render :action => "new"
elsif @user.auth_provider.present? elsif current_user.auth_provider.present?
# Verify external authenticator before moving on # Verify external authenticator before moving on
session[:new_user] = @user session[:new_user] = current_user
redirect_to auth_url(@user.auth_provider, @user.auth_uid) redirect_to auth_url(current_user.auth_provider, current_user.auth_uid)
else else
# Save the user record # Save the user record
session[:new_user] = @user session[:new_user] = current_user
redirect_to :action => :terms redirect_to :action => :terms
end end
end end
@ -345,23 +347,23 @@ class UserController < ApplicationController
if request.post? if request.post?
token = UserToken.find_by(:token => params[:confirm_string]) token = UserToken.find_by(:token => params[:confirm_string])
if token && token.user.new_email? if token && token.user.new_email?
@user = token.user self.current_user = token.user
@user.email = @user.new_email current_user.email = current_user.new_email
@user.new_email = nil current_user.new_email = nil
@user.email_valid = true current_user.email_valid = true
gravatar_enabled = gravatar_enable(@user) gravatar_enabled = gravatar_enable(current_user)
if @user.save if current_user.save
flash[:notice] = if gravatar_enabled flash[:notice] = if gravatar_enabled
t("user.confirm_email.success") + " " + gravatar_status_message(@user) t("user.confirm_email.success") + " " + gravatar_status_message(current_user)
else else
t("user.confirm_email.success") t("user.confirm_email.success")
end end
else else
flash[:errors] = @user.errors flash[:errors] = current_user.errors
end end
token.destroy token.destroy
session[:user] = @user.id session[:user] = current_user.id
redirect_to :action => "account", :display_name => @user.display_name redirect_to :action => "account", :display_name => current_user.display_name
elsif token elsif token
flash[:error] = t "user.confirm_email.failure" flash[:error] = t "user.confirm_email.failure"
redirect_to :action => "account", :display_name => token.user.display_name redirect_to :action => "account", :display_name => token.user.display_name
@ -380,13 +382,13 @@ class UserController < ApplicationController
end end
def api_details def api_details
@this_user = @user @this_user = current_user
render :action => :api_read, :content_type => "text/xml" render :action => :api_read, :content_type => "text/xml"
end end
def api_gpx_files def api_gpx_files
doc = OSM::API.new.get_xml_doc doc = OSM::API.new.get_xml_doc
@user.traces.reload.each do |trace| current_user.traces.reload.each do |trace|
doc.root << trace.to_xml_node doc.root << trace.to_xml_node
end end
render :xml => doc.to_s render :xml => doc.to_s
@ -396,7 +398,7 @@ class UserController < ApplicationController
@this_user = User.find_by(:display_name => params[:display_name]) @this_user = User.find_by(:display_name => params[:display_name])
if @this_user && if @this_user &&
(@this_user.visible? || (@user && @user.administrator?)) (@this_user.visible? || (current_user && current_user.administrator?))
@title = @this_user.display_name @title = @this_user.display_name
else else
render_unknown_user params[:display_name] render_unknown_user params[:display_name]
@ -409,9 +411,9 @@ class UserController < ApplicationController
if @new_friend if @new_friend
if request.post? if request.post?
friend = Friend.new friend = Friend.new
friend.user_id = @user.id friend.user_id = current_user.id
friend.friend_user_id = @new_friend.id friend.friend_user_id = @new_friend.id
if @user.is_friends_with?(@new_friend) if current_user.is_friends_with?(@new_friend)
flash[:warning] = t "user.make_friend.already_a_friend", :name => @new_friend.display_name flash[:warning] = t "user.make_friend.already_a_friend", :name => @new_friend.display_name
elsif friend.save elsif friend.save
flash[:notice] = t "user.make_friend.success", :name => @new_friend.display_name flash[:notice] = t "user.make_friend.success", :name => @new_friend.display_name
@ -436,8 +438,8 @@ class UserController < ApplicationController
if @friend if @friend
if request.post? if request.post?
if @user.is_friends_with?(@friend) if current_user.is_friends_with?(@friend)
Friend.where(:user_id => @user.id, :friend_user_id => @friend.id).delete_all Friend.where(:user_id => current_user.id, :friend_user_id => @friend.id).delete_all
flash[:notice] = t "user.remove_friend.success", :name => @friend.display_name flash[:notice] = t "user.remove_friend.success", :name => @friend.display_name
else else
flash[:error] = t "user.remove_friend.not_a_friend", :name => @friend.display_name flash[:error] = t "user.remove_friend.not_a_friend", :name => @friend.display_name
@ -514,14 +516,14 @@ class UserController < ApplicationController
end end
if settings = session.delete(:new_user_settings) if settings = session.delete(:new_user_settings)
@user.auth_provider = provider current_user.auth_provider = provider
@user.auth_uid = uid current_user.auth_uid = uid
update_user(@user, settings) update_user(current_user, settings)
session[:user_errors] = @user.errors.as_json session[:user_errors] = current_user.errors.as_json
redirect_to :action => "account", :display_name => @user.display_name redirect_to :action => "account", :display_name => current_user.display_name
elsif session[:new_user] elsif session[:new_user]
session[:new_user].auth_provider = provider session[:new_user].auth_provider = provider
session[:new_user].auth_uid = uid session[:new_user].auth_uid = uid
@ -547,7 +549,7 @@ class UserController < ApplicationController
when "active", "confirmed" then when "active", "confirmed" then
successful_login(user, request.env["omniauth.params"]["referer"]) successful_login(user, request.env["omniauth.params"]["referer"])
when "suspended" then when "suspended" then
failed_login t("user.login.account is suspended", :webmaster => "mailto:#{SUPPORT_EMAIL}") failed_login t("user.login.account is suspended", :webmaster => "mailto:#{SUPPORT_EMAIL}").html_safe
else else
failed_login t("user.login.auth failure") failed_login t("user.login.auth failure")
end end
@ -575,7 +577,7 @@ class UserController < ApplicationController
elsif user = User.authenticate(:username => username, :password => password, :pending => true) elsif user = User.authenticate(:username => username, :password => password, :pending => true)
unconfirmed_login(user) unconfirmed_login(user)
elsif User.authenticate(:username => username, :password => password, :suspended => true) elsif User.authenticate(:username => username, :password => password, :suspended => true)
failed_login t("user.login.account is suspended", :webmaster => "mailto:#{SUPPORT_EMAIL}"), username failed_login t("user.login.account is suspended", :webmaster => "mailto:#{SUPPORT_EMAIL}").html_safe, username
else else
failed_login t("user.login.auth failure"), username failed_login t("user.login.auth failure"), username
end end
@ -725,8 +727,8 @@ class UserController < ApplicationController
# Ignore errors sending email # Ignore errors sending email
end end
else else
@user.errors.add(:new_email, @user.errors[:email]) current_user.errors.add(:new_email, current_user.errors[:email])
@user.errors.add(:email, []) current_user.errors.add(:email, [])
end end
user.restore_email! user.restore_email!
@ -738,7 +740,7 @@ class UserController < ApplicationController
# require that the user is a administrator, or fill out a helpful error message # require that the user is a administrator, or fill out a helpful error message
# and return them to the user page. # and return them to the user page.
def require_administrator def require_administrator
if @user && !@user.administrator? if current_user && !current_user.administrator?
flash[:error] = t("user.filter.not_an_administrator") flash[:error] = t("user.filter.not_an_administrator")
if params[:display_name] if params[:display_name]
@ -746,7 +748,7 @@ class UserController < ApplicationController
else else
redirect_to :action => "login", :referer => request.fullpath redirect_to :action => "login", :referer => request.fullpath
end end
elsif !@user elsif !current_user
redirect_to :action => "login", :referer => request.fullpath redirect_to :action => "login", :referer => request.fullpath
end end
end end
@ -754,7 +756,7 @@ class UserController < ApplicationController
## ##
# require that the user in the URL is the logged in user # require that the user in the URL is the logged in user
def require_self def require_self
head :forbidden if params[:display_name] != @user.display_name head :forbidden if params[:display_name] != current_user.display_name
end end
## ##

View file

@ -11,7 +11,7 @@ class UserPreferenceController < ApplicationController
def read def read
doc = OSM::API.new.get_xml_doc doc = OSM::API.new.get_xml_doc
prefs = @user.preferences prefs = current_user.preferences
el1 = XML::Node.new "preferences" el1 = XML::Node.new "preferences"
@ -26,14 +26,14 @@ class UserPreferenceController < ApplicationController
## ##
# return the value for a single preference # return the value for a single preference
def read_one def read_one
pref = UserPreference.find([@user.id, params[:preference_key]]) pref = UserPreference.find([current_user.id, params[:preference_key]])
render :plain => pref.v.to_s render :plain => pref.v.to_s
end end
# update the entire set of preferences # update the entire set of preferences
def update def update
old_preferences = @user.preferences.each_with_object({}) do |preference, preferences| old_preferences = current_user.preferences.each_with_object({}) do |preference, preferences|
preferences[preference.k] = preference preferences[preference.k] = preference
end end
@ -47,7 +47,7 @@ class UserPreferenceController < ApplicationController
elsif new_preferences.include?(pt["k"]) elsif new_preferences.include?(pt["k"])
raise OSM::APIDuplicatePreferenceError.new(pt["k"]) raise OSM::APIDuplicatePreferenceError.new(pt["k"])
else else
preference = @user.preferences.build(:k => pt["k"], :v => pt["v"]) preference = current_user.preferences.build(:k => pt["k"], :v => pt["v"])
end end
new_preferences[preference.k] = preference new_preferences[preference.k] = preference
@ -64,10 +64,10 @@ class UserPreferenceController < ApplicationController
# update the value of a single preference # update the value of a single preference
def update_one def update_one
begin begin
pref = UserPreference.find([@user.id, params[:preference_key]]) pref = UserPreference.find([current_user.id, params[:preference_key]])
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
pref = UserPreference.new pref = UserPreference.new
pref.user = @user pref.user = current_user
pref.k = params[:preference_key] pref.k = params[:preference_key]
end end
@ -80,7 +80,7 @@ class UserPreferenceController < ApplicationController
## ##
# delete a single preference # delete a single preference
def delete_one def delete_one
UserPreference.find([@user.id, params[:preference_key]]).delete UserPreference.find([current_user.id, params[:preference_key]]).delete
render :plain => "" render :plain => ""
end end

View file

@ -10,7 +10,7 @@ class UserRolesController < ApplicationController
before_action :in_role, :only => [:revoke] before_action :in_role, :only => [:revoke]
def grant def grant
@this_user.roles.create(:role => @role, :granter_id => @user.id) @this_user.roles.create(:role => @role, :granter_id => current_user.id)
redirect_to :controller => "user", :action => "view", :display_name => @this_user.display_name redirect_to :controller => "user", :action => "view", :display_name => @this_user.display_name
end end
@ -25,7 +25,7 @@ class UserRolesController < ApplicationController
# require that the user is an administrator, or fill out a helpful error message # require that the user is an administrator, or fill out a helpful error message
# and return them to theuser page. # and return them to theuser page.
def require_administrator def require_administrator
unless @user.administrator? unless current_user.administrator?
flash[:error] = t "user_role.filter.not_an_administrator" flash[:error] = t "user_role.filter.not_an_administrator"
redirect_to :controller => "user", :action => "view", :display_name => @this_user.display_name redirect_to :controller => "user", :action => "view", :display_name => @this_user.display_name
end end

View file

@ -15,7 +15,7 @@ class WayController < ApplicationController
way = Way.from_xml(request.raw_post, true) way = Way.from_xml(request.raw_post, true)
# Assume that Way.from_xml has thrown an exception if there is an error parsing the xml # Assume that Way.from_xml has thrown an exception if there is an error parsing the xml
way.create_with_history @user way.create_with_history current_user
render :plain => way.id.to_s render :plain => way.id.to_s
end end
@ -39,7 +39,7 @@ class WayController < ApplicationController
raise OSM::APIBadUserInput.new("The id in the url (#{way.id}) is not the same as provided in the xml (#{new_way.id})") raise OSM::APIBadUserInput.new("The id in the url (#{way.id}) is not the same as provided in the xml (#{new_way.id})")
end end
way.update_from(new_way, @user) way.update_from(new_way, current_user)
render :plain => way.version.to_s render :plain => way.version.to_s
end end
@ -49,7 +49,7 @@ class WayController < ApplicationController
new_way = Way.from_xml(request.raw_post) new_way = Way.from_xml(request.raw_post)
if new_way && new_way.id == way.id if new_way && new_way.id == way.id
way.delete_with_history!(new_way, @user) way.delete_with_history!(new_way, current_user)
render :plain => way.version.to_s render :plain => way.version.to_s
else else
head :bad_request head :bad_request

View file

@ -21,12 +21,12 @@ module ApplicationHelper
css = "" css = ""
css << ".hidden { display: none !important }" css << ".hidden { display: none !important }"
css << ".hide_unless_logged_in { display: none !important }" unless @user css << ".hide_unless_logged_in { display: none !important }" unless current_user
css << ".hide_if_logged_in { display: none !important }" if @user css << ".hide_if_logged_in { display: none !important }" if current_user
css << ".hide_if_user_#{@user.id} { display: none !important }" if @user css << ".hide_if_user_#{current_user.id} { display: none !important }" if current_user
css << ".show_if_user_#{@user.id} { display: inline !important }" if @user css << ".show_if_user_#{current_user.id} { display: inline !important }" if current_user
css << ".hide_unless_administrator { display: none !important }" unless @user && @user.administrator? css << ".hide_unless_administrator { display: none !important }" unless current_user && current_user.administrator?
css << ".hide_unless_moderator { display: none !important }" unless @user && @user.moderator? css << ".hide_unless_moderator { display: none !important }" unless current_user && current_user.moderator?
content_tag(:style, css, :type => "text/css") content_tag(:style, css, :type => "text/css")
end end
@ -107,11 +107,11 @@ module ApplicationHelper
:preferred_editor => preferred_editor :preferred_editor => preferred_editor
} }
if @user if current_user
data[:user] = @user.id.to_json data[:user] = current_user.id.to_json
unless @user.home_lon.nil? || @user.home_lat.nil? unless current_user.home_lon.nil? || current_user.home_lat.nil?
data[:user_home] = { :lat => @user.home_lat, :lon => @user.home_lon } data[:user_home] = { :lat => current_user.home_lat, :lon => current_user.home_lon }
end end
end end

View file

@ -6,7 +6,7 @@ module UserRolesHelper
end end
def role_icon(user, role) def role_icon(user, role)
if @user && @user.administrator? if current_user && current_user.administrator?
if user.has_role?(role) if user.has_role?(role)
image = "roles/#{role}" image = "roles/#{role}"
alt = t("user.view.role.revoke.#{role}") alt = t("user.view.role.revoke.#{role}")

View file

@ -20,7 +20,7 @@
<div class="buttons clearfix subscribe-buttons"> <div class="buttons clearfix subscribe-buttons">
<form action="#" class="hide_unless_logged_in"> <form action="#" class="hide_unless_logged_in">
<% if @user and @changeset.subscribers.exists?(@user.id) %> <% if current_user and @changeset.subscribers.exists?(current_user.id) %>
<input class="action-button" type="submit" name="unsubscribe" value="<%= t('javascripts.changesets.show.unsubscribe') %>" data-method="POST" data-url="<%= changeset_unsubscribe_url(@changeset) %>" /> <input class="action-button" type="submit" name="unsubscribe" value="<%= t('javascripts.changesets.show.unsubscribe') %>" data-method="POST" data-url="<%= changeset_unsubscribe_url(@changeset) %>" />
<% else %> <% else %>
<input class="action-button" type="submit" name="subscribe" value="<%= t('javascripts.changesets.show.subscribe') %>" data-method="POST" data-url="<%= changeset_subscribe_url(@changeset) %>" /> <input class="action-button" type="submit" name="subscribe" value="<%= t('javascripts.changesets.show.subscribe') %>" data-method="POST" data-url="<%= changeset_subscribe_url(@changeset) %>" />
@ -42,13 +42,13 @@
:when => friendly_date(comment.created_at), :exact_time => l(comment.created_at), :when => friendly_date(comment.created_at), :exact_time => l(comment.created_at),
:user => link_to(h(comment.author.display_name), {:controller => "user", :action => "view", :user => link_to(h(comment.author.display_name), {:controller => "user", :action => "view",
:display_name => comment.author.display_name})).html_safe %> :display_name => comment.author.display_name})).html_safe %>
<% if @user and @user.moderator? %> <% if current_user and current_user.moderator? %>
— <span class="action-button deemphasize" data-comment-id="<%= comment.id %>" data-method="POST" data-url="<%= changeset_comment_hide_url(comment.id) %>"><%= t('javascripts.changesets.show.hide_comment') %></span> — <span class="action-button deemphasize" data-comment-id="<%= comment.id %>" data-method="POST" data-url="<%= changeset_comment_hide_url(comment.id) %>"><%= t('javascripts.changesets.show.hide_comment') %></span>
<% end %> <% end %>
</small> </small>
<%= comment.body.to_html %> <%= comment.body.to_html %>
</li> </li>
<% elsif @user and @user.moderator? %> <% elsif current_user and current_user.moderator? %>
<li id="c<%= comment.id %>"> <li id="c<%= comment.id %>">
<small class='deemphasize'> <small class='deemphasize'>
<%= t("browse.changeset.hidden_commented_by", <%= t("browse.changeset.hidden_commented_by",

View file

@ -5,7 +5,7 @@
<% end -%> <% end -%>
<% <%
set_title(changeset_list_title(params, @user)) set_title(changeset_list_title(params, current_user))
if params[:display_name] if params[:display_name]
@heading = t('changeset.list.title_user', :user => link_to(params[:display_name], :controller => "user", :action => "view", :display_name => params[:display_name])).html_safe @heading = t('changeset.list.title_user', :user => link_to(params[:display_name], :controller => "user", :action => "view", :display_name => params[:display_name])).html_safe
else else

View file

@ -2,7 +2,7 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
:id => url_for(@params.merge(:only_path => false)), :id => url_for(@params.merge(:only_path => false)),
:root_url => url_for(@params.merge(:action => :list, :format => nil, :only_path => false)), :root_url => url_for(@params.merge(:action => :list, :format => nil, :only_path => false)),
"xmlns:georss" => "http://www.georss.org/georss") do |feed| "xmlns:georss" => "http://www.georss.org/georss") do |feed|
feed.title changeset_list_title(params, @user) feed.title changeset_list_title(params, current_user)
feed.updated @edits.map { |e| [e.created_at, e.closed_at].max }.max feed.updated @edits.map { |e| [e.created_at, e.closed_at].max }.max
feed.icon image_url("favicon.ico") feed.icon image_url("favicon.ico")

View file

@ -25,9 +25,9 @@
<%= richtext_area :diary_comment, :body, :cols => 80, :rows => 15 %> <%= richtext_area :diary_comment, :body, :cols => 80, :rows => 15 %>
<%= submit_tag t('diary_entry.view.save_button') %> <%= submit_tag t('diary_entry.view.save_button') %>
<% end %> <% end %>
<% if @user and @entry.subscribers.exists?(@user.id) %> <% if current_user and @entry.subscribers.exists?(current_user.id) %>
<div class="diary-subscribe-buttons"><%= link_to t('javascripts.changesets.show.unsubscribe'), diary_entry_unsubscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %></div> <div class="diary-subscribe-buttons"><%= link_to t('javascripts.changesets.show.unsubscribe'), diary_entry_unsubscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %></div>
<% elsif @user %> <% elsif current_user %>
<div class="diary-subscribe-buttons"><%= link_to t('javascripts.changesets.show.subscribe'), diary_entry_subscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %></div> <div class="diary-subscribe-buttons"><%= link_to t('javascripts.changesets.show.subscribe'), diary_entry_subscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %></div>
<% end %> <% end %>
<% end %> <% end %>

View file

@ -57,26 +57,26 @@
</ul> </ul>
</li> </li>
</ul> </ul>
<% if @user && @user.id %> <% if current_user && current_user.id %>
<div class='dropdown user-menu logged-in'> <div class='dropdown user-menu logged-in'>
<a class='dropdown-toggle' data-toggle='dropdown' href="#"> <a class='dropdown-toggle' data-toggle='dropdown' href="#">
<%= user_thumbnail_tiny(@user, :width => 25, :height => 25) <%= user_thumbnail_tiny(current_user, :width => 25, :height => 25)
%><%= render :partial => 'layouts/inbox' %><%= render :partial => 'layouts/inbox'
%><span class="user-button"><span class='username'><%= @user.display_name %></span> %><span class="user-button"><span class='username'><%= current_user.display_name %></span>
<b class="caret"></b></span> <b class="caret"></b></span>
</a> </a>
<ul class='dropdown-menu'> <ul class='dropdown-menu'>
<li> <li>
<%= link_to inbox_path(:display_name => @user.display_name) do %> <%= link_to inbox_path(:display_name => current_user.display_name) do %>
<span class='count-number'><%= number_with_delimiter(@user.new_messages.size) %></span> <span class='count-number'><%= number_with_delimiter(current_user.new_messages.size) %></span>
<%= t('user.view.my messages') %> <%= t('user.view.my messages') %>
<% end %> <% end %>
</li> </li>
<li> <li>
<%= link_to t('user.view.my profile'), user_path(:display_name => @user.display_name) %> <%= link_to t('user.view.my profile'), user_path(:display_name => current_user.display_name) %>
</li> </li>
<li> <li>
<%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %> <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => current_user.display_name %>
</li> </li>
<li class="divider"></li> <li class="divider"></li>
<li> <li>

View file

@ -1,3 +1,3 @@
<% if @user.new_messages.size > 0 %> <% if current_user.new_messages.size > 0 %>
<span id="inboxanchor" class="count-number"><%= @user.new_messages.size %></span> <span id="inboxanchor" class="count-number"><%= current_user.new_messages.size %></span>
<% end %> <% end %>

View file

@ -4,14 +4,14 @@
<% content_for(:body_class) { "map-layout" } %> <% content_for(:body_class) { "map-layout" } %>
<% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %> <% if current_user and !current_user.home_lon.nil? and !current_user.home_lat.nil? %>
<% content_for :greeting do %> <% content_for :greeting do %>
<%= link_to t("layouts.home"), <%= link_to t("layouts.home"),
"#", "#",
:id => "homeanchor", :id => "homeanchor",
:class => "set_position", :class => "set_position",
:data => { :lat => @user.home_lat, :data => { :lat => current_user.home_lat,
:lon => @user.home_lon, :lon => current_user.home_lon,
:zoom => 15 } %> :zoom => 15 } %>
<% end %> <% end %>
<% end %> <% end %>
@ -38,7 +38,7 @@
<%= yield %> <%= yield %>
</div> </div>
<% unless @user %> <% unless current_user %>
<div class="welcome"> <div class="welcome">
<h2><%= t 'layouts.intro_header' %></h2> <h2><%= t 'layouts.intro_header' %></h2>
<div class="close-wrap"><span class="icon close"></span></div> <div class="close-wrap"><span class="icon close"></span></div>

View file

@ -1,8 +1,8 @@
<p id="inbox-count"> <p id="inbox-count">
<%= t "message.inbox.messages", <%= t "message.inbox.messages",
:new_messages => t("message.inbox.new_messages", :new_messages => t("message.inbox.new_messages",
:count => @user.new_messages.size), :count => current_user.new_messages.size),
:old_messages => t("message.inbox.old_messages", :old_messages => t("message.inbox.old_messages",
:count => @user.messages.size - @user.new_messages.size) :count => current_user.messages.size - current_user.new_messages.size)
%> %>
</p> </p>

View file

@ -1,10 +1,10 @@
<% content_for :heading do %> <% content_for :heading do %>
<h2><%= t'message.inbox.my_inbox'%>/<%= link_to t('message.inbox.outbox'), outbox_path(@user.display_name) %></h2> <h2><%= t'message.inbox.my_inbox'%>/<%= link_to t('message.inbox.outbox'), outbox_path(current_user.display_name) %></h2>
<% end %> <% end %>
<h4><%= render :partial => "message_count" %></h4> <h4><%= render :partial => "message_count" %></h4>
<% if @user.messages.size > 0 %> <% if current_user.messages.size > 0 %>
<table class="messages"> <table class="messages">
<thead> <thead>
<tr> <tr>
@ -16,9 +16,9 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<%= render :partial => "message_summary", :collection => @user.messages %> <%= render :partial => "message_summary", :collection => current_user.messages %>
</tbody> </tbody>
</table> </table>
<% else %> <% else %>
<div><%= raw(t'message.inbox.no_messages_yet', :people_mapping_nearby_link => link_to(t('message.inbox.people_mapping_nearby'), :controller => 'user', :action => 'view', :display_name => @user.display_name)) %></div> <div><%= raw(t'message.inbox.no_messages_yet', :people_mapping_nearby_link => link_to(t('message.inbox.people_mapping_nearby'), :controller => 'user', :action => 'view', :display_name => current_user.display_name)) %></div>
<% end %> <% end %>

View file

@ -16,7 +16,7 @@
</div> </div>
<div class='buttons'> <div class='buttons'>
<%= submit_tag t('message.new.send_button') %> <%= submit_tag t('message.new.send_button') %>
<%= link_to t('message.new.back_to_inbox'), { :controller => 'message', :action => 'inbox', :display_name => @user.display_name }, :class => 'deemphasize button' %> <%= link_to t('message.new.back_to_inbox'), { :controller => 'message', :action => 'inbox', :display_name => current_user.display_name }, :class => 'deemphasize button' %>
</div> </div>
</fieldset> </fieldset>
<% end %> <% end %>

View file

@ -1,10 +1,10 @@
<% content_for :heading do %> <% content_for :heading do %>
<h2><%= raw(t'message.outbox.my_inbox', :inbox_link => link_to(t('message.outbox.inbox'), inbox_path(@user.display_name))) %>/<%= t'message.outbox.outbox' %></h2> <h2><%= raw(t'message.outbox.my_inbox', :inbox_link => link_to(t('message.outbox.inbox'), inbox_path(current_user.display_name))) %>/<%= t'message.outbox.outbox' %></h2>
<% end %> <% end %>
<h4><%= t'message.outbox.messages', :count => @user.sent_messages.size %></h4> <h4><%= t'message.outbox.messages', :count => current_user.sent_messages.size %></h4>
<% if @user.sent_messages.size > 0 %> <% if current_user.sent_messages.size > 0 %>
<table class="messages"> <table class="messages">
<thead> <thead>
<tr> <tr>
@ -15,9 +15,9 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<%= render :partial => "sent_message_summary", :collection => @user.sent_messages %> <%= render :partial => "sent_message_summary", :collection => current_user.sent_messages %>
</tbody> </tbody>
</table> </table>
<% else %> <% else %>
<div class="messages"><%= raw(t'message.outbox.no_sent_messages', :people_mapping_nearby_link => link_to(t('message.outbox.people_mapping_nearby'), :controller => 'user', :action => 'view', :display_name => @user.display_name)) %></div> <div class="messages"><%= raw(t'message.outbox.no_sent_messages', :people_mapping_nearby_link => link_to(t('message.outbox.people_mapping_nearby'), :controller => 'user', :action => 'view', :display_name => current_user.display_name)) %></div>
<% end %> <% end %>

View file

@ -1,4 +1,4 @@
<% if @user == @message.recipient %> <% if current_user == @message.recipient %>
<% content_for :heading do %> <% content_for :heading do %>
<h2><%= h(@message.title) %></h2> <h2><%= h(@message.title) %></h2>
<% end %> <% end %>
@ -36,5 +36,5 @@
<% end %> <% end %>
<%= link_to t('message.read.back'), {:controller => 'message', :action => 'outbox', :display_name => @user.display_name }, :class => "button deemphasize" %> <%= link_to t('message.read.back'), {:controller => 'message', :action => 'outbox', :display_name => current_user.display_name }, :class => "button deemphasize" %>
</div> </div>

View file

@ -2,7 +2,7 @@
<h1><%= t "oauth.oauthorize.title" %></h1> <h1><%= t "oauth.oauthorize.title" %></h1>
<% end %> <% end %>
<p><%= raw t("oauth.oauthorize.request_access", :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(@user.display_name, :controller => :user, :action => :view, :display_name => @user.display_name)) %></p> <p><%= raw t("oauth.oauthorize.request_access", :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(current_user.display_name, :controller => :user, :action => :view, :display_name => current_user.display_name)) %></p>
<%= form_tag authorize_url do %> <%= form_tag authorize_url do %>
<%= hidden_field_tag "oauth_token", @token.token %> <%= hidden_field_tag "oauth_token", @token.token %>

View file

@ -12,7 +12,7 @@
<%= @redaction.description.to_html %> <%= @redaction.description.to_html %>
</p> </p>
<% if @user and @user.moderator? %> <% if current_user and current_user.moderator? %>
<div class="buttons"> <div class="buttons">
<%= button_to t('redaction.show.edit'), edit_redaction_path(@redaction), :method => :get %></td> <%= button_to t('redaction.show.edit'), edit_redaction_path(@redaction), :method => :get %></td>
<%= button_to t('redaction.show.destroy'), @redaction, :method => "delete", :remote => true, :data => { :confirm => t('redaction.show.confirm') } %> <%= button_to t('redaction.show.destroy'), @redaction, :method => "delete", :remote => true, :data => { :confirm => t('redaction.show.confirm') } %>

View file

@ -1,7 +1,7 @@
<%= javascript_include_tag "edit/potlatch" %> <%= javascript_include_tag "edit/potlatch" %>
<div id="map"> <div id="map">
<% session[:token] = @user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token]) -%> <% session[:token] = current_user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token]) -%>
<% data = { :token => session[:token] } -%> <% data = { :token => session[:token] } -%>
<% data[:lat] = @lat if @lat -%> <% data[:lat] = @lat if @lat -%>
<% data[:lon] = @lon if @lon -%> <% data[:lon] = @lon if @lon -%>

View file

@ -1,13 +1,13 @@
<%= javascript_include_tag "edit/potlatch2" %> <%= javascript_include_tag "edit/potlatch2" %>
<div id="map"> <div id="map">
<% session[:token] = @user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token]) -%> <% session[:token] = current_user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token]) -%>
<% data = { :token => session[:token] } -%> <% data = { :token => session[:token] } -%>
<% data[:lat] = @lat if @lat -%> <% data[:lat] = @lat if @lat -%>
<% data[:lon] = @lon if @lon -%> <% data[:lon] = @lon if @lon -%>
<% data[:zoom] = @zoom if @zoom -%> <% data[:zoom] = @zoom if @zoom -%>
<% if defined? POTLATCH2_KEY %> <% if defined? POTLATCH2_KEY %>
<% token = @user.access_token(POTLATCH2_KEY) %> <% token = current_user.access_token(POTLATCH2_KEY) %>
<% data[:token] = token.token -%> <% data[:token] = token.token -%>
<% data[:token_secret] = token.secret -%> <% data[:token_secret] = token.secret -%>
<% data[:consumer_key] = token.client_application.key -%> <% data[:consumer_key] = token.client_application.key -%>

View file

@ -3,9 +3,9 @@
<p><%= t 'layouts.osm_offline' %></p> <p><%= t 'layouts.osm_offline' %></p>
<% elsif STATUS == :database_readonly or STATUS == :api_readonly %> <% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
<p><%= t 'layouts.osm_read_only' %></p> <p><%= t 'layouts.osm_read_only' %></p>
<% elsif !@user.data_public? %> <% elsif !current_user.data_public? %>
<p><%= t 'site.edit.not_public' %></p> <p><%= t 'site.edit.not_public' %></p>
<p><%= raw t 'site.edit.not_public_description', :user_page => (link_to t('site.edit.user_page_link'), {:controller => 'user', :action => 'account', :display_name => @user.display_name, :anchor => 'public'}) %></p> <p><%= raw t 'site.edit.not_public_description', :user_page => (link_to t('site.edit.user_page_link'), {:controller => 'user', :action => 'account', :display_name => current_user.display_name, :anchor => 'public'}) %></p>
<p><%= raw t 'site.edit.anon_edits', :link => link_to(t('site.edit.anon_edits_link_text'), t('site.edit.anon_edits_link')) %></p> <p><%= raw t 'site.edit.anon_edits', :link => link_to(t('site.edit.anon_edits_link_text'), t('site.edit.anon_edits_link')) %></p>
<% else %> <% else %>
<%= render :partial => preferred_editor %> <%= render :partial => preferred_editor %>

View file

@ -5,7 +5,7 @@
<p class='introduction'><%= t "help_page.introduction" %></p> <p class='introduction'><%= t "help_page.introduction" %></p>
<% ['welcome', 'beginners_guide', 'help', 'mailing_lists', 'forums', 'irc', 'switch2osm', 'wiki'].each do |site| %> <% ['welcome', 'beginners_guide', 'help', 'mailing_lists', 'forums', 'irc', 'switch2osm', 'wiki'].each do |site| %>
<% unless site == 'welcome' && !@user %> <% unless site == 'welcome' && !current_user %>
<div class='<%= site %> help-item'> <div class='<%= site %> help-item'>
<h3> <h3>
<a href='<%= t "help_page.#{site}.url" %>'> <a href='<%= t "help_page.#{site}.url" %>'>

View file

@ -10,7 +10,7 @@
<body> <body>
<% data = {} -%> <% data = {} -%>
<% if defined? ID_KEY %> <% if defined? ID_KEY %>
<% token = @user.access_token(ID_KEY) %> <% token = current_user.access_token(ID_KEY) %>
<% data[:token] = token.token -%> <% data[:token] = token.token -%>
<% data[:token_secret] = token.secret -%> <% data[:token_secret] = token.secret -%>
<% data[:consumer_key] = token.client_application.key -%> <% data[:consumer_key] = token.client_application.key -%>

View file

@ -37,7 +37,7 @@
<ul class='secondary-actions clearfix deemphasize'> <ul class='secondary-actions clearfix deemphasize'>
<li><%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => contact.display_name %></li> <li><%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => contact.display_name %></li>
<li> <li>
<% if @user.is_friends_with?(contact) %> <% if current_user.is_friends_with?(contact) %>
<%= link_to t('user.view.remove as friend'), remove_friend_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :post %> <%= link_to t('user.view.remove as friend'), remove_friend_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :post %>
<% else %> <% else %>
<%= link_to t('user.view.add as friend'), make_friend_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :post %> <%= link_to t('user.view.add as friend'), make_friend_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :post %>

View file

@ -5,13 +5,13 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t 'user.account.my settings' %></h1> <h1><%= t 'user.account.my settings' %></h1>
<ul class='secondary-actions clearfix'> <ul class='secondary-actions clearfix'>
<li><%= link_to t('user.account.return to profile'), :controller => 'user', :action => 'view', :display_name => @user.display_name %></li> <li><%= link_to t('user.account.return to profile'), :controller => 'user', :action => 'view', :display_name => current_user.display_name %></li>
<li><%= link_to t('user.view.oauth settings'), :controller => 'oauth_clients', :action => 'index' %></li> <li><%= link_to t('user.view.oauth settings'), :controller => 'oauth_clients', :action => 'index' %></li>
</ul> </ul>
<% end %> <% end %>
<%= error_messages_for 'user' %> <%= error_messages_for current_user %>
<%= form_for :user, :html => { :multipart => true, :id => 'accountForm', :class => 'standard-form', :autocomplete => :off } do |f| %> <%= form_for current_user, :url => { :action => :account }, :html => { :multipart => true, :id => 'accountForm', :class => 'standard-form', :autocomplete => :off } do |f| %>
<fieldset> <fieldset>
<div class="form-row"> <div class="form-row">
<label class="standard-label"><%= t 'user.new.display name' %></label> <label class="standard-label"><%= t 'user.new.display name' %></label>
@ -22,7 +22,7 @@
<fieldset> <fieldset>
<div class="form-row"> <div class="form-row">
<label class="standard-label"><%= t 'user.account.current email address' %></label> <label class="standard-label"><%= t 'user.account.current email address' %></label>
<input type="email" disabled value="<%= @user.email %>" /> <input type="email" disabled value="<%= current_user.email %>" />
<span class="form-help deemphasize"><%= t 'user.account.email never displayed publicly' %></span> <span class="form-help deemphasize"><%= t 'user.account.email never displayed publicly' %></span>
</div> </div>
@ -58,7 +58,7 @@
<div class="form-row"> <div class="form-row">
<label class="standard-label"><%= t 'user.account.public editing.heading' %></label> <label class="standard-label"><%= t 'user.account.public editing.heading' %></label>
<span class="form-help deemphasize"> <span class="form-help deemphasize">
<% if @user.data_public? %> <% if current_user.data_public? %>
<%= t 'user.account.public editing.enabled' %> <%= t 'user.account.public editing.enabled' %>
(<a href="<%= t 'user.account.public editing.enabled link' %>" target="_new"><%= t 'user.account.public editing.enabled link text' %></a>) (<a href="<%= t 'user.account.public editing.enabled link' %>" target="_new"><%= t 'user.account.public editing.enabled link text' %></a>)
<% else %> <% else %>
@ -71,10 +71,10 @@
<div class="form-row"> <div class="form-row">
<label class="standard-label"><%= t 'user.account.contributor terms.heading' %></label> <label class="standard-label"><%= t 'user.account.contributor terms.heading' %></label>
<span class="form-help deemphasize"> <span class="form-help deemphasize">
<% if @user.terms_agreed? %> <% if current_user.terms_agreed? %>
<%= t 'user.account.contributor terms.agreed' %> <%= t 'user.account.contributor terms.agreed' %>
(<a href="<%= t 'user.account.contributor terms.link' %>" target="_new"><%= t 'user.account.contributor terms.link text' %></a>) (<a href="<%= t 'user.account.contributor terms.link' %>" target="_new"><%= t 'user.account.contributor terms.link text' %></a>)
<% if @user.consider_pd? %> <% if current_user.consider_pd? %>
<%= t 'user.account.contributor terms.agreed_with_pd' %> <%= t 'user.account.contributor terms.agreed_with_pd' %>
<% end %> <% end %>
<% else %> <% else %>
@ -92,7 +92,7 @@
<fieldset class="form-divider"> <fieldset class="form-divider">
<div class='form-row'> <div class='form-row'>
<label class="standard-label"><%= t 'user.account.profile description' %></label> <label class="standard-label"><%= t 'user.account.profile description' %></label>
<%= richtext_area :user, :description, :cols => 80, :rows => 20 %> <%= richtext_area :user, :description, :object => current_user, :cols => 80, :rows => 20 %>
</div> </div>
<div class="form-row"> <div class="form-row">
@ -102,21 +102,21 @@
<div class='form-row accountImage'> <div class='form-row accountImage'>
<label class="standard-label"><%= t 'user.account.image' %></label> <label class="standard-label"><%= t 'user.account.image' %></label>
<%= user_image @user %> <%= user_image current_user %>
<ul class='form-list accountImage-options'> <ul class='form-list accountImage-options'>
<% if @user.image.file? %> <% if current_user.image.file? %>
<li> <li>
<%= radio_button_tag "image_action", "keep", !@user.image_use_gravatar %> <%= radio_button_tag "image_action", "keep", !current_user.image_use_gravatar %>
<label class='standard-label' for='image_action_keep'><%= t 'user.account.keep image' %></label> <label class='standard-label' for='image_action_keep'><%= t 'user.account.keep image' %></label>
</li> </li>
<% end %> <% end %>
<% if @user.image.file? || @user.image_use_gravatar? %> <% if current_user.image.file? || current_user.image_use_gravatar? %>
<li> <li>
<%= radio_button_tag "image_action", "delete" %> <%= radio_button_tag "image_action", "delete" %>
<label class='standard-label' for='image_action_delete'><%= t 'user.account.delete image' %></label> <label class='standard-label' for='image_action_delete'><%= t 'user.account.delete image' %></label>
</li> </li>
<% end %> <% end %>
<% if @user.image.file? %> <% if current_user.image.file? %>
<li> <li>
<%= radio_button_tag "image_action", "new" %> <%= radio_button_tag "image_action", "new" %>
<label class='standard-label' for='image_action_new'> <label class='standard-label' for='image_action_new'>
@ -136,7 +136,7 @@
</li> </li>
<% end %> <% end %>
<li> <li>
<%= radio_button_tag "image_action", "gravatar", @user.image_use_gravatar %> <%= radio_button_tag "image_action", "gravatar", current_user.image_use_gravatar %>
<label class='standard-label' for='image_action_gravatar'> <label class='standard-label' for='image_action_gravatar'>
<%= t 'user.account.gravatar.gravatar' %> <%= t 'user.account.gravatar.gravatar' %>
<span class='form-help deemphasize'> (<a href="<%= t 'user.account.gravatar.link' %>" target="_new"><%= t 'user.account.gravatar.link text' %></a>)</span> <span class='form-help deemphasize'> (<a href="<%= t 'user.account.gravatar.link' %>" target="_new"><%= t 'user.account.gravatar.link text' %></a>)</span>
@ -149,7 +149,7 @@
<fieldset class="form-divider"> <fieldset class="form-divider">
<div class='form-row location clearfix'> <div class='form-row location clearfix'>
<label class="standard-label"><%= t 'user.account.home location' %></label> <label class="standard-label"><%= t 'user.account.home location' %></label>
<div id="homerow" <% unless @user.home_lat and @user.home_lon %>class="nohome"<%end%> > <div id="homerow" <% unless current_user.home_lat and current_user.home_lon %>class="nohome"<%end%> >
<p class="message form-help deemphasize"><%= t 'user.account.no home location' %></p> <p class="message form-help deemphasize"><%= t 'user.account.no home location' %></p>
<div class='form-column'> <div class='form-column'>
<label class="standard-label secondary"><%= t 'user.account.latitude' %></label> <label class="standard-label secondary"><%= t 'user.account.latitude' %></label>
@ -163,7 +163,7 @@
</div> </div>
<div class="form-row"> <div class="form-row">
<input type="checkbox" name="updatehome" value="1" <% unless @user.home_lat and @user.home_lon %> checked="checked" <% end %> id="updatehome" /> <input type="checkbox" name="updatehome" value="1" <% unless current_user.home_lat and current_user.home_lon %> checked="checked" <% end %> id="updatehome" />
<label class="standard-label" for="updatehome"><%= t 'user.account.update home location on click' %></label> <label class="standard-label" for="updatehome"><%= t 'user.account.update home location on click' %></label>
</div> </div>
<%= content_tag "div", "", :id => "map", :class => "content_map settings_map set_location" %> <%= content_tag "div", "", :id => "map", :class => "content_map settings_map set_location" %>
@ -172,7 +172,7 @@
<%= submit_tag t('user.account.save changes button') %> <%= submit_tag t('user.account.save changes button') %>
<% end %> <% end %>
<% unless @user.data_public? %> <% unless current_user.data_public? %>
<a name="public"></a> <a name="public"></a>
<h2><%= t 'user.account.public editing note.heading' %></h2> <h2><%= t 'user.account.public editing note.heading' %></h2>
<%= raw t 'user.account.public editing note.text' %> <%= raw t 'user.account.public editing note.text' %>

View file

@ -4,7 +4,7 @@ xml.osm("version" => API_VERSION, "generator" => GENERATOR) do
:display_name => @this_user.display_name, :display_name => @this_user.display_name,
:account_created => @this_user.creation_time.xmlschema do :account_created => @this_user.creation_time.xmlschema do
xml.tag! "description", @this_user.description if @this_user.description xml.tag! "description", @this_user.description if @this_user.description
if @user && @user == @this_user if current_user && current_user == @this_user
xml.tag! "contributor-terms", :agreed => @this_user.terms_agreed.present?, xml.tag! "contributor-terms", :agreed => @this_user.terms_agreed.present?,
:pd => @this_user.consider_pd :pd => @this_user.consider_pd
else else
@ -28,7 +28,7 @@ xml.osm("version" => API_VERSION, "generator" => GENERATOR) do
:active => @this_user.blocks_created.active.size :active => @this_user.blocks_created.active.size
end end
end end
if @user && @user == @this_user if current_user && current_user == @this_user
if @this_user.home_lat && @this_user.home_lon if @this_user.home_lat && @this_user.home_lon
xml.tag! "home", :lat => @this_user.home_lat, xml.tag! "home", :lat => @this_user.home_lat,
:lon => @this_user.home_lon, :lon => @this_user.home_lon,

View file

@ -8,7 +8,7 @@
<div class='header-illustration new-user-arm'></div> <div class='header-illustration new-user-arm'></div>
<% end %> <% end %>
<%= form_for :user, :url => { :action => 'create' }, :html => { :class => 'standard-form fillL col6 inner22' } do %> <%= form_for current_user, :url => { :action => 'create' }, :html => { :class => 'standard-form fillL col6 inner22' } do |f| %>
<%= hidden_field_tag('referer', h(@referer)) unless @referer.nil? %> <%= hidden_field_tag('referer', h(@referer)) unless @referer.nil? %>
<fieldset> <fieldset>
@ -16,15 +16,15 @@
<label for="email" class="standard-label"> <label for="email" class="standard-label">
<%= t 'user.new.email address' %> <%= t 'user.new.email address' %>
</label> </label>
<%= email_field(:user, :email, { :tabindex => 1 }) %> <%= f.email_field(:email, { :tabindex => 1 }) %>
<%= error_message_on(:user, :email) %> <%= f.error_message_on(:email) %>
</div> </div>
<div class="form-row"> <div class="form-row">
<label for="email_confirmation" class="standard-label"> <label for="email_confirmation" class="standard-label">
<%= t 'user.new.confirm email address' %> <%= t 'user.new.confirm email address' %>
</label> </label>
<%= email_field(:user, :email_confirmation, { :tabindex => 2 }) %> <%= f.email_field(:email_confirmation, { :tabindex => 2 }) %>
<%= error_message_on(:user, :email_confirmation) %> <%= f.error_message_on(:email_confirmation) %>
</div> </div>
<span class="form-help deemphasize"><%= raw(t 'user.new.not displayed publicly') %></span> <span class="form-help deemphasize"><%= raw(t 'user.new.not displayed publicly') %></span>
</fieldset> </fieldset>
@ -34,8 +34,8 @@
<label for="display_name" class="standard-label"> <label for="display_name" class="standard-label">
<%= t 'user.new.display name' %> <%= t 'user.new.display name' %>
</label> </label>
<%= text_field(:user, :display_name, { :tabindex => 3 }) %> <%= f.text_field(:display_name, { :tabindex => 3 }) %>
<%= error_message_on(:user, :display_name) %> <%= f.error_message_on(:display_name) %>
</div> </div>
<span class="form-help deemphasize"><%= t 'user.new.display name description' %></span> <span class="form-help deemphasize"><%= t 'user.new.display name description' %></span>
</fieldset> </fieldset>
@ -45,9 +45,9 @@
<label for="openid_url" class="standard-label"> <label for="openid_url" class="standard-label">
<%= raw t 'user.new.external auth' %> <%= raw t 'user.new.external auth' %>
</label> </label>
<%= select(:user, :auth_provider, Auth::PROVIDERS, { :default => "", :tabindex => 4 }) %> <%= f.select(:auth_provider, Auth::PROVIDERS, { :default => "", :tabindex => 4 }) %>
<%= text_field(:user, :auth_uid, { :tabindex => 5 }) %> <%= f.text_field(:auth_uid, { :tabindex => 5 }) %>
<%= error_message_on(:user, :auth_uid) %> <%= f.error_message_on(:auth_uid) %>
</div> </div>
<span class="form-help deemphasize"><%= t 'user.new.auth no password' %></span> <span class="form-help deemphasize"><%= t 'user.new.auth no password' %></span>
</fieldset> </fieldset>
@ -57,15 +57,15 @@
<label for='user[pass_crypt]' class="standard-label"> <label for='user[pass_crypt]' class="standard-label">
<%= t 'user.new.password' %> <%= t 'user.new.password' %>
</label> </label>
<%= password_field(:user, :pass_crypt, { :tabindex => 6 }) %> <%= f.password_field(:pass_crypt, { :tabindex => 6 }) %>
<%= error_message_on(:user, :pass_crypt) %> <%= f.error_message_on(:pass_crypt) %>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="standard-label"> <label class="standard-label">
<%= t 'user.new.confirm password' %> <%= t 'user.new.confirm password' %>
</label> </label>
<%= password_field(:user, :pass_crypt_confirmation, { :tabindex => 7 }) %> <%= f.password_field(:pass_crypt_confirmation, { :tabindex => 7 }) %>
<%= error_message_on(:user, :pass_crypt_confirmation) %> <%= f.error_message_on(:pass_crypt_confirmation) %>
</div> </div>
</fieldset> </fieldset>

View file

@ -1,5 +1,5 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t 'user.reset_password.heading', :user => @user.display_name %></h1> <h1><%= t 'user.reset_password.heading', :user => current_user.display_name %></h1>
<% end %> <% end %>
<%= error_messages_for :user %> <%= error_messages_for :user %>

View file

@ -1 +1 @@
<%= @user.email %> <%= current_user.email %>

View file

@ -3,42 +3,42 @@
<%= user_image @this_user %> <%= user_image @this_user %>
<div class='userinformation-inner'> <div class='userinformation-inner'>
<h1><%= @this_user.display_name %><%= role_icons(@this_user) %></h1> <h1><%= @this_user.display_name %><%= role_icons(@this_user) %></h1>
<% if @user and @this_user.id == @user.id %> <% if current_user and @this_user.id == current_user.id %>
<!-- Displaying user's own profile page to themself --> <!-- Displaying user's own profile page to themself -->
<ul class='secondary-actions clearfix'> <ul class='secondary-actions clearfix'>
<li> <li>
<%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %> <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => current_user.display_name %>
<span class='count-number'><%= number_with_delimiter(@user.changesets.size) %></span> <span class='count-number'><%= number_with_delimiter(current_user.changesets.size) %></span>
</li> </li>
<li> <li>
<%= link_to t('user.view.my notes'), :controller => 'notes', :action=> 'mine' %> <%= link_to t('user.view.my notes'), :controller => 'notes', :action=> 'mine' %>
</li> </li>
<li> <li>
<%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %> <%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %>
<span class='count-number'><%= number_with_delimiter(@user.traces.size) %></span> <span class='count-number'><%= number_with_delimiter(current_user.traces.size) %></span>
</li> </li>
<li> <li>
<%= link_to t('user.view.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %> <%= link_to t('user.view.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => current_user.display_name %>
<span class='count-number'><%= number_with_delimiter(@user.diary_entries.size) %></span> <span class='count-number'><%= number_with_delimiter(current_user.diary_entries.size) %></span>
</li> </li>
<li> <li>
<%= link_to t('user.view.my comments' ), :controller => 'diary_entry', :action => 'comments', :display_name => @user.display_name %> <%= link_to t('user.view.my comments' ), :controller => 'diary_entry', :action => 'comments', :display_name => current_user.display_name %>
</li> </li>
<li> <li>
<%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %> <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => current_user.display_name %>
</li> </li>
<% if @user.blocks.exists? %> <% if current_user.blocks.exists? %>
<li> <li>
<%= link_to t('user.view.blocks on me'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @user.display_name %> <%= link_to t('user.view.blocks on me'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => current_user.display_name %>
<span class='count-number'><%= number_with_delimiter(@user.blocks.active.size) %></span> <span class='count-number'><%= number_with_delimiter(current_user.blocks.active.size) %></span>
</li> </li>
<% end %> <% end %>
<% if @user and @user.moderator? and @user.blocks_created.exists? %> <% if current_user and current_user.moderator? and current_user.blocks_created.exists? %>
<li> <li>
<%= link_to t('user.view.blocks by me'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @user.display_name %> <%= link_to t('user.view.blocks by me'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => current_user.display_name %>
<span class='count-number'><%= number_with_delimiter(@user.blocks_created.active.size) %></span> <span class='count-number'><%= number_with_delimiter(current_user.blocks_created.active.size) %></span>
</li> </li>
<% end %> <% end %>
@ -73,9 +73,9 @@
<%= link_to t('user.view.comments'), :controller => 'diary_entry', :action => 'comments', :display_name => @this_user.display_name %> <%= link_to t('user.view.comments'), :controller => 'diary_entry', :action => 'comments', :display_name => @this_user.display_name %>
</li> </li>
<li> <li>
<% if @user and @user.is_friends_with?(@this_user) %> <% if current_user and current_user.is_friends_with?(@this_user) %>
<%= link_to t('user.view.remove as friend'), remove_friend_path(:display_name => @this_user.display_name), :method => :post %> <%= link_to t('user.view.remove as friend'), remove_friend_path(:display_name => @this_user.display_name), :method => :post %>
<% elsif @user %> <% elsif current_user %>
<%= link_to t('user.view.add as friend'), make_friend_path(:display_name => @this_user.display_name), :method => :post %> <%= link_to t('user.view.add as friend'), make_friend_path(:display_name => @this_user.display_name), :method => :post %>
<% else %> <% else %>
<%= link_to t('user.view.add as friend'), make_friend_path(:display_name => @this_user.display_name) %> <%= link_to t('user.view.add as friend'), make_friend_path(:display_name => @this_user.display_name) %>
@ -96,7 +96,7 @@
</li> </li>
<% end %> <% end %>
<% if @user and @user.moderator? %> <% if current_user and current_user.moderator? %>
<li> <li>
<%= link_to t('user.view.create_block'), :controller => 'user_blocks', :action => 'new', :display_name => @this_user.display_name %> <%= link_to t('user.view.create_block'), :controller => 'user_blocks', :action => 'new', :display_name => @this_user.display_name %>
</li> </li>
@ -106,7 +106,7 @@
<% end %> <% end %>
<% if @user and @user.administrator? %> <% if current_user and current_user.administrator? %>
<ul class='secondary-actions clearfix'> <ul class='secondary-actions clearfix'>
<% if ["active", "confirmed"].include? @this_user.status %> <% if ["active", "confirmed"].include? @this_user.status %>
@ -166,7 +166,7 @@
</div> </div>
<% if @user and @user.administrator? -%> <% if current_user and current_user.administrator? -%>
<div class='admin-user-info deemphasize'> <div class='admin-user-info deemphasize'>
<small><b><%= t 'user.view.email address' %></b> <%= @this_user.email %></small> <small><b><%= t 'user.view.email address' %></b> <%= @this_user.email %></small>
<% unless @this_user.creation_ip.nil? -%> <% unless @this_user.creation_ip.nil? -%>
@ -179,10 +179,10 @@
<% end %> <% end %>
<% if @user and @this_user.id == @user.id %> <% if current_user and @this_user.id == current_user.id %>
<% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %> <% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>
<div id="map" class="content_map"> <div id="map" class="content_map">
<p id="no_home_location"><%= raw(t 'user.view.if set location', :settings_link => (link_to t('user.view.settings_link_text'), :controller => 'user', :action => 'account', :display_name => @user.display_name)) %></p> <p id="no_home_location"><%= raw(t 'user.view.if set location', :settings_link => (link_to t('user.view.settings_link_text'), :controller => 'user', :action => 'account', :display_name => current_user.display_name)) %></p>
</div> </div>
<% else %> <% else %>
<% content_for :head do %> <% content_for :head do %>
@ -190,10 +190,10 @@
<% end %> <% end %>
<% <%
user_data = { user_data = {
:lon => @user.home_lon, :lon => current_user.home_lon,
:lat => @user.home_lat, :lat => current_user.home_lat,
:icon => image_path("marker-red.png"), :icon => image_path("marker-red.png"),
:description => render(:partial => "popup", :object => @user, :locals => {:type => "your location"}) :description => render(:partial => "popup", :object => current_user, :locals => {:type => "your location"})
} }
%> %>
<%= content_tag "div", "", :id => "map", :class => "content_map", :data => {:user => user_data} %> <%= content_tag "div", "", :id => "map", :class => "content_map", :data => {:user => user_data} %>

View file

@ -17,7 +17,7 @@
<% end %> <% end %>
</td> </td>
<td class="<%= c1 %>"><%= link_to t('user_block.partial.show'), block %></td> <td class="<%= c1 %>"><%= link_to t('user_block.partial.show'), block %></td>
<td class="<%= c1 %>"><% if @user and @user.id == block.creator_id and block.active? %><%= link_to t('user_block.partial.edit'), edit_user_block_path(block) %><% end %></td> <td class="<%= c1 %>"><% if current_user and current_user.id == block.creator_id and block.active? %><%= link_to t('user_block.partial.edit'), edit_user_block_path(block) %><% end %></td>
<% if show_revoke_link %> <% if show_revoke_link %>
<td class="<%= c1 %>"><% if block.active? %><%= link_to t('user_block.partial.revoke'), :controller => 'user_blocks', :action => 'revoke', :id => block.id %><% end %></td> <td class="<%= c1 %>"><% if block.active? %><%= link_to t('user_block.partial.revoke'), :controller => 'user_blocks', :action => 'revoke', :id => block.id %><% end %></td>
<% end %> <% end %>

View file

@ -4,7 +4,7 @@
<% end %> <% end %>
<% unless @user_blocks.empty? %> <% unless @user_blocks.empty? %>
<%= render :partial => 'blocks', :locals => { :show_revoke_link => (@user and @user.moderator?), :show_user_name => true, :show_creator_name => false } %> <%= render :partial => 'blocks', :locals => { :show_revoke_link => (current_user and current_user.moderator?), :show_user_name => true, :show_creator_name => false } %>
<% else %> <% else %>
<p><%= t "user_block.blocks_by.empty", :name => h(@this_user.display_name) %></p> <p><%= t "user_block.blocks_by.empty", :name => h(@this_user.display_name) %></p>
<% end %> <% end %>

View file

@ -3,7 +3,7 @@
<h1><%= raw(t('user_block.blocks_on.heading', :name => link_to(h(@this_user.display_name), {:controller => 'user', :action => 'view', :display_name => @this_user.display_name}))) %></h1> <h1><%= raw(t('user_block.blocks_on.heading', :name => link_to(h(@this_user.display_name), {:controller => 'user', :action => 'view', :display_name => @this_user.display_name}))) %></h1>
<% end %> <% end %>
<% unless @user_blocks.empty? %> <% unless @user_blocks.empty? %>
<%= render :partial => 'blocks', :locals => { :show_revoke_link => (@user and @user.moderator?), :show_user_name => false, :show_creator_name => true } %> <%= render :partial => 'blocks', :locals => { :show_revoke_link => (current_user and current_user.moderator?), :show_user_name => false, :show_creator_name => true } %>
<% else %> <% else %>
<p><%= t "user_block.blocks_on.empty", :name => h(@this_user.display_name) %></p> <p><%= t "user_block.blocks_on.empty", :name => h(@this_user.display_name) %></p>
<% end %> <% end %>

View file

@ -4,7 +4,7 @@
<% end %> <% end %>
<% unless @user_blocks.empty? %> <% unless @user_blocks.empty? %>
<%= render :partial => 'blocks', :locals => { :show_revoke_link => (@user and @user.moderator?), :show_user_name => true, :show_creator_name => true } %> <%= render :partial => 'blocks', :locals => { :show_revoke_link => (current_user and current_user.moderator?), :show_user_name => true, :show_creator_name => true } %>
<% else %> <% else %>
<p><%= t "user_block.index.empty" %></p> <p><%= t "user_block.index.empty" %></p>
<% end %> <% end %>

View file

@ -12,10 +12,10 @@
{:controller => 'user', :action => 'view', :display_name => @user_block.creator.display_name})) %></h1> {:controller => 'user', :action => 'view', :display_name => @user_block.creator.display_name})) %></h1>
<ul class='secondary-actions clearfix'> <ul class='secondary-actions clearfix'>
<% if @user_block.ends_at > Time.now.getutc %> <% if @user_block.ends_at > Time.now.getutc %>
<% if @user and @user.id == @user_block.creator_id %> <% if current_user and current_user.id == @user_block.creator_id %>
<li><%= link_to t('user_block.show.edit'), edit_user_block_path(@user_block) %></li> <li><%= link_to t('user_block.show.edit'), edit_user_block_path(@user_block) %></li>
<% end %> <% end %>
<% if @user and @user.moderator? %> <% if current_user and current_user.moderator? %>
<li><%= link_to(t('user_block.show.revoke'),{:controller => 'user_blocks', :action => 'revoke', :id => @user_block.id}) %></li> <li><%= link_to(t('user_block.show.revoke'),{:controller => 'user_blocks', :action => 'revoke', :id => @user_block.id}) %></li>
<% end %> <% end %>
<% end %> <% end %>

View file

@ -1,20 +1,6 @@
sotmasia2016: sotm2017:
id: sotmasia2016 id: sotm2017
alt: State of the Map Asia 2016 alt: State of the Map 2017
link: http://stateofthemap.asia/ link: http://2017.stateofthemap.org/
img: banners/sotmasia-2016.jpg img: banners/banner-sotm-2017.png
enddate: 2016-oct-01 enddate: 2017-aug-27
donate2016:
id: donate2016
alt: OpenStreetMap Funding Drive 2016
link: https://donate.openstreetmap.org/
img: banners/donate-2016.jpg
enddate: 2016-oct-31
sotmlatam2016:
id: sotmlatam2016
alt: State of the Map Latam 2016
link: http://state.osmlatam.org/
img: banners/sotmlatam-2016.jpg
enddate: 2016-nov-25

View file

@ -50,9 +50,8 @@ defaults: &defaults
#messages_domain: "messages.openstreetmap.org" #messages_domain: "messages.openstreetmap.org"
# Geonames authentication details # Geonames authentication details
#geonames_username: "" #geonames_username: ""
# Quova authentication details # GeoIP database
#quova_username: "" #geoip_database: ""
#quova_password: ""
# Users to show as being nearby # Users to show as being nearby
nearby_users: 30 nearby_users: 30
# Max radius, in km, for nearby users # Max radius, in km, for nearby users

View file

@ -406,7 +406,7 @@ class ApiControllerTest < ActionController::TestCase
end end
def test_permissions_basic_auth def test_permissions_basic_auth
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
get :permissions get :permissions
assert_response :success assert_response :success
assert_select "osm > permissions", :count => 1 do assert_select "osm > permissions", :count => 1 do

View file

@ -1321,7 +1321,7 @@ EOF
node = create(:node) node = create(:node)
## First try with a non-public user, which should get a forbidden ## First try with a non-public user, which should get a forbidden
basic_authorization(create(:user, :data_public => false).email, "test") basic_authorization create(:user, :data_public => false).email, "test"
# create a temporary changeset # create a temporary changeset
content "<osm><changeset>" + content "<osm><changeset>" +
@ -1331,7 +1331,7 @@ EOF
assert_response :forbidden assert_response :forbidden
## Now try with a normal user ## Now try with a normal user
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# create a temporary changeset # create a temporary changeset
content "<osm><changeset>" + content "<osm><changeset>" +
@ -1377,7 +1377,7 @@ EOF
# #
# NOTE: the error turned out to be something else completely! # NOTE: the error turned out to be something else completely!
def test_josm_upload def test_josm_upload
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# create a temporary changeset # create a temporary changeset
content "<osm><changeset>" + content "<osm><changeset>" +
@ -1439,7 +1439,7 @@ OSMFILE
node = create(:node) node = create(:node)
node2 = create(:node) node2 = create(:node)
way = create(:way) way = create(:way)
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# create a temporary changeset # create a temporary changeset
content "<osm><changeset>" + content "<osm><changeset>" +
@ -2147,7 +2147,7 @@ EOF
deleted_user = create(:user, :deleted) deleted_user = create(:user, :deleted)
private_user_closed_changeset = create(:changeset, :closed, :user => private_user) private_user_closed_changeset = create(:changeset, :closed, :user => private_user)
basic_authorization(user.email, "test") basic_authorization user.email, "test"
assert_difference "ChangesetComment.count", 1 do assert_difference "ChangesetComment.count", 1 do
assert_no_difference "ActionMailer::Base.deliveries.size" do assert_no_difference "ActionMailer::Base.deliveries.size" do
@ -2176,7 +2176,7 @@ EOF
ActionMailer::Base.deliveries.clear ActionMailer::Base.deliveries.clear
basic_authorization(user2.email, "test") basic_authorization user2.email, "test"
assert_difference "ChangesetComment.count", 1 do assert_difference "ChangesetComment.count", 1 do
assert_difference "ActionMailer::Base.deliveries.size", 2 do assert_difference "ActionMailer::Base.deliveries.size", 2 do
@ -2205,7 +2205,7 @@ EOF
post :comment, :params => { :id => create(:changeset, :closed).id, :text => "This is a comment" } post :comment, :params => { :id => create(:changeset, :closed).id, :text => "This is a comment" }
assert_response :unauthorized assert_response :unauthorized
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# bad changeset id # bad changeset id
assert_no_difference "ChangesetComment.count" do assert_no_difference "ChangesetComment.count" do
@ -2235,7 +2235,7 @@ EOF
## ##
# test subscribe success # test subscribe success
def test_subscribe_success def test_subscribe_success
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
changeset = create(:changeset, :closed) changeset = create(:changeset, :closed)
assert_difference "changeset.subscribers.count", 1 do assert_difference "changeset.subscribers.count", 1 do
@ -2256,7 +2256,7 @@ EOF
end end
assert_response :unauthorized assert_response :unauthorized
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# bad changeset id # bad changeset id
assert_no_difference "changeset.subscribers.count" do assert_no_difference "changeset.subscribers.count" do
@ -2284,7 +2284,7 @@ EOF
# test unsubscribe success # test unsubscribe success
def test_unsubscribe_success def test_unsubscribe_success
user = create(:user) user = create(:user)
basic_authorization(user.email, "test") basic_authorization user.email, "test"
changeset = create(:changeset, :closed) changeset = create(:changeset, :closed)
changeset.subscribers.push(user) changeset.subscribers.push(user)
@ -2304,7 +2304,7 @@ EOF
end end
assert_response :unauthorized assert_response :unauthorized
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# bad changeset id # bad changeset id
assert_no_difference "changeset.subscribers.count" do assert_no_difference "changeset.subscribers.count" do
@ -2338,14 +2338,14 @@ EOF
assert_response :unauthorized assert_response :unauthorized
assert_equal true, comment.reload.visible assert_equal true, comment.reload.visible
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# not a moderator # not a moderator
post :hide_comment, :params => { :id => comment.id } post :hide_comment, :params => { :id => comment.id }
assert_response :forbidden assert_response :forbidden
assert_equal true, comment.reload.visible assert_equal true, comment.reload.visible
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
# bad comment id # bad comment id
post :hide_comment, :params => { :id => 999111 } post :hide_comment, :params => { :id => 999111 }
@ -2359,7 +2359,7 @@ EOF
comment = create(:changeset_comment) comment = create(:changeset_comment)
assert_equal true, comment.visible assert_equal true, comment.visible
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
post :hide_comment, :params => { :id => comment.id } post :hide_comment, :params => { :id => comment.id }
assert_response :success assert_response :success
@ -2377,14 +2377,14 @@ EOF
assert_response :unauthorized assert_response :unauthorized
assert_equal false, comment.reload.visible assert_equal false, comment.reload.visible
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# not a moderator # not a moderator
post :unhide_comment, :params => { :id => comment.id } post :unhide_comment, :params => { :id => comment.id }
assert_response :forbidden assert_response :forbidden
assert_equal false, comment.reload.visible assert_equal false, comment.reload.visible
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
# bad comment id # bad comment id
post :unhide_comment, :params => { :id => 999111 } post :unhide_comment, :params => { :id => 999111 }
@ -2398,7 +2398,7 @@ EOF
comment = create(:changeset_comment, :visible => false) comment = create(:changeset_comment, :visible => false)
assert_equal false, comment.visible assert_equal false, comment.visible
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
post :unhide_comment, :params => { :id => comment.id } post :unhide_comment, :params => { :id => comment.id }
assert_response :success assert_response :success

View file

@ -46,7 +46,7 @@ class NodeControllerTest < ActionController::TestCase
assert_response :unauthorized, "node upload did not return unauthorized status" assert_response :unauthorized, "node upload did not return unauthorized status"
## Now try with the user which doesn't have their data public ## Now try with the user which doesn't have their data public
basic_authorization(private_user.email, "test") basic_authorization private_user.email, "test"
# create a minimal xml file # create a minimal xml file
content("<osm><node lat='#{lat}' lon='#{lon}' changeset='#{private_changeset.id}'/></osm>") content("<osm><node lat='#{lat}' lon='#{lon}' changeset='#{private_changeset.id}'/></osm>")
@ -57,7 +57,7 @@ class NodeControllerTest < ActionController::TestCase
assert_require_public_data "node create did not return forbidden status" assert_require_public_data "node create did not return forbidden status"
## Now try with the user that has the public data ## Now try with the user that has the public data
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# create a minimal xml file # create a minimal xml file
content("<osm><node lat='#{lat}' lon='#{lon}' changeset='#{changeset.id}'/></osm>") content("<osm><node lat='#{lat}' lon='#{lon}' changeset='#{changeset.id}'/></osm>")
@ -83,7 +83,7 @@ class NodeControllerTest < ActionController::TestCase
user = create(:user) user = create(:user)
changeset = create(:changeset, :user => user) changeset = create(:changeset, :user => user)
basic_authorization(user.email, "test") basic_authorization user.email, "test"
lat = 3.434 lat = 3.434
lon = 3.23 lon = 3.23
@ -160,7 +160,7 @@ class NodeControllerTest < ActionController::TestCase
assert_response :unauthorized assert_response :unauthorized
## now set auth for the non-data public user ## now set auth for the non-data public user
basic_authorization(private_user.email, "test") basic_authorization private_user.email, "test"
# try to delete with an invalid (closed) changeset # try to delete with an invalid (closed) changeset
content update_changeset(private_node.to_xml, private_user_closed_changeset.id) content update_changeset(private_node.to_xml, private_user_closed_changeset.id)
@ -208,7 +208,7 @@ class NodeControllerTest < ActionController::TestCase
changeset = create(:changeset, :user => user) changeset = create(:changeset, :user => user)
closed_changeset = create(:changeset, :closed, :user => user) closed_changeset = create(:changeset, :closed, :user => user)
node = create(:node, :changeset => changeset) node = create(:node, :changeset => changeset)
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# try to delete with an invalid (closed) changeset # try to delete with an invalid (closed) changeset
content update_changeset(node.to_xml, closed_changeset.id) content update_changeset(node.to_xml, closed_changeset.id)
@ -295,7 +295,7 @@ class NodeControllerTest < ActionController::TestCase
## Second test with the private user ## Second test with the private user
# setup auth # setup auth
basic_authorization(private_user.email, "test") basic_authorization private_user.email, "test"
## trying to break changesets ## trying to break changesets
@ -347,7 +347,7 @@ class NodeControllerTest < ActionController::TestCase
assert_response :forbidden assert_response :forbidden
# setup auth # setup auth
basic_authorization(user.email, "test") basic_authorization user.email, "test"
## trying to break changesets ## trying to break changesets
@ -465,7 +465,7 @@ class NodeControllerTest < ActionController::TestCase
existing_tag = create(:node_tag) existing_tag = create(:node_tag)
assert_equal true, existing_tag.node.changeset.user.data_public assert_equal true, existing_tag.node.changeset.user.data_public
# setup auth # setup auth
basic_authorization(existing_tag.node.changeset.user.email, "test") basic_authorization existing_tag.node.changeset.user.email, "test"
# add an identical tag to the node # add an identical tag to the node
tag_xml = XML::Node.new("tag") tag_xml = XML::Node.new("tag")
@ -492,7 +492,7 @@ class NodeControllerTest < ActionController::TestCase
changeset = create(:changeset, :user => user) changeset = create(:changeset, :user => user)
## First try with the non-data public user ## First try with the non-data public user
basic_authorization(private_user.email, "test") basic_authorization private_user.email, "test"
# try and put something into a string that the API might # try and put something into a string that the API might
# use unquoted and therefore allow code injection... # use unquoted and therefore allow code injection...
@ -503,7 +503,7 @@ class NodeControllerTest < ActionController::TestCase
assert_require_public_data "Shouldn't be able to create with non-public user" assert_require_public_data "Shouldn't be able to create with non-public user"
## Then try with the public data user ## Then try with the public data user
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# try and put something into a string that the API might # try and put something into a string that the API might
# use unquoted and therefore allow code injection... # use unquoted and therefore allow code injection...

View file

@ -303,7 +303,7 @@ class NotesControllerTest < ActionController::TestCase
ActionMailer::Base.deliveries.clear ActionMailer::Base.deliveries.clear
basic_authorization(third_user.email, "test") basic_authorization third_user.email, "test"
assert_difference "NoteComment.count", 1 do assert_difference "NoteComment.count", 1 do
assert_difference "ActionMailer::Base.deliveries.size", 2 do assert_difference "ActionMailer::Base.deliveries.size", 2 do
@ -397,7 +397,7 @@ class NotesControllerTest < ActionController::TestCase
post :close, :params => { :id => open_note_with_comment.id, :text => "This is a close comment", :format => "json" } post :close, :params => { :id => open_note_with_comment.id, :text => "This is a close comment", :format => "json" }
assert_response :unauthorized assert_response :unauthorized
basic_authorization(user.email, "test") basic_authorization user.email, "test"
post :close, :params => { :id => open_note_with_comment.id, :text => "This is a close comment", :format => "json" } post :close, :params => { :id => open_note_with_comment.id, :text => "This is a close comment", :format => "json" }
assert_response :success assert_response :success
@ -428,7 +428,7 @@ class NotesControllerTest < ActionController::TestCase
post :close post :close
assert_response :unauthorized assert_response :unauthorized
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
post :close post :close
assert_response :bad_request assert_response :bad_request
@ -454,7 +454,7 @@ class NotesControllerTest < ActionController::TestCase
post :reopen, :params => { :id => closed_note_with_comment.id, :text => "This is a reopen comment", :format => "json" } post :reopen, :params => { :id => closed_note_with_comment.id, :text => "This is a reopen comment", :format => "json" }
assert_response :unauthorized assert_response :unauthorized
basic_authorization(user.email, "test") basic_authorization user.email, "test"
post :reopen, :params => { :id => closed_note_with_comment.id, :text => "This is a reopen comment", :format => "json" } post :reopen, :params => { :id => closed_note_with_comment.id, :text => "This is a reopen comment", :format => "json" }
assert_response :success assert_response :success
@ -487,7 +487,7 @@ class NotesControllerTest < ActionController::TestCase
post :reopen, :params => { :id => hidden_note_with_comment.id } post :reopen, :params => { :id => hidden_note_with_comment.id }
assert_response :unauthorized assert_response :unauthorized
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
post :reopen, :params => { :id => 12345 } post :reopen, :params => { :id => 12345 }
assert_response :not_found assert_response :not_found
@ -606,12 +606,12 @@ class NotesControllerTest < ActionController::TestCase
delete :destroy, :params => { :id => open_note_with_comment.id, :text => "This is a hide comment", :format => "json" } delete :destroy, :params => { :id => open_note_with_comment.id, :text => "This is a hide comment", :format => "json" }
assert_response :unauthorized assert_response :unauthorized
basic_authorization(user.email, "test") basic_authorization user.email, "test"
delete :destroy, :params => { :id => open_note_with_comment.id, :text => "This is a hide comment", :format => "json" } delete :destroy, :params => { :id => open_note_with_comment.id, :text => "This is a hide comment", :format => "json" }
assert_response :forbidden assert_response :forbidden
basic_authorization(moderator_user.email, "test") basic_authorization moderator_user.email, "test"
delete :destroy, :params => { :id => open_note_with_comment.id, :text => "This is a hide comment", :format => "json" } delete :destroy, :params => { :id => open_note_with_comment.id, :text => "This is a hide comment", :format => "json" }
assert_response :success assert_response :success
@ -636,12 +636,12 @@ class NotesControllerTest < ActionController::TestCase
delete :destroy, :params => { :id => 12345, :format => "json" } delete :destroy, :params => { :id => 12345, :format => "json" }
assert_response :unauthorized assert_response :unauthorized
basic_authorization(user.email, "test") basic_authorization user.email, "test"
delete :destroy, :params => { :id => 12345, :format => "json" } delete :destroy, :params => { :id => 12345, :format => "json" }
assert_response :forbidden assert_response :forbidden
basic_authorization(moderator_user.email, "test") basic_authorization moderator_user.email, "test"
delete :destroy, :params => { :id => 12345, :format => "json" } delete :destroy, :params => { :id => 12345, :format => "json" }
assert_response :not_found assert_response :not_found

View file

@ -40,7 +40,7 @@ class OldNodeControllerTest < ActionController::TestCase
propagate_tags(node, node.old_nodes.last) propagate_tags(node, node.old_nodes.last)
## First try this with a non-public user ## First try this with a non-public user
basic_authorization(private_user.email, "test") basic_authorization private_user.email, "test"
# setup a simple XML node # setup a simple XML node
xml_doc = private_node.to_xml xml_doc = private_node.to_xml
@ -89,7 +89,7 @@ class OldNodeControllerTest < ActionController::TestCase
# probably should check that they didn't get written to the database # probably should check that they didn't get written to the database
## Now do it with the public user ## Now do it with the public user
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# setup a simple XML node # setup a simple XML node
@ -206,7 +206,7 @@ class OldNodeControllerTest < ActionController::TestCase
# test the redaction of an old version of a node, while being # test the redaction of an old version of a node, while being
# authorised as a normal user. # authorised as a normal user.
def test_redact_node_normal_user def test_redact_node_normal_user
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
node = create(:node, :with_history, :version => 4) node = create(:node, :with_history, :version => 4)
node_v3 = node.old_nodes.find_by(:version => 3) node_v3 = node.old_nodes.find_by(:version => 3)
@ -220,7 +220,7 @@ class OldNodeControllerTest < ActionController::TestCase
# test that, even as moderator, the current version of a node # test that, even as moderator, the current version of a node
# can't be redacted. # can't be redacted.
def test_redact_node_current_version def test_redact_node_current_version
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
node = create(:node, :with_history, :version => 4) node = create(:node, :with_history, :version => 4)
node_v4 = node.old_nodes.find_by(:version => 4) node_v4 = node.old_nodes.find_by(:version => 4)
@ -242,7 +242,7 @@ class OldNodeControllerTest < ActionController::TestCase
assert_response :forbidden, "Redacted node shouldn't be visible via the version API." assert_response :forbidden, "Redacted node shouldn't be visible via the version API."
# not even to a logged-in user # not even to a logged-in user
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
get :version, :params => { :id => node_v1.node_id, :version => node_v1.version } get :version, :params => { :id => node_v1.node_id, :version => node_v1.version }
assert_response :forbidden, "Redacted node shouldn't be visible via the version API, even when logged in." assert_response :forbidden, "Redacted node shouldn't be visible via the version API, even when logged in."
end end
@ -259,7 +259,7 @@ class OldNodeControllerTest < ActionController::TestCase
assert_select "osm node[id='#{node_v1.node_id}'][version='#{node_v1.version}']", 0, "redacted node #{node_v1.node_id} version #{node_v1.version} shouldn't be present in the history." assert_select "osm node[id='#{node_v1.node_id}'][version='#{node_v1.version}']", 0, "redacted node #{node_v1.node_id} version #{node_v1.version} shouldn't be present in the history."
# not even to a logged-in user # not even to a logged-in user
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
get :history, :params => { :id => node_v1.node_id } get :history, :params => { :id => node_v1.node_id }
assert_response :success, "Redaction shouldn't have stopped history working." assert_response :success, "Redaction shouldn't have stopped history working."
assert_select "osm node[id='#{node_v1.node_id}'][version='#{node_v1.version}']", 0, "redacted node #{node_v1.node_id} version #{node_v1.version} shouldn't be present in the history, even when logged in." assert_select "osm node[id='#{node_v1.node_id}'][version='#{node_v1.version}']", 0, "redacted node #{node_v1.node_id} version #{node_v1.version} shouldn't be present in the history, even when logged in."
@ -271,7 +271,7 @@ class OldNodeControllerTest < ActionController::TestCase
def test_redact_node_moderator def test_redact_node_moderator
node = create(:node, :with_history, :version => 4) node = create(:node, :with_history, :version => 4)
node_v3 = node.old_nodes.find_by(:version => 3) node_v3 = node.old_nodes.find_by(:version => 3)
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
do_redact_node(node_v3, create(:redaction)) do_redact_node(node_v3, create(:redaction))
assert_response :success, "should be OK to redact old version as moderator." assert_response :success, "should be OK to redact old version as moderator."
@ -297,13 +297,13 @@ class OldNodeControllerTest < ActionController::TestCase
def test_redact_node_is_redacted def test_redact_node_is_redacted
node = create(:node, :with_history, :version => 4) node = create(:node, :with_history, :version => 4)
node_v3 = node.old_nodes.find_by(:version => 3) node_v3 = node.old_nodes.find_by(:version => 3)
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
do_redact_node(node_v3, create(:redaction)) do_redact_node(node_v3, create(:redaction))
assert_response :success, "should be OK to redact old version as moderator." assert_response :success, "should be OK to redact old version as moderator."
# re-auth as non-moderator # re-auth as non-moderator
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# check can't see the redacted data # check can't see the redacted data
get :version, :params => { :id => node_v3.node_id, :version => node_v3.version } get :version, :params => { :id => node_v3.node_id, :version => node_v3.version }
@ -336,7 +336,7 @@ class OldNodeControllerTest < ActionController::TestCase
node_v1 = node.old_nodes.find_by(:version => 1) node_v1 = node.old_nodes.find_by(:version => 1)
node_v1.redact!(create(:redaction)) node_v1.redact!(create(:redaction))
basic_authorization(user.email, "test") basic_authorization user.email, "test"
post :redact, :params => { :id => node_v1.node_id, :version => node_v1.version } post :redact, :params => { :id => node_v1.node_id, :version => node_v1.version }
assert_response :forbidden, "should need to be moderator to unredact." assert_response :forbidden, "should need to be moderator to unredact."
@ -351,7 +351,7 @@ class OldNodeControllerTest < ActionController::TestCase
node_v1 = node.old_nodes.find_by(:version => 1) node_v1 = node.old_nodes.find_by(:version => 1)
node_v1.redact!(create(:redaction)) node_v1.redact!(create(:redaction))
basic_authorization(moderator_user.email, "test") basic_authorization moderator_user.email, "test"
post :redact, :params => { :id => node_v1.node_id, :version => node_v1.version } post :redact, :params => { :id => node_v1.node_id, :version => node_v1.version }
assert_response :success, "should be OK to unredact old version as moderator." assert_response :success, "should be OK to unredact old version as moderator."
@ -366,7 +366,7 @@ class OldNodeControllerTest < ActionController::TestCase
assert_response :success, "Unredaction shouldn't have stopped history working." assert_response :success, "Unredaction shouldn't have stopped history working."
assert_select "osm node[id='#{node_v1.node_id}'][version='#{node_v1.version}']", 1, "node #{node_v1.node_id} version #{node_v1.version} should now be present in the history for moderators without passing flag." assert_select "osm node[id='#{node_v1.node_id}'][version='#{node_v1.version}']", 1, "node #{node_v1.node_id} version #{node_v1.version} should now be present in the history for moderators without passing flag."
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# check normal user can now see the redacted data # check normal user can now see the redacted data
get :version, :params => { :id => node_v1.node_id, :version => node_v1.version } get :version, :params => { :id => node_v1.node_id, :version => node_v1.version }

View file

@ -50,7 +50,7 @@ class OldRelationControllerTest < ActionController::TestCase
relation = create(:relation, :with_history, :version => 4) relation = create(:relation, :with_history, :version => 4)
relation_v3 = relation.old_relations.find_by(:version => 3) relation_v3 = relation.old_relations.find_by(:version => 3)
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
do_redact_relation(relation_v3, create(:redaction)) do_redact_relation(relation_v3, create(:redaction))
assert_response :forbidden, "should need to be moderator to redact." assert_response :forbidden, "should need to be moderator to redact."
@ -63,7 +63,7 @@ class OldRelationControllerTest < ActionController::TestCase
relation = create(:relation, :with_history, :version => 4) relation = create(:relation, :with_history, :version => 4)
relation_latest = relation.old_relations.last relation_latest = relation.old_relations.last
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
do_redact_relation(relation_latest, create(:redaction)) do_redact_relation(relation_latest, create(:redaction))
assert_response :bad_request, "shouldn't be OK to redact current version as moderator." assert_response :bad_request, "shouldn't be OK to redact current version as moderator."
@ -81,7 +81,7 @@ class OldRelationControllerTest < ActionController::TestCase
assert_response :forbidden, "Redacted relation shouldn't be visible via the version API." assert_response :forbidden, "Redacted relation shouldn't be visible via the version API."
# not even to a logged-in user # not even to a logged-in user
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
get :version, :params => { :id => relation_v1.relation_id, :version => relation_v1.version } get :version, :params => { :id => relation_v1.relation_id, :version => relation_v1.version }
assert_response :forbidden, "Redacted relation shouldn't be visible via the version API, even when logged in." assert_response :forbidden, "Redacted relation shouldn't be visible via the version API, even when logged in."
end end
@ -98,7 +98,7 @@ class OldRelationControllerTest < ActionController::TestCase
assert_select "osm relation[id='#{relation_v1.relation_id}'][version='#{relation_v1.version}']", 0, "redacted relation #{relation_v1.relation_id} version #{relation_v1.version} shouldn't be present in the history." assert_select "osm relation[id='#{relation_v1.relation_id}'][version='#{relation_v1.version}']", 0, "redacted relation #{relation_v1.relation_id} version #{relation_v1.version} shouldn't be present in the history."
# not even to a logged-in user # not even to a logged-in user
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
get :version, :params => { :id => relation_v1.relation_id, :version => relation_v1.version } get :version, :params => { :id => relation_v1.relation_id, :version => relation_v1.version }
get :history, :params => { :id => relation_v1.relation_id } get :history, :params => { :id => relation_v1.relation_id }
assert_response :success, "Redaction shouldn't have stopped history working." assert_response :success, "Redaction shouldn't have stopped history working."
@ -112,7 +112,7 @@ class OldRelationControllerTest < ActionController::TestCase
relation = create(:relation, :with_history, :version => 4) relation = create(:relation, :with_history, :version => 4)
relation_v3 = relation.old_relations.find_by(:version => 3) relation_v3 = relation.old_relations.find_by(:version => 3)
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
do_redact_relation(relation_v3, create(:redaction)) do_redact_relation(relation_v3, create(:redaction))
assert_response :success, "should be OK to redact old version as moderator." assert_response :success, "should be OK to redact old version as moderator."
@ -139,13 +139,13 @@ class OldRelationControllerTest < ActionController::TestCase
relation = create(:relation, :with_history, :version => 4) relation = create(:relation, :with_history, :version => 4)
relation_v3 = relation.old_relations.find_by(:version => 3) relation_v3 = relation.old_relations.find_by(:version => 3)
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
do_redact_relation(relation_v3, create(:redaction)) do_redact_relation(relation_v3, create(:redaction))
assert_response :success, "should be OK to redact old version as moderator." assert_response :success, "should be OK to redact old version as moderator."
# re-auth as non-moderator # re-auth as non-moderator
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# check can't see the redacted data # check can't see the redacted data
get :version, :params => { :id => relation_v3.relation_id, :version => relation_v3.version } get :version, :params => { :id => relation_v3.relation_id, :version => relation_v3.version }
@ -177,7 +177,7 @@ class OldRelationControllerTest < ActionController::TestCase
relation_v1 = relation.old_relations.find_by(:version => 1) relation_v1 = relation.old_relations.find_by(:version => 1)
relation_v1.redact!(create(:redaction)) relation_v1.redact!(create(:redaction))
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
post :redact, :params => { :id => relation_v1.relation_id, :version => relation_v1.version } post :redact, :params => { :id => relation_v1.relation_id, :version => relation_v1.version }
assert_response :forbidden, "should need to be moderator to unredact." assert_response :forbidden, "should need to be moderator to unredact."
@ -191,7 +191,7 @@ class OldRelationControllerTest < ActionController::TestCase
relation_v1 = relation.old_relations.find_by(:version => 1) relation_v1 = relation.old_relations.find_by(:version => 1)
relation_v1.redact!(create(:redaction)) relation_v1.redact!(create(:redaction))
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
post :redact, :params => { :id => relation_v1.relation_id, :version => relation_v1.version } post :redact, :params => { :id => relation_v1.relation_id, :version => relation_v1.version }
assert_response :success, "should be OK to unredact old version as moderator." assert_response :success, "should be OK to unredact old version as moderator."
@ -206,7 +206,7 @@ class OldRelationControllerTest < ActionController::TestCase
assert_response :success, "Redaction shouldn't have stopped history working." assert_response :success, "Redaction shouldn't have stopped history working."
assert_select "osm relation[id='#{relation_v1.relation_id}'][version='#{relation_v1.version}']", 1, "relation #{relation_v1.relation_id} version #{relation_v1.version} should still be present in the history for moderators." assert_select "osm relation[id='#{relation_v1.relation_id}'][version='#{relation_v1.version}']", 1, "relation #{relation_v1.relation_id} version #{relation_v1.version} should still be present in the history for moderators."
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# check normal user can now see the redacted data # check normal user can now see the redacted data
get :version, :params => { :id => relation_v1.relation_id, :version => relation_v1.version } get :version, :params => { :id => relation_v1.relation_id, :version => relation_v1.version }

View file

@ -90,7 +90,7 @@ class OldWayControllerTest < ActionController::TestCase
# test the redaction of an old version of a way, while being # test the redaction of an old version of a way, while being
# authorised as a normal user. # authorised as a normal user.
def test_redact_way_normal_user def test_redact_way_normal_user
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
way = create(:way, :with_history, :version => 4) way = create(:way, :with_history, :version => 4)
way_v3 = way.old_ways.find_by(:version => 3) way_v3 = way.old_ways.find_by(:version => 3)
@ -102,7 +102,7 @@ class OldWayControllerTest < ActionController::TestCase
# test that, even as moderator, the current version of a way # test that, even as moderator, the current version of a way
# can't be redacted. # can't be redacted.
def test_redact_way_current_version def test_redact_way_current_version
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
way = create(:way, :with_history, :version => 4) way = create(:way, :with_history, :version => 4)
way_latest = way.old_ways.last way_latest = way.old_ways.last
@ -122,7 +122,7 @@ class OldWayControllerTest < ActionController::TestCase
assert_response :forbidden, "Redacted way shouldn't be visible via the version API." assert_response :forbidden, "Redacted way shouldn't be visible via the version API."
# not even to a logged-in user # not even to a logged-in user
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
get :version, :params => { :id => way_v1.way_id, :version => way_v1.version } get :version, :params => { :id => way_v1.way_id, :version => way_v1.version }
assert_response :forbidden, "Redacted way shouldn't be visible via the version API, even when logged in." assert_response :forbidden, "Redacted way shouldn't be visible via the version API, even when logged in."
end end
@ -139,7 +139,7 @@ class OldWayControllerTest < ActionController::TestCase
assert_select "osm way[id='#{way_v1.way_id}'][version='#{way_v1.version}']", 0, "redacted way #{way_v1.way_id} version #{way_v1.version} shouldn't be present in the history." assert_select "osm way[id='#{way_v1.way_id}'][version='#{way_v1.version}']", 0, "redacted way #{way_v1.way_id} version #{way_v1.version} shouldn't be present in the history."
# not even to a logged-in user # not even to a logged-in user
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
get :version, :params => { :id => way_v1.way_id, :version => way_v1.version } get :version, :params => { :id => way_v1.way_id, :version => way_v1.version }
get :history, :params => { :id => way_v1.way_id } get :history, :params => { :id => way_v1.way_id }
assert_response :success, "Redaction shouldn't have stopped history working." assert_response :success, "Redaction shouldn't have stopped history working."
@ -152,7 +152,7 @@ class OldWayControllerTest < ActionController::TestCase
def test_redact_way_moderator def test_redact_way_moderator
way = create(:way, :with_history, :version => 4) way = create(:way, :with_history, :version => 4)
way_v3 = way.old_ways.find_by(:version => 3) way_v3 = way.old_ways.find_by(:version => 3)
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
do_redact_way(way_v3, create(:redaction)) do_redact_way(way_v3, create(:redaction))
assert_response :success, "should be OK to redact old version as moderator." assert_response :success, "should be OK to redact old version as moderator."
@ -178,13 +178,13 @@ class OldWayControllerTest < ActionController::TestCase
def test_redact_way_is_redacted def test_redact_way_is_redacted
way = create(:way, :with_history, :version => 4) way = create(:way, :with_history, :version => 4)
way_v3 = way.old_ways.find_by(:version => 3) way_v3 = way.old_ways.find_by(:version => 3)
basic_authorization(create(:moderator_user).email, "test") basic_authorization create(:moderator_user).email, "test"
do_redact_way(way_v3, create(:redaction)) do_redact_way(way_v3, create(:redaction))
assert_response :success, "should be OK to redact old version as moderator." assert_response :success, "should be OK to redact old version as moderator."
# re-auth as non-moderator # re-auth as non-moderator
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# check can't see the redacted data # check can't see the redacted data
get :version, :params => { :id => way_v3.way_id, :version => way_v3.version } get :version, :params => { :id => way_v3.way_id, :version => way_v3.version }
@ -216,7 +216,7 @@ class OldWayControllerTest < ActionController::TestCase
way_v1 = way.old_ways.find_by(:version => 1) way_v1 = way.old_ways.find_by(:version => 1)
way_v1.redact!(create(:redaction)) way_v1.redact!(create(:redaction))
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
post :redact, :params => { :id => way_v1.way_id, :version => way_v1.version } post :redact, :params => { :id => way_v1.way_id, :version => way_v1.version }
assert_response :forbidden, "should need to be moderator to unredact." assert_response :forbidden, "should need to be moderator to unredact."
@ -231,7 +231,7 @@ class OldWayControllerTest < ActionController::TestCase
way_v1 = way.old_ways.find_by(:version => 1) way_v1 = way.old_ways.find_by(:version => 1)
way_v1.redact!(create(:redaction)) way_v1.redact!(create(:redaction))
basic_authorization(moderator_user.email, "test") basic_authorization moderator_user.email, "test"
post :redact, :params => { :id => way_v1.way_id, :version => way_v1.version } post :redact, :params => { :id => way_v1.way_id, :version => way_v1.version }
assert_response :success, "should be OK to unredact old version as moderator." assert_response :success, "should be OK to unredact old version as moderator."
@ -246,7 +246,7 @@ class OldWayControllerTest < ActionController::TestCase
assert_response :success, "Unredaction shouldn't have stopped history working." assert_response :success, "Unredaction shouldn't have stopped history working."
assert_select "osm way[id='#{way_v1.way_id}'][version='#{way_v1.version}']", 1, "way #{way_v1.way_id} version #{way_v1.version} should still be present in the history for moderators." assert_select "osm way[id='#{way_v1.way_id}'][version='#{way_v1.version}']", 1, "way #{way_v1.way_id} version #{way_v1.version} should still be present in the history for moderators."
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# check normal user can now see the unredacted data # check normal user can now see the unredacted data
get :version, :params => { :id => way_v1.way_id, :version => way_v1.version } get :version, :params => { :id => way_v1.way_id, :version => way_v1.version }

View file

@ -514,7 +514,7 @@ class RelationControllerTest < ActionController::TestCase
assert_response :unauthorized assert_response :unauthorized
## Then try with the private user, to make sure that you get a forbidden ## Then try with the private user, to make sure that you get a forbidden
basic_authorization(private_user.email, "test") basic_authorization private_user.email, "test"
# this shouldn't work, as we should need the payload... # this shouldn't work, as we should need the payload...
delete :delete, :params => { :id => relation.id } delete :delete, :params => { :id => relation.id }
@ -556,7 +556,7 @@ class RelationControllerTest < ActionController::TestCase
assert_response :forbidden assert_response :forbidden
## now set auth for the public user ## now set auth for the public user
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# this shouldn't work, as we should need the payload... # this shouldn't work, as we should need the payload...
delete :delete, :params => { :id => relation.id } delete :delete, :params => { :id => relation.id }
@ -739,7 +739,7 @@ class RelationControllerTest < ActionController::TestCase
way1 = create(:way_with_nodes, :nodes_count => 2) way1 = create(:way_with_nodes, :nodes_count => 2)
way2 = create(:way_with_nodes, :nodes_count => 2) way2 = create(:way_with_nodes, :nodes_count => 2)
basic_authorization(user.email, "test") basic_authorization user.email, "test"
doc_str = <<OSM.strip_heredoc doc_str = <<OSM.strip_heredoc
<osm> <osm>
@ -814,14 +814,14 @@ OSM
doc = XML::Parser.string(doc_str).parse doc = XML::Parser.string(doc_str).parse
## First try with the private user ## First try with the private user
basic_authorization(private_user.email, "test") basic_authorization private_user.email, "test"
content doc content doc
put :create put :create
assert_response :forbidden assert_response :forbidden
## Now try with the public user ## Now try with the public user
basic_authorization(user.email, "test") basic_authorization user.email, "test"
content doc content doc
put :create put :create
@ -855,7 +855,7 @@ OSM
</osm> </osm>
OSM OSM
doc = XML::Parser.string(doc_str).parse doc = XML::Parser.string(doc_str).parse
basic_authorization(user.email, "test") basic_authorization user.email, "test"
content doc content doc
put :create put :create
@ -936,7 +936,7 @@ OSM
# that the changeset bounding box is +bbox+. # that the changeset bounding box is +bbox+.
def check_changeset_modify(bbox) def check_changeset_modify(bbox)
## First test with the private user to check that you get a forbidden ## First test with the private user to check that you get a forbidden
basic_authorization(create(:user, :data_public => false).email, "test") basic_authorization create(:user, :data_public => false).email, "test"
# create a new changeset for this operation, so we are assured # create a new changeset for this operation, so we are assured
# that the bounding box will be newly-generated. # that the bounding box will be newly-generated.
@ -947,7 +947,7 @@ OSM
end end
## Now do the whole thing with the public user ## Now do the whole thing with the public user
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# create a new changeset for this operation, so we are assured # create a new changeset for this operation, so we are assured
# that the bounding box will be newly-generated. # that the bounding box will be newly-generated.

View file

@ -692,12 +692,12 @@ class TraceControllerTest < ActionController::TestCase
assert_response :unauthorized assert_response :unauthorized
# Now with some other user, which should work since the trace is public # Now with some other user, which should work since the trace is public
basic_authorization(create(:user).display_name, "test") basic_authorization create(:user).display_name, "test"
get :api_read, :params => { :id => public_trace_file.id } get :api_read, :params => { :id => public_trace_file.id }
assert_response :success assert_response :success
# And finally we should be able to do it with the owner of the trace # And finally we should be able to do it with the owner of the trace
basic_authorization(public_trace_file.user.display_name, "test") basic_authorization public_trace_file.user.display_name, "test"
get :api_read, :params => { :id => public_trace_file.id } get :api_read, :params => { :id => public_trace_file.id }
assert_response :success assert_response :success
end end
@ -711,12 +711,12 @@ class TraceControllerTest < ActionController::TestCase
assert_response :unauthorized assert_response :unauthorized
# Now try with another user, which shouldn't work since the trace is anon # Now try with another user, which shouldn't work since the trace is anon
basic_authorization(create(:user).display_name, "test") basic_authorization create(:user).display_name, "test"
get :api_read, :params => { :id => anon_trace_file.id } get :api_read, :params => { :id => anon_trace_file.id }
assert_response :forbidden assert_response :forbidden
# And finally we should be able to get the trace details with the trace owner # And finally we should be able to get the trace details with the trace owner
basic_authorization(anon_trace_file.user.display_name, "test") basic_authorization anon_trace_file.user.display_name, "test"
get :api_read, :params => { :id => anon_trace_file.id } get :api_read, :params => { :id => anon_trace_file.id }
assert_response :success assert_response :success
end end
@ -730,12 +730,12 @@ class TraceControllerTest < ActionController::TestCase
assert_response :unauthorized assert_response :unauthorized
# Login, and try again # Login, and try again
basic_authorization(deleted_trace_file.user.display_name, "test") basic_authorization deleted_trace_file.user.display_name, "test"
get :api_read, :params => { :id => 0 } get :api_read, :params => { :id => 0 }
assert_response :not_found assert_response :not_found
# Now try a trace which did exist but has been deleted # Now try a trace which did exist but has been deleted
basic_authorization(deleted_trace_file.user.display_name, "test") basic_authorization deleted_trace_file.user.display_name, "test"
get :api_read, :params => { :id => deleted_trace_file.id } get :api_read, :params => { :id => deleted_trace_file.id }
assert_response :not_found assert_response :not_found
end end
@ -749,12 +749,12 @@ class TraceControllerTest < ActionController::TestCase
assert_response :unauthorized assert_response :unauthorized
# Now with some other user, which should work since the trace is public # Now with some other user, which should work since the trace is public
basic_authorization(create(:user).display_name, "test") basic_authorization create(:user).display_name, "test"
get :api_data, :params => { :id => public_trace_file.id } get :api_data, :params => { :id => public_trace_file.id }
check_trace_data public_trace_file check_trace_data public_trace_file
# And finally we should be able to do it with the owner of the trace # And finally we should be able to do it with the owner of the trace
basic_authorization(public_trace_file.user.display_name, "test") basic_authorization public_trace_file.user.display_name, "test"
get :api_data, :params => { :id => public_trace_file.id } get :api_data, :params => { :id => public_trace_file.id }
check_trace_data public_trace_file check_trace_data public_trace_file
end end
@ -764,7 +764,7 @@ class TraceControllerTest < ActionController::TestCase
identifiable_trace_file = create(:trace, :visibility => "identifiable", :fixture => "d") identifiable_trace_file = create(:trace, :visibility => "identifiable", :fixture => "d")
# Authenticate as the owner of the trace we will be using # Authenticate as the owner of the trace we will be using
basic_authorization(identifiable_trace_file.user.display_name, "test") basic_authorization identifiable_trace_file.user.display_name, "test"
# First get the data as is # First get the data as is
get :api_data, :params => { :id => identifiable_trace_file.id } get :api_data, :params => { :id => identifiable_trace_file.id }
@ -788,12 +788,12 @@ class TraceControllerTest < ActionController::TestCase
assert_response :unauthorized assert_response :unauthorized
# Now with some other user, which shouldn't work since the trace is anon # Now with some other user, which shouldn't work since the trace is anon
basic_authorization(create(:user).display_name, "test") basic_authorization create(:user).display_name, "test"
get :api_data, :params => { :id => anon_trace_file.id } get :api_data, :params => { :id => anon_trace_file.id }
assert_response :forbidden assert_response :forbidden
# And finally we should be able to do it with the owner of the trace # And finally we should be able to do it with the owner of the trace
basic_authorization(anon_trace_file.user.display_name, "test") basic_authorization anon_trace_file.user.display_name, "test"
get :api_data, :params => { :id => anon_trace_file.id } get :api_data, :params => { :id => anon_trace_file.id }
check_trace_data anon_trace_file check_trace_data anon_trace_file
end end
@ -807,12 +807,12 @@ class TraceControllerTest < ActionController::TestCase
assert_response :unauthorized assert_response :unauthorized
# Login, and try again # Login, and try again
basic_authorization(create(:user).display_name, "test") basic_authorization create(:user).display_name, "test"
get :api_data, :params => { :id => 0 } get :api_data, :params => { :id => 0 }
assert_response :not_found assert_response :not_found
# Now try a trace which did exist but has been deleted # Now try a trace which did exist but has been deleted
basic_authorization(deleted_trace_file.user.display_name, "test") basic_authorization deleted_trace_file.user.display_name, "test"
get :api_data, :params => { :id => deleted_trace_file.id } get :api_data, :params => { :id => deleted_trace_file.id }
assert_response :not_found assert_response :not_found
end end
@ -831,7 +831,7 @@ class TraceControllerTest < ActionController::TestCase
# Now authenticated # Now authenticated
create(:user_preference, :user => user, :k => "gps.trace.visibility", :v => "identifiable") create(:user_preference, :user => user, :k => "gps.trace.visibility", :v => "identifiable")
assert_not_equal "trackable", user.preferences.where(:k => "gps.trace.visibility").first.v assert_not_equal "trackable", user.preferences.where(:k => "gps.trace.visibility").first.v
basic_authorization(user.display_name, "test") basic_authorization user.display_name, "test"
post :api_create, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :visibility => "trackable" } post :api_create, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :visibility => "trackable" }
assert_response :success assert_response :success
trace = Trace.find(response.body.to_i) trace = Trace.find(response.body.to_i)
@ -849,7 +849,7 @@ class TraceControllerTest < ActionController::TestCase
# Now authenticated, with the legacy public flag # Now authenticated, with the legacy public flag
assert_not_equal "public", user.preferences.where(:k => "gps.trace.visibility").first.v assert_not_equal "public", user.preferences.where(:k => "gps.trace.visibility").first.v
basic_authorization(user.display_name, "test") basic_authorization user.display_name, "test"
post :api_create, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :public => 1 } post :api_create, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :public => 1 }
assert_response :success assert_response :success
trace = Trace.find(response.body.to_i) trace = Trace.find(response.body.to_i)
@ -868,7 +868,7 @@ class TraceControllerTest < ActionController::TestCase
# Now authenticated, with the legacy private flag # Now authenticated, with the legacy private flag
second_user = create(:user) second_user = create(:user)
assert_nil second_user.preferences.where(:k => "gps.trace.visibility").first assert_nil second_user.preferences.where(:k => "gps.trace.visibility").first
basic_authorization(second_user.display_name, "test") basic_authorization second_user.display_name, "test"
post :api_create, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :public => 0 } post :api_create, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :public => 0 }
assert_response :success assert_response :success
trace = Trace.find(response.body.to_i) trace = Trace.find(response.body.to_i)
@ -894,32 +894,32 @@ class TraceControllerTest < ActionController::TestCase
assert_response :unauthorized assert_response :unauthorized
# Now with some other user, which should fail # Now with some other user, which should fail
basic_authorization(create(:user).display_name, "test") basic_authorization create(:user).display_name, "test"
content public_trace_file.to_xml content public_trace_file.to_xml
put :api_update, :params => { :id => public_trace_file.id } put :api_update, :params => { :id => public_trace_file.id }
assert_response :forbidden assert_response :forbidden
# Now with a trace which doesn't exist # Now with a trace which doesn't exist
basic_authorization(create(:user).display_name, "test") basic_authorization create(:user).display_name, "test"
content public_trace_file.to_xml content public_trace_file.to_xml
put :api_update, :params => { :id => 0 } put :api_update, :params => { :id => 0 }
assert_response :not_found assert_response :not_found
# Now with a trace which did exist but has been deleted # Now with a trace which did exist but has been deleted
basic_authorization(deleted_trace_file.user.display_name, "test") basic_authorization deleted_trace_file.user.display_name, "test"
content deleted_trace_file.to_xml content deleted_trace_file.to_xml
put :api_update, :params => { :id => deleted_trace_file.id } put :api_update, :params => { :id => deleted_trace_file.id }
assert_response :not_found assert_response :not_found
# Now try an update with the wrong ID # Now try an update with the wrong ID
basic_authorization(public_trace_file.user.display_name, "test") basic_authorization public_trace_file.user.display_name, "test"
content anon_trace_file.to_xml content anon_trace_file.to_xml
put :api_update, :params => { :id => public_trace_file.id } put :api_update, :params => { :id => public_trace_file.id }
assert_response :bad_request, assert_response :bad_request,
"should not be able to update a trace with a different ID from the XML" "should not be able to update a trace with a different ID from the XML"
# And finally try an update that should work # And finally try an update that should work
basic_authorization(public_trace_file.user.display_name, "test") basic_authorization public_trace_file.user.display_name, "test"
t = public_trace_file t = public_trace_file
t.description = "Changed description" t.description = "Changed description"
t.visibility = "private" t.visibility = "private"
@ -940,22 +940,22 @@ class TraceControllerTest < ActionController::TestCase
assert_response :unauthorized assert_response :unauthorized
# Now with some other user, which should fail # Now with some other user, which should fail
basic_authorization(create(:user).display_name, "test") basic_authorization create(:user).display_name, "test"
delete :api_delete, :params => { :id => public_trace_file.id } delete :api_delete, :params => { :id => public_trace_file.id }
assert_response :forbidden assert_response :forbidden
# Now with a trace which doesn't exist # Now with a trace which doesn't exist
basic_authorization(create(:user).display_name, "test") basic_authorization create(:user).display_name, "test"
delete :api_delete, :params => { :id => 0 } delete :api_delete, :params => { :id => 0 }
assert_response :not_found assert_response :not_found
# And finally we should be able to do it with the owner of the trace # And finally we should be able to do it with the owner of the trace
basic_authorization(public_trace_file.user.display_name, "test") basic_authorization public_trace_file.user.display_name, "test"
delete :api_delete, :params => { :id => public_trace_file.id } delete :api_delete, :params => { :id => public_trace_file.id }
assert_response :success assert_response :success
# Try it a second time, which should fail # Try it a second time, which should fail
basic_authorization(public_trace_file.user.display_name, "test") basic_authorization public_trace_file.user.display_name, "test"
delete :api_delete, :params => { :id => public_trace_file.id } delete :api_delete, :params => { :id => public_trace_file.id }
assert_response :not_found assert_response :not_found
end end

View file

@ -782,6 +782,10 @@ class UserControllerTest < ActionController::TestCase
get :account, :params => { :display_name => user.display_name }, :session => { :user => user } get :account, :params => { :display_name => user.display_name }, :session => { :user => user }
assert_response :success assert_response :success
assert_template :account assert_template :account
assert_select "form#accountForm" do |form|
assert_equal "post", form.attr("method").to_s
assert_equal "/user/#{URI.encode(user.display_name)}/account", form.attr("action").to_s
end
# Updating the description should work # Updating the description should work
user.description = "new description" user.description = "new description"
@ -1093,7 +1097,7 @@ class UserControllerTest < ActionController::TestCase
assert_response :unauthorized assert_response :unauthorized
# check that we get a response when logged in # check that we get a response when logged in
basic_authorization(user.email, "test") basic_authorization user.email, "test"
get :api_details get :api_details
assert_response :success assert_response :success
assert_equal "text/xml", response.content_type assert_equal "text/xml", response.content_type
@ -1148,7 +1152,7 @@ class UserControllerTest < ActionController::TestCase
assert_response :unauthorized assert_response :unauthorized
# check that we get a response when logged in # check that we get a response when logged in
basic_authorization(user.email, "test") basic_authorization user.email, "test"
get :api_gpx_files get :api_gpx_files
assert_response :success assert_response :success
assert_equal "application/xml", response.content_type assert_equal "application/xml", response.content_type

View file

@ -34,7 +34,7 @@ class UserPreferenceControllerTest < ActionController::TestCase
assert_response :unauthorized, "should be authenticated" assert_response :unauthorized, "should be authenticated"
# authenticate as a user with no preferences # authenticate as a user with no preferences
basic_authorization(create(:user).email, "test") basic_authorization create(:user).email, "test"
# try the read again # try the read again
get :read get :read
@ -48,7 +48,7 @@ class UserPreferenceControllerTest < ActionController::TestCase
user = create(:user) user = create(:user)
user_preference = create(:user_preference, :user => user) user_preference = create(:user_preference, :user => user)
user_preference2 = create(:user_preference, :user => user) user_preference2 = create(:user_preference, :user => user)
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# try the read again # try the read again
get :read get :read
@ -74,7 +74,7 @@ class UserPreferenceControllerTest < ActionController::TestCase
assert_response :unauthorized, "should be authenticated" assert_response :unauthorized, "should be authenticated"
# authenticate as a user with preferences # authenticate as a user with preferences
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# try the read again # try the read again
get :read_one, :params => { :preference_key => "key" } get :read_one, :params => { :preference_key => "key" }
@ -107,7 +107,7 @@ class UserPreferenceControllerTest < ActionController::TestCase
end end
# authenticate as a user with preferences # authenticate as a user with preferences
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# try the put again # try the put again
assert_no_difference "UserPreference.count" do assert_no_difference "UserPreference.count" do
@ -158,7 +158,7 @@ class UserPreferenceControllerTest < ActionController::TestCase
end end
# authenticate as a user with preferences # authenticate as a user with preferences
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# try adding a new preference # try adding a new preference
assert_difference "UserPreference.count", 1 do assert_difference "UserPreference.count", 1 do
@ -195,7 +195,7 @@ class UserPreferenceControllerTest < ActionController::TestCase
assert_equal "value", UserPreference.find([user.id, "key"]).v assert_equal "value", UserPreference.find([user.id, "key"]).v
# authenticate as a user with preferences # authenticate as a user with preferences
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# try the delete again # try the delete again
assert_difference "UserPreference.count", -1 do assert_difference "UserPreference.count", -1 do

View file

@ -278,7 +278,7 @@ class WayControllerTest < ActionController::TestCase
assert_response :unauthorized assert_response :unauthorized
# now set auth using the private user # now set auth using the private user
basic_authorization(private_user.email, "test") basic_authorization private_user.email, "test"
# this shouldn't work as with the 0.6 api we need pay load to delete # this shouldn't work as with the 0.6 api we need pay load to delete
delete :delete, :params => { :id => private_way.id } delete :delete, :params => { :id => private_way.id }
@ -327,7 +327,7 @@ class WayControllerTest < ActionController::TestCase
### Now check with a public user ### Now check with a public user
# now set auth # now set auth
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# this shouldn't work as with the 0.6 api we need pay load to delete # this shouldn't work as with the 0.6 api we need pay load to delete
delete :delete, :params => { :id => way.id } delete :delete, :params => { :id => way.id }
@ -397,7 +397,7 @@ class WayControllerTest < ActionController::TestCase
## Second test with the private user ## Second test with the private user
# setup auth # setup auth
basic_authorization(private_user.email, "test") basic_authorization private_user.email, "test"
## trying to break changesets ## trying to break changesets
@ -435,7 +435,7 @@ class WayControllerTest < ActionController::TestCase
## Finally test with the public user ## Finally test with the public user
# setup auth # setup auth
basic_authorization(user.email, "test") basic_authorization user.email, "test"
## trying to break changesets ## trying to break changesets
@ -519,7 +519,7 @@ class WayControllerTest < ActionController::TestCase
## Try with the non-public user ## Try with the non-public user
# setup auth # setup auth
basic_authorization(private_user.email, "test") basic_authorization private_user.email, "test"
# add an identical tag to the way # add an identical tag to the way
tag_xml = XML::Node.new("tag") tag_xml = XML::Node.new("tag")
@ -538,7 +538,7 @@ class WayControllerTest < ActionController::TestCase
## Now try with the public user ## Now try with the public user
# setup auth # setup auth
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# add an identical tag to the way # add an identical tag to the way
tag_xml = XML::Node.new("tag") tag_xml = XML::Node.new("tag")
@ -569,7 +569,7 @@ class WayControllerTest < ActionController::TestCase
## Try with the non-public user ## Try with the non-public user
# setup auth # setup auth
basic_authorization(private_user.email, "test") basic_authorization private_user.email, "test"
# add an identical tag to the way # add an identical tag to the way
tag_xml = XML::Node.new("tag") tag_xml = XML::Node.new("tag")
@ -588,7 +588,7 @@ class WayControllerTest < ActionController::TestCase
## Now try with the public user ## Now try with the public user
# setup auth # setup auth
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# add an identical tag to the way # add an identical tag to the way
tag_xml = XML::Node.new("tag") tag_xml = XML::Node.new("tag")
@ -617,7 +617,7 @@ class WayControllerTest < ActionController::TestCase
## First test with the non-public user so should be rejected ## First test with the non-public user so should be rejected
# setup auth # setup auth
basic_authorization(private_user.email, "test") basic_authorization private_user.email, "test"
# create duplicate tag # create duplicate tag
tag_xml = XML::Node.new("tag") tag_xml = XML::Node.new("tag")
@ -638,7 +638,7 @@ class WayControllerTest < ActionController::TestCase
## Now test with the public user ## Now test with the public user
# setup auth # setup auth
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# create duplicate tag # create duplicate tag
tag_xml = XML::Node.new("tag") tag_xml = XML::Node.new("tag")
@ -671,7 +671,7 @@ class WayControllerTest < ActionController::TestCase
## First make sure that you can't with a non-public user ## First make sure that you can't with a non-public user
# setup auth # setup auth
basic_authorization(private_user.email, "test") basic_authorization private_user.email, "test"
# add the tag into the existing xml # add the tag into the existing xml
way_str = "<osm><way changeset='#{private_changeset.id}'>" way_str = "<osm><way changeset='#{private_changeset.id}'>"
@ -687,7 +687,7 @@ class WayControllerTest < ActionController::TestCase
## Now do it with a public user ## Now do it with a public user
# setup auth # setup auth
basic_authorization(user.email, "test") basic_authorization user.email, "test"
# add the tag into the existing xml # add the tag into the existing xml
way_str = "<osm><way changeset='#{changeset.id}'>" way_str = "<osm><way changeset='#{changeset.id}'>"

View file

@ -1,6 +1,8 @@
require "test_helper" require "test_helper"
class ApplicationHelperTest < ActionView::TestCase class ApplicationHelperTest < ActionView::TestCase
attr_accessor :current_user
def setup def setup
I18n.locale = "en" I18n.locale = "en"
end end
@ -46,7 +48,7 @@ class ApplicationHelperTest < ActionView::TestCase
end end
def test_style_rules def test_style_rules
@user = nil self.current_user = nil
css = style_rules css = style_rules
assert_match /\.hidden /, css assert_match /\.hidden /, css
@ -57,36 +59,36 @@ class ApplicationHelperTest < ActionView::TestCase
assert_match /\.hide_unless_administrator /, css assert_match /\.hide_unless_administrator /, css
assert_match /\.hide_unless_moderator /, css assert_match /\.hide_unless_moderator /, css
@user = create(:user) self.current_user = create(:user)
css = style_rules css = style_rules
assert_match /\.hidden /, css assert_match /\.hidden /, css
assert_no_match /\.hide_unless_logged_in /, css assert_no_match /\.hide_unless_logged_in /, css
assert_match /\.hide_if_logged_in /, css assert_match /\.hide_if_logged_in /, css
assert_match /\.hide_if_user_#{@user.id} /, css assert_match /\.hide_if_user_#{current_user.id} /, css
assert_match /\.show_if_user_#{@user.id} /, css assert_match /\.show_if_user_#{current_user.id} /, css
assert_match /\.hide_unless_administrator /, css assert_match /\.hide_unless_administrator /, css
assert_match /\.hide_unless_moderator /, css assert_match /\.hide_unless_moderator /, css
@user = create(:moderator_user) self.current_user = create(:moderator_user)
css = style_rules css = style_rules
assert_match /\.hidden /, css assert_match /\.hidden /, css
assert_no_match /\.hide_unless_logged_in /, css assert_no_match /\.hide_unless_logged_in /, css
assert_match /\.hide_if_logged_in /, css assert_match /\.hide_if_logged_in /, css
assert_match /\.hide_if_user_#{@user.id} /, css assert_match /\.hide_if_user_#{current_user.id} /, css
assert_match /\.show_if_user_#{@user.id} /, css assert_match /\.show_if_user_#{current_user.id} /, css
assert_match /\.hide_unless_administrator /, css assert_match /\.hide_unless_administrator /, css
assert_no_match /\.hide_unless_moderator /, css assert_no_match /\.hide_unless_moderator /, css
@user = create(:administrator_user) self.current_user = create(:administrator_user)
css = style_rules css = style_rules
assert_match /\.hidden /, css assert_match /\.hidden /, css
assert_no_match /\.hide_unless_logged_in /, css assert_no_match /\.hide_unless_logged_in /, css
assert_match /\.hide_if_logged_in /, css assert_match /\.hide_if_logged_in /, css
assert_match /\.hide_if_user_#{@user.id} /, css assert_match /\.hide_if_user_#{current_user.id} /, css
assert_match /\.show_if_user_#{@user.id} /, css assert_match /\.show_if_user_#{current_user.id} /, css
assert_no_match /\.hide_unless_administrator /, css assert_no_match /\.hide_unless_administrator /, css
assert_match /\.hide_unless_moderator /, css assert_match /\.hide_unless_moderator /, css
end end

View file

@ -1,11 +1,12 @@
require "test_helper" require "test_helper"
class UserRolesHelperTest < ActionView::TestCase class UserRolesHelperTest < ActionView::TestCase
def test_role_icon_normal attr_accessor :current_user
user = create(:user)
@user = user
icon = role_icon(user, "moderator") def test_role_icon_normal
self.current_user = create(:user)
icon = role_icon(current_user, "moderator")
assert_dom_equal "", icon assert_dom_equal "", icon
icon = role_icon(create(:moderator_user), "moderator") icon = role_icon(create(:moderator_user), "moderator")
@ -13,7 +14,7 @@ class UserRolesHelperTest < ActionView::TestCase
end end
def test_role_icon_administrator def test_role_icon_administrator
@user = create(:administrator_user) self.current_user = create(:administrator_user)
user = create(:user) user = create(:user)
icon = role_icon(user, "moderator") icon = role_icon(user, "moderator")
@ -25,10 +26,9 @@ class UserRolesHelperTest < ActionView::TestCase
end end
def test_role_icons_normal def test_role_icons_normal
user = create(:user) self.current_user = create(:user)
@user = user
icons = role_icons(user) icons = role_icons(current_user)
assert_dom_equal " ", icons assert_dom_equal " ", icons
icons = role_icons(create(:moderator_user)) icons = role_icons(create(:moderator_user))
@ -39,7 +39,7 @@ class UserRolesHelperTest < ActionView::TestCase
end end
def test_role_icons_administrator def test_role_icons_administrator
@user = create(:administrator_user) self.current_user = create(:administrator_user)
user = create(:user) user = create(:user)
icons = role_icons(user) icons = role_icons(user)

View file

@ -8,15 +8,20 @@ class CORSTest < ActionDispatch::IntegrationTest
} }
assert_response :success assert_response :success
assert_equal "http://www.example.com", response.headers["Access-Control-Allow-Origin"] assert_equal "*", response.headers["Access-Control-Allow-Origin"]
assert_equal "text/plain", response.content_type
assert_equal "", response.body
end end
def test_non_api_routes_dont_allow_cross_origin_requests def test_non_api_routes_dont_allow_cross_origin_requests
assert_raises ActionController::RoutingError do
process :options, "/", :headers => { process :options, "/", :headers => {
"HTTP_ORIGIN" => "http://www.example.com", "HTTP_ORIGIN" => "http://www.example.com",
"HTTP_ACCESS_CONTROL_REQUEST_METHOD" => "GET" "HTTP_ACCESS_CONTROL_REQUEST_METHOD" => "GET"
} }
end
assert_response :success
assert_nil response.headers["Access-Control-Allow-Origin"]
assert_nil response.content_type
assert_equal "", response.body
end end
end end

View file

@ -113,7 +113,9 @@ class UserLoginTest < ActionDispatch::IntegrationTest
assert_template "login" assert_template "login"
assert_select "span.username", false assert_select "span.username", false
assert_select "div.flash.error", /your account has been suspended/ assert_select "div.flash.error", /your account has been suspended/ do
assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster"
end
end end
def test_login_email_password_suspended_upcase def test_login_email_password_suspended_upcase
@ -123,7 +125,9 @@ class UserLoginTest < ActionDispatch::IntegrationTest
assert_template "login" assert_template "login"
assert_select "span.username", false assert_select "span.username", false
assert_select "div.flash.error", /your account has been suspended/ assert_select "div.flash.error", /your account has been suspended/ do
assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster"
end
end end
def test_login_email_password_suspended_titlecase def test_login_email_password_suspended_titlecase
@ -133,7 +137,9 @@ class UserLoginTest < ActionDispatch::IntegrationTest
assert_template "login" assert_template "login"
assert_select "span.username", false assert_select "span.username", false
assert_select "div.flash.error", /your account has been suspended/ assert_select "div.flash.error", /your account has been suspended/ do
assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster"
end
end end
def test_login_email_password_blocked def test_login_email_password_blocked
@ -264,7 +270,9 @@ class UserLoginTest < ActionDispatch::IntegrationTest
assert_template "login" assert_template "login"
assert_select "span.username", false assert_select "span.username", false
assert_select "div.flash.error", /your account has been suspended/ assert_select "div.flash.error", /your account has been suspended/ do
assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster"
end
end end
def test_login_username_password_suspended_upcase def test_login_username_password_suspended_upcase
@ -274,7 +282,9 @@ class UserLoginTest < ActionDispatch::IntegrationTest
assert_template "login" assert_template "login"
assert_select "span.username", false assert_select "span.username", false
assert_select "div.flash.error", /your account has been suspended/ assert_select "div.flash.error", /your account has been suspended/ do
assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster"
end
end end
def test_login_username_password_suspended_downcase def test_login_username_password_suspended_downcase
@ -284,7 +294,9 @@ class UserLoginTest < ActionDispatch::IntegrationTest
assert_template "login" assert_template "login"
assert_select "span.username", false assert_select "span.username", false
assert_select "div.flash.error", /your account has been suspended/ assert_select "div.flash.error", /your account has been suspended/ do
assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster"
end
end end
def test_login_username_password_blocked def test_login_username_password_blocked

View file

@ -434,8 +434,9 @@ text.gpx {
fill: #FF26D4; fill: #FF26D4;
} }
/* Default - light gray */
path.area.stroke { path.area.stroke {
stroke: #fff; stroke: #ddd;
stroke-width: 1; stroke-width: 1;
} }
path.area.fill { path.area.fill {
@ -455,33 +456,16 @@ path.stroke.old-multipolygon {
stroke-linecap: butt; stroke-linecap: butt;
} }
path.stroke.tag-natural { /* Green things */
stroke: rgb(182, 225, 153);
}
path.fill.tag-natural {
stroke: rgba(182, 225, 153, 0.3);
fill: rgba(182, 225, 153, 0.3);
}
.preset-icon-fill-area.tag-natural {
border-color: rgb(182, 225, 153);
background-color: rgba(182, 225, 153, 0.3);
}
path.stroke.tag-landuse, path.stroke.tag-landuse,
path.stroke.tag-natural-wood, path.stroke.tag-natural,
path.stroke.tag-natural-tree,
path.stroke.tag-natural-grassland,
path.stroke.tag-natural-grass,
path.stroke.tag-leisure-nature_reserve, path.stroke.tag-leisure-nature_reserve,
path.stroke.tag-leisure-pitch, path.stroke.tag-leisure-pitch,
path.stroke.tag-leisure-park { path.stroke.tag-leisure-park {
stroke: rgb(140, 208, 95); stroke: rgb(140, 208, 95);
} }
path.fill.tag-landuse, path.fill.tag-landuse,
path.fill.tag-natural-wood, path.fill.tag-natural,
path.fill.tag-natural-tree,
path.fill.tag-natural-grassland,
path.fill.tag-natural-grass,
path.fill.tag-leisure-nature_reserve, path.fill.tag-leisure-nature_reserve,
path.fill.tag-leisure-pitch, path.fill.tag-leisure-pitch,
path.fill.tag-leisure-park { path.fill.tag-leisure-park {
@ -489,10 +473,7 @@ path.fill.tag-leisure-park {
fill: rgba(140, 208, 95, 0.3); fill: rgba(140, 208, 95, 0.3);
} }
.preset-icon-fill-area.tag-landuse, .preset-icon-fill-area.tag-landuse,
.preset-icon-fill-area.tag-natural-wood, .preset-icon-fill-area.tag-natural,
.preset-icon-fill-area.tag-natural-tree,
.preset-icon-fill-area.tag-natural-grassland,
.preset-icon-fill-area.tag-natural-grass,
.preset-icon-fill-area.tag-leisure-nature_reserve, .preset-icon-fill-area.tag-leisure-nature_reserve,
.preset-icon-fill-area.tag-leisure-pitch, .preset-icon-fill-area.tag-leisure-pitch,
.preset-icon-fill-area.tag-leisure-park { .preset-icon-fill-area.tag-leisure-park {
@ -500,6 +481,7 @@ path.fill.tag-leisure-park {
background-color: rgba(140, 208, 95, 0.3); background-color: rgba(140, 208, 95, 0.3);
} }
/* Blue things */
path.stroke.tag-amenity-swimming_pool, path.stroke.tag-amenity-swimming_pool,
path.stroke.tag-leisure-swimming_pool, path.stroke.tag-leisure-swimming_pool,
path.stroke.tag-natural-water, path.stroke.tag-natural-water,
@ -530,13 +512,27 @@ path.fill.tag-natural-water {
background-color: rgba(119, 211, 222, 0.3); background-color: rgba(119, 211, 222, 0.3);
} }
/* Yellow things */
.pattern-color-beach,
.pattern-color-sand,
.pattern-color-scrub {
fill: rgba(255, 255, 148, 0.2);
}
path.stroke.tag-leisure-pitch.tag-sport-beachvolleyball,
path.stroke.tag-natural-beach,
path.stroke.tag-natural-sand,
path.stroke.tag-natural-scrub,
path.stroke.tag-amenity-childcare, path.stroke.tag-amenity-childcare,
path.stroke.tag-amenity-kindergarten, path.stroke.tag-amenity-kindergarten,
path.stroke.tag-amenity-school, path.stroke.tag-amenity-school,
path.stroke.tag-amenity-college, path.stroke.tag-amenity-college,
path.stroke.tag-amenity-university { path.stroke.tag-amenity-university {
stroke: rgb(255, 255, 148); stroke: rgba(255, 255, 148, 0.75);
} }
path.fill.tag-leisure-pitch.tag-sport-beachvolleyball,
path.fill.tag-natural-beach,
path.fill.tag-natural-sand,
path.fill.tag-natural-scrub,
path.fill.tag-amenity-childcare, path.fill.tag-amenity-childcare,
path.fill.tag-amenity-kindergarten, path.fill.tag-amenity-kindergarten,
path.fill.tag-amenity-school, path.fill.tag-amenity-school,
@ -545,6 +541,10 @@ path.fill.tag-amenity-university {
stroke: rgba(255, 255, 148, 0.15); stroke: rgba(255, 255, 148, 0.15);
fill: rgba(255, 255, 148, 0.15); fill: rgba(255, 255, 148, 0.15);
} }
.preset-icon-fill-area.tag-leisure-pitch.tag-sport-beachvolleyball,
.preset-icon-fill-area.tag-natural-beach,
.preset-icon-fill-area.tag-natural-sand,
.preset-icon-fill-area.tag-natural-scrub,
.preset-icon-fill-area.tag-amenity-childcare, .preset-icon-fill-area.tag-amenity-childcare,
.preset-icon-fill-area.tag-amenity-kindergarten, .preset-icon-fill-area.tag-amenity-kindergarten,
.preset-icon-fill-area.tag-amenity-school, .preset-icon-fill-area.tag-amenity-school,
@ -554,33 +554,52 @@ path.fill.tag-amenity-university {
background-color: rgba(255, 255, 148, 0.15); background-color: rgba(255, 255, 148, 0.15);
} }
path.stroke.tag-landuse-residential { /* Gold things */
.pattern-color-construction {
fill: rgba(196, 189, 25, 0.3);
}
path.stroke.tag-landuse-residential,
path.stroke.tag-landuse.tag-status,
path.stroke.tag-landuse-construction {
stroke: rgb(196, 189, 25); stroke: rgb(196, 189, 25);
} }
path.fill.tag-landuse-residential { path.fill.tag-landuse-residential {
stroke: rgba(196, 189, 25, 0.3); stroke: rgba(196, 189, 25, 0.3);
fill: rgba(196, 189, 25, 0.3); fill: rgba(196, 189, 25, 0.3);
} }
.preset-icon-fill-area.tag-landuse-residential { .preset-icon-fill-area.tag-landuse-residential,
.preset-icon-fill-area.tag-landuse.tag-status,
.preset-icon-fill-area.tag-landuse-construction {
border-color: rgb(196, 189, 25); border-color: rgb(196, 189, 25);
background: rgba(196, 189, 25, 0.3); background: rgba(196, 189, 25, 0.3);
} }
/* Orange things */
path.stroke.tag-landuse-retail, path.stroke.tag-landuse-retail,
path.stroke.tag-landuse-commercial { path.stroke.tag-landuse-commercial,
path.stroke.tag-landuse-landfill,
path.stroke.tag-military,
path.stroke.tag-landuse-military {
stroke: rgb(214, 136, 26); stroke: rgb(214, 136, 26);
} }
path.fill.tag-landuse-retail, path.fill.tag-landuse-retail,
path.fill.tag-landuse-commercial { path.fill.tag-landuse-commercial,
path.fill.tag-landuse-landfill,
path.fill.tag-military,
path.fill.tag-landuse-military {
stroke: rgba(214, 136, 26, 0.3); stroke: rgba(214, 136, 26, 0.3);
fill: rgba(214, 136, 26, 0.3); fill: rgba(214, 136, 26, 0.3);
} }
.preset-icon-fill-area.tag-landuse-retail, .preset-icon-fill-area.tag-landuse-retail,
.preset-icon-fill-area.tag-landuse-commercial { .preset-icon-fill-area.tag-landuse-commercial,
.preset-icon-fill-area.tag-landuse-landfill,
.preset-icon-fill-area.tag-military,
.preset-icon-fill-area.tag-landuse-military {
border-color: rgb(214, 136, 26); border-color: rgb(214, 136, 26);
background-color: rgba(214, 136, 26, 0.3); background-color: rgba(214, 136, 26, 0.3);
} }
/* Pink things */
path.stroke.tag-landuse-industrial, path.stroke.tag-landuse-industrial,
path.stroke.tag-power-plant { path.stroke.tag-power-plant {
stroke: rgb(228, 164, 245); stroke: rgb(228, 164, 245);
@ -596,127 +615,42 @@ path.fill.tag-power-plant {
background-color: rgba(228, 164, 245, 0.3); background-color: rgba(228, 164, 245, 0.3);
} }
path.stroke.tag-natural-bare_rock, /* Teal things */
path.stroke.tag-natural-scree,
path.stroke.tag-landuse-railway,
path.stroke.tag-landuse-quarry {
stroke: rgb(166, 149, 123);
}
path.fill.tag-natural-bare_rock,
path.fill.tag-natural-scree,
path.fill.tag-landuse-railway,
path.fill.tag-landuse-quarry {
stroke: rgba(166, 149, 123, 0.2);
fill: rgba(166, 149, 123, 0.2);
}
.preset-icon-fill-area.tag-natural-bare_rock,
.preset-icon-fill-area.tag-natural-scree,
.preset-icon-fill-area.tag-landuse-railway,
.preset-icon-fill-area.tag-landuse-quarry {
border-color: rgb(166, 149, 123);
background-color: rgba(166, 149, 123, 0.2);
}
path.stroke.tag-landuse-landfill {
stroke: rgb(255, 153, 51);
}
path.fill.tag-landuse-landfill {
stroke: rgba(255, 153, 51, 0.2);
fill: rgba(255, 153, 51, 0.2);
}
.preset-icon-fill-area.tag-landuse-landfill {
border-color: rgb(255, 153, 51);
background-color: rgba(255, 153, 51, 0.2);
}
.pattern-color-construction {
fill: rgba(196, 189, 25, 0.2);
}
path.stroke.tag-landuse.tag-status,
path.stroke.tag-landuse-construction {
stroke: rgb(196, 189, 25);
}
.preset-icon-fill-area.tag-landuse.tag-status,
.preset-icon-fill-area.tag-landuse-construction {
border-color: rgb(196, 189, 25);
background-color: rgba(196, 189, 25, 0.2);
}
path.stroke.tag-military,
path.stroke.tag-landuse-military {
stroke: rgb(214, 136, 26);
}
path.fill.tag-military,
path.fill.tag-landuse-military {
stroke: rgba(214, 136, 26, 0.2);
fill: rgba(214, 136, 26, 0.2);
}
.preset-icon-fill-area.tag-military,
.preset-icon-fill-area.tag-landuse-military {
border-color: rgb(214, 136, 26);
background-color: rgba(214, 136, 26, 0.2);
}
.pattern-color-wetland { .pattern-color-wetland {
fill: rgba(182, 225, 153, 0.2); fill: rgba(153, 225, 170, 0.3);
} }
path.stroke.tag-natural-wetland { path.stroke.tag-natural-wetland {
stroke: rgb(182, 225, 153); stroke: rgb(153, 225, 170);
} }
.preset-icon-fill-area.tag-natural-wetland { .preset-icon-fill-area.tag-natural-wetland {
border-color: rgb(182, 225, 153); border-color: rgb(153, 225, 170);
background-color: rgba(182, 225, 153, 0.2); background-color: rgba(153, 225, 170, 0.2);
}
.pattern-color-meadow {
fill: rgba(182, 225, 153, 0.2);
}
path.stroke.tag-landuse-meadow {
stroke: rgb(182, 225, 153);
}
.preset-icon-fill-area.tag-landuse-meadow {
border-color: rgb(182, 225, 153);
background-color: rgba(182, 225, 153, 0.2);
}
.pattern-color-beach,
.pattern-color-sand {
fill: rgba(255, 255, 126, 0.2);
}
path.stroke.tag-natural-beach,
path.stroke.tag-natural-sand {
stroke: rgb(255, 255, 126);
}
.preset-icon-fill-area.tag-natural-beach,
.preset-icon-fill-area.tag-natural-sand {
border-color: rgb(255, 255, 126);
background-color: rgba(255, 255, 126, 0.2);
}
.pattern-color-scrub {
fill: rgba(219, 240, 139, 0.2);
}
path.stroke.tag-natural-scrub {
stroke: rgb(219, 240, 139);
}
.preset-icon-fill-area.tag-natural-scrub {
border-color: rgb(219, 240, 139);
background-color: rgba(219, 240, 139, 0.2);
} }
/* Light Green things */
.pattern-color-cemetery,
.pattern-color-orchard,
.pattern-color-meadow,
.pattern-color-farm, .pattern-color-farm,
.pattern-color-farmland { .pattern-color-farmland {
fill: rgba(140, 208, 95, 0.2); fill: rgba(191, 232, 63, 0.2);
} }
path.stroke.tag-landuse-cemetery,
path.stroke.tag-landuse-orchard,
path.stroke.tag-landuse-meadow,
path.stroke.tag-landuse-farm, path.stroke.tag-landuse-farm,
path.stroke.tag-landuse-farmland { path.stroke.tag-landuse-farmland {
stroke: rgb(140, 208, 95); stroke: rgb(191, 232, 63);
} }
.preset-icon-fill-area.tag-landuse-cemetery,
.preset-icon-fill-area.tag-landuse-orchard,
.preset-icon-fill-area.tag-landuse-meadow,
.preset-icon-fill-area.tag-landuse-farm, .preset-icon-fill-area.tag-landuse-farm,
.preset-icon-fill-area.tag-landuse-farmland { .preset-icon-fill-area.tag-landuse-farmland {
background-color: rgba(140, 208, 95, 0.2); background-color: rgba(191, 232, 63, 0.2);
} }
/* Tan things */
path.stroke.tag-landuse-farmyard { path.stroke.tag-landuse-farmyard {
stroke: rgb(245, 220, 186); stroke: rgb(245, 220, 186);
} }
@ -729,29 +663,51 @@ path.fill.tag-landuse-farmyard {
background: rgba(245, 220, 186, 0.3); background: rgba(245, 220, 186, 0.3);
} }
.pattern-color-cemetery, /* Dark Gray things */
.pattern-color-orchard { path.stroke.tag-amenity-parking,
fill: rgba(140, 208, 95, 0.2); path.stroke.tag-leisure-pitch.tag-sport-basketball,
path.stroke.tag-leisure-pitch.tag-sport-skateboard,
path.stroke.tag-natural-bare_rock,
path.stroke.tag-natural-scree,
path.stroke.tag-landuse-railway,
path.stroke.tag-landuse-quarry {
stroke: #bbb;
} }
path.stroke.tag-landuse-cemetery, path.fill.tag-amenity-parking,
path.stroke.tag-landuse-orchard { path.fill.tag-leisure-pitch.tag-sport-basketball,
stroke: rgb(140, 208, 95); path.fill.tag-leisure-pitch.tag-sport-skateboard,
path.fill.tag-natural-bare_rock,
path.fill.tag-natural-scree,
path.fill.tag-landuse-railway,
path.fill.tag-landuse-quarry {
stroke: rgba(140, 140, 140, 0.5);
fill: rgba(140, 140, 140, 0.5);
} }
.preset-icon-fill-area.tag-landuse-cemetery, .preset-icon-fill-area.tag-amenity-parking,
.preset-icon-fill-area.tag-landuse-orchard { .preset-icon-fill-area.tag-leisure-pitch.tag-sport-basketball,
background-color: rgba(140, 208, 95, 0.2); .preset-icon-fill-area.tag-leisure-pitch.tag-sport-skateboard,
.preset-icon-fill-area.tag-natural-bare_rock,
.preset-icon-fill-area.tag-natural-scree,
.preset-icon-fill-area.tag-landuse-railway,
.preset-icon-fill-area.tag-landuse-quarry {
border-color: rgb(170, 170, 170);
background-color: rgba(140, 140, 140, 0.5);
} }
path.stroke.tag-amenity-parking { /* Light gray overrides */
stroke: rgb(170, 170, 170); path.stroke.tag-natural-cave_entrance,
path.stroke.tag-natural-glacier {
stroke: #ddd;
} }
path.fill.tag-amenity-parking { path.fill.tag-natural-cave_entrance,
stroke: rgba(170, 170, 170, 0.3); path.fill.tag-natural-glacier {
fill: rgba(170, 170, 170, 0.3); stroke: rgba(255, 255, 255, 0.3);
fill: rgba(255, 255, 255, 0.3);
} }
.preset-icon-fill-area.tag-amenity-parking { .preset-icon-fill-area.tag-natural-cave_entrance,
.preset-icon-fill-area.tag-natural-glacier {
border-color: rgb(170, 170, 170); border-color: rgb(170, 170, 170);
background-color: rgba(170, 170, 170, 0.3); background: rgba(170, 170, 170, 0.3);
} }
/* highways */ /* highways */
@ -769,10 +725,11 @@ path.stroke.tag-highway {
/* highway areas */ /* highway areas */
path.stroke.area.tag-highway { path.stroke.area.tag-highway,
.low-zoom path.stroke.area.tag-highway {
stroke: #fff; stroke: #fff;
stroke-dasharray: none; stroke-dasharray: none;
stroke-width: 2; stroke-width: 1;
} }
/* wide highways */ /* wide highways */
@ -1217,6 +1174,20 @@ path.casing.tag-service {
stroke:#666; stroke:#666;
} }
/* with `service=* tag` (e.g. parking_aisle, alley, drive-through */
.preset-icon .icon.highway-service.tag-service {
color: #dcd9b9;
fill: #666;
}
path.stroke.tag-highway-service.tag-service,
path.stroke.tag-service.tag-service {
stroke: #dcd9b9;
}
path.casing.tag-highway-service.tag-service,
path.casing.tag-service.tag-service {
stroke: #666;
}
.preset-icon .icon.highway-track { .preset-icon .icon.highway-track {
color: #eaeaea; color: #eaeaea;
fill: #c5b59f; fill: #c5b59f;
@ -1346,10 +1317,11 @@ g.midpoint.tag-highway-bridleway .fill {
/* aeroways */ /* aeroways */
/* areas */ /* areas */
path.stroke.area.tag-aeroway { path.stroke.area.tag-aeroway,
stroke:#fff; .low-zoom path.stroke.area.tag-aeroway {
stroke: #fff;
stroke-dasharray: none; stroke-dasharray: none;
stroke-width: 2; stroke-width: 1;
} }
/* narrow aeroways (taxiway) */ /* narrow aeroways (taxiway) */
@ -1444,6 +1416,20 @@ path.fill.tag-aeroway-runway {
fill: #eee; fill: #eee;
} }
/* railway areas */
path.stroke.area.tag-railway,
.low-zoom path.stroke.area.tag-railway {
stroke: white;
stroke-width: 1;
stroke-dasharray: none;
}
path.casing.area.tag-railway,
.low-zoom path.casing.area.tag-railway {
stroke: none;
}
/* narrow widths */ /* narrow widths */
path.shadow.tag-railway { path.shadow.tag-railway {
@ -1505,23 +1491,41 @@ path.stroke.tag-railway-subway {
} }
/* railway platforms - like sidewalks */
path.shadow.tag-railway-platform {
stroke-width: 16;
}
path.casing.tag-railway-platform { path.casing.tag-railway-platform {
stroke: none; stroke: #fff;
stroke-width: 5;
stroke-linecap: round;
stroke-dasharray: none;
} }
path.stroke.tag-railway-platform { path.stroke.tag-railway-platform {
stroke: #999; stroke: #ae8681;
stroke-width: 4; stroke-width: 3;
stroke-dasharray: none; stroke-linecap: butt;
stroke-dasharray: 6, 6;
} }
.low-zoom path.shadow.tag-railway-platform {
.area.stroke.tag-railway { stroke-width: 12;
stroke: white; }
.low-zoom path.casing.tag-railway-platform {
stroke-width: 3;
}
.low-zoom path.stroke.tag-railway-platform {
stroke-width: 1; stroke-width: 1;
stroke-dasharray: none; stroke-linecap: butt;
stroke-dasharray: 3, 3;
} }
.area.casing.tag-railway {
stroke: none; g.midpoint.tag-railway-platform .fill {
fill: #fff;
stroke: #333;
stroke-opacity: .8;
opacity: .8;
} }
/* waterways */ /* waterways */
@ -1983,9 +1987,9 @@ path.fill.tag-amenity-shelter {
.layer-mapillary-signs .icon-sign .icon-sign-body { .layer-mapillary-signs .icon-sign .icon-sign-body {
min-width: 20px; min-width: 20px;
height: 28px; height: 24px;
width: 28px; width: 24px;
border: 2px solid transparent; outline: 2px solid transparent;
pointer-events: visible; pointer-events: visible;
cursor: pointer; /* Opera */ cursor: pointer; /* Opera */
cursor: url(<%= asset_path("iD/img/cursor-select-mapillary.png") %>) 6 1, pointer; /* FF */ cursor: url(<%= asset_path("iD/img/cursor-select-mapillary.png") %>) 6 1, pointer; /* FF */
@ -1994,24 +1998,62 @@ path.fill.tag-amenity-shelter {
} }
.layer-mapillary-signs .icon-sign:hover .icon-sign-body { .layer-mapillary-signs .icon-sign:hover .icon-sign-body {
border: 2px solid rgba(255,198,0,0.8); outline: 2px solid rgba(255,198,0,0.8);
z-index: 80; z-index: 80;
}
.layer-mapillary-signs .icon-sign.selected .icon-sign-body {
border: 2px solid rgba(255,0,0,0.8);
z-index: 80;
}
.layer-mapillary-signs .icon-sign .t {
font-size: 28px;
z-index: 70;
} }
.layer-mapillary-signs .icon-sign:hover .t, .layer-mapillary-signs .icon-sign.selected .icon-sign-body {
.layer-mapillary-signs .icon-sign.selected .t { outline: 2px solid rgba(255,0,0,0.8);
z-index: 80; z-index: 80;
} }
/* Mapillary viewer */
#mly .domRenderer .TagSymbol {
font-size: 10px;
background-color: rgba(0, 0, 0, 0.4);
padding: 0 4px;
border-radius: 4px;
transform: translate(-50%, -120%) !important;
}
#mly .domRenderer .Attribution {
width: 100%;
font-size: 10px;
text-align: right;
}
.mapillary-wrap {
position: absolute;
bottom: 30px;
width: 330px;
height: 250px;
padding: 5px;
background-color: #fff;
}
.mapillary-wrap.hidden {
visibility: hidden;
}
.mapillary-wrap button.thumb-hide {
border-radius: 0;
padding: 5px;
position: absolute;
right: 0;
top: 0;
z-index: 500;
}
.mly-wrapper {
visibility: hidden;
width: 100%;
height: 100%;
}
.mly-wrapper.active {
visibility: visible;
}
/* Fill Styles */ /* Fill Styles */
.low-zoom.fill-wireframe path.stroke, .low-zoom.fill-wireframe path.stroke,
@ -4041,6 +4083,14 @@ img.wiki-image {
background: rgba(0,0,0,.8); background: rgba(0,0,0,.8);
} }
/* hidden field to prevent user from tabbing out of the sidebar */
input.key-trap {
height: 0px;
width: 0px;
padding: 0px;
border: 1px solid rgba(0,0,0,0);
}
/* Fullscreen button */ /* Fullscreen button */
div.full-screen { div.full-screen {
float: right; float: right;
@ -6034,37 +6084,6 @@ li.hide + li.version .badge .tooltip .tooltip-arrow {
color: #7092FF; color: #7092FF;
} }
.mapillary-wrap {
position: absolute;
bottom: 30px;
width: 330px;
height: 250px;
padding: 5px;
background-color: #fff;
}
.mapillary-wrap.hidden {
visibility: hidden;
}
.mapillary-wrap button.thumb-hide {
border-radius: 0;
padding: 5px;
position: absolute;
right: 0;
top: 0;
z-index: 500;
}
.mly-wrapper {
visibility: hidden;
width: 100%;
height: 100%;
}
.mly-wrapper.active {
visibility: visible;
}
/* Right-to-left localization settings */ /* Right-to-left localization settings */

817
vendor/assets/iD/iD.js vendored

File diff suppressed because one or more lines are too long

View file

@ -315,6 +315,18 @@
<symbol id="poi-vertex" viewBox="400 350 15 15"> <symbol id="poi-vertex" viewBox="400 350 15 15">
<path d="M407.5,354.5 C409.157,354.5 410.5,355.843 410.5,357.5 C410.5,359.157 409.157,360.5 407.5,360.5 C405.843,360.5 404.5,359.157 404.5,357.5 C404.5,355.843 405.843,354.5 407.5,354.5 z" fill="currentColor" id="poi-vertex-shape"/> <path d="M407.5,354.5 C409.157,354.5 410.5,355.843 410.5,357.5 C410.5,359.157 409.157,360.5 407.5,360.5 C405.843,360.5 404.5,359.157 404.5,357.5 C404.5,355.843 405.843,354.5 407.5,354.5 z" fill="currentColor" id="poi-vertex-shape"/>
</symbol> </symbol>
<symbol id="poi-taoist" viewBox="640 335 15 15">
<path d="M647.5,350 C651.634,350 655,346.605 655,342.5 C655,338.395 651.654,335 647.5,335 C643.346,335 640,338.364 640,342.5 C640,346.636 643.366,350 647.5,350 z M647.5,348.929 C643.943,348.929 641.071,346.057 641.071,342.5 C641.071,338.943 643.943,336.071 647.5,336.071 C650.714,336.071 651.786,341.942 647.5,342.5 C643.214,343.058 644.377,348.929 647.5,348.929 z M647.5,346.786 C646.908,346.786 646.429,346.306 646.429,345.714 C646.429,345.123 646.908,344.643 647.5,344.643 C648.092,344.643 648.571,345.123 648.571,345.714 C648.571,346.306 648.092,346.786 647.5,346.786 z M647.5,340.357 C648.092,340.357 648.571,339.877 648.571,339.286 C648.571,338.694 648.092,338.214 647.5,338.214 C646.908,338.214 646.429,338.694 646.429,339.286 C646.429,339.877 646.908,340.357 647.5,340.357 z" fill="currentColor" id="poi-taoist-shape"/>
</symbol>
<symbol id="poi-sikhist" viewBox="625 335 15 15">
<path d="M632.483,335 L631.397,336.071 C631.465,336.539 631.482,336.902 631.533,337.31 C630.206,337.717 629.225,338.915 629.225,340.357 C629.225,341.811 630.224,343.007 631.567,343.404 C631.511,343.807 631.474,344.186 631.397,344.643 L631.94,345.179 L631.94,345.614 C630.942,344.949 629.88,344.209 629.225,343.571 C627.022,341.429 627.604,337.679 630.311,336.071 C628.145,336.607 626,338.545 626,341.429 C626,344.643 629.225,345.714 629.225,346.786 L630.311,345.714 L631.702,346.484 C631.037,346.891 630.311,347.321 630.311,347.321 L630.854,347.857 L632.008,347.221 L632.008,347.991 C631.655,348.168 631.397,348.512 631.397,348.929 C631.397,349.52 631.883,350 632.483,350 C633.083,350 633.569,349.52 633.569,348.929 C633.569,348.512 633.345,348.168 632.992,347.991 L632.992,347.221 L634.112,347.857 L634.655,347.321 C634.655,347.321 633.89,346.847 633.298,346.484 L634.655,345.714 L635.742,346.786 C635.742,345.714 639,344.643 639,341.429 C639,338.545 636.828,336.607 634.655,336.071 C637.371,337.679 637.951,341.429 635.742,343.571 C635.076,344.217 634.039,344.976 633.026,345.647 L633.026,345.179 L633.569,344.643 C633.494,344.199 633.454,343.813 633.399,343.404 C634.742,343.007 635.742,341.811 635.742,340.357 C635.742,338.904 634.742,337.708 633.399,337.31 C633.454,336.902 633.494,336.515 633.569,336.071 L632.483,335 z M633.264,338.348 C634.08,338.657 634.655,339.444 634.655,340.357 C634.655,341.271 634.08,342.058 633.264,342.366 C633.132,340.985 633.132,339.729 633.264,338.348 z M631.634,338.382 C631.644,338.378 631.659,338.386 631.668,338.382 C631.815,339.871 631.832,341.042 631.702,342.366 C630.886,342.058 630.311,341.271 630.311,340.357 C630.311,339.47 630.855,338.707 631.634,338.382 z M629.768,347.857 C629.468,347.857 629.225,348.097 629.225,348.393 C629.225,348.689 629.468,348.929 629.768,348.929 C630.068,348.929 630.311,348.689 630.311,348.393 C630.311,348.097 630.068,347.857 629.768,347.857 z M635.198,347.857 C634.898,347.857 634.655,348.097 634.655,348.393 C634.655,348.689 634.898,348.929 635.198,348.929 C635.498,348.929 635.742,348.689 635.742,348.393 C635.742,348.097 635.498,347.857 635.198,347.857 z" fill="currentColor" id="poi-sikhist-shape"/>
</symbol>
<symbol id="poi-nuclear" viewBox="610 335 15 15">
<path d="M618.747,344.066 L621.384,348.417 C619.987,349.263 618.348,349.635 616.688,349.456 C615.673,349.345 614.704,349.033 613.829,348.542 L616.321,344.107 C616.6,344.264 616.91,344.363 617.237,344.399 C617.776,344.457 618.298,344.339 618.747,344.066 z M621.321,335.549 L618.727,339.925 C619.47,340.365 619.927,341.167 619.912,342.044 L624.999,342.133 C625.046,339.41 623.622,336.913 621.321,335.549 z M613.765,335.5 C611.636,336.724 610.221,338.918 610.024,341.411 C610.007,341.626 609.999,341.833 610,342.04 L615.088,342.018 C615.088,341.95 615.09,341.883 615.096,341.809 C615.159,341.009 615.613,340.305 616.301,339.909 L613.765,335.5 z M619.019,342.022 C619.019,341.22 618.368,340.569 617.565,340.569 C616.763,340.569 616.112,341.22 616.112,342.022 C616.112,342.825 616.763,343.476 617.565,343.476 C618.368,343.476 619.019,342.825 619.019,342.022 z" fill="currentColor" id="poi-nuclear-shape"/>
</symbol>
<symbol id="poi-wind" viewBox="595 335 15 15">
<path d="M603,341.25 L603,349.5 C603,349.845 602.845,350 602.5,350 C602.155,350 602,349.845 602,349.5 L602,343 L603,341.25 z M598.5,335.5 C598.68,335.771 601.75,339.5 601.75,339.5 L600,343.75 C599.841,344.142 600,344.981 600.25,344.75 C600.664,344.368 603,340 603,340 L607,338.8 C607.524,338.655 607.882,338 607.5,338 C606.946,338 602.854,338.456 602.854,338.456 L599.5,335.5 C599.123,335.154 598.302,335.202 598.5,335.5 z" fill="currentColor" id="poi-wind-shape"/>
</symbol>
<symbol id="poi-binoculars" viewBox="580 335 15 15"> <symbol id="poi-binoculars" viewBox="580 335 15 15">
<path d="M591,337.5 C592,339 592,339 592.5,340.344 C593,341.344 593,344.5 593,345.5 C593,346 589,346 589,345.5 C589,344.5 589,344.844 589,344.344 C589,343.844 588.5,343.5 588.5,343 L588.5,342.5 L586.5,342.5 L586.5,343 C586.5,343.5 586,343.844 586,344.344 L586,345.5 C586,346 582,346 582,345.5 C582,344.5 582,341.344 582.5,340.344 C583,339 583,339 584,337.5 C584,337 586,337 586,337.5 L586,338.5 L589,338.5 C589,338.5 589,338 589,337.5 C589,337 591,337 591,337.5 z M582.5,346.5 C581.948,346.5 581.5,347.06 581.5,347.75 L581.5,347.75 C581.5,348.44 581.948,349 582.5,349 L585.5,349 C586.052,349 586.5,348.44 586.5,347.75 L586.5,347.75 C586.5,347.06 586.052,346.5 585.5,346.5 L582.5,346.5 z M589.5,346.5 C588.948,346.5 588.5,347.06 588.5,347.75 L588.5,347.75 C588.5,348.44 588.948,349 589.5,349 L592.5,349 C593.052,349 593.5,348.44 593.5,347.75 L593.5,347.75 C593.5,347.06 593.052,346.5 592.5,346.5 L589.5,346.5 z M584.5,336 C584.224,336 584,336.224 584,336.5 L584,336.5 C584,336.776 584.224,337 584.5,337 L585.5,337 C585.776,337 586,336.776 586,336.5 L586,336.5 C586,336.224 585.776,336 585.5,336 L584.5,336 z M589.5,336 C589.224,336 589,336.224 589,336.5 L589,336.5 C589,336.776 589.224,337 589.5,337 L590.5,337 C590.776,337 591,336.776 591,336.5 L591,336.5 C591,336.224 590.776,336 590.5,336 L589.5,336 z" fill="currentColor" id="poi-binoculars-shape"/> <path d="M591,337.5 C592,339 592,339 592.5,340.344 C593,341.344 593,344.5 593,345.5 C593,346 589,346 589,345.5 C589,344.5 589,344.844 589,344.344 C589,343.844 588.5,343.5 588.5,343 L588.5,342.5 L586.5,342.5 L586.5,343 C586.5,343.5 586,343.844 586,344.344 L586,345.5 C586,346 582,346 582,345.5 C582,344.5 582,341.344 582.5,340.344 C583,339 583,339 584,337.5 C584,337 586,337 586,337.5 L586,338.5 L589,338.5 C589,338.5 589,338 589,337.5 C589,337 591,337 591,337.5 z M582.5,346.5 C581.948,346.5 581.5,347.06 581.5,347.75 L581.5,347.75 C581.5,348.44 581.948,349 582.5,349 L585.5,349 C586.052,349 586.5,348.44 586.5,347.75 L586.5,347.75 C586.5,347.06 586.052,346.5 585.5,346.5 L582.5,346.5 z M589.5,346.5 C588.948,346.5 588.5,347.06 588.5,347.75 L588.5,347.75 C588.5,348.44 588.948,349 589.5,349 L592.5,349 C593.052,349 593.5,348.44 593.5,347.75 L593.5,347.75 C593.5,347.06 593.052,346.5 592.5,346.5 L589.5,346.5 z M584.5,336 C584.224,336 584,336.224 584,336.5 L584,336.5 C584,336.776 584.224,337 584.5,337 L585.5,337 C585.776,337 586,336.776 586,336.5 L586,336.5 C586,336.224 585.776,336 585.5,336 L584.5,336 z M589.5,336 C589.224,336 589,336.224 589,336.5 L589,336.5 C589,336.776 589.224,337 589.5,337 L590.5,337 C590.776,337 591,336.776 591,336.5 L591,336.5 C591,336.224 590.776,336 590.5,336 L589.5,336 z" fill="currentColor" id="poi-binoculars-shape"/>
</symbol> </symbol>
@ -354,6 +366,15 @@
<symbol id="poi-vending-machine" viewBox="400 335 15 15"> <symbol id="poi-vending-machine" viewBox="400 335 15 15">
<path d="M412,335 C412.552,335 413,335.448 413,336 L413,349 C413,349.552 412.552,350 412,350 L403,350 C402.448,350 402,349.552 402,349 L402,336 C402,335.448 402.448,335 403,335 L412,335 z M409,346 L406,346 L406,347.5 L409,347.5 L409,346 z M409,341 L408,341 L408,342 L409,342 L409,341 z M405,341 L404,341 L404,342 L405,342 L405,341 z M407,341 L406,341 L406,342 L407,342 L407,341 z M411,341 L410,341 L410,342 L411,342 L411,341 z M411,339 L410,339 L410,340 L411,340 L411,339 z M407,339 L406,339 L406,340 L407,340 L407,339 z M405,339 L404,339 L404,340 L405,340 L405,339 z M409,339 L408,339 L408,340 L409,340 L409,339 z M409,337 L408,337 L408,338 L409,338 L409,337 z M405,337 L404,337 L404,338 L405,338 L405,337 z M407,337 L406,337 L406,338 L407,338 L407,337 z M411,337 L410,337 L410,338 L411,338 L411,337 z" fill="currentColor" id="poi-vending-machine-shape"/> <path d="M412,335 C412.552,335 413,335.448 413,336 L413,349 C413,349.552 412.552,350 412,350 L403,350 C402.448,350 402,349.552 402,349 L402,336 C402,335.448 402.448,335 403,335 L412,335 z M409,346 L406,346 L406,347.5 L409,347.5 L409,346 z M409,341 L408,341 L408,342 L409,342 L409,341 z M405,341 L404,341 L404,342 L405,342 L405,341 z M407,341 L406,341 L406,342 L407,342 L407,341 z M411,341 L410,341 L410,342 L411,342 L411,341 z M411,339 L410,339 L410,340 L411,340 L411,339 z M407,339 L406,339 L406,340 L407,340 L407,339 z M405,339 L404,339 L404,340 L405,340 L405,339 z M409,339 L408,339 L408,340 L409,340 L409,339 z M409,337 L408,337 L408,338 L409,338 L409,337 z M405,337 L404,337 L404,338 L405,338 L405,337 z M407,337 L406,337 L406,338 L407,338 L407,337 z M411,337 L410,337 L410,338 L411,338 L411,337 z" fill="currentColor" id="poi-vending-machine-shape"/>
</symbol> </symbol>
<symbol id="poi-shintoist" viewBox="640 320 15 15">
<path d="M640,320 C640,321.071 640.701,321.756 641.071,322.126 C641.442,322.496 641.974,322.353 641.974,322.632 C641.974,322.632 642.143,323.198 642.679,323.198 L644.018,323.198 C644.018,323.506 644.286,323.733 644.286,323.733 C644.286,323.733 644.018,323.884 644.018,324.269 L642.679,324.269 C642.143,324.269 642.143,324.537 642.143,324.805 C642.143,325.37 642.143,325.876 642.143,325.876 C642.143,326.133 642.39,326.412 642.679,326.412 C642.967,326.412 644.018,326.412 644.018,326.412 L644.018,327.483 L643.214,327.483 C643.214,327.918 643.504,328.267 644.018,328.555 C644.018,328.894 644.018,334.448 644.018,334.448 C644.018,335.153 645.625,335.214 645.625,334.448 L645.625,326.412 L649.375,326.412 L649.375,334.448 C649.375,335.189 650.982,335.137 650.982,334.448 C650.982,334.448 650.982,328.894 650.982,328.555 C651.496,328.221 651.786,327.92 651.786,327.483 L650.982,327.483 L650.982,326.412 C650.982,326.412 652.033,326.412 652.321,326.412 C652.558,326.412 652.857,326.133 652.857,325.876 C652.857,325.876 652.857,325.34 652.857,324.805 C652.857,324.269 652.563,324.269 652.321,324.269 L650.982,324.269 C651.008,323.986 650.714,323.733 650.714,323.733 C650.714,323.733 650.982,323.506 650.982,323.198 L652.321,323.198 C652.857,323.198 652.857,322.662 652.857,322.662 C652.857,322.409 653.482,322.513 653.929,322.126 C654.376,321.739 655,321.071 655,320 C648.571,321.071 645.357,321.071 640,320 z M645.625,323.198 C645.625,323.198 646.696,323.198 646.696,323.198 L646.696,324.269 L645.625,324.269 C645.625,323.961 645.357,323.733 645.357,323.733 C645.357,323.733 645.625,323.531 645.625,323.198 z M648.304,323.198 L649.375,323.198 C649.375,323.481 649.643,323.733 649.643,323.733 C649.643,323.733 649.375,323.986 649.375,324.269 L648.304,324.269 z" fill="currentColor" id="poi-shintoist-shape"/>
</symbol>
<symbol id="poi-hinduist" viewBox="625 320 15 15">
<path d="M631.421,322.083 C631.421,322.083 633.132,325.139 635.702,322.625 C636.056,323.167 636.772,324.25 636.772,324.25 C636.772,324.25 633.087,326.802 631.421,322.083 z M626.07,324.25 C626.379,324.91 626.777,325.72 627.14,326.417 C627.68,325.333 629.281,325.333 629.281,325.333 C630.351,325.333 631.136,325.758 631.136,326.446 C631.136,327.134 630.351,327.5 629.281,327.5 C629.281,327.5 629.281,328.583 629.281,329.125 C630.684,328.856 631.424,329.98 631.081,330.758 C630.431,332.23 626.61,332.404 625,329.667 C625,333.987 628.683,334 629.281,334 C631.421,334 632.492,331.833 632.492,329.667 C633.049,330.255 633.942,330.258 634.632,329.667 C635.6,328.838 635.979,327.489 637.308,327.5 C638.928,327.513 638.913,330.75 637.843,331.833 C636.772,332.917 634.21,332.532 633.562,330.75 C633.562,331.833 633.562,334.001 636.772,334 C639.983,333.998 640.634,330.334 639.448,327.5 C638.715,325.748 637.343,325.279 635.863,325.743 C634.72,326.102 634.772,326.615 634.097,327.5 C633.744,327.929 633.562,328.583 632.492,328.583 C632.12,328.583 631.666,328.286 631.421,328.042 C632.746,327.083 632.551,325.239 631.421,324.25 C629.936,322.95 627.312,323.216 626.07,324.25 z M632.492,322.083 L633.562,321 L634.632,322.083 L633.562,323.167 z" fill="currentColor" id="poi-hinduist-shape"/>
</symbol>
<symbol id="poi-windmill" viewBox="610 320 15 15">
<path d="M614.833,320 L613.833,321 L616.5,323.667 L617.167,322.333 L614.833,320 z M613.667,321.167 L613.167,321.667 L616,324.5 L616.5,324 L613.667,321.167 z M621.667,321.167 L618.833,324 L619.333,324.5 L622.167,321.667 L621.667,321.167 z M622.333,321.833 L619.667,324.5 L621,325.167 L623.333,322.833 L622.333,321.833 z M617.667,323.167 L614.552,326.281 L614.333,326.167 L612,328.5 L613,329.5 L614.271,328.229 L614.229,328.604 L613.167,329.667 L613.667,330.167 L614.094,329.74 L613.667,333.333 C612,333.667 611,335 611,335 L624.333,335 C624.333,335 623.333,333.667 621.667,333.333 L621.333,330.5 L621.5,330.333 L621.292,330.156 L621.24,329.74 L621.667,330.167 L622.167,329.667 L621.104,328.604 L620.833,326.333 L617.667,323.167 z M617.167,327 L618.167,327 L618.5,329 L616.833,329 L617.167,327 z" fill="currentColor" id="poi-windmill-shape"/>
</symbol>
<symbol id="poi-elevator" viewBox="595 320 15 15"> <symbol id="poi-elevator" viewBox="595 320 15 15">
<path d="M602.5,335 C602.5,335 598,328 598,328 L607,328 C607,328 602.5,335 602.5,335 z M602.5,320 C602.5,320 607,327 607,327 L598,327 C598,327 602.5,320 602.5,320 z" fill="currentColor" id="poi-elevator-shape"/> <path d="M602.5,335 C602.5,335 598,328 598,328 L607,328 C607,328 602.5,335 602.5,335 z M602.5,320 C602.5,320 607,327 607,327 L598,327 C598,327 602.5,320 602.5,320 z" fill="currentColor" id="poi-elevator-shape"/>
</symbol> </symbol>

Before

Width:  |  Height:  |  Size: 262 KiB

After

Width:  |  Height:  |  Size: 271 KiB

Before After
Before After

View file

@ -120,6 +120,14 @@
"incomplete_relation": { "incomplete_relation": {
"single": "لا يمكن حذف هذا العنصر لأنه لم يكتمل تنزيله من الإنترنت.", "single": "لا يمكن حذف هذا العنصر لأنه لم يكتمل تنزيله من الإنترنت.",
"multiple": "لا يمكن حذف هذه العناصر لأنه لم يكتمل تنزيلها من الإنترنت." "multiple": "لا يمكن حذف هذه العناصر لأنه لم يكتمل تنزيلها من الإنترنت."
},
"part_of_relation": {
"single": "لا يمكن حذف هذا العنصر لأنه جزء من علاقة أكبر. ينبغي إزالة العنصر من العلاقة أولا.",
"multiple": "لا يمكن حذف هذه العناصر لأنها جزء من علاقة أكبر. ينبغي إزالة تلك العناصر من العلاقة أولا. "
},
"connected_to_hidden": {
"single": "لا يمكن حذف هذا العنصر لأنه متصل بعنصر مخفي. ",
"multiple": "لا يمكن حذف هذه العناصر لأن بعضها متصل بعناصر مخفية."
} }
}, },
"add_member": { "add_member": {
@ -164,14 +172,40 @@
}, },
"key": "M", "key": "M",
"annotation": { "annotation": {
"point": "نقل نقطة", "point": "حركت نقطة.",
"vertex": "حركت نقطة في طريق.", "vertex": "حركت نقطة في طريق.",
"line": "حرك خطاً", "line": "حركت خطًا.",
"area": "حرك منطقة", "area": "حركت مساحة.",
"multiple": "تم تحريك عدد من العناصر." "multiple": "تم تحريك عدد من العناصر."
},
"incomplete_relation": {
"single": " لا يمكن تحريك هذا العنصر لأنه لم يتم تنزيله بالكامل.",
"multiple": "لا يمكن تحريك هذه العناصر لأنه لم يتم تنزيلها بالكامل."
},
"too_large": {
"single": " لا يمكن تحريك هذا العنصر لأنه لا يظهر منه ما يكفي حاليا.",
"multiple": "لا يمكن تحريك هذه العناصر لأنه لا يظهر منها ما يكفي حاليا."
},
"connected_to_hidden": {
"single": " لا يمكن تحريك هذا العنصر لأنه متصل بعنصر مخفي.",
"multiple": "لا يمكن تحريك هذه العناصر لأن بعضها متصل بعناصر مخفية."
} }
}, },
"reflect": { "reflect": {
"title": {
"long": "عكس طولي",
"short": "عكس عرضي"
},
"description": {
"long": {
"single": "عكس هذا العنصر حول محوره الطويل",
"multiple": "عكس هذه العناصر حول محورها الطويل."
},
"short": {
"single": "عكس هذا العنصر حول محوره القصير.",
"multiple": "عكس هذه العناصر حول محورها القصير."
}
},
"key": { "key": {
"long": "T", "long": "T",
"short": "Y" "short": "Y"
@ -179,29 +213,46 @@
}, },
"rotate": { "rotate": {
"title": "تدوير", "title": "تدوير",
"description": {
"single": "تدوير هذا العنصر حول مركزه.",
"multiple": "تدوير هذه العناصر حول مركزها."
},
"key": "R", "key": "R",
"annotation": { "annotation": {
"line": "تدوير خطا", "line": "تدوير خط.",
"area": "تدوير منطقة" "area": "تدوير مساحة.",
"multiple": "تدوير عدة عناصر."
},
"incomplete_relation": {
"single": " لا يمكن تدوير هذا العنصر لأنه لم يتم تنزيله بالكامل.",
"multiple": "لا يمكن تدوير هذه العناصر لأنه لم يكتمل تنزيلها بالكامل."
},
"too_large": {
"single": "لا يمكن تدوير هذا العنصر بسبب عدم ظهور مايكفي منه حاليا.",
"multiple": "لا يمكن تدوير هذه العناصر بسبب عدم ظهور مايكفي منها حاليا."
},
"connected_to_hidden": {
"single": "لا يمكن تدوير هذا العنصر لأنه متصل بعنصر مخفي. ",
"multiple": "لا يمكن تدوير هذه العناصر لأن بعضها متصل بعناصر مخفية."
} }
}, },
"reverse": { "reverse": {
"title": "اعكس الاتجاه", "title": "عكس الاتجاه",
"description": "اجعل هذا الخط يذهب في الجهة المعاكسة", "description": "اجعل هذا الخط يذهب في الاتجاه المعاكس.",
"key": "V", "key": "V",
"annotation": "اعكس خطا" "annotation": "عكس خط."
}, },
"split": { "split": {
"title": "فصل", "title": "فصل",
"description": { "description": {
"line": "افصل هذا الخط إلى قسمين عند هذه النقطة.", "line": "افصل هذا الخط إلى خطين عند هذه النقطة.",
"area": "تقسيم حدود هذه المنطقة إلى قسمين", "area": "تقسيم حدود هذه المساحة إلى قسمين.",
"multiple": "افصل الخطوط أو حدود المساحة عند هذه النقطة إلى قسمين." "multiple": "افصل الخطوط أو حدود المساحة عند هذه النقطة إلى قسمين."
}, },
"key": "X", "key": "X",
"annotation": { "annotation": {
"line": "افصل الخط.", "line": "افصل الخط.",
"area": "افصل حدود منطقة", "area": "افصل حدود مساحة.",
"multiple": "افصل حدود {n} خطوط/منطقة" "multiple": "افصل حدود {n} خطوط/منطقة"
}, },
"not_eligible": "لا يمكن فصل الخطوط عند البداية أو النهاية.", "not_eligible": "لا يمكن فصل الخطوط عند البداية أو النهاية.",
@ -261,7 +312,7 @@
"upload_explanation_with_user": "التغييرات التي قمت برفعها كـ {user} سوف تظهر على كل الخرائط التي تستخدم بيانات OpenStreetMap.", "upload_explanation_with_user": "التغييرات التي قمت برفعها كـ {user} سوف تظهر على كل الخرائط التي تستخدم بيانات OpenStreetMap.",
"save": "رفع", "save": "رفع",
"cancel": "إلغاء", "cancel": "إلغاء",
"changes": "{count} تغييرات", "changes": "عدد التغييرات: {count}",
"warnings": "تحذيرات", "warnings": "تحذيرات",
"modified": "عُدل", "modified": "عُدل",
"deleted": "حُذفت", "deleted": "حُذفت",
@ -430,7 +481,9 @@
}, },
"restore": { "restore": {
"heading": "لديك تعديلات غير محفوظة", "heading": "لديك تعديلات غير محفوظة",
"description": "هل ترغب باستعادة التغييرات الغير محفوظة من جلسة التعديل السابقة؟" "description": "هل ترغب باستعادة التغييرات الغير محفوظة من جلسة التعديل السابقة؟",
"restore": "استعادة تغييراتي",
"reset": "تجاهل تغييراتي"
}, },
"save": { "save": {
"title": "حفظ", "title": "حفظ",
@ -590,14 +643,34 @@
"click_townhall": "جميع العناصر على الخريطة يمكن تحديدها عن طريق النقر عليها. **انقر على النقطة لتحديدها.**", "click_townhall": "جميع العناصر على الخريطة يمكن تحديدها عن طريق النقر عليها. **انقر على النقطة لتحديدها.**",
"selected_townhall": "رائع! ، تم تحديد النقطة. العناصر المُحددة تظهر بحد متوهج ينبض باستمرار.", "selected_townhall": "رائع! ، تم تحديد النقطة. العناصر المُحددة تظهر بحد متوهج ينبض باستمرار.",
"editor_townhall": "عند تحديد عنصر، فإن *محرر العناصر* يظهر إلى جانب الخريطة على اليمين.", "editor_townhall": "عند تحديد عنصر، فإن *محرر العناصر* يظهر إلى جانب الخريطة على اليمين.",
"preset_townhall": "في الجزء العلوي من محرر العناصر يظهر نوع العنصر. هذه النقطة هي {preset}." "preset_townhall": "في الجزء العلوي من محرر العناصر يظهر نوع العنصر. هذه النقطة هي {preset}.",
"fields_townhall": "الجزء الأوسط من محرر العناصر يحتوي على *حقول* تعرض صفات وخصائص العنصر المُختار، مثل اسم العنصر وعنوانه.",
"close_townhall": "**يمكنك غلق محرر العناصر عن طريق الضغط على مفتاح الهروب في لوحة المفاتيح \"Esc\" أو النقر على زرّ {button} في الركن العلوي من محرر العناصر.**",
"search_street": "يمكنك أيضا البحث عن العناصر المختلفة في العرض الحالي، أو في جميع أنحاء العالم. **ابحث عن '{name}'.**",
"choose_street": "**اختر {name} من القائمة لاختيارها**",
"selected_street": "رائع! {name} مختارة الآن.",
"editor_street": "الحقول التي تظهر للشارع مختلفة عن الحقول التي تظهر لمبنى البلدية.{br}لهذا الشارع المختار، فإن محرر العناصر يُظهر حقول مثل '{field1}' و '{field2}'. **أغلق محرر العناصر عن طريق الضغط على مفتاح الهروب 'Esc' من لوحة المفاتيح أو عن طريق النقر على زرّ {button}.**",
"play": "جرّب تحريك الخريطة وانقر على بعض العناصر الأخرى لرؤية أنواع العناصر المختلفة التي يمكن إضافتها على OpenStreetMap. **عندما تكون مستعدًا للانتقال للجزء التالي من الجولة، أنقر '{next}'.**"
}, },
"points": { "points": {
"title": "النقاط", "title": "النقاط",
"undo": "يمكنك دوما التراجع عن أي تعديلات قمت بها حتى تقوم بحفظها على OpenStreetMap. **انقر على زرّ {button} للتراجع عن الحذف والبدء مجددا من نقطة سابقة.**" "add_point": "يمكن استخدام *النقاط* لتمثيل المتاجر، والمطاعم، والآثار ونحو ذلك.{br}يمكنك تحديد منطقة معينة، ووصف ما يوجد بها. **انقر على زرّ {button} لإضافة نقطة جديدة.**",
"place_point": "لوضع النقطة الجديدة على الخريطة، ضع مؤشر الفأرة في المكان الذي ترغب بإنشاء النقطة فيه، ثم انقر على الزرّ الأيسر للفأرة أو اضغط على مفتاح المسافة على لوحة المفاتيح. **حرّك مؤشر الفأرة حتى يكون على هذا المبنى، ثم انقر بالزرّ الأيسر للفأرة أو اضغط على مفتاح المسافة.**",
"search_cafe": "هناك العديد من العناصر المختلفة التي يمكن تمثيلها بالنقاط. النقطة التي اضفتها للتو عبارة عن مقهى. **ابحث عن '{preset}'.**",
"choose_cafe": "**اختر {preset} من القائمة.**",
"feature_editor": "النقطة الآن عبارة عن مقهى. باستخدام محرر العناصر، يمكنك إضافة المزيد من المعلومات عن المقهى.",
"add_name": "في OpenStreetMap جميع الحقول اختيارية، ولا بأس من ترك حقل ما فارغ إذا كنت غير متأكد مما سيكتب فيه.{br}دعنا نتظاهر حاليا بأنك تعرف هذا المقهى، وتعرف اسمه. **أضف اسما للمقهى.**",
"add_close": "محرر العناصر سيتذكّر جميع تغييراتك آليا. **عندما تنتهي من إضافة الاسم، اضغط مفتاح الهروب 'Esc'، أو مفتاح 'Enter'، أو اضغط على زرّ {button} لإغلاق محرر العناصر.**",
"reselect": "في كثير من الأحيان تكون النقاط موجودة مسبقا، ولكنها قد تحتوي أخطاءً أو قد تكون غير مكتملة.\nيمكنك تعديل النقاط الموجودة مسبقا. **انقر لاختيار المقهى الذي أنشأته للتو.**",
"update": "دعنا نملأ بعضا من التفاصيل لهذا المقهى. يمكنك تغيير اسمه، أو إضافة عنوانه، أو إضافة مشروب يقدمه هذا المقهى. **قم بتغيير بعض تفاصيل المقهى.**",
"update_close": "** عند انتهائك من تحديث تفاصيل المقهى، اضغط مفتاح 'Esc'، أو 'Enter'، أو اضغط زرّ {button} لإغلاق محرر العناصر.**",
"rightclick": "يمكنك النقر بالزر الأيمن للفأرة على أي عنصر لعرض *قائمة التحرير*، والتي تعرض قائمة من عمليات التحرير التي يمكن إجرائها على العنصر. **انقر بالزر الأيمن على النقطة التي أنشأتها وشاهد قائمة التحرير.**",
"delete": "لا بأس من حذف العناصر التي لا وجود لها فعليا في العالم الحقيقي.{br}حذف العناصر من OpenStreetMap يزيلها نهائيا من الخرائط التي يستخدمها الجميع. لذلك يجب عليك التأكد أن العنصر غير موجود فعليا قبل حذفه. **انقر على زرّ {button} لحذف النقطة.**",
"undo": "يمكنك دوما التراجع عن أي تعديلات قمت بها حتى تقوم بحفظها على OpenStreetMap. **انقر على زرّ {button} للتراجع عن الحذف والبدء مجددا من نقطة سابقة.**",
"play": "الآن وبعد معرفتك كيفية إنشاء وتحرير النقاط، حاول إنشاء بعض النقاط الأخرى وتحريرها لغرض التمرين! ** عندما تكون جاهز للمتابعة إلى الجزء التالي من الجولة انقر '{next}'.**"
}, },
"areas": { "areas": {
"title": "المناطق" "title": "المساحات"
}, },
"lines": { "lines": {
"title": "الخطوط", "title": "الخطوط",
@ -615,15 +688,42 @@
"shortcuts": { "shortcuts": {
"title": "اختصارات لوحة المفاتيح", "title": "اختصارات لوحة المفاتيح",
"tooltip": "عرض شاشة اختصارات لوحة المفاتيح", "tooltip": "عرض شاشة اختصارات لوحة المفاتيح",
"key": {
"home": "الرئيسية",
"return": "رجوع"
},
"gesture": {
"drag": "سحب"
},
"browsing": { "browsing": {
"help": { "help": {
"title": "المساعدة",
"keyboard": "عرض اختصارات لوحة المفاتيح" "keyboard": "عرض اختصارات لوحة المفاتيح"
} }
}, },
"editing": { "editing": {
"title": "تحرير",
"drawing": {
"title": "رسم",
"place_point": "أضف نقطة"
},
"operations": {
"title": "عمليات",
"reverse": "عكس الخط",
"delete": "حذف الميزات المحددة"
},
"commands": { "commands": {
"title": "الأوامر",
"save": "حفظ التغييرات" "save": "حفظ التغييرات"
} }
},
"tools": {
"title": "أدوات",
"info": {
"history": "تبديل لوحة السجل",
"location": "تبديل لوحة الموقع",
"measurement": "تبديل لوحة القياس"
}
} }
}, },
"presets": { "presets": {
@ -866,7 +966,11 @@
"label": "حامل كاميرا" "label": "حامل كاميرا"
}, },
"camera/type": { "camera/type": {
"label": "نوع الكاميرا" "label": "نوع الكاميرا",
"options": {
"dome": "قبة",
"fixed": "ثابت"
}
}, },
"capacity": { "capacity": {
"label": "السعة", "label": "السعة",
@ -919,9 +1023,6 @@
"label": "رابط كاميرا الويب", "label": "رابط كاميرا الويب",
"placeholder": "http://example.com" "placeholder": "http://example.com"
}, },
"content": {
"label": "المحتويات"
},
"country": { "country": {
"label": "الدولة" "label": "الدولة"
}, },
@ -971,8 +1072,12 @@
"shared_lane": { "shared_lane": {
"description": "مسار دراجات غير مفصول عن حركة مرور السيارات", "description": "مسار دراجات غير مفصول عن حركة مرور السيارات",
"title": "مسار دراجات مشترك" "title": "مسار دراجات مشترك"
},
"track": {
"title": "مسار الدراجة"
} }
}, },
"placeholder": "لا شيء",
"types": { "types": {
"cycleway:left": "جانب أيسر", "cycleway:left": "جانب أيسر",
"cycleway:right": "جانب أيمن" "cycleway:right": "جانب أيمن"
@ -993,6 +1098,9 @@
"description": { "description": {
"label": "الوصف" "label": "الوصف"
}, },
"display": {
"label": "عرض"
},
"dock": { "dock": {
"label": "النوع" "label": "النوع"
}, },
@ -1036,7 +1144,9 @@
"label": "النوع" "label": "النوع"
}, },
"fire_hydrant/position": { "fire_hydrant/position": {
"label": "موضع",
"options": { "options": {
"green": "أخضر",
"lane": "حارة طريق", "lane": "حارة طريق",
"parking_lot": "ساحة وقوف سيارات", "parking_lot": "ساحة وقوف سيارات",
"sidewalk": "رصيف" "sidewalk": "رصيف"
@ -1137,6 +1247,9 @@
"internet_access/fee": { "internet_access/fee": {
"label": "رسوم استخدام خدمة الإنترنت" "label": "رسوم استخدام خدمة الإنترنت"
}, },
"label": {
"label": "وسم"
},
"lamp_type": { "lamp_type": {
"label": "النوع" "label": "النوع"
}, },
@ -1204,7 +1317,8 @@
"label": "النوع" "label": "النوع"
}, },
"maxheight": { "maxheight": {
"label": "أقصى ارتفاع" "label": "أقصى ارتفاع",
"placeholder": "4, 4.5, 5, 14'0\", 14'6\", 15'0\""
}, },
"maxspeed": { "maxspeed": {
"label": "حدود السرعة", "label": "حدود السرعة",
@ -1213,6 +1327,9 @@
"maxweight": { "maxweight": {
"label": "أقصى وزن" "label": "أقصى وزن"
}, },
"mtb/scale": {
"placeholder": "0, 1, 2, 3..."
},
"mtb/scale/imba": { "mtb/scale/imba": {
"options": { "options": {
"1": "سهل (دائرة خضراء)" "1": "سهل (دائرة خضراء)"
@ -1242,10 +1359,24 @@
} }
}, },
"network_foot": { "network_foot": {
"label": "نوع الشبكة" "label": "نوع الشبكة",
"options": {
"iwn": "دولي",
"lwn": "محلي",
"nwn": "وطني",
"rwn": "إقليمي"
},
"placeholder": "محلي، إقليمي، وطني، دولي"
}, },
"network_horse": { "network_horse": {
"label": "نوع الشبكة" "label": "نوع الشبكة",
"options": {
"ihn": "دولي",
"lhn": "محلي",
"nhn": "وطني",
"rhn": "إقليمي"
},
"placeholder": "محلي، إقليمي، وطني، دولي"
}, },
"network_road": { "network_road": {
"label": "الشبكة" "label": "الشبكة"
@ -1999,6 +2130,10 @@
"name": "منظم حفلات", "name": "منظم حفلات",
"terms": "منظم حفلات; متعهد حفلات;حفلة;حفلات" "terms": "منظم حفلات; متعهد حفلات;حفلة;حفلات"
}, },
"craft/electrician": {
"name": "كهربائي",
"terms": "كهربائي"
},
"craft/gardener": { "craft/gardener": {
"name": "بستاني" "name": "بستاني"
}, },
@ -2162,6 +2297,9 @@
"name": "منطقة خدمة", "name": "منطقة خدمة",
"terms": "خدمة سيارات; منطقة خدمة سيارات; منطقة خدمية" "terms": "خدمة سيارات; منطقة خدمة سيارات; منطقة خدمية"
}, },
"highway/speed_camera": {
"name": "كاميرا مراقبة"
},
"highway/steps": { "highway/steps": {
"name": "درج", "name": "درج",
"terms": "درج" "terms": "درج"
@ -2434,6 +2572,10 @@
"name": "حوض سباحة", "name": "حوض سباحة",
"terms": "حمام سباحة; حوض سباحة; حمام; حوض; سباحة; مسبح" "terms": "حمام سباحة; حوض سباحة; حمام; حوض; سباحة; مسبح"
}, },
"leisure/water_park": {
"name": "ملاهي مائية",
"terms": "ملاهي مائية"
},
"line": { "line": {
"name": "طريق", "name": "طريق",
"terms": "طريق" "terms": "طريق"
@ -2450,6 +2592,10 @@
"name": "كاسر الأمواج", "name": "كاسر الأمواج",
"terms": "كاسر الأمواج" "terms": "كاسر الأمواج"
}, },
"man_made/bridge": {
"name": "جسر",
"terms": "جسر"
},
"man_made/chimney": { "man_made/chimney": {
"name": "مدخنة" "name": "مدخنة"
}, },
@ -2515,6 +2661,10 @@
"name": "محطة مياه", "name": "محطة مياه",
"terms": "محطة مياه" "terms": "محطة مياه"
}, },
"man_made/works": {
"name": "مصنع",
"terms": "مصنع"
},
"natural": { "natural": {
"name": "طبيعي", "name": "طبيعي",
"terms": "طبيعي" "terms": "طبيعي"
@ -2612,6 +2762,10 @@
"name": "غابة أخشاب", "name": "غابة أخشاب",
"terms": "غابة أخشاب" "terms": "غابة أخشاب"
}, },
"noexit/yes": {
"name": "لا يوجد مخرج",
"terms": "لا يوجد مخرج"
},
"office": { "office": {
"name": "مكتب", "name": "مكتب",
"terms": "مكتب" "terms": "مكتب"
@ -3048,6 +3202,10 @@
"name": "محل بيع وتأجير الأفلام", "name": "محل بيع وتأجير الأفلام",
"terms": "محل بيع وتأجير الأفلام" "terms": "محل بيع وتأجير الأفلام"
}, },
"shop/video_games": {
"name": "متجر العاب الفيديو",
"terms": "متجر العاب الفيديو"
},
"shop/weapons": { "shop/weapons": {
"name": "متجر أسلحة" "name": "متجر أسلحة"
}, },
@ -3149,6 +3307,22 @@
"name": "قيود", "name": "قيود",
"terms": "قيود" "terms": "قيود"
}, },
"type/restriction/no_u_turn": {
"name": "لا يوجد دوران",
"terms": "لا يوجد دوران"
},
"type/restriction/only_left_turn": {
"name": "منعطف لليسار فقط",
"terms": "منعطف لليسار فقط"
},
"type/restriction/only_right_turn": {
"name": "منعطف لليمين فقط",
"terms": "منعطف لليمين فقط"
},
"type/restriction/only_straight_on": {
"name": "لا يوجد منعطفات",
"terms": "لا يوجد منعطفات"
},
"type/route": { "type/route": {
"name": "مسار", "name": "مسار",
"terms": "مسار" "terms": "مسار"
@ -3205,6 +3379,10 @@
"name": "مسار رئيسي", "name": "مسار رئيسي",
"terms": "مسار رئيسي" "terms": "مسار رئيسي"
}, },
"type/site": {
"name": "موقع",
"terms": "موقع"
},
"vertex": { "vertex": {
"name": "أخرى", "name": "أخرى",
"terms": "أخرى" "terms": "أخرى"
@ -3212,6 +3390,10 @@
"waterway": { "waterway": {
"name": "مجرى مائي" "name": "مجرى مائي"
}, },
"waterway/boatyard": {
"name": "ساحة بناء المراكب",
"terms": "ساحة بناء المراكب"
},
"waterway/canal": { "waterway/canal": {
"name": "قناة", "name": "قناة",
"terms": "قناة" "terms": "قناة"
@ -3224,6 +3406,10 @@
"name": "خندق", "name": "خندق",
"terms": "خندق" "terms": "خندق"
}, },
"waterway/dock": {
"name": "رصيف بحري رطب/رصيف بحري جاف",
"terms": "رصيف بحري رطب/رصيف بحري جاف"
},
"waterway/drain": { "waterway/drain": {
"name": "مصرف مياه", "name": "مصرف مياه",
"terms": "مصرف مياه" "terms": "مصرف مياه"
@ -3238,18 +3424,27 @@
}, },
"waterway/riverbank": { "waterway/riverbank": {
"name": "ضفة نهر", "name": "ضفة نهر",
"terms": "شاطيء نهر" "terms": "ضفة النهر"
},
"waterway/sanitary_dump_station": {
"name": "التخلص من مرحاض البحر",
"terms": "التخلص من مرحاض البحر"
}, },
"waterway/stream": { "waterway/stream": {
"name": "مجرى", "name": "مجرى",
"terms": "مجرى" "terms": "مجرى"
}, },
"waterway/water_point": {
"name": "مياه الشرب البحرية",
"terms": "مياه الشرب البحرية"
},
"waterway/waterfall": { "waterway/waterfall": {
"name": "شلال" "name": "شلال",
"terms": "شلال"
}, },
"waterway/weir": { "waterway/weir": {
"name": "هدار سد صغير", "name": "سد",
"terms": "هدار سد صغير" "terms": "سد"
} }
} }
}, },
@ -3335,6 +3530,16 @@
}, },
"stamen-terrain-background": { "stamen-terrain-background": {
"name": "ستامن تيرين" "name": "ستامن تيرين"
},
"tf-cycle": {
"attribution": {
"text": "Maps © Thunderforest, Data © OpenStreetMap contributors"
}
},
"tf-landscape": {
"attribution": {
"text": "Maps © Thunderforest, Data © OpenStreetMap contributors"
}
} }
} }
} }

View file

@ -907,9 +907,6 @@
"construction": { "construction": {
"label": "Tipu" "label": "Tipu"
}, },
"content": {
"label": "Conteníu"
},
"country": { "country": {
"label": "País" "label": "País"
}, },

View file

@ -1064,9 +1064,6 @@
"label": "URL de la webcam", "label": "URL de la webcam",
"placeholder": "http://example.com/" "placeholder": "http://example.com/"
}, },
"content": {
"label": "Continguts"
},
"country": { "country": {
"label": "País" "label": "País"
}, },

View file

@ -1216,9 +1216,6 @@
"label": "URL webkamery", "label": "URL webkamery",
"placeholder": "http://priklad.cz/" "placeholder": "http://priklad.cz/"
}, },
"content": {
"label": "Obsah"
},
"country": { "country": {
"label": "Stát" "label": "Stát"
}, },

View file

@ -1184,9 +1184,6 @@
"label": "Webcam-URL", "label": "Webcam-URL",
"placeholder": "http://example.com/" "placeholder": "http://example.com/"
}, },
"content": {
"label": "Indhold"
},
"country": { "country": {
"label": "Land" "label": "Land"
}, },

View file

@ -491,7 +491,7 @@
}, },
"service_roads": { "service_roads": {
"description": "Erschließungsstraßen", "description": "Erschließungsstraßen",
"tooltip": "Erschließungsstraßen, Zufahrtsstraßen, Parkplatzstraßen, Feldwege, Waldwege, etc." "tooltip": "Erschließungsstraßen, Zufahrtsstraßen, Parkplatzstraßen, Waldwege, Feldwege, etc."
}, },
"paths": { "paths": {
"description": "Wege", "description": "Wege",
@ -1341,6 +1341,9 @@
"clockwise": "im Uhrzeigersinn" "clockwise": "im Uhrzeigersinn"
} }
}, },
"clothes": {
"label": "Kleidung"
},
"club": { "club": {
"label": "Typ" "label": "Typ"
}, },
@ -1358,7 +1361,7 @@
"placeholder": "http://example.com/" "placeholder": "http://example.com/"
}, },
"content": { "content": {
"label": "Inhalte" "label": "Inhalt"
}, },
"country": { "country": {
"label": "Land" "label": "Land"
@ -1527,6 +1530,10 @@
"generator/method": { "generator/method": {
"label": "Methode" "label": "Methode"
}, },
"generator/output/electricity": {
"label": "Leistung",
"placeholder": "50 MW, 100 MW, 200 MW..."
},
"generator/source": { "generator/source": {
"label": "Quelle" "label": "Quelle"
}, },
@ -1891,6 +1898,10 @@
"plant": { "plant": {
"label": "Pflanze" "label": "Pflanze"
}, },
"plant/output/electricity": {
"label": "Leistung",
"placeholder": "500 MW, 1000 MW, 2000 MW..."
},
"population": { "population": {
"label": "Bevölkerung" "label": "Bevölkerung"
}, },
@ -2144,7 +2155,7 @@
"label": "Typ" "label": "Typ"
}, },
"tracktype": { "tracktype": {
"label": "Typ des Feld-/Waldweges", "label": "Typ des Wald-/Feldweges",
"options": { "options": {
"grade1": "Grad 1 - Fest: befestigt oder sehr kompakte harte Oberfläche", "grade1": "Grad 1 - Fest: befestigt oder sehr kompakte harte Oberfläche",
"grade2": "Grad 2 - Größtenteils fest: Kies/Stein gemischt mit etwas weichem Material", "grade2": "Grad 2 - Größtenteils fest: Kies/Stein gemischt mit etwas weichem Material",
@ -2570,6 +2581,10 @@
"name": "Kirche", "name": "Kirche",
"terms": "christlich,Abtei,Basilika,geweihter Ort,Kathedrale,Altarraum,Kantorei,Kapelle,Kirche,Kirchgemeinde,Gotteshaus,Gebetshaus,Dom,Oratorium,Heiligtum,Sacellum,Schrein,Tabernakel,Tempel" "terms": "christlich,Abtei,Basilika,geweihter Ort,Kathedrale,Altarraum,Kantorei,Kapelle,Kirche,Kirchgemeinde,Gotteshaus,Gebetshaus,Dom,Oratorium,Heiligtum,Sacellum,Schrein,Tabernakel,Tempel"
}, },
"amenity/place_of_worship/hindu": {
"name": "Hindutempel",
"terms": "<translate with synonyms or related terms for 'Hindu Temple', separated by commas>"
},
"amenity/place_of_worship/jewish": { "amenity/place_of_worship/jewish": {
"name": "Sy­n­a­go­ge", "name": "Sy­n­a­go­ge",
"terms": "jüdisch,Synagoge" "terms": "jüdisch,Synagoge"
@ -2578,6 +2593,18 @@
"name": "Moschee", "name": "Moschee",
"terms": "muslimisch,Moschee" "terms": "muslimisch,Moschee"
}, },
"amenity/place_of_worship/shinto": {
"name": "Shintō-Schrein",
"terms": "<translate with synonyms or related terms for 'Shinto Shrine', separated by commas>"
},
"amenity/place_of_worship/sikh": {
"name": "Sikh-Tempel",
"terms": "<translate with synonyms or related terms for 'Sikh Temple', separated by commas>"
},
"amenity/place_of_worship/taoist": {
"name": "Tao-Tempel",
"terms": "<translate with synonyms or related terms for 'Taoist Temple', separated by commas>"
},
"amenity/planetarium": { "amenity/planetarium": {
"name": "Planetarium", "name": "Planetarium",
"terms": "Planetarium, Projektionsplanetarium, Orrery" "terms": "Planetarium, Projektionsplanetarium, Orrery"
@ -2743,6 +2770,10 @@
"name": "Tierarzt", "name": "Tierarzt",
"terms": "Tierarzt, Tierärztin, Verterinär" "terms": "Tierarzt, Tierärztin, Verterinär"
}, },
"amenity/waste/dog_excrement": {
"name": "Hundekotabfalleimer",
"terms": "<translate with synonyms or related terms for 'Dog Excrement Bin', separated by commas>"
},
"amenity/waste_basket": { "amenity/waste_basket": {
"name": "Mülleimer", "name": "Mülleimer",
"terms": "Mülleimer,Abfalleimer,Abfallkübel,Abfallbehälter,Mistkübel" "terms": "Mülleimer,Abfalleimer,Abfallkübel,Abfallbehälter,Mistkübel"
@ -3441,8 +3472,8 @@
"terms": "Verbindungsstraßenanschluss,Kreisstraßenanschluss, Kreisstraßenauffahrt, Kreisstraßenabfahrt, Auffahrt, Abfahrt" "terms": "Verbindungsstraßenanschluss,Kreisstraßenanschluss, Kreisstraßenauffahrt, Kreisstraßenabfahrt, Auffahrt, Abfahrt"
}, },
"highway/track": { "highway/track": {
"name": "Feld-/Waldweg", "name": "Wald-/Feldweg",
"terms": "Wirtschaftsweg, Feldweg, Waldweg, Forststraße" "terms": "Wirtschaftsweg, Waldweg, Feldweg, Forststraße"
}, },
"highway/traffic_mirror": { "highway/traffic_mirror": {
"name": "Verkehrsspiegel", "name": "Verkehrsspiegel",
@ -3958,6 +3989,14 @@
"name": "Wasserwerk", "name": "Wasserwerk",
"terms": "Wasserwerk" "terms": "Wasserwerk"
}, },
"man_made/watermill": {
"name": "Wassermühle",
"terms": "Wassermühle"
},
"man_made/windmill": {
"name": "Windmühle",
"terms": "Windmühle"
},
"man_made/works": { "man_made/works": {
"name": "Fabrik", "name": "Fabrik",
"terms": "Fabrik, Werk, Betrieb, Fabriksanlage, Produktionsstätte, Fertigungsanlage" "terms": "Fabrik, Werk, Betrieb, Fabriksanlage, Produktionsstätte, Fertigungsanlage"
@ -4242,6 +4281,14 @@
"name": "Stromgenerator", "name": "Stromgenerator",
"terms": "Stromgenerator" "terms": "Stromgenerator"
}, },
"power/generator/source_nuclear": {
"name": "Kernreaktor",
"terms": "<translate with synonyms or related terms for 'Nuclear Reactor', separated by commas>"
},
"power/generator/source_wind": {
"name": "Windrad",
"terms": "<translate with synonyms or related terms for 'Wind Turbine', separated by commas>"
},
"power/line": { "power/line": {
"name": "Stromleitung-Hochspannung", "name": "Stromleitung-Hochspannung",
"terms": "Stromleitung-Hochspannung, Freileitung, Überlandleitung, Hochspannungsleitung" "terms": "Stromleitung-Hochspannung, Freileitung, Überlandleitung, Hochspannungsleitung"

91
vendor/assets/iD/iD/locales/dv.json vendored Normal file
View file

@ -0,0 +1,91 @@
{
"dv": {
"modes": {
"add_area": {
"description": "ޕާރކުތަކާއި، އިމާރާތްތަކާއި އަދިވެސް ފާހަގަކުރެވޭ ތަންތަން ހިމަނުއްވާ"
},
"add_line": {
"description": "ހައިވޭއާއި، މަގުތަކާއި، ދުވާރާއި އަދި އެހެނިހެން ރޮނގުތައް ހިމަނުއްވާ"
},
"add_point": {
"description": "ރެސްޓޯރަންޓްތަކާއި، ފާހަގަކުރެވޭ ބިނާތަކާއި، ޕޯސްޓް ފޮށިތަކާއި، އެހެނިހެން މުހިއްމު ތަންތަން ހިމަނުއްވާ"
}
},
"inspector": {
"add_fields": "ޗާާޓަށް މައުލޫމާތު އެއްކުރައްވާ"
},
"presets": {
"categories": {
"category-building": {
"name": "އެކި ވައްތަރުގެ އިމާރާތް"
}
},
"fields": {
"address": {
"label": "އެޑްރެސް"
},
"building": {
"label": "އިމާރާތް"
},
"building_area": {
"label": "އިމާރާތް"
},
"structure": {
"options": {
"bridge": "ފާލަން"
}
}
},
"presets": {
"address": {
"name": "އެޑްރެސް"
},
"aeroway/terminal": {
"name": "އެއާރޕޯޓް ގިމަތަ"
},
"amenity/bank": {
"name": "ބޭންކު"
},
"amenity/bar": {
"name": "ބާރ"
},
"amenity/cafe": {
"name": "ކެފޭ"
},
"amenity/cinema": {
"name": "ސިނަމާ"
},
"amenity/parking": {
"name": "ކާރު ޕާރކުކުރާ ސަރަޙައްދު"
},
"amenity/place_of_worship/muslim": {
"name": "މިސްކިތް"
},
"building": {
"name": "އިމާރާތް"
},
"building/commercial": {
"name": "ވިިޔަފާރި ޢިމާރާތްތައް"
},
"highway/bus_stop": {
"name": "ބަސް ހުއްޓި"
},
"landuse/cemetery": {
"name": "ސަހަރާ"
},
"landuse/commercial": {
"name": "ވިޔަފާރި ސަރަޙައްދު"
},
"man_made/bridge": {
"name": "ފާލަން"
},
"natural/beach": {
"name": "މޫދު ސަރަޙައްދު"
},
"shop/car_repair": {
"name": "ކާާރު ހަދައިދޭ ގަރާޖް"
}
}
}
}
}

View file

@ -869,9 +869,6 @@
"contact/webcam": { "contact/webcam": {
"placeholder": "http://example.com/" "placeholder": "http://example.com/"
}, },
"content": {
"label": "Περιεχόμενο"
},
"country": { "country": {
"label": "Χώρα" "label": "Χώρα"
}, },

View file

@ -547,7 +547,9 @@
}, },
"restore": { "restore": {
"heading": "You have unsaved changes", "heading": "You have unsaved changes",
"description": "Do you wish to restore unsaved changes from a previous editing session?" "description": "Do you wish to restore unsaved changes from a previous editing session?",
"restore": "Restore my changes",
"reset": "Discard my changes"
}, },
"save": { "save": {
"title": "Save", "title": "Save",
@ -1260,7 +1262,7 @@
"label": "Type" "label": "Type"
}, },
"bin": { "bin": {
"label": "Waste Bin" "label": "Rubbish Bin"
}, },
"blood_components": { "blood_components": {
"label": "Blood Components", "label": "Blood Components",
@ -1339,6 +1341,9 @@
"clockwise": "Clockwise" "clockwise": "Clockwise"
} }
}, },
"clothes": {
"label": "Clothes"
},
"club": { "club": {
"label": "Type" "label": "Type"
}, },
@ -1356,7 +1361,7 @@
"placeholder": "http://example.com/" "placeholder": "http://example.com/"
}, },
"content": { "content": {
"label": "Contents" "label": "Content"
}, },
"country": { "country": {
"label": "Country" "label": "Country"
@ -1525,6 +1530,10 @@
"generator/method": { "generator/method": {
"label": "Method" "label": "Method"
}, },
"generator/output/electricity": {
"label": "Power Output",
"placeholder": "50 MW, 100 MW, 200 MW..."
},
"generator/source": { "generator/source": {
"label": "Source" "label": "Source"
}, },
@ -1605,6 +1614,9 @@
"kerb": { "kerb": {
"label": "Kerb" "label": "Kerb"
}, },
"label": {
"label": "Label"
},
"lamp_type": { "lamp_type": {
"label": "Type" "label": "Type"
}, },
@ -1676,6 +1688,9 @@
"man_made": { "man_made": {
"label": "Type" "label": "Type"
}, },
"manhole": {
"label": "Type"
},
"map_size": { "map_size": {
"label": "Coverage" "label": "Coverage"
}, },
@ -1883,6 +1898,10 @@
"plant": { "plant": {
"label": "Plant" "label": "Plant"
}, },
"plant/output/electricity": {
"label": "Power Output",
"placeholder": "500 MW, 1000 MW, 2000 MW..."
},
"population": { "population": {
"label": "Population" "label": "Population"
}, },
@ -2480,12 +2499,24 @@
"amenity/place_of_worship/christian": { "amenity/place_of_worship/christian": {
"name": "Church" "name": "Church"
}, },
"amenity/place_of_worship/hindu": {
"name": "Hindu Temple"
},
"amenity/place_of_worship/jewish": { "amenity/place_of_worship/jewish": {
"name": "Synagogue" "name": "Synagogue"
}, },
"amenity/place_of_worship/muslim": { "amenity/place_of_worship/muslim": {
"name": "Mosque" "name": "Mosque"
}, },
"amenity/place_of_worship/shinto": {
"name": "Shinto Shrine"
},
"amenity/place_of_worship/sikh": {
"name": "Sikh Temple"
},
"amenity/place_of_worship/taoist": {
"name": "Taoist Temple"
},
"amenity/planetarium": { "amenity/planetarium": {
"name": "Planetarium" "name": "Planetarium"
}, },
@ -2532,6 +2563,9 @@
"amenity/school": { "amenity/school": {
"name": "School Grounds" "name": "School Grounds"
}, },
"amenity/scrapyard": {
"name": "Scrap Yard"
},
"amenity/shelter": { "amenity/shelter": {
"name": "Shelter" "name": "Shelter"
}, },
@ -2610,8 +2644,11 @@
"amenity/veterinary": { "amenity/veterinary": {
"name": "Veterinary" "name": "Veterinary"
}, },
"amenity/waste/dog_excrement": {
"name": "Dog Excrement Bin"
},
"amenity/waste_basket": { "amenity/waste_basket": {
"name": "Waste Basket" "name": "Rubbish Bin"
}, },
"amenity/waste_disposal": { "amenity/waste_disposal": {
"name": "Garbage Dumpster" "name": "Garbage Dumpster"
@ -3535,9 +3572,21 @@
"man_made/water_works": { "man_made/water_works": {
"name": "Water Works" "name": "Water Works"
}, },
"man_made/watermill": {
"name": "Watermill"
},
"man_made/windmill": {
"name": "Windmill"
},
"man_made/works": { "man_made/works": {
"name": "Factory" "name": "Factory"
}, },
"manhole": {
"name": "Manhole"
},
"manhole/drain": {
"name": "Storm Drain"
},
"natural": { "natural": {
"name": "Natural" "name": "Natural"
}, },
@ -3745,6 +3794,12 @@
"power/generator": { "power/generator": {
"name": "Power Generator" "name": "Power Generator"
}, },
"power/generator/source_nuclear": {
"name": "Nuclear Reactor"
},
"power/generator/source_wind": {
"name": "Wind Turbine"
},
"power/line": { "power/line": {
"name": "Power Line" "name": "Power Line"
}, },

View file

@ -1341,6 +1341,9 @@
"anticlockwise": "Counterclockwise" "anticlockwise": "Counterclockwise"
} }
}, },
"clothes": {
"label": "Clothes"
},
"club": { "club": {
"label": "Type" "label": "Type"
}, },
@ -1358,7 +1361,7 @@
"placeholder": "http://example.com/" "placeholder": "http://example.com/"
}, },
"content": { "content": {
"label": "Contents" "label": "Content"
}, },
"country": { "country": {
"label": "Country" "label": "Country"
@ -1527,6 +1530,10 @@
"generator/method": { "generator/method": {
"label": "Method" "label": "Method"
}, },
"generator/output/electricity": {
"label": "Power Output",
"placeholder": "50 MW, 100 MW, 200 MW..."
},
"generator/source": { "generator/source": {
"label": "Source" "label": "Source"
}, },
@ -1891,6 +1898,10 @@
"plant": { "plant": {
"label": "Plant" "label": "Plant"
}, },
"plant/output/electricity": {
"label": "Power Output",
"placeholder": "500 MW, 1000 MW, 2000 MW..."
},
"population": { "population": {
"label": "Population" "label": "Population"
}, },
@ -2607,6 +2618,10 @@
"name": "Church", "name": "Church",
"terms": "christian,abbey,basilica,bethel,cathedral,chancel,chantry,chapel,fold,house of God,house of prayer,house of worship,minster,mission,oratory,parish,sacellum,sanctuary,shrine,tabernacle,temple" "terms": "christian,abbey,basilica,bethel,cathedral,chancel,chantry,chapel,fold,house of God,house of prayer,house of worship,minster,mission,oratory,parish,sacellum,sanctuary,shrine,tabernacle,temple"
}, },
"amenity/place_of_worship/hindu": {
"name": "Hindu Temple",
"terms": "garbhargriha,mandu,puja,shrine,temple"
},
"amenity/place_of_worship/jewish": { "amenity/place_of_worship/jewish": {
"name": "Synagogue", "name": "Synagogue",
"terms": "jewish" "terms": "jewish"
@ -2615,6 +2630,18 @@
"name": "Mosque", "name": "Mosque",
"terms": "muslim" "terms": "muslim"
}, },
"amenity/place_of_worship/shinto": {
"name": "Shinto Shrine",
"terms": "kami,torii"
},
"amenity/place_of_worship/sikh": {
"name": "Sikh Temple",
"terms": "gurudwara,temple"
},
"amenity/place_of_worship/taoist": {
"name": "Taoist Temple",
"terms": "daoist,monastery,temple"
},
"amenity/planetarium": { "amenity/planetarium": {
"name": "Planetarium", "name": "Planetarium",
"terms": "museum,astronomy,observatory" "terms": "museum,astronomy,observatory"
@ -2787,6 +2814,10 @@
"name": "Waste Transfer Station", "name": "Waste Transfer Station",
"terms": "dump,garbage,recycling,rubbish,scrap,trash" "terms": "dump,garbage,recycling,rubbish,scrap,trash"
}, },
"amenity/waste/dog_excrement": {
"name": "Dog Excrement Bin",
"terms": "bin,garbage,rubbish,litter,trash,poo,dog"
},
"amenity/water_point": { "amenity/water_point": {
"name": "RV Drinking Water", "name": "RV Drinking Water",
"terms": "" "terms": ""
@ -4003,6 +4034,14 @@
"name": "Water Works", "name": "Water Works",
"terms": "" "terms": ""
}, },
"man_made/watermill": {
"name": "Watermill",
"terms": "water,wheel,mill"
},
"man_made/windmill": {
"name": "Windmill",
"terms": "wind,wheel,mill"
},
"man_made/works": { "man_made/works": {
"name": "Factory", "name": "Factory",
"terms": "assembly,build,brewery,car,plant,plastic,processing,manufacture,refinery" "terms": "assembly,build,brewery,car,plant,plastic,processing,manufacture,refinery"
@ -4287,6 +4326,14 @@
"name": "Power Generator", "name": "Power Generator",
"terms": "hydro,solar,turbine,wind" "terms": "hydro,solar,turbine,wind"
}, },
"power/generator/source_nuclear": {
"name": "Nuclear Reactor",
"terms": "fission,generator,nuclear,nuke,reactor"
},
"power/generator/source_wind": {
"name": "Wind Turbine",
"terms": "generator,turbine,windmill,wind"
},
"power/line": { "power/line": {
"name": "Power Line", "name": "Power Line",
"terms": "" "terms": ""

View file

@ -353,6 +353,7 @@
"key": "B", "key": "B",
"title": "Fono", "title": "Fono",
"zoom": "Pligrandigo", "zoom": "Pligrandigo",
"vintage": "Fotita je",
"unknown": "Nekonata", "unknown": "Nekonata",
"show_tiles": "Montri kahelojn", "show_tiles": "Montri kahelojn",
"hide_tiles": "Kaŝi kahelojn" "hide_tiles": "Kaŝi kahelojn"
@ -1338,6 +1339,9 @@
"clockwise": "Horloĝdirekte" "clockwise": "Horloĝdirekte"
} }
}, },
"clothes": {
"label": "Vestaĵoj"
},
"club": { "club": {
"label": "Speco" "label": "Speco"
}, },
@ -1524,6 +1528,10 @@
"generator/method": { "generator/method": {
"label": "Metodo" "label": "Metodo"
}, },
"generator/output/electricity": {
"label": "Povumo",
"placeholder": "50 MW, 100 MW, 200 MW…"
},
"generator/source": { "generator/source": {
"label": "Energi-fonto" "label": "Energi-fonto"
}, },
@ -1888,6 +1896,10 @@
"plant": { "plant": {
"label": "Vegetaĵo" "label": "Vegetaĵo"
}, },
"plant/output/electricity": {
"label": "Povumo",
"placeholder": "500 MW, 1000 MW, 2000 MW…"
},
"population": { "population": {
"label": "Loĝantaro" "label": "Loĝantaro"
}, },
@ -2567,6 +2579,10 @@
"name": "Kirko", "name": "Kirko",
"terms": "kristana preĝejo,mesejo,kapelo,katedralo,baziliko,abatejo,monaĥejo,kristanismo,katolika preĝejo" "terms": "kristana preĝejo,mesejo,kapelo,katedralo,baziliko,abatejo,monaĥejo,kristanismo,katolika preĝejo"
}, },
"amenity/place_of_worship/hindu": {
"name": "Hinduisma templo",
"terms": "templo"
},
"amenity/place_of_worship/jewish": { "amenity/place_of_worship/jewish": {
"name": "Sinagogo", "name": "Sinagogo",
"terms": "juda preĝejo,judismo,judaismo" "terms": "juda preĝejo,judismo,judaismo"
@ -2575,6 +2591,18 @@
"name": "Moskeo", "name": "Moskeo",
"terms": "islama preĝejo,islamo,minareto" "terms": "islama preĝejo,islamo,minareto"
}, },
"amenity/place_of_worship/shinto": {
"name": "Ŝintoismo adorejo",
"terms": "shintoismo,sxintoismo,templo,adorejo,ŝintoo,kamio"
},
"amenity/place_of_worship/sikh": {
"name": "Sikisma templo",
"terms": "siĥismo,templo"
},
"amenity/place_of_worship/taoist": {
"name": "Taoisma templo",
"terms": "templo,daŭismo,taismo"
},
"amenity/planetarium": { "amenity/planetarium": {
"name": "Planetario (astrokinejo)", "name": "Planetario (astrokinejo)",
"terms": "astrokinejo,astroobservejo,astrobservejo,astronomio,stelscienco,astroscienco" "terms": "astrokinejo,astroobservejo,astrobservejo,astronomio,stelscienco,astroscienco"
@ -2740,6 +2768,10 @@
"name": "Bestokuracistejo", "name": "Bestokuracistejo",
"terms": "bestokuracisto,bestkuracisto,veterinaro" "terms": "bestokuracisto,bestkuracisto,veterinaro"
}, },
"amenity/waste/dog_excrement": {
"name": "Rubujo por hund-fekaĵoj",
"terms": "rubujo,hundaj fekoj,fekaĵoj,eksrementoj"
},
"amenity/waste_basket": { "amenity/waste_basket": {
"name": "Rubujo", "name": "Rubujo",
"terms": "balaaĵujo,balaaĵkesto,rubkesto,forĵetaĵujo" "terms": "balaaĵujo,balaaĵkesto,rubkesto,forĵetaĵujo"
@ -3955,6 +3987,14 @@
"name": "Akvotrinkebligejo", "name": "Akvotrinkebligejo",
"terms": "akvopurigejo,trinkebligejo,seninfektigo de akvo,akvokonduktilo" "terms": "akvopurigejo,trinkebligejo,seninfektigo de akvo,akvokonduktilo"
}, },
"man_made/watermill": {
"name": "Muelejo akva",
"terms": "muelejo,akvomuelejo,grenmuelejo,akvmueejo"
},
"man_made/windmill": {
"name": "Muelejo venta",
"terms": "ventmuelejo,ventomuelejo,ventoturbino,grenmuelejo"
},
"man_made/works": { "man_made/works": {
"name": "Fabriko", "name": "Fabriko",
"terms": "produktejo,uzino,manufakturo" "terms": "produktejo,uzino,manufakturo"
@ -4239,6 +4279,14 @@
"name": "Elektr-generilo", "name": "Elektr-generilo",
"terms": "elektrogenerilo,generilo,generatoro" "terms": "elektrogenerilo,generilo,generatoro"
}, },
"power/generator/source_nuclear": {
"name": "Nuklea reakciujo",
"terms": "nuklea reaktoro,reaktoro,reakciujo,atoma reaktoro,atompilo,elektrocentralo"
},
"power/generator/source_wind": {
"name": "Ventoturbino",
"terms": "ventturbino,elektrogenerilo,ventomuelejo,ventturbino,ventelektrigilo,ventmotoro,ventenergio"
},
"power/line": { "power/line": {
"name": "Elektra kondukilo (alttensia)", "name": "Elektra kondukilo (alttensia)",
"terms": "lineo forkurenta,kablo" "terms": "lineo forkurenta,kablo"

View file

@ -2,7 +2,7 @@
"es": { "es": {
"modes": { "modes": {
"add_area": { "add_area": {
"title": "Árezo", "title": "Área",
"description": "Añade parques, edificios, lagos, bosques u otras áreas al mapa.", "description": "Añade parques, edificios, lagos, bosques u otras áreas al mapa.",
"tail": "Haga clic en el mapa para empezar a dibujar un área, como un parque, lago o edificio." "tail": "Haga clic en el mapa para empezar a dibujar un área, como un parque, lago o edificio."
}, },
@ -1134,35 +1134,35 @@
"label": "Dirección", "label": "Dirección",
"placeholders": { "placeholders": {
"block_number": "Número de manzana", "block_number": "Número de manzana",
"block_number!jp": "Nro. de manzana", "block_number!jp": "Nro. de manzana - Japón",
"city": "Ciudad", "city": "Ciudad",
"city!jp": "Ciudad / Pueblo / Aldea / Barrio especial de Tokio", "city!jp": "Ciudad / Pueblo / Aldea / Barrio especial de Tokio - Japón",
"city!vn": "Ciudad / Pueblo", "city!vn": "Ciudad / Pueblo",
"conscriptionnumber": "123", "conscriptionnumber": "123",
"country": "País", "country": "País",
"county": "Condado", "county": "Condado",
"county!jp": "Distrito", "county!jp": "Distrito - Japón",
"district": "Distrito", "district": "Distrito",
"district!vn": "Arrondissement / Pueblo / Distrito", "district!vn": "Arrondissement / Pueblo / Distrito",
"floor": "Piso", "floor": "Piso",
"hamlet": "Aldea / Caserío", "hamlet": "Aldea / Caserío",
"housename": "Nombre de la casa", "housename": "Nombre de la casa",
"housenumber": "123", "housenumber": "123",
"housenumber!jp": "Nro. de edificio/Nro. de lote", "housenumber!jp": "Nro. de edificio / Nro. de lote - Japón",
"neighbourhood": "Barrio", "neighbourhood": "Barrio",
"neighbourhood!jp": "Chōme / Aza / Koaza", "neighbourhood!jp": "Chōme / Aza / Koaza - Japón",
"place": "Lugar", "place": "Lugar",
"postcode": "Código postal", "postcode": "Código postal",
"province": "Provincia", "province": "Provincia",
"province!jp": "Prefectura", "province!jp": "Prefectura - Japón",
"quarter": "Quarter", "quarter": "Barrio",
"quarter!jp": "Ōaza / Machi", "quarter!jp": "Ōaza / Machi - Japón",
"state": "Estado", "state": "Estado",
"street": "Calle", "street": "Calle",
"subdistrict": "Subdistrito", "subdistrict": "Subdistrito",
"subdistrict!vn": "Barrio / Comuna / Pueblito", "subdistrict!vn": "Barrio / Comuna / Pueblito",
"suburb": "Suburbio", "suburb": "Suburbio",
"suburb!jp": "Ward" "suburb!jp": "Ward - Japón"
} }
}, },
"admin_level": { "admin_level": {
@ -1341,6 +1341,9 @@
"clockwise": "En sentido horario" "clockwise": "En sentido horario"
} }
}, },
"clothes": {
"label": "Ropa"
},
"club": { "club": {
"label": "Tipo" "label": "Tipo"
}, },
@ -1527,6 +1530,10 @@
"generator/method": { "generator/method": {
"label": "Método" "label": "Método"
}, },
"generator/output/electricity": {
"label": "Potencia de salida",
"placeholder": "50 MW, 100 MW, 200 MW..."
},
"generator/source": { "generator/source": {
"label": "Fuente" "label": "Fuente"
}, },
@ -1607,6 +1614,9 @@
"kerb": { "kerb": {
"label": "Bordillo/Cordón" "label": "Bordillo/Cordón"
}, },
"label": {
"label": "Etiqueta"
},
"lamp_type": { "lamp_type": {
"label": "Tipo" "label": "Tipo"
}, },
@ -1678,6 +1688,9 @@
"man_made": { "man_made": {
"label": "Tipo" "label": "Tipo"
}, },
"manhole": {
"label": "Tipo"
},
"map_size": { "map_size": {
"label": "Cobertura" "label": "Cobertura"
}, },
@ -1885,6 +1898,10 @@
"plant": { "plant": {
"label": "Planta" "label": "Planta"
}, },
"plant/output/electricity": {
"label": "Potencia de salida",
"placeholder": "500 MW, 1000 MW, 2000 MW..."
},
"population": { "population": {
"label": "Población" "label": "Población"
}, },
@ -2564,6 +2581,10 @@
"name": "Iglesia cristiana", "name": "Iglesia cristiana",
"terms": "templo, capilla, parroquia, santuario, ermita, oratorio, iglesia, oratorio, la iglesia" "terms": "templo, capilla, parroquia, santuario, ermita, oratorio, iglesia, oratorio, la iglesia"
}, },
"amenity/place_of_worship/hindu": {
"name": "Templo hindú",
"terms": "Templo, hindú, Grbrgrih, Mandu, adoración, capilla, templo, santuario"
},
"amenity/place_of_worship/jewish": { "amenity/place_of_worship/jewish": {
"name": "Sinagoga", "name": "Sinagoga",
"terms": "templo, aljama, sinagoga, judío, religión" "terms": "templo, aljama, sinagoga, judío, religión"
@ -2572,6 +2593,18 @@
"name": "Mezquita", "name": "Mezquita",
"terms": "mezquita, morabito, rábida, musulmán, religión" "terms": "mezquita, morabito, rábida, musulmán, religión"
}, },
"amenity/place_of_worship/shinto": {
"name": "Santuario sintoísta",
"terms": "Santuario, Shinto, sintoísta, Kami, Torii, capilla, templo"
},
"amenity/place_of_worship/sikh": {
"name": "Templo Sij",
"terms": "Templo, Sij, Sikh, Gurudwara"
},
"amenity/place_of_worship/taoist": {
"name": "Templo Taoísta",
"terms": "Templo, Taoísta, monasterio"
},
"amenity/planetarium": { "amenity/planetarium": {
"name": "Planetario", "name": "Planetario",
"terms": "planetario, observatorio, proyección, cuerpos celestes, estrellas, planetas, astronomía, universo" "terms": "planetario, observatorio, proyección, cuerpos celestes, estrellas, planetas, astronomía, universo"
@ -2631,6 +2664,10 @@
"name": "Terreno escolar", "name": "Terreno escolar",
"terms": "terreno, área, suelo, recinto escolar, escolar, escuela, colegio, centro educativo, unidad educativa, primaria, secundaria, secundario, instituto" "terms": "terreno, área, suelo, recinto escolar, escolar, escuela, colegio, centro educativo, unidad educativa, primaria, secundaria, secundario, instituto"
}, },
"amenity/scrapyard": {
"name": "Depósito de chatarra",
"terms": "Depósito de chatarra, cementerio de coches, auto, coche, vehículo, basura, metal, objetos salvados, chatarra, naufragio, desguace"
},
"amenity/shelter": { "amenity/shelter": {
"name": "Refugio", "name": "Refugio",
"terms": "albergue, abrigo, amparo, asilo, cobertizo, garita, refugio" "terms": "albergue, abrigo, amparo, asilo, cobertizo, garita, refugio"
@ -2733,6 +2770,10 @@
"name": "Veterinario", "name": "Veterinario",
"terms": "veterinario, veterinaria, albéitar, mascotas, animales, perros, gatos" "terms": "veterinario, veterinaria, albéitar, mascotas, animales, perros, gatos"
}, },
"amenity/waste/dog_excrement": {
"name": "Recipiente para excremento de perro",
"terms": "Basura, tacho, recipiente, caca, excremento, perro"
},
"amenity/waste_basket": { "amenity/waste_basket": {
"name": "Papelera", "name": "Papelera",
"terms": "papelera, papelero, cubo, contenedor, basura, papeles, deshecho, tacho" "terms": "papelera, papelero, cubo, contenedor, basura, papeles, deshecho, tacho"
@ -3948,10 +3989,26 @@
"name": "Planta potabilizadora de agua", "name": "Planta potabilizadora de agua",
"terms": "potabilizadora, ETAP, planta potabilizadora, abastecimiento de agua, agua potable" "terms": "potabilizadora, ETAP, planta potabilizadora, abastecimiento de agua, agua potable"
}, },
"man_made/watermill": {
"name": "Molino de agua",
"terms": "agua, rueda, molino"
},
"man_made/windmill": {
"name": "Molino de viento",
"terms": "Viento, rueda, molino"
},
"man_made/works": { "man_made/works": {
"name": "Fábrica", "name": "Fábrica",
"terms": "factoría, manofactura, industria, taller, ensamblaje, planta, materia prima, fabricado, producción, fabricación, ingenio, procesadora, refinería, cervecería, azucarera" "terms": "factoría, manofactura, industria, taller, ensamblaje, planta, materia prima, fabricado, producción, fabricación, ingenio, procesadora, refinería, cervecería, azucarera"
}, },
"manhole": {
"name": "Pozo de inspección",
"terms": "Cubierta, tapa, agujero, alcantarillado, telecomunicaciones, pozo, sumidero, boca de alcantarilla, boca de inspección, pozo de registro, abertura, boca de acceso"
},
"manhole/drain": {
"name": "Desagüe pluvial",
"terms": "Cubierta, tapa, desagüe, agujero, pozo, lluvia, alcantarillado, tormenta, boca de tormenta, alcantarillado pluvial"
},
"natural": { "natural": {
"name": "Natural", "name": "Natural",
"terms": "natural, naturaleza, geológica, cubierta terrestre, vegetación" "terms": "natural, naturaleza, geológica, cubierta terrestre, vegetación"
@ -4194,16 +4251,16 @@
"terms": "barrio, vecindario, vecindad, urbanización, colonia" "terms": "barrio, vecindario, vecindad, urbanización, colonia"
}, },
"place/quarter": { "place/quarter": {
"name": "Sub-Borough / Quarter", "name": "Sub-municipio / Barrio",
"terms": "sub-distrito, cuadrante, delegación, localidad, barrio, vecindario" "terms": "sub-municipio, sub-distrito, sector, cuadrante, delegación, localidad, barrio, vecindario"
}, },
"place/square": { "place/square": {
"name": "Plaza", "name": "Plaza",
"terms": "plaza" "terms": "plaza"
}, },
"place/suburb": { "place/suburb": {
"name": "Borough / Suburbio", "name": "Municipio / Suburbio",
"terms": "distrito, suburbio" "terms": "municipio, división administrativa, division administrativa, burgo, delegación, delegacion, localidad"
}, },
"place/town": { "place/town": {
"name": "Ciudad pequeña", "name": "Ciudad pequeña",
@ -4224,6 +4281,14 @@
"name": "Generador de energía", "name": "Generador de energía",
"terms": "subestación, generador, generador eléctrico, generador de electricidad, generador de potencia" "terms": "subestación, generador, generador eléctrico, generador de electricidad, generador de potencia"
}, },
"power/generator/source_nuclear": {
"name": "Reactor nuclear",
"terms": "Fisión, generador, nuclear, reactor"
},
"power/generator/source_wind": {
"name": "Turbina eólica",
"terms": "Generador, turbina, molino de viento, viento, eólico, eolico"
},
"power/line": { "power/line": {
"name": "Línea de alta tensión", "name": "Línea de alta tensión",
"terms": "energía, línea, eléctrica, líneas eléctricas, linea electrica, lineas electricas" "terms": "energía, línea, eléctrica, líneas eléctricas, linea electrica, lineas electricas"

View file

@ -761,9 +761,6 @@
"label": "Veebikaamera URL", "label": "Veebikaamera URL",
"placeholder": "http://näidis.ee" "placeholder": "http://näidis.ee"
}, },
"content": {
"label": "Sisu"
},
"country": { "country": {
"label": "Riik" "label": "Riik"
}, },

View file

@ -907,9 +907,6 @@
"label": "URL دوربین", "label": "URL دوربین",
"placeholder": "http://example.com/" "placeholder": "http://example.com/"
}, },
"content": {
"label": "محتویات"
},
"country": { "country": {
"label": "کشور" "label": "کشور"
}, },

View file

@ -993,9 +993,6 @@
"label": "Kameran verkko-osoite", "label": "Kameran verkko-osoite",
"placeholder": "http://www.esimerkki.fi/" "placeholder": "http://www.esimerkki.fi/"
}, },
"content": {
"label": "Sisältö"
},
"country": { "country": {
"label": "Maa" "label": "Maa"
}, },

View file

@ -2,7 +2,7 @@
"fr": { "fr": {
"modes": { "modes": {
"add_area": { "add_area": {
"title": "Polygon", "title": "Polygone",
"description": "Ajouter des parcs, des bâtiments, des lacs ou d'autres polygones à la carte.", "description": "Ajouter des parcs, des bâtiments, des lacs ou d'autres polygones à la carte.",
"tail": "Cliquez sur la carte pour ajouter un polygone tel qu'un parc, un lac ou un bâtiment." "tail": "Cliquez sur la carte pour ajouter un polygone tel qu'un parc, un lac ou un bâtiment."
}, },
@ -30,15 +30,15 @@
"operations": { "operations": {
"add": { "add": {
"annotation": { "annotation": {
"point": "Un point créé.", "point": "ajout d'un point.",
"vertex": "Un nœud ajouté à une ligne.", "vertex": "ajout d'un nœud à une ligne.",
"relation": "Relation ajoutée." "relation": "création d'une relation."
} }
}, },
"start": { "start": {
"annotation": { "annotation": {
"line": "Une ligne commencée.", "line": "création d'une ligne.",
"area": "Un polygone commencé." "area": "création d'un polygone."
} }
}, },
"continue": { "continue": {
@ -48,8 +48,8 @@
"not_eligible": "Aucune ligne ne peut être poursuivie ici.", "not_eligible": "Aucune ligne ne peut être poursuivie ici.",
"multiple": "Plusieurs lignes peuvent être poursuivies ici. Pour choisir une ligne, appuyez sur la touche Shift / Majuscule du clavier et appuyez sur la ligne voulue pour la sélectionner.", "multiple": "Plusieurs lignes peuvent être poursuivies ici. Pour choisir une ligne, appuyez sur la touche Shift / Majuscule du clavier et appuyez sur la ligne voulue pour la sélectionner.",
"annotation": { "annotation": {
"line": "Une ligne continuée.", "line": "poursuite d'une ligne.",
"area": "Un polygone continué." "area": "poursuite d'un polygone."
} }
}, },
"cancel_draw": { "cancel_draw": {
@ -69,8 +69,8 @@
}, },
"key": "O", "key": "O",
"annotation": { "annotation": {
"line": "Ligne rendue circulaire.", "line": "ligne rendue circulaire.",
"area": "Polygone rendu circulaire." "area": "polygone rendu circulaire."
}, },
"not_closed": "Cet élément ne peut pas être rendu circulaire car il ne boucle pas.", "not_closed": "Cet élément ne peut pas être rendu circulaire car il ne boucle pas.",
"too_large": "Ceci ne peut pas être transformé en cercle parce qu'une partie n'est pas visible.", "too_large": "Ceci ne peut pas être transformé en cercle parce qu'une partie n'est pas visible.",
@ -84,8 +84,8 @@
}, },
"key": "S", "key": "S",
"annotation": { "annotation": {
"line": "Ligne rendue orthogonale.", "line": "ligne rendue orthogonale.",
"area": "Polygone rendu orthogonal." "area": "polygone rendu orthogonal."
}, },
"not_squarish": "Cela ne peut être fait, ce n'est pas carré.", "not_squarish": "Cela ne peut être fait, ce n'est pas carré.",
"too_large": "Ceci ne peut pas être transformé en rectangle parce qu'une partie n'est pas visible.", "too_large": "Ceci ne peut pas être transformé en rectangle parce qu'une partie n'est pas visible.",
@ -95,7 +95,7 @@
"title": "Rendre droit", "title": "Rendre droit",
"description": "Rendre cette ligne droite.", "description": "Rendre cette ligne droite.",
"key": "S", "key": "S",
"annotation": "Rendre une ligne droite.", "annotation": "rendu une ligne droite.",
"too_bendy": "Cela ne peut pas être redressé, car la courbe est trop importante.", "too_bendy": "Cela ne peut pas être redressé, car la courbe est trop importante.",
"connected_to_hidden": "Cette ligne ne peut être rendue droite parce qu'elle est connecté à un élément caché." "connected_to_hidden": "Cette ligne ne peut être rendue droite parce qu'elle est connecté à un élément caché."
}, },
@ -106,12 +106,12 @@
"multiple": "Supprimer ces éléments définitivement." "multiple": "Supprimer ces éléments définitivement."
}, },
"annotation": { "annotation": {
"point": "Point supprimé", "point": "suppression d'un point.",
"vertex": "Nœud d'une ligne supprimé.", "vertex": "suppression d'un nœud d'une ligne.",
"line": "Ligne supprimée.", "line": "suppression d'une ligne.",
"area": "Polygone supprimé.", "area": "suppression d'un polygone.",
"relation": "Relation supprimée.", "relation": "suppression d'une relation.",
"multiple": "{n} éléments supprimés." "multiple": "suppression de {n} éléments."
}, },
"too_large": { "too_large": {
"single": "Cet élément ne peut pas être supprimé car il n'est pas suffisamment visible.", "single": "Cet élément ne peut pas être supprimé car il n'est pas suffisamment visible.",
@ -131,24 +131,24 @@
} }
}, },
"add_member": { "add_member": {
"annotation": "Membre ajouté à une relation." "annotation": "ajout d'un membre à une relation."
}, },
"delete_member": { "delete_member": {
"annotation": "Membre supprimé d'une relation." "annotation": "suppression d'un membre d'une relation."
}, },
"connect": { "connect": {
"annotation": { "annotation": {
"point": "Joindre une ligne à un point.", "point": "connexion d'un chemin à un point.",
"vertex": "Joindre les nœuds à une ligne.", "vertex": "connexion d'un chemin à un autre chemin.",
"line": "Joindre les chemins ensemble.", "line": "connexion d'un chemin à une ligne.",
"area": "Joindre une ligne à un polygone." "area": "connexion d'un chemin à un polygone."
} }
}, },
"disconnect": { "disconnect": {
"title": "Séparer", "title": "Séparer",
"description": "Séparer les lignes/contours l'un de l'autre.", "description": "Séparer les lignes/contours l'un de l'autre.",
"key": "D", "key": "D",
"annotation": "Lignes non connectées.", "annotation": "déconnexion de lignes ou polygones.",
"not_connected": "Il n'y a pas ici de lignes/polygones à déconnecter.", "not_connected": "Il n'y a pas ici de lignes/polygones à déconnecter.",
"connected_to_hidden": "Ceci ne peut être déconnecté parce que c'est connecté à un élément caché.", "connected_to_hidden": "Ceci ne peut être déconnecté parce que c'est connecté à un élément caché.",
"relation": "Ceci ne peut être déconnecté parce que cela connecte les membres d'une relation." "relation": "Ceci ne peut être déconnecté parce que cela connecte les membres d'une relation."
@ -157,7 +157,7 @@
"title": "Fusionner", "title": "Fusionner",
"description": "Fusionner ces éléments", "description": "Fusionner ces éléments",
"key": "C", "key": "C",
"annotation": "{n} éléments fusionnés", "annotation": "fusion de {n} éléments.",
"not_eligible": "Ces éléments ne peuvent pas être fusionnés.", "not_eligible": "Ces éléments ne peuvent pas être fusionnés.",
"not_adjacent": "Ces éléments ne peuvent être fusionnés car leurs extrémités ne sont pas connectés.", "not_adjacent": "Ces éléments ne peuvent être fusionnés car leurs extrémités ne sont pas connectés.",
"restriction": "Ces éléments ne peuvent être fusionnés car au moins l'un d'entre eux est membre de la relation \"{relation}\".", "restriction": "Ces éléments ne peuvent être fusionnés car au moins l'un d'entre eux est membre de la relation \"{relation}\".",
@ -172,11 +172,11 @@
}, },
"key": "M", "key": "M",
"annotation": { "annotation": {
"point": "Point déplacé.", "point": "déplacement d'un point .",
"vertex": "Nœud d'une ligne déplacé.", "vertex": "déplacement d'un nœud d'une ligne.",
"line": "Ligne déplacée.", "line": "déplacement d'une ligne.",
"area": "Polygone déplacé.", "area": "déplacement d'un polygone.",
"multiple": "Plusieurs éléments déplacés." "multiple": "déplacement de plusieurs éléments."
}, },
"incomplete_relation": { "incomplete_relation": {
"single": "Cet élément ne peut pas être déplacé car il n'est pas téléchargé totalement.", "single": "Cet élément ne peut pas être déplacé car il n'est pas téléchargé totalement.",
@ -212,12 +212,12 @@
}, },
"annotation": { "annotation": {
"long": { "long": {
"single": "Miroir par rapport au grand axe de l'élément.", "single": "réflexion d'un élément par rapport à son grand axe.",
"multiple": "Miroir par rapport au grand axe des éléments effectué." "multiple": "réflexion d'éléments par rapport à leur grand axe."
}, },
"short": { "short": {
"single": "Miroir par rapport au petit axe de l'élément.", "single": "réflexion d'un élément par rapport à son petit axe.",
"multiple": "Miroir par rapport au petit axe des éléments effectué." "multiple": "réflexion d'éléments par rapport à leur petit axe."
} }
}, },
"incomplete_relation": { "incomplete_relation": {
@ -241,9 +241,9 @@
}, },
"key": "R", "key": "R",
"annotation": { "annotation": {
"line": "Pivoter la ligne.", "line": "ligne pivotée.",
"area": "Pivoter un polygone.", "area": "polygone pivoté.",
"multiple": "Tourner plusieurs éléments." "multiple": "plusieurs éléments pivotés."
}, },
"incomplete_relation": { "incomplete_relation": {
"single": "Cet élément ne peut pas être tourné car il n'est pas téléchargé totalement.", "single": "Cet élément ne peut pas être tourné car il n'est pas téléchargé totalement.",
@ -262,7 +262,7 @@
"title": "Inverser", "title": "Inverser",
"description": "Inverse le sens d'une ligne.", "description": "Inverse le sens d'une ligne.",
"key": "V", "key": "V",
"annotation": "Sens d'une ligne inversé." "annotation": "sens d'une ligne inversé."
}, },
"split": { "split": {
"title": "Couper", "title": "Couper",
@ -273,9 +273,9 @@
}, },
"key": "X", "key": "X",
"annotation": { "annotation": {
"line": "Coupe une ligne.", "line": "ligne coupée.",
"area": "Couper le contour d'un polygone.", "area": "contour d'un polygone coupé.",
"multiple": "Couper {n} lignes/contour de polygone." "multiple": "{n} lignes/contours de polygone coupés."
}, },
"not_eligible": "Les lignes ne peuvent pas être coupées à leurs extrémités.", "not_eligible": "Les lignes ne peuvent pas être coupées à leurs extrémités.",
"multiple_ways": "Il y a trop de ligne à cet endroit pour pouvoir couper.", "multiple_ways": "Il y a trop de ligne à cet endroit pour pouvoir couper.",
@ -289,8 +289,8 @@
"toggle_off": "Cliquez pour supprimer la restriction \"{restriction}\"." "toggle_off": "Cliquez pour supprimer la restriction \"{restriction}\"."
}, },
"annotation": { "annotation": {
"create": "Interdiction de tourner ajoutée", "create": "interdiction de tourner ajoutée.",
"delete": "Interdiction de tourner supprimée" "delete": "interdiction de tourner supprimée."
} }
} }
}, },
@ -334,7 +334,7 @@
"upload_explanation_with_user": "Les modifications envoyées en tant que {user} seront visibles sur toutes les cartes qui utilisent les données d'OpenStreetMap.", "upload_explanation_with_user": "Les modifications envoyées en tant que {user} seront visibles sur toutes les cartes qui utilisent les données d'OpenStreetMap.",
"save": "Envoyer", "save": "Envoyer",
"cancel": "Annuler", "cancel": "Annuler",
"changes": "{count} changements", "changes": "{count} modifications",
"warnings": "Attention", "warnings": "Attention",
"modified": "Modifié", "modified": "Modifié",
"deleted": "Supprimé", "deleted": "Supprimé",
@ -345,8 +345,8 @@
"google_warning_link": "http://www.openstreetmap.org/copyright" "google_warning_link": "http://www.openstreetmap.org/copyright"
}, },
"contributors": { "contributors": {
"list": "Editions de {users}", "list": "Modifications de {users}",
"truncated_list": "Editions de {users} et de {count} autres" "truncated_list": "Modifications de {users} et de {count} autres"
}, },
"geometry": { "geometry": {
"point": "point", "point": "point",
@ -1289,9 +1289,6 @@
"label": "adresse de visioconférence", "label": "adresse de visioconférence",
"placeholder": "http://example.com/" "placeholder": "http://example.com/"
}, },
"content": {
"label": "Contenu"
},
"country": { "country": {
"label": "Pays" "label": "Pays"
}, },

File diff suppressed because it is too large Load diff

View file

@ -1204,9 +1204,6 @@
"contact/webcam": { "contact/webcam": {
"placeholder": "http://primjer.hr/" "placeholder": "http://primjer.hr/"
}, },
"content": {
"label": "Sadržaj"
},
"country": { "country": {
"label": "Država" "label": "Država"
}, },

View file

@ -1355,9 +1355,6 @@
"label": "Webkamera URL", "label": "Webkamera URL",
"placeholder": "http://pelda.hu/" "placeholder": "http://pelda.hu/"
}, },
"content": {
"label": "Tartalom"
},
"country": { "country": {
"label": "Ország" "label": "Ország"
}, },
@ -3491,7 +3488,7 @@
"terms": "Emlékhely" "terms": "Emlékhely"
}, },
"historic/monument": { "historic/monument": {
"name": "Kiemelkedően jelentős emlékmű", "name": "Monumentális, épületszerű emlékmű",
"terms": "monumentális emlékmű" "terms": "monumentális emlékmű"
}, },
"historic/ruins": { "historic/ruins": {

View file

@ -693,9 +693,6 @@
"construction": { "construction": {
"label": "Տեսակ" "label": "Տեսակ"
}, },
"content": {
"label": "Բովանդակութիւն"
},
"country": { "country": {
"label": "Երկիր" "label": "Երկիր"
}, },

Some files were not shown because too many files have changed in this diff Show more