From 34c0c3c89f3aeda6c142f34f63262cdb11edfabc Mon Sep 17 00:00:00 2001 From: Otacon Date: Sat, 18 Sep 2010 18:30:00 +0800 Subject: [PATCH 01/79] Added italian translation (it) --- config/locales/devise.it.yml | 41 ++++++++++++++++++++++++++++++++++++ config/locales/it.yml | 10 +++++++++ 2 files changed, 51 insertions(+) create mode 100644 config/locales/devise.it.yml create mode 100644 config/locales/it.yml diff --git a/config/locales/devise.it.yml b/config/locales/devise.it.yml new file mode 100644 index 000000000..08b255546 --- /dev/null +++ b/config/locales/devise.it.yml @@ -0,0 +1,41 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +it: + errors: + messages: + not_found: "non trovato" + already_confirmed: "è già stato confermato" + not_locked: "non era bloccato" + + devise: + failure: + unauthenticated: 'Devi effettuare l'accesso o registrarci prima di continuare.' + unconfirmed: 'Devi confermare il tuo account prima di continuare.' + locked: 'Il tuo account è bloccato.' + invalid: 'Email o password errati.' + invalid_token: 'Token di autenticazione errato.' + timeout: 'La tua sessione è scaduta, effettua di nuovo l'accesso per continuare.' + inactive: 'Il tuo account non è ancora stato attivato.' + sessions: + signed_in: 'Accesso effettuato con successo.' + signed_out: 'Disconnessione effettuata con successo.' + passwords: + send_instructions: 'Tra pochi minuti riceverai una email con le istruzioni su come cambiare la tua password.' + updated: 'La tua password è stata modificata. Hai appena effettuato l'accesso.' + confirmations: + send_instructions: 'Tra pochi minuti riceverai una email per confermare il tuo account.' + confirmed: 'Il tuo account è stato confermato con successo. Hai appena effettuato l'accesso.' + registrations: + signed_up: 'Ti sei iscritto. Se il servizio è disponibile, riceverai una conferma via email.' + updated: 'Hai aggiornato il tuo account.' + destroyed: 'Ciao!Il tuo account è stato rimosso. Speriamo che tu torni a trovarci presto.' + unlocks: + send_instructions: 'Tra pochi minuti riceverai una mail con le istruzioni su come sbloccare il tuo account.' + unlocked: 'Il tuo account è stato sbloccato. Hai appena effettuato l'accesso.' + mailer: + confirmation_instructions: 'Istruzioni sulla conferma' + reset_password_instructions: 'Istruzioni su come cambiare la password' + unlock_instructions: 'Istruzione su come sbloccare l'accont' diff --git a/config/locales/it.yml b/config/locales/it.yml new file mode 100644 index 000000000..1da349bf9 --- /dev/null +++ b/config/locales/it.yml @@ -0,0 +1,10 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +# Sample localization file for Italian. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +it: + hello: "Ciao mondo!" From f034b180c2247ded4171eb81896b4fa001b409ff Mon Sep 17 00:00:00 2001 From: danielvincent Date: Sat, 18 Sep 2010 15:36:42 -0700 Subject: [PATCH 02/79] quotation fix in italian locale --- config/locales/devise.it.yml | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/config/locales/devise.it.yml b/config/locales/devise.it.yml index 08b255546..75b90affc 100644 --- a/config/locales/devise.it.yml +++ b/config/locales/devise.it.yml @@ -12,30 +12,30 @@ it: devise: failure: - unauthenticated: 'Devi effettuare l'accesso o registrarci prima di continuare.' - unconfirmed: 'Devi confermare il tuo account prima di continuare.' - locked: 'Il tuo account è bloccato.' - invalid: 'Email o password errati.' - invalid_token: 'Token di autenticazione errato.' - timeout: 'La tua sessione è scaduta, effettua di nuovo l'accesso per continuare.' - inactive: 'Il tuo account non è ancora stato attivato.' + unauthenticated: "Devi effettuare l'accesso o registrarci prima di continuare." + unconfirmed: "Devi confermare il tuo account prima di continuare." + locked: "Il tuo account è bloccato." + invalid: "Email o password errati." + invalid_token: "Token di autenticazione errato." + timeout: "La tua sessione è scaduta, effettua di nuovo l'accesso per continuare." + inactive: "Il tuo account non è ancora stato attivato." sessions: - signed_in: 'Accesso effettuato con successo.' - signed_out: 'Disconnessione effettuata con successo.' + signed_in: "Accesso effettuato con successo." + signed_out: "Disconnessione effettuata con successo." passwords: - send_instructions: 'Tra pochi minuti riceverai una email con le istruzioni su come cambiare la tua password.' - updated: 'La tua password è stata modificata. Hai appena effettuato l'accesso.' + send_instructions: "Tra pochi minuti riceverai una email con le istruzioni su come cambiare la tua password." + updated: "La tua password è stata modificata. Hai appena effettuato l'accesso." confirmations: - send_instructions: 'Tra pochi minuti riceverai una email per confermare il tuo account.' - confirmed: 'Il tuo account è stato confermato con successo. Hai appena effettuato l'accesso.' + send_instructions: "Tra pochi minuti riceverai una email per confermare il tuo account." + confirmed: "Il tuo account è stato confermato con successo. Hai appena effettuato l'accesso." registrations: - signed_up: 'Ti sei iscritto. Se il servizio è disponibile, riceverai una conferma via email.' - updated: 'Hai aggiornato il tuo account.' - destroyed: 'Ciao!Il tuo account è stato rimosso. Speriamo che tu torni a trovarci presto.' + signed_up: "Ti sei iscritto. Se il servizio è disponibile, riceverai una conferma via email." + updated: "Hai aggiornato il tuo account." + destroyed: "Ciao!Il tuo account è stato rimosso. Speriamo che tu torni a trovarci presto." unlocks: - send_instructions: 'Tra pochi minuti riceverai una mail con le istruzioni su come sbloccare il tuo account.' - unlocked: 'Il tuo account è stato sbloccato. Hai appena effettuato l'accesso.' + send_instructions: "Tra pochi minuti riceverai una mail con le istruzioni su come sbloccare il tuo account." + unlocked: "Il tuo account è stato sbloccato. Hai appena effettuato l'accesso." mailer: - confirmation_instructions: 'Istruzioni sulla conferma' - reset_password_instructions: 'Istruzioni su come cambiare la password' - unlock_instructions: 'Istruzione su come sbloccare l'accont' + confirmation_instructions: "Istruzioni sulla conferma" + reset_password_instructions: "Istruzioni su come cambiare la password" + unlock_instructions: "Istruzione su come sbloccare l'account" From 6cf5f6c8c7f1d46197e89f4dd79b3f51db9eed40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=99Jarkko?= <’jm60697@gmail.com’> Date: Sat, 18 Sep 2010 19:37:09 +0800 Subject: [PATCH 03/79] Finnish locales --- config/locales/devise.fi.yml | 41 ++++++++++++++++++++++++++++++++++++ config/locales/fi.yml | 10 +++++++++ 2 files changed, 51 insertions(+) create mode 100644 config/locales/devise.fi.yml create mode 100644 config/locales/fi.yml diff --git a/config/locales/devise.fi.yml b/config/locales/devise.fi.yml new file mode 100644 index 000000000..591341501 --- /dev/null +++ b/config/locales/devise.fi.yml @@ -0,0 +1,41 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. +# Translator: jarkko moilanen, jm60697@gmail.com + +fi: + errors: + messages: + not_found: "ei löytynyt" + already_confirmed: "oli jo varmistettu" + not_locked: "ei ollut lukittu" + + devise: + failure: + unauthenticated: 'Kirjaudu tai rekisteröidy ennen kuin voit jatkaa.' + unconfirmed: 'Sinun pitää vahvistaa käyttäjätilisi ennen kuin voit jatkaa' + locked: 'Käyttäjätilisi on lukittu.' + invalid: 'Väärä sähköpostiosoite tai salasana.' + invalid_token: 'Viallinen todennus.' + timeout: 'Istunto on vanhentunut, kirjaudu uudelleen.' + inactive: 'Käyttätiliäsi ei ole vielä vahvistettu.' + sessions: + signed_in: 'Sisäänkirjautuminen onnistui.' + signed_out: 'Uoskirjautuminen onnistui.' + passwords: + send_instructions: 'Saat hetken päästä sähköpostiisi ohjeet siitä miten asetat salasanasi uudelleen. + updated: 'Salasanasi on vaihdettu. Olet nyt kirjautunut sisään.' + confirmations: + send_instructions: 'Saat hetken päästä sähköpostiisi ohjeet siitä miten vahvistat käyttäjätilisi luonnin.' + confirmed: 'Käyttäjätilisi luonti on vahvistettu. Olet nyt kirjautunut sisään.' + registrations: + signed_up: 'Käyttäjätilin luominen onnistui. Mahdollinen vahvistuspyyntö on lähetetty sähköpostiisi.' + updated: 'Käyttäjätilisi on päivitetty.' + destroyed: 'Näkemiin! Käyttäjätilisi on poistettu. Toivottavasti näemme sinut pian uudelleen.' + unlocks: + send_instructions: 'Saat muutaman minuutin kuluttua sähköpostiisi ohjeet siitä miten avaat lukituksen.' + unlocked: 'Käyttäjätilisi lukitus on avattu. Olet nyt kirjautunut sisään.' + mailer: + confirmation_instructions: 'Ohjeet vahvistamiseen/todentamiseen' + reset_password_instructions: 'Ohjeet salananan uudelleenasettamiseksi' + unlock_instructions: 'Ohjeet lukituksen poistamiseksi' diff --git a/config/locales/fi.yml b/config/locales/fi.yml new file mode 100644 index 000000000..5e1a6da32 --- /dev/null +++ b/config/locales/fi.yml @@ -0,0 +1,10 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. +# Translator jarkko moilanen, jm60697@gmail.com + +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +fi: + hello: "Terve, maailma" From ac09f48cf86cd2bb3ab07f1e4f24b56b3ce112d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danillo=20C=C3=A9sar?= Date: Sun, 19 Sep 2010 00:53:39 +0800 Subject: [PATCH 04/79] Added locales files for portuguese brazilian. --- config/locales/devise.pt-BR.yml | 41 +++++++++++++++++++++++++++++++++ config/locales/pt-BR.yml | 10 ++++++++ 2 files changed, 51 insertions(+) create mode 100644 config/locales/devise.pt-BR.yml create mode 100644 config/locales/pt-BR.yml diff --git a/config/locales/devise.pt-BR.yml b/config/locales/devise.pt-BR.yml new file mode 100644 index 000000000..ba2b3b5de --- /dev/null +++ b/config/locales/devise.pt-BR.yml @@ -0,0 +1,41 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +pt-BR: + errors: + messages: + not_found: "não encontrado" + already_confirmed: "já foi confirmado" + not_locked: "não foi bloqueado" + + devise: + failure: + unauthenticated: 'Você precisa fazer login ou se cadastrar antes de continuar.' + unconfirmed: 'Você tem que confirmar a sua conta antes de continuar.' + locked: 'Sua conta está bloqueada.' + invalid: 'E-mail ou senha inválida.' + invalid_token: 'Token de autenticação inválida.' + timeout: 'Sua sessão expirou, por favor logue-se novamente para continuar.' + inactive: 'Sua conta ainda não foi ativada.' + sessions: + signed_in: 'Você entrou com sucesso.' + signed_out: 'Você saiu com sucesso.' + passwords: + send_instructions: 'Você receberá um email com instruções sobre como redefinir sua senha em alguns minutos.' + updated: 'Sua senha foi alterada com sucesso.' + confirmations: + send_instructions: 'Você receberá um email em alguns minutos com as instruções sobre como confirmar a sua conta.' + confirmed: 'Sua conta foi confirmada com sucesso. Você já pode continuar navegando.' + registrations: + signed_up: 'Você se inscreveu com êxito. Se habilitado, a confirmação foi enviada para seu e-mail.' + updated: 'Você atualizou a sua conta com sucesso.' + destroyed: 'Sua conta foi cancelada com sucesso. Esperamos vê-lo novamente em breve.' + unlocks: + send_instructions: 'Você receberá um email em alguns minutos com as instruções sobre como desbloquear a sua conta.' + unlocked: 'Sua conta foi desbloqueada com sucesso. Você já pode continuar navegando.' + mailer: + confirmation_instructions: 'Instruções para confirmarção' + reset_password_instructions: 'Instruções para redefinir a senha' + unlock_instructions: 'Instruções para o desbloqueio' diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml new file mode 100644 index 000000000..67c077090 --- /dev/null +++ b/config/locales/pt-BR.yml @@ -0,0 +1,10 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +# Sample localization file for Portuguese Brazilian. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +pt-BR: + hello: "Olá Mundo" From 2efde8a841c65ae26559047525a31b8449221a3f Mon Sep 17 00:00:00 2001 From: danielvincent Date: Sat, 18 Sep 2010 15:50:35 -0700 Subject: [PATCH 05/79] added missing quote in finnish locale --- config/locales/devise.fi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/devise.fi.yml b/config/locales/devise.fi.yml index 591341501..4ee6761f8 100644 --- a/config/locales/devise.fi.yml +++ b/config/locales/devise.fi.yml @@ -23,7 +23,7 @@ fi: signed_in: 'Sisäänkirjautuminen onnistui.' signed_out: 'Uoskirjautuminen onnistui.' passwords: - send_instructions: 'Saat hetken päästä sähköpostiisi ohjeet siitä miten asetat salasanasi uudelleen. + send_instructions: 'Saat hetken päästä sähköpostiisi ohjeet siitä miten asetat salasanasi uudelleen.' updated: 'Salasanasi on vaihdettu. Olet nyt kirjautunut sisään.' confirmations: send_instructions: 'Saat hetken päästä sähköpostiisi ohjeet siitä miten vahvistat käyttäjätilisi luonnin.' From e9a3f46fbda8fcb749535103a07da0c63ba46221 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Sat, 18 Sep 2010 16:42:07 -0700 Subject: [PATCH 06/79] fixed query function to go through mongomapper instead of custom --- app/models/person.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/models/person.rb b/app/models/person.rb index 1e2a7b18d..aac7b23ae 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -34,11 +34,8 @@ class Person validates_format_of :url, :with => /^(https?):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\.[a-z]{2,5})?(:[0-9]{1,5})?(\/.*)?$/ix - def self.search(query) - Person.all('$where' => "function() { return this.diaspora_handle.match(/^#{query}/i) || - this.profile.first_name.match(/^#{query}/i) || - this.profile.last_name.match(/^#{query}/i); }") + Person.all('profile.first_name' => /^#{query}/) | Person.all('profile.last_name' => /^#{query}/) end def real_name From 08f833ba7a5c276668ac5f44ffe3db536bb3ce78 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Sat, 18 Sep 2010 17:21:18 -0700 Subject: [PATCH 07/79] case insensitivity on search --- app/models/person.rb | 2 +- spec/models/person_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/person.rb b/app/models/person.rb index aac7b23ae..b1e7e3745 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -35,7 +35,7 @@ class Person /^(https?):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\.[a-z]{2,5})?(:[0-9]{1,5})?(\/.*)?$/ix def self.search(query) - Person.all('profile.first_name' => /^#{query}/) | Person.all('profile.last_name' => /^#{query}/) + Person.all('profile.first_name' => /^#{query}/i) | Person.all('profile.last_name' => /^#{query}/i) end def real_name diff --git a/spec/models/person_spec.rb b/spec/models/person_spec.rb index bffe37f85..4f236b733 100644 --- a/spec/models/person_spec.rb +++ b/spec/models/person_spec.rb @@ -134,13 +134,13 @@ describe Person do people.include?(@friend_three).should == false people.include?(@friend_four).should == false - people = Person.search("Wei") + people = Person.search("wEi") people.include?(@friend_two).should == true people.include?(@friend_one).should == false people.include?(@friend_three).should == false people.include?(@friend_four).should == false - people = Person.search("Gri") + people = Person.search("gri") people.include?(@friend_one).should == true people.include?(@friend_four).should == true people.include?(@friend_two).should == false From b5a29713027a1810234a0df4b1440baa618af64b Mon Sep 17 00:00:00 2001 From: danielvincent Date: Sat, 18 Sep 2010 17:49:52 -0700 Subject: [PATCH 08/79] search results for people now look like the stream --- app/views/people/_person.html.haml | 26 +++++++++++++++ app/views/people/index.html.haml | 42 +++++------------------- public/stylesheets/application.css | 2 ++ public/stylesheets/sass/application.sass | 3 ++ 4 files changed, 39 insertions(+), 34 deletions(-) create mode 100644 app/views/people/_person.html.haml diff --git a/app/views/people/_person.html.haml b/app/views/people/_person.html.haml new file mode 100644 index 000000000..ef1c69d28 --- /dev/null +++ b/app/views/people/_person.html.haml @@ -0,0 +1,26 @@ +-# Copyright (c) 2010, Diaspora Inc. This file is +-# licensed under the Affero General Public License version 3. See +-# the COPYRIGHT file. + + +%li.message{:id => person.id} + + = person_image_link(person) + + .content + %span.from + = link_to person.real_name, person + + .info + = person.diaspora_handle + + .right{ :style => "display:inline;top:0;" } + - if person.id == current_user.person.id + thats you! + - elsif current_user.pending_requests.find_by_person_id(person.id) + = link_to "pending request", aspects_manage_path + - else + = form_for Request.new do |f| + = f.select(:aspect_id, @aspects_dropdown_array) + = f.hidden_field :destination_url, :value => person.diaspora_handle + = f.submit "add friend" diff --git a/app/views/people/index.html.haml b/app/views/people/index.html.haml index c18ec5d0a..f80a80f3e 100644 --- a/app/views/people/index.html.haml +++ b/app/views/people/index.html.haml @@ -14,38 +14,12 @@ - content_for :left_pane do \. -= (@people.count).to_s + search_or_index -%table - %tr - %th real name - %th diaspora handle - %th url - - for person in @people - %tr - - if current_user.friends.include? person - %td= link_to person.real_name, person - - else - %td= person.real_name +%h1 + search results for + %u= params[:q] - %td= person.diaspora_handle - %td= person.url - - -if current_user.friends.include? person - - - elsif person.id == current_user.person.id - %td - %td that's you! - -elsif current_user.pending_requests.find_by_person_id(person.id) - %td - %td ^-you have a friend request from this person - -elsif current_user.pending_requests.find_by_url(person.receive_url) - %td - %td friend request pending - -else - %td - %td - = form_for Request.new do |f| - = f.select(:aspect_id, @aspects_dropdown_array) - = f.hidden_field :destination_url, :value => person.diaspora_handle - = f.submit "add friend" - = will_paginate @people +%ul#stream + - for person in @people + = render 'people/person', :person => person + += will_paginate @people diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index c6282b1b8..3fb38e98c 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -145,6 +145,8 @@ ul#stream { border-bottom: 1px solid #eeeeee; } ul#stream > li:first-child { padding-top: 0; } + ul#stream .right { + top: 0; } li.message { position: relative; diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 206c122bd..9f9158741 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -186,6 +186,9 @@ ul#stream :padding :top 0 + .right + :top 0 + li.message :position relative :line-height 140% From cc4e9f8d3939ff427752074c481024c4cb4bd28c Mon Sep 17 00:00:00 2001 From: danielvincent Date: Sat, 18 Sep 2010 17:56:26 -0700 Subject: [PATCH 09/79] description text for all boxes in manage page. search box text defaults to query on people#index. --- app/views/aspects/manage.html.haml | 14 +++++++++----- app/views/people/index.html.haml | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/views/aspects/manage.html.haml b/app/views/aspects/manage.html.haml index 667196b85..c579671e1 100644 --- a/app/views/aspects/manage.html.haml +++ b/app/views/aspects/manage.html.haml @@ -13,16 +13,20 @@ .requests %ul.dropzone - - for request in @remote_requests - %li.requested_person{:id => request.person.id, :request_id => request.id} - = person_image_tag(request.person) - .name - = request.person.real_name + - if @remote_requests.size < 1 + %li.grey No new requests + - else + - for request in @remote_requests + %li.requested_person{:id => request.person.id, :request_id => request.id} + = person_image_tag(request.person) + .name + = request.person.real_name %h1 Ignore/Remove %li.remove %ul.dropzone + %li.grey Drag to ignore/remove - content_for :publish do = link_to("add a new aspect", "#add_aspect_pane", :id => "add_aspect_button", :class => "new_aspect button", :title => "Add a new aspect") diff --git a/app/views/people/index.html.haml b/app/views/people/index.html.haml index f80a80f3e..2cd1dc4a7 100644 --- a/app/views/people/index.html.haml +++ b/app/views/people/index.html.haml @@ -8,7 +8,7 @@ Search =form_tag '/people', :method => "get" do - = text_field_tag :q + = text_field_tag :q, params[:q] = submit_tag "search" - content_for :left_pane do From 5740c72804cb57879436bdf5c2917a5df12f660a Mon Sep 17 00:00:00 2001 From: MrZYX Date: Sat, 18 Sep 2010 17:27:13 +0800 Subject: [PATCH 10/79] made websocket server host configurable --- config/app_config.yml | 3 +++ script/websocket_server.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/app_config.yml b/config/app_config.yml index a138424ee..354dc75b2 100644 --- a/config/app_config.yml +++ b/config/app_config.yml @@ -7,6 +7,7 @@ development: debug: false socket_debug : false + socket_host: 0.0.0.0 socket_port: 8080 socket_collection_name: 'websocket' pubsub_server: 'https://pubsubhubbub.appspot.com/' @@ -14,11 +15,13 @@ development: test: debug: false socket_debug : false + socket_host: 0.0.0.0 socket_port: 8081 pubsub_server: 'https://pubsubhubbub.appspot.com/' production: debug: false socket_debug : false + socket_host: 0.0.0.0 socket_port: 8080 pubsub_server: 'https://pubsubhubbub.appspot.com/' diff --git a/script/websocket_server.rb b/script/websocket_server.rb index 2fbc1370a..dae054f15 100644 --- a/script/websocket_server.rb +++ b/script/websocket_server.rb @@ -24,7 +24,7 @@ begin Diaspora::WebSocket.initialize_channels EventMachine::WebSocket.start( - :host => "0.0.0.0", + :host => APP_CONFIG[:socket_host], :port => APP_CONFIG[:socket_port], :debug =>APP_CONFIG[:socket_debug]) do |ws| ws.onopen { From 7c62a5adf777361ddf4bfde47d5dfa5dad6de2f7 Mon Sep 17 00:00:00 2001 From: MrZYX Date: Sun, 19 Sep 2010 00:29:56 +0800 Subject: [PATCH 11/79] fixed drag & drop on aspect manage page --- public/javascripts/aspect-edit.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/javascripts/aspect-edit.js b/public/javascripts/aspect-edit.js index c7061797d..e07877cb7 100644 --- a/public/javascripts/aspect-edit.js +++ b/public/javascripts/aspect-edit.js @@ -42,14 +42,14 @@ $(function() { }); - $("ul .person .requested_person").draggable({ + // Multiple classes here won't work + $("ul .person").draggable({ revert: true }); - // Moved class to logic above - unnec duplicate logic - //$("ul .requested_person").draggable({ - // revert: true - //}); + $("ul .requested_person").draggable({ + revert: true + }); $(".aspect ul").droppable({ hoverClass: 'active', From c34e4caafa27ffc724499363bc17ca31ab551cee Mon Sep 17 00:00:00 2001 From: kook Date: Sat, 18 Sep 2010 23:52:49 +0800 Subject: [PATCH 12/79] czech translation --- config/locales/cs.yml | 10 +++++++++ config/locales/devise.cs.yml | 41 ++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 config/locales/cs.yml create mode 100644 config/locales/devise.cs.yml diff --git a/config/locales/cs.yml b/config/locales/cs.yml new file mode 100644 index 000000000..91c904dc1 --- /dev/null +++ b/config/locales/cs.yml @@ -0,0 +1,10 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +# Sample localization file for Lithuanian. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +cs: + hello: "Dobrý Den" diff --git a/config/locales/devise.cs.yml b/config/locales/devise.cs.yml new file mode 100644 index 000000000..a8ca9ae84 --- /dev/null +++ b/config/locales/devise.cs.yml @@ -0,0 +1,41 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +en: + errors: + messages: + not_found: "nenalezeno" + already_confirmed: "již bylo potvrzeno" + not_locked: "nebylo zamčeno" + + devise: + failure: + unauthenticated: 'Pro pokračování se musíte přihlásit nebo si vytvořit účet.' + unconfirmed: 'Před pokračováním musíte potvrdit svůj účet.' + locked: 'Váš účet je uzamčen.' + invalid: 'Neplatný email nebo heslo.' + invalid_token: 'Neplatný autentizační token.' + timeout: 'Vaše sezení vypršelo, pro pokračování se prosím přihlašte znovu.' + inactive: 'Váš účet ještě nebyl aktivován.' + sessions: + signed_in: 'Přihlášení proběhlo úspěšně.' + signed_out: 'Odhlášení proběhlo úspěšně.' + passwords: + send_instructions: 'Běhěm několika minut obdržíte email s instrukcemi k resetnutí hesla.' + updated: 'Vaše heslo bylo úspěšně změněno. Nyní jste přihlášeni' + confirmations: + send_instructions: 'Během několika minut obdržíte email s instrukcemi k potvrzení vašeho účtu.' + confirmed: 'Váš účet byl uspěšně potvrzen. Nyní jste přihlášeni.' + registrations: + signed_up: 'Úspěšně jste vytvořili účet. Pokud je tak server nastaven, byl vám zaslán potvrzovací email.' + updated: 'Úspěšně jste upravili svůj účet.' + destroyed: 'Sbohem! Váš účet byl úspěšně zrušen. Brzy naviděnou.' + unlocks: + send_instructions: 'Během několika minut obdržíte email s instrukcemi k odemknutí vašeho účtu.' + unlocked: 'Váš účet byl úspěšně odemknut. Nyní jste přihlášeni.' + mailer: + confirmation_instructions: 'Instrukce k potvrzení' + reset_password_instructions: 'Instrukce k resetnutí hesla' + unlock_instructions: 'Instrukce k odemčení' From 6c6c7be1e50aedf3aa1e2a24082d994bf9e61566 Mon Sep 17 00:00:00 2001 From: kook Date: Sat, 18 Sep 2010 23:54:25 +0800 Subject: [PATCH 13/79] oopsie --- config/locales/devise.cs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/devise.cs.yml b/config/locales/devise.cs.yml index a8ca9ae84..34d9eb7c1 100644 --- a/config/locales/devise.cs.yml +++ b/config/locales/devise.cs.yml @@ -3,7 +3,7 @@ # the COPYRIGHT file. -en: +cs: errors: messages: not_found: "nenalezeno" From 230865aaa29c1ed08a43c676ac790f9be9ff7bec Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Sun, 19 Sep 2010 11:05:31 +0800 Subject: [PATCH 14/79] Added Portuguese Portugal locale --- config/locales/devise.pt-PT.yml | 41 +++++++++++++++++++++++++++++++++ config/locales/pt-PT.yml | 10 ++++++++ 2 files changed, 51 insertions(+) create mode 100644 config/locales/devise.pt-PT.yml create mode 100644 config/locales/pt-PT.yml diff --git a/config/locales/devise.pt-PT.yml b/config/locales/devise.pt-PT.yml new file mode 100644 index 000000000..cf16fd20d --- /dev/null +++ b/config/locales/devise.pt-PT.yml @@ -0,0 +1,41 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +pt-PT: + errors: + messages: + not_found: "não foi encontrado" + already_confirmed: "já foi confirmado" + not_locked: "não foi bloqueado" + + devise: + failure: + unauthenticated: 'Faça login ou registre-se antes de continuar.' + unconfirmed: 'Confirme a sua conta antes de continuar.' + locked: 'A sua conta foi bloqueada.' + invalid: 'Endereço de correio ou senha inválida.' + invalid_token: 'Token de autenticação inválido.' + timeout: 'A sua sessão expirou, por favor faça login novamente para continuar.' + inactive: 'A sua conta ainda não foi activada.' + sessions: + signed_in: 'Login com sucesso.' + signed_out: 'Logout com sucesso.' + passwords: + send_instructions: 'Vai receber um email com instruções sobre como alterar a sua senha dentro de alguns minutos.' + updated: 'A sua senha foi alterada com sucesso. Está on-line.' + confirmations: + send_instructions: 'Vai receber um email com instruções sobre como confirmar a sua conta dentro de alguns minutos.' + confirmed: 'A sua conta foi confirmada com sucesso. Está on-line.' + registrations: + signed_up: 'Registou-se com sucesso. Se ligado, a confirmação foi enviada para o seu email.' + updated: 'Actualizou a sua conta com sucesso.' + destroyed: 'Adeus! A sua conta foi cancelada com sucesso. Esperamos vê-lo de novo brevemente.' + unlocks: + send_instructions: 'Vai receber uma mensagem sobre como desbloquear a sua conta dentro de alguns minutos.' + unlocked: 'A sua conta foi desbloqueada com sucesso. Está on-line.' + mailer: + confirmation_instructions: 'Instruções de confirmação' + reset_password_instructions: 'Instruções para alterar a sua senha' + unlock_instructions: 'Instruções para desbloquear' diff --git a/config/locales/pt-PT.yml b/config/locales/pt-PT.yml new file mode 100644 index 000000000..ce3d9abbc --- /dev/null +++ b/config/locales/pt-PT.yml @@ -0,0 +1,10 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +# Sample localization file for Portuguese Portugal. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +pt-PT: + hello: "Olá mundo" From b40b81e447d13166c5e2ed79c6ac5435300f255b Mon Sep 17 00:00:00 2001 From: danielvincent Date: Sun, 19 Sep 2010 10:11:41 -0700 Subject: [PATCH 15/79] aspect manage tab now reads 'manage aspects' --- app/views/shared/_aspect_nav.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_aspect_nav.haml b/app/views/shared/_aspect_nav.haml index b61def9f5..ed3fe6f8f 100644 --- a/app/views/shared/_aspect_nav.haml +++ b/app/views/shared/_aspect_nav.haml @@ -14,7 +14,7 @@ = link_to "All Aspects", root_url %li{ :style => "margin-right:0;", :class => ("selected" if @aspect == :manage)} - = link_to ( (@request_count == 0)? "manage" : "manage (#{@request_count})"), {:controller => :aspects, :action => :manage}, :class => "edit_aspect_button", :class => new_request(@request_count), :title => "Manage your Aspects" + = link_to ( (@request_count == 0)? "Manage Aspects" : "Manage Aspects (#{@request_count})"), {:controller => :aspects, :action => :manage}, :class => "edit_aspect_button", :class => new_request(@request_count), :title => "Manage your Aspects" .yo{ :style => "display:none;"} #add_aspect_pane From 14ad24ba7e57a3742e73f98a65cb334ec76ae4f1 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Sun, 19 Sep 2010 14:27:20 -0700 Subject: [PATCH 16/79] visual tweaks on header. moved upload a file button to header on album#show --- app/helpers/application_helper.rb | 2 +- app/views/albums/show.html.haml | 10 +++---- .../status_messages/_status_message.html.haml | 3 +- public/javascripts/stream.js | 8 ----- public/stylesheets/application.css | 20 +++++++++---- public/stylesheets/sass/application.sass | 29 ++++++++++++++----- 6 files changed, 43 insertions(+), 29 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f2a0a95fd..75a13dc6b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -28,7 +28,7 @@ module ApplicationHelper end def how_long_ago(obj) - "#{time_ago_in_words(obj.created_at)} ago." + "#{time_ago_in_words(obj.created_at)} ago" end def person_url(person) diff --git a/app/views/albums/show.html.haml b/app/views/albums/show.html.haml index 843523223..3c71cede1 100644 --- a/app/views/albums/show.html.haml +++ b/app/views/albums/show.html.haml @@ -17,11 +17,16 @@ = render "shared/aspect_friends" - content_for :publish do + -if current_user.owns? @album + .right + =render 'photos/new_photo' + = link_to 'Edit Album', edit_album_path(@album), :class => 'button' %h1 = @album.name ="updated #{how_long_ago(@album)}" + .album_id{:id => @album.id, :style => "display:hidden;"} -unless current_user.owns? @album @@ -31,13 +36,8 @@ - for photo in @album_photos .image_thumb = link_to (image_tag photo.url(:thumb_medium)), object_path(photo) - -if current_user.owns? @album - =render 'photos/new_photo' #content_bottom .back = link_to "⇧ albums", albums_path - -if current_user.owns? @album - .right - = link_to 'Edit Album', edit_album_path(@album), :class => 'button' diff --git a/app/views/status_messages/_status_message.html.haml b/app/views/status_messages/_status_message.html.haml index a22098afa..396f143a7 100644 --- a/app/views/status_messages/_status_message.html.haml +++ b/app/views/status_messages/_status_message.html.haml @@ -13,13 +13,12 @@ = auto_link sanitize post.message .info - = link_to(how_long_ago(post), object_path(post)) + %span.time= link_to(how_long_ago(post), object_path(post)) \-- = link_to "show comments (#{post.comments.count})", '#', :class => "show_post_comments" = render "comments/comments", :post => post - - if current_user.owns?(post) .destroy_link = link_to 'Delete', status_message_path(post), :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "delete" diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index cf0856754..e8db10abd 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -14,14 +14,6 @@ $(document).ready(function(){ }); });//end document ready -$("#stream li").live('mouseover',function() { - $(this).children(".destroy_link").fadeIn(0); -}); - -$("#stream li").live('mouseout',function() { - $(this).children(".destroy_link").fadeOut(0); -}); - $(".show_post_comments").live('click', function(event) { event.preventDefault(); diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 3fb38e98c..9a06eab4c 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -118,7 +118,6 @@ header { header #session_action ul li:last-child { margin-right: 0; } header #aspect_header { - z-index: 5; background-color: #eeeeee; border-top: 1px solid white; padding: 20px 0; } @@ -129,7 +128,7 @@ header { color: #111111; } header #aspect_header a:hover { background: none; - color: #333333; } + color: #999999; } header #aspect_header .page_title { text-transform: uppercase; text-shadow: 0 2px 0 white; @@ -143,8 +142,10 @@ ul#stream { list-style: none; padding: 12px 0; border-bottom: 1px solid #eeeeee; } - ul#stream > li:first-child { - padding-top: 0; } + ul#stream > li:hover { + background-color: #fafafa; } + ul#stream > li:hover .destroy_link { + display: inline; } ul#stream .right { top: 0; } @@ -167,6 +168,8 @@ li.message { li.message .content div.info { color: #bababa; font-size: 70%; } + li.message .content div.info .time a { + color: #666666; } form { position: relative; @@ -262,7 +265,7 @@ ul.comment_set { .destroy_link, .request_button { position: absolute; - right: 0; + right: 2em; bottom: 15px; } .destroy_link a, .request_button a { color: #999999; @@ -458,7 +461,7 @@ h1.big_text { #aspect_nav ul > li { padding: 0; display: inline; - margin-right: 0.5em; } + margin-right: 0.2em; } #aspect_nav ul > li a { line-height: 22px; background-color: #444444; @@ -470,12 +473,17 @@ h1.big_text { background-color: #4e4e4e; color: #cccccc; } #aspect_nav ul > li.selected a { + z-index: 50; + -webkit-box-shadow: 0px -4px 6px -2px #777777; + -moz-box-shadow: 0px -4px 6px -2px #777777; text-shadow: 0 2px 0 white; padding-top: 4px; padding-bottom: 5px; line-height: 18px; font-weight: bold; background-color: #eeeeee; + background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(white), to(#eeeeee)); + background: -moz-linear-gradient(19% 75% 90deg, #eeeeee, white); border: 1px solid white; border-bottom: 1px solid #eeeeee; color: black; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 9f9158741..e5a16e6f2 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -146,7 +146,6 @@ header :right 0 #aspect_header - :z-index 5 :background :color #eee :border @@ -162,7 +161,7 @@ header :color #111 &:hover :background none - :color #333 + :color #999 .page_title :text @@ -182,9 +181,12 @@ ul#stream :border :bottom 1px solid #eee - > li:first-child - :padding - :top 0 + &:hover + :background + :color #fafafa + + .destroy_link + :display inline .right :top 0 @@ -219,6 +221,10 @@ li.message :color #bababa :font-size 70% + .time + a + :color #666 + form :position relative @@ -348,7 +354,7 @@ ul.comment_set .destroy_link, .request_button :position absolute - :right 0 + :right 2em :bottom 15px a :color #999 @@ -604,13 +610,14 @@ h1.big_text :padding 0 :display inline :margin - :right 0.5em + :right 0.2em a :line :height 22px :background :color #444 + :border 1px solid #555 :padding 3px 8px @@ -623,6 +630,10 @@ h1.big_text :color #ccc &.selected a + :z-index 50 + :-webkit-box-shadow 0px -4px 6px -2px #777 + :-moz-box-shadow 0px -4px 6px -2px #777 + :text-shadow 0 2px 0 #fff :padding :top 4px @@ -633,6 +644,10 @@ h1.big_text :weight bold :background :color #eee + + :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#eee)) + :background -moz-linear-gradient(19% 75% 90deg, #eee, #fff) + :border 1px solid #fff :bottom 1px solid #eee :color #000 From 60e29f6572120384e821fc3fd409b47c9b12a469 Mon Sep 17 00:00:00 2001 From: Raphael Date: Sun, 19 Sep 2010 16:37:34 -0700 Subject: [PATCH 17/79] Magent should use the same settings as mongomapper, app config should load first, websocket spec is a little better. --- config/app_config.yml | 6 ++++++ .../{load_app_config.rb => _load_app_config.rb} | 0 config/initializers/_mongo.rb | 3 ++- spec/lib/websocket_spec.rb | 8 ++++---- 4 files changed, 12 insertions(+), 5 deletions(-) rename config/initializers/{load_app_config.rb => _load_app_config.rb} (100%) diff --git a/config/app_config.yml b/config/app_config.yml index 354dc75b2..b4fd6f0ab 100644 --- a/config/app_config.yml +++ b/config/app_config.yml @@ -11,6 +11,8 @@ development: socket_port: 8080 socket_collection_name: 'websocket' pubsub_server: 'https://pubsubhubbub.appspot.com/' + mongo_host: 'localhost' + mongo_post: 27017 test: debug: false @@ -18,6 +20,8 @@ test: socket_host: 0.0.0.0 socket_port: 8081 pubsub_server: 'https://pubsubhubbub.appspot.com/' + mongo_host: 'localhost' + mongo_post: 27017 production: debug: false @@ -25,3 +29,5 @@ production: socket_host: 0.0.0.0 socket_port: 8080 pubsub_server: 'https://pubsubhubbub.appspot.com/' + mongo_host: 'localhost' + mongo_post: 27017 diff --git a/config/initializers/load_app_config.rb b/config/initializers/_load_app_config.rb similarity index 100% rename from config/initializers/load_app_config.rb rename to config/initializers/_load_app_config.rb diff --git a/config/initializers/_mongo.rb b/config/initializers/_mongo.rb index 0409d6d71..8948a0c59 100644 --- a/config/initializers/_mongo.rb +++ b/config/initializers/_mongo.rb @@ -5,7 +5,7 @@ if ENV['MONGOHQ_URL'] MongoMapper.config = {RAILS_ENV => {'uri' => ENV['MONGOHQ_URL']}} else - MongoMapper.connection = Mongo::Connection.new('localhost', 27017) + MongoMapper.connection = Mongo::Connection.new(APP_CONFIG['mongo_host'], APP_CONFIG['mongo_port']) end MongoMapper.database = "diaspora-#{Rails.env}" @@ -16,3 +16,4 @@ if defined?(PhusionPassenger) end end +Magent.connection = Mongo::Connection.new(APP_CONFIG['mongo_host'], APP_CONFIG['mongo_port']) diff --git a/spec/lib/websocket_spec.rb b/spec/lib/websocket_spec.rb index 018f5020d..edac7051a 100644 --- a/spec/lib/websocket_spec.rb +++ b/spec/lib/websocket_spec.rb @@ -19,18 +19,18 @@ describe Diaspora::WebSocket do describe 'queuing and dequeuing ' do before do - @post.socket_to_uid(@user.id, :aspect_ids => @aspect.id) @channel = Magent::GenericChannel.new('websocket') + @messages = @channel.message_count + @post.socket_to_uid(@user.id, :aspect_ids => @aspect.id) end it 'should send the queued job to Magent' do - @channel.message_count.should == 1 + @channel.message_count.should == @messages + 1 end it 'should dequeue the job successfully' do - messages = @channel.message_count @channel.dequeue - @channel.message_count.should == messages -1 + @channel.message_count.should == @messages end end From 27c00bae90e136b1d2f7b7348ef21e4c3731327a Mon Sep 17 00:00:00 2001 From: Michael Sofaer Date: Sun, 19 Sep 2010 18:12:42 -0700 Subject: [PATCH 18/79] MJS RJS Fix initialization of album test --- spec/controllers/albums_controller_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/controllers/albums_controller_spec.rb b/spec/controllers/albums_controller_spec.rb index ce2bd305d..67b7d9a78 100644 --- a/spec/controllers/albums_controller_spec.rb +++ b/spec/controllers/albums_controller_spec.rb @@ -9,14 +9,14 @@ describe AlbumsController do render_views before do @user = Factory.create(:user) - @user.aspect(:name => "lame-os") - @album = Factory.create(:album) + @aspect = @user.aspect(:name => "lame-os") + @album = @user.post :album, :to => @aspect.id, :name => 'things on fire' sign_in :user, @user end it "should update the name of an album" do sign_in :user, @user - put :update, :id => @album._id, :album => { :name => "new_name"} + put :update, :id => @album.id, :album => { :name => "new_name"} @album.reload.name.should eql("new_name") end From 07d2de66461ab79cfd90a38c2843cde4e6390046 Mon Sep 17 00:00:00 2001 From: maxwell Date: Sun, 19 Sep 2010 20:36:39 -0700 Subject: [PATCH 19/79] removed an annoying log of encrypted salmon. --- app/models/person.rb | 1 + app/models/user.rb | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/person.rb b/app/models/person.rb index b1e7e3745..079275997 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -76,6 +76,7 @@ class Person end def self.by_webfinger( identifier, opts = {}) + #need to check if this is a valid email structure, maybe should do in JS local_person = Person.first(:diaspora_handle => identifier.gsub('acct:', '')) if local_person diff --git a/app/models/user.rb b/app/models/user.rb index 4ec528e70..f0481341a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -220,7 +220,6 @@ class User ###### Receiving ####### def receive_salmon ciphertext cleartext = decrypt( ciphertext) - Rails.logger.info("Received a salmon: #{cleartext}") salmon = Salmon::SalmonSlap.parse cleartext if salmon.verified_for_key?(salmon.author.public_key) Rails.logger.info("data in salmon: #{salmon.data}") From 5bf6d358a4289ffec2bee618fd4b542f431fc2b4 Mon Sep 17 00:00:00 2001 From: maxwell Date: Sun, 19 Sep 2010 20:40:03 -0700 Subject: [PATCH 20/79] MS added small log for when user is found from webfinger --- app/models/person.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/person.rb b/app/models/person.rb index 079275997..6a328dff8 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -78,8 +78,9 @@ class Person def self.by_webfinger( identifier, opts = {}) #need to check if this is a valid email structure, maybe should do in JS local_person = Person.first(:diaspora_handle => identifier.gsub('acct:', '')) - + if local_person + Rails.logger.info("Do not need to webfinger, found a local person #{local_person.real_name}") local_person elsif !identifier.include?("localhost") && !opts[:local] begin From 5a9b0fbd03149f21542614a87c3644ee8d1528ed Mon Sep 17 00:00:00 2001 From: danielvincent Date: Sun, 19 Sep 2010 22:16:58 -0700 Subject: [PATCH 21/79] tabs rounded --- public/stylesheets/application.css | 5 +++-- public/stylesheets/sass/application.sass | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 9a06eab4c..98893cabb 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -461,8 +461,10 @@ h1.big_text { #aspect_nav ul > li { padding: 0; display: inline; - margin-right: 0.2em; } + margin-right: 2px; } #aspect_nav ul > li a { + -webkit-border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; line-height: 22px; background-color: #444444; border: 1px solid #555555; @@ -473,7 +475,6 @@ h1.big_text { background-color: #4e4e4e; color: #cccccc; } #aspect_nav ul > li.selected a { - z-index: 50; -webkit-box-shadow: 0px -4px 6px -2px #777777; -moz-box-shadow: 0px -4px 6px -2px #777777; text-shadow: 0 2px 0 white; diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index e5a16e6f2..5edc89135 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -610,9 +610,11 @@ h1.big_text :padding 0 :display inline :margin - :right 0.2em + :right 2px a + :-webkit-border-radius 3px 3px 0 0 + :-moz-border-radius 3px 3px 0 0 :line :height 22px :background @@ -630,7 +632,6 @@ h1.big_text :color #ccc &.selected a - :z-index 50 :-webkit-box-shadow 0px -4px 6px -2px #777 :-moz-box-shadow 0px -4px 6px -2px #777 From 5b75c1634d99207bf02f3082af6c94300b34f1f2 Mon Sep 17 00:00:00 2001 From: Daniele Di Sarli Date: Mon, 20 Sep 2010 23:03:12 +0800 Subject: [PATCH 22/79] corrected some Italian phrases --- config/locales/devise.it.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/locales/devise.it.yml b/config/locales/devise.it.yml index 75b90affc..76f761e37 100644 --- a/config/locales/devise.it.yml +++ b/config/locales/devise.it.yml @@ -12,7 +12,7 @@ it: devise: failure: - unauthenticated: "Devi effettuare l'accesso o registrarci prima di continuare." + unauthenticated: "Devi effettuare l'accesso o registrarti prima di continuare." unconfirmed: "Devi confermare il tuo account prima di continuare." locked: "Il tuo account è bloccato." invalid: "Email o password errati." @@ -31,11 +31,11 @@ it: registrations: signed_up: "Ti sei iscritto. Se il servizio è disponibile, riceverai una conferma via email." updated: "Hai aggiornato il tuo account." - destroyed: "Ciao!Il tuo account è stato rimosso. Speriamo che tu torni a trovarci presto." + destroyed: "Ciao! Il tuo account è stato rimosso. Speriamo che tu torni a trovarci presto." unlocks: send_instructions: "Tra pochi minuti riceverai una mail con le istruzioni su come sbloccare il tuo account." unlocked: "Il tuo account è stato sbloccato. Hai appena effettuato l'accesso." mailer: confirmation_instructions: "Istruzioni sulla conferma" reset_password_instructions: "Istruzioni su come cambiare la password" - unlock_instructions: "Istruzione su come sbloccare l'account" + unlock_instructions: "Istruzioni su come sbloccare l'account" From 850961f22ed78e143cd7b202a7dd91e699000d51 Mon Sep 17 00:00:00 2001 From: moziz Date: Sun, 19 Sep 2010 09:21:53 +0800 Subject: [PATCH 23/79] Corrected a typo and switched a few words so that the it sounds more 'official' and not slang. --- config/locales/devise.fi.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/locales/devise.fi.yml b/config/locales/devise.fi.yml index 4ee6761f8..9109b40a8 100644 --- a/config/locales/devise.fi.yml +++ b/config/locales/devise.fi.yml @@ -13,7 +13,7 @@ fi: devise: failure: unauthenticated: 'Kirjaudu tai rekisteröidy ennen kuin voit jatkaa.' - unconfirmed: 'Sinun pitää vahvistaa käyttäjätilisi ennen kuin voit jatkaa' + unconfirmed: 'Sinun täytyy vahvistaa käyttäjätilisi ennen kuin voit jatkaa' locked: 'Käyttäjätilisi on lukittu.' invalid: 'Väärä sähköpostiosoite tai salasana.' invalid_token: 'Viallinen todennus.' @@ -21,9 +21,9 @@ fi: inactive: 'Käyttätiliäsi ei ole vielä vahvistettu.' sessions: signed_in: 'Sisäänkirjautuminen onnistui.' - signed_out: 'Uoskirjautuminen onnistui.' + signed_out: 'Uloskirjautuminen onnistui.' passwords: - send_instructions: 'Saat hetken päästä sähköpostiisi ohjeet siitä miten asetat salasanasi uudelleen.' + send_instructions: 'Saat hetken päästä sähköpostiisi ohjeet siitä miten määrität salasanasi uudelleen.' updated: 'Salasanasi on vaihdettu. Olet nyt kirjautunut sisään.' confirmations: send_instructions: 'Saat hetken päästä sähköpostiisi ohjeet siitä miten vahvistat käyttäjätilisi luonnin.' @@ -37,5 +37,5 @@ fi: unlocked: 'Käyttäjätilisi lukitus on avattu. Olet nyt kirjautunut sisään.' mailer: confirmation_instructions: 'Ohjeet vahvistamiseen/todentamiseen' - reset_password_instructions: 'Ohjeet salananan uudelleenasettamiseksi' + reset_password_instructions: 'Ohjeet salananan uudelleenmäärittämiseksi' unlock_instructions: 'Ohjeet lukituksen poistamiseksi' From 445c6784eb474d46ad84e346513149ea1ff72422 Mon Sep 17 00:00:00 2001 From: Marcin Karpezo Date: Sat, 18 Sep 2010 19:32:17 +0800 Subject: [PATCH 24/79] Translated devise.en.yml --- config/locales/devise.pl.yml | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 config/locales/devise.pl.yml diff --git a/config/locales/devise.pl.yml b/config/locales/devise.pl.yml new file mode 100644 index 000000000..ec9f44220 --- /dev/null +++ b/config/locales/devise.pl.yml @@ -0,0 +1,41 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +en: + errors: + messages: + not_found: "nie znaleziono" + already_confirmed: "potwierdzono wcześniej" + not_locked: "nie był zablokowany" + + devise: + failure: + unauthenticated: 'By kontynuować musisz się zalogować lub zarejestrować.' + unconfirmed: 'Musisz aktywować swoje konto.' + locked: 'Twoje konto jest zablokowane.' + invalid: 'Nieprawidłowy adres email lub hasło.' + invalid_token: 'Nieprawidłowy kod identyfikacyjny.' + timeout: 'Twoja sesja wygasła, zaloguj się ponownie by kontynuować.' + inactive: 'Twoje konto nie zostało jeszcze aktywowane.' + sessions: + signed_in: 'Zalogowano pomyślnie.' + signed_out: 'Wylogowano.' + passwords: + send_instructions: 'W ciągu kilku minut otrzymasz maila zawierającego instrukcjie dotyczące zresetowania hasła.' + updated: 'Twoje hasło zostało zmienione, zostałeś zalogowany.' + confirmations: + send_instructions: 'W ciągu kilku minut otrzymasz maila zawierającego instrukcje dotyczące aktywacji konta.' + confirmed: 'Twoje konto zostało aktywowane, zostałeś zalogowany.' + registrations: + signed_up: 'Zostałeś zarejestrowany. Jeśli aktywowano odpowiednią opcję, wyślemy do Ciebie email potwierdzający rejestrację.' + updated: 'Pomyślnie zaktualizowano informacje o Twoim koncie.' + destroyed: 'Żegnaj! Twoje konto zostało usunięte.' + unlocks: + send_instructions: 'W ciągu kilku minut otrzymasz email z instrukcjami odblokowania konta.' + unlocked: 'Twoje konto zostało odblokowane, jesteś zalogowany.' + mailer: + confirmation_instructions: 'Instrukcje aktywacji' + reset_password_instructions: 'Instrukcje zmiany hasła' + unlock_instructions: 'Instrukcje odblokowania' From 9130c857185a27363ba25c4c0ed3341b89ce42ab Mon Sep 17 00:00:00 2001 From: Marcin Karpezo Date: Sat, 18 Sep 2010 19:34:02 +0800 Subject: [PATCH 25/79] Translated en.yml --- config/locales/pl.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 config/locales/pl.yml diff --git a/config/locales/pl.yml b/config/locales/pl.yml new file mode 100644 index 000000000..e31046c29 --- /dev/null +++ b/config/locales/pl.yml @@ -0,0 +1,10 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en: + hello: "Witaj świecie" From a0a7d28e6d5d5f64a7eb14f7252323c729c36bb2 Mon Sep 17 00:00:00 2001 From: Marcin Karpezo Date: Sat, 18 Sep 2010 20:27:52 +0800 Subject: [PATCH 26/79] fixed translation --- config/locales/devise.pl.yml | 2 +- config/locales/pl.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/devise.pl.yml b/config/locales/devise.pl.yml index ec9f44220..a490a1a39 100644 --- a/config/locales/devise.pl.yml +++ b/config/locales/devise.pl.yml @@ -3,7 +3,7 @@ # the COPYRIGHT file. -en: +pl: errors: messages: not_found: "nie znaleziono" diff --git a/config/locales/pl.yml b/config/locales/pl.yml index e31046c29..2052779bd 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -6,5 +6,5 @@ # Sample localization file for English. Add more files in this directory for other locales. # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. -en: +pl: hello: "Witaj świecie" From e6c8cf20d34d5594af5770656db0e79a02f2689d Mon Sep 17 00:00:00 2001 From: TJ Peden Date: Sat, 18 Sep 2010 14:30:17 +0800 Subject: [PATCH 27/79] Fixed receive_url problem --- app/models/request.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/request.rb b/app/models/request.rb index da62edd93..739500e4e 100644 --- a/app/models/request.rb +++ b/app/models/request.rb @@ -26,8 +26,8 @@ class Request validates_presence_of :destination_url, :callback_url before_validation :clean_link - scope :for_user, lambda{ |user| where(:destination_url => user.receive_url) } - scope :from_user, lambda{ |user| where(:destination_url.ne => user.receive_url) } + scope :for_user, lambda{ |user| where(:destination_url => user.person.receive_url) } + scope :from_user, lambda{ |user| where(:destination_url.ne => user.person.receive_url) } def self.instantiate(options = {}) person = options[:from] From aff4d783a642d0da4d8977cb9949f731d9638813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Soucaze?= Date: Fri, 17 Sep 2010 04:17:00 +0800 Subject: [PATCH 28/79] French localisation. --- config/locales/devise.fr.yml | 41 ++++++++++++++++++++++++++++++++++++ config/locales/fr.yml | 10 +++++++++ 2 files changed, 51 insertions(+) create mode 100644 config/locales/devise.fr.yml create mode 100644 config/locales/fr.yml diff --git a/config/locales/devise.fr.yml b/config/locales/devise.fr.yml new file mode 100644 index 000000000..8829de132 --- /dev/null +++ b/config/locales/devise.fr.yml @@ -0,0 +1,41 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +en: + errors: + messages: + not_found: "introuvable" + already_confirmed: "a déjà été confirmé" + not_locked: "n’a pas été verrouillé" + + devise: + failure: + unauthenticated: 'Vous devez vous connecter ou vous inscrire avant de continuer.' + unconfirmed: 'Vous devez confirmer votre compte avant de continuer.' + locked: 'Votre compte est verrouillé.' + invalid: 'E-mail ou mot de passe invalide.' + invalid_token: 'Jeton d’authentification invalide.' + timeout: 'Votre session a expiré, veuillez vous connecter de nouveau afin de continuer.' + inactive: 'Votre compte n’a pas encore été activé.' + sessions: + signed_in: 'Connecté avec succès.' + signed_out: 'Déconnecté avec succès.' + passwords: + send_instructions: 'Vous allez recevoir dans quelques minutes un e-mail contenant des instructions vous expliquant comment réinitialiser votre mot de passe.' + updated: 'Votre mot de passe a été modifié avec succès. Vous êtes à présent connecté.' + confirmations: + send_instructions: 'Vous allez recevoir dans quelques minutes un e-mail contenant des instructions vous expliquant comment confirmer votre compte.' + confirmed: 'Votre compte a été confirmé avec succès. Vous êtes à présent connecté.' + registrations: + signed_up: 'Vous vous êtes inscrit avec succès. Si activée, une confirmation a été envoyée sur votre adresse e-mail.' + updated: 'Vous avez mis à jour votre compte avec succès.' + destroyed: 'Au revoir ! Votre compte a été résilié avec succès. Nous espérons vous revoir très bientôt.' + unlocks: + send_instructions: 'Vous allez recevoir dans quelques minutes un e-mail contenant des instructions vous expliquant comment déverrouiller votre compte.' + unlocked: 'Votre compte a été déverrouillé avec succès. Vous êtes à présent connecté.' + mailer: + confirmation_instructions: 'Instructions de confirmation' + reset_password_instructions: 'Réinitialiser les instructions du mot de passe' + unlock_instructions: 'Instructions de déverrouillage' diff --git a/config/locales/fr.yml b/config/locales/fr.yml new file mode 100644 index 000000000..641208b2a --- /dev/null +++ b/config/locales/fr.yml @@ -0,0 +1,10 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en: + hello: "Bonjour tout le monde" From 77acb6268ebc0a2051583c286b6a628ccf122861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Soucaze?= Date: Sat, 18 Sep 2010 04:06:18 +0800 Subject: [PATCH 29/79] English localization updated with arielo's changes. --- config/locales/en.yml | 133 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index 1de275cf9..867b120e0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -8,3 +8,136 @@ en: hello: "Hello world" + layouts: + application: + edit_profile: "edit profile" + logout: "logout" + shared: + aspect_nav: + all_aspects: "All Aspects" + manage: "Manage" + manage_your_aspects: "Manage your Aspects" + sub_header: + all_aspects: "All Aspects" + manage_aspects: "Manage Aspects" + publisher: + share: "Share" + aspect_friends: + add_friends: "add friends" + albums: + album: + you: "you" + new_album: + create: "create" + add_a_new_album: "Add a new album" + show: + edit_album: "Edit Album" + albums: "albums" + updated: "updated" + by: "by" + edit: + editing: "Editing" + updated: "updated" + are_you_sure: "Are you sure?" + delete_album: "Delete Album" + cancel: "Cancel" + index: + home: "home" + new_album: "New Album" + create: + success: "You've created an album called %{name}." + update: + success: "Album %{name} successfully edited." + failure: "Failed to edit album %{name}." + destroy: + success: "Album %{name} deleted." + aspects: + index: + photos: "photos" + show: + photos: "photos" + manage: + add_a_new_aspect: "Add a new aspect" + add_a_new_friend: "Add a new friend" + show: "Show" + update_aspects: "Update Aspects" + requests: "Requests" + ignore_remove: "Ignore/Remove" + new_aspect: + add_a_new_aspect: "Add a new aspect" + create: "Create" + create: + success:"Click on the plus on the left side to tell Diaspora who can see your new aspect." + users: + edit: + cancel: "Cancel" + update_profile: "Update Profile" + home: "Home" + diaspora_username: "DIASPORA USERNAME" + info: "Info" + picture: "Picture" + editing_profile: "Editing profile" + albums: "Albums" + you_dont_have_any_photos: "You don't have any photos! Go to the" + page_to_upload_some: "page to upload some." + comments: + comment: + ago: "ago" + new_comment: + comment: "Comment" + photos: + show: + prev: "prev" + full_size: "full size" + next: "next" + edit_photo: "Edit Photo" + delete_photo: "Delete Photo" + are_you_sure: "Are you sure?" + comments: "comments" + edit: + editing: "Editing" + are_you_sure: "Are you sure?" + delete_photo: "Delete Photo" + photo: + show_comments: "show comments" + posted_a_new_photo_to: "posted a new photo to" + new: + new_photo: "New Photo" + back_to_list: "Back to List" + post_it: "post it!" + registrations: + new: + sign_up: "Sign up" + status_messages: + new_status_message: + tell_me_something_good: "tell me something good" + oh_yeah: "oh yeah!" + status_message: + show_comments: "show comments" + delete: "Delete" + are_you_sure: "Are you sure?" + show: + status_message: "Status Message" + comments: "comments" + are_you_sure: "Are you sure?" + destroy: "Destroy" + view_all: "View All" + message: "Message" + owner: "Owner" + people: + index: + add_friend: "add friend" + real_name: "real name" + diaspora_handle: "diaspora handle" + thats_you: "that's you!" + friend_request_pending: "friend request pending" + you_have_a_friend_request_from_this_person: "you have a friend request from this person" + new: + new_person: "New Person" + back_to_list: "Back to List" + show: + last_seen: "last seen: %{how_long_ago}" + friends_since: "friends since: %{how_long_ago}" + save: "save" + are_you_sure: "Are you sure?" + remove_friend: "remove friend" \ No newline at end of file From c884a25da6fa90cd1049723ec104df6bfe2638d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Soucaze?= Date: Sat, 18 Sep 2010 04:07:02 +0800 Subject: [PATCH 30/79] French localization updated with arielo's changes. --- config/locales/devise.fr.yml | 2 +- config/locales/fr.yml | 137 ++++++++++++++++++++++++++++++++++- 2 files changed, 136 insertions(+), 3 deletions(-) diff --git a/config/locales/devise.fr.yml b/config/locales/devise.fr.yml index 8829de132..b8691eb3a 100644 --- a/config/locales/devise.fr.yml +++ b/config/locales/devise.fr.yml @@ -3,7 +3,7 @@ # the COPYRIGHT file. -en: +fr: errors: messages: not_found: "introuvable" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 641208b2a..9c05ff973 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -3,8 +3,141 @@ # the COPYRIGHT file. -# Sample localization file for English. Add more files in this directory for other locales. +# Localization file for French. Add more files in this directory for other locales. # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. -en: +fr: hello: "Bonjour tout le monde" + layouts: + application: + edit_profile: "éditer le profil" + logout: "déconnexion" + shared: + aspect_nav: + all_aspects: "Tous les aspects" + manage: "Gérer" + manage_your_aspects: "Gérer vos aspects" + sub_header: + all_aspects: "Tous les aspects" + manage_aspects: "Gérer les aspects" + publisher: + share: "Partager" + aspect_friends: + add_friends: "ajouter des amis" + albums: + album: + you: "vous" + new_album: + create: "créer" + add_a_new_album: "Ajouter un nouvel album" + show: + edit_album: "Éditer l’album" + albums: "albums" + updated: "mis à jour" + by: "par" + edit: + editing: "Édition" + updated: "mis à jour" + are_you_sure: "Êtes-vous sûr ?" + delete_album: "Supprimer l’album" + cancel: "Annuler" + index: + home: "accueil" + new_album: "Nouvel album" + create: + success: "Tu as créé un album nommé %{name}." + update: + success: "L’album %{name} a été édité avec succès." + failure: "L’édition de l’album %{name} a échoué." + destroy: + success: "L’album %{name} a été supprimé." + aspects: + index: + photos: "photos" + show: + photos: "photos" + manage: + add_a_new_aspect: "Ajouter un nouvel aspect" + add_a_new_friend: "Ajouter un nouvel ami" + show: "Afficher" + update_aspects: "Metre à jour les aspects" + requests: "Requêtes" + ignore_remove: "Ignorer/Supprimer" + new_aspect: + add_a_new_aspect: "Ajouter un nouvel aspect" + create: "Créer" + create: + success:"Cliquez sur plus situé sur le côté gauche afin d’en informer Diaspora qui peut voir votre nouvel aspect." + users: + edit: + cancel: "Annuler" + update_profile: "Mettre à jour le profil" + home: "Accueil" + diaspora_username: "NOM D’UTILISATEUR DIASPORA" + info: "Information" + picture: "Image" + editing_profile: "Édition du profil" + albums: "Albums" + you_dont_have_any_photos: "Vous n’avez aucune photo ! Rendez-vous sur la page" + page_to_upload_some: "afin d’en transférer quelques-unes." + comments: + comment: + ago: "il y a" + new_comment: + comment: "Commentaire" + photos: + show: + prev: "précédent" + full_size: "taille réelle" + next: "suivant" + edit_photo: "Éditer la photo" + delete_photo: "Supprimer la photo" + are_you_sure: "Êtes-vous sûr ?" + comments: "commentaires" + edit: + editing: "Édition" + are_you_sure: "Êtes-vous sûr ?" + delete_photo: "Supprimer la photo" + photo: + show_comments: "afficher les commentaires" + posted_a_new_photo_to: "a publié une nouvelle photo sur" + new: + new_photo: "Nouvelle photo" + back_to_list: "Retourner à la liste" + post_it: "publiez-la !" + registrations: + new: + sign_up: "Inscription" + status_messages: + new_status_message: + tell_me_something_good: "dites-moi quelque chose de bien" + oh_yeah: "oh ouais !" + status_message: + show_comments: "afficher les commentaires" + delete: "Supprimer" + are_you_sure: "Êtes-vous sûr ?" + show: + status_message: "Message d’état" + comments: "commentaires" + are_you_sure: "Êtes-vous sûr ?" + destroy: "Détruire" + view_all: "Tout voir" + message: "Message" + owner: "Propriétaire" + people: + index: + add_friend: "ajouter un ami" + real_name: "nom réel" + diaspora_handle: "maniement de diaspora" + thats_you: "c’est vous !" + friend_request_pending: "Requête d’ami en attente" + you_have_a_friend_request_from_this_person: "vous avez une requête d’ami de la part de cette personne" + new: + new_person: "Nouvelle personne" + back_to_list: "Retourner à la liste" + show: + last_seen: "dernière connexion : %{how_long_ago}" + friends_since: "amis depuis : %{how_long_ago}" + save: "sauvegarder" + are_you_sure: "Êtes-vous sûr ?" + remove_friend: "supprimer un ami" \ No newline at end of file From 718b0715b3e1918b50e43b7e2acb099052a5d71b Mon Sep 17 00:00:00 2001 From: Mikhail Zubrov Date: Sat, 18 Sep 2010 13:58:29 +0800 Subject: [PATCH 31/79] add a Russian translation --- config/locales/devise.ru.yml | 41 ++++++++++++++++++++++++++++++++++++ config/locales/ru.yml | 10 +++++++++ 2 files changed, 51 insertions(+) create mode 100644 config/locales/devise.ru.yml create mode 100644 config/locales/ru.yml diff --git a/config/locales/devise.ru.yml b/config/locales/devise.ru.yml new file mode 100644 index 000000000..0e9b7b92f --- /dev/null +++ b/config/locales/devise.ru.yml @@ -0,0 +1,41 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +en: + errors: + messages: + not_found: "не найден(о)" + already_confirmed: "уже подтвержден(о)" + not_locked: "не заблокирован(о)" + + devise: + failure: + unauthenticated: 'Вам нужно войти либо зарегистрироваться, чтобы продолжить.' + unconfirmed: 'Вам нужно подтвердить вашу учётную запись, чтобы продолжить.' + locked: 'Ваша учётная запись заблокирована.' + invalid: 'Неверный e-mail или пароль.' + invalid_token: 'Неверный ключ аутентификации.' + timeout: 'Срок вашего сеанса истёк, пожалуйста, войдите в систему снова.' + inactive: 'Ваша учётная запись ещё не активирована.' + sessions: + signed_in: 'Вход в систему выполнен успешно.' + signed_out: 'Выход из системы выполнен успешно.' + passwords: + send_instructions: 'Вы получите e-mail с указаниями по сбросу пароля в течение нескольких минут.' + updated: 'Ваш пароль был изменён. Вы вошли в систему.' + confirmations: + send_instructions: 'Вы получите e-mail с указаниями по подтверждению учётной записи в течение нескольких минут.' + confirmed: 'Ваша учётная запись была подтверждена. Вы вошли в систему.' + registrations: + signed_up: 'Регистрация выполнена успешно. В зависимости от настроек, вам может прийти e-mail с подтверждением.' + updated: 'Обновление вашей учётной записи выполнено успешно.' + destroyed: 'До свидания! Ваша учётная запись была удалена. Надеемся, что вскоре вас увидим снова.' + unlocks: + send_instructions: 'Вы получите e-mail с указаниями по разблокированию учётной записи в течение нескольких минут.' + unlocked: 'Ваша учётная запись была разблокирована. Вы вошли в систему.' + mailer: + confirmation_instructions: 'Подтверждение учётной записи' + reset_password_instructions: 'Сброс пароля' + unlock_instructions: 'Разблокирование учётной записи' diff --git a/config/locales/ru.yml b/config/locales/ru.yml new file mode 100644 index 000000000..1a8e7fc4e --- /dev/null +++ b/config/locales/ru.yml @@ -0,0 +1,10 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en: + hello: "Привет, мир" From b8dc20e4bbb04fa2531ba867efed15169ed87124 Mon Sep 17 00:00:00 2001 From: Claudius Coenen Date: Fri, 17 Sep 2010 05:55:57 +0800 Subject: [PATCH 32/79] adding german translation --- config/locales/de.yml | 116 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 config/locales/de.yml diff --git a/config/locales/de.yml b/config/locales/de.yml new file mode 100644 index 000000000..23617a3f3 --- /dev/null +++ b/config/locales/de.yml @@ -0,0 +1,116 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +de: + hello: "Hallo Welt" + layouts: + application: + edit_profile: "Profil bearbeiten" + logout: "Ausloggen" + shared: + aspect_nav: + all_aspects: "Alle Aspekte" + manage: "Verwalten" + manage_your_aspects: "Aspekte verwalten" + sub_header: + all_aspects: "Alle Aspekte" + manage_aspects: "Aspekte verwalten" + publisher: + share: "Teilen" + aspect_friends: + add_friends: "Freunde hinzufügen" + albums: + album: + you: "dir" + new_album: + create: "erstellen" + add_a_new_album: "Album hinzufügen" + show: + edit_album: "Album bearbeiten" + albums: "Alben" + updated: "aktualisiert" + by: "von" + edit: + editing: "Bearbeite" + updated: "geändert" + are_you_sure: "Bist du sicher?" + delete_album: "Album löschen" + cancel: "Abbrechen" + index: + home: "Startseite" + new_album: "Neues Album" + aspects: + index: + photos: "Fotos" + show: + photos: "Fotos" + manage: + add_a_new_aspect: "Neuen Aspekt erstellen" + add_a_new_friend: "Freund hinzufügen" + show: "Anzeigen" + update_aspects: "Aspekte aktualisieren" + requests: "Anfragen" + ignore_remove: "Ignorieren/Entfernen" + new_aspect: + create: "Erstellen" + users: + edit: + cancel: "Abbrechen" + update_profile: "Profil aktualisieren" + home: "Startseite" + diaspora_username: "Diaspora Benutzername" + info: "Info" + picture: "Bild" + editing_profile: "Profil bearbeiten" + albums: "Alben" + comments: + comment: + # this won't work in german at all. Needs more thorough I18n + ago: "ago" + new_comment: + comment: "Kommentar" + photos: + show: + prev: "zurück" + full_size: "volle Größe" + next: "vor" + edit_photo: "Foto bearbeiten" + delete_photo: "Foto löschen" + are_you_sure: "Bist du sicher?" + comments: "Kommentare" + edit: + editing: "Bearbeite" + are_you_sure: "Bist du sicher?" + delete_photo: "Foto löschen" + photo: + show_comments: "Kommentare anzeigen" + new: + new_photo: "Foto erstellen" + back_to_list: "Zurück zur Liste" + post_it: "Hochladen" + registrations: + new: + sign_up: "Anmelden" + status_messages: + new_status_message: + tell_me_something_good: "Erzähl' mir was schönes!" + oh_yeah: "Hey, super!" + status_message: + show_comments: "Kommentare anzeigen" + delete: "Löschen" + are_you_sure: "Bist du sicher?" + show: + status_message: "Statusmeldung" + comments: "Kommentare" + are_you_sure: "Bist du sicher?" + destroy: "Löschen" + view_all: "Alle anzeigen" + message: "Nachricht" + owner: "Besitzer" + + From 6501974f3077f17a8025645d229a452c1d8ad545 Mon Sep 17 00:00:00 2001 From: Ariel Zavala Date: Fri, 17 Sep 2010 22:43:59 +0800 Subject: [PATCH 33/79] added more translations missing on views --- app/controllers/aspects_controller.rb | 2 +- app/views/aspects/_new_aspect.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index ab144ad12..82c35b36c 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -16,7 +16,7 @@ class AspectsController < ApplicationController def create @aspect = current_user.aspect params[:aspect] - flash[:notice] = "Click on the plus on the left side to tell Diaspora who can see your new aspect." + flash[:notice] = I18n.t('aspects.create.success') respond_with :location => aspects_manage_path end diff --git a/app/views/aspects/_new_aspect.haml b/app/views/aspects/_new_aspect.haml index b5bc7ace3..3ca07ac17 100644 --- a/app/views/aspects/_new_aspect.haml +++ b/app/views/aspects/_new_aspect.haml @@ -3,7 +3,7 @@ -# the COPYRIGHT file. -%h1 Add a new aspect +%h1=t('.add_a_new_aspect') = form_for Aspect.new do |f| = f.error_messages %p From 4c9ac0e5f6fbb931ed8220e238d26fe70a8e0adb Mon Sep 17 00:00:00 2001 From: Felix Gruber Date: Fri, 17 Sep 2010 01:03:08 +0800 Subject: [PATCH 34/79] initial german translation --- config/locales/devise.de.yml | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 config/locales/devise.de.yml diff --git a/config/locales/devise.de.yml b/config/locales/devise.de.yml new file mode 100644 index 000000000..55ad12536 --- /dev/null +++ b/config/locales/devise.de.yml @@ -0,0 +1,41 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +en: + errors: + messages: + not_found: "nicht gefunden" + already_confirmed: "wurde bereits bestätigt" + not_locked: "war nicht gesperrt" + + devise: + failure: + unauthenticated: 'Du musst dich anmelden oder registrieren um fortzufahren.' + unconfirmed: 'Du musst dein Konto bestätigen um fortzufahren.' + locked: 'Dein Konto ist gesperrt.' + invalid: 'Ungültige E-Mail-Adresse oder Passwort.' + invalid_token: 'Ungültiger Authentifizierungstoken.' + timeout: 'Deine Sitzung ist abgelaufen, bitte melde dich wieder an, um fortzufahren.' + inactive: 'Dein Konto wurde noch nicht aktiviert.' + sessions: + signed_in: 'Erfolgreich angemeldet.' + signed_out: 'Erfolgreich abgemeldet.' + passwords: + send_instructions: 'Du wirst in ein paar Minuten eine E-Mail erhalten, die beschreibt, wie du dein Passwort zurücksetzt.' + updated: 'Dein Passwort wurde erfolgreich geändert. Du bist nun angemeldet.' + confirmations: + send_instructions: 'Du wirst in ein paar Minuten eine E-Mail erhalten, die beschreibt, wie du dein Konto bestätigst.' + confirmed: 'Dein Konto wurde erfolgreich bestätigt. Du bist nun angemeldet.' + registrations: + signed_up: 'Du wurdest erfolgreich registriert. Falls aktiviert, wurde dir eine E-Mail zur Bestätigung geschickt.' + updated: 'Du hast erfolgreich dein Konto aktualisiert.' + destroyed: 'Tschüss! Dein Konto wurde erfolgreich abgemeldet. Wir hoffen dich bald wiederzusehen.' + unlocks: + send_instructions: 'Du wirst in ein paar Minuten eine E-Mail erhalten, die beschreibt, wie du dein Konto entsperren kannst.' + unlocked: 'Dein Konto wurde erfolgreich entsperrt. Du bist nun angemeldet.' + mailer: + confirmation_instructions: 'Instruktionen zur Bestätigung' + reset_password_instructions: 'Instruktionen zum Zurücksetzen des Passworts' + unlock_instructions: 'Instruktionen zum Entsperren' From cc7c82ab5e3c0d9ec4eb6fc3f025abfe07d5d152 Mon Sep 17 00:00:00 2001 From: maxwell Date: Mon, 20 Sep 2010 10:46:46 -0700 Subject: [PATCH 35/79] MS added openssl copywright exception --- COPYRIGHT | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/COPYRIGHT b/COPYRIGHT index c1e5ed876..af330bbc2 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1 +1,14 @@ Diaspora is copyright Diaspora Inc., 2010, and files herein are licensed under the Affero General Public License version 3, the text of which can be found in GNU-AGPL-3.0, unless otherwise noted. Components of Diaspora, including Rails, JQuery, and Devise, are licensed under the MIT/X11 license. Blueprint-CSS is licensed under a modified version of the MIT/X11 license. All unmodified files from these and other sources retain their original copyright and license notices: see the relevant individual files. Attribution information for Diaspora is contained in the AUTHORS file. + +* In addition, as a special exception, the copyright holders give +* permission to link the code of portions of this program with the +* OpenSSL library under certain conditions as described in each +* individual source file, and distribute linked combinations +* including the two. +* You must obey the GNU General Public License in all respects +* for all of the code used other than OpenSSL. If you modify +* file(s) with this exception, you may extend this exception to your +* version of the file(s), but you are not obligated to do so. If you +* do not wish to do so, delete this exception statement from your +* version. If you delete this exception statement from all source +* files in the program, then also delete it here. \ No newline at end of file From 852022ca79c12ecc03c7da51c07cfc6467eebcef Mon Sep 17 00:00:00 2001 From: Felix Gruber Date: Fri, 17 Sep 2010 01:15:36 +0800 Subject: [PATCH 36/79] change 'en' to 'de' in devise.de.yml --- config/locales/devise.de.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/devise.de.yml b/config/locales/devise.de.yml index 55ad12536..516eebfed 100644 --- a/config/locales/devise.de.yml +++ b/config/locales/devise.de.yml @@ -3,7 +3,7 @@ # the COPYRIGHT file. -en: +de: errors: messages: not_found: "nicht gefunden" From 83520f593c0984d7b3781936509eab4119cae347 Mon Sep 17 00:00:00 2001 From: Felix Gruber Date: Mon, 20 Sep 2010 00:15:36 +0800 Subject: [PATCH 37/79] some corrections from sennewood --- config/locales/devise.de.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/devise.de.yml b/config/locales/devise.de.yml index 516eebfed..9fe2e5a32 100644 --- a/config/locales/devise.de.yml +++ b/config/locales/devise.de.yml @@ -17,7 +17,7 @@ de: locked: 'Dein Konto ist gesperrt.' invalid: 'Ungültige E-Mail-Adresse oder Passwort.' invalid_token: 'Ungültiger Authentifizierungstoken.' - timeout: 'Deine Sitzung ist abgelaufen, bitte melde dich wieder an, um fortzufahren.' + timeout: 'Deine Sitzung ist abgelaufen, bitte melde dich wieder an um fortzufahren.' inactive: 'Dein Konto wurde noch nicht aktiviert.' sessions: signed_in: 'Erfolgreich angemeldet.' @@ -30,7 +30,7 @@ de: confirmed: 'Dein Konto wurde erfolgreich bestätigt. Du bist nun angemeldet.' registrations: signed_up: 'Du wurdest erfolgreich registriert. Falls aktiviert, wurde dir eine E-Mail zur Bestätigung geschickt.' - updated: 'Du hast erfolgreich dein Konto aktualisiert.' + updated: 'Dein Konto wurde aktualisiert.' destroyed: 'Tschüss! Dein Konto wurde erfolgreich abgemeldet. Wir hoffen dich bald wiederzusehen.' unlocks: send_instructions: 'Du wirst in ein paar Minuten eine E-Mail erhalten, die beschreibt, wie du dein Konto entsperren kannst.' From 88bb50660a241e314922a6d8c62495f8f779d8a9 Mon Sep 17 00:00:00 2001 From: Felix Gruber Date: Mon, 20 Sep 2010 20:04:09 +0800 Subject: [PATCH 38/79] better translation from sennewood --- config/locales/devise.de.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/devise.de.yml b/config/locales/devise.de.yml index 9fe2e5a32..34947cbc2 100644 --- a/config/locales/devise.de.yml +++ b/config/locales/devise.de.yml @@ -29,7 +29,7 @@ de: send_instructions: 'Du wirst in ein paar Minuten eine E-Mail erhalten, die beschreibt, wie du dein Konto bestätigst.' confirmed: 'Dein Konto wurde erfolgreich bestätigt. Du bist nun angemeldet.' registrations: - signed_up: 'Du wurdest erfolgreich registriert. Falls aktiviert, wurde dir eine E-Mail zur Bestätigung geschickt.' + signed_up: 'Du hast dich erfolgreich registriert. Sofern aktiviert, wurde dir eine Bestätigung per E-Mail gesendet.' updated: 'Dein Konto wurde aktualisiert.' destroyed: 'Tschüss! Dein Konto wurde erfolgreich abgemeldet. Wir hoffen dich bald wiederzusehen.' unlocks: From 6294cf502d4c9a86175c581fb434361a7ac2ffc3 Mon Sep 17 00:00:00 2001 From: MrBison Date: Sat, 18 Sep 2010 17:18:07 +0800 Subject: [PATCH 39/79] oops, a stupid error. --- config/locales/devise.ru.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/devise.ru.yml b/config/locales/devise.ru.yml index 0e9b7b92f..670d57026 100644 --- a/config/locales/devise.ru.yml +++ b/config/locales/devise.ru.yml @@ -3,7 +3,7 @@ # the COPYRIGHT file. -en: +ru: errors: messages: not_found: "не найден(о)" From 1e5fc556a3dc914833b642648b7365bbd023c3ab Mon Sep 17 00:00:00 2001 From: MrBison Date: Sat, 18 Sep 2010 17:18:35 +0800 Subject: [PATCH 40/79] oops, a stupid error fixed --- config/locales/ru.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 1a8e7fc4e..fe944aa59 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -6,5 +6,5 @@ # Sample localization file for English. Add more files in this directory for other locales. # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. -en: +ru: hello: "Привет, мир" From 1f78c3400b10e871409301b65f4d2b97220c078f Mon Sep 17 00:00:00 2001 From: Ariel Zavala Date: Fri, 17 Sep 2010 04:30:17 +0800 Subject: [PATCH 41/79] Started Spanish Locale --- config/locales/es.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 config/locales/es.yml diff --git a/config/locales/es.yml b/config/locales/es.yml new file mode 100644 index 000000000..11c2effdd --- /dev/null +++ b/config/locales/es.yml @@ -0,0 +1,10 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +es: + hello: "Hello world" \ No newline at end of file From d1822d3dc874b47713718b1e28c570fde20f8ed1 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Mon, 20 Sep 2010 18:23:39 +0800 Subject: [PATCH 42/79] Swedish translation --- config/locales/devise.sv.yml | 40 ++++++++++++++++++++++++++++++++++++ config/locales/sv.yml | 10 +++++++++ 2 files changed, 50 insertions(+) create mode 100644 config/locales/devise.sv.yml create mode 100644 config/locales/sv.yml diff --git a/config/locales/devise.sv.yml b/config/locales/devise.sv.yml new file mode 100644 index 000000000..814383a79 --- /dev/null +++ b/config/locales/devise.sv.yml @@ -0,0 +1,40 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +sv: + errors: + messages: + not_found: "kan ej hitta" + not_locked: "var ej låst" + + devise: + failure: + unauthenticated: 'Du måste logga in innan du kan fortsätta.' + unconfirmed: 'Du måste verifiera ditt konto innan du kan fortsätta.' + locked: 'Ditt konto är låst.' + invalid: 'Felaktig användare eller lösenord.' + invalid_token: 'Ogiltig identifiering.' + timeout: 'Din session är avslutad, var vänlig logga in igen.' + inactive: 'Ditt konto är inte aktiverat.' + sessions: + signed_in: 'Inloggning ok.' + signed_out: 'Utloggning ok.' + passwords: + send_instructions: 'Du kommer att få ett ebrev med instruktioner för att återställa lösenordet inom några minuter.' + updated: 'Ditt lösenord har ändrats och du är inloggad.' + confirmations: + send_instructions: 'Du kommer att få ett ebrev med instruktioner för att verifiera ditt konto inom några minuter.' + confirmed: 'Ditt konto har verifierats och du är inloggad.' + registrations: + signed_up: 'Du har skapat ett konto. Beroende på inställningar kan ett ebrev ha skickats till dig.' + updated: 'Ditt konto har uppdateras.' + destroyed: 'Ditt konto är avslutat. Välkommen åter!' + unlocks: + send_instructions: 'Du kommer att få ett ebrev med instruktioner för att låsa upp ditt konto inom några minuter.' + unlocked: 'Ditt konto har är nu upplåst och du är inloggad' + mailer: + confirmation_instructions: 'Instruktioner för att verifiera ditt konto.' + reset_password_instructions: 'Instruktioner för att terställa ditt lösenord.' + unlock_instructions: 'Instruktioner för att låsa upp ditt konto.' diff --git a/config/locales/sv.yml b/config/locales/sv.yml new file mode 100644 index 000000000..1caf878b8 --- /dev/null +++ b/config/locales/sv.yml @@ -0,0 +1,10 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +# Swedish localization file. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +sv: + hello: "Hej" From 5e69292954f56d9482aac03ce60532550b086a18 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Tue, 21 Sep 2010 01:32:20 +0800 Subject: [PATCH 43/79] Typo fix --- config/locales/devise.sv.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/devise.sv.yml b/config/locales/devise.sv.yml index 814383a79..b434666ce 100644 --- a/config/locales/devise.sv.yml +++ b/config/locales/devise.sv.yml @@ -26,7 +26,7 @@ sv: updated: 'Ditt lösenord har ändrats och du är inloggad.' confirmations: send_instructions: 'Du kommer att få ett ebrev med instruktioner för att verifiera ditt konto inom några minuter.' - confirmed: 'Ditt konto har verifierats och du är inloggad.' + confirmed: 'Ditt konto har verifierats och du är inloggad.' registrations: signed_up: 'Du har skapat ett konto. Beroende på inställningar kan ett ebrev ha skickats till dig.' updated: 'Ditt konto har uppdateras.' From 813dfae0599202c02a5fc83922056cb8788f819f Mon Sep 17 00:00:00 2001 From: gattytto Date: Mon, 20 Sep 2010 04:21:33 +0800 Subject: [PATCH 44/79] just a few 's' missing. :) --- config/locales/devise.es.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/devise.es.yml b/config/locales/devise.es.yml index 70209ff79..06002aa63 100644 --- a/config/locales/devise.es.yml +++ b/config/locales/devise.es.yml @@ -18,10 +18,10 @@ es: signed_in: 'Has ingresado correctamente.' signed_out: 'Has salido correctamente.' passwords: - send_instructions: 'Recibirás un email con instrucciones para cambiar tu contraseña en poco minutos.' + send_instructions: 'Recibirás un email con instrucciones para cambiar tu contraseña en pocos minutos.' updated: 'Tu contraseña ha sido modificada. Ya has accedido a tu cuenta.' confirmations: - send_instructions: 'Recibirás un email con instrucciones para confirmar tu cuenta en poco minutos.' + send_instructions: 'Recibirás un email con instrucciones para confirmar tu cuenta en pocos minutos.' confirmed: 'Tu cuenta ha sido confirmada. Ya has accedido a tu cuenta.' registrations: signed_up: 'Te has registrado correctamente. Si está disponible, te habremos enviado un email de confirmación.' From db7ad1650380639c94e67765ec445637308d8b15 Mon Sep 17 00:00:00 2001 From: Ariel Zavala Date: Fri, 17 Sep 2010 03:00:21 +0800 Subject: [PATCH 45/79] Added localization to comments views --- app/views/comments/_comment.html.haml | 2 +- app/views/comments/_new_comment.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/comments/_comment.html.haml b/app/views/comments/_comment.html.haml index 56252c83d..4252d9762 100644 --- a/app/views/comments/_comment.html.haml +++ b/app/views/comments/_comment.html.haml @@ -9,4 +9,4 @@ = link_to post.person.real_name, post.person = auto_link sanitize post.text %div.time - = "#{time_ago_in_words(post.updated_at)} ago" + = "#{time_ago_in_words(post.updated_at)} #{t('.ago')}" diff --git a/app/views/comments/_new_comment.html.haml b/app/views/comments/_new_comment.html.haml index e998d98b7..a4268082d 100644 --- a/app/views/comments/_new_comment.html.haml +++ b/app/views/comments/_new_comment.html.haml @@ -9,4 +9,4 @@ = f.text_area :text, :rows => 1, :id => "comment_text_on_#{post.id}", :class => "comment_box" = f.hidden_field :post_id, :value => post.id %p{:style => "text-align:right;"} - = f.submit "Comment", :class => "comment_submit button" + = f.submit t('.comment'), :class => "comment_submit button" From 64d371d9d60e13c932b6090e06cbc86cc624fbc2 Mon Sep 17 00:00:00 2001 From: maxwell Date: Mon, 20 Sep 2010 11:30:08 -0700 Subject: [PATCH 46/79] MS added a warning for account --- app/views/devise/sessions/new.html.haml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index 1840d7acc..7ce75f5f3 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -1,3 +1,9 @@ +%h1 + This is a technology preview, do not provide any private information. +%h3 + your account may be deleted until we move into a more stable development period. +%h3 + USE AT YOUR OWN RISK!! = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| #user %p.username @@ -14,6 +20,7 @@ / = f.check_box :remember_me / = f.label :remember_me = f.submit "Sign in" + = link_to "Have a problem? Find an answer here", 'http://diaspora.shapado.com/' %p = render :partial => "devise/shared/links" From fe306b37ab71c25f21b8d22ed27316f419f3aaf0 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Mon, 20 Sep 2010 11:30:27 -0700 Subject: [PATCH 47/79] DG IZ; mass-assignment quick-fix in controllers --- app/controllers/albums_controller.rb | 17 +++++++++++-- app/controllers/aspects_controller.rb | 12 +++++++++- app/controllers/dev_utilities_controller.rb | 18 -------------- app/controllers/photos_controller.rb | 24 +++++++++++++++++-- app/controllers/registrations_controller.rb | 2 -- app/controllers/status_messages_controller.rb | 13 +++++++++- app/controllers/users_controller.rb | 19 ++++++++++++--- app/models/aspect.rb | 1 + app/views/users/edit.html.haml | 4 ---- 9 files changed, 77 insertions(+), 33 deletions(-) diff --git a/app/controllers/albums_controller.rb b/app/controllers/albums_controller.rb index dbd59c64e..281c83b5c 100644 --- a/app/controllers/albums_controller.rb +++ b/app/controllers/albums_controller.rb @@ -16,7 +16,10 @@ class AlbumsController < ApplicationController def create aspect = params[:album][:to] - @album = current_user.post(:album, params[:album]) + + data = clean_hash(params[:album]) + + @album = current_user.post(:album, data) flash[:notice] = "You've created an album called #{@album.name}." redirect_to :action => :show, :id => @album.id, :aspect => aspect end @@ -47,7 +50,10 @@ class AlbumsController < ApplicationController def update @album = current_user.album_by_id params[:id] - if @album.update_attributes params[:album] + + data = clean_hash(params[:album]) + + if @album.update_attributes data flash[:notice] = "Album #{@album.name} successfully edited." respond_with @album else @@ -56,4 +62,11 @@ class AlbumsController < ApplicationController end end + private + def clean_hash(params) + return { + :name => params[:name], + :to => params[:to] + } + end end diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index ab144ad12..afd6b016f 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -52,7 +52,9 @@ class AspectsController < ApplicationController def update @aspect = Aspect.find_by_id(params[:id]) - @aspect.update_attributes(params[:aspect]) + + data = clean_hash(params[:aspect]) + @aspect.update_attributes( data ) flash[:notice] = "Your aspect, #{@aspect.name}, has been successfully edited." respond_with @aspect end @@ -83,4 +85,12 @@ class AspectsController < ApplicationController respond_with Person.first(:id => params[:friend_id]) end end + + private + def clean_hash(params) + return { + :name => params[:name] + } + end + end diff --git a/app/controllers/dev_utilities_controller.rb b/app/controllers/dev_utilities_controller.rb index bcb0dd4f7..30d1a1799 100644 --- a/app/controllers/dev_utilities_controller.rb +++ b/app/controllers/dev_utilities_controller.rb @@ -7,24 +7,6 @@ class DevUtilitiesController < ApplicationController before_filter :authenticate_user!, :except => [:set_backer_number] include ApplicationHelper include RequestsHelper -def warzombie - render :nothing => true - if current_user.email == "tom@tom.joindiaspora.com" && StatusMessage.where(:message => "There's a bomb in the lasagna!?").first == nil - current_user.post(:status_message, :message => "There's a bomb in the lasagna!?") - current_user.post(:status_message, :message => "xkcd \nhttp://xkcd.com/743/" ) - current_user.post(:status_message, :message => "I switched to Motoroi today, a Motorola Android-based phone, in Korea. Now, I am using Android phones in both the U.S. and Korea", :created_at => Time.now-930) - current_user.post(:status_message, :message => "I had 5 hours to study for it :-( GREs on Thursday. Wunderbar.", :created_at => Time.now-43990) - current_user.post(:status_message, :message => "Spotted in toy story 3: google maps, OSX, and windows XP. Two out of three isn't bad.", :created_at => Time.now-4390) - current_user.post(:status_message, :message => "Reddit\nhttp://reddit.com", :created_at => Time.now-54390) - current_user.post(:status_message, :message => "Commercials for IE make me SO MAD and my friends just don't get why.", :created_at => Time.now-30900) - current_user.post(:status_message, :message => "Zombo.com\nhttp://zombo.com", :created_at => Time.now-9090) - current_user.post(:status_message, :message => "Why do I have \"No More Heroes\" by Westlife on repeat all day?", :created_at => Time.now-590000) - current_user.post(:status_message, :message => "Mmm. Friday night. Acknowledged.", :created_at => Time.now-503900) - current_user.post(:status_message, :message => "Getting a universal remote is the epitome of laziness, I do declare.", :created_at => Time.now-4400) - current_user.post(:status_message, :message => "Does anyone know how to merge two Skype contact entries of the same person? (i.e. one Skype ID and one mobile number)", :created_at => Time.now-400239) - current_user.post(:status_message, :message => "A cool, cool morning for once.", :created_at => Time.now-150000) - end - end def zombiefriends render :nothing => true diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index cefc8f5d6..b77341820 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -33,7 +33,11 @@ class PhotosController < ApplicationController params[:user_file] = file - @photo = current_user.post(:photo, params) + + data = clean_hash(params) + + + @photo = current_user.post(:photo, data) respond_to do |format| format.json{render(:layout => false , :json => {"success" => true, "data" => @photo}.to_json )} @@ -83,7 +87,10 @@ class PhotosController < ApplicationController def update @photo = Photo.find_by_id params[:id] - if @photo.update_attributes params[:photo] + + data = clean_hash(params) + + if @photo.update_attributes data[:photo] flash[:notice] = "Photo successfully updated." respond_with @photo else @@ -91,4 +98,17 @@ class PhotosController < ApplicationController render :action => :edit end end + + + private + def clean_hash(params) + return { + :photo => { + :caption => params[:photo][:caption], + }, + :album_id => params[:album_id], + :user_file => params[:user_file] + } + end + end diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 8241aa294..d1f0718bc 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -15,9 +15,7 @@ class RegistrationsController < Devise::RegistrationsController flash[:error] = e.message end if user - #set_flash_message :notice, :signed_up flash[:notice] = "You've joined Diaspora!" - #redirect_to root_url sign_in_and_redirect(:user, user) else redirect_to new_user_registration_path diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb index 5a588fb99..305194a8f 100644 --- a/app/controllers/status_messages_controller.rb +++ b/app/controllers/status_messages_controller.rb @@ -11,7 +11,10 @@ class StatusMessagesController < ApplicationController def create params[:status_message][:to] = params[:aspect_ids] - @status_message = current_user.post(:status_message, params[:status_message]) + + data = clean_hash params[:status_message] + + @status_message = current_user.post(:status_message, data) respond_with @status_message end @@ -25,4 +28,12 @@ class StatusMessagesController < ApplicationController @status_message = StatusMessage.find_by_id params[:id] respond_with @status_message end + + private + def clean_hash(params) + return { + :message => params[:message], + :to => params[:to] + } + end end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 72666bc30..dbb69d1a2 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -17,14 +17,15 @@ class UsersController < ApplicationController def update @user = current_user - prep_image_url(params[:user]) - @user.update_profile params[:user] + data = clean_hash params[:user] + prep_image_url(data) + + @user.update_profile data respond_with(@user, :location => root_url) end private - def prep_image_url(params) if params[:profile][:image_url].empty? params[:profile].delete(:image_url) @@ -32,4 +33,16 @@ class UsersController < ApplicationController params[:profile][:image_url] = "http://" + request.host + ":" + request.port.to_s + params[:profile][:image_url] end end + + def clean_hash(params) + return { + :profile => + { + :first_name => params[:profile][:first_name], + :last_name => params[:profile][:last_name], + :image_url => params[:profile][:image_url] + } + } + end + end diff --git a/app/models/aspect.rb b/app/models/aspect.rb index 96f94e8fe..b60142671 100644 --- a/app/models/aspect.rb +++ b/app/models/aspect.rb @@ -39,5 +39,6 @@ class Aspect } } end + end diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index cddec8d77..fd94b2a42 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -53,10 +53,6 @@ = p.label :last_name = p.text_field :last_name, :value => @profile.last_name - %p - = f.label :email - = f.text_field :email - #submit_block = link_to "Cancel", root_path or From 5d1fdcaf3af6e2c7514096dabf089f9fc6476b4c Mon Sep 17 00:00:00 2001 From: maxwell Date: Mon, 20 Sep 2010 11:38:24 -0700 Subject: [PATCH 48/79] MS fixing bug #67. stripping whitespace from search --- app/models/person.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/person.rb b/app/models/person.rb index 6a328dff8..72f4c46b9 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -35,6 +35,7 @@ class Person /^(https?):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\.[a-z]{2,5})?(:[0-9]{1,5})?(\/.*)?$/ix def self.search(query) + query = query.to_s.strip Person.all('profile.first_name' => /^#{query}/i) | Person.all('profile.last_name' => /^#{query}/i) end From eeb132d82553408998585641f4d585d4f9444b4f Mon Sep 17 00:00:00 2001 From: Arnaud Delcasse Date: Mon, 20 Sep 2010 03:26:19 +0800 Subject: [PATCH 49/79] Writing "Already friends" instead of proposing to add people that we already added successfully or accepted in the search results. --- app/views/people/_person.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/people/_person.html.haml b/app/views/people/_person.html.haml index ef1c69d28..646d0b333 100644 --- a/app/views/people/_person.html.haml +++ b/app/views/people/_person.html.haml @@ -2,7 +2,6 @@ -# licensed under the Affero General Public License version 3. See -# the COPYRIGHT file. - %li.message{:id => person.id} = person_image_link(person) @@ -17,6 +16,8 @@ .right{ :style => "display:inline;top:0;" } - if person.id == current_user.person.id thats you! + - elsif current_user.friends.include?(person) + Already friends - elsif current_user.pending_requests.find_by_person_id(person.id) = link_to "pending request", aspects_manage_path - else From 0869ea6a6a9c24c728ecf7e247586afb5fe6089c Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 20 Sep 2010 12:51:33 -0700 Subject: [PATCH 50/79] Adjust readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 066e4171c..c9fc4c6c8 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ Once mongo is running and bundler has finished, run `bundle exec thin start` fro ### Run the websocket server run `bundle exec ruby ./script/websocket_server` to start the websocket server on port 8080. Change the port in config/app_config.yml. -### Logging in +### Logging in with a sample user Run `rake db:seed:tom`, then login with user `tom` and password `evankorth`. More details in db/seeds/tom.rb. From 747f7d11a052ae02ed02b42b3bd68b03d65ff965 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 20 Sep 2010 12:51:47 -0700 Subject: [PATCH 51/79] Move thin yml back to development mode --- config/thin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/thin.yml b/config/thin.yml index b0a3abf8d..ad91436c1 100644 --- a/config/thin.yml +++ b/config/thin.yml @@ -13,7 +13,7 @@ max_conns: 1024 require: [] max_persistent_conns: 512 -environment: production +environment: development servers: 1 daemonize: true #chdir: /usr/applications/localhash/current From 5b6215db77eac18053206843f7c742d84f9da662 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 20 Sep 2010 12:59:01 -0700 Subject: [PATCH 52/79] Replicating a bunch of Pistos' commits, because the HEADs diverged --- README.md | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c9fc4c6c8..14a380586 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ We need you to fill out a [contributor agreement form](https://spreadsheets.goog All commits must be tested, and after each commit, all tests should be green before a pull request is sent. Please write your tests in Rspec. -GEMS: We would like to keep external dependencies unduplicated. We're using Nokogiri, and Mongomapper, and EM::HttpRequest as much as possible. We have a few gems in the project we'd rather not use, but if you can, use dependencies we already have. +GEMS: We would like to keep external dependencies unduplicated. We're using Nokogiri, Mongomapper, and EM::HttpRequest as much as possible. We have a few gems in the project we'd rather not use, but if you can, use dependencies we already have. # Diaspora @@ -69,22 +69,28 @@ If you're on **Mac OS X**, you already have Ruby on your system. Yay! ### MongoDB -To install MongoDB on **Ubuntu**, add the official MongoDB repository from this link: - -http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages +To install MongoDB on **Ubuntu**, add the official MongoDB repository [here](http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages). For Lucid, add the following line to your /etc/apt/sources.list (for other distros, see http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages): deb http://downloads.mongodb.org/distros/ubuntu 10.4 10gen -And then run: +Then run: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 sudo apt-get update sudo apt-get install mongodb-stable You can also run the binary directly by doing the following: -If you're running a 32-bit system, run `wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz`. If you're running a 64-bit system, run `wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.6.2.tgz`. +If you're running a 32-bit system, run: + + wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz + +If you're running a 64-bit system, run: + + wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.6.2.tgz + +Then run: # extract tar xzf mongodb-linux-i686-1.4.0.tgz @@ -193,11 +199,11 @@ To start the app server for the first time, you need to use Bundler to install D ### Start Mongo If you installed the Ubuntu package, MongoDB should already be running (if not, run `service mongodb start`). If you installed the binary manually, run `sudo mongod` from where mongo is installed to start mongo. -If you installed the Fedora package, MongoDB will need to be started via `service mongodb start`. If you installed the binary manually, run `sudo mongod` from where mongo is installed to start mongo. +If you installed the Fedora package, MongoDB will need to be started via `service mongodb start`. If you installed the binary manually, run `sudo mongod` from where Mongo is installed to start Mongo. If you installed the OsX package through "brew", MongoDB will need to be started via `sudo launchctl load /Library/LaunchDaemons/org.mongodb.mongod.plist`. (before you have to go to /Library/LaunchDaemons and add a symlink to /usr/local/Cellar/mongodb/1.6.2-x86_64/org.mongodb.mongod.plist) -Diaspora will not run unless mongo is running. Mongo will not run by default, and will need to be started every time you wish to use or run the test suite for Diaspora. +Diaspora will not run unless Mongo is running. Mongo will not run by default, and will need to be started every time you wish to use or run the test suite for Diaspora. ### Run the server `./script/server` will start both thin and the websocket server. If you want to run a different app server, you will have to run them separately. See below for instructions. @@ -223,9 +229,10 @@ Ongoing discussion: - [Diaspora Developer Google Group](http://groups.google.com/group/diaspora-dev) - [Diaspora Discussion Google Group](http://groups.google.com/group/diaspora-discuss) - [Diaspora Q&A site](http://diaspora.shapado.com/) -- [#diaspora-dev](irc://irc.freenode.net/#diaspora-dev) +- [#diaspora-dev IRC channel](irc://irc.freenode.net/#diaspora-dev) + ([join via the web client](http://webchat.freenode.net?channels=diaspora-dev)) -More general info and updates about the project can be found on our [blog](http://joindiaspora.com), [twitter](http://twitter.com/joindiaspora). Also, be sure to join the official [mailing list](http://http://eepurl.com/Vebk). +More general info and updates about the project can be found on our [blog](http://joindiaspora.com), [and on Twitter](http://twitter.com/joindiaspora). Also, be sure to join the official [mailing list](http://http://eepurl.com/Vebk). If you wish to contact us privately about any exploits in Diaspora you may find, you can email [exploits@joindiaspora.com](mailto:exploits@joindiaspora.com). From cbbf3337a38ea88795522353490fcd9cfef85a9a Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 20 Sep 2010 13:00:19 -0700 Subject: [PATCH 53/79] Readme style conformance --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 14a380586..0bc06f27f 100644 --- a/README.md +++ b/README.md @@ -84,11 +84,11 @@ You can also run the binary directly by doing the following: If you're running a 32-bit system, run: - wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz + wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz If you're running a 64-bit system, run: - wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.6.2.tgz + wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.6.2.tgz Then run: From 782373cc510bdfde1bc71171821cc5bfe9d5115c Mon Sep 17 00:00:00 2001 From: Michael Kaeufl Date: Tue, 21 Sep 2010 01:40:37 +0800 Subject: [PATCH 54/79] de translation: wieder -> erneut --- config/locales/devise.de.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/devise.de.yml b/config/locales/devise.de.yml index 34947cbc2..0119a9214 100644 --- a/config/locales/devise.de.yml +++ b/config/locales/devise.de.yml @@ -17,7 +17,7 @@ de: locked: 'Dein Konto ist gesperrt.' invalid: 'Ungültige E-Mail-Adresse oder Passwort.' invalid_token: 'Ungültiger Authentifizierungstoken.' - timeout: 'Deine Sitzung ist abgelaufen, bitte melde dich wieder an um fortzufahren.' + timeout: 'Deine Sitzung ist abgelaufen, bitte melde dich erneut an um fortzufahren.' inactive: 'Dein Konto wurde noch nicht aktiviert.' sessions: signed_in: 'Erfolgreich angemeldet.' From 3f12b8b675fcbf3038dd7d958d7fe4530d85321a Mon Sep 17 00:00:00 2001 From: Michael Kaeufl Date: Tue, 21 Sep 2010 01:41:14 +0800 Subject: [PATCH 55/79] =?UTF-8?q?de=20translation:=20abgemeldet=20->=20gek?= =?UTF-8?q?=C3=BCndigt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/devise.de.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/devise.de.yml b/config/locales/devise.de.yml index 0119a9214..7c0e0e758 100644 --- a/config/locales/devise.de.yml +++ b/config/locales/devise.de.yml @@ -31,7 +31,7 @@ de: registrations: signed_up: 'Du hast dich erfolgreich registriert. Sofern aktiviert, wurde dir eine Bestätigung per E-Mail gesendet.' updated: 'Dein Konto wurde aktualisiert.' - destroyed: 'Tschüss! Dein Konto wurde erfolgreich abgemeldet. Wir hoffen dich bald wiederzusehen.' + destroyed: 'Tschüss! Dein Konto wurde erfolgreich gekündigt. Wir hoffen dich bald wiederzusehen.' unlocks: send_instructions: 'Du wirst in ein paar Minuten eine E-Mail erhalten, die beschreibt, wie du dein Konto entsperren kannst.' unlocked: 'Dein Konto wurde erfolgreich entsperrt. Du bist nun angemeldet.' From 12f667e1b6a6a6e956bc728c7192d84a4951c2a6 Mon Sep 17 00:00:00 2001 From: Michael Kaeufl Date: Tue, 21 Sep 2010 03:39:56 +0800 Subject: [PATCH 56/79] de: Ausloggen -> Abmelden --- config/locales/de.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/de.yml b/config/locales/de.yml index 23617a3f3..da4882148 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -11,7 +11,7 @@ de: layouts: application: edit_profile: "Profil bearbeiten" - logout: "Ausloggen" + logout: "Abmelden" shared: aspect_nav: all_aspects: "Alle Aspekte" From 3b59175f43c5dfa9ba6d17d9bb39226b2b5f51d1 Mon Sep 17 00:00:00 2001 From: Michael Kaeufl Date: Tue, 21 Sep 2010 04:00:44 +0800 Subject: [PATCH 57/79] fix in header --- config/locales/de.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/de.yml b/config/locales/de.yml index da4882148..093df3466 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -3,7 +3,7 @@ # the COPYRIGHT file. -# Sample localization file for English. Add more files in this directory for other locales. +# Localization file for German. Add more files in this directory for other locales. # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. de: From af9cda52afea5e96c2210f7185f15a9d5eba5d87 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Mon, 20 Sep 2010 13:18:11 -0700 Subject: [PATCH 58/79] DG IZ; always query through the current_user in the controllers. --- app/controllers/albums_controller.rb | 11 +++++------ app/controllers/aspects_controller.rb | 16 ++++++++-------- app/controllers/comments_controller.rb | 5 ----- app/controllers/people_controller.rb | 2 +- app/controllers/photos_controller.rb | 10 +++++----- app/controllers/status_messages_controller.rb | 4 ++-- lib/diaspora/user/querying.rb | 13 +++++-------- spec/models/user/visible_posts_spec.rb | 13 +++++++++++++ 8 files changed, 39 insertions(+), 35 deletions(-) diff --git a/app/controllers/albums_controller.rb b/app/controllers/albums_controller.rb index 281c83b5c..c6cf7a829 100644 --- a/app/controllers/albums_controller.rb +++ b/app/controllers/albums_controller.rb @@ -15,7 +15,7 @@ class AlbumsController < ApplicationController end def create - aspect = params[:album][:to] + aspect = params[:album][:to] data = clean_hash(params[:album]) @@ -29,7 +29,7 @@ class AlbumsController < ApplicationController end def destroy - @album = current_user.album_by_id params[:id] + @album = current_user.find_visible_post_by_id params[:id] @album.destroy flash[:notice] = "Album #{@album.name} deleted." respond_with :location => albums_url @@ -37,19 +37,18 @@ class AlbumsController < ApplicationController def show @photo = Photo.new - @album = Album.find_by_id params[:id] + @album = current_user.find_visible_post_by_id( params[:id] ) @album_photos = @album.photos - respond_with @album end def edit - @album = current_user.album_by_id params[:id] + @album = current_user.find_visible_post_by_id params[:id] redirect_to @album unless current_user.owns? @album end def update - @album = current_user.album_by_id params[:id] + @album = current_user.find_visible_post_by_id params[:id] data = clean_hash(params[:album]) diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index 14aa9e7b8..520485d33 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -25,7 +25,7 @@ class AspectsController < ApplicationController end def destroy - @aspect = Aspect.find_by_id params[:id] + @aspect = current_user.aspect_by_id params[:id] begin current_user.drop_aspect @aspect @@ -38,7 +38,7 @@ class AspectsController < ApplicationController end def show - @aspect = Aspect.find_by_id params[:id] + @aspect = current_user.aspect_by_id params[:id] @friends = @aspect.people @posts = current_user.visible_posts( :by_members_of => @aspect ).paginate :per_page => 15, :order => 'created_at DESC' @@ -51,7 +51,7 @@ class AspectsController < ApplicationController end def update - @aspect = Aspect.find_by_id(params[:id]) + @aspect = current_user.aspect_by_id(params[:id]) data = clean_hash(params[:aspect]) @aspect.update_attributes( data ) @@ -63,26 +63,26 @@ class AspectsController < ApplicationController params[:moves].each{ |move| move = move[1] unless current_user.move_friend(move) - flash[:error] = "Aspect editing failed for friend #{Person.find_by_id( move[:friend_id] ).real_name}." - redirect_to Aspect.first, :action => "edit" + flash[:error] = "Aspect editing failed for friend #{current_user.visible_person_by_id( move[:friend_id] ).real_name}." + redirect_to aspects_manage_path return end } flash[:notice] = "Aspects edited successfully." - redirect_to Aspect.first, :action => "edit" + redirect_to aspects_manage_path end def move_friend unless current_user.move_friend( :friend_id => params[:friend_id], :from => params[:from], :to => params[:to][:to]) flash[:error] = "didn't work #{params.inspect}" end - if aspect = Aspect.first(:id => params[:to][:to]) + if aspect = current_user.aspect_by_id(params[:to][:to]) flash[:notice] = "You are now showing your friend a different aspect of yourself." respond_with aspect else flash[:notice] = "You are now showing your friend a different aspect of yourself." - respond_with Person.first(:id => params[:friend_id]) + respond_with current_user.visible_person_by_id(params[:friend_id]) end end diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index dc115ab5b..4caeb1414 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -17,9 +17,4 @@ class CommentsController < ApplicationController render :nothing => true end - def show - @comment = Comment.find_by_id params[:id] - respond_with @comment - end - end diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index d85c67691..08acdd424 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -22,7 +22,7 @@ class PeopleController < ApplicationController @profile = @person.profile @aspects_with_person = current_user.aspects_with_person(@person) @aspects_dropdown_array = current_user.aspects.collect{|x| [x.to_s, x.id]} - @posts = current_user.visible_posts_from_others(:from => @person).paginate :page => params[:page], :order => 'created_at DESC' + @posts = current_user.visible_posts(:from => @person).paginate :page => params[:page], :order => 'created_at DESC' @latest_status_message = current_user.raw_visible_posts.find_all_by__type_and_person_id("StatusMessage", params[:id]).last @post_count = @posts.count respond_with @person diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index b77341820..8fa7a3bdf 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -65,28 +65,28 @@ class PhotosController < ApplicationController end def destroy - @photo = Photo.find_by_id params[:id] + @photo = current_user.find_visible_post_by_id params[:id] + @photo.destroy flash[:notice] = "Photo deleted." respond_with :location => @photo.album end def show - @photo = Photo.find_by_id params[:id] + @photo = current_user.find_visible_post_by_id params[:id] @album = @photo.album - respond_with @photo, @album end def edit - @photo = Photo.find_by_id params[:id] + @photo = current_user.find_visible_post_by_id params[:id] @album = @photo.album redirect_to @photo unless current_user.owns? @album end def update - @photo = Photo.find_by_id params[:id] + @photo = current_user.find_visible_post_by_id params[:id] data = clean_hash(params) diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb index 305194a8f..5a8efbe06 100644 --- a/app/controllers/status_messages_controller.rb +++ b/app/controllers/status_messages_controller.rb @@ -19,13 +19,13 @@ class StatusMessagesController < ApplicationController end def destroy - @status_message = StatusMessage.find_by_id params[:id] + @status_message = current_user.find_visible_post_by_id params[:id] @status_message.destroy respond_with :location => root_url end def show - @status_message = StatusMessage.find_by_id params[:id] + @status_message = current_user.find_visible_post_by_id params[:id] respond_with @status_message end diff --git a/lib/diaspora/user/querying.rb b/lib/diaspora/user/querying.rb index ad023f2fb..00ae27735 100644 --- a/lib/diaspora/user/querying.rb +++ b/lib/diaspora/user/querying.rb @@ -7,14 +7,9 @@ module Diaspora module UserModules module Querying - def visible_posts_from_others(opts ={}) - if opts[:from].class == Person - Post.where(:person_id => opts[:from].id, :_id.in => self.visible_post_ids) - elsif opts[:from].class == Aspect - Post.where(:_id.in => opts[:from].post_ids) unless opts[:from].user != self - else - Post.where(:_id.in => self.visible_post_ids) - end + + def find_visible_post_by_id( id ) + self.raw_visible_posts.find id end def visible_posts( opts = {} ) @@ -22,6 +17,8 @@ module Diaspora return raw_visible_posts if opts[:by_members_of] == :all aspect = self.aspects.find_by_id( opts[:by_members_of].id ) aspect.posts + elsif opts[:from] + self.raw_visible_posts.find_all_by_person_id(opts[:from].id, :order => 'created_at DESC') end end diff --git a/spec/models/user/visible_posts_spec.rb b/spec/models/user/visible_posts_spec.rb index ffb220531..5c44a2ce8 100644 --- a/spec/models/user/visible_posts_spec.rb +++ b/spec/models/user/visible_posts_spec.rb @@ -45,6 +45,19 @@ describe User do @user.visible_posts(:by_members_of => @aspect2).include?(status_message3).should be true end + describe 'querying' do + + it 'should find a visible post by id' do + status_message1 = @user.post :status_message, :message => "hi", :to => @aspect.id + status_message2 = @user2.post :status_message, :message => "heyyyy", :to => @user2_aspect.id + status_message3 = @user3.post :status_message, :message => "yooo", :to => @user3_aspect.id + + @user.find_visible_post_by_id(status_message1.id).should == status_message1 + @user2.find_visible_post_by_id(status_message1.id).should == nil + end + + end + describe 'albums' do before do @album = @user.post :album, :name => "Georges", :to => @aspect.id From 4fe4326ed1b7b8e58f340eadf316204d30122ec0 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Mon, 20 Sep 2010 15:00:02 -0700 Subject: [PATCH 59/79] DG IZ photo uploading now works --- app/controllers/photos_controller.rb | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index 8fa7a3bdf..42b00007c 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -12,6 +12,7 @@ class PhotosController < ApplicationController def create album = Album.find_by_id params[:album_id] + puts params begin @@ -102,13 +103,18 @@ class PhotosController < ApplicationController private def clean_hash(params) - return { - :photo => { - :caption => params[:photo][:caption], - }, - :album_id => params[:album_id], - :user_file => params[:user_file] - } + if params[:photo] + return { + :photo => { + :caption => params[:photo][:caption], + } + } + else + return{ + :album_id => params[:album_id], + :user_file => params[:user_file] + } + end end end From 5e2fdedf8bb9ef0749dc79cda3ba558e55af5658 Mon Sep 17 00:00:00 2001 From: maxwell Date: Mon, 20 Sep 2010 15:07:30 -0700 Subject: [PATCH 60/79] MS removed another logging of encrypted data.... --- app/controllers/publics_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/publics_controller.rb b/app/controllers/publics_controller.rb index 6f2b09c43..72f8a0dfc 100644 --- a/app/controllers/publics_controller.rb +++ b/app/controllers/publics_controller.rb @@ -35,7 +35,7 @@ class PublicsController < ApplicationController begin @user = Person.first(:id => params[:id]).owner rescue NoMethodError => e - Rails.logger.error("Received post #{params[:xml]} for nonexistent person #{params[:id]}") + Rails.logger.error("Received post for nonexistent person #{params[:id]}") return end @user.receive_salmon params[:xml] From 5bb4ee5d3660977ac35e79ffa9aee4f45737c82c Mon Sep 17 00:00:00 2001 From: danielvincent Date: Mon, 20 Sep 2010 15:15:37 -0700 Subject: [PATCH 61/79] DG IZ; posting now ensures aspect ownership. --- app/models/user.rb | 3 +++ spec/models/user/posting_spec.rb | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/app/models/user.rb b/app/models/user.rb index f0481341a..e02c58534 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -105,7 +105,10 @@ class User end aspect_ids = [aspect_ids.to_s] if aspect_ids.is_a? BSON::ObjectId + raise ArgumentError.new("You must post to someone.") if aspect_ids.nil? || aspect_ids.empty? + aspect_ids.each{ |aspect_id| + raise ArgumentError.new("Cannot post to an aspect you do not own.") unless self.aspects.find(aspect_id) } post = build_post(class_name, options) diff --git a/spec/models/user/posting_spec.rb b/spec/models/user/posting_spec.rb index b1f6f71a8..d00747a2d 100644 --- a/spec/models/user/posting_spec.rb +++ b/spec/models/user/posting_spec.rb @@ -30,6 +30,10 @@ describe User do proc {@user.post(:status_message, :message => "heyheyhey")}.should raise_error /You must post to someone/ end + it 'should not be able to post to someone elses aspect' do + proc {@user.post(:status_message, :message => "heyheyhey", :to => @aspect2.id)}.should raise_error /Cannot post to an aspect you do not own./ + end + it 'should put the post in the aspect post array' do post = @user.post(:status_message, :message => "hey", :to => @aspect.id) @aspect.reload From fb2f027b24d64ffe38700d4f80ab19dd11fbfa15 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Mon, 20 Sep 2010 15:25:19 -0700 Subject: [PATCH 62/79] DG IZ; escape regex characters in Person.search --- app/models/person.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/person.rb b/app/models/person.rb index 72f4c46b9..74079ff93 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -35,7 +35,7 @@ class Person /^(https?):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\.[a-z]{2,5})?(:[0-9]{1,5})?(\/.*)?$/ix def self.search(query) - query = query.to_s.strip + query = Regexp.escape( query.to_s.strip ) Person.all('profile.first_name' => /^#{query}/i) | Person.all('profile.last_name' => /^#{query}/i) end From cb0f0b72eb0e3fc0e65d234c6b0d20a2a76f06b7 Mon Sep 17 00:00:00 2001 From: maxwell Date: Mon, 20 Sep 2010 15:32:18 -0700 Subject: [PATCH 63/79] MS removed a log and trying to be slightly more pedantic --- app/controllers/publics_controller.rb | 4 +++- app/helpers/requests_helper.rb | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/publics_controller.rb b/app/controllers/publics_controller.rb index 72f8a0dfc..b6c03ff62 100644 --- a/app/controllers/publics_controller.rb +++ b/app/controllers/publics_controller.rb @@ -33,7 +33,9 @@ class PublicsController < ApplicationController render :nothing => true return unless params[:xml] begin - @user = Person.first(:id => params[:id]).owner + person = Person.first(:id => params[:id]) + puts person.real_name + @user = person.owner rescue NoMethodError => e Rails.logger.error("Received post for nonexistent person #{params[:id]}") return diff --git a/app/helpers/requests_helper.rb b/app/helpers/requests_helper.rb index 32ce79fd9..52955fc94 100644 --- a/app/helpers/requests_helper.rb +++ b/app/helpers/requests_helper.rb @@ -33,6 +33,7 @@ module RequestsHelper def relationship_flow(identifier) action = :none person = nil + puts identifier person = Person.by_webfinger identifier if person action = (person == current_user.person ? :none : :friend) From fc9cddc7b834228ddeac1f4106bb220e9d1c3582 Mon Sep 17 00:00:00 2001 From: maxwell Date: Mon, 20 Sep 2010 15:40:43 -0700 Subject: [PATCH 64/79] make the remote tom work --- db/seeds/tom.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/seeds/tom.rb b/db/seeds/tom.rb index 2e06913f2..61b2ad44f 100644 --- a/db/seeds/tom.rb +++ b/db/seeds/tom.rb @@ -7,7 +7,7 @@ require 'config/environment' remote_url = "http://tom.joindiaspora.com/" -remote_url = "http://localhost:3000/" +#remote_url = "http://localhost:3000/" # Create seed user user = User.instantiate!( :email => "tom@tom.joindiaspora.com", :username => "tom", From 40c96fc6194b265647d927a1e58e071ae79237f8 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Mon, 20 Sep 2010 15:53:56 -0700 Subject: [PATCH 65/79] DG IZ; click to edit rollover text on aspect manage page --- app/views/aspects/manage.html.haml | 6 ++++-- app/views/shared/_sub_header.haml | 2 +- public/stylesheets/application.css | 10 ++++++++++ public/stylesheets/sass/application.sass | 13 +++++++++++++ 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/app/views/aspects/manage.html.haml b/app/views/aspects/manage.html.haml index c579671e1..656f0cb96 100644 --- a/app/views/aspects/manage.html.haml +++ b/app/views/aspects/manage.html.haml @@ -38,7 +38,9 @@ %li.aspect .aspect_name - %h1{:contenteditable => true}= aspect.name + %span.edit_name_field + %h1{:contenteditable => true}= aspect.name + %span.tip click to edit %ul.tools %li= link_to "add a new friend", "#add_request_pane_#{aspect.id}", :class => 'add_request_button' @@ -56,7 +58,7 @@ %li.person{:id => person.id, :from_aspect_id => aspect.id} = person_image_tag(person) .name - = person.real_name + = link_to person.real_name, person .yo{:style => 'display:none'} %div{:id => "add_request_pane_#{aspect.id}"} = render "requests/new_request", :aspect => aspect diff --git a/app/views/shared/_sub_header.haml b/app/views/shared/_sub_header.haml index badf8783d..4e0e2aca4 100644 --- a/app/views/shared/_sub_header.haml +++ b/app/views/shared/_sub_header.haml @@ -9,7 +9,7 @@ - if @aspect == :all = link_to "All Aspects", root_path - elsif @aspect == :manage - = link_to "Manage Aspects", root_path + = "Manage Aspects" - else = link_to @aspect.name, @aspect diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 98893cabb..60b50a9f4 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -520,6 +520,16 @@ h1.big_text { .requests h1, .remove h1 { display: inline-block; } + .aspect .tip, + .requests .tip, + .remove .tip { + display: none; + color: #999999; + margin-left: 0.5em; } + .aspect .edit_name_field:hover .tip, + .requests .edit_name_field:hover .tip, + .remove .edit_name_field:hover .tip { + display: inline; } .aspect .aspect_name, .requests .aspect_name, .remove .aspect_name { diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 5edc89135..80debac15 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -694,6 +694,19 @@ h1.big_text h1 :display inline-block + .tip + :display none + :color #999 + :margin + :left 0.5em + + .edit_name_field:hover + .tip + :display inline + + + + .aspect_name :position relative From 9f63dd9b69229a5c08b1b10e7a489c21d22ebbef Mon Sep 17 00:00:00 2001 From: maxwell Date: Mon, 20 Sep 2010 15:55:11 -0700 Subject: [PATCH 66/79] MS added another message in the readme about not using mod_rails, as mod_rails does not work with EventMachine --- README.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0bc06f27f..9bff999fb 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,10 @@ The privacy aware, personally controlled, do-it-all, open source social network. Also, we really want to continue to focus on features and improving the code base. When we think it is ready for general use, we will post more detailed instructions. +## Notice +We currently run Diaspora with the [thin](http://code.macournoyer.com/thin/) as our webserver, behind [nginx](http://wiki.nginx.org/Main). Diaspora uses the asynchronous feature of [EventMachine](http://rubyeventmachine.com/) +Because our websocket server and message queue both work using the power of the [Reactor](http://en.wikipedia.org/wiki/Reactor_pattern) pattern. If you use mod_rails, mongrel, or another non-eventmachine based application server, federation and/or websockets may not work. +We will try and fully support more webservers later, but that is what works for now. These instructions are for machines running [Ubuntu](http://www.ubuntu.com/), [Fedora](http://www.fedoraproject.org) or Mac OS X. We are developing Diaspora for the latest and greatest browsers, so please update your Firefox, Chrome or Safari to the latest and greatest. @@ -235,14 +239,3 @@ Ongoing discussion: More general info and updates about the project can be found on our [blog](http://joindiaspora.com), [and on Twitter](http://twitter.com/joindiaspora). Also, be sure to join the official [mailing list](http://http://eepurl.com/Vebk). If you wish to contact us privately about any exploits in Diaspora you may find, you can email [exploits@joindiaspora.com](mailto:exploits@joindiaspora.com). - - -## License -Copyright 2010 Diaspora Inc. - -Diaspora is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - -Diaspora is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License along with Diaspora. If not, see . - From 788ed3aac25aff4af417a0122ac9361a6f2a92f7 Mon Sep 17 00:00:00 2001 From: maxwell Date: Mon, 20 Sep 2010 15:58:09 -0700 Subject: [PATCH 67/79] small typo in readme --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9bff999fb..2c75561c1 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,10 @@ Also, we really want to continue to focus on features and improving the code bas ready for general use, we will post more detailed instructions. ## Notice -We currently run Diaspora with the [thin](http://code.macournoyer.com/thin/) as our webserver, behind [nginx](http://wiki.nginx.org/Main). Diaspora uses the asynchronous feature of [EventMachine](http://rubyeventmachine.com/) -Because our websocket server and message queue both work using the power of the [Reactor](http://en.wikipedia.org/wiki/Reactor_pattern) pattern. If you use mod_rails, mongrel, or another non-eventmachine based application server, federation and/or websockets may not work. +We currently run Diaspora with the [thin](http://code.macournoyer.com/thin/) as our webserver, behind [nginx](http://wiki.nginx.org/Main). Diaspora uses the asynchronous feature of [EventMachine](http://rubyeventmachine.com/) to send messages between seeds. +using the power of the [Reactor](http://en.wikipedia.org/wiki/Reactor_pattern) pattern. If you use mod_rails, mongrel, or another non-eventmachine based application server, federation and/or websockets may not work. + +If you don't like thin, you can always try [Rainbows!](http://rainbows.rubyforge.org/) We will try and fully support more webservers later, but that is what works for now. From 2b31c09ab387911f7297852e694cb2f837aa99c6 Mon Sep 17 00:00:00 2001 From: maxwell Date: Mon, 20 Sep 2010 15:58:09 -0700 Subject: [PATCH 68/79] small typo in readme --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9bff999fb..d7960a634 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,10 @@ Also, we really want to continue to focus on features and improving the code bas ready for general use, we will post more detailed instructions. ## Notice -We currently run Diaspora with the [thin](http://code.macournoyer.com/thin/) as our webserver, behind [nginx](http://wiki.nginx.org/Main). Diaspora uses the asynchronous feature of [EventMachine](http://rubyeventmachine.com/) -Because our websocket server and message queue both work using the power of the [Reactor](http://en.wikipedia.org/wiki/Reactor_pattern) pattern. If you use mod_rails, mongrel, or another non-eventmachine based application server, federation and/or websockets may not work. +We currently run Diaspora with the [thin](http://code.macournoyer.com/thin/) as our webserver, behind [nginx](http://wiki.nginx.org/Main). Diaspora uses the asynchronous feature of [EventMachine](http://rubyeventmachine.com/) to send messages between seeds, +using the power of the [Reactor](http://en.wikipedia.org/wiki/Reactor_pattern) pattern. If you use mod_rails, mongrel, or another non-eventmachine based application server, federation and/or websockets may not work. + +If you don't like thin, you can always try [Rainbows!](http://rainbows.rubyforge.org/) We will try and fully support more webservers later, but that is what works for now. From 0bbbded89537c4478c45581e9960f4582cd1d162 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 20 Sep 2010 16:02:10 -0700 Subject: [PATCH 69/79] or any later version of the AGPL --- COPYRIGHT | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index af330bbc2..8a380cc7e 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,4 +1,4 @@ -Diaspora is copyright Diaspora Inc., 2010, and files herein are licensed under the Affero General Public License version 3, the text of which can be found in GNU-AGPL-3.0, unless otherwise noted. Components of Diaspora, including Rails, JQuery, and Devise, are licensed under the MIT/X11 license. Blueprint-CSS is licensed under a modified version of the MIT/X11 license. All unmodified files from these and other sources retain their original copyright and license notices: see the relevant individual files. Attribution information for Diaspora is contained in the AUTHORS file. +Diaspora is copyright Diaspora Inc., 2010, and files herein are licensed under the Affero General Public License version 3, the text of which can be found in GNU-AGPL-3.0, or any later version of the AGPL, unless otherwise noted. Components of Diaspora, including Rails, JQuery, and Devise, are licensed under the MIT/X11 license. Blueprint-CSS is licensed under a modified version of the MIT/X11 license. All unmodified files from these and other sources retain their original copyright and license notices: see the relevant individual files. Attribution information for Diaspora is contained in the AUTHORS file. * In addition, as a special exception, the copyright holders give * permission to link the code of portions of this program with the @@ -11,4 +11,4 @@ Diaspora is copyright Diaspora Inc., 2010, and files herein are licensed under t * version of the file(s), but you are not obligated to do so. If you * do not wish to do so, delete this exception statement from your * version. If you delete this exception statement from all source -* files in the program, then also delete it here. \ No newline at end of file +* files in the program, then also delete it here. From 8dd11c0c95eaf2a0da1f183db78658f24070f500 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 20 Sep 2010 16:41:03 -0700 Subject: [PATCH 70/79] Add a couple specs to friending --- lib/diaspora/user/friending.rb | 3 ++- spec/models/user/user_friending_spec.rb | 31 +++++++++++++++++++------ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/lib/diaspora/user/friending.rb b/lib/diaspora/user/friending.rb index e79608381..a4dcdd38d 100644 --- a/lib/diaspora/user/friending.rb +++ b/lib/diaspora/user/friending.rb @@ -86,7 +86,8 @@ module Diaspora def remove_friend(bad_friend) raise "Friend not deleted" unless self.friend_ids.delete( bad_friend.id ) - aspects.each{|g| g.person_ids.delete( bad_friend.id )} + aspects.each{|aspect| + aspect.person_ids.delete( bad_friend.id )} self.save self.raw_visible_posts.find_all_by_person_id( bad_friend.id ).each{|post| diff --git a/spec/models/user/user_friending_spec.rb b/spec/models/user/user_friending_spec.rb index bef8fa416..67ed9f799 100644 --- a/spec/models/user/user_friending_spec.rb +++ b/spec/models/user/user_friending_spec.rb @@ -189,16 +189,14 @@ describe User do @user2 = Factory.create :user @aspect2 = @user2.aspect(:name => "Gross people") - request = @user.send_friend_request_to( @user2, @aspect) - request.reverse_for @user2 - @user2.activate_friend(@user.person, @aspect2) - @user.receive request.to_diaspora_xml + friend_users(@user, @aspect, @user2, @aspect2) + @user.reload + @user2.reload + @aspect.reload + @aspect2.reload end it 'should unfriend the other user on the same seed' do - @user.reload - @user2.reload - @user.friends.count.should == 1 @user2.friends.count.should == 1 @@ -212,6 +210,25 @@ describe User do @aspect.people.count.should == 0 @aspect2.people.count.should == 0 end + context 'with a post' do + before do + @message = @user.post(:status_message, :message => "hi", :to => @aspect.id) + @user2.receive @message.to_diaspora_xml.to_s + @user2.unfriend @user.person + @user.unfriended_by @user2.person + @aspect.reload + @aspect2.reload + @user.reload + @user2.reload + end + it "deletes the unfriended user's posts from visible_posts" do + @user.raw_visible_posts.include?(@message.id).should be_false + end + it "deletes the unfriended user's posts from the aspect's posts" do + pending "We need to implement this" + @aspect2.posts.include?(@message).should be_false + end + end end From e2fc48c9ff8ec83eebbf9a6258d1082eec83c516 Mon Sep 17 00:00:00 2001 From: maxwell Date: Mon, 20 Sep 2010 16:44:35 -0700 Subject: [PATCH 71/79] MS being slightly more proper with application helper, and fixing the person search page --- app/helpers/application_helper.rb | 4 ++-- app/views/people/_person.html.haml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 75a13dc6b..65f1c8679 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -43,11 +43,11 @@ module ApplicationHelper end def owner_image_tag - person_image_tag(current_user) + person_image_tag(current_user.person) end def owner_image_link - person_image_link(current_user) + person_image_link(current_user.person) end def person_image_tag(person) diff --git a/app/views/people/_person.html.haml b/app/views/people/_person.html.haml index 646d0b333..e0c77d990 100644 --- a/app/views/people/_person.html.haml +++ b/app/views/people/_person.html.haml @@ -8,7 +8,7 @@ .content %span.from - = link_to person.real_name, person + = link_to person.real_name, person_path(person) .info = person.diaspora_handle From 2be0cca2cd3f99c53c0220ef6082b6cc00ad5632 Mon Sep 17 00:00:00 2001 From: maxwell Date: Mon, 20 Sep 2010 16:51:02 -0700 Subject: [PATCH 72/79] MS adding downcase to webfinger lookup --- app/models/person.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/person.rb b/app/models/person.rb index 74079ff93..970a90a0b 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -78,7 +78,7 @@ class Person def self.by_webfinger( identifier, opts = {}) #need to check if this is a valid email structure, maybe should do in JS - local_person = Person.first(:diaspora_handle => identifier.gsub('acct:', '')) + local_person = Person.first(:diaspora_handle => identifier.gsub('acct:', '').to_s.downcase) if local_person Rails.logger.info("Do not need to webfinger, found a local person #{local_person.real_name}") From 24ca139241e70444e696ed2cdb2f135083896499 Mon Sep 17 00:00:00 2001 From: maxwell Date: Mon, 20 Sep 2010 17:11:07 -0700 Subject: [PATCH 73/79] MS remove some stray puts --- app/controllers/publics_controller.rb | 2 -- app/views/people/show.html.haml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/publics_controller.rb b/app/controllers/publics_controller.rb index b6c03ff62..d7f4825de 100644 --- a/app/controllers/publics_controller.rb +++ b/app/controllers/publics_controller.rb @@ -10,7 +10,6 @@ class PublicsController < ApplicationController def hcard @person = Person.find_by_id params[:id] - puts @person unless @person.nil? || @person.owner.nil? render 'hcard' end @@ -34,7 +33,6 @@ class PublicsController < ApplicationController return unless params[:xml] begin person = Person.first(:id => params[:id]) - puts person.real_name @user = person.owner rescue NoMethodError => e Rails.logger.error("Received post for nonexistent person #{params[:id]}") diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index 4f76f18cf..0939bd376 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -4,7 +4,7 @@ - content_for :page_title do - = @person.real_name + profile - content_for :left_pane do #profile From e588d7ab6af5755cd91f9702a1b0513e5b9b7fca Mon Sep 17 00:00:00 2001 From: danielvincent Date: Mon, 20 Sep 2010 17:26:20 -0700 Subject: [PATCH 74/79] DG IZ moving friends is now ajaxy --- app/controllers/aspects_controller.rb | 6 ++-- app/views/aspects/manage.html.haml | 4 --- app/views/shared/_aspect_nav.haml | 2 +- config/routes.rb | 5 +-- lib/diaspora/user/querying.rb | 3 +- public/javascripts/aspect-edit.js | 51 ++++++++------------------- 6 files changed, 22 insertions(+), 49 deletions(-) diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index 520485d33..779ce0f6f 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -79,10 +79,10 @@ class AspectsController < ApplicationController end if aspect = current_user.aspect_by_id(params[:to][:to]) flash[:notice] = "You are now showing your friend a different aspect of yourself." - respond_with aspect + render :nothing => true else - flash[:notice] = "You are now showing your friend a different aspect of yourself." - respond_with current_user.visible_person_by_id(params[:friend_id]) + flash[:error] = "Invalid aspect id!" + render aspects_manage_path end end diff --git a/app/views/aspects/manage.html.haml b/app/views/aspects/manage.html.haml index 656f0cb96..3903039ea 100644 --- a/app/views/aspects/manage.html.haml +++ b/app/views/aspects/manage.html.haml @@ -63,8 +63,4 @@ %div{:id => "add_request_pane_#{aspect.id}"} = render "requests/new_request", :aspect => aspect -%p - %br - = link_to 'Update Aspects', '#', :class => 'button', :id => "move_friends_link" - #content_bottom diff --git a/app/views/shared/_aspect_nav.haml b/app/views/shared/_aspect_nav.haml index ed3fe6f8f..dbca3bbef 100644 --- a/app/views/shared/_aspect_nav.haml +++ b/app/views/shared/_aspect_nav.haml @@ -6,7 +6,7 @@ #aspect_nav %ul - for aspect in @aspects - %li{:id => aspect.id, :class => ("selected" if current_aspect?(aspect))} + %li{:class => ("selected" if current_aspect?(aspect))} = link_for_aspect aspect %ul{ :style => "position:absolute;right:0;bottom:0.01em;"} diff --git a/config/routes.rb b/config/routes.rb index 188c4b137..ae757499c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -13,10 +13,11 @@ Diaspora::Application.routes.draw do resources :photos, :except => [:index] resources :albums - match 'aspects/manage', :to => 'aspects#manage' - resources :aspects, :except => [:edit] match 'aspects/move_friends', :to => 'aspects#move_friends', :as => 'move_friends' match 'aspects/move_friend', :to => 'aspects#move_friend', :as => 'move_friend' + match 'aspects/manage', :to => 'aspects#manage' + resources :aspects, :except => [:edit] + match 'warzombie', :to => "dev_utilities#warzombie" match 'zombiefriends', :to => "dev_utilities#zombiefriends" diff --git a/lib/diaspora/user/querying.rb b/lib/diaspora/user/querying.rb index 00ae27735..1079949b0 100644 --- a/lib/diaspora/user/querying.rb +++ b/lib/diaspora/user/querying.rb @@ -31,8 +31,7 @@ module Diaspora end def aspect_by_id( id ) - id = id.to_id - aspects.detect{|x| x.id == id } + self.aspects.find( id ) end def album_by_id( id ) diff --git a/public/javascripts/aspect-edit.js b/public/javascripts/aspect-edit.js index e07877cb7..39eee791a 100644 --- a/public/javascripts/aspect-edit.js +++ b/public/javascripts/aspect-edit.js @@ -20,28 +20,6 @@ function decrementRequestsCounter() { } $(function() { - - - $('#move_friends_link').live( 'click', function(){ - $.post( - '/aspects/move_friends', - { 'moves' : $('#aspect_list').data() }, - function() { - $('#aspect_title').html("Groups edited successfully!"); - } - ); - - // should the following logic be moved into the $.post() callback? - $("#aspect_list").removeData(); - - $(".person") - .css('background-color','none') - .attr('from_aspect_id', function() { - return $(this).parent().attr('id') - }); - - }); - // Multiple classes here won't work $("ul .person").draggable({ revert: true @@ -65,24 +43,23 @@ $(function() { } }); - } else { - var $aspect_list = $('#aspect_list'), - move = {}; - - // This is poor implementation - move[ 'friend_id' ] = ui.draggable[0].id; // ui.draggable.attr('id') - move[ 'to' ] = $(this)[0].id;// $(this).attr('id'); - move[ 'from' ] = ui.draggable[0].getAttribute('from_aspect_id'); // ui.draggable.attr('from_aspect_id') - - // if created custom attr's - should be using `data-foo` - - - if (move['to'] == move['from']){ - $aspect_list.data( ui.draggable[0].id, []); + }; + var dropzone = $(this)[0]; + + if ($(this)[0].id == ui.draggable[0].getAttribute('from_aspect_id')){ ui.draggable.css('background-color','#eee'); } else { - $aspect_list.data( ui.draggable[0].id, move); ui.draggable.css('background-color','orange'); + $.ajax({ + url: "/aspects/move_friend/", + data: {"friend_id" : ui.draggable[0].id, + "from" : ui.draggable[0].getAttribute('from_aspect_id'), + "to" : { "to" : dropzone.id }}, + success: function(data){ + ui.draggable.attr('from_aspect_id', dropzone.id); + ui.draggable.css('background','none'); + }}); + } } $(this).closest("ul").append(ui.draggable); From 441f75203a49ea2e1b0bcecc9294617e855c6dc4 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 20 Sep 2010 17:33:05 -0700 Subject: [PATCH 75/79] Add autolink and sanitize to show page --- app/views/status_messages/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/status_messages/show.html.haml b/app/views/status_messages/show.html.haml index 358c2244b..26777408d 100644 --- a/app/views/status_messages/show.html.haml +++ b/app/views/status_messages/show.html.haml @@ -7,7 +7,7 @@ %p %strong Message: - = @status_message.message + = auto_link sanitize @status_message.message %p %strong Owner: From ca97d792af238b59b885c4e7f61345469ff8d945 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Mon, 20 Sep 2010 18:08:59 -0700 Subject: [PATCH 76/79] DG IZ; fixing querying bug in aspect_by_id --- lib/diaspora/user/querying.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/diaspora/user/querying.rb b/lib/diaspora/user/querying.rb index 1079949b0..00ae27735 100644 --- a/lib/diaspora/user/querying.rb +++ b/lib/diaspora/user/querying.rb @@ -31,7 +31,8 @@ module Diaspora end def aspect_by_id( id ) - self.aspects.find( id ) + id = id.to_id + aspects.detect{|x| x.id == id } end def album_by_id( id ) From f50b70da9e2ed919c0202b2e5c6737a079276a73 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Mon, 20 Sep 2010 18:14:12 -0700 Subject: [PATCH 77/79] DG IZ; removed stray mustache --- public/javascripts/aspect-edit.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/javascripts/aspect-edit.js b/public/javascripts/aspect-edit.js index 39eee791a..9f9e5803e 100644 --- a/public/javascripts/aspect-edit.js +++ b/public/javascripts/aspect-edit.js @@ -47,7 +47,7 @@ $(function() { var dropzone = $(this)[0]; if ($(this)[0].id == ui.draggable[0].getAttribute('from_aspect_id')){ - ui.draggable.css('background-color','#eee'); + ui.draggable.css('background','none'); } else { ui.draggable.css('background-color','orange'); $.ajax({ @@ -61,7 +61,6 @@ $(function() { }}); } - } $(this).closest("ul").append(ui.draggable); } }); From 4d200fea87719398f16c29d16684533e8aba954b Mon Sep 17 00:00:00 2001 From: danielvincent Date: Mon, 20 Sep 2010 20:17:18 -0700 Subject: [PATCH 78/79] removed view all link from status_message#show --- app/views/status_messages/show.html.haml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/app/views/status_messages/show.html.haml b/app/views/status_messages/show.html.haml index 26777408d..251c92a0e 100644 --- a/app/views/status_messages/show.html.haml +++ b/app/views/status_messages/show.html.haml @@ -3,20 +3,14 @@ -# the COPYRIGHT file. -- title "Status Message" - -%p - %strong Message: +%h1 + = link_to @status_message.person.real_name, @status_message.person = auto_link sanitize @status_message.message -%p - %strong Owner: - = @status_message.person.real_name %h4= "comments (#{@status_message.comments.count})" = render "comments/comments", :post => @status_message %p - = link_to "Destroy", @status_message, :confirm => 'Are you sure?', :method => :delete - | - = link_to "View All", status_messages_path + - if current_user.owns? @status_message + = link_to "Destroy", @status_message, :confirm => 'Are you sure?', :method => :delete From b019ade588948065fe958a9caa9dddf0c05c0c03 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Mon, 20 Sep 2010 21:50:06 -0700 Subject: [PATCH 79/79] minor changes from production --- public/stylesheets/application.css | 14 +++++++++++--- public/stylesheets/fileuploader.css | 8 ++++---- public/stylesheets/sass/application.sass | 16 ++++++++++++---- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 60b50a9f4..9e8561cc2 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -346,12 +346,18 @@ label { margin-top: 26px; } #publisher textarea { width: 600px; - height: 40px; + height: 42px; margin-top: 0; margin-bottom: 0; - -webkit-box-shadow: 0 1px 0 white; } + box-shadow: 0 1px white; + -moz-box-shadow: 0 1px white; + -webkit-box-shadow: 0 1px white; } #publisher .button { margin-left: 100px; } + #publisher img { + -webkit-box-shadow: 0 1px 0 white; + border: 1px solid #bbbbbb; + border-top: 1px solid #666666; } #image_picker .small_photo { height: 100px; @@ -463,6 +469,7 @@ h1.big_text { display: inline; margin-right: 2px; } #aspect_nav ul > li a { + text-shadow: 0 2px 0 #444444; -webkit-border-radius: 3px 3px 0 0; -moz-border-radius: 3px 3px 0 0; line-height: 22px; @@ -557,7 +564,8 @@ h1.big_text { .requests .grey, .remove .grey { color: #999999; - cursor: default; } + cursor: default; + text-shadow: 0 2px white; } .aspect ul.dropzone, .requests ul.dropzone, .remove ul.dropzone { diff --git a/public/stylesheets/fileuploader.css b/public/stylesheets/fileuploader.css index 0e3f111a9..823c1b346 100755 --- a/public/stylesheets/fileuploader.css +++ b/public/stylesheets/fileuploader.css @@ -3,14 +3,14 @@ .qq-upload-button { display:block; /* or inline-block */ width: 105px; padding: 7px 0; text-align:center; - background:#880000; border-bottom:1px solid #ddd;color:#fff; + background:#333; border-bottom:1px solid #999;color:#fff; } -.qq-upload-button-hover {background:#cc0000;} +.qq-upload-button-hover {background:#666;} .qq-upload-button-focus {outline:1px dotted black;} .qq-upload-drop-area { position:absolute; top:0; left:0; width:100%; height:100%; min-height: 70px; z-index:2; - background:#FF9797; text-align:center; + background:#ccc; text-align:center; } .qq-upload-drop-area span { display:block; position:absolute; top: 50%; width:100%; margin-top:-8px; font-size:16px; @@ -28,4 +28,4 @@ .qq-upload-size,.qq-upload-cancel {font-size:11px;} .qq-upload-failed-text {display:none;} -.qq-upload-fail .qq-upload-failed-text {display:inline;} \ No newline at end of file +.qq-upload-fail .qq-upload-failed-text {display:inline;} diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 80debac15..88145b6df 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -453,16 +453,24 @@ label textarea :width 600px - :height 40px + :height 42px :margin :top 0 :bottom 0 - :-webkit-box-shadow 0 1px 0 #fff + :box-shadow 0 1px #fff + :-moz-box-shadow 0 1px #fff + :-webkit-box-shadow 0 1px #fff .button :margin-left 100px + img + :-webkit-box-shadow 0 1px 0 #fff + :border 1px solid #bbb + :top 1px solid #666 + + #image_picker .small_photo @@ -613,6 +621,7 @@ h1.big_text :right 2px a + :text-shadow 0 2px 0 #444 :-webkit-border-radius 3px 3px 0 0 :-moz-border-radius 3px 3px 0 0 :line @@ -705,8 +714,6 @@ h1.big_text :display inline - - .aspect_name :position relative @@ -731,6 +738,7 @@ h1.big_text .grey :color #999 :cursor default + :text-shadow 0 2px #fff ul.dropzone :min-height 20px