coverage
doc
log
+node_modules
public/assets
public/attachments
public/export
inherit_from: .rubocop_todo.yml
+require:
+ - rubocop-performance
+ - rubocop-rails
+
AllCops:
TargetRubyVersion: 2.5
- 'app/controllers/application_controller.rb'
- 'app/controllers/site_controller.rb'
+Metrics/BlockLength:
+ Exclude:
+ - 'config/routes.rb'
+
Naming/FileName:
Exclude:
- 'script/deliver-message'
# This configuration was generated by
# `rubocop --auto-gen-config`
-# on 2018-09-19 14:24:02 +0100 using RuboCop version 0.58.2.
+# on 2019-06-05 09:04:25 +0100 using RuboCop version 0.71.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
-# Offense count: 32
+# Offense count: 33
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
Exclude:
+ - 'app/controllers/api/traces_controller.rb'
+ - 'app/controllers/api/user_preferences_controller.rb'
- 'app/controllers/application_controller.rb'
- 'app/controllers/geocoder_controller.rb'
- 'app/controllers/notes_controller.rb'
- - 'app/controllers/api/traces_controller.rb'
- 'app/controllers/traces_controller.rb'
- 'app/controllers/users_controller.rb'
- - 'app/controllers/api/user_preferences_controller.rb'
- 'app/helpers/application_helper.rb'
- - 'app/helpers/browse_helper.rb'
- 'app/helpers/browse_tags_helper.rb'
- - 'app/models/client_application.rb'
- 'app/mailers/notifier.rb'
+ - 'app/models/client_application.rb'
- 'lib/nominatim.rb'
- 'lib/osm.rb'
- 'script/deliver-message'
# Offense count: 4
+# Configuration parameters: AllowComments.
Lint/HandleExceptions:
Exclude:
- 'app/controllers/api/amf_controller.rb'
- 'app/controllers/users_controller.rb'
-# Offense count: 692
+# Offense count: 703
Metrics/AbcSize:
- Max: 283
+ Max: 279
# Offense count: 40
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
- Max: 262
+ Max: 71
-# Offense count: 11
+# Offense count: 15
# Configuration parameters: CountBlocks.
Metrics/BlockNesting:
Max: 5
-# Offense count: 63
+# Offense count: 68
# Configuration parameters: CountComments.
Metrics/ClassLength:
- Max: 1627
+ Max: 1397
-# Offense count: 72
+# Offense count: 73
Metrics/CyclomaticComplexity:
- Max: 23
+ Max: 22
-# Offense count: 691
-# Configuration parameters: CountComments.
+# Offense count: 714
+# Configuration parameters: CountComments, ExcludedMethods.
Metrics/MethodLength:
Max: 179
-# Offense count: 2
+# Offense count: 1
# Configuration parameters: CountComments.
Metrics/ModuleLength:
- Max: 135
+ Max: 107
# Offense count: 4
# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
Max: 9
-# Offense count: 72
+# Offense count: 71
Metrics/PerceivedComplexity:
- Max: 23
+ Max: 25
# Offense count: 6
Naming/AccessorMethodName:
- 'db/migrate/20120208194454_add_domain_to_acl.rb'
- 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
-# Offense count: 2
-# Configuration parameters: Include.
-# Include: app/**/*.rb, config/**/*.rb, lib/**/*.rb
-Rails/Exit:
- Exclude:
- - 'lib/**/*.rake'
- - 'lib/daemons/gpx_import.rb'
-
# Offense count: 2
# Configuration parameters: Include.
# Include: app/models/**/*.rb
- 'app/models/changeset.rb'
- 'app/models/user.rb'
+# Offense count: 11
+# Configuration parameters: Include.
+# Include: app/helpers/**/*.rb
+Rails/HelperInstanceVariable:
+ Exclude:
+ - 'app/helpers/application_helper.rb'
+ - 'app/helpers/title_helper.rb'
+ - 'app/helpers/trace_helper.rb'
+
# Offense count: 5
# Configuration parameters: Include.
# Include: db/migrate/*.rb
- 'db/migrate/025_add_end_time_to_changesets.rb'
- 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
-# Offense count: 20
+# Offense count: 18
Rails/OutputSafety:
Exclude:
- 'app/controllers/users_controller.rb'
- 'app/helpers/note_helper.rb'
- 'app/helpers/open_graph_helper.rb'
- 'app/helpers/user_blocks_helper.rb'
- - 'app/helpers/user_roles_helper.rb'
- 'lib/rich_text.rb'
- 'test/helpers/application_helper_test.rb'
-# Offense count: 86
+# Offense count: 94
+# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: strict, flexible
Rails/TimeZone:
Exclude:
- 'test/models/message_test.rb'
-# Offense count: 230
+# Offense count: 255
Style/Documentation:
Enabled: false
-# Offense count: 462
+# Offense count: 503
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
-# SupportedStyles: when_needed, always, never
+# SupportedStyles: always, never
Style/FrozenStringLiteralComment:
Enabled: false
Exclude:
- 'app/controllers/api/ways_controller.rb'
-# Offense count: 70
+# Offense count: 74
# Cop supports --auto-correct.
# Configuration parameters: Strict.
Style/NumericLiterals:
MinDigits: 11
-# Offense count: 3080
-# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
+# Offense count: 3320
+# Cop supports --auto-correct.
+# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
- Max: 1073
+ Max: 307
apt:
packages:
- postgresql-server-dev-9.5
+ - libarchive-dev
services:
- memcached
env:
global:
- OSM_MEMCACHE_SERVERS="127.0.0.1"
before_script:
+ - sed -e "/idle_in_transaction_session_timeout/d" -e 's/ IMMUTABLE / /' -e "s/AS '.*libpgosm.*',/AS 'libpgosm',/" -e "/^--/d" db/structure.sql > db/structure.expected
- psql -U postgres -c "CREATE DATABASE openstreetmap"
- psql -U postgres -c "CREATE EXTENSION btree_gist" openstreetmap
- make -C db/functions libpgosm.so
- touch config/settings.local.yml
- bundle exec rake db:migrate
- bundle exec rake i18n:js:export
+ - bundle exec rake yarn:install
script:
- bundle exec rubocop -f fuubar
- - bundle exec rake eslint:run_all
+ - bundle exec rake eslint
- bundle exec erblint .
+ - bundle exec rake db:structure:dump
+ - sed -e "/idle_in_transaction_session_timeout/d" -e 's/ IMMUTABLE / /' -e "s/AS '.*libpgosm.*',/AS 'libpgosm',/" -e "/^--/d" db/structure.sql > db/structure.actual
+ - diff -uw db/structure.expected db/structure.actual
- bundle exec rake test:db
```
bundle exec rubocop
+bundle exec rake eslint
bundle exec erblint .
```
and why it should be the way it is.
* Check existing comments to ensure that they are not misleading.
+## i18n
+
+If you make a change that involve the locale files (in `config/locales`) then please
+only submit changes to the `en.yml` file. The other files are updated via
+[Translatewiki](https://translatewiki.net/wiki/Translating:OpenStreetMap) and should
+not be included in your pull request.
+
## Code Documentation
To generate the HTML documentation of the API/rails code, run the command
gem "json"
# Use postgres as the database
-gem "pg", "~> 0.18"
+gem "pg"
# Use SCSS for stylesheets
gem "sassc-rails"
gem "rack-cors"
gem "rails-i18n", "~> 4.0.0"
gem "record_tag_helper"
-gem "rinku", "= 2.0.4", :require => "rails_rinku"
+gem "rinku", ">= 2.0.6", :require => "rails_rinku"
+gem "strong_migrations"
gem "validates_email_format_of", ">= 1.5.1"
# Native OSM extensions
gem "logstasher"
# Used to generate images for traces
-gem "gd2-ffij"
+gem "bzip2-ffi"
+gem "ffi-libarchive"
+gem "gd2-ffij", ">= 0.4.0"
+gem "mimemagic"
# Used for browser detection
gem "browser"
gem "minitest", "~> 5.1", :platforms => [:ruby_19, :ruby_20]
gem "rails-controller-testing"
gem "rubocop"
+ gem "rubocop-performance"
+ gem "rubocop-rails"
gem "webmock"
end
gem "capybara", "~> 2.13"
gem "coveralls", :require => false
gem "erb_lint", :require => false
- gem "eslint-rails-ee"
- gem "execjs"
gem "factory_bot_rails"
gem "poltergeist"
gem "puma", "~> 3.7"
- gem "therubyracer", :platforms => :ruby
end
remote: https://rubygems.org/
specs:
SystemTimer (1.2.3)
- aasm (5.0.2)
+ aasm (5.0.5)
concurrent-ruby (~> 1.0)
actioncable (5.2.3)
actionpack (= 5.2.3)
activemodel (= 5.2.3)
activesupport (= 5.2.3)
arel (>= 9.0)
- activerecord-import (1.0.1)
+ activerecord-import (1.0.2)
activerecord (>= 3.2)
activestorage (5.2.3)
actionpack (= 5.2.3)
tzinfo (~> 1.1)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
- annotate (2.7.4)
- activerecord (>= 3.2, < 6.0)
+ annotate (2.7.5)
+ activerecord (>= 3.2, < 7.0)
rake (>= 10.4, < 13.0)
arel (9.0.0)
ast (2.4.0)
bigdecimal (1.1.0)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
- bootsnap (1.4.2)
+ bootsnap (1.4.4)
msgpack (~> 1.0)
browser (2.5.3)
builder (3.2.3)
- cancancan (2.3.0)
- canonical-rails (0.2.5)
+ bzip2-ffi (1.0.0)
+ ffi (~> 1.0)
+ cancancan (3.0.1)
+ canonical-rails (0.2.6)
rails (>= 4.1, < 6.1)
capybara (2.18.0)
addressable
coffee-script-source
execjs
coffee-script-source (1.12.2)
- colorize (0.8.1)
composite_primary_keys (11.1.0)
activerecord (~> 5.2.1)
concurrent-ruby (1.1.5)
- config (1.7.1)
- activesupport (>= 3.0)
- deep_merge (~> 1.2.1)
- dry-validation (>= 0.12.2)
- coveralls (0.8.22)
+ config (2.0.0)
+ activesupport (>= 4.2)
+ deep_merge (~> 1.2, >= 1.2.1)
+ dry-schema (~> 1.0)
+ coveralls (0.8.23)
json (>= 1.8, < 3)
simplecov (~> 0.16.1)
term-ansicolor (~> 1.3)
- thor (~> 0.19.4)
+ thor (>= 0.19.4, < 2.0)
tins (~> 1.6)
crack (0.4.3)
safe_yaml (~> 1.0.0)
dalli (2.7.10)
debug_inspector (0.0.3)
deep_merge (1.2.1)
- delayed_job (4.1.5)
+ delayed_job (4.1.7)
activesupport (>= 3.0, < 5.3)
delayed_job_active_record (4.1.3)
activerecord (>= 3.0, < 5.3)
delayed_job (>= 3.0, < 5)
- docile (1.3.1)
- dry-configurable (0.8.2)
+ docile (1.3.2)
+ dry-configurable (0.8.3)
concurrent-ruby (~> 1.0)
dry-core (~> 0.4, >= 0.4.7)
- dry-container (0.7.0)
+ dry-container (0.7.1)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1, >= 0.1.3)
- dry-core (0.4.7)
+ dry-core (0.4.8)
concurrent-ruby (~> 1.0)
dry-equalizer (0.2.2)
dry-inflector (0.1.2)
- dry-logic (0.5.0)
- dry-container (~> 0.2, >= 0.2.6)
+ dry-initializer (3.0.1)
+ dry-logic (1.0.2)
+ concurrent-ruby (~> 1.0)
dry-core (~> 0.2)
dry-equalizer (~> 0.2)
- dry-types (0.14.1)
+ dry-schema (1.2.0)
+ concurrent-ruby (~> 1.0)
+ dry-configurable (~> 0.8, >= 0.8.3)
+ dry-core (~> 0.4)
+ dry-equalizer (~> 0.2)
+ dry-initializer (~> 3.0)
+ dry-logic (~> 1.0)
+ dry-types (~> 1.0)
+ dry-types (1.0.1)
concurrent-ruby (~> 1.0)
dry-container (~> 0.3)
dry-core (~> 0.4, >= 0.4.4)
- dry-equalizer (~> 0.2)
+ dry-equalizer (~> 0.2, >= 0.2.2)
dry-inflector (~> 0.1, >= 0.1.2)
- dry-logic (~> 0.5, >= 0.5)
- dry-validation (0.13.1)
- concurrent-ruby (~> 1.0)
- dry-configurable (~> 0.1, >= 0.1.3)
- dry-core (~> 0.2, >= 0.2.1)
- dry-equalizer (~> 0.2)
- dry-logic (~> 0.5, >= 0.5.0)
- dry-types (~> 0.14.0)
+ dry-logic (~> 1.0)
dynamic_form (1.1.4)
erb_lint (0.0.28)
activesupport
rubocop (~> 0.51)
smart_properties
erubi (1.8.0)
- eslint-rails-ee (1.0.2)
- colorize
- execjs
- railties (>= 3.2)
execjs (2.7.0)
exifr (1.3.6)
factory_bot (5.0.2)
activesupport (>= 4.2.0)
- factory_bot_rails (5.0.1)
- factory_bot (~> 5.0.0)
+ factory_bot_rails (5.0.2)
+ factory_bot (~> 5.0.2)
railties (>= 4.2.0)
- fakefs (0.20.0)
+ fakefs (0.20.1)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
- ffi (1.10.0)
- fspath (3.1.0)
- gd2-ffij (0.3.0)
+ ffi (1.11.1)
+ ffi-libarchive (0.4.10)
+ ffi (~> 1.0)
+ fspath (3.1.1)
+ gd2-ffij (0.4.0)
ffi (>= 1.0.0)
geoip (1.6.4)
globalid (0.4.2)
activesupport (>= 4.2.0)
- hashdiff (0.3.8)
+ hashdiff (0.4.0)
hashie (3.6.0)
html_tokenizer (0.0.7)
htmlentities (4.3.4)
http_accept_language (2.0.5)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
- i18n-js (3.2.1)
+ i18n-js (3.3.0)
i18n (>= 0.6.6)
- image_optim (0.26.3)
+ image_optim (0.26.4)
exifr (~> 1.2, >= 1.2.2)
fspath (~> 3.0)
image_size (>= 1.5, < 3)
in_threads (~> 1.3)
progress (~> 3.0, >= 3.0.1)
- image_optim_rails (0.4.1)
+ image_optim_rails (0.4.2)
image_optim (~> 0.24)
rails
sprockets
- image_size (2.0.0)
- in_threads (1.5.1)
- jaro_winkler (1.5.2)
- jquery-rails (4.3.3)
+ image_size (2.0.1)
+ in_threads (1.5.2)
+ jaro_winkler (1.5.3)
+ jquery-rails (4.3.5)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jsonify-rails (0.3.2)
actionpack
jsonify (< 0.4.0)
- jwt (2.1.0)
+ jwt (2.2.1)
kgio (2.11.2)
kramdown (2.1.0)
- libv8 (3.16.14.19)
libxml-ruby (3.1.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
method_source (0.9.2)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
- mime-types-data (3.2018.0812)
+ mime-types-data (3.2019.0331)
mimemagic (0.3.3)
mini_mime (1.0.1)
mini_portile2 (2.4.0)
minitest (5.11.3)
- msgpack (1.2.9)
+ msgpack (1.3.0)
multi_json (1.13.1)
multi_xml (0.6.0)
- multipart-post (2.0.0)
+ multipart-post (2.1.1)
nio4r (2.3.1)
- nokogiri (1.10.2)
+ nokogiri (1.10.3)
mini_portile2 (~> 2.4.0)
nokogumbo (2.0.1)
nokogiri (~> 1.8, >= 1.8.4)
omniauth-github (1.3.0)
omniauth (~> 1.5)
omniauth-oauth2 (>= 1.4.0, < 2.0)
- omniauth-google-oauth2 (0.6.1)
+ omniauth-google-oauth2 (0.7.0)
jwt (>= 2.0)
omniauth (>= 1.1.1)
omniauth-oauth2 (>= 1.5)
mime-types
mimemagic (~> 0.3.0)
terrapin (~> 0.6.0)
- parallel (1.16.0)
- parser (2.6.2.0)
+ parallel (1.17.0)
+ parser (2.6.3.0)
ast (~> 2.4.0)
- pg (0.21.0)
+ pg (1.1.4)
poltergeist (1.18.1)
capybara (>= 2.1, < 4)
cliver (~> 0.3.1)
websocket-driver (>= 0.2.0)
- progress (3.5.0)
+ progress (3.5.1)
psych (3.1.0)
- public_suffix (3.0.3)
+ public_suffix (3.1.0)
puma (3.12.1)
quad_tile (1.0.1)
r2 (0.2.7)
- rack (2.0.6)
+ rack (2.0.7)
rack-cors (1.0.3)
rack-openid (1.3.1)
rack (>= 1.1.0)
ffi (~> 1.0)
record_tag_helper (1.0.0)
actionview (~> 5.x)
- ref (2.0.0)
request_store (1.4.1)
rack (>= 1.4)
- rinku (2.0.4)
- rotp (4.1.0)
+ rinku (2.0.6)
+ rotp (5.0.0)
addressable (~> 2.5)
- rubocop (0.66.0)
+ rubocop (0.71.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
- parser (>= 2.5, != 2.5.1.1)
- psych (>= 3.1.0)
+ parser (>= 2.6)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
- unicode-display_width (>= 1.4.0, < 1.6)
+ unicode-display_width (>= 1.4.0, < 1.7)
+ rubocop-performance (1.4.0)
+ rubocop (>= 0.71.0)
+ rubocop-rails (2.0.1)
+ rack (>= 1.1)
+ rubocop (>= 0.70.0)
ruby-openid (2.7.0)
- ruby-progressbar (1.10.0)
+ ruby-progressbar (1.10.1)
ruby_dep (1.5.0)
safe_yaml (1.0.5)
sanitize (5.0.0)
sassc (2.0.1)
ffi (~> 1.9)
rake
- sassc-rails (2.1.0)
+ sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
- smart_properties (1.13.1)
+ smart_properties (1.14.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
+ strong_migrations (0.4.0)
+ activerecord (>= 5)
term-ansicolor (1.7.1)
tins (~> 1.0)
terrapin (0.6.0)
climate_control (>= 0.0.3, < 1.0)
- therubyracer (0.12.3)
- libv8 (~> 3.16.14.15)
- ref
- thor (0.19.4)
+ thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.9)
- tins (1.20.2)
+ tins (1.20.3)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
- unicode-display_width (1.5.0)
+ unicode-display_width (1.6.0)
validates_email_format_of (1.6.3)
i18n
vendorer (0.2.0)
- webmock (3.5.1)
+ webmock (3.6.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
- hashdiff
- websocket-driver (0.7.0)
+ hashdiff (>= 0.4.0, < 2.0.0)
+ websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
- websocket-extensions (0.1.3)
+ websocket-extensions (0.1.4)
xpath (3.2.0)
nokogiri (~> 1.8)
binding_of_caller
bootsnap (>= 1.1.0)
browser
+ bzip2-ffi
cancancan
canonical-rails
capybara (~> 2.13)
delayed_job_active_record
dynamic_form
erb_lint
- eslint-rails-ee
- execjs
factory_bot_rails
fakefs
faraday
- gd2-ffij
+ ffi-libarchive
+ gd2-ffij (>= 0.4.0)
geoip
htmlentities
http_accept_language (~> 2.0.0)
libxml-ruby (>= 2.0.5)
listen
logstasher
+ mimemagic
minitest (~> 5.1)
oauth-plugin (>= 0.5.1)
omniauth
omniauth-windowslive
openstreetmap-deadlock_retry (>= 1.3.0)
paperclip (~> 5.2)
- pg (~> 0.18)
+ pg
poltergeist
psych
puma (~> 3.7)
rails-controller-testing
rails-i18n (~> 4.0.0)
record_tag_helper
- rinku (= 2.0.4)
+ rinku (>= 2.0.6)
rotp
rubocop
+ rubocop-performance
+ rubocop-rails
sanitize
sassc-rails
secure_headers
- therubyracer
+ strong_migrations
uglifier (>= 1.3.0)
validates_email_format_of (>= 1.5.1)
vendorer
webmock
BUNDLED WITH
- 1.16.2
+ 1.17.2
For Fedora, you can install the minimum requirements with:
```
-sudo yum install ruby ruby-devel rubygem-rdoc rubygem-bundler rubygems \
+sudo dnf install ruby ruby-devel rubygem-rdoc rubygem-bundler rubygems \
libxml2-devel js \
gcc gcc-c++ git \
postgresql postgresql-server postgresql-contrib postgresql-devel \
- perl-podlators ImageMagick libffi-devel
+ perl-podlators ImageMagick libffi-devel nodejs-yarn
```
If you didn't already have PostgreSQL installed then create a PostgreSQL instance and start the server:
bundle install
```
+## Node.js modules
+
+We use [Yarn](https://yarnpkg.com/) to manage the Node.js modules required for the project.
+
+```
+bundle exec rake yarn:install
+```
+
## Database setup
The Rails Port uses three databases - one for development, one for testing, and one for production. The database-specific configuration
end
folder 'leaflet' do
- file 'leaflet.js', 'https://unpkg.com/leaflet@1.4.0/dist/leaflet-src.js'
- file 'leaflet.css', 'https://unpkg.com/leaflet@1.4.0/dist/leaflet.css'
+ file 'leaflet.js', 'https://unpkg.com/leaflet@1.5.1/dist/leaflet-src.js'
+ file 'leaflet.css', 'https://unpkg.com/leaflet@1.5.1/dist/leaflet.css'
[ 'layers.png', 'layers-2x.png',
'marker-icon.png', 'marker-icon-2x.png',
'marker-shadow.png' ].each do |image|
- file "images/#{image}", "https://unpkg.com/leaflet@1.4.0/dist/images/#{image}"
+ file "images/#{image}", "https://unpkg.com/leaflet@1.5.1/dist/images/#{image}"
end
from 'git://github.com/aratcliffe/Leaflet.contextmenu.git', :tag => 'v1.5.0' do
if Settings.status != "database_offline"
can [:index, :new, :create, :show, :edit, :update, :destroy], ClientApplication
- can [:create, :edit, :comment, :subscribe, :unsubscribe], DiaryEntry
+ can [:new, :create, :edit, :update, :comment, :subscribe, :unsubscribe], DiaryEntry
can [:new, :create, :reply, :show, :inbox, :outbox, :mark, :destroy], Message
can [:close, :reopen], Note
can [:new, :create], Report
can [:account, :go_public, :make_friend, :remove_friend], User
if user.moderator?
+ can [:hide, :hidecomment], DiaryEntry
can [:index, :show, :resolve, :ignore, :reopen], Issue
can :create, IssueComment
can [:new, :create, :edit, :update, :destroy], Redaction
end
if user.administrator?
- can [:hide, :hidecomment], [DiaryEntry, DiaryComment]
+ can [:hide, :unhide, :hidecomment, :unhidecomment], DiaryEntry
can [:index, :show, :resolve, :ignore, :reopen], Issue
can :create, IssueComment
can [:set_status, :delete, :index], User
can :index, :map
can :show, :permission
can [:search_all, :search_nodes, :search_ways, :search_relations], :search
- can [:trackpoints], :swf
+ can :show, :version
if Settings.status != "database_offline"
can [:show, :download, :query], Changeset
if (hashParams.background) params.background = hashParams.background;
if (hashParams.comment) params.comment = hashParams.comment;
- if (hashParams.hashtags) params.hashtags = hashParams.hashtags;
- if (hashParams.source) params.source = hashParams.source;
if (hashParams.disable_features) params.disable_features = hashParams.disable_features;
- if (hashParams.offset) params.offset = hashParams.offset;
- if (hashParams.walkthrough) params.walkthrough = hashParams.walkthrough;
+ if (hashParams.hashtags) params.hashtags = hashParams.hashtags;
if (hashParams.locale) params.locale = hashParams.locale;
if (hashParams.maprules) params.maprules = hashParams.maprules;
+ if (hashParams.offset) params.offset = hashParams.offset;
+ if (hashParams.photo_overlay) params.photo_overlay = hashParams.photo_overlay;
if (hashParams.presets) params.presets = hashParams.presets;
+ if (hashParams.source) params.source = hashParams.source;
+ if (hashParams.walkthrough) params.walkthrough = hashParams.walkthrough;
if (id.data("gpx")) {
params.gpx = id.data("gpx");
var copyright = I18n.t("javascripts.map.copyright", { copyright_url: "/copyright" });
var donate = I18n.t("javascripts.map.donate_link_text", { donate_url: "https://donate.openstreetmap.org" });
+ var terms = I18n.t("javascripts.map.terms", { terms_url: "https://wiki.osmfoundation.org/wiki/Terms_of_Use" });
this.baseLayers = [];
this.baseLayers.push(new L.OSM.Mapnik({
- attribution: copyright + " ♥ " + donate,
+ attribution: copyright + " ♥ " + donate + ". " + terms,
code: "M",
keyid: "mapnik",
name: I18n.t("javascripts.map.base.standard")
if (OSM.THUNDERFOREST_KEY) {
this.baseLayers.push(new L.OSM.CycleMap({
- attribution: copyright + ". Tiles courtesy of <a href='https://www.thunderforest.com/' target='_blank'>Andy Allan</a>",
+ attribution: copyright + ". Tiles courtesy of <a href='https://www.thunderforest.com/' target='_blank'>Andy Allan</a>. " + terms,
apikey: OSM.THUNDERFOREST_KEY,
code: "C",
keyid: "cyclemap",
}));
this.baseLayers.push(new L.OSM.TransportMap({
- attribution: copyright + ". Tiles courtesy of <a href='https://www.thunderforest.com/' target='_blank'>Andy Allan</a>",
+ attribution: copyright + ". Tiles courtesy of <a href='https://www.thunderforest.com/' target='_blank'>Andy Allan</a>. " + terms,
apikey: OSM.THUNDERFOREST_KEY,
code: "T",
keyid: "transportmap",
}
this.baseLayers.push(new L.OSM.HOT({
- attribution: copyright + ". Tiles style by <a href='https://www.hotosm.org/' target='_blank'>Humanitarian OpenStreetMap Team</a> hosted by <a href='https://openstreetmap.fr/' target='_blank'>OpenStreetMap France</a>",
+ attribution: copyright + ". Tiles style by <a href='https://www.hotosm.org/' target='_blank'>Humanitarian OpenStreetMap Team</a> hosted by <a href='https://openstreetmap.fr/' target='_blank'>OpenStreetMap France</a>. " + terms,
code: "H",
keyid: "hot",
name: I18n.t("javascripts.map.base.hot")
},
getMapBaseLayerId: function () {
- var baseLayer;
+ var baseLayerId;
this.eachLayer(function (layer) {
- if (layer.options && layer.options.keyid) baseLayer = layer;
+ if (layer.options && layer.options.keyid) baseLayerId = layer.options.keyid;
});
- return baseLayer.keyid;
+ return baseLayerId;
},
getUrl: function (marker) {
L.OSM.Zoom = L.Control.extend({
- options: {
- position: "topright"
- },
+ options: {
+ position: "topright"
+ },
- onAdd: function (map) {
- var zoomName = "zoom",
- container = L.DomUtil.create("div", zoomName);
+ onAdd: function (map) {
+ var zoomName = "zoom",
+ container = L.DomUtil.create("div", zoomName);
- this._map = map;
+ this._map = map;
- this._zoomInButton = this._createButton(
- "", I18n.t("javascripts.map.zoom.in"), zoomName + "in", container, this._zoomIn, this);
- this._zoomOutButton = this._createButton(
- "", I18n.t("javascripts.map.zoom.out"), zoomName + "out", container, this._zoomOut, this);
+ this._zoomInButton = this._createButton(
+ "", I18n.t("javascripts.map.zoom.in"), zoomName + "in", container, this._zoomIn, this);
+ this._zoomOutButton = this._createButton(
+ "", I18n.t("javascripts.map.zoom.out"), zoomName + "out", container, this._zoomOut, this);
- map.on("zoomend zoomlevelschange", this._updateDisabled, this);
+ map.on("zoomend zoomlevelschange", this._updateDisabled, this);
- return container;
- },
+ return container;
+ },
- onRemove: function (map) {
- map.off("zoomend zoomlevelschange", this._updateDisabled, this);
- },
+ onRemove: function (map) {
+ map.off("zoomend zoomlevelschange", this._updateDisabled, this);
+ },
- _zoomIn: function (e) {
- this._map.zoomIn(e.shiftKey ? 3 : 1);
- },
+ _zoomIn: function (e) {
+ this._map.zoomIn(e.shiftKey ? 3 : 1);
+ },
- _zoomOut: function (e) {
- this._map.zoomOut(e.shiftKey ? 3 : 1);
- },
+ _zoomOut: function (e) {
+ this._map.zoomOut(e.shiftKey ? 3 : 1);
+ },
- _createButton: function (html, title, className, container, fn, context) {
- var link = L.DomUtil.create("a", "control-button " + className, container);
- link.innerHTML = html;
- link.href = "#";
- link.title = title;
+ _createButton: function (html, title, className, container, fn, context) {
+ var link = L.DomUtil.create("a", "control-button " + className, container);
+ link.innerHTML = html;
+ link.href = "#";
+ link.title = title;
- L.DomUtil.create("span", "icon " + className, link);
+ L.DomUtil.create("span", "icon " + className, link);
- var stop = L.DomEvent.stopPropagation;
+ var stop = L.DomEvent.stopPropagation;
- L.DomEvent
- .on(link, "click", stop)
- .on(link, "mousedown", stop)
- .on(link, "dblclick", stop)
- .on(link, "click", L.DomEvent.preventDefault)
- .on(link, "click", fn, context);
+ L.DomEvent
+ .on(link, "click", stop)
+ .on(link, "mousedown", stop)
+ .on(link, "dblclick", stop)
+ .on(link, "click", L.DomEvent.preventDefault)
+ .on(link, "click", fn, context);
- return link;
- },
+ return link;
+ },
- _updateDisabled: function () {
- var map = this._map,
- className = "disabled";
+ _updateDisabled: function () {
+ var map = this._map,
+ className = "disabled";
- L.DomUtil.removeClass(this._zoomInButton, className);
- L.DomUtil.removeClass(this._zoomOutButton, className);
+ L.DomUtil.removeClass(this._zoomInButton, className);
+ L.DomUtil.removeClass(this._zoomOutButton, className);
- if (map._zoom === map.getMinZoom()) {
- L.DomUtil.addClass(this._zoomOutButton, className);
- }
- if (map._zoom === map.getMaxZoom()) {
- L.DomUtil.addClass(this._zoomInButton, className);
- }
- }
+ if (map._zoom === map.getMinZoom()) {
+ L.DomUtil.addClass(this._zoomOutButton, className);
+ }
+ if (map._zoom === map.getMaxZoom()) {
+ L.DomUtil.addClass(this._zoomInButton, className);
+ }
+ }
});
L.OSM.zoom = function (options) {
- return new L.OSM.Zoom(options);
+ return new L.OSM.Zoom(options);
};
move the map without the hash changing.
*/
OSM.Router = function (map, rts) {
- var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g;
+ var escapeRegExp = /[-{}[\]+?.,\\^$|#\s]/g;
var optionalParam = /\((.*?)\)/g;
var namedParam = /(\(\?)?:\w+/g;
var splatParam = /\*\w+/g;
path.replace(escapeRegExp, "\\$&")
.replace(optionalParam, "(?:$1)?")
.replace(namedParam, function (match, optional) {
- return optional ? match : "([^\/]+)";
+ return optional ? match : "([^/]+)";
})
.replace(splatParam, "(.*?)") + "(?:\\?.*)?$");
$("#contributorTerms").html("<img src='" + OSM.SEARCHING + "' />");
$("#contributorTerms").load(url);
});
+
+ $("#read_ct").on("click", function () {
+ $("#continue").prop("disabled", !($(this).prop("checked") && $("#read_tou").prop("checked")));
+ });
+
+ $("#read_tou").on("click", function () {
+ $("#continue").prop("disabled", !($(this).prop("checked") && $("#read_ct").prop("checked")));
+ });
});
.diary_post {
position: relative;
- margin-top: $lineheight/2;
padding-top: $lineheight;
+ padding-bottom: $lineheight/2;
border-top: 1px solid #ccc;
+ &:first-of-type {
+ margin-top: $lineheight/2;
+ }
+
+ &.deemphasize {
+ background-color: #fee;
+ }
+
.post_heading {
margin-bottom: $lineheight;
max-width: 740px;
}
.diary-comment {
- margin-top: $lineheight/2;
border-top: 1px dashed #ccc;
padding-top: $lineheight/2;
+ padding-bottom: $lineheight/2;
&:first-child {
- margin-top: $lineheight;
+ margin-top: $lineheight/2;
padding-top: $lineheight;
border-top: 1px solid #ccc;
}
+ &.deemphasize {
+ background-color: #fee;
+ }
p {
margin-bottom: $lineheight/2;
}
def amf_handle_error(call, rootobj, rootid)
yield
- rescue OSM::APIAlreadyDeletedError => ex
- [-4, ex.object, ex.object_id]
- rescue OSM::APIVersionMismatchError => ex
- [-3, [rootobj, rootid], [ex.type.downcase, ex.id, ex.latest]]
- rescue OSM::APIUserChangesetMismatchError => ex
- [-2, ex.to_s]
- rescue OSM::APIBadBoundingBox => ex
- [-2, "Sorry - I can't get the map for that area. The server said: #{ex}"]
- rescue OSM::APIError => ex
- [-1, ex.to_s]
- rescue StandardError => ex
- [-2, "An unusual error happened (in #{call}). The server said: #{ex}"]
+ rescue OSM::APIAlreadyDeletedError => e
+ [-4, e.object, e.object_id]
+ rescue OSM::APIVersionMismatchError => e
+ [-3, [rootobj, rootid], [e.type.downcase, e.id, e.latest]]
+ rescue OSM::APIUserChangesetMismatchError => e
+ [-2, e.to_s]
+ rescue OSM::APIBadBoundingBox => e
+ [-2, "Sorry - I can't get the map for that area. The server said: #{e}"]
+ rescue OSM::APIError => e
+ [-1, e.to_s]
+ rescue StandardError => e
+ [-2, "An unusual error happened (in #{call}). The server said: #{e}"]
end
def amf_handle_error_with_timeout(call, rootobj, rootid)
end
# stupid Time seems to throw both of these for bad parsing, so
# we have to catch both and ensure the correct code path is taken.
- rescue ArgumentError => ex
- raise OSM::APIBadUserInput, ex.message.to_s
- rescue RuntimeError => ex
- raise OSM::APIBadUserInput, ex.message.to_s
+ rescue ArgumentError => e
+ raise OSM::APIBadUserInput, e.message.to_s
+ rescue RuntimeError => e
+ raise OSM::APIBadUserInput, e.message.to_s
end
##
@bounds = BoundingBox.from_bbox_params(params)
@bounds.check_boundaries
@bounds.check_size
- rescue StandardError => err
- report_error(err.message)
+ rescue StandardError => e
+ report_error(e.message)
return
end
+++ /dev/null
-module Api
- class SwfController < ApiController
- before_action :check_api_readable
- authorize_resource :class => false
-
- # to log:
- # RAILS_DEFAULT_LOGGER.error("Args: #{args[0]}, #{args[1]}, #{args[2]}, #{args[3]}")
- # $log.puts Time.new.to_s+','+Time.new.usec.to_s+": started GPS script"
- # http://localhost:3000/api/0.4/swf/trackpoints?xmin=-2.32402605810577&xmax=-2.18386309423859&ymin=52.1546608755772&ymax=52.2272777906895&baselong=-2.25325793066437&basey=61.3948537948532&masterscale=5825.4222222222
-
- # ====================================================================
- # Public methods
-
- # ---- trackpoints compile SWF of trackpoints
-
- def trackpoints
- # - Initialise
-
- baselong = params["baselong"].to_f
- basey = params["basey"].to_f
- masterscale = params["masterscale"].to_f
-
- bbox = BoundingBox.new(params["xmin"], params["ymin"],
- params["xmax"], params["ymax"])
- start = params["start"].to_i
-
- # - Begin movie
-
- bounds_left = 0
- bounds_right = 320 * 20
- bounds_bottom = 0
- bounds_top = 240 * 20
-
- m = ""
- m += swf_record(9, 255.chr + 155.chr + 155.chr) # Background
- absx = 0
- absy = 0
- xl = yb = 9999999
- xr = yt = -9999999
-
- # - Send SQL for GPS tracks
-
- b = ""
- lasttime = 0
- lasttrack = lastfile = "-1"
-
- if params["token"]
- user = User.authenticate(:token => params[:token])
- sql = "SELECT gps_points.latitude*0.0000001 AS lat,gps_points.longitude*0.0000001 AS lon,gpx_files.id AS fileid," + " EXTRACT(EPOCH FROM gps_points.timestamp) AS ts, gps_points.trackid AS trackid " + " FROM gpx_files,gps_points " + "WHERE gpx_files.id=gpx_id " + " AND gpx_files.user_id=#{user.id} " + " AND " + OSM.sql_for_area(bbox, "gps_points.") + " AND (gps_points.timestamp IS NOT NULL) " + "ORDER BY fileid DESC,ts " + "LIMIT 10000 OFFSET #{start}"
- else
- sql = "SELECT latitude*0.0000001 AS lat,longitude*0.0000001 AS lon,gpx_id AS fileid," + " EXTRACT(EPOCH FROM timestamp) AS ts, gps_points.trackid AS trackid " + " FROM gps_points " + "WHERE " + OSM.sql_for_area(bbox, "gps_points.") + " AND (gps_points.timestamp IS NOT NULL) " + "ORDER BY fileid DESC,ts " + "LIMIT 10000 OFFSET #{start}"
- end
- gpslist = ActiveRecord::Base.connection.select_all sql
-
- # - Draw GPS trace lines
-
- r = start_shape
- gpslist.each do |row|
- xs = (long2coord(row["lon"].to_f, baselong, masterscale) * 20).floor
- ys = (lat2coord(row["lat"].to_f, basey, masterscale) * 20).floor
- xl = [xs, xl].min
- xr = [xs, xr].max
- yb = [ys, yb].min
- yt = [ys, yt].max
- if row["ts"].to_i - lasttime > 180 || row["fileid"] != lastfile || row["trackid"] != lasttrack # or row['ts'].to_i==lasttime
- b += start_and_move(xs, ys, "01")
- absx = xs.floor
- absy = ys.floor
- end
- b += draw_to(absx, absy, xs, ys)
- absx = xs.floor
- absy = ys.floor
- lasttime = row["ts"].to_i
- lastfile = row["fileid"]
- lasttrack = row["trackid"]
- r += [b.slice!(0...80)].pack("B*") while b.length > 80
- end
-
- # (Unwayed segments removed)
-
- # - Write shape
-
- b += end_shape
- r += [b].pack("B*")
- m += swf_record(2, pack_u16(1) + pack_rect(xl, xr, yb, yt) + r)
- m += swf_record(4, pack_u16(1) + pack_u16(1))
-
- # - Create Flash header and write to browser
-
- m += swf_record(1, "") # Show frame
- m += swf_record(0, "") # End
-
- m = pack_rect(bounds_left, bounds_right, bounds_bottom, bounds_top) + 0.chr + 12.chr + pack_u16(1) + m
- m = "FWS" + 6.chr + pack_u32(m.length + 8) + m
-
- render :body => m, :content_type => "application/x-shockwave-flash"
- end
-
- private
-
- # =======================================================================
- # SWF functions
-
- # -----------------------------------------------------------------------
- # Line-drawing
-
- def start_shape
- s = 0.chr # No fill styles
- s += 2.chr # Two line styles
- s += pack_u16(0) + 0.chr + 255.chr + 255.chr # Width 5, RGB #00FFFF
- s += pack_u16(0) + 255.chr + 0.chr + 255.chr # Width 5, RGB #FF00FF
- s += 34.chr # 2 fill, 2 line index bits
- s
- end
-
- def end_shape
- "000000"
- end
-
- def start_and_move(x, y, col)
- d = "001001" # Line style change, moveTo
- l = [length_sb(x), length_sb(y)].max
- d += format("%05b%0*b%0*b", l, l, x, l, y)
- d += col # Select line style
- d
- end
-
- def draw_to(absx, absy, x, y)
- dx = x - absx
- dy = y - absy
-
- # Split the line up if there's anything>16383, because
- # that would overflow the 4 bits allowed for length
- mstep = [dx.abs / 16383, dy.abs / 16383, 1].max.ceil
- xstep = dx / mstep
- ystep = dy / mstep
- d = ""
- 1.upto(mstep).each do
- d += draw_section(x, y, x + xstep, y + ystep)
- x += xstep
- y += ystep
- end
- d
- end
-
- def draw_section(x1, y1, x2, y2)
- d = "11" # TypeFlag, EdgeFlag
- dx = x2 - x1
- dy = y2 - y1
- l = [length_sb(dx), length_sb(dy)].max
- d += format("%04b", l - 2)
- d += "1" # GeneralLine
- d += format("%0*b%0*b", l, dx, l, dy)
- d
- end
-
- # -----------------------------------------------------------------------
- # Specific data types
-
- # SWF data block type
-
- def swf_record(id, r)
- if r.length > 62
- # Long header: tag id, 0x3F, length
- pack_u16((id << 6) + 0x3F) + pack_u32(r.length) + r
- else
- # Short header: tag id, length
- pack_u16((id << 6) + r.length) + r
- end
- end
-
- # SWF RECT type
-
- def pack_rect(a, b, c, d)
- l = [length_sb(a),
- length_sb(b),
- length_sb(c),
- length_sb(d)].max
- # create binary string (00111001 etc.) - 5-byte length, then bbox
- n = format("%05b%0*b%0*b%0*b%0*b", l, l, a, l, b, l, c, l, d)
- # pack into byte string
- [n].pack("B*")
- end
-
- # -----------------------------------------------------------------------
- # Generic pack functions
-
- def pack_u16(n)
- [n.floor].pack("v")
- end
-
- def pack_u32(n)
- [n.floor].pack("V")
- end
-
- # Find number of bits required to store arbitrary-length binary
-
- def length_sb(n)
- Math.frexp(n + (n.zero? ? 1 : 0))[1] + 1
- end
-
- # ====================================================================
- # Co-ordinate conversion
- # (this is duplicated from amf_controller, should probably share)
-
- def lat2coord(a, basey, masterscale)
- -(lat2y(a) - basey) * masterscale
- end
-
- def long2coord(a, baselong, masterscale)
- (a - baselong) * masterscale
- end
-
- def lat2y(a)
- 180 / Math::PI * Math.log(Math.tan(Math::PI / 4 + a * (Math::PI / 180) / 2))
- end
- end
-end
bbox = BoundingBox.from_bbox_params(params)
bbox.check_boundaries
bbox.check_size
- rescue StandardError => err
- report_error(err.message)
+ rescue StandardError => e
+ report_error(e.message)
return
end
around_action :api_call_handle_error
def show
- trace = Trace.visible.find(params[:id])
+ @trace = Trace.visible.find(params[:id])
- if trace.public? || trace.user == current_user
- render :xml => trace.to_xml.to_s
- else
- head :forbidden
- end
+ head :forbidden unless @trace.public? || @trace.user == current_user
end
def update
def show
if @user.visible?
- render :action => :show, :content_type => "text/xml"
+ render :content_type => "text/xml"
else
head :gone
end
@users = User.visible.find(ids)
- render :action => :index, :content_type => "text/xml"
+ render :content_type => "text/xml"
end
def gpx_files
- doc = OSM::API.new.get_xml_doc
- current_user.traces.reload.each do |trace|
- doc.root << trace.to_xml_node
- end
- render :xml => doc.to_s
+ @traces = current_user.traces.reload
+ render :content_type => "application/xml"
end
private
--- /dev/null
+module Api
+ class VersionsController < ApiController
+ authorize_resource :class => false
+
+ around_action :api_call_handle_error, :api_call_timeout
+
+ # Show the list of available API versions. This will replace the global
+ # unversioned capabilities call in due course.
+ # Currently we only support deploying one version at a time, but this will
+ # hopefully change soon.
+ def show
+ @versions = [Settings.api_version]
+ end
+ end
+end
elsif session[:token]
session[:user] = current_user.id if self.current_user = User.authenticate(:token => session[:token])
end
- rescue StandardError => ex
- logger.info("Exception authorizing user: #{ex}")
+ rescue StandardError => e
+ logger.info("Exception authorizing user: #{e}")
reset_session
self.current_user = nil
end
def api_call_handle_error
yield
- rescue ActiveRecord::RecordNotFound => ex
+ rescue ActiveRecord::RecordNotFound => e
head :not_found
- rescue LibXML::XML::Error, ArgumentError => ex
- report_error ex.message, :bad_request
- rescue ActiveRecord::RecordInvalid => ex
- message = "#{ex.record.class} #{ex.record.id}: "
- ex.record.errors.each { |attr, msg| message << "#{attr}: #{msg} (#{ex.record[attr].inspect})" }
+ rescue LibXML::XML::Error, ArgumentError => e
+ report_error e.message, :bad_request
+ rescue ActiveRecord::RecordInvalid => e
+ message = "#{e.record.class} #{e.record.id}: "
+ e.record.errors.each { |attr, msg| message << "#{attr}: #{msg} (#{e.record[attr].inspect})" }
report_error message, :bad_request
- rescue OSM::APIError => ex
- report_error ex.message, ex.status
- rescue AbstractController::ActionNotFound => ex
+ rescue OSM::APIError => e
+ report_error e.message, e.status
+ rescue AbstractController::ActionNotFound => e
raise
- rescue StandardError => ex
- logger.info("API threw unexpected #{ex.class} exception: #{ex.message}")
- ex.backtrace.each { |l| logger.info(l) }
- report_error "#{ex.class}: #{ex.message}", :internal_server_error
+ rescue StandardError => e
+ logger.info("API threw unexpected #{e.class} exception: #{e.message}")
+ e.backtrace.each { |l| logger.info(l) }
+ report_error "#{e.class}: #{e.message}", :internal_server_error
end
##
OSM::Timer.timeout(Settings.web_timeout, Timeout::Error) do
yield
end
- rescue ActionView::Template::Error => ex
- ex = ex.cause
+ rescue ActionView::Template::Error => e
+ e = e.cause
- if ex.is_a?(Timeout::Error) ||
- (ex.is_a?(ActiveRecord::StatementInvalid) && ex.message =~ /execution expired/)
+ if e.is_a?(Timeout::Error) ||
+ (e.is_a?(ActiveRecord::StatementInvalid) && e.message =~ /execution expired/)
render :action => "timeout"
else
raise
elsif @params[:bbox]
changesets = conditions_bbox(changesets, BoundingBox.from_bbox_params(params))
elsif @params[:friends] && current_user
- changesets = changesets.where(:user_id => current_user.friend_users.identifiable)
+ changesets = changesets.where(:user_id => current_user.friends.identifiable)
elsif @params[:nearby] && current_user
changesets = changesets.where(:user_id => current_user.nearby)
end
changesets = changesets.where("changesets.id <= ?", @params[:max_id]) if @params[:max_id]
- @edits = changesets.order("changesets.id DESC").limit(20).preload(:user, :changeset_tags, :comments)
+ @changesets = changesets.order("changesets.id DESC").limit(20).preload(:user, :changeset_tags, :comments)
render :action => :index, :layout => false
end
authorize_resource
before_action :lookup_user, :only => [:show, :comments]
- before_action :check_database_writable, :only => [:new, :edit, :comment, :hide, :hidecomment, :subscribe, :unsubscribe]
- before_action :allow_thirdparty_images, :only => [:new, :edit, :index, :show, :comments]
+ before_action :check_database_writable, :only => [:new, :create, :edit, :update, :comment, :hide, :hidecomment, :subscribe, :unsubscribe]
+ before_action :allow_thirdparty_images, :only => [:new, :create, :edit, :update, :index, :show, :comments]
def new
@title = t "diary_entries.new.title"
- if request.post?
- @diary_entry = DiaryEntry.new(entry_params)
- @diary_entry.user = current_user
+ default_lang = current_user.preferences.where(:k => "diary.default_language").first
+ lang_code = default_lang ? default_lang.v : current_user.preferred_language
+ @diary_entry = DiaryEntry.new(entry_params.merge(:language_code => lang_code))
+ set_map_location
+ render :action => "new"
+ end
- if @diary_entry.save
- default_lang = current_user.preferences.where(:k => "diary.default_language").first
- if default_lang
- default_lang.v = @diary_entry.language_code
- default_lang.save!
- else
- current_user.preferences.create(:k => "diary.default_language", :v => @diary_entry.language_code)
- end
+ def create
+ @title = t "diary_entries.new.title"
- # Subscribe user to diary comments
- @diary_entry.subscriptions.create(:user => current_user)
+ @diary_entry = DiaryEntry.new(entry_params)
+ @diary_entry.user = current_user
- redirect_to :action => "index", :display_name => current_user.display_name
+ if @diary_entry.save
+ default_lang = current_user.preferences.where(:k => "diary.default_language").first
+ if default_lang
+ default_lang.v = @diary_entry.language_code
+ default_lang.save!
else
- render :action => "edit"
+ current_user.preferences.create(:k => "diary.default_language", :v => @diary_entry.language_code)
end
+
+ # Subscribe user to diary comments
+ @diary_entry.subscriptions.create(:user => current_user)
+
+ redirect_to :action => "index", :display_name => current_user.display_name
else
- default_lang = current_user.preferences.where(:k => "diary.default_language").first
- lang_code = default_lang ? default_lang.v : current_user.preferred_language
- @diary_entry = DiaryEntry.new(entry_params.merge(:language_code => lang_code))
- set_map_location
- render :action => "edit"
+ render :action => "new"
end
end
@title = t "diary_entries.edit.title"
@diary_entry = DiaryEntry.find(params[:id])
+ redirect_to diary_entry_path(@diary_entry.user, @diary_entry) if current_user != @diary_entry.user
+
+ set_map_location
+ rescue ActiveRecord::RecordNotFound
+ render :action => "no_such_entry", :status => :not_found
+ end
+
+ def update
+ @title = t "diary_entries.edit.title"
+ @diary_entry = DiaryEntry.find(params[:id])
+
if current_user != @diary_entry.user
redirect_to diary_entry_path(@diary_entry.user, @diary_entry)
elsif params[:diary_entry] && @diary_entry.update(entry_params)
redirect_to diary_entry_path(@diary_entry.user, @diary_entry)
+ else
+ set_map_location
+ render :action => "edit"
end
-
- set_map_location
rescue ActiveRecord::RecordNotFound
render :action => "no_such_entry", :status => :not_found
end
def comment
@entry = DiaryEntry.find(params[:id])
+ @comments = @entry.visible_comments
@diary_comment = @entry.comments.build(comment_params)
@diary_comment.user = current_user
if @diary_comment.save
elsif params[:friends]
if current_user
@title = t "diary_entries.index.title_friends"
- @entries = DiaryEntry.where(:user_id => current_user.friend_users)
+ @entries = DiaryEntry.where(:user_id => current_user.friends)
else
require_user
return
@page = (params[:page] || 1).to_i
@page_size = 20
- @entries = @entries.visible
+ @entries = @entries.visible unless current_user&.administrator?
@entries = @entries.order("created_at DESC")
@entries = @entries.offset((@page - 1) * @page_size)
@entries = @entries.limit(@page_size)
else
@entries = DiaryEntry.joins(:user).where(:users => { :status => %w[active confirmed] })
+ # Items can't be flagged as deleted in the RSS format.
+ # For the general feeds, allow a delay before publishing, to help spam fighting
+ @entries = @entries.where("created_at < :time", :time => Settings.diary_feed_delay.hours.ago)
+
if params[:language]
@entries = @entries.where(:language_code => params[:language])
@title = t("diary_entries.feed.language.title", :language_name => Language.find(params[:language]).english_name)
@link = url_for :action => "index", :host => Settings.server_url, :protocol => Settings.server_protocol
end
end
-
@entries = @entries.visible.includes(:user).order("created_at DESC").limit(20)
end
@entry = @user.diary_entries.visible.where(:id => params[:id]).first
if @entry
@title = t "diary_entries.show.title", :user => params[:display_name], :title => @entry.title
+ @comments = current_user&.administrator? ? @entry.comments : @entry.visible_comments
else
@title = t "diary_entries.no_such_entry.title", :id => params[:id]
render :action => "no_such_entry", :status => :not_found
redirect_to :action => "index", :display_name => entry.user.display_name
end
+ def unhide
+ entry = DiaryEntry.find(params[:id])
+ entry.update(:visible => true)
+ redirect_to :action => "index", :display_name => entry.user.display_name
+ end
+
def hidecomment
comment = DiaryComment.find(params[:comment])
comment.update(:visible => false)
redirect_to diary_entry_path(comment.diary_entry.user, comment.diary_entry)
end
+ def unhidecomment
+ comment = DiaryComment.find(params[:comment])
+ comment.update(:visible => true)
+ redirect_to diary_entry_path(comment.diary_entry.user, comment.diary_entry)
+ end
+
def comments
@comment_pages, @comments = paginate(:diary_comments,
:conditions => {
end
render :action => "results"
- rescue StandardError => ex
- @error = "Error contacting geocoder.ca: #{ex}"
+ rescue StandardError => e
+ @error = "Error contacting geocoder.ca: #{e}"
render :action => "error"
end
end
render :action => "results"
- rescue StandardError => ex
- @error = "Error contacting nominatim.openstreetmap.org: #{ex}"
+ rescue StandardError => e
+ @error = "Error contacting nominatim.openstreetmap.org: #{e}"
render :action => "error"
end
end
render :action => "results"
- rescue StandardError => ex
- @error = "Error contacting api.geonames.org: #{ex}"
+ rescue StandardError => e
+ @error = "Error contacting api.geonames.org: #{e}"
render :action => "error"
end
end
render :action => "results"
- rescue StandardError => ex
- @error = "Error contacting nominatim.openstreetmap.org: #{ex}"
+ rescue StandardError => e
+ @error = "Error contacting nominatim.openstreetmap.org: #{e}"
render :action => "error"
end
end
render :action => "results"
- rescue StandardError => ex
- @error = "Error contacting api.geonames.org: #{ex}"
+ rescue StandardError => e
+ @error = "Error contacting api.geonames.org: #{e}"
render :action => "error"
end
:style_src => %w['unsafe-inline']
)
- render "id", :layout => false
+ render :layout => false
end
private
begin
@trace = do_create(params[:trace][:gpx_file], params[:trace][:tagstring],
params[:trace][:description], params[:trace][:visibility])
- rescue StandardError => ex
- logger.debug ex
+ rescue StandardError => e
+ logger.debug e
end
if @trace.id
def save
@title = t "users.new.title"
- if params[:decline]
+ if params[:decline] || !(params[:read_tou] && params[:read_ct])
if current_user
current_user.terms_seen = true
else
redirect_to :action => :account, :display_name => current_user.display_name
end
- else
+ elsif params[:decline]
redirect_to t("users.terms.declined")
+ else
+ redirect_to :action => :terms
end
elsif current_user
unless current_user.terms_agreed?
current_user.consider_pd = params[:user][:consider_pd]
+ current_user.tou_agreed = Time.now.getutc
current_user.terms_agreed = Time.now.getutc
current_user.terms_seen = true
current_user.creation_ip = request.remote_ip
current_user.languages = http_accept_language.user_preferred_languages
current_user.terms_agreed = Time.now.getutc
+ current_user.tou_agreed = Time.now.getutc
current_user.terms_seen = true
if current_user.auth_uid.blank?
if @new_friend
if request.post?
- friend = Friend.new
- friend.befriender = current_user
- friend.befriendee = @new_friend
+ friendship = Friendship.new
+ friendship.befriender = current_user
+ friendship.befriendee = @new_friend
if current_user.is_friends_with?(@new_friend)
flash[:warning] = t "users.make_friend.already_a_friend", :name => @new_friend.display_name
- elsif friend.save
+ elsif friendship.save
flash[:notice] = t "users.make_friend.success", :name => @new_friend.display_name
- Notifier.friend_notification(friend).deliver_later
+ Notifier.friend_notification(friendship).deliver_later
else
- friend.add_error(t("users.make_friend.failed", :name => @new_friend.display_name))
+ friendship.add_error(t("users.make_friend.failed", :name => @new_friend.display_name))
end
if params[:referer]
if @friend
if request.post?
if current_user.is_friends_with?(@friend)
- Friend.where(:user_id => current_user.id, :friend_user_id => @friend.id).delete_all
+ Friendship.where(:befriender => current_user, :befriendee => @friend).delete_all
flash[:notice] = t "users.remove_friend.success", :name => @friend.display_name
else
flash[:error] = t "users.remove_friend.not_a_friend", :name => @friend.display_name
email.split("@").last
end
- if blocked = Acl.no_account_creation(request.remote_ip, domain)
+ mx_servers = if domain.nil?
+ nil
+ else
+ domain_mx_servers(domain)
+ end
+
+ if blocked = Acl.no_account_creation(request.remote_ip, :domain => domain, :mx => mx_servers)
logger.info "Blocked signup from #{request.remote_ip} for #{email}"
render :action => "blocked"
!blocked
end
+ ##
+ # get list of MX servers for a domains
+ def domain_mx_servers(domain)
+ Resolv::DNS.open do |dns|
+ dns.getresources(domain, Resolv::DNS::Resource::IN::MX).collect(&:exchange).collect(&:to_s)
+ end
+ end
+
##
# check if this user has a gravatar and set the user pref is true
def gravatar_enable(user)
content_tag(:span, time_ago_in_words(date), :title => l(date, :format => :friendly))
end
+ def friendly_date_ago(date)
+ content_tag(:span, time_ago_in_words(date, :scope => :'datetime.distance_in_words_ago'), :title => l(date, :format => :friendly))
+ end
+
def body_class
if content_for? :body_class
content_for :body_class
def changeset_details(changeset)
if changeset.closed_at > Time.now
action = :created
- time = distance_of_time_in_words_to_now(changeset.created_at)
+ time = time_ago_in_words(changeset.created_at, :scope => :'datetime.distance_in_words_ago')
title = l(changeset.created_at)
else
action = :closed
- time = distance_of_time_in_words_to_now(changeset.closed_at)
+ time = time_ago_in_words(changeset.closed_at, :scope => :'datetime.distance_in_words_ago')
title = "#{t('browse.created')}: #{l(changeset.created_at)} #{t('browse.closed')}: #{l(changeset.closed_at)}".html_safe
end
def note_event(event, at, by)
if by.nil?
I18n.t("browse.note." + event + "_by_anonymous",
- :when => friendly_date(at),
+ :when => friendly_date_ago(at),
:exact_time => l(at)).html_safe
else
I18n.t("browse.note." + event + "_by",
- :when => friendly_date(at),
+ :when => friendly_date_ago(at),
:exact_time => l(at),
:user => note_author(by)).html_safe
end
# either because the user viewed the block (updated_at) or it expired or was
# revoked (ends_at)
last_time = [block.ends_at, block.updated_at].max
- I18n.t("user_blocks.helper.time_past", :time => friendly_date(last_time)).html_safe
+ I18n.t("user_blocks.helper.time_past", :time => friendly_date_ago(last_time)).html_safe
+ end
+ end
+
+ def block_duration_in_words(duration)
+ parts = ActiveSupport::Duration.build(duration).parts
+ if duration < 1.day
+ I18n.t("user_blocks.helper.block_duration.hours", :count => parts[:hours])
+ elsif duration < 1.week
+ I18n.t("user_blocks.helper.block_duration.days", :count => parts[:days])
+ elsif duration < 1.month
+ I18n.t("user_blocks.helper.block_duration.weeks", :count => parts[:weeks])
+ elsif duration < 1.year
+ I18n.t("user_blocks.helper.block_duration.months", :count => parts[:months])
+ else
+ I18n.t("user_blocks.helper.block_duration.years", :count => parts[:years])
end
end
end
Notifier.gpx_failure(trace, "0 points parsed ok. Do they all have lat,lng,alt,timestamp?").deliver_later
trace.destroy
end
- rescue StandardError => ex
- logger.info ex.to_s
- ex.backtrace.each { |l| logger.info l }
- Notifier.gpx_failure(trace, ex.to_s + "\n" + ex.backtrace.join("\n")).deliver_later
+ rescue StandardError => e
+ logger.info e.to_s
+ e.backtrace.each { |l| logger.info l }
+ Notifier.gpx_failure(trace, e.to_s + "\n" + e.backtrace.join("\n")).deliver_later
trace.destroy
end
end
#
# Table name: acls
#
-# id :integer not null, primary key
+# id :bigint(8) not null, primary key
# address :inet
# k :string not null
# v :string
# domain :string
+# mx :string
#
# Indexes
#
-# acls_k_idx (k)
+# acls_k_idx (k)
+# index_acls_on_address (address) USING gist
+# index_acls_on_domain (domain)
+# index_acls_on_mx (mx)
#
class Acl < ActiveRecord::Base
validates :k, :presence => true
- def self.match(address, domain = nil)
- if domain
- Acl.where("address >>= ? OR domain = ?", address, domain)
- else
- Acl.where("address >>= ?", address)
- end
+ def self.match(address, options = {})
+ acls = Acl.where("address >>= ?", address)
+
+ acls = acls.or(Acl.where(:domain => options[:domain])) if options[:domain]
+ acls = acls.or(Acl.where(:mx => options[:mx])) if options[:mx]
+
+ acls
end
- def self.no_account_creation(address, domain = nil)
- match(address, domain).where(:k => "no_account_creation").exists?
+ def self.no_account_creation(address, options = {})
+ match(address, options).where(:k => "no_account_creation").exists?
end
def self.no_note_comment(address, domain = nil)
- match(address, domain).where(:k => "no_note_comment").exists?
+ match(address, :domain => domain).where(:k => "no_note_comment").exists?
end
def self.no_trace_download(address, domain = nil)
- match(address, domain).where(:k => "no_trace_download").exists?
+ match(address, :domain => domain).where(:k => "no_trace_download").exists?
end
end
#
# Table name: changesets
#
-# id :integer not null, primary key
-# user_id :integer not null
+# id :bigint(8) not null, primary key
+# user_id :bigint(8) not null
# created_at :datetime not null
# min_lat :integer
# max_lat :integer
#
# Indexes
#
-# changesets_bbox_idx (min_lat,max_lat,min_lon,max_lon)
+# changesets_bbox_idx (min_lat,max_lat,min_lon,max_lon) USING gist
# changesets_closed_at_idx (closed_at)
# changesets_created_at_idx (created_at)
# changesets_user_id_created_at_idx (user_id,created_at)
return Changeset.from_xml_node(pt, create)
end
raise OSM::APIBadXMLError.new("changeset", xml, "XML doesn't contain an osm/changeset element.")
- rescue LibXML::XML::Error, ArgumentError => ex
- raise OSM::APIBadXMLError.new("changeset", xml, ex.message)
+ rescue LibXML::XML::Error, ArgumentError => e
+ raise OSM::APIBadXMLError.new("changeset", xml, e.message)
end
def self.from_xml_node(pt, create = false)
# Table name: changeset_comments
#
# id :integer not null, primary key
-# changeset_id :integer not null
-# author_id :integer not null
+# changeset_id :bigint(8) not null
+# author_id :bigint(8) not null
# body :text not null
# created_at :datetime not null
# visible :boolean not null
#
# Table name: changeset_tags
#
-# changeset_id :integer not null, primary key
+# changeset_id :bigint(8) not null, primary key
# k :string default(""), not null, primary key
# v :string default(""), not null
#
#
# Table name: diary_comments
#
-# id :integer not null, primary key
-# diary_entry_id :integer not null
-# user_id :integer not null
+# id :bigint(8) not null, primary key
+# diary_entry_id :bigint(8) not null
+# user_id :bigint(8) not null
# body :text not null
# created_at :datetime not null
# updated_at :datetime not null
#
# Table name: diary_entries
#
-# id :integer not null, primary key
-# user_id :integer not null
+# id :bigint(8) not null, primary key
+# user_id :bigint(8) not null
# title :string not null
# body :text not null
# created_at :datetime not null
#
# Table name: diary_entry_subscriptions
#
-# user_id :integer not null, primary key
-# diary_entry_id :integer not null, primary key
+# user_id :bigint(8) not null, primary key
+# diary_entry_id :bigint(8) not null, primary key
#
# Indexes
#
#
# Table name: friends
#
-# id :integer not null, primary key
-# user_id :integer not null
-# friend_user_id :integer not null
+# id :bigint(8) not null, primary key
+# user_id :bigint(8) not null
+# friend_user_id :bigint(8) not null
#
# Indexes
#
# friends_user_id_fkey (user_id => users.id)
#
-class Friend < ActiveRecord::Base
+class Friendship < ActiveRecord::Base
+ self.table_name = "friends"
+
belongs_to :befriender, :class_name => "User", :foreign_key => :user_id
belongs_to :befriendee, :class_name => "User", :foreign_key => :friend_user_id
end
#
# Table name: messages
#
-# id :integer not null, primary key
-# from_user_id :integer not null
+# id :bigint(8) not null, primary key
+# from_user_id :bigint(8) not null
# title :string not null
# body :text not null
# sent_on :datetime not null
# message_read :boolean default(FALSE), not null
-# to_user_id :integer not null
+# to_user_id :bigint(8) not null
# to_user_visible :boolean default(TRUE), not null
# from_user_visible :boolean default(TRUE), not null
# body_format :enum default("markdown"), not null
#
# Table name: current_nodes
#
-# id :integer not null, primary key
+# id :bigint(8) not null, primary key
# latitude :integer not null
# longitude :integer not null
-# changeset_id :integer not null
+# changeset_id :bigint(8) not null
# visible :boolean not null
# timestamp :datetime not null
-# tile :integer not null
-# version :integer not null
+# tile :bigint(8) not null
+# version :bigint(8) not null
#
# Indexes
#
return Node.from_xml_node(pt, create)
end
raise OSM::APIBadXMLError.new("node", xml, "XML doesn't contain an osm/node element.")
- rescue LibXML::XML::Error, ArgumentError => ex
- raise OSM::APIBadXMLError.new("node", xml, ex.message)
+ rescue LibXML::XML::Error, ArgumentError => e
+ raise OSM::APIBadXMLError.new("node", xml, e.message)
end
def self.from_xml_node(pt, create = false)
#
# Table name: current_node_tags
#
-# node_id :integer not null, primary key
+# node_id :bigint(8) not null, primary key
# k :string default(""), not null, primary key
# v :string default(""), not null
#
#
# Table name: notes
#
-# id :integer not null, primary key
+# id :bigint(8) not null, primary key
# latitude :integer not null
# longitude :integer not null
-# tile :integer not null
+# tile :bigint(8) not null
# updated_at :datetime not null
# created_at :datetime not null
# status :enum not null
#
# Table name: note_comments
#
-# id :integer not null, primary key
-# note_id :integer not null
+# id :bigint(8) not null, primary key
+# note_id :bigint(8) not null
# visible :boolean not null
# created_at :datetime not null
# author_ip :inet
-# author_id :integer
+# author_id :bigint(8)
# body :text
# event :enum
#
# Indexes
#
-# index_note_comments_on_body (to_tsvector('english'::regconfig, body))
+# index_note_comments_on_body (to_tsvector('english'::regconfig, body)) USING gin
# index_note_comments_on_created_at (created_at)
# note_comments_note_id_idx (note_id)
#
#
# Table name: nodes
#
-# node_id :integer not null, primary key
+# node_id :bigint(8) not null, primary key
# latitude :integer not null
# longitude :integer not null
-# changeset_id :integer not null
+# changeset_id :bigint(8) not null
# visible :boolean not null
# timestamp :datetime not null
-# tile :integer not null
-# version :integer not null, primary key
+# tile :bigint(8) not null
+# version :bigint(8) not null, primary key
# redaction_id :integer
#
# Indexes
#
# Table name: node_tags
#
-# node_id :integer not null, primary key
-# version :integer not null, primary key
+# node_id :bigint(8) not null, primary key
+# version :bigint(8) not null, primary key
# k :string default(""), not null, primary key
# v :string default(""), not null
#
#
# Table name: relations
#
-# relation_id :integer default(0), not null, primary key
-# changeset_id :integer not null
+# relation_id :bigint(8) default(0), not null, primary key
+# changeset_id :bigint(8) not null
# timestamp :datetime not null
-# version :integer not null, primary key
+# version :bigint(8) not null, primary key
# visible :boolean default(TRUE), not null
# redaction_id :integer
#
#
# Table name: relation_members
#
-# relation_id :integer default(0), not null, primary key
+# relation_id :bigint(8) default(0), not null, primary key
# member_type :enum not null
-# member_id :integer not null
+# member_id :bigint(8) not null
# member_role :string not null
-# version :integer default(0), not null, primary key
+# version :bigint(8) default(0), not null, primary key
# sequence_id :integer default(0), not null, primary key
#
# Indexes
#
# Table name: relation_tags
#
-# relation_id :integer default(0), not null, primary key
+# relation_id :bigint(8) default(0), not null, primary key
# k :string default(""), not null, primary key
# v :string default(""), not null
-# version :integer not null, primary key
+# version :bigint(8) not null, primary key
#
# Foreign Keys
#
#
# Table name: ways
#
-# way_id :integer default(0), not null, primary key
-# changeset_id :integer not null
+# way_id :bigint(8) default(0), not null, primary key
+# changeset_id :bigint(8) not null
# timestamp :datetime not null
-# version :integer not null, primary key
+# version :bigint(8) not null, primary key
# visible :boolean default(TRUE), not null
# redaction_id :integer
#
#
# Table name: way_nodes
#
-# way_id :integer not null, primary key
-# node_id :integer not null
-# version :integer not null, primary key
-# sequence_id :integer not null, primary key
+# way_id :bigint(8) not null, primary key
+# node_id :bigint(8) not null
+# version :bigint(8) not null, primary key
+# sequence_id :bigint(8) not null, primary key
#
# Indexes
#
#
# Table name: way_tags
#
-# way_id :integer default(0), not null, primary key
+# way_id :bigint(8) default(0), not null, primary key
# k :string not null, primary key
# v :string not null
-# version :integer not null, primary key
+# version :bigint(8) not null, primary key
#
# Foreign Keys
#
# description :text
# created_at :datetime
# updated_at :datetime
-# user_id :integer not null
+# user_id :bigint(8) not null
# description_format :enum default("markdown"), not null
#
# Foreign Keys
#
# Table name: current_relations
#
-# id :integer not null, primary key
-# changeset_id :integer not null
+# id :bigint(8) not null, primary key
+# changeset_id :bigint(8) not null
# timestamp :datetime not null
# visible :boolean not null
-# version :integer not null
+# version :bigint(8) not null
#
# Indexes
#
return Relation.from_xml_node(pt, create)
end
raise OSM::APIBadXMLError.new("node", xml, "XML doesn't contain an osm/relation element.")
- rescue LibXML::XML::Error, ArgumentError => ex
- raise OSM::APIBadXMLError.new("relation", xml, ex.message)
+ rescue LibXML::XML::Error, ArgumentError => e
+ raise OSM::APIBadXMLError.new("relation", xml, e.message)
end
def self.from_xml_node(pt, create = false)
#
# Table name: current_relation_members
#
-# relation_id :integer not null, primary key
+# relation_id :bigint(8) not null, primary key
# member_type :enum not null
-# member_id :integer not null
+# member_id :bigint(8) not null
# member_role :string not null
# sequence_id :integer default(0), not null, primary key
#
#
# Table name: current_relation_tags
#
-# relation_id :integer not null, primary key
+# relation_id :bigint(8) not null, primary key
# k :string default(""), not null, primary key
# v :string default(""), not null
#
#
# Table name: gpx_files
#
-# id :integer not null, primary key
-# user_id :integer not null
+# id :bigint(8) not null, primary key
+# user_id :bigint(8) not null
# visible :boolean default(TRUE), not null
# name :string default(""), not null
-# size :integer
+# size :bigint(8)
# latitude :float
# longitude :float
# timestamp :datetime not null
validates :timestamp, :presence => true
validates :visibility, :inclusion => %w[private public trackable identifiable]
- def destroy
- super
- FileUtils.rm_f(trace_name)
- FileUtils.rm_f(icon_picture_name)
- FileUtils.rm_f(large_picture_name)
- end
+ after_destroy :remove_files
def tagstring
tags.collect(&:tag).join(", ")
extension
end
- def to_xml
- doc = OSM::API.new.get_xml_doc
- doc.root << to_xml_node
- doc
- end
-
- def to_xml_node
- el1 = XML::Node.new "gpx_file"
- el1["id"] = id.to_s
- el1["name"] = name.to_s
- el1["lat"] = latitude.to_s if inserted
- el1["lon"] = longitude.to_s if inserted
- el1["user"] = user.display_name
- el1["visibility"] = visibility
- el1["pending"] = inserted ? "false" : "true"
- el1["timestamp"] = timestamp.xmlschema
-
- el2 = XML::Node.new "description"
- el2 << description
- el1 << el2
-
- tags.each do |tag|
- el2 = XML::Node.new("tag")
- el2 << tag.tag
- el1 << el2
- end
-
- el1
- end
-
def update_from_xml(xml, create = false)
p = XML::Parser.string(xml, :options => XML::Parser::Options::NOERROR)
doc = p.parse
end
raise OSM::APIBadXMLError.new("trace", xml, "XML doesn't contain an osm/gpx_file element.")
- rescue LibXML::XML::Error, ArgumentError => ex
- raise OSM::APIBadXMLError.new("trace", xml, ex.message)
+ rescue LibXML::XML::Error, ArgumentError => e
+ raise OSM::APIBadXMLError.new("trace", xml, e.message)
end
def update_from_xml_node(pt, create = false)
def import
logger.info("GPX Import importing #{name} (#{id}) from #{user.email}")
- gpx = ::GPX::File.new(xml_file)
+ gpx = ::GPX::File.new(trace_name)
f_lat = 0
f_lon = 0
gpx
end
+
+ private
+
+ def remove_files
+ FileUtils.rm_f(trace_name)
+ FileUtils.rm_f(icon_picture_name)
+ FileUtils.rm_f(large_picture_name)
+ end
end
# trackid :integer not null
# latitude :integer not null
# longitude :integer not null
-# gpx_id :integer not null
+# gpx_id :bigint(8) not null
# timestamp :datetime
-# tile :integer
+# tile :bigint(8)
#
# Indexes
#
#
# Table name: gpx_file_tags
#
-# gpx_id :integer default(0), not null
+# gpx_id :bigint(8) default(0), not null
# tag :string not null
-# id :integer not null, primary key
+# id :bigint(8) not null, primary key
#
# Indexes
#
# Table name: users
#
# email :string not null
-# id :integer not null, primary key
+# id :bigint(8) not null, primary key
# pass_crypt :string not null
# creation_time :datetime not null
# display_name :string default(""), not null
# image_use_gravatar :boolean default(FALSE), not null
# image_content_type :string
# auth_provider :string
-# home_tile :integer
+# home_tile :bigint(8)
+# tou_agreed :datetime
#
# Indexes
#
has_many :messages, -> { where(:to_user_visible => true).order(:sent_on => :desc).preload(:sender, :recipient) }, :foreign_key => :to_user_id
has_many :new_messages, -> { where(:to_user_visible => true, :message_read => false).order(:sent_on => :desc) }, :class_name => "Message", :foreign_key => :to_user_id
has_many :sent_messages, -> { where(:from_user_visible => true).order(:sent_on => :desc).preload(:sender, :recipient) }, :class_name => "Message", :foreign_key => :from_user_id
- has_many :friends, -> { joins(:befriendee).where(:users => { :status => %w[active confirmed] }) }
- has_many :friend_users, :through => :friends, :source => :befriendee
+ has_many :friendships, -> { joins(:befriendee).where(:users => { :status => %w[active confirmed] }) }
+ has_many :friends, :through => :friendships, :source => :befriendee
has_many :tokens, :class_name => "UserToken"
has_many :preferences, :class_name => "UserPreference"
has_many :changesets, -> { order(:created_at => :desc) }
end
def is_friends_with?(new_friend)
- friends.where(:friend_user_id => new_friend.id).exists?
+ friendships.where(:befriendee => new_friend).exists?
end
##
# Table name: user_blocks
#
# id :integer not null, primary key
-# user_id :integer not null
-# creator_id :integer not null
+# user_id :bigint(8) not null
+# creator_id :bigint(8) not null
# reason :text not null
# ends_at :datetime not null
# needs_view :boolean default(FALSE), not null
-# revoker_id :integer
+# revoker_id :bigint(8)
# created_at :datetime
# updated_at :datetime
# reason_format :enum default("markdown"), not null
#
# Table name: user_preferences
#
-# user_id :integer not null, primary key
+# user_id :bigint(8) not null, primary key
# k :string not null, primary key
# v :string not null
#
# Table name: user_roles
#
# id :integer not null, primary key
-# user_id :integer not null
+# user_id :bigint(8) not null
# role :enum not null
# created_at :datetime
# updated_at :datetime
-# granter_id :integer not null
+# granter_id :bigint(8) not null
#
# Indexes
#
#
# Table name: user_tokens
#
-# id :integer not null, primary key
-# user_id :integer not null
+# id :bigint(8) not null, primary key
+# user_id :bigint(8) not null
# token :string not null
# expiry :datetime not null
# referer :text
#
# Table name: current_ways
#
-# id :integer not null, primary key
-# changeset_id :integer not null
+# id :bigint(8) not null, primary key
+# changeset_id :bigint(8) not null
# timestamp :datetime not null
# visible :boolean not null
-# version :integer not null
+# version :bigint(8) not null
#
# Indexes
#
return Way.from_xml_node(pt, create)
end
raise OSM::APIBadXMLError.new("node", xml, "XML doesn't contain an osm/way element.")
- rescue LibXML::XML::Error, ArgumentError => ex
- raise OSM::APIBadXMLError.new("way", xml, ex.message)
+ rescue LibXML::XML::Error, ArgumentError => e
+ raise OSM::APIBadXMLError.new("way", xml, e.message)
end
def self.from_xml_node(pt, create = false)
#
# Table name: current_way_nodes
#
-# way_id :integer not null, primary key
-# node_id :integer not null
-# sequence_id :integer not null, primary key
+# way_id :bigint(8) not null, primary key
+# node_id :bigint(8) not null
+# sequence_id :bigint(8) not null, primary key
#
# Indexes
#
#
# Table name: current_way_tags
#
-# way_id :integer not null, primary key
+# way_id :bigint(8) not null, primary key
# k :string default(""), not null, primary key
# v :string default(""), not null
#
# basic attributes
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
- osm << render(:partial => "api/changesets/changeset.builder", :locals => { :changeset => @changeset })
+ osm << render(@changeset)
end
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
@changesets.each do |changeset|
- osm << render(:partial => "api/changesets/changeset.builder", :locals => { :changeset => changeset })
+ osm << render(changeset)
end
end
<div class="note-comment" style="margin-top: 5px">
<% if comment.author.nil? -%>
- <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t ".#{comment.event}_at_html", :when => friendly_date(comment.created_at) %></div>
+ <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t ".#{comment.event}_at_html", :when => friendly_date_ago(comment.created_at) %></div>
<% else -%>
- <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t ".#{comment.event}_at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div>
+ <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t ".#{comment.event}_at_by_html", :when => friendly_date_ago(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div>
<% end -%>
<div class="note-comment-text"><%= comment.body %></div>
</div>
"xmlns" => "http://www.topografix.com/GPX/1/1",
"xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
"xsi:schemaLocation" => "http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd") do
- xml << (render(:partial => "note", :collection => @notes) || "")
+ xml << (render(@notes) || "")
end
json.type "FeatureCollection"
json.features(@notes) do |note|
- json.ingest! render(:partial => "note", :object => note)
+ json.ingest! render(note)
end
xml.description t("api.notes.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon)
xml.link url_for(:controller => "/site", :action => "index", :only_path => false)
- xml << (render(:partial => "note", :collection => @notes) || "")
+ xml << (render(@notes) || "")
end
end
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
- osm << (render(:partial => "note", :collection => @notes) || "")
+ osm << (render(@notes) || "")
end
"xmlns" => "http://www.topografix.com/GPX/1/1",
"xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
"xsi:schemaLocation" => "http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd") do
- xml << render(:partial => "note", :object => @note)
+ xml << render(@note)
end
-json.ingest! render(:partial => "note", :object => @note)
+json.ingest! render(@note)
xml.description t("api.notes.rss.description_item", :id => @note.id)
xml.link url_for(:controller => "/site", :action => "index", :only_path => false)
- xml << render(:partial => "note", :object => @note)
+ xml << render(@note)
end
end
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
- osm << render(:partial => "note", :object => @note)
+ osm << render(@note)
end
--- /dev/null
+# basic attributes
+
+attrs = {
+ "id" => trace.id,
+ "name" => trace.name,
+ "user" => trace.user.display_name,
+ "visibility" => trace.visibility,
+ "pending" => trace.inserted ? "false" : "true",
+ "timestamp" => trace.timestamp.xmlschema
+}
+
+if trace.inserted
+ attrs["lat"] = trace.latitude.to_s
+ attrs["lon"] = trace.longitude.to_s
+end
+
+xml.gpx_file(attrs) do |trace_xml_node|
+ trace_xml_node.description(trace.description)
+ trace.tags.each do |t|
+ trace_xml_node.tag(t.tag)
+ end
+end
--- /dev/null
+xml.instruct! :xml, :version => "1.0"
+
+xml.osm(OSM::API.new.xml_root_attributes) do |osm|
+ osm << render(@trace)
+end
--- /dev/null
+xml.instruct! :xml, :version => "1.0"
+
+xml.osm(OSM::API.new.xml_root_attributes) do |osm|
+ @traces.each do |trace|
+ osm << render(:partial => "api/traces/trace", :locals => { :trace => trace })
+ end
+end
xml.instruct! :xml, :version => "1.0"
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
- osm << render(:partial => "user", :collection => @users)
+ osm << render(@users)
end
xml.instruct! :xml, :version => "1.0"
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
- osm << render(:partial => "user", :object => @user)
+ osm << render(@user)
end
--- /dev/null
+xml.instruct! :xml, :version => "1.0"
+xml.osm(OSM::API.new.xml_root_attributes.except("version")) do |osm|
+ osm.api do |api|
+ @versions.each do |version|
+ api.version version
+ end
+ end
+end
<div class="details">
<%= t "browse.#{common_details.visible? ? :edited : :deleted}_by_html",
- :time => distance_of_time_in_words_to_now(common_details.timestamp),
+ :time => time_ago_in_words(common_details.timestamp, :scope => :'datetime.distance_in_words_ago'),
:user => changeset_user_link(common_details.changeset),
:title => l(common_details.timestamp) %>
</div>
<li id="c<%= comment.id %>">
<small class='deemphasize'>
<%= t(".commented_by",
- :when => friendly_date(comment.created_at),
+ :when => friendly_date_ago(comment.created_at),
:exact_time => l(comment.created_at),
:user => link_to(h(comment.author.display_name), user_path(comment.author))).html_safe %>
<% if current_user and current_user.moderator? %>
<li id="c<%= comment.id %>">
<small class='deemphasize'>
<%= t(".hidden_commented_by",
- :when => friendly_date(comment.created_at),
+ :when => friendly_date_ago(comment.created_at),
:exact_time => l(comment.created_at),
:user => link_to(h(comment.author.display_name), user_path(comment.author))).html_safe %>
— <span class="action-button deemphasize" data-comment-id="<%= comment.id %>" data-method="POST" data-url="<%= changeset_comment_unhide_url(comment.id) %>"><%= t("javascripts.changesets.show.unhide_comment") %></span>
:author => comment.author.display_name,
:changeset_id => comment.changeset.id.to_s %></h2>
<div class="changeset-comment" style="margin-top: 5px">
- <div class="changeset-comment-description" style="font-size: smaller; color: #999999"><%= t ".commented_at_by_html", :when => friendly_date(comment.created_at), :user => comment.author.display_name %></div>
+ <div class="changeset-comment-description" style="font-size: smaller; color: #999999"><%= t ".commented_at_by_html", :when => friendly_date_ago(comment.created_at), :user => comment.author.display_name %></div>
<div class="changeset-comment-text"><%= comment.body %></div>
</div>
"xmlns:georss" => "http://www.georss.org/georss") do |feed|
feed.title changeset_index_title(params, current_user)
- feed.updated @edits.map { |e| [e.created_at, e.closed_at].max }.max
+ feed.updated @changesets.map { |e| [e.created_at, e.closed_at].max }.max
feed.icon image_url("favicon.ico")
feed.logo image_url("mag_map-rss2.0.png")
end
end
- @edits.each do |changeset|
+ @changesets.each do |changeset|
feed.entry(changeset, :updated => changeset.closed_at, :id => changeset_url(changeset.id, :only_path => false)) do |entry|
entry.link :rel => "alternate",
:href => changeset_show_url(changeset, :only_path => false),
-<% if @edits.present? %>
+<% if @changesets.present? %>
<ol class="changesets">
- <%= render :partial => "changeset", :collection => @edits %>
+ <%= render @changesets %>
</ol>
-<% if @edits.size == 20 -%>
+<% if @changesets.size == 20 -%>
<div class="changeset_more">
- <%= link_to t(".load_more"), url_for(@params.merge(:max_id => @edits.last.id - 1)), :class => "button load_more" %>
+ <%= link_to t(".load_more"), url_for(@params.merge(:max_id => @changesets.last.id - 1)), :class => "button load_more" %>
<div class="loader"><%= image_tag "searching.gif" %></div>
</div>
<% end -%>
-<div class="clearfix diary-comment">
+<div class="clearfix diary-comment<%= " deemphasize" unless diary_comment.visible? %>">
<%= user_thumbnail diary_comment.user %>
<p class="deemphasize comment-heading" id="comment<%= diary_comment.id %>"><%= raw(t(".comment_from", :link_user => (link_to h(diary_comment.user.display_name), user_path(diary_comment.user)), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}"))) %>
<% if current_user and diary_comment.user.id != current_user.id %>
</p>
<div class="richtext"><%= diary_comment.body.to_html %></div>
- <% if current_user && current_user.administrator? %>
+ <% if can? :hidecomment, DiaryEntry %>
<span>
- <%= link_to t(".hide_link"), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %>
+ <% if diary_comment.visible? %>
+ <%= link_to t(".hide_link"), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %>
+ <% else %>
+ <%= link_to t(".unhide_link"), unhide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %>
+ <% end %>
</span>
<% end %>
</div>
-<div class='diary_post'>
+<div class='diary_post<%= " deemphasize" unless diary_entry.visible %>'>
<div class='post_heading clearfix'>
<% if !@user %>
<%= user_thumbnail diary_entry.user %>
</li>
<% end %>
- <% if current_user && current_user.administrator? %>
+ <% if can? :hide, DiaryEntry %>
<li>
- <%= link_to t(".hide_link"), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t(".confirm") } %>
+ <% if diary_entry.visible %>
+ <%= link_to t(".hide_link"), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t(".confirm") } %>
+ <% else %>
+ <%= link_to t(".unhide_link"), unhide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t(".confirm") } %>
+ <% end %>
</li>
<% end %>
</ul>
+++ /dev/null
-<%= render :partial => "diary_entry", :object => diary_index_entry %>
--- /dev/null
+<div class="diary_entry standard-form">
+ <fieldset>
+ <div class='form-row'>
+ <label class="standard-label"><%= t ".subject" -%></label>
+ <%= f.text_field :title, :class => "richtext_title" %>
+ </div>
+ <div class='form-row'>
+ <label class="standard-label"><%= t ".body" -%></label>
+ <%= richtext_area :diary_entry, :body, :cols => 80, :rows => 20, :format => @diary_entry.body_format %>
+ </div>
+ <div class='form-row'>
+ <label class="standard-label"><%= t ".language" -%></label>
+ <%= f.collection_select :language_code, Language.order(:english_name), :code, :name %>
+ </div>
+ </fieldset>
+ <fieldset class='location'>
+ <label class="standard-label"><%= t ".location" -%></label>
+ <%= content_tag "div", "", :id => "map", :data => { :lat => @lat, :lon => @lon, :zoom => @zoom } %>
+ <div class='form-row clearfix'>
+ <div class='form-column'>
+ <label class="secondary standard-label"><%= t ".latitude" -%></label>
+ <%= f.text_field :latitude, :size => 20, :id => "latitude" %>
+ </div>
+ <div class='form-column'>
+ <label class="secondary standard-label"><%= t ".longitude" -%></label>
+ <%= f.text_field :longitude, :size => 20, :id => "longitude" %>
+ </div>
+ <div class='form-column'>
+ <a href="#" id="usemap"><%= t ".use_map_link" -%></a>
+ </div>
+ </div>
+ </fieldset>
+
+ <%= f.submit %>
+</div>
<% cl = cycle("table0", "table1") %>
<tr class="<%= cl %>">
<td width="25%"><%= link_to comment.diary_entry.title, diary_entry_path(comment.diary_entry.user, comment.diary_entry) %></td>
- <td width="25%"><span title="<%= l comment.created_at, :format => :friendly %>"><%= t ".ago", :ago => time_ago_in_words(comment.created_at) %></span></td>
+ <td width="25%"><span title="<%= l comment.created_at, :format => :friendly %>"><%= time_ago_in_words(comment.created_at, :scope => :'datetime.distance_in_words_ago') %></span></td>
<td width="50%" class="richtext"><%= comment.body.to_html %></td>
</tr>
<% end -%>
<%= error_messages_for "diary_entry" %>
-<%= form_for :diary_entry do |f| %>
- <div class="diary_entry standard-form">
- <fieldset>
- <div class='form-row'>
- <label class="standard-label"><%= t ".subject" -%></label>
- <%= f.text_field :title, :class => "richtext_title" %>
- </div>
- <div class='form-row'>
- <label class="standard-label"><%= t ".body" -%></label>
- <%= richtext_area :diary_entry, :body, :cols => 80, :rows => 20, :format => @diary_entry.body_format %>
- </div>
- <div class='form-row'>
- <label class="standard-label"><%= t ".language" -%></label>
- <%= f.collection_select :language_code, Language.order(:english_name), :code, :name %>
- </div>
- </fieldset>
- <fieldset class='location'>
- <label class="standard-label"><%= t ".location" -%></label>
- <%= content_tag "div", "", :id => "map", :data => { :lat => @lat, :lon => @lon, :zoom => @zoom } %>
- <div class='form-row clearfix'>
- <div class='form-column'>
- <label class="secondary standard-label"><%= t ".latitude" -%></label>
- <%= f.text_field :latitude, :size => 20, :id => "latitude" %>
- </div>
- <div class='form-column'>
- <label class="secondary standard-label"><%= t ".longitude" -%></label>
- <%= f.text_field :longitude, :size => 20, :id => "longitude" %>
- </div>
- <div class='form-column'>
- <a href="#" id="usemap"><%= t ".use_map_link" -%></a>
- </div>
- </div>
- </fieldset>
-
- <% if action_name == 'new' %>
- <%= submit_tag t("diary_entries.new.publish_button") %>
- <% else %>
- <%= submit_tag t(".save_button") %>
- <% end %>
- </div>
+<%= form_for @diary_entry, :url => diary_entry_path(current_user, @diary_entry), :html => { :method => :put } do |f| %>
+ <%= render :partial => "form", :locals => { :f => f } %>
<% end %>
<% if @user %>
<% if @user == current_user %>
<div>
- <li><%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t(".new"), diary_new_path, :title => t(".new_title") %></li>
+ <li><%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t(".new"), new_diary_entry_path, :title => t(".new_title") %></li>
</div>
<% end %>
<% else %>
<% if current_user %>
<div>
- <li><%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t(".new"), diary_new_path, :title => t(".new_title") %></li>
+ <li><%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t(".new"), new_diary_entry_path, :title => t(".new_title") %></li>
</div>
<% end %>
<% end %>
<% else %>
<h4><%= t ".recent_entries" %></h4>
- <% if @user %>
- <%= render :partial => "diary_entry", :collection => @entries %>
- <% else %>
- <%= render :partial => "diary_index_entry", :collection => @entries %>
- <% end %>
+ <%= render @entries %>
<div class="pagination">
<% if @entries.size < @page_size -%>
--- /dev/null
+<% content_for :head do %>
+ <%= javascript_include_tag "diary_entry" %>
+<% end %>
+
+<% content_for :heading do %>
+ <h1><%= @title %></h1>
+<% end %>
+
+<%= error_messages_for "diary_entry" %>
+
+<%= form_for @diary_entry do |f| %>
+ <%= render :partial => "form", :locals => { :f => f } %>
+<% end %>
</div>
<% end %>
-<%= render :partial => "diary_entry", :object => @entry %>
+<%= render @entry %>
<a id="comments"></a>
<div class='comments'>
-<%= render :partial => "diary_comment", :collection => @entry.visible_comments %>
+<%= render :partial => "diary_comment", :collection => @comments %>
</div>
<div>
<%= error_messages_for "diary_comment" %>
- <%= form_for :diary_comment, :url => { :action => "comment" } do |f| %>
+ <%= form_for @entry.comments.new, :url => { :action => "comment" } do |f| %>
<%= richtext_area :diary_comment, :body, :cols => 80, :rows => 15 %>
- <%= submit_tag t(".save_button") %>
+ <%= f.submit %>
<% end %>
<% if @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>
<%= label_tag :reassign, t(".reassign_param") %> <%= check_box_tag :reassign, true %>
<br />
<br />
- <%= submit_tag "Submit" %>
+ <%= f.submit %>
<% end %>
</div>
<td>
<% if issue.user_updated %>
<%= t ".last_updated_time_user_html", :user => link_to(issue.user_updated.display_name, user_path(issue.user_updated)),
- :time => distance_of_time_in_words_to_now(issue.updated_at),
+ :time => time_ago_in_words(issue.updated_at, :scope => :'datetime.distance_in_words_ago'),
:title => l(issue.updated_at) %>
<% else %>
- <%= t ".last_updated_time_html", :time => distance_of_time_in_words_to_now(issue.updated_at),
+ <%= t ".last_updated_time_html", :time => time_ago_in_words(issue.updated_at, :scope => :'datetime.distance_in_words_ago'),
:title => l(issue.updated_at) %>
<% end %>
</td>
</li>
<% end %>
<li class="compact-hide <%= current_page_class(traces_path) %>"><%= link_to t("layouts.gps_traces"), traces_path %></li>
- <li class="compact-hide <%= current_page_class(diary_path) %>"><%= link_to t("layouts.user_diaries"), diary_path %></li>
+ <li class="compact-hide <%= current_page_class(diary_entries_path) %>"><%= link_to t("layouts.user_diaries"), diary_entries_path %></li>
<li class="compact-hide <%= current_page_class(copyright_path) %>"><%= link_to t("layouts.copyright"), copyright_path %></li>
<li class="compact-hide <%= current_page_class(help_path) %>"><%= link_to t("layouts.help"), help_path %></li>
<li class="compact-hide <%= current_page_class(about_path) %>"><%= link_to t("layouts.about"), about_path %></li>
</li>
<% end %>
<li class="<%= current_page_class(traces_path) %>"><%= link_to t("layouts.gps_traces"), traces_path %></li>
- <li class="<%= current_page_class(diary_path) %>"><%= link_to t("layouts.user_diaries"), diary_path %></li>
+ <li class="<%= current_page_class(diary_entries_path) %>"><%= link_to t("layouts.user_diaries"), diary_entries_path %></li>
<li class="<%= current_page_class(copyright_path) %>"><%= link_to t("layouts.copyright"), copyright_path %></li>
<li class="<%= current_page_class(help_path) %>"><%= link_to t("layouts.help"), help_path %></li>
<li class="<%= current_page_class(about_path) %>"><%= link_to t("layouts.about"), about_path %></li>
<%= yield :greeting %>
</li>
<li>
- <%= link_to t("layouts.logout"), logout_path(:session => session.id, :referer => request.fullpath) %>
+ <%= link_to t("layouts.logout"), logout_path(:session => session.id, :referer => request.fullpath), :class => "geolink" %>
</li>
</ul>
</div>
<% else %>
<ul class="user-menu clearfix">
- <li><%= link_to t("layouts.log_in"), login_path(:referer => request.fullpath) %></li>
+ <li><%= link_to t("layouts.log_in"), login_path(:referer => request.fullpath), :class => "geolink" %></li>
<li><%= link_to t("layouts.sign_up"), user_new_path %></li>
</ul>
<% end %>
<%= richtext_area :message, :body, :cols => 80, :rows => 20 %>
</div>
<div class='buttons'>
- <%= submit_tag t(".send_button") %>
+ <%= f.submit %>
<%= link_to t(".back_to_inbox"), inbox_messages_path, :class => "deemphasize button" %>
</div>
</fieldset>
<td><%= link_to note.id, browse_note_path(note) %></td>
<td><%= note_author(note.author) %></td>
<td><%= note.comments.first.body.to_html %></td>
- <td><%= t ".ago_html", :when => friendly_date(note.created_at) %></td>
- <td><%= t ".ago_html", :when => friendly_date(note.updated_at) %></td>
+ <td><%= friendly_date_ago(note.created_at) %></td>
+ <td><%= friendly_date_ago(note.updated_at) %></td>
</tr>
<% end -%>
</table>
<%= form_for @client_application, :url => oauth_client_path(@client_application.user.display_name, @client_application), :html => { :method => :put } do |f| %>
<%= render :partial => "form", :locals => { :f => f } %>
- <%= submit_tag t ".submit" %>
+ <%= f.submit %>
<% end %>
<% end %>
<div class='standard-form'>
- <%= form_for :client_application, :url => { :action => :create } do |f| %>
+ <%= form_for @client_application, :url => { :action => :create } do |f| %>
<%= render :partial => "form", :locals => { :f => f } %>
- <%= submit_tag t(".submit") %>
+ <%= f.submit %>
<% end %>
</div>
+++ /dev/null
-<ul id="redaction_list">
- <%= render :partial => "redaction", :collection => @redactions %>
-</ul>
<%= richtext_area :redaction, :description, :cols => 80, :rows => 20, :format => @redaction.description_format %>
</p>
<p>
- <%= f.submit t(".submit") %>
+ <%= f.submit %>
</p>
<% end %>
<% end %>
<% unless @redactions.empty? %>
- <%= render :partial => "redactions" %>
+ <ul id="redaction_list">
+ <%= render @redactions %>
+ </ul>
<% else %>
<p><%= t ".empty" %></p>
<% end %>
<%= richtext_area :redaction, :description, :cols => 80, :rows => 20, :format => @redaction.description_format %>
</p>
<p>
- <%= f.submit t(".submit") %>
+ <%= f.submit %>
</p>
<% end %>
<div class='section'>
<h2><div class='icon community'></div><%= t ".community_driven_title" %></h2>
- <p><%= t ".community_driven_html", :diary_path => diary_path %></p>
+ <p><%= t ".community_driven_html", :diary_path => diary_entries_path %></p>
</div>
<div class='section' id='open-data'>
<% if trace.inserted %>
(<%= t ".count_points", :count => trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/, '\1,') %>)
<% end %>
- ... <%= t ".ago", :time_in_words_ago => time_ago_in_words(trace.timestamp) %></span>
+ ... <%= time_ago_in_words(trace.timestamp, :scope => :'datetime.distance_in_words_ago') %></span>
<%= link_to_if trace.inserted?, t(".map"), { :controller => "site", :action => "index", :mlat => trace.latitude, :mlon => trace.longitude, :anchor => "map=14/#{trace.latitude}/#{trace.longitude}" }, { :title => t(".view_map") } %> /
<%= link_to t(".edit"), { :controller => "site", :action => "edit", :gpx => trace.id }, { :title => t(".edit_map") } %>
<span class="trace_<%= trace.visibility %>"><%= t("." + trace.visibility) %></span>
</div>
-<%= submit_tag t ".save_button" %>
+<%= f.submit %>
<% end %>
</tr>
</thead>
<tbody>
- <%= render :partial => "trace", :collection => @traces unless @traces.nil? %>
+ <%= render @traces unless @traces.nil? %>
</tbody>
</table>
</div>
</fieldset>
- <%= submit_tag t(".upload_button") %>
+ <%= f.submit %>
<span class="form-help deemphasize"><a href="<%= t ".help_url" %>"><%= t ".help" %></a></span>
</div>
<% end %>
</p>
<p>
<%= label_tag "user_block_period", t(".period") %><br />
- <%= select_tag("user_block_period", options_for_select(UserBlock::PERIODS.collect { |h| [t("user_blocks.period", :count => h), h.to_s] }, params[:user_block_period])) %>
+ <%= select_tag("user_block_period", options_for_select(UserBlock::PERIODS.collect { |h| [block_duration_in_words(h.hours), h.to_s] }, params[:user_block_period])) %>
</p>
<p>
<%= f.check_box :needs_view %>
<%= f.label :needs_view, t(".needs_view") %>
</p>
<p>
- <%= f.submit t(".submit") %>
+ <%= f.submit %>
</p>
<% end %>
</p>
<p>
<%= label_tag "user_block_period", t(".period") %><br />
- <%= select_tag("user_block_period", options_for_select(UserBlock::PERIODS.collect { |h| [t("user_blocks.period", :count => h), h.to_s] }, params[:user_block_period])) %>
+ <%= select_tag("user_block_period", options_for_select(UserBlock::PERIODS.collect { |h| [block_duration_in_words(h.hours), h.to_s] }, params[:user_block_period])) %>
</p>
<p>
<%= f.check_box :needs_view %>
</p>
<p>
<%= hidden_field_tag "display_name", @user.display_name %>
- <%= f.submit t(".submit") %>
+ <%= f.submit %>
</p>
<% end %>
<% else %>
<p>
- <%= t(".past", :time => distance_of_time_in_words_to_now(@user_block.ends_at)) %>
+ <%= t(".past", :time => time_ago_in_words(@user_block.ends_at, :scope => :'datetime.distance_in_words_ago')) %>
</p>
<% end %>
</p>
<% end %>
-<p><b><%= t ".created" %></b>: <%= raw t ".ago", :time => friendly_date(@user_block.created_at) %></p>
+<p><b><%= t ".created" %></b>: <%= friendly_date_ago(@user_block.created_at) %></p>
<p><b><%= t ".status" %></b>: <%= block_status(@user_block) %></p>
<p>
<% changeset = contact.changesets.first %>
<% if changeset %>
- <%= t("users.show.latest edit", :ago => t("users.show.ago", :time_in_words_ago => time_ago_in_words(changeset.created_at))) %>
+ <%= t("users.show.latest edit", :ago => time_ago_in_words(changeset.created_at, :scope => :'datetime.distance_in_words_ago')) %>
<% comment = changeset.tags["comment"].to_s != "" ? changeset.tags["comment"] : t("browse.no_comment") %>
"<%= link_to(comment,
{ :controller => "browse", :action => "changeset", :id => changeset.id },
<%= check_box_tag "user_all", "1", false %>
</td>
</tr>
- <%= render :partial => "user", :collection => @users %>
+ <%= render @users %>
</table>
<div id="user_list_actions buttons">
<%= content_tag "div", "", :id => "map", :class => "content_map", :data => { :user => user_data } %>
<% end %>
- <% friends = @user.friends.collect(&:befriendee) %>
+ <% friends = @user.friends %>
<% nearby = @user.nearby - friends %>
<div class="activity-block column-1">
<% else %>
<ul class='secondary-actions clearfix'>
<li><%= link_to t(".friends_changesets"), friend_changesets_path %></li>
- <li><%= link_to t(".friends_diaries"), friend_diaries_path %></li>
+ <li><%= link_to t(".friends_diaries"), friends_diary_entries_path %></li>
</ul>
<div id="friends-container">
<%= render :partial => "contact", :collection => friends, :locals => { :type => "friend" } %>
<% else %>
<ul class='secondary-actions clearfix'>
<li><%= link_to t(".nearby_changesets"), nearby_changesets_path %></li>
- <li><%= link_to t(".nearby_diaries"), nearby_diaries_path %></li>
+ <li><%= link_to t(".nearby_diaries"), nearby_diary_entries_path %></li>
</ul>
<div id="nearbyusers">
<%= render :partial => "contact", :collection => nearby, :locals => { :type => "nearby mapper" } %>
<%= form_tag({ :action => "save" }, { :class => " inner22 standard-form fillL" }) do %>
<!-- legale is <%= @legale %> -->
+ <p class="deemphasize"><%= t ".read and accept with tou" %></p>
+ <label class="standard-label">
+ <%= t ".heading_ct" %>
+ </label>
<div class='form-row horizontal-list'>
+ <p class="deemphasize"><%= t ".contributor_terms_explain" %></p>
<label class="standard-label">
<%= t ".legale_select" %>
</label>
<%= render :partial => "terms" %>
</div>
+ <div>
+ <p id="contributorGuidance" class="deemphasize">
+ <%= raw t ".guidance",
+ :summary => "https://www.osmfoundation.org/wiki/License/Contributor_Terms_Summary",
+ :translations => "https://www.osmfoundation.org/wiki/License/Contributor_Terms/Informal_Translations" %>
+ </p>
+ </div>
<div class="form-row">
- <label for="user_consider_pd">
- <%= check_box("user", "consider_pd") %>
- <%= t ".consider_pd" %>
+ <label for="read_ct">
+ <%= check_box_tag "read_ct" %>
+ <%= t ".read_ct" %>
+ </label>
+ </div>
+
+ <label class="standard-label">
+ <%= t "layouts.tou" %>
+ </label>
+ <p class="deemphasize"><%= t ".tou_explain_html", :tou_link => link_to(t("layouts.tou"), "https://wiki.osmfoundation.org/wiki/Terms_of_Use", :target => :new) %></p>
+ <div class="form-row">
+ <label for="read_tou">
+ <%= check_box_tag "read_tou" %>
+ <%= t ".read_tou" %>
</label>
- <span class="minorNote">(<%= link_to(t(".consider_pd_why"), t(".consider_pd_why_url"), :target => :new) %>)</span>
<%= hidden_field_tag("referer", h(params[:referer])) unless params[:referer].nil? %>
<div class="buttons form-row inner20 clearfix">
- <p class="deemphasize"><%= t ".read and accept" %></p>
- <%= submit_tag(t(".agree"), :name => "agree", :id => "agree") %>
- <%= submit_tag(t(".decline"), :name => "decline", :id => "decline") %>
+ <%= submit_tag("Continue", :name => "continue", :id => "continue", :disabled => true) %>
+ <%= submit_tag("Cancel", :name => "decline", :id => "decline") %>
</div>
- <div class="deemphasize">
- <p id="contributorGuidance">
- <%= raw t ".guidance",
- :summary => "https://www.osmfoundation.org/wiki/License/Contributor_Terms_Summary",
- :translations => "https://www.osmfoundation.org/wiki/License/Contributor_Terms/Informal_Translations" %>
- </p>
- </div>
+ <label for="user_consider_pd">
+ <%= check_box("user", "consider_pd") %>
+ <%= t ".consider_pd" %>
+ </label>
+ <span class="minorNote">(<%= link_to(t(".consider_pd_why"), t(".consider_pd_why_url"), :target => :new) %>)</span>
+
</div>
<% end %>
module PluralizationFallback
def pluralize(locale, entry, count)
super
- rescue InvalidPluralizationData => ex
- raise ex unless ex.entry.key?(:other)
+ rescue InvalidPluralizationData => e
+ raise e unless e.entry.key?(:other)
- ex.entry[:other]
+ e.entry[:other]
end
end
end
--- /dev/null
+StrongMigrations.start_after = 20190518115041 # rubocop:disable Style/NumericLiterals
# Messages for Afrikaans (Afrikaans)
# Exported from translatewiki.net
# Export driver: phpyaml
+# Author: Abijeet Patro
# Author: Arnobarnard
# Author: Biggs ZA
# Author: Firefishy
time:
formats:
friendly: '%e %B %Y om %H:%M'
+ helpers:
+ submit:
+ diary_comment:
+ create: Stoor
+ diary_entry:
+ create: Publiseer
+ message:
+ create: Stuur
+ client_application:
+ create: Registreer
+ update: Redigeer
+ trace:
+ create: Laai op
+ update: Stoor Wysigings
+ user_block:
+ create: Skep versperring
+ update: Werk versperring by
activerecord:
models:
acl: Toegangsbeheerlys
diary_entries:
new:
title: Nuwe dagboekinskrywing
- publish_button: Publiseer
+ form:
+ subject: 'Onderwerp:'
+ body: 'Teks:'
+ language: 'Taal:'
+ location: 'Ligging:'
+ latitude: 'Breedtegraad:'
+ longitude: 'Lengtegraad:'
+ use_map_link: benut kaart
index:
title: Gebruikersdagboeke
title_friends: Dagboeke van vriende
newer_entries: Jonger inskrywings
edit:
title: Wysig dagboekinskrywing
- subject: 'Onderwerp:'
- body: 'Teks:'
- language: 'Taal:'
- location: 'Ligging:'
- latitude: 'Breedtegraad:'
- longitude: 'Lengtegraad:'
- use_map_link: benut kaart
- save_button: Stoor
marker_text: Ligging van dagboekinskrywing
show:
title: '%{user} se dagboek | %{title}'
leave_a_comment: Lewer kommentaar
login_to_leave_a_comment: '%{login_link} om kommentaar te lewer'
login: Meld aan
- save_button: Stoor
no_such_entry:
title: Geen só 'n dagboekinskrywing
heading: 'Geen inskrywing met die id: %{id}'
post: Plasing
when: Wanneer
comment: Kommentaar
- ago: '%{ago} gelede'
newer_comments: Jongste Kommentaar
older_comments: Ouer Kommentaar
geocoder:
send_message_to: Stuur 'n nuwe boodskap aan %{name}
subject: Onderwerp
body: Teks
- send_button: Stuur
back_to_inbox: Terug na in-vakkie
create:
message_sent: Boodskap is gestuur
tags_help: komma afgebaken
visibility: 'Sigbaarheid:'
visibility_help: wat beteken dit?
- upload_button: Laai op
help: Hulp
create:
upload_trace: Laai GPS-spore op
description: 'Beskrywing:'
tags: 'Merkers:'
tags_help: komma afgebaken
- save_button: Stoor Wysigings
visibility: 'Sigbaarheid:'
visibility_help: wat beteken dit?
trace_optionals:
trace:
pending: HANGEND
count_points: '%{count} punte'
- ago: '%{time_in_words_ago} gelede'
more: meer
trace_details: Wys Besonderhede van die Spoor
view_map: Wys kaart
oauth_clients:
new:
title: Registreer 'n nuwe toepassing
- submit: Registreer
edit:
title: Redigeer u program
- submit: Redigeer
show:
title: OAuth-besonderhede vir %{app_name}
secret: 'Verbruikersgeheim:'
terms:
title: Bydraerooreenkoms
heading: Voorwaardes vir bydraers
- agree: Aanvaar
decline: Weier
legale_names:
france: Frankryk
remove as friend: Verwyder as vriend
add as friend: Voeg by as vriend
mapper since: 'Karteerder sedert:'
- ago: (%{time_in_words_ago} gelede)
email address: 'E-posadres:'
created from: 'Geskep vanaf:'
status: 'Status:'
back: Terug na die register
new:
heading: Skep versperring op %{name}
- submit: Skep versperring
back: Wys alle versperrings
edit:
title: Redigeer versperring op %{name}
heading: Redigeer versperring op %{name}
- submit: Werk versperring by
show: Wys dié versperring
back: Wys alle versperrings
create:
confirm: Is u seker u wil hierdie versperring herroep?
revoke: Herroep!
flash: Hierdie versperring is herroep.
- period:
- one: 1 uur
- other: '%{count} ure'
helper:
time_future: Tyd oor %{time} verstreke.
until_login: Aktief totdat die gebruiker aanmeld.
time_past: Tyd is %{time} gelede verstreke.
+ block_duration:
+ hours:
+ one: 1 uur
+ other: '%{count} ure'
blocks_on:
title: Versperrings op %{name}
heading: Lys van versperrings teen %{name}
show:
title: '%{block_on} word deur %{block_by} versper'
heading: '%{block_on} word deur %{block_by} versper'
- time_future: Tyd oor %{time} verstreke.
- time_past: Tyd is %{time} gelede verstreke
status: Status
show: Wys
edit: Redigeer
# Messages for Gheg Albanian (Gegë)
# Exported from translatewiki.net
# Export driver: phpyaml
+# Author: Abijeet Patro
# Author: Albiona
# Author: Alket
# Author: Ardian
time:
formats:
friendly: '%e %B %Y te %H:%M'
+ helpers:
+ submit:
+ diary_comment:
+ create: Ruje
+ message:
+ create: Dërgo
+ client_application:
+ create: Regjistrohu
+ update: Redaktoj
+ trace:
+ create: Ngarko
+ update: Ruaj Ndryshimet
+ user_block:
+ create: bllok Krijo
+ update: bllok Update
activerecord:
models:
acl: Lista Access Control
diary_entries:
new:
title: Hyrja e re Ditari
+ form:
+ subject: 'Titulli:'
+ body: 'Trupi:'
+ language: 'Gjuha:'
+ location: 'Lokacioni:'
+ latitude: 'Latitude:'
+ longitude: 'Gjatësi:'
+ use_map_link: Harta e përdorimit
index:
title: ditarë Përdorues ,
user_title: Ditari i %{user}
newer_entries: Shënimet Ma Të Reja
edit:
title: hyrje Edit ditar
- subject: 'Titulli:'
- body: 'Trupi:'
- language: 'Gjuha:'
- location: 'Lokacioni:'
- latitude: 'Latitude:'
- longitude: 'Gjatësi:'
- use_map_link: Harta e përdorimit
- save_button: Ruje
marker_text: Vendndodhja Ditari hyrje
show:
title: ditari i %{user} | %{title}
leave_a_comment: Lene naj koment
login_to_leave_a_comment: '%{login_link} për me lon koment'
login: Hyrje
- save_button: Ruje
no_such_entry:
title: Nuk ka hyrje të tilla ditar
heading: 'Nuk ka shënim me id: %{id}'
send_message_to: Qoje një mesazh të ri te %{name}
subject: Titulli
body: Organ
- send_button: Dërgo
back_to_inbox: Kthehu në postë
create:
message_sent: Mesazhi u dërgu
tags_help: Presje e kufizume
visibility: Dukshmënia
visibility_help: çka do me than kjo?
- upload_button: Ngarko
help: Ndihma
create:
upload_trace: Ngarkoj tdhanat e GPS-it
description: 'Përshkrimi:'
tags: 'Etiketat:'
tags_help: Presje e kufizume
- save_button: Ruaj Ndryshimet
visibility: 'Dukshmënia:'
visibility_help: Çka do me than kjo?
trace_optionals:
trace:
pending: NË PRITJE
count_points: '%{count} pikët'
- ago: '%{time_in_words_ago} përpara'
more: ma shumë
trace_details: Kshyri detalet e të dhanave
view_map: Kshyre Hartën
oauth_clients:
new:
title: Regjistroje një aplikacion të ri.
- submit: Regjistrohu
edit:
title: Redakto kërkesën tuaj
- submit: Redaktoj
show:
title: Detajet OAuth për %{app_name}
key: 'Konsumatorit kryesore:'
heading: rregullat për Pjesëmarrës
consider_pd: Unë e konsideroj kontributet e mia të jenë në domenin publik
consider_pd_why: çka o kjo?
- agree: Pajtohem
decline: Mos prano
legale_select: 'Ju lutem zgjidhni vendin tuaj të banimit:'
legale_names:
remove as friend: heke si shok
add as friend: shtoje si shoq
mapper since: 'Hartues qe prej:'
- ago: (para %{time_in_words_ago})
email address: 'Email Adresa:'
created from: 'U krijue prej:'
status: 'Statuti:'
anëtarët e kuptojn gjuhën e komunitetit, pra ju lutem munoni me përdor terma
të mirë.
period: Sa kohë, duke filluar nga tani, përdoruesi do të bllokohet nga API për.
- submit: bllok Krijo
tried_contacting: Unë kam kontaktuar me përdorues dhe u kërkoi atyre për të
ndaluar.
tried_waiting: Unë kam dhënë një sasi të arsyeshme kohore për përdoruesit për
të lidhur me situatën. Të ketë parasysh se jo të gjithë përdoruesit e kuptojnë
zhargon komunitetit, kështu që ju lutemi provoni të përdorni laymans kushtet.
period: Sa kohë, duke filluar nga tani, përdoruesi do të bllokohet nga API për.
- submit: bllok Update
show: Shiko këtë bllok
back: Shiko të gjitha blloqet e
needs_view: A i përdoruesit duhet të identifikoheni për para këtij blloku do
confirm: Jeni i sigurt që dëshironi të revokuar kete kategori?
revoke: Tërheq!
flash: Ky bllok është revokuar.
- period:
- one: 1 orë
- other: '%{count} orë'
helper:
time_future: Përfundon në %{time}.
until_login: Aktiv deri kur përdoruesi shkrimet in
time_past: Përfundoi %{time} më parë.
+ block_duration:
+ hours:
+ one: 1 orë
+ other: '%{count} orë'
blocks_on:
title: Blocks në %{name}
heading: Lista e blloqeve në %{name}
show:
title: '%{block_on} bllokuar nga %{block_by}'
heading: '%{block_on} bllokuar nga %{block_by}'
- time_future: Përfundon në %{time}
- time_past: Përfundoi %{time} më parë
status: Statusi
show: Tregoj
edit: Redaktoj
# Messages for Arabic (العربية)
# Exported from translatewiki.net
# Export driver: phpyaml
+# Author: Abijeet Patro
# Author: Ali1
# Author: Aude
# Author: Ayatun
# Author: Grille chompa
# Author: Houcinee1
# Author: Hubaishan
+# Author: Kassem7899
# Author: Kuwaity26
# Author: Majid Al-Dharrab
# Author: Meno25
time:
formats:
friendly: '%e %B %Y في %H:%M'
+ helpers:
+ submit:
+ diary_comment:
+ create: حفظ
+ diary_entry:
+ create: نشر
+ update: تحديث
+ issue_comment:
+ create: إضافة تعليق
+ message:
+ create: أرسل
+ client_application:
+ create: سجِّل
+ update: تعديل
+ redaction:
+ create: إنشاء تنقيح
+ update: حفظ التنقيح
+ trace:
+ create: رفع
+ update: حفظ التغييرات
+ user_block:
+ create: إنشاء العرقلة
+ update: حدّث العرقلة
activerecord:
errors:
messages:
description: الوصف
languages: اللغات
pass_crypt: كلمة السر
+ datetime:
+ distance_in_words_ago:
+ about_x_hours:
+ one: منذ حوالي ساعة واحدة
+ other: منذ حوالي %{count} ساعات
+ about_x_months:
+ one: منذ حوالي شهر واحد
+ other: منذ حوالي %{count} شهور
+ about_x_years:
+ one: منذ حوالي سنة واحدة
+ other: منذ حوالي %{count} سنوات
+ almost_x_years:
+ one: منذ سنة واحدة تقريبا
+ other: منذ %{count} سنوات تقريبا
+ half_a_minute: منذ نصف دقيقة
+ less_than_x_seconds:
+ one: منذ أقل من ثانية واحدة
+ other: منذ أقل من %{count} ثوانٍ
+ less_than_x_minutes:
+ one: منذ أقل من دقيقة واحدة
+ other: منذ أقل من %{count} دقائق
+ over_x_years:
+ one: منذ أكثر من سنة واحدة
+ other: منذ أكثر من %{count} سنوات
+ x_seconds:
+ one: منذ ثانية واحدة
+ other: منذ %{count} ثوانٍ
+ x_minutes:
+ one: منذ دقيقة واحدة
+ other: منذ %{count} دقائق
+ x_days:
+ one: منذ يوم واحد
+ other: منذ %{count} أيام
+ x_months:
+ one: منذ شهر واحد
+ other: منذ %{count} أشهر
+ x_years:
+ one: منذ سنة واحدة
+ other: منذ %{count} سنوات
editor:
default: الافتراضي (حالياً %{name})
potlatch:
api:
notes:
comment:
- opened_at_html: تم الإنشاء قبل %{when}
- opened_at_by_html: تم الإنشاء قبل %{when} مِن قِبَل %{user}
- commented_at_html: تم التحديث قبل %{when}
- commented_at_by_html: تم التحديث قبل %{when} مِن قِبَل %{user}
- closed_at_html: تم الحل قبل %{when}
- closed_at_by_html: تم الحل قبل %{when} مِن قِبَل %{user}
- reopened_at_html: تم التنشيط قبل %{when}
- reopened_at_by_html: تم التنشيط قبل %{when} مِن قِبَل %{user}
+ opened_at_html: تم الإنشاء %{when}
+ opened_at_by_html: تم الإنشاء %{when} مِن قِبَل %{user}
+ commented_at_html: تم التحديث %{when}
+ commented_at_by_html: تم التحديث %{when} مِن قِبَل %{user}
+ closed_at_html: تم الحل %{when}
+ closed_at_by_html: تم الحل %{when} مِن قِبَل %{user}
+ reopened_at_html: تم التنشيط %{when}
+ reopened_at_by_html: تم التنشيط %{when} مِن قِبَل %{user}
rss:
title: ملاحظات خريطة الشارع المفتوحة
description_area: قائمة بالملاحظات أو التقارير أو التعليق عليها أو إغلاقها
browse:
created: تم الإنشاء
closed: تم الإغلاق
- created_html: تم الإغلاق قبل <abbr title='%{title}'>%{time}</abbr>
- closed_html: تم الإغلاق قبل <abbr title='%{title}'>%{time}</abbr>
- created_by_html: تم الإنشاء قبل <abbr title='%{title}'>%{time}</abbr> على يد %{user}
- deleted_by_html: تم الحذف قبل <abbr title='%{title}'>%{time}</abbr> على يد %{user}
- edited_by_html: تم التعديل قبل <abbr title='%{title}'>%{time}</abbr> على يد %{user}
- closed_by_html: تم الإغلاق قبل <abbr title='%{title}'>%{time}</abbr> على يد %{user}
+ created_html: تم الإغلاق <abbr title='%{title}'>%{time}</abbr>
+ closed_html: تم الإغلاق <abbr title='%{title}'>%{time}</abbr>
+ created_by_html: تم الإنشاء <abbr title='%{title}'>%{time}</abbr> على يد %{user}
+ deleted_by_html: تم الحذف <abbr title='%{title}'>%{time}</abbr> على يد %{user}
+ edited_by_html: تم التعديل <abbr title='%{title}'>%{time}</abbr> على يد %{user}
+ closed_by_html: تم الإغلاق <abbr title='%{title}'>%{time}</abbr> على يد %{user}
version: الإصدار
in_changeset: مجموعة التغييرات
anonymous: مجهول
relation: الصلات (%{count})
relation_paginated: الصلات (%{x}-%{y} من %{count})
comment: التعليقات (%{count})
- hidden_commented_by: تعليق مخفي من %{user} <abbr title='%{exact_time}'>%{when}
- مضت</abbr>
- commented_by: تعليق من %{user} <abbr title='%{exact_time}'>%{when} مضت</abbr>
+ hidden_commented_by: تعليق مخفي من %{user} <abbr title='%{exact_time}'>%{when}</abbr>
+ commented_by: تعليق من %{user} <abbr title='%{exact_time}'>%{when}</abbr>
changesetxml: حزمة التغييرات XML
osmchangexml: osmChange XML
feed:
open_title: 'ملاحظة لم يتم حلها: %{note_name}'
closed_title: 'ملاحظات محلولة: %{note_name}'
hidden_title: 'ملاحظة مخفيّة #%{note_name}'
- open_by: أنشأه المستخدم %{user} قبل <abbr title='%{exact_time}'>%{when}</abbr>
- open_by_anonymous: أنشأه مستخدم مجهول قبل <abbr title='%{exact_time}'>%{when}
- </abbr>
- commented_by: تعليق من %{user} قبل <abbr title='%{exact_time}'>%{when} </abbr>
- commented_by_anonymous: تعليق من مجهول قبل <abbr title='%{exact_time}'>%{when}
- </abbr>
- closed_by: تم الحل بواسطة %{user} قبل <abbr title='%{exact_time}'>%{when} </abbr>
- closed_by_anonymous: تم الحل بواسطة مجهول قبل <abbr title='%{exact_time}'>%{when}
+ open_by: أنشأه المستخدم %{user} <abbr title='%{exact_time}'>%{when}</abbr>
+ open_by_anonymous: أنشأه مستخدم مجهول <abbr title='%{exact_time}'>%{when} </abbr>
+ commented_by: تعليق من %{user} <abbr title='%{exact_time}'>%{when} </abbr>
+ commented_by_anonymous: تعليق من مجهول <abbr title='%{exact_time}'>%{when} </abbr>
+ closed_by: تم الحل بواسطة %{user} <abbr title='%{exact_time}'>%{when} </abbr>
+ closed_by_anonymous: تم الحل بواسطة مجهول <abbr title='%{exact_time}'>%{when}
</abbr>
- reopened_by: أعاد تنشيطه %{user} قبل <abbr title='%{exact_time}'>%{when} </abbr>
- reopened_by_anonymous: أعاد تنشيطه مجهول قبل <abbr title='%{exact_time}'>%{when}
+ reopened_by: أعاد تنشيطه %{user}<abbr title='%{exact_time}'>%{when} </abbr>
+ reopened_by_anonymous: أعاد تنشيطه مجهول <abbr title='%{exact_time}'>%{when}
</abbr>
- hidden_by: أخفاه %{user} قبل <abbr title='%{exact_time}'>%{when} =</abbr>
+ hidden_by: أخفاه %{user} <abbr title='%{exact_time}'>%{when} =</abbr>
report: أبلغ عن هذه الملاحظة
query:
title: ميزات الاستفهام
changeset_comments:
comment:
comment: 'تعليق جديد على مجموعة التغيير #%{changeset_id} بواسطة %{author}'
- commented_at_by_html: تم التحديث قبل %{when} بواسطة %{user}
+ commented_at_by_html: تم التحديث %{when} بواسطة %{user}
comments:
comment: 'تعليق جديد على مجموعة التغيير #%{changeset_id} بواسطة %{author}'
index:
diary_entries:
new:
title: مدخلة يومية جديدة
- publish_button: نشر
+ form:
+ subject: 'الموضوع:'
+ body: 'النص:'
+ language: 'اللغة:'
+ location: 'الموقع:'
+ latitude: 'خط العرض:'
+ longitude: 'خط الطول:'
+ use_map_link: استخدم الخريطة
index:
title: يوميات المستخدمين
title_friends: يوميات الأصدقاء
newer_entries: المدخلات الأحدث
edit:
title: عدل مدخلة يومية
- subject: 'الموضوع:'
- body: 'النص:'
- language: 'اللغة:'
- location: 'الموقع:'
- latitude: 'خط العرض:'
- longitude: 'خط الطول:'
- use_map_link: استخدم الخريطة
- save_button: حفظ
marker_text: موقع مدخلة اليومية
show:
title: يوميات %{user} | %{title}
leave_a_comment: اترك تعليقًا
login_to_leave_a_comment: '%{login_link} لترك تعليق'
login: تسجيل الدخول
- save_button: حفظ
no_such_entry:
title: لا توجد مثل هذه اليومية
heading: 'لا توجد مدخلة بالمعرف: %{id}'
other: '%{count} تعليقات'
edit_link: عدل هذه المدخلة
hide_link: اخفِ هذه المدخلة
+ unhide_link: إظهار هذا الإدخال
confirm: تأكيد
report: أبلغ عن هذه المدخلة
diary_comment:
comment_from: تعليق من %{link_user} في %{comment_created_at}
hide_link: اخفِ هذا التعليق
+ unhide_link: إظهار هذا التعليق
confirm: تأكيد
report: أبلغ عن هذا التعليق
location:
post: إرسال
when: متى
comment: التعليق
- ago: منذ %{ago}
newer_comments: التعليقات الأحدث
older_comments: التعليقات الأقدم
geocoder:
status: الحالة
reports: بلاغات
last_updated: آخر تحديث
- last_updated_time_html: منذ <abbr title='%{title}'>%{time}</abbr>
- last_updated_time_user_html: منذ <abbr title='%{title}'>%{time} </abbr> بواسطة
- %{user}
+ last_updated_time_html: <abbr title='%{title}'>%{time}</abbr>
+ last_updated_time_user_html: <abbr title='%{title}'>%{time} </abbr> بواسطة %{user}
link_to_reports: عرض البلاغات
reports_count:
one: 1 بلاغ
partners_ucl: UCL
partners_bytemark: استضافة Bytemark
partners_partners: الشركاء
+ tou: شروط الاستخدام
osm_offline: حاليًا قاعدة بيانات خريطة الشارع المفتوحة مغلقة بينما يتم الانتهاء
من أعمال الصيانة الأساسية لقاعدة البيانات.
osm_read_only: حاليًا قاعدة بيانات خريطة الشارع المفتوحة في وضع القراءة بينما
send_message_to: أرسل رسالة جديدة إلى %{name}
subject: الموضوع
body: نص الرسالة
- send_button: أرسل
back_to_inbox: العودة إلى صندوق الوارد
create:
message_sent: تم إرسال الرسالة
visibility: 'الرؤية:'
visibility_help: ماذا يعني هذا؟
visibility_help_url: https://wiki.openstreetmap.org/wiki/Visibility_of_GPS_traces
- upload_button: رفع
help: مساعدة
help_url: https://wiki.openstreetmap.org/wiki/Upload
create:
description: 'الوصف:'
tags: 'الوسوم:'
tags_help: محددة بفواصل
- save_button: حفظ التغييرات
visibility: 'الرؤية:'
visibility_help: ماذا يعني هذا؟
update:
trace:
pending: في الانتظار
count_points: '%{count} نقطة'
- ago: منذ %{time_in_words_ago}
more: المزيد
trace_details: اعرض تفاصيل الأثر
view_map: اعرض الخريطة
oauth_clients:
new:
title: سجِّل طلبا جديد
- submit: سجِّل
edit:
title: عدل طلبك
- submit: تعديل
show:
title: تفاصيل OAuth لـ%{app_name}
key: 'مفتاح المستهلك:'
من المعلومات; يُرجَى الاطلاع على <a href="%{url}">صفحة الويكي هذه</a>.
terms declined url: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined
terms:
- title: 'شروط المساهم:'
- heading: 'شروط المساهم:'
- read and accept: تُرجَى قراءة الاتفاقية أدناه والضغط على زر الموافقة لتأكيد
- قبول شروط هذا الاتفاق على مشاركاتك الموجودة والمستقبلية.
- consider_pd: وبالإضافة إلى الاتفاقية أعلاه، أريد أن تكون مساهماتي ملكية عامة.
+ title: شروط
+ heading: شروط
+ heading_ct: شروط المساهمة
+ read and accept with tou: تُرجَى قراءة اتفاقية المساهم وشروط الاستخدام، والتحقق
+ من خانتي الاختيار عند الانتهاء، ثم اضغط على زر "متابعة".
+ contributor_terms_explain: هذا الاتفاق يحكم شروط مساهماتك الحالية والمستقبلية
+ read_ct: قرأت شروط المساهمة المعطاة في الأعلى وأوافق عليها
+ tou_explain_html: هذا ال%{tou_link} يحكم استخدام موقع الويب والبنية الأساسية
+ الأخرى التي يوفرها مؤسسة خريطة الشارع المفتوحة، يُرجَى النقر على الرابط، وقراءة
+ والموافقة على النص.
+ read_tou: قرأت شروط الاستخدام وأوافق عليها.
+ consider_pd: بالإضافة إلى ما طُرح أعلاه، أريد أن أنوه أنني أعتبر مساهماتي ملكية
+ عامة.
consider_pd_why: ما هذا؟
consider_pd_why_url: https://www.osmfoundation.org/wiki/License/Why_would_I_want_my_contributions_to_be_public_domain
guidance: 'معلومات للمساعدة في فهم هذه المصطلحات: <a href="%{summary}">ملخص
قابل للقراءة بواسطة الإنسان </a> وبعض <a href="%{translations}">ترجمات غير
رسمية</a>'
- agree: أوافق
+ continue: استمر
declined: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined
decline: أرفض
you need to accept or decline: الرجاء القراءة ومن ثم قبول أو رفض شروط المساهمة
remove as friend: إلغاء الصداقة
add as friend: أضف كصديق
mapper since: 'مُخطط منذ:'
- ago: منذ %{time_in_words_ago}
ct status: 'شروط المساهم:'
ct undecided: متردد
ct declined: مرفوض
- ct accepted: مقبول منذ %{ago}
- latest edit: 'آخر تغيير %{ago}:'
+ latest edit: 'آخر تغيير (%{ago})::'
email address: 'عنوان البريد الإلكتروني:'
created from: 'أُنشِئ من:'
status: 'الحالة:'
للعلن. آخذًا بالاعتبار أن ليس كل المستخدمين يفهم مصطلحات المجتمع، لذا يرجى
محاولة استخدام كلمات بسيطة ومعبرة.
period: ماهي المدة بدءًا من الآن، سيتم عرقلة المستخدم من الـ API.
- submit: إنشاء العرقلة
tried_contacting: لقد اتصلت بالمستخدم وطلبت منه التوقف.
tried_waiting: لقد أعطيت المستخدم قدرًا معقولًا من الوقت للرد على تلك الاتصالات.
needs_view: يحتاج المستخدم لتسجيل الدخول قبل أن يتم مسح هذه العرقلة
مع إعطاء القدر المستطاع من التفاصيل عن الحالة. آخذًا بالاعتبار أن ليس كل المستخدمين
يفهم مصطلحات المجتمع، لذا يرجى محاولة استخدام كلمات بسيطة ومعبرة.
period: ماهي المدة بدءًا من الآن، سيتم عرقلة المستخدم من الـ API.
- submit: حدّث العرقلة
show: اعرض هذه العرقلة
back: اعرض كل العرقلات
needs_view: هل يحتاج المستخدم لتسجيل الدخول قبل أن يتم مسح هذه العرقلة؟
title: إبطال العرقلة على %{block_on}
heading: إبطال العرقلة على %{block_on} بواسطة %{block_by}
time_future: هذه العرقلة ستنتهي في %{time}.
- past: هذه العرقلة انتهت منذ %{time} ولا يمكن إبطالها الآن.
+ past: هذه العرقلة انتهت %{time} ولا يمكن إبطالها الآن.
confirm: هل أنت متأكد أنك ترغب في إبطال هذه العرقلة ؟
revoke: ابطل!
flash: تم إبطال هذه العرقلة.
- period:
- few: '%{count} ساعات'
- one: ساعة واحد
- two: ساعتين
- other: '%{count} ساعة'
helper:
time_future: ينتهي في %{time}.
until_login: نشط حتى يقوم المستخدم بتسجيل الدخول.
time_future_and_until_login: ينتهي في %{time} وبعد تسجيل دخول المستخدم.
- time_past: انتهى منذ %{time}.
+ time_past: انتهى %{time}.
+ block_duration:
+ hours:
+ few: '%{count} ساعات'
+ one: ساعة واحد
+ two: ساعتين
+ other: '%{count} ساعة'
+ days:
+ one: يوم واحد
+ other: '%{count} أيام'
+ weeks:
+ one: أسبوع واحد
+ other: '%{count} أسابيع'
+ months:
+ one: شهر واحد
+ other: '%{count} أشهر'
+ years:
+ one: سنة واحدة
+ other: '%{count} سنوات'
blocks_on:
title: العرقلات على %{name}
heading: لائحة العرقلات على %{name}
show:
title: '%{block_on} عُرقل بواسطة %{block_by}'
heading: '%{block_on} عُرقل بواسطة %{block_by}'
- time_future: ينتهي في %{time}
- time_past: انتهى منذ %{time}
created: تم الإنشاء
- ago: قبل %{time}
status: الحالة
show: اعرض
edit: تعديل
description: الوصف
created_at: أنشأ في
last_changed: أحدث تغيير
- ago_html: |2-
-
- %{when} مضى
javascripts:
close: أغلق
share:
title: الطَبقات
copyright: © <a href='%{copyright_url}'>مساهمو خريطة الشارع المفتوحة</a>
donate_link_text: <a class='donate-attr' href='%{donate_url}'>تقديم تبرع</a>
+ terms: <a href='%{terms_url}' target='_blank'> مصطلحات الموقع و API</a>
site:
edit_tooltip: عدّل الخريطة
edit_disabled_tooltip: قم بالتكبير لتحرير الخريطة
edit:
description: الوصف
heading: تحرير التنقيح
- submit: حفظ التنقيح
title: تحرير التنقيح
index:
empty: لا يوجد تنقيح لإظهاره.
new:
description: الوصف
heading: أدخل معلومات عن التنقيح الجديد
- submit: إنشاء تنقيح
title: إنشاء تنقيح جديد
show:
description: 'الوصف:'
# Messages for Egyptian Arabic (مصرى)
# Exported from translatewiki.net
# Export driver: phpyaml
+# Author: Abijeet Patro
# Author: Meno25
# Author: علاء
---
arz:
+ helpers:
+ submit:
+ diary_comment:
+ create: حفظ
+ message:
+ create: أرسل
+ client_application:
+ create: سجِّل
+ update: عدّل
+ trace:
+ create: ارفع
+ update: حفظ التغييرات
+ user_block:
+ create: إنشاء العرقلة
+ update: حدّث العرقلة
activerecord:
models:
acl: قائمه تحكم الوصول
diary_entries:
new:
title: مدخله يوميه جديدة
+ form:
+ subject: 'الموضوع:'
+ body: 'نص الرسالة:'
+ language: 'اللغة:'
+ location: 'الموقع:'
+ latitude: 'خط العرض:'
+ longitude: 'خط الطول:'
+ use_map_link: استخدم الخريطة
index:
title: يوميات المستخدمين
user_title: يوميه %{user}
older_entries: المدخلات الأقدم
newer_entries: المدخلات الأحدث
edit:
- title: عدّل مدخله يومية
- subject: 'الموضوع:'
- body: 'نص الرسالة:'
- language: 'اللغة:'
- location: 'الموقع:'
- latitude: 'خط العرض:'
- longitude: 'خط الطول:'
- use_map_link: استخدم الخريطة
- save_button: حفظ
+ title: عدل المدخله بتاعه اليوميه
marker_text: موقع مدخله اليومية
show:
- title: Ù\8aÙ\88Ù\85Ù\8aات اÙ\84Ù\85ستخدÙ\85Ù\8aÙ\86 | %{user}
+ title: Ù\8aÙ\88Ù\85Ù\8aات اÙ\84Ù\8aÙ\88زر %{user} | %{title}
user_title: يوميه %{user}
leave_a_comment: اترك تعليقًا
login_to_leave_a_comment: '%{login_link} لترك تعليق'
login: تسجيل الدخول
- save_button: حفظ
no_such_entry:
title: مدخله يوميه غير موجودة
heading: 'لا يوجد مدخله بالمعرّف: %{id}'
send_message_to: أرسل رساله جديده إلى %{name}
subject: الموضوع
body: نص الرسالة
- send_button: أرسل
back_to_inbox: العوده إلى صندوق الوارد
create:
message_sent: تم إرسال الرسالة
tags_help: محدد بفواصل
visibility: الرؤية
visibility_help: ماذا يعنى هذا؟
- upload_button: ارفع
help: المساعدة
create:
upload_trace: ارفع أثر جى بى إس
description: 'الوصف:'
tags: 'الوسوم:'
tags_help: محدد بفواصل
- save_button: حفظ التغييرات
visibility: 'الرؤية:'
visibility_help: ماذا يعنى هذا؟
trace_optionals:
trace:
pending: فى الانتظار
count_points: '%{count} نقطة'
- ago: منذ %{time_in_words_ago}
more: المزيد
trace_details: اعرض تفاصيل الأثر
view_map: اعرض الخريطة
oauth_clients:
new:
title: سجِّل تطبيق جديد
- submit: سجِّل
edit:
title: عدّل تطبيقك
- submit: عدّل
show:
title: تفاصيل OAuth للتطبيق %{app_name}
url: 'رابط الطلب:'
remove as friend: أزل كصديق
add as friend: أضف كصديق
mapper since: 'مُخطط منذ:'
- ago: (منذ %{time_in_words_ago})
email address: 'عنوان البريد الإلكتروني:'
created from: 'أُنشىء من:'
description: الوصف
للعلن. آخذًا بالاعتبار أن ليس كل المستخدمين يفهم مصطلحات المجتمع، لذا يرجى
محاوله استخدام كلمات بسيطه ومعبره.
period: ماهى المده بدءًا من الآن، سيتم عرقله المستخدم من الـ API.
- submit: إنشاء العرقلة
tried_contacting: لقد اتصلت بالمستخدم وطلبت منه التوقف.
tried_waiting: لقد أعطيت المستخدم قدرًا معقولًا من الوقت للرد على تلك الاتصالات.
needs_view: يحتاج المستخدم لتسجيل الدخول قبل أن يتم مسح هذه العرقلة
مع إعطاء القدر المستطاع من التفاصيل عن الحاله. آخذًا بالاعتبار أن ليس كل المستخدمين
يفهم مصطلحات المجتمع، لذا يرجى محاوله استخدام كلمات بسيطه ومعبره.
period: ماهى المده بدءًا من الآن، سيتم عرقله المستخدم من الـ API.
- submit: حدّث العرقلة
show: اعرض هذه العرقلة
back: اعرض كل العرقلات
needs_view: هل يحتاج المستخدم لتسجيل الدخول قبل أن يتم مسح هذه العرقلة؟
confirm: هل أنت متأكد أنك ترغب فى إبطال هذه العرقله ؟
revoke: ابطل!
flash: تم إبطال هذه العرقله.
- period:
- few: '%{count} ساعات'
- one: ساعه واحد
- two: ساعتين
- other: '%{count} ساعة'
helper:
time_future: ينتهى فى %{time}.
until_login: نشط حتى يقوم المستخدم بتسجيل الدخول.
time_past: انتهى منذ %{time}.
+ block_duration:
+ hours:
+ few: '%{count} ساعات'
+ one: ساعه واحد
+ two: ساعتين
+ other: '%{count} ساعة'
blocks_on:
title: العرقلات على %{name}
heading: لائحه العرقلات على %{name}
show:
title: '%{block_on} عُرقل بواسطه %{block_by}'
heading: '%{block_on} عُرقل بواسطه %{block_by}'
- time_future: ينتهى فى %{time}
- time_past: انتهى منذ %{time}
status: الحالة
show: اعرض
edit: عدّل
time:
formats:
friendly: '%e de %B de %Y a les %H:%M'
+ helpers:
+ submit:
+ diary_comment:
+ create: Guardar
+ diary_entry:
+ create: Espublizar
+ update: Anovar
+ message:
+ create: Unviar
+ client_application:
+ create: Rexistrar
+ update: Editar
+ redaction:
+ create: Crear redaición
+ update: Guardar redaición
+ trace:
+ create: Xubir
+ update: Guardar cambeos
+ user_block:
+ create: Crear un bloquéu
+ update: Anovar el bloquéu
activerecord:
+ errors:
+ messages:
+ invalid_email_address: nun paez que sía una dirección de corréu electrónicu
+ válida.
+ email_address_not_routable: nun ye enrutable
models:
acl: Llista de Control d'Accesu
changeset: Conxuntu de cambeos
title_friend: Conxuntos de cambeos de los mios collacios
title_nearby: Conxuntos de cambeos d'usuarios cercanos
empty: Nun s'alcontró nengún conxuntu de cambeos.
- empty_area: Nun hai conxuntos de cambeos nesti área.
+ empty_area: Nun hai conxuntos de cambeos nesta área.
empty_user: Nun hai conxuntos de cambeos d'esti usuariu.
no_more: Nun s'alcontraron más conxuntos de cambeos.
- no_more_area: Nun hai más conxuntos de cambeos nesti área.
+ no_more_area: Nun hai más conxuntos de cambeos nesta área.
no_more_user: Nun hai más conxuntos de cambeos d'esti usuariu.
load_more: Cargar más
timeout:
comment: 'Comentariu nuevu sobro''l conxuntu de cambios #%{changeset_id} de
%{author}'
commented_at_by_html: Anovao hai %{when} por %{user}
+ comments:
+ comment: 'Comentariu nuevu sobro''l conxuntu de cambios #%{changeset_id} de
+ %{author}'
index:
title_all: Alderique del conxuntu de cambeos d'OpenStreetMap
title_particular: 'Alderique del conxuntu de cambeos #%{changeset_id} d''OpenStreetMap'
+ timeout:
+ sorry: Llevó demasiao tiempu baxar la llista de comentarios del conxuntu de
+ cambeos que pidisti.
diary_entries:
new:
title: Nueva entrada del diariu
- publish_button: Espublizar
+ form:
+ subject: 'Asuntu:'
+ body: 'Cuerpu:'
+ language: 'Llingua:'
+ location: 'Allugamientu:'
+ latitude: 'Llatitú:'
+ longitude: 'Llonxitú:'
+ use_map_link: usar mapa
index:
title: Diarios d'usuarios
title_friends: Diarios de collacios
older_entries: Entraes anteriores
newer_entries: Entraes más nueves
edit:
- title: Editar entrada del diariu
- subject: 'Asuntu:'
- body: 'Cuerpu:'
- language: 'Llingua:'
- location: 'Allugamientu:'
- latitude: 'Llatitú:'
- longitude: 'Llonxitú:'
- use_map_link: usar mapa
- save_button: Guardar
+ title: Editar entrada del Diariu
marker_text: Allugamientu de la entrada del diariu
show:
title: Diariu de %{user} | %{title}
leave_a_comment: Dexar un comentariu
login_to_leave_a_comment: '%{login_link} pa dexar un comentariu'
login: Entrar
- save_button: Guardar
no_such_entry:
title: Nun esiste la entrada del diariu
heading: 'Nun esiste la entrada con id: %{id}'
body: Sentímoslo, nun hai nenguna entrada del diariu cola id %{id}. Comprueba
- la escritura o si primisti nun enllaz enquivocáu.
+ la escritura o si pulsiasti nun enllaz enquivocáu.
diary_entry:
posted_by: Unviáu por %{link_user} el %{created} en %{language_link}
comment_link: Comentar esta entrada
reply_link: Responder a esta entrada
comment_count:
zero: Ensin comentarios
- one: 1 comentariu
+ one: '%{count} comentariu'
other: '%{count} comentarios'
edit_link: Editar esta entrada
hide_link: Anubrir esta entrada
post: Publicar
when: Cuándo
comment: Comentariu
- ago: hai %{ago}
newer_comments: Comentarios más nuevos
older_comments: Comentarios anteriores
geocoder:
"yes": Tienda
tourism:
alpine_hut: Refuxu de monte
- apartment: Apartamentu
+ apartment: Apartamentu de vacaciones
artwork: Obra d'arte
attraction: Interés turísticu
bed_and_breakfast: Cama y almuerzu (B&B)
intro_text: OpenStreetMap ye un mapa del mundu, creáu por persones como tu y d'usu
llibre baxo una llicencia abierta.
intro_2_create_account: Crear una cuenta d'usuariu
+ hosting_partners_html: L'agospiamientu tien l'encontu de %{ucl}, %{bytemark}, y
+ otros %{partners}.
partners_ucl: UCL
partners_bytemark: Bytemark Hosting
partners_partners: asociaos
+ tou: Condiciones d'usu
osm_offline: La base de datos d'OpenStreetMap anguaño ta desconectada mentanto
se faen trabayos esenciales de mantenimientu de la base de datos.
osm_read_only: La base de datos d'OpenStreetMap anguaño ta en mou de sólo llectura
send_message_to: Unviar un mensaxe nuevu a %{name}
subject: Asuntu
body: Cuerpu
- send_button: Unviar
back_to_inbox: Tornar al buzón d'entrada
create:
message_sent: Mensaxe unviáu
legal_html: "Esti sitiu y munchos otros servicios rellacionaos xestiónalos formalmente
la \n<a href='https://osmfoundation.org/'>Fundación OpenStreetMap</a> (OSMF)
\nnel nome de la comunidá. L'usu de tolos servicios alministraos pola OSMF
- tán suxetos a les nueses <a href=\"https://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">polítiques
+ tán suxetos a les nueses <a href=\"https://wiki.osmfoundation.org/wiki/Terms_of_Use\">Condiciones
+ d'usu</a>,<a href=\"https://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">polítiques
d'usu aceptable</a> y la nuesa <a href=\"https://wiki.osmfoundation.org/wiki/Privacy_Policy\">política
de privacidá</a>\n<br>\n<a href='https://osmfoundation.org/Contact'>Comunícate
cola OSMF</a> \nsi tienes entrugues relativos a les llicencies, drechos d'autor
<a href="http://www.gu.gov.si/en/">Autoridá Topográfica y Cartográfica</a> y del
<a href="http://www.mkgp.gov.si/en/">Ministeriu d'Agricultura, Silvicultura y Alimentación</a>
(información pública d'Eslovenia).
+ contributors_es_html: '<strong>España</strong>: Contien datos provenientes
+ del Institutu Xeográficu Nacional (<a href="http://www.ign.es/">IGN</a>)
+ y del Sistema Cartográficu Nacional (<a href="http://www.scne.es/">SCNE</a>),
+ llicenciaos pa la reutilización baxo <a href="https://creativecommons.org/licenses/by/4.0/">CC
+ BY 4.0</a>.'
contributors_za_html: |-
<strong>Sudáfrica</strong>: Contien datos sacaos de
<a href="http://www.ngi.gov.za/">Chief Directorate:
National Geo-Spatial Information</a>, State copyright reserved.
- contributors_gb_html: '<strong>Reinu Xuníu</strong>: Contien datos de Ordnance
- Survey © Crown copyright and database right 2010-12.'
+ contributors_gb_html: |-
+ <strong>Reinu Uníu</strong>: Contien datos de Ordnance Survey © Crown copyright and database right
+ 2010-19.
contributors_footer_1_html: |-
Pa más detalles d'estes, y otres fontes que s'usaron p'ayudar a
ameyorar OpenStreetMap, por favor, llei la <a
title: Migrar a OSM
description: Ayuda pa les empreses y organizaciones que cambien a mapes y
otros servicios, basaos n'OpenStreetMap.
+ welcomemat:
+ url: https://welcome.openstreetmap.org/
+ title: Pa organizaciones
+ description: ¿Con una organización que fai planes pa OpenStreetMap? Atopa
+ lo que tienes de saber nel Felpudu de Bienvenida.
wiki:
url: https://wiki.openstreetmap.org/wiki/Ast:Main_Page
title: wiki.openstreetmap.org
edit: Editar
preview: Vista previa
markdown_help:
- title_html: Analizáu con <a href="https://daringfireball.net/projects/markdown/">Markdown</a>
+ title_html: Analizáu con <a href="https://kramdown.gettalong.org/quickref.html">kramdown</a>
headings: Cabeceres
heading: Cabecera
subheading: Cabecera secundaria
title: ¿Tien alguna entruga?
paragraph_1_html: |-
OpenStreetMap tien dellos recursos p'aprender sobro'l proyeutu, entrugar y contestar preguntes, y discutir y documentar en collaboración cuestiones de cartografía.
- <a href='%{help_url}'>Algame ayuda equí</a>.
+ <a href='%{help_url}'>Algama ayuda equí</a>. ¿Con una organización que fai planes pa OpenStreetMap? <a href='https://welcome.openstreetmap.org/'>Visita'l Felpudu de Bienvenida</a>.
start_mapping: Principiar col mapéu
add_a_note:
title: ¿Nun tien tiempu pa editar? ¡Amieste una nota!
visibility: 'Visibilidá:'
visibility_help: ¿qué ye esto?
visibility_help_url: https://wiki.openstreetmap.org/wiki/Visibility_of_GPS_traces
- upload_button: Xubir
help: Ayuda
help_url: https://wiki.openstreetmap.org/wiki/Upload
create:
description: 'Descripción:'
tags: 'Etiquetes:'
tags_help: llendáu con comes
- save_button: Guardar cambeos
visibility: 'Visibilidá:'
visibility_help: ¿qué ye esto?
update:
trace:
pending: PENDIENTE
count_points: '%{count} puntos'
- ago: hai %{time_in_words_ago}
more: más
trace_details: Amosar detalles de la traza
view_map: Ver el Mapa
other: Ficheru GPX con %{count} puntos de %{user}
description_without_count: Ficheru GPX de %{user}
application:
+ permission_denied: Nun tienes permisu d'accesu pa esta aición.
require_cookies:
cookies_needed: Paez que tienes les cookies desactivaes - activa les cookies
nel restolador enantes de siguir.
oauth_clients:
new:
title: Rexistrar una aplicación nueva
- submit: Rexistrar
edit:
title: Editar la to aplicación
- submit: Editar
show:
title: Detalles d'OAuth pa %{app_name}
key: 'Clave del consumidor:'
terms accepted: ¡Gracies por aceutar les condiciones de collaboración!
terms declined: Sentimos que decidieras nun aceutar les Condiciones de Collaborador.
Pa más información llei <a href="%{url}">esta páxina wiki</a>.
+ terms declined url: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined
terms:
- title: Condiciones de collaboración
- heading: Condiciones de collaboración
- read and accept: Llei l'alcuerdu de más abaxo y calca nel botón aceutar pa confirmar
- qu'aceutes les condiciones d'esti alcuerdu pa les tos collaboraciones esistentes
- y futures.
- consider_pd: Amás del alcuerdu anterior, considero que les mios collaboraciones
- pasen a ser Dominiu Públicu
+ title: Condiciones
+ heading: Condiciones
+ heading_ct: Condiciones de collaboración
+ consider_pd: Amás de lo anterior, considero que les mios collaboraciones pasen
+ a ser Dominiu Públicu
consider_pd_why: ¿qué ye esto?
+ consider_pd_why_url: https://www.osmfoundation.org/wiki/License/Why_would_I_want_my_contributions_to_be_public_domain
guidance: 'Información p''ayudar a entender estos términos: un <a href="%{summary}">resume</a>
y delles <a href="%{translations}">traducciones non oficiales</a>'
- agree: Aceutar
+ continue: Siguir
+ declined: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined
decline: Refugar
you need to accept or decline: Por favor, llei y aceuta o refuga les nueves
Condiciones de Collaboración pa siguir.
remove as friend: Desaniciar como amigu
add as friend: Amestar como amigu
mapper since: 'Mapeador dende:'
- ago: (hai %{time_in_words_ago})
ct status: 'Términos de collaboración:'
ct undecided: Indecisu
ct declined: Refugada
- ct accepted: Aceutada hai %{ago}
- latest edit: 'Cabera edición %{ago}:'
+ latest edit: 'Cabera edición (%{ago}):'
email address: 'Direición de corréu electrónicu:'
created from: 'Creáu dende:'
status: 'Estáu:'
nuevos términos de collaboración.
agreed_with_pd: Tamién declarasti que consideres que les tos ediciones pertenecen
al Dominiu Públicu.
+ link: https://www.osmfoundation.org/wiki/License/Contributor_Terms
link text: ¿qué ye esto?
profile description: 'Descripción del perfil:'
preferred languages: 'Llingües preferíes:'
usuarios entienden la xíriga de la comunidá; de mou qu'intenta usar pallabres
cencielles.
period: Por cuantu tiempu, dende agora, l'usuariu tendrá torgáu usar la API.
- submit: Crear un bloquéu
tried_contacting: Púnxime en contautu col usuariu pa pidíi qu'aparara.
tried_waiting: Di-y al usuariu tiempu razonable abondo pa responder a eses comunicaciones.
needs_view: L'usuariu tien de coneutase enantes de que se desanicie esti bloquéu
en cuenta que non tolos usuarios entienden la xíriga de la comunidá; de mou
qu'intenta usar pallabres cencielles.
period: Por cuantu tiempu, dende agora, l'usuariu tendrá torgáu usar la API.
- submit: Anovar el bloquéu
show: Ver esti bloquéu
back: Ver tolos bloqueos
needs_view: ¿Tien de coneutase l'usuariu enantes de que se desanicie esti bloquéu?
confirm: ¿Seguro que quies desaniciar esti bloquéu?
revoke: ¡Desaniciar!
flash: Esti bloquéu se desanició.
- period:
- one: 1 hora
- other: '%{count} hores'
helper:
time_future: Fina en %{time}.
until_login: Activu fasta que'l usuariu anicie sesión.
time_future_and_until_login: Acaba en %{time} y después de que l'usuariu anicie
sesión.
time_past: Finó hai %{time}.
+ block_duration:
+ hours:
+ one: 1 hora
+ other: '%{count} hores'
blocks_on:
title: Bloqueos fechos a %{name}
heading: Llista de los bloqueos a %{name}
show:
title: '%{block_on} bloquiáu por %{block_by}'
heading: '%{block_on} bloquiáu por %{block_by}'
- time_future: Fina en %{time}
- time_past: Finó hai %{time}
created: Creáu
- ago: hai %{time}
status: Estáu
show: Amosar
edit: Editar
description: Descripción
created_at: Creada el
last_changed: Cambéu postreru
- ago_html: hai %{when}
javascripts:
close: Zarrar
share:
title: Capes
copyright: © <a href='%{copyright_url}'>collaboradores d'OpenStreetMap</a>
donate_link_text: <a class='donate-attr' href='%{donate_url}'>Faiga una donación</a>
+ terms: <a href='%{terms_url}' target='_blank'>Condiciones del sitiu web y de
+ la API</a>
site:
edit_tooltip: Editar el mapa
edit_disabled_tooltip: Aumenta pa editar el mapa
directions:
ascend: Ascender
engines:
+ fossgis_osrm_bike: Bicicleta (OSRM)
fossgis_osrm_car: En coche (OSRM)
+ fossgis_osrm_foot: Pie (OSRM)
graphhopper_bicycle: Bicicleta (GraphHopper)
graphhopper_car: En coche (GraphHopper)
graphhopper_foot: A pie (GraphHopper)
edit:
description: Descripción
heading: Editar redaición
- submit: Guardar redaición
title: Editar redaición
index:
empty: Nun hai redaiciones qu'amosar
new:
description: Descripción
heading: Escribir información de la redaición nueva
- submit: Crear redaición
title: Crear una redaición nueva
show:
description: 'Descripción:'
pertenecen a esta redaición enantes de destruila.
flash: Redaición destruyía.
error: Hebo un error al destruir esta redaición.
+ validations:
+ leading_whitespace: tien espaciu al principiu
+ trailing_whitespace: tien espaciu al final
+ invalid_characters: contien caráuteres non válidos
+ url_characters: Contien caráuteres URL especiales (%{characters})
...
# Exported from translatewiki.net
# Export driver: phpyaml
# Author: AZISS
+# Author: Abijeet Patro
# Author: Cekli829
# Author: Mushviq Abdulla
# Author: Ruila
time:
formats:
friendly: '%e %B %Y %H:%M'
+ helpers:
+ submit:
+ diary_comment:
+ create: Qeyd et
+ diary_entry:
+ create: Yayımla
+ message:
+ create: Göndər
+ trace:
+ update: Dəyişiklikləri yadda saxla
+ user_block:
+ create: Blok yarat
+ update: Bloku yenilən
activerecord:
models:
acl: Giriş Məhdudiyyətləri siyahısı
diary_entries:
new:
title: Yeni Gündəlik Yazısı
- publish_button: Yayımla
+ form:
+ subject: 'Mövzu:'
+ body: 'Mətn:'
+ language: 'Dil:'
+ location: 'Yerləşdiyi yer:'
+ latitude: 'En dairəsi:'
+ longitude: 'Uzunluq dairəsi:'
+ use_map_link: xəritə üzərində göstər
index:
title: İstifadəçi gündəlikləri
title_friends: Dostların gündəlikləri
newer_entries: Yeni yazılar
edit:
title: Gündəlik yazısıni redaktə etmək
- subject: 'Mövzu:'
- body: 'Mətn:'
- language: 'Dil:'
- location: 'Yerləşdiyi yer:'
- latitude: 'En dairəsi:'
- longitude: 'Uzunluq dairəsi:'
- use_map_link: xəritə üzərində göstər
- save_button: Qeyd et
marker_text: Gundəlik yazısının yazıldığı yer
show:
title: İstifadəçi %{user} gündəliyi | %{title}
leave_a_comment: Şərh yaz
login_to_leave_a_comment: Şərh yazmaq üçün %{login_link}
login: Özünüzü təqdim edin
- save_button: Qeyd et
no_such_entry:
title: Belə bir gündəlik yazısı mövcud deyil
heading: 'Yazı mövcud deyil id: %{id}'
post: Post
when: Nə vaxt
comment: Şərh
- ago: '%{ago} əvvəl'
newer_comments: Yeni şərhlər
older_comments: Köhnə Şərhlər
geocoder:
send_message_to: '%{name} yeni mesaj göndər'
subject: Mövzu
body: 'Mətn:'
- send_button: Göndər
back_to_inbox: Gələnlərə geri qayıt
create:
message_sent: Mesaj göndərildi
edit: redaktə
owner: 'Sahibi:'
description: 'İzah:'
- save_button: Dəyişiklikləri yadda saxla
show:
filename: 'Fayl adı:'
download: yüklə
continue: Davam et
terms:
consider_pd_why: bu nədir?
- agree: Razıyam
decline: İmtina
legale_names:
france: Fransa
diary: gündəlik
remove as friend: dostluqdan silinmiş
add as friend: dostluğa əlavə edilmiş
- ct accepted: '%{ago} əvvəl qəbul edilib'
latest edit: 'Son redaktə %{ago}:'
email address: 'E-poçt ünvanı:'
status: 'Status:'
confirm: Təsdiq et
user_blocks:
new:
- submit: Blok yarat
back: Bütün blokları göstər
edit:
- submit: Bloku yenilən
show: Bu bloku göstər
back: Bütün blokları göstər
create:
title: '%{name} tərəfindən blok edilib'
show:
title: '%{block_on}, %{block_by} tərəfindən blok edilib'
- time_past: '%{time} əvvəl sona çatıb'
status: Status
show: 'Göstər:'
revoke: Ləğv et!