Merge branch 'master' into moderation
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 28 Feb 2018 07:46:25 +0000 (15:46 +0800)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 28 Feb 2018 07:46:25 +0000 (15:46 +0800)
1  2 
.rubocop_todo.yml
Gemfile
Gemfile.lock
app/assets/stylesheets/common.scss
app/models/user.rb
config/locales/en.yml
test/test_helper.rb

diff --combined .rubocop_todo.yml
index d22f0f73ca82fd8a9e579a190ad6b64fb9b771a0,2c8d29eb887fac048d55a61cfcdb3d34e5138fa3..5846de44f47d987a1bf16d6f67a19dd7227617e2
@@@ -55,11 -55,6 +55,6 @@@ Lint/InterpolationCheck
    Exclude:
      - 'test/controllers/node_controller_test.rb'
  
- # Offense count: 2
- Lint/RescueWithoutErrorClass:
-   Exclude:
-     - 'app/helpers/browse_helper.rb'
  # Offense count: 2
  Lint/ShadowingOuterLocalVariable:
    Exclude:
@@@ -72,7 -67,7 +67,7 @@@ Metrics/AbcSize
  # Offense count: 41
  # Configuration parameters: CountComments, ExcludedMethods.
  Metrics/BlockLength:
 -  Max: 240
 +  Max: 250
  
  # Offense count: 12
  # Configuration parameters: CountBlocks.
@@@ -82,7 -77,7 +77,7 @@@ Metrics/BlockNesting
  # Offense count: 63
  # Configuration parameters: CountComments.
  Metrics/ClassLength:
-   Max: 1796
+   Max: 1797
  
  # Offense count: 71
  Metrics/CyclomaticComplexity:
@@@ -227,3 -222,8 +222,8 @@@ Style/NumericLiterals
  # SupportedStyles: compact, exploded
  Style/RaiseArgs:
    Enabled: false
+ # Offense count: 2
+ Style/RescueStandardError:
+   Exclude:
+     - 'app/helpers/browse_helper.rb'
diff --combined Gemfile
index 67a3a1f5ede13ba7b9d80fc9cb5cd77ae6d7d6c9,e05edebc402e72f2872f2d4aea26d7bda3a824df..55493b9b684d6f868a44e7d6a8a8a33b4056581d
+++ b/Gemfile
@@@ -13,7 -13,7 +13,7 @@@ gem "psych", :platforms => :ruby_2
  gem "json"
  
  # Use postgres as the database
- gem "pg"
+ gem "pg", "~> 0.18"
  
  # Use SCSS for stylesheets
  gem "sass-rails", "~> 5.0"
@@@ -48,7 -48,7 +48,7 @@@ gem "http_accept_language", "~> 2.0.0
  gem "i18n-js", ">= 3.0.0"
  gem "oauth-plugin", ">= 0.5.1"
  gem "openstreetmap-deadlock_retry", ">= 1.3.0", :require => "deadlock_retry"
- gem "paperclip", "~> 4.0"
+ gem "paperclip", "~> 5.2"
  gem "rack-cors"
  gem "rails-i18n", "~> 4.0.0"
  gem "record_tag_helper"
@@@ -70,9 -70,6 +70,9 @@@ gem "omniauth-windowslive
  # Markdown formatting support
  gem "redcarpet"
  
 +# For status transitions of Issues
 +gem "aasm"
 +
  # Load libxml support for XML parsing and generation
  gem "libxml-ruby", ">= 2.0.5", :require => "libxml"
  
diff --combined Gemfile.lock
index 9164f63d148eacdb25f7744084a0744cc2b09807,3c26adb1d216b146da3c25494f5581c560327937..60147782433e02fbce53c5f5d20072f80679f027
@@@ -2,7 -2,6 +2,7 @@@ GE
    remote: https://rubygems.org/
    specs:
      SystemTimer (1.2.3)
 +    aasm (4.1.0)
      actioncable (5.1.4)
        actionpack (= 5.1.4)
        nio4r (~> 2.0)
        activerecord (>= 3.2, < 6.0)
        rake (>= 10.4, < 13.0)
      arel (8.0.0)
-     ast (2.3.0)
-     autoprefixer-rails (7.1.6)
+     ast (2.4.0)
+     autoprefixer-rails (8.0.0)
        execjs
      bigdecimal (1.1.0)
      builder (3.2.3)
-     canonical-rails (0.2.1)
+     canonical-rails (0.2.2)
        rails (>= 4.1, < 5.2)
-     capybara (2.16.1)
+     capybara (2.18.0)
        addressable
        mini_mime (>= 0.1.3)
        nokogiri (>= 1.3.3)
        rack (>= 1.0.0)
        rack-test (>= 0.5.4)
-       xpath (~> 2.0)
+       xpath (>= 2.0, < 4.0)
      climate_control (0.2.0)
      cliver (0.3.2)
      cocaine (0.5.8)
@@@ -73,8 -72,8 +73,8 @@@
        coffee-script-source
        execjs
      coffee-script-source (1.12.2)
-     composite_primary_keys (10.0.1)
-       activerecord (~> 5.1.0)
+     composite_primary_keys (10.0.2)
+       activerecord (~> 5.1.0, >= 5.1.4)
      concurrent-ruby (1.0.5)
      coveralls (0.8.21)
        json (>= 1.8, < 3)
@@@ -90,7 -89,7 +90,7 @@@
      dynamic_form (1.1.4)
      erubi (1.7.0)
      execjs (2.7.0)
-     exifr (1.3.2)
+     exifr (1.3.3)
      factory_bot (4.8.2)
        activesupport (>= 3.0.0)
      factory_bot_rails (4.8.2)
        railties (>= 3.0.0)
      faraday (0.12.2)
        multipart-post (>= 1.2, < 3)
-     ffi (1.9.18)
+     ffi (1.9.21)
      fspath (3.1.0)
      geoip (1.6.3)
      globalid (0.4.1)
        activesupport (>= 4.2.0)
      hashdiff (0.3.7)
-     hashie (3.5.6)
+     hashie (3.5.7)
      htmlentities (4.3.4)
      http_accept_language (2.0.5)
-     i18n (0.9.1)
+     i18n (0.9.5)
        concurrent-ruby (~> 1.0)
-     i18n-js (3.0.2)
+     i18n-js (3.0.4)
        i18n (~> 0.6, >= 0.6.6)
-     image_optim (0.26.0)
+     image_optim (0.26.1)
        exifr (~> 1.2, >= 1.2.2)
        fspath (~> 3.0)
        image_size (~> 1.5)
        actionpack
        jsonify (< 0.4.0)
      jwt (1.5.6)
-     kgio (2.11.0)
+     kgio (2.11.2)
      libv8 (3.16.14.19)
-     libxml-ruby (3.0.0)
+     libxml-ruby (3.1.0)
      listen (3.1.5)
        rb-fsevent (~> 0.9, >= 0.9.4)
        rb-inotify (~> 0.9, >= 0.9.7)
        activesupport (>= 4.0)
        logstash-event (~> 1.2.0)
        request_store
-     loofah (2.1.1)
+     loofah (2.2.0)
        crass (~> 1.0.2)
        nokogiri (>= 1.5.9)
      mail (2.7.0)
      mime-types (3.1)
        mime-types-data (~> 3.2015)
      mime-types-data (3.2016.0521)
-     mimemagic (0.3.0)
+     mimemagic (0.3.2)
      mini_mime (1.0.0)
      mini_portile2 (2.3.0)
-     minitest (5.10.3)
-     multi_json (1.12.2)
+     minitest (5.11.3)
+     multi_json (1.13.1)
      multi_xml (0.6.0)
      multipart-post (2.0.0)
-     nio4r (2.1.0)
-     nokogiri (1.8.1)
+     nio4r (2.2.0)
+     nokogiri (1.8.2)
        mini_portile2 (~> 2.3.0)
-     nokogumbo (1.4.13)
+     nokogumbo (1.5.0)
        nokogiri
      oauth (0.4.7)
      oauth-plugin (0.5.1)
        multi_json (~> 1.3)
        multi_xml (~> 0.5)
        rack (>= 1.2, < 3)
-     omniauth (1.7.1)
+     omniauth (1.8.1)
        hashie (>= 3.4.6, < 3.6.0)
        rack (>= 1.6.2, < 3)
      omniauth-facebook (4.0.0)
      omniauth-github (1.3.0)
        omniauth (~> 1.5)
        omniauth-oauth2 (>= 1.4.0, < 2.0)
-     omniauth-google-oauth2 (0.5.2)
-       jwt (~> 1.5)
-       multi_json (~> 1.3)
+     omniauth-google-oauth2 (0.5.3)
+       jwt (>= 1.5)
        omniauth (>= 1.1.1)
-       omniauth-oauth2 (>= 1.3.1)
+       omniauth-oauth2 (>= 1.5)
      omniauth-mediawiki (0.0.3)
        jwt (~> 1.0)
        omniauth-oauth (~> 1.0)
      omniauth-oauth (1.1.0)
        oauth
        omniauth (~> 1.0)
-     omniauth-oauth2 (1.4.0)
-       oauth2 (~> 1.0)
+     omniauth-oauth2 (1.5.0)
+       oauth2 (~> 1.1)
        omniauth (~> 1.2)
      omniauth-openid (1.0.1)
        omniauth (~> 1.0)
        multi_json (~> 1.12)
        omniauth-oauth2 (~> 1.4)
      openstreetmap-deadlock_retry (1.3.0)
-     paperclip (4.3.7)
-       activemodel (>= 3.2.0)
-       activesupport (>= 3.2.0)
+     paperclip (5.2.1)
+       activemodel (>= 4.2.0)
+       activesupport (>= 4.2.0)
        cocaine (~> 0.5.5)
        mime-types
-       mimemagic (= 0.3.0)
-     parallel (1.12.0)
+       mimemagic (~> 0.3.0)
+     parallel (1.12.1)
      parser (2.4.0.2)
        ast (~> 2.3)
      pg (0.21.0)
-     poltergeist (1.16.0)
+     poltergeist (1.17.0)
        capybara (~> 2.1)
        cliver (~> 0.3.1)
        websocket-driver (>= 0.2.0)
      powerpack (0.1.1)
      progress (3.4.0)
-     psych (2.2.4)
-     public_suffix (3.0.1)
-     puma (3.11.0)
+     psych (3.0.2)
+     public_suffix (3.0.2)
+     puma (3.11.2)
      r2 (0.2.7)
-     rack (2.0.3)
+     rack (2.0.4)
      rack-cors (1.0.2)
      rack-openid (1.3.1)
        rack (>= 1.1.0)
        method_source
        rake (>= 0.8.7)
        thor (>= 0.18.1, < 2.0)
-     rainbow (2.2.2)
-       rake
+     rainbow (3.0.0)
      rake (12.3.0)
      rb-fsevent (0.10.2)
      rb-inotify (0.9.10)
        actionview (~> 5.x)
      redcarpet (3.4.0)
      ref (2.0.0)
-     request_store (1.3.2)
-     rinku (2.0.3)
+     request_store (1.4.0)
+       rack (>= 1.4)
+     rinku (2.0.4)
      rotp (3.3.0)
-     rubocop (0.51.0)
+     rubocop (0.52.1)
        parallel (~> 1.10)
-       parser (>= 2.3.3.1, < 3.0)
+       parser (>= 2.4.0.2, < 3.0)
        powerpack (~> 0.1)
-       rainbow (>= 2.2.2, < 3.0)
+       rainbow (>= 2.2.2, < 4.0)
        ruby-progressbar (~> 1.7)
        unicode-display_width (~> 1.0, >= 1.0.1)
      ruby-openid (2.7.0)
      ruby-progressbar (1.9.0)
      ruby_dep (1.5.0)
      safe_yaml (1.0.4)
-     sanitize (4.5.0)
+     sanitize (4.6.0)
        crass (~> 1.0.2)
        nokogiri (>= 1.4.4)
-       nokogumbo (~> 1.4.1)
-     sass (3.5.3)
+       nokogumbo (~> 1.4)
+     sass (3.5.5)
        sass-listen (~> 4.0.0)
      sass-listen (4.0.0)
        rb-fsevent (~> 0.9, >= 0.9.4)
        sprockets (>= 2.8, < 4.0)
        sprockets-rails (>= 2.0, < 4.0)
        tilt (>= 1.1, < 3)
-     secure_headers (5.0.3)
+     secure_headers (5.0.5)
        useragent (>= 0.15.0)
      simplecov (0.14.1)
        docile (~> 1.1.0)
      thor (0.19.4)
      thread_safe (0.3.6)
      tilt (2.0.8)
-     tins (1.16.0)
-     tzinfo (1.2.4)
+     tins (1.16.3)
+     tzinfo (1.2.5)
        thread_safe (~> 0.1)
-     uglifier (3.2.0)
+     uglifier (4.1.6)
        execjs (>= 0.3.0, < 3)
      unicode-display_width (1.3.0)
-     useragent (0.16.8)
+     useragent (0.16.10)
      validates_email_format_of (1.6.3)
        i18n
      vendorer (0.1.16)
-     webmock (3.1.1)
+     webmock (3.3.0)
        addressable (>= 2.3.6)
        crack (>= 0.3.2)
        hashdiff
      websocket-driver (0.6.5)
        websocket-extensions (>= 0.1.0)
      websocket-extensions (0.1.3)
-     xpath (2.1.0)
-       nokogiri (~> 1.3)
+     xpath (3.0.0)
+       nokogiri (~> 1.8)
  
  PLATFORMS
    ruby
  
  DEPENDENCIES
    SystemTimer (>= 1.1.3)
 +  aasm
    actionpack-page_caching
    annotate
    autoprefixer-rails
    omniauth-openid
    omniauth-windowslive
    openstreetmap-deadlock_retry (>= 1.3.0)
-   paperclip (~> 4.0)
-   pg
+   paperclip (~> 5.2)
+   pg (~> 0.18)
    poltergeist
    psych
    puma (~> 3.7)
index f647302fba81101828872b4860f1759d5a84c1fa,6df4c14acaa914b028f05104958d12a290e6611e..3e64728a7625403dd80332509dfbd1a385fed459
@@@ -1002,6 -1002,11 +1002,11 @@@ header .search_forms
        vertical-align: middle;
      }
    }
+   a.reverse_directions {
+     cursor: pointer;
+     margin: 0px 0px 5px 25px;
+   }
  }
  
  /* Rules for the map key which appears in the popout sidebar */
@@@ -2813,44 -2818,3 +2818,44 @@@ input.richtext_title[type="text"] 
      display: none;
    }
  }
 +
 +.read-reports {
 +  background: #eee;
 +  opacity: 0.7;
 +}
 +
 +.report-related-block {
 +  display:inline-block;
 +}
 +
 +.report-block {
 +  width:475px;
 +  float:left;
 +  margin-right:100px;
 +}
 +
 +.related-block{
 +  width:280px;
 +  float:right;
 +}
 +
 +.issue-comments {
 +  width:475px;
 +}
 +
 +.report-disclaimer {
 +  background: #fff1f0;
 +  color: #d85030;
 +  border-color: rgba(216, 80, 48, 0.3);
 +  padding: 5px;
 +  margin-bottom: $lineheight;
 +
 +  ul {
 +    padding-left: $lineheight;
 +    margin-bottom: 0;
 +
 +    li {
 +      list-style: disc;
 +    }
 +  }
 +}
diff --combined app/models/user.rb
index 678bbad9de34b0466ec916b34c69af5744af0a36,9eeb98290360d58cda7c759ec7b8dc37e6fb754e..352c58fb51ae55154aa134be58bc7c02920c7589
@@@ -73,12 -73,6 +73,12 @@@ class User < ActiveRecord::Bas
  
    has_many :roles, :class_name => "UserRole"
  
 +  has_many :issues, :class_name => "Issue", :foreign_key => :reported_user_id
 +  has_one :issue, :class_name => "Issue", :foreign_key => :updated_by
 +  has_many :issue_comments
 +
 +  has_many :reports
 +
    scope :visible, -> { where(:status => %w[pending active confirmed]) }
    scope :active, -> { where(:status => %w[active confirmed]) }
    scope :identifiable, -> { where(:data_public => true) }
    ##
    # perform a spam check on a user
    def spam_check
-     if status == "active" && spam_score > SPAM_THRESHOLD
-       update(:status => "suspended")
-     end
+     update(:status => "suspended") if status == "active" && spam_score > SPAM_THRESHOLD
    end
  
    ##
diff --combined config/locales/en.yml
index 40237b63baf77326a86b7430f7a22d290594a5e0,2412a2b9c27e1baddccffddaab032a452b4d0143..a40f1571978a44023071bee0e3960be77e2a5333
@@@ -207,7 -207,6 +207,7 @@@ en
        reopened_by: "Reactivated by %{user} <abbr title='%{exact_time}'>%{when} ago</abbr>"
        reopened_by_anonymous: "Reactivated by anonymous <abbr title='%{exact_time}'>%{when} ago</abbr>"
        hidden_by: "Hidden by %{user} <abbr title='%{exact_time}'>%{when} ago</abbr>"
 +      report: Report this note?
      query:
        title: "Query Features"
        introduction: "Click on the map to find nearby features."
        edit_link: Edit this entry
        hide_link: Hide this entry
        confirm: Confirm
 +      report: Report this entry?
      diary_comment:
        comment_from: "Comment from %{link_user} on %{comment_created_at}"
        hide_link: Hide this comment
        confirm: Confirm
 +      report: Report this comment?
      location:
        location: "Location:"
        view: "View"
            chair_lift: "Chair Lift"
            drag_lift: "Drag Lift"
            gondola: "Gondola Lift"
+           platter: "Platter Lift"
+           pylon: "Pylon"
            station: "Aerialway Station"
+           t-bar: "T-Bar Lift"
          aeroway:
            aerodrome: "Aerodrome"
+           airstrip: "Airstrip"
            apron: "Apron"
            gate: "Gate"
+           hangar: "Hangar"
            helipad: "Helipad"
+           holding_position: "Holding Position"
+           parking_position: "Parking Position"
            runway: "Runway"
            taxiway: "Taxiway"
            terminal: "Terminal"
            crematorium: "Crematorium"
            dentist: "Dentist"
            doctors: "Doctors"
-           dormitory: "Dormitory"
            drinking_water: "Drinking Water"
            driving_school: "Driving School"
            embassy: "Embassy"
-           emergency_phone: "Emergency Phone"
            fast_food: "Fast Food"
            ferry_terminal: "Ferry Terminal"
-           fire_hydrant: "Fire Hydrant"
            fire_station: "Fire Station"
            food_court: "Food Court"
            fountain: "Fountain"
            fuel: "Fuel"
            gambling: "Gambling"
            grave_yard: "Grave Yard"
-           gym: "Fitness Centre / Gym"
-           health_centre: "Health Centre"
+           grit_bin: "Grit Bin"
            hospital: "Hospital"
            hunting_stand: "Hunting Stand"
            ice_cream: "Ice Cream"
            kindergarten: "Kindergarten"
            library: "Library"
-           market: "Market"
            marketplace: "Marketplace"
            monastery: "Monastery"
            motorcycle_parking: "Motorcycle Parking"
            nightclub: "Night Club"
-           nursery: "Nursery"
            nursing_home: "Nursing Home"
            office: "Office"
            parking: "Parking"
            parking_entrance: "Parking Entrance"
+           parking_space: "Parking Space"
            pharmacy: "Pharmacy"
            place_of_worship: "Place of Worship"
            police: "Police"
            prison: "Prison"
            pub: "Pub"
            public_building: "Public Building"
-           reception_area: "Reception Area"
            recycling: "Recycling Point"
            restaurant: "Restaurant"
            retirement_home: "Retirement Home"
            village_hall: "Village Hall"
            waste_basket: "Waste Basket"
            waste_disposal: "Waste Disposal"
+           water_point: "Water Point"
            youth_centre: "Youth Centre"
          boundary:
            administrative: "Administrative Boundary"
            protected_area : "Protected Area"
          bridge:
            aqueduct: "Aqueduct"
+           boardwalk: "Boardwalk"
            suspension: "Suspension Bridge"
            swing: "Swing Bridge"
            viaduct: "Viaduct"
            "yes": "Craft Shop"
          emergency:
            ambulance_station: "Ambulance Station"
+           assembly_point: "Assembly Point"
            defibrillator: "Defibrillator"
            landing_site: "Emergency Landing Site"
            phone: "Emergency Phone"
+           water_tank: "Emergency Water Tank"
+           "yes": "Emergency"
          highway:
            abandoned: "Abandoned Highway"
            bridleway: "Bridleway"
            bus_guideway: "Guided Bus Lane"
            bus_stop: "Bus Stop"
            construction: "Highway under Construction"
+           corridor: "Corridor"
            cycleway: "Cycle Path"
            elevator: "Elevator"
            emergency_access_point: "Emergency Access Point"
            footway: "Footpath"
            ford: "Ford"
+           give_way: "Give Way Sign"
            living_street: "Living Street"
            milestone: "Milestone"
            motorway: "Motorway"
            motorway_junction: "Motorway Junction"
            motorway_link: "Motorway Road"
+           passing_place: "Passing Place"
            path: "Path"
            pedestrian: "Pedestrian Way"
            platform: "Platform"
            services: "Motorway Services"
            speed_camera: "Speed Camera"
            steps: "Steps"
+           stop: "Stop Sign"
            street_lamp: "Street Lamp"
            tertiary: "Tertiary Road"
            tertiary_link: "Tertiary Road"
            trail: "Trail"
            trunk: "Trunk Road"
            trunk_link: "Trunk Road"
+           turning_loop: "Turning Loop"
            unclassified: "Unclassified Road"
-           unsurfaced: "Unsurfaced Road"
            "yes" : "Road"
          historic:
            archaeological_site: "Archaeological Site"
            manor: "Manor"
            memorial: "Memorial"
            mine: "Mine"
+           mine_shaft: "Mine Shaft"
            monument: "Monument"
            roman_road: "Roman Road"
            ruins: "Ruins"
            wayside_cross: "Wayside Cross"
            wayside_shrine: "Wayside Shrine"
            wreck: "Wreck"
+           "yes": "Historic Site"
          junction:
            "yes": "Junction"
          landuse:
          leisure:
            beach_resort: "Beach Resort"
            bird_hide: "Bird Hide"
-           club: "Club"
            common: "Common Land"
            dog_park: "Dog Park"
+           firepit: "Fire Pit"
            fishing: "Fishing Area"
            fitness_centre: "Fitness Centre"
            fitness_station: "Fitness Station"
            water_park: "Water Park"
            "yes": "Leisure"
          man_made:
+           adit: "Adit"
+           beacon: "Beacon"
+           beehive: "Bee Hive"
+           breakwater: "Breakwater"
+           bridge: "Bridge"
+           bunker_silo: "Bunker"
+           chimney: "Chimney"
+           crane: "Crane"
+           dolphin: "Mooring Post"
+           dyke: "Dyke"
+           embankment: "Embankment"
+           flagpole: "Flagpole"
+           gasometer: "Gasometer"
+           groyne: "Groyne"
+           kiln: "Kiln"
            lighthouse: "Lighthouse"
+           mast: "Mast"
+           mine: "Mine"
+           mineshaft: "Mine Shaft"
+           monitoring_station: "Monitoring Station"
+           petroleum_well: "Petroleum Well"
+           pier: "Pier"
            pipeline: "Pipeline"
+           silo: "Silo"
+           storage_tank: "Storage Tank"
+           surveillance: "Surveillance"
            tower: "Tower"
+           wastewater_plant: "Wastewater Plant"
+           watermill: "Water Mill"
+           water_tower: "Water Tower"
+           water_well: "Well"
+           water_works: "Water Works"
+           windmill: "Wind Mill"
            works: "Factory"
            "yes": "Man-made"
          military:
            airfield: "Military Airfield"
            barracks: "Barracks"
            bunker: "Bunker"
+           "yes": "Military"
          mountain_pass:
            "yes" : "Mountain Pass"
          natural:
            accountant: "Accountant"
            administrative: "Administration"
            architect: "Architect"
+           association: "Association"
            company: "Company"
+           educational_institution: "Educational Institution"
            employment_agency: "Employment Agency"
            estate_agent: "Estate Agent"
            government: "Governmental Office"
            insurance: "Insurance Office"
+           it: "IT Office"
            lawyer: "Lawyer"
            ngo: "NGO Office"
            telecommunication: "Telecommunication Office"
            "yes": "Office"
          place:
            allotments: "Allotments"
-           block: "Block"
-           airport: "Airport"
            city: "City"
+           city_block: "City Block"
            country: "Country"
            county: "County"
            farm: "Farm"
            islet: "Islet"
            isolated_dwelling: "Isolated Dwelling"
            locality: "Locality"
-           moor: "Moor"
            municipality: "Municipality"
            neighbourhood: "Neighbourhood"
            postcode: "Postcode"
+           quarter: "Quarter"
            region: "Region"
            sea: "Sea"
+           square: "Square"
            state: "State"
            subdivision: "Subdivision"
            suburb: "Suburb"
            abandoned: "Abandoned Railway"
            construction: "Railway under Construction"
            disused: "Disused Railway"
-           disused_station: "Disused Railway Station"
            funicular: "Funicular Railway"
            halt: "Train Stop"
-           historic_station: "Historic Railway Station"
            junction: "Railway Junction"
            level_crossing: "Level Crossing"
            light_rail: "Light Rail"
            beauty: "Beauty Shop"
            beverages: "Beverages Shop"
            bicycle: "Bicycle Shop"
+           bookmaker: "Bookmaker"
            books: "Book Shop"
            boutique: "Boutique"
            butcher: "Butcher"
            hairdresser: "Hairdresser"
            hardware: "Hardware Store"
            hifi: "Hi-Fi"
-           insurance: "Insurance"
+           houseware: "Houseware Shop"
+           interior_decoration: "Interior Decoration"
            jewelry: "Jewelry Shop"
            kiosk: "Kiosk Shop"
+           kitchen: "Kitchen Shop"
            laundry: "Laundry"
+           lottery: "Lottery"
            mall: "Mall"
            market: "Market"
+           massage: "Massage"
            mobile_phone: "Mobile Phone Shop"
            motorcycle: "Motorcycle Shop"
            music: "Music Shop"
            optician: "Optician"
            organic: "Organic Food Shop"
            outdoor: "Outdoor Shop"
+           paint: "Paint Shop"
+           pawnbroker: "Pawnbroker"
            pet: "Pet Shop"
            pharmacy: "Pharmacy"
            photo: "Photo Shop"
-           salon: "Salon"
+           seafood: "Sea Food"
            second_hand: "Second-hand Shop"
            shoes: "Shoe Shop"
-           shopping_centre: "Shopping Centre"
            sports: "Sports Shop"
            stationery: "Stationery Shop"
            supermarket: "Supermarket"
            tailor: "Tailor"
+           ticket: "Ticket Shop"
+           tobacco: "Tobacco Shop"
            toys: "Toy Shop"
            travel_agency: "Travel Agency"
+           tyres: "Tyre Shop"
+           vacant: "Vacant Shop"
+           variety_store: "Variety Store"
            video: "Video Shop"
-           wine: "Off License"
+           wine: "Wine Store"
            "yes": "Shop"
          tourism:
            alpine_hut: "Alpine Hut"
            viewpoint: "Viewpoint"
            zoo: "Zoo"
          tunnel:
+           building_passage: "Building Passage"
            culvert: "Culvert"
            "yes": "Tunnel"
          waterway:
      results:
        no_results: "No results found"
        more_results: "More results"
 +  issues:
 +    report: Report
 +    resolve: Resolve
 +    ignore: Ignore
 +    reopen: Reopen
 +    index:
 +      title: Issues
 +      select_status: Select Status
 +      select_type: Select Type
 +      select_last_updated_by: Select Last Updated By
 +      reported_user: Reported User
 +      not_updated: Not Updated
 +      search: Search
 +      search_guidance: "Search Issues:"
 +      user_not_found: User does not exist
 +      issues_not_found: No such issues found
 +      status: Status
 +      reports: Reports
 +      last_updated_at: Last Updated At
 +      last_updated_by: Last Updated By
 +      link_to_reports: View Reports
 +      reported_user: Reported User
 +      reports_count:
 +        one: "1 Report"
 +        other: "%{count} Reports"
 +      reported_item: Reported Item
 +    create:
 +      successful_report: Your report has been registered sucessfully
 +      provide_details: Please provide the required details
 +    update:
 +      new_report: Your report been registered sucessfully
 +      successful_update: Your report has been updated successfully
 +      provide_details: Please provide the required details
 +    new:
 +      details: Please provide some more details about the problem (required).
 +      select: "Select a reason for your report:"
 +      disclaimer:
 +        intro: "Before sending your report to the site moderators, please ensure that:"
 +        not_just_mistake: You are certain that the problem is not just a mistake
 +        unable_to_fix: You are unable to fix the problem yourself or with the help of your fellow community members
 +        resolve_with_user: You have already tried to resolve the problem with the user concerned
 +    show:
 +      title: "%{status} Issue #%{issue_id}"
 +      reports:
 +        zero: No reports
 +        one: 1 report
 +        other: "%{count} reports"
 +      report_created_at: "First reported at %{datetime}"
 +      last_resolved_at: "Last resolved at %{datetime}"
 +      last_updated_at: "Last updated at %{datetime} by %{displayname}"
 +      reports_of_this_issue: Reports of this Issue
 +      read_reports: Read Reports
 +      new_reports: New Reports
 +      other_issues_against_this_user: Other issues against this user
 +      no_other_issues: No other issues against this user.
 +      comments_on_this_issue: Comments on this issue
 +      comments:
 +        reassign_param: Reassign Issue?
 +    comment:
 +      provide_details: Please provide the required details
 +      comment_created: Your comment was successfully created
 +    comments:
 +      created_at: "On %{datetime}"
 +    reports:
 +      category: "Category: %{category}"
 +      updated_at: "On %{datetime}"
 +      reported_by_html: "Reported by <a href=\"%{user_url}\">%{user_name}</a>"
 +    resolved: Issue status has been set to 'Resolved'
 +    ignored: Issue status has been set to 'Ignored'
 +    reopened: Issue status has been set to 'Open'
 +    states:
 +      ignored: Ignored
 +      open: Open
 +      resolved: Resolved
 +  reports:
 +    new:
 +      title_html: "Report %{link}"
 +    categories:
 +      DiaryEntry:
 +        spam: This Diary Entry is/contains spam
 +        offensive: This Diary Entry is obscene/offensive
 +        threat: This Diary Entry contains a threat
 +        other: Other
 +      DiaryComment:
 +        spam: This Diary Comment is/contains spam
 +        offensive: This Diary Comment is obscene/offensive
 +        threat: This Diary Comment contains a threat
 +        other: Other
 +      User:
 +        spam: This User profile is/contains spam
 +        offensive: This User profile is obscene/offensive
 +        threat: This User profile contains a threat
 +        vandal: This User is a vandal
 +        other: Other
 +      Note:
 +        spam: This note is spam
 +        vandalism: This note is vandalism
 +        personal: This note contains personal data
 +        abusive: This note is abusive
 +        other: Other
    layouts:
      project_name:
        # in <title>
      edit: Edit
      history: History
      export: Export
 +    issues: Issues
      data: Data
      export_data: Export Data
      gps_traces: GPS Traces
          <a href="http://dmca.openstreetmap.org/">on-line filing page</a>.
        trademarks_title_html: <span id="trademarks"></span>Trademarks
        trademarks_1_html: |
-         OpenStreetMap, the magnifying glass logo and State of the Map are registered trademarks of the OpenStreetMap Foundation. If you have questions about your use of the marks, please send your questions to the <a href="https://wiki.osmfoundation.org/wiki/Licensing_Working_Group">Licence Working Group</a>.
+         OpenStreetMap, the magnifying glass logo and State of the Map are registered trademarks of the OpenStreetMap Foundation. If you have questions about your use of the marks, please see our <a href="https://wiki.osmfoundation.org/wiki/Trademark_Policy">Trademark Policy</a>.
    welcome_page:
      title: Welcome!
      introduction_html: |
        paragraph_1_html: |
          OpenStreetMap has few formal rules but we expect all participants to collaborate
          with, and communicate with, the community. If you are considering
 -        any activities other than editing by hand, please read and follow the guidelines on 
 -        <a href='https://wiki.openstreetmap.org/wiki/Import/Guidelines'>Imports</a> and 
 +        any activities other than editing by hand, please read and follow the guidelines on
 +        <a href='https://wiki.openstreetmap.org/wiki/Import/Guidelines'>Imports</a> and
          <a href='https://wiki.openstreetmap.org/wiki/Automated_Edits_code_of_conduct'>Automated Edits</a>.
      questions:
        title: Any questions?
          title: Join the community
          explanation_html: |
            If you have noticed a problem with our map data, for example a road is missing or your address, the best way to
 -          proceed is to join the OpenStreetMap community and add or repair the data yourself. 
 +          proceed is to join the OpenStreetMap community and add or repair the data yourself.
        add_a_note:
          instructions_html: |
            Just click <a class='icon note'></a> or the same icon on the map display.
        title: Other concerns
        explanation_html: |
          If you have concerns about how our data is being used or about the contents please consult our
 -        <a href='/copyright'>copyright page</a> for more legal information, or contact the appropriate 
 -        <a href='https://wiki.osmfoundation.org/wiki/Working_Groups'>OSMF working group</a>.  
 +        <a href='/copyright'>copyright page</a> for more legal information, or contact the appropriate
 +        <a href='https://wiki.osmfoundation.org/wiki/Working_Groups'>OSMF working group</a>.
    help_page:
      title: Getting Help
      introduction: |
        License page</a> for details.
      legal_title: Legal
      legal_html: |
 -      This site and many other related services are formally operated by the  
 -      <a href='https://osmfoundation.org/'>OpenStreetMap Foundation</a> (OSMF) 
 -      on behalf of the community. Use of all OSMF operated services is subject 
 +      This site and many other related services are formally operated by the
 +      <a href='https://osmfoundation.org/'>OpenStreetMap Foundation</a> (OSMF)
 +      on behalf of the community. Use of all OSMF operated services is subject
        to our <a href="https://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy">
        Acceptable Use Policies</a> and our <a href="https://wiki.osmfoundation.org/wiki/Privacy_Policy">Privacy Policy</a>
 -      <br> 
 -      Please <a href='https://osmfoundation.org/Contact'>contact the OSMF</a> 
 -      if you have licensing, copyright or other legal questions.
 +      <br>
 +      Please <a href='https://osmfoundation.org/Contact'>contact the OSMF</a>
 +      if you have licensing, copyright or other legal questions and issues.
+       <br>
+       OpenStreetMap, the magnifying glass logo and State of the Map are <a href="https://wiki.osmfoundation.org/wiki/Trademark_Policy">registered trademarks of the OSMF</a>.
      partners_title: Partners
    notifier:
      diary_comment_notification:
        where_am_i: "Where is this?"
        where_am_i_title: Describe the current location using the search engine
        submit_text: "Go"
+       reverse_directions_text: "Reverse Directions"
      key:
        table:
          entry:
    application:
      require_cookies:
        cookies_needed: "You appear to have cookies disabled - please enable cookies in your browser before continuing."
 +    require_admin:
 +      not_an_admin: You need to be an admin to perform that action.
      require_moderator:
        not_a_moderator: "You need to be a moderator to perform that action."
      setup_user_auth:
        friends_diaries: "friends' diary entries"
        nearby_changesets: "nearby user changesets"
        nearby_diaries: "nearby user diary entries"
 +      report: "Report this user?"
      popup:
        your location: "Your location"
        nearby mapper: "Nearby mapper"
          continue_without_exit: Continue on %{name}
          slight_right_without_exit: Slight right onto %{name}
          offramp_right_without_exit: Take the ramp on the right onto %{name}
+         offramp_right_with_directions: Take the ramp on the right towards %{directions}
+         offramp_right_with_name_and_directions: Take the ramp on the right onto %{name}, towards %{directions}
+         offramp_right_without_directions: Take the ramp on the right
          onramp_right_without_exit: Turn right on the ramp onto %{name}
+         onramp_right_with_directions: Turn right onto the ramp towards %{directions}
+         onramp_right_with_name_and_directions: Turn right on the ramp onto %{name}, towards %{directions}
+         onramp_right_without_directions: Turn right onto the ramp
          endofroad_right_without_exit: At the end of the road turn right onto %{name}
          merge_right_without_exit: Merge right onto %{name}
          fork_right_without_exit: At the fork turn right onto %{name}
          sharp_left_without_exit: Sharp left onto %{name}
          turn_left_without_exit: Turn left onto %{name}
          offramp_left_without_exit: Take the ramp on the left onto %{name}
+         offramp_left_with_directions: Take the ramp on the left towards %{directions}
+         offramp_left_with_name_and_directions: Take the ramp on the left onto %{name}, towards %{directions}
+         offramp_left_without_directions: Take the ramp on the left
          onramp_left_without_exit: Turn left on the ramp onto %{name}
+         onramp_left_with_directions: Turn left onto the ramp towards %{directions}
+         onramp_left_with_name_and_directions: Turn left on the ramp onto %{name}, towards %{directions}
+         onramp_left_without_directions: Turn left onto the ramp
          endofroad_left_without_exit: At the end of the road turn left onto %{name}
          merge_left_without_exit: Merge left onto %{name}
          fork_left_without_exit: At the fork turn left onto %{name}
          slight_left_without_exit: Slight left onto %{name}
          via_point_without_exit: (via point)
          follow_without_exit: Follow %{name}
-         roundabout_without_exit: At roundabout take %{name}
+         roundabout_without_exit: At roundabout take exit onto %{name}
          leave_roundabout_without_exit: Leave roundabout - %{name}
          stay_roundabout_without_exit: Stay on roundabout - %{name}
-         start_without_exit: Start at end of %{name}
+         start_without_exit: Start on %{name}
          destination_without_exit: Reach destination
          against_oneway_without_exit: Go against one-way on %{name}
          end_oneway_without_exit: End of one-way on %{name}
diff --combined test/test_helper.rb
index 02f9665d7840fb89795cbc854e0ff8d31ad47f20,c9ec46dcf41cf1b78c9cab334b8027dde167aa0e..95d48bd5c7f2ed0485173106b043378d61f98abe
@@@ -82,7 -82,7 +82,7 @@@ module ActiveSuppor
      ##
      # set request headers for HTTP basic authentication
      def basic_authorization(user, pass)
-       @request.env["HTTP_AUTHORIZATION"] = format("Basic %s", Base64.encode64("#{user}:#{pass}"))
+       @request.env["HTTP_AUTHORIZATION"] = format("Basic %{auth}", :auth => Base64.encode64("#{user}:#{pass}"))
      end
  
      ##
          end
        end
      end
 +
 +    def sign_in_as(user)
 +      stub_hostip_requests
 +      visit login_path
 +      fill_in "username", :with => user.email
 +      fill_in "password", :with => "test"
 +      click_on "Login", :match => :first
 +    end
    end
  end