]> git.openstreetmap.org Git - rails.git/commitdiff
Merge branch 'master' into notes
authorTom Hughes <tom@compton.nu>
Thu, 28 Mar 2013 00:36:07 +0000 (00:36 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 28 Mar 2013 00:36:07 +0000 (00:36 +0000)
Conflicts:
Gemfile.lock

1  2 
Gemfile
Gemfile.lock
app/models/user.rb
config/locales/de.yml
config/locales/en.yml

diff --combined Gemfile
index b06702fb39e0d6f44ef90fedbca997fc332113eb,787a0864008fe0710c41e3307d5b85298309210c..f841dc19ae8be8016ed03f75558ffc0066f637ab
+++ b/Gemfile
@@@ -2,7 -2,7 +2,7 @@@
  source 'http://rubygems.org'
  
  # Require rails
- gem 'rails', '3.2.11'
+ gem 'rails', '3.2.12'
  
  # Require things which have moved to gems in ruby 1.9
  gem 'bigdecimal', :platforms => :ruby_19
@@@ -29,7 -29,6 +29,7 @@@ gem 'paperclip', '~> 2.0
  gem 'deadlock_retry', '>= 1.2.0'
  gem 'i18n-js', '>= 3.0.0.rc2'
  gem 'rack-cors'
 +gem 'jsonify-rails'
  
  # We need ruby-openid 2.2.0 or later for ruby 1.9 support
  gem 'ruby-openid', '>= 2.2.0'
@@@ -38,7 -37,7 +38,7 @@@
  gem 'redcarpet'
  
  # Character conversion support for ruby 1.8
- gem 'iconv', :platforms => :ruby_18
+ gem 'iconv', '= 0.1', :platforms => :ruby_18
  
  # Load libxml support for XML parsing and generation
  gem 'libxml-ruby', '>= 2.0.5', :require => 'libxml'
diff --combined Gemfile.lock
index ec1d4e3573089b2f53504cfb75ae326a718190af,a53bc3d0d49edd889d7e9153f8c5bd8ad91d380c..7679a6ccba333de324c9563523071445aa779a90
@@@ -2,31 -2,31 +2,31 @@@ GE
    remote: http://rubygems.org/
    specs:
      SystemTimer (1.2.3)
-     actionmailer (3.2.11)
-       actionpack (= 3.2.11)
+     actionmailer (3.2.12)
+       actionpack (= 3.2.12)
        mail (~> 2.4.4)
-     actionpack (3.2.11)
-       activemodel (= 3.2.11)
-       activesupport (= 3.2.11)
+     actionpack (3.2.12)
+       activemodel (= 3.2.12)
+       activesupport (= 3.2.12)
        builder (~> 3.0.0)
        erubis (~> 2.7.0)
        journey (~> 1.0.4)
-       rack (~> 1.4.0)
+       rack (~> 1.4.5)
        rack-cache (~> 1.2)
        rack-test (~> 0.6.1)
        sprockets (~> 2.2.1)
-     activemodel (3.2.11)
-       activesupport (= 3.2.11)
+     activemodel (3.2.12)
+       activesupport (= 3.2.12)
        builder (~> 3.0.0)
-     activerecord (3.2.11)
-       activemodel (= 3.2.11)
-       activesupport (= 3.2.11)
+     activerecord (3.2.12)
+       activemodel (= 3.2.12)
+       activesupport (= 3.2.12)
        arel (~> 3.0.2)
        tzinfo (~> 0.3.29)
-     activeresource (3.2.11)
-       activemodel (= 3.2.11)
-       activesupport (= 3.2.11)
-     activesupport (3.2.11)
+     activeresource (3.2.12)
+       activemodel (= 3.2.12)
+       activesupport (= 3.2.12)
+     activesupport (3.2.12)
        i18n (~> 0.6)
        multi_json (~> 1.0)
      arel (3.0.2)
@@@ -42,8 -42,8 +42,8 @@@
      coffee-script (2.2.0)
        coffee-script-source
        execjs
-     coffee-script-source (1.4.0)
-     composite_primary_keys (5.0.10)
+     coffee-script-source (1.6.2)
+     composite_primary_keys (5.0.12)
        activerecord (~> 3.2.0, >= 3.2.9)
      deadlock_retry (1.2.0)
      dynamic_form (1.1.4)
      erubis (2.7.0)
      execjs (1.4.0)
        multi_json (~> 1.0)
-     faraday (0.8.4)
 -    faraday (0.8.6)
++    faraday (0.8.7)
        multipart-post (~> 1.1)
      hike (1.2.1)
      htmlentities (4.3.1)
      http_accept_language (1.0.2)
      httpauth (0.2.0)
-     httpclient (2.3.2)
-     i18n (0.6.1)
-     i18n-js (3.0.0.rc3)
+     httpclient (2.3.3)
+     i18n (0.6.4)
+     i18n-js (3.0.0.rc5)
        i18n
      iconv (0.1)
      journey (1.0.4)
-     jquery-rails (2.1.4)
+     jquery-rails (2.2.1)
        railties (>= 3.0, < 5.0)
        thor (>= 0.14, < 2.0)
-     json (1.7.6)
+     json (1.7.7)
 +    jsonify (0.3.1)
 +      multi_json (~> 1.0)
 +    jsonify-rails (0.3.2)
 +      actionpack
 +      jsonify (< 0.4.0)
-     jwt (0.1.5)
-       multi_json (>= 1.0)
+     jwt (0.1.8)
+       multi_json (>= 1.5)
      libv8 (3.3.10.4)
-     libxml-ruby (2.4.0)
+     libxml-ruby (2.6.0)
      mail (2.4.4)
        i18n (>= 0.4.0)
        mime-types (~> 1.16)
        treetop (~> 1.4.8)
      memcached (1.5.0)
-     mime-types (1.19)
-     minitest (4.4.0)
-     multi_json (1.5.0)
-     multipart-post (1.1.5)
-     nokogiri (1.5.6)
+     mime-types (1.21)
+     minitest (4.7.0)
+     multi_json (1.7.2)
+     multi_xml (0.5.3)
+     multipart-post (1.2.0)
+     nokogiri (1.5.9)
      oauth (0.4.7)
      oauth-plugin (0.4.1)
        multi_json
        oauth (~> 0.4.4)
        oauth2 (>= 0.5.0)
        rack
-     oauth2 (0.8.0)
+     oauth2 (0.9.1)
        faraday (~> 0.8)
        httpauth (~> 0.1)
        jwt (~> 0.1.4)
        multi_json (~> 1.0)
+       multi_xml (~> 0.5)
        rack (~> 1.2)
      open_id_authentication (1.1.0)
        rack-openid (~> 1.3)
        activesupport (>= 2.3.2)
        cocaine (>= 0.0.2)
        mime-types
--    pg (0.14.1)
++    pg (0.15.0)
      polyglot (0.3.3)
-     r2 (0.0.3)
-     rack (1.4.4)
+     r2 (0.1.0)
+     rack (1.4.5)
      rack-cache (1.2)
        rack (>= 0.4)
      rack-cors (0.2.7)
      rack-openid (1.3.1)
        rack (>= 1.1.0)
        ruby-openid (>= 2.1.8)
-     rack-ssl (1.3.2)
+     rack-ssl (1.3.3)
        rack
      rack-test (0.6.2)
        rack (>= 1.0)
-     rails (3.2.11)
-       actionmailer (= 3.2.11)
-       actionpack (= 3.2.11)
-       activerecord (= 3.2.11)
-       activeresource (= 3.2.11)
-       activesupport (= 3.2.11)
+     rails (3.2.12)
+       actionmailer (= 3.2.12)
+       actionpack (= 3.2.12)
+       activerecord (= 3.2.12)
+       activeresource (= 3.2.12)
+       activesupport (= 3.2.12)
        bundler (~> 1.0)
-       railties (= 3.2.11)
-     rails-i18n (0.7.2)
+       railties (= 3.2.12)
+     rails-i18n (0.7.3)
        i18n (~> 0.5)
-     railties (3.2.11)
-       actionpack (= 3.2.11)
-       activesupport (= 3.2.11)
+     railties (3.2.12)
+       actionpack (= 3.2.12)
+       activesupport (= 3.2.12)
        rack-ssl (~> 1.3.2)
        rake (>= 0.8.7)
        rdoc (~> 3.4)
        thor (>= 0.14.6, < 2.0)
--    rake (10.0.3)
-     rdoc (3.12)
++    rake (10.0.4)
+     rdoc (3.12.2)
        json (~> 1.4)
      redcarpet (2.2.2)
      rinku (1.7.2)
-     ruby-openid (2.2.2)
+     ruby-openid (2.2.3)
      sanitize (2.0.3)
        nokogiri (>= 1.4.4, < 1.6)
-     sass (3.2.5)
+     sass (3.2.7)
      sass-rails (3.2.6)
        railties (~> 3.2.0)
        sass (>= 3.1.10)
        tilt (~> 1.1, != 1.3.0)
      therubyracer (0.10.2)
        libv8 (~> 3.3.10)
-     thor (0.16.0)
-     tilt (1.3.3)
-     timecop (0.5.9)
 -    thor (0.17.0)
++    thor (0.18.0)
+     tilt (1.3.6)
+     timecop (0.6.1)
      treetop (1.4.12)
        polyglot
        polyglot (>= 0.3.1)
-     tzinfo (0.3.35)
+     tzinfo (0.3.37)
      uglifier (1.3.0)
        execjs (>= 0.3.0)
        multi_json (~> 1.0, >= 1.0.2)
@@@ -184,9 -181,8 +186,9 @@@ DEPENDENCIE
    http_accept_language (>= 1.0.2)
    httpclient
    i18n-js (>= 3.0.0.rc2)
-   iconv
+   iconv (= 0.1)
    jquery-rails
 +  jsonify-rails
    libxml-ruby (>= 2.0.5)
    memcached (>= 1.4.1)
    minitest
    pg
    r2
    rack-cors
-   rails (= 3.2.11)
+   rails (= 3.2.12)
    rails-i18n (>= 0.6.3)
    redcarpet
    rinku (>= 1.2.2)
diff --combined app/models/user.rb
index 33f01c06bd972bbcee063c05ff5886ecc31e5afc,2e312119f8d13e669e7b941890b65932d18ca837..778afbf8a9c7ae26d76339905209a447ae9e92eb
@@@ -4,16 -4,14 +4,16 @@@ class User < ActiveRecord::Bas
    has_many :traces, :conditions => { :visible => true }
    has_many :diary_entries, :order => 'created_at DESC'
    has_many :diary_comments, :order => 'created_at DESC'
-   has_many :messages, :foreign_key => :to_user_id, :conditions => { :to_user_visible => true }, :order => 'sent_on DESC'
+   has_many :messages, :foreign_key => :to_user_id, :conditions => { :to_user_visible => true }, :order => 'sent_on DESC', :include => [:sender, :recipient]
    has_many :new_messages, :class_name => "Message", :foreign_key => :to_user_id, :conditions => { :to_user_visible => true, :message_read => false }, :order => 'sent_on DESC'
-   has_many :sent_messages, :class_name => "Message", :foreign_key => :from_user_id, :conditions => { :from_user_visible => true }, :order => 'sent_on DESC'
+   has_many :sent_messages, :class_name => "Message", :foreign_key => :from_user_id, :conditions => { :from_user_visible => true }, :order => 'sent_on DESC', :include => [:sender, :recipient]
    has_many :friends, :include => :befriendee, :conditions => "users.status IN ('active', 'confirmed')"
    has_many :friend_users, :through => :friends, :source => :befriendee
    has_many :tokens, :class_name => "UserToken"
    has_many :preferences, :class_name => "UserPreference"
    has_many :changesets, :order => 'created_at DESC'
 +  has_many :note_comments, :foreign_key => :author_id
 +  has_many :notes, :through => :note_comments
  
    has_many :client_applications
    has_many :oauth_tokens, :class_name => "OauthToken", :order => "authorized_at desc", :include => [:client_application]
    end
  
    def is_friends_with?(new_friend)
-     res = false
-     @new_friend = new_friend
-     self.friends.each do |friend|
-       if friend.friend_user_id == @new_friend.id
-         return true
-       end
-     end
-     return false
+     self.friends.where(:friend_user_id => new_friend.id).exists?
    end
  
    ##
diff --combined config/locales/de.yml
index 1aa59411eac5dd1ebf4343665efd25c28832e9c8,31ee8d8454618b03f404a6f39836873cc474d57c..338c8bbf1cc06b5141e7966fcc9ddae174e453a7
@@@ -721,6 -721,8 +721,8 @@@ de
            airfield: Militärflugplatz
            barracks: Kaserne
            bunker: Bunker
+         mountain_pass: 
+           "yes": Gebirgspass
          natural: 
            bay: Bucht
            beach: Strand
        history_disabled_tooltip: Reinzoomen um Änderungen für diesen Bereich anzuzeigen
        history_tooltip: Änderungen für diesen Bereich anzeigen
        history_zoom_alert: Du musst näher heranzoomen, um die Chronik zu sehen
 +    osb:
 +      Fixed Error: Behobener Fehler
 +      Unresolved Error: Offener Fehler
 +      Description: Beschreibung
 +      Comment: Kommentar
 +      Has been fixed: Der Fehler wurde bereits behoben. Es kann jedoch bis zu einigen Tagen dauern, bis die Kartenansicht aktualisiert wird.
 +      Comment/Close: Kommentieren/Schließen
 +      Nickname: Benutzername
 +      Add comment: Kommentar hinzufügen
 +      Mark as fixed: Als behoben markieren
 +      Cancel: Abbrechen
 +      Create OpenStreetBug: OpenStreetBug melden
 +      Create bug: Bug anlegen
 +      Bug description: Fehlerbeschreibung
 +      Create: Anlegeeen
 +      Permalink: Permalink
    layouts: 
      community: Gemeinschaft
      community_blogs: Blogs
        back_to_outbox: Zurück zu Gesendete Nachrichten
        date: Datum
        from: Absender
-       reading_your_messages: Eigene Nachrichten
-       reading_your_sent_messages: Deine versendeten Nachrichten lesen
        reply_button: Antworten
        subject: Betreff
        title: Nachricht lesen
        key: "Schlüssel:"
        requests: "Die Benutzer werden um Folgendes um Erlaubnis gebeten:"
        secret: "Geheimnis:"
-       support_notice: Wir unterstützen HMAC-SHA1 (empfolen) und Reintext im SSL-Modus.
+       support_notice: Wir unterstützen HMAC-SHA1 (empfohlen) und RSA-SHA1-Signaturen.
        title: OAuth-Einzelheiten für %{app_name}
        url: "Tokenanfrage-URL:"
      update: 
diff --combined config/locales/en.yml
index 6207ca61f46ef44b548f1782c7447e74ca4f3764,58a62e52f01760829c87c860da95014741a7bca9..5d3e6bbaeef5b980e7100b4745bdcaaba708084d
@@@ -120,8 -120,6 +120,8 @@@ en
          next_relation_tooltip: "Next relation"
          prev_changeset_tooltip: "Previous changeset"
          next_changeset_tooltip: "Next changeset"
 +        prev_note_tooltip: "Previous note"
 +        next_note_tooltip: "Next note"
      changeset_details:
        created_at: "Created at:"
        closed_at: "Closed at:"
          node: "View node on larger map"
          way: "View way on larger map"
          relation: "View relation on larger map"
 +        note: "View note on larger map"
        edit:
          area: "Edit area"
          node: "Edit node"
          way: "Edit way"
          relation: "Edit relation"
 +        note: "Edit note"
      node_details:
        coordinates: "Coordinates:"
        part_of: "Part of:"
        download_xml: "Download XML"
        view_history: "View history"
      start_rjs:
 +      notes_layer_name: "Browse Notes"
        data_layer_name: "Browse Map Data"
        data_frame_title: "Data"
        zoom_or_select: "Zoom in or select an area of the map to view"
        download_xml: "Download XML"
        view_history: "View history"
        edit: "Edit way"
 +    note:
 +      open_title: "Unresolved issue: %{note_name}"
 +      closed_title: "Resolved issue: %{note_name}"
 +      opened: "Opened:"
 +      last_modified: "Last modified:"
 +      closed: "Closed:"
 +      at_html: "%{when} ago"
 +      at_by_html: "%{when} ago by %{user}"
 +      description: "Description:"
 +      comments: "Comments:"
    changeset:
      changeset_paging_nav:
        showing_page: "Page %{page}"
            airfield: "Military Airfield"
            barracks: "Barracks"
            bunker: "Bunker"
+         mountain_pass:
+           "yes" : "Mountain Pass"
          natural:
            bay: "Bay"
            beach: "Beach"
        greeting: "Hi,"
        hopefully_you: "Someone (possibly you) has asked for the password to be reset on this email address's openstreetmap.org account."
        click_the_link: "If this is you, please click the link below to reset your password."
 +    note_comment_notification:
 +      anonymous: An anonymous user
 +      subject_own: "[OpenStreetMap] %{commenter} has commented on one of your notes"
 +      subject_other: "[OpenStreetMap] %{commenter} has commented on a note you are interested in"
 +      greeting: "Hi,"
 +      your_note: "%{commenter} has left a comment on one of your map notes near %{place}."
 +      commented_note: "%{commenter} has left a comment on a map note you have commented on. The note is near %{place}."
 +      details: "More details about the note can be found at %{url}."
    message:
      inbox:
        title: "Inbox"
        js_2: "OpenStreetMap uses JavaScript for its slippy map."
        permalink: Permalink
        shortlink: Shortlink
 +      createnote: Add a note
        license:
          copyright: "Copyright OpenStreetMap and contributors, under an open license"
          license_url: "http://openstreetmap.org/copyright"
        url: "Request Token URL:"
        access_url: "Access Token URL:"
        authorize_url: "Authorise URL:"
-       support_notice: "We support HMAC-SHA1 (recommended) as well as plain text in SSL mode."
+       support_notice: "We support HMAC-SHA1 (recommended) and RSA-SHA1 signatures."
        edit: "Edit Details"
        delete: "Delete Client"
        confirm: "Are you sure?"
        new diary entry: new diary entry
        my edits: my edits
        my traces: my traces
 +      my notes: my map notes
        my settings: my settings
        my comments: my comments
        oauth settings: oauth settings
        diary: diary
        edits: edits
        traces: traces
 +      notes: map notes
        remove as friend: unfriend
        add as friend: add friend
        mapper since: "Mapper since:"
        back: "View all blocks"
        revoker: "Revoker:"
        needs_view: "The user needs to log in before this block will be cleared."
 +  note:
 +    description:
 +      opened_at: "Created %{when} ago"
 +      opened_at_by: "Created %{when} ago by %{user}"
 +      commented_at: "Updated %{when} ago"
 +      commented_at_by: "Updated %{when} ago by %{user}"
 +      closed_at: "Resolved %{when} ago"
 +      closed_at_by: "Resolved %{when} ago by %{user}"
 +      reopened_at: "Reactivated %{when} ago"
 +      reopened_at_by: "Reactivated %{when} ago by %{user}"
 +    rss:
 +      title: "OpenStreetMap Notes"
 +      description_area: "A list of notes, reported, commented on or closed in your area [(%{min_lat}|%{min_lon}) -- (%{max_lat}|%{max_lon})]"
 +      description_item: "An rss feed for note %{id}"
 +      closed: "closed note (near %{place})"
 +      new: "new note (near %{place})"
 +      comment: "new comment (near %{place})"
 +    mine:
 +      title: "Notes submitted or commented on by %{user}"
 +      heading: "%{user}'s notes"
 +      subheading: "Notes submitted or commented on by %{user}"
 +      id: "Id"
 +      creator: "Creator"
 +      description: "Description"
 +      created_at: "Created at"
 +      last_changed: "Last changed"
 +      ago_html: "%{when} ago"
    javascripts:
      map:
        base:
        history_tooltip: View edits for this area
        history_disabled_tooltip: Zoom in to view edits for this area
        history_zoom_alert: You must zoom in to view edits for this area
 +      createnote_tooltip: Add a note to the map
 +      createnote_disabled_tooltip: Zoom in to add a note to the map
 +      createnote_zoom_alert: You must zoom in to add a note to the map
 +    notes:
 +      new:
 +        intro: "In order to improve the map the information you enter is shown to other mappers, so please be as descriptive and precise as possible when moving the marker to the correct position and entering your note below."
 +        add: Add Note
 +      show:
 +        title: Note %{id}
 +        anonymous_warning: This note includes comments from anonymous users which should be independently verified.
 +        opened_by: "created by <a href='%{user_url}'>%{user}</a> at %{time}"
 +        opened_by_anonymous: "created by anonymous at %{time}"
 +        commented_by: "comment from <a href='%{user_url}'>%{user}</a> at %{time}"
 +        commented_by_anonymous: "comment from anonymous at %{time}"
 +        closed_by: "resolved by <a href='%{user_url}'>%{user}</a> at %{time}"
 +        closed_by_anonymous: "resolved by anonymous at %{time}"
 +        reopened_by: "reactivated by <a href='%{user_url}'>%{user}</a> at %{time}"
 +        reopened_by_anonymous: "reactivated by anonymous at %{time}"
 +        resolve: Resolve
 +        comment_and_resolve: Comment & Resolve
 +        comment: Comment
    redaction:
      edit:
        description: "Description"