From 633048fbed0e3771f4516db68dbe10751af09e9f Mon Sep 17 00:00:00 2001 From: Volkan Unsal Date: Sun, 10 Oct 2010 23:06:56 -0400 Subject: [PATCH 01/28] finished Turkish translation --- config/locales/diaspora/tr.yml | 208 +++++++++++++++++++++++++++++++++ diaspora.tmproj | 79 +++++++++++++ 2 files changed, 287 insertions(+) create mode 100644 config/locales/diaspora/tr.yml create mode 100644 diaspora.tmproj diff --git a/config/locales/diaspora/tr.yml b/config/locales/diaspora/tr.yml new file mode 100644 index 000000000..8fd9bfdbf --- /dev/null +++ b/config/locales/diaspora/tr.yml @@ -0,0 +1,208 @@ +# 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: "Merhaba dünya" + application: + helper: + unknown_person: "bilinmiyen insanlar" + new_requests: "yeni istekler" + dashboards: + helper: + home: "ev" + error_messages: + helper: + invalid_fields: "Yanliș Bölümler" + correct_the_following_errors_and_try_again: "Alttaki yanlișlari düzeltin ve tekrar deneyin." + people: + helper: + results_for: "%{params} için sonuçlar" + people_on_pod_are_aware_of: " bu pod'da bizim bildigimiz kişiler." + layouts: + application: + edit_profile: "profili düzelt" + logout: "çık" + shared: + aspect_nav: + all_aspects: "Bütün Yanlar" + manage: "Düzenle" + manage_your_aspects: "Bütün yanlari Düzenle" + sub_header: + all_aspects: "Bütün Yanlar" + manage_aspects: "Yanlari Düzenle" + publisher: + share: "Paylaş" + aspect_friends: + add_friends: "Arkadaş ekle" + albums: + album: + you: "sen" + new_album: + create: "yarat" + add_a_new_album: "Yeni albüm ekle" + show: + edit_album: "Albümü düzelt" + albums: "albumler" + updated: "düzeltildi" + by: "tarafindan" + edit: + editing: "düzeltiyor" + updated: "düzeltildi" + are_you_sure: "Eminmisin?" + delete_album: "Sil Albümü" + cancel: "Vazgec" + index: + home: "Ev" + new_album: "Yeni Albüm" + create: + success: "Yeni bir album yattiniz %{name} isminde." + update: + success: "Albüm %{name} basari ile eklenmistir." + failure: "Albüm %{name} yi düzeltme basarili degil." + destroy: + success: "Albüm %{name} silinmistir." + helper: + friends_albums: "Arkadaşlarin Albümleri" + your_albums: "Sizin Albümleriniz" + aspects: + index: + photos: "resimler" + show: + photos: "resimler" + manage: + add_a_new_aspect: "Yeni bir yan ekle" + add_a_new_friend: "Yeni bir Arkadaş ekle" + show: "Show" + update_aspects: "Yanlari düzelt" + requests: "Ricalar" + ignore_remove: "Goz ardi et/Cikart" + new_aspect: + add_a_new_aspect: "Yeni bir yan ekle" + create: "Yarat" + create: + success: "Sol taraftaki arti ya tikliyarak Diasporaya sizin yeni yaniniz i kimlerin gorebilecegini soyleyin." + failure: "Yan yaratimi basarili degildi." + destroy: + success: "%{name} basariyla yaratildi." + update: + success: "Sizin yaniniz, %{name}, basariyla düzeltildi." + move_friends: + failure: "Yan düzeltimi arkadisınız %{real_name} icin basarisizdi." + success: "Yanlar basariyla düzeltildi." + move_friend: + failure: "%{inspect} islemedi." + success: "Simdi siz Arkadaşlariniza baska bir yaninizi gosteriyorsunuz." + helper: + remove: "cikart" + aspect_not_empty: "Yan bos degil" + users: + edit: + editing_profile: "Profili düzeltiliyor" + profile: + cancel: "Vazgec" + update_profile: "düzelt Profili" + home: "Ev" + diaspora_username: "DIASPORA ISMINIZ" + info: "Bilgi" + picture: "Resim" + editing_profile: "Profili düzeltmek" + albums: "Albümler" + you_dont_have_any_photos: "Hicbir fotorafiniz yok! Suraya gidin" + page_to_upload_some: "yuklemek icin." + or: "veya" + comments: + comment: + ago: "once" + new_comment: + comment: "Yorum" + photos: + show: + prev: "once" + full_size: "tam buyukluk" + next: "sonra" + edit_photo: "düzelt Fotoyu" + delete_photo: "Sil Fotoyu" + are_you_sure: "Eminmisınız?" + comments: "yorumlar" + edit: + editing: "düzeltiliyor" + are_you_sure: "Eminmisiniz?" + delete_photo: "Sil Fotoyu" + photo: + show_comments: "göster yorumları" + posted_a_new_photo_to: "yeni bir foto koydu " + new: + new_photo: "Yeni Foto" + back_to_list: "Listeye Geri Git" + post_it: "ekle!" + create: + runtime_error: "Fotoyu yukleme basarisızdi. Emniyet kemeriniz takılımiydi?" + integrity_error: "Fotoyu yukleme basarisızdi. Resim olduğundan eminmisınız?" + type_error: "Fotoyu yukleme basarisizdi. Bir resim yuklediğinize eminmisiniz?" + update: + notice: "Resim başarıyla eklendi." + error: "Fotoyu düzeltme basarısızdı." + destroy: + notice: "Foto silindi." + registrations: + new: + sign_up: "Katıl" + create: + success: "Diasporaya katıldınız!" + status_messages: + new_status_message: + tell_me_something_good: "bana iyi bir şey söyle" + oh_yeah: "tabi ya!" + status_message: + show_comments: "göster yorumları" + delete: "Sil" + are_you_sure: "Eminmisiniz?" + show: + status_message: "Status Mesaji" + comments: "yorumlar" + are_you_sure: "Eminmisiniz?" + destroy: "Yok et" + view_all: "Hepsine bak" + message: "Mesaj" + owner: "Sahibi" + helper: + no_message_to_display: "Gosterilcek bir mesaj yok." + people: + person: + add_friend: "Arkadaş ekle" + pending_request: "bekletilen rica" + index: + add_friend: "Arkadaş ekle" + real_name: "esas ismi" + diaspora_handle: "diaspora ismi" + thats_you: "o sensin!" + friend_request_pending: "Arkadaş ricasi bekletiliyor" + you_have_a_friend_request_from_this_person: "siz bir arkadaş isteği aldiniz bu kişiden" + new: + new_person: "Yeni Kişi" + back_to_list: "Listeye geri dön" + show: + last_seen: "son gorüldu: %{how_long_ago}" + friends_since: "Arkadaş süreci: %{how_long_ago}" + save: "sakla" + are_you_sure: "Eminmisiniz?" + remove_friend: "çikart arkadaşlıktan" + requests: + new_request: + add_a_new_friend_to: "Buna yeni bir arkadaş ekle" + enter_a_diaspora_username: "Bir Diaspora ismi gir:" + your_diaspora_username_is: "Sizin Diaspora isminiz: %{diaspora_handle}" + friends_username: "Arkadaşin Diaspora ismi" + destroy: + success: "Siz şimdi arkadaşsınız." + error: "Lutfen bir yan seçiniz!" + ignore: "Arkadaş isteğini reddettiniz." + create: + error: "Diaspora cekirddegi bulunmadı bu email'de!" + already_friends: "Siz zaten arakadaşsınız %{destination_url} ile!" + success: "Arakadaş olma isteği %{destination_url} a gonderilmiştir." + horribly_wrong: "Bir şey muhtemalan yanliş gitti." \ No newline at end of file diff --git a/diaspora.tmproj b/diaspora.tmproj new file mode 100644 index 000000000..1b6859538 --- /dev/null +++ b/diaspora.tmproj @@ -0,0 +1,79 @@ + + + + + currentDocument + config/locales/diaspora/tr.yml + documents + + + expanded + + name + diaspora + regexFolderFilter + !.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$ + sourceDirectory + + + + fileHierarchyDrawerWidth + 200 + metaData + + config/locales/diaspora/en.yml + + caret + + column + 18 + line + 194 + + columnSelection + + firstVisibleColumn + 0 + firstVisibleLine + 186 + selectFrom + + column + 0 + line + 0 + + selectTo + + column + 0 + line + 208 + + + config/locales/diaspora/tr.yml + + caret + + column + 17 + line + 208 + + firstVisibleColumn + 0 + firstVisibleLine + 189 + + + openDocuments + + config/locales/diaspora/en.yml + config/locales/diaspora/tr.yml + + showFileHierarchyDrawer + + windowFrame + {{251, 266}, {560, 468}} + + From c26c244185b76b2d942aa6bb0481423b10782ed3 Mon Sep 17 00:00:00 2001 From: Volkan Unsal Date: Sun, 10 Oct 2010 23:24:39 -0400 Subject: [PATCH 02/28] remove tmproj file. --- .gitignore | 3 +- diaspora.tmproj | 79 ------------------------------------------------- 2 files changed, 2 insertions(+), 80 deletions(-) delete mode 100644 diaspora.tmproj diff --git a/.gitignore b/.gitignore index 537c0fae2..6d863358e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,5 @@ gpg/*/random_seed public/uploads/* public/source.tar tmp/**/* -capybara-*.html \ No newline at end of file +capybara-*.html +*.tmproj \ No newline at end of file diff --git a/diaspora.tmproj b/diaspora.tmproj deleted file mode 100644 index 1b6859538..000000000 --- a/diaspora.tmproj +++ /dev/null @@ -1,79 +0,0 @@ - - - - - currentDocument - config/locales/diaspora/tr.yml - documents - - - expanded - - name - diaspora - regexFolderFilter - !.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$ - sourceDirectory - - - - fileHierarchyDrawerWidth - 200 - metaData - - config/locales/diaspora/en.yml - - caret - - column - 18 - line - 194 - - columnSelection - - firstVisibleColumn - 0 - firstVisibleLine - 186 - selectFrom - - column - 0 - line - 0 - - selectTo - - column - 0 - line - 208 - - - config/locales/diaspora/tr.yml - - caret - - column - 17 - line - 208 - - firstVisibleColumn - 0 - firstVisibleLine - 189 - - - openDocuments - - config/locales/diaspora/en.yml - config/locales/diaspora/tr.yml - - showFileHierarchyDrawer - - windowFrame - {{251, 266}, {560, 468}} - - From 6d00b2ca8a46b2cbd4a6e0e6c44b41643c2aee14 Mon Sep 17 00:00:00 2001 From: Volkan Unsal Date: Sun, 10 Oct 2010 23:49:36 -0400 Subject: [PATCH 03/28] correct some spelling errors in Turkish translation --- config/locales/diaspora/tr.yml | 60 +++++++++++++++++----------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/config/locales/diaspora/tr.yml b/config/locales/diaspora/tr.yml index 8fd9bfdbf..9ed22c72a 100644 --- a/config/locales/diaspora/tr.yml +++ b/config/locales/diaspora/tr.yml @@ -21,7 +21,7 @@ en: people: helper: results_for: "%{params} için sonuçlar" - people_on_pod_are_aware_of: " bu pod'da bizim bildigimiz kişiler." + people_on_pod_are_aware_of: " bu podda bizim bildiğimiz kişiler." layouts: application: edit_profile: "profili düzelt" @@ -30,10 +30,10 @@ en: aspect_nav: all_aspects: "Bütün Yanlar" manage: "Düzenle" - manage_your_aspects: "Bütün yanlari Düzenle" + manage_your_aspects: "Bütün yanları düzenle" sub_header: all_aspects: "Bütün Yanlar" - manage_aspects: "Yanlari Düzenle" + manage_aspects: "Yanları Düzenle" publisher: share: "Paylaş" aspect_friends: @@ -46,27 +46,27 @@ en: add_a_new_album: "Yeni albüm ekle" show: edit_album: "Albümü düzelt" - albums: "albumler" + albums: "albümler" updated: "düzeltildi" - by: "tarafindan" + by: "tarafından" edit: editing: "düzeltiyor" updated: "düzeltildi" are_you_sure: "Eminmisin?" delete_album: "Sil Albümü" - cancel: "Vazgec" + cancel: "Vazgeç" index: home: "Ev" new_album: "Yeni Albüm" create: - success: "Yeni bir album yattiniz %{name} isminde." + success: "Yeni bir album yarattınız %{name} isminde." update: - success: "Albüm %{name} basari ile eklenmistir." - failure: "Albüm %{name} yi düzeltme basarili degil." + success: "Albüm %{name} başarı ile eklenmiştir." + failure: "Albüm %{name} yı düzeltme başarılı değil." destroy: success: "Albüm %{name} silinmistir." helper: - friends_albums: "Arkadaşlarin Albümleri" + friends_albums: "Arkadaşların Albümleri" your_albums: "Sizin Albümleriniz" aspects: index: @@ -75,35 +75,35 @@ en: photos: "resimler" manage: add_a_new_aspect: "Yeni bir yan ekle" - add_a_new_friend: "Yeni bir Arkadaş ekle" + add_a_new_friend: "Yeni bir arkadaş ekle" show: "Show" update_aspects: "Yanlari düzelt" requests: "Ricalar" - ignore_remove: "Goz ardi et/Cikart" + ignore_remove: "Goz ardi et/çıkart" new_aspect: add_a_new_aspect: "Yeni bir yan ekle" create: "Yarat" create: - success: "Sol taraftaki arti ya tikliyarak Diasporaya sizin yeni yaniniz i kimlerin gorebilecegini soyleyin." - failure: "Yan yaratimi basarili degildi." + success: "Sol taraftaki arti ya tıklıyarak Diasporaya sizin yeni yanınızı kimlerin görebileceğini belirtin." + failure: "Yan yaratimi basarılı değildi." destroy: - success: "%{name} basariyla yaratildi." + success: "%{name} basarıyla yaratıldı." update: - success: "Sizin yaniniz, %{name}, basariyla düzeltildi." + success: "Sizin yanınız, %{name}, başariyla düzeltildi." move_friends: - failure: "Yan düzeltimi arkadisınız %{real_name} icin basarisizdi." - success: "Yanlar basariyla düzeltildi." + failure: "Yan düzeltimi arkadisınız %{real_name} icin başarisizdi." + success: "Yanlar başariyla düzeltildi." move_friend: failure: "%{inspect} islemedi." - success: "Simdi siz Arkadaşlariniza baska bir yaninizi gosteriyorsunuz." + success: "Simdi siz arkadaşlarınıza başka bir yanınızı gosteriyorsunuz." helper: remove: "cikart" - aspect_not_empty: "Yan bos degil" + aspect_not_empty: "Yan bos değil" users: edit: editing_profile: "Profili düzeltiliyor" profile: - cancel: "Vazgec" + cancel: "Vazgeç" update_profile: "düzelt Profili" home: "Ev" diaspora_username: "DIASPORA ISMINIZ" @@ -111,7 +111,7 @@ en: picture: "Resim" editing_profile: "Profili düzeltmek" albums: "Albümler" - you_dont_have_any_photos: "Hicbir fotorafiniz yok! Suraya gidin" + you_dont_have_any_photos: "Hicbir fotorafiniz yok! Şuraya gidin" page_to_upload_some: "yuklemek icin." or: "veya" comments: @@ -122,11 +122,11 @@ en: photos: show: prev: "once" - full_size: "tam buyukluk" + full_size: "tam büyüklük" next: "sonra" edit_photo: "düzelt Fotoyu" delete_photo: "Sil Fotoyu" - are_you_sure: "Eminmisınız?" + are_you_sure: "Eminmisiniz?" comments: "yorumlar" edit: editing: "düzeltiliyor" @@ -140,9 +140,9 @@ en: back_to_list: "Listeye Geri Git" post_it: "ekle!" create: - runtime_error: "Fotoyu yukleme basarisızdi. Emniyet kemeriniz takılımiydi?" - integrity_error: "Fotoyu yukleme basarisızdi. Resim olduğundan eminmisınız?" - type_error: "Fotoyu yukleme basarisizdi. Bir resim yuklediğinize eminmisiniz?" + runtime_error: "Fotoyu yukleme başarısızdı. Emniyet kemeriniz takılımıydı?" + integrity_error: "Fotoyu yukleme başarısızdı. Resim olduğundan eminmisınız?" + type_error: "Fotoyu yukleme başarısızdı. Bir resim yuklediğinize eminmisiniz?" update: notice: "Resim başarıyla eklendi." error: "Fotoyu düzeltme basarısızdı." @@ -186,7 +186,7 @@ en: new_person: "Yeni Kişi" back_to_list: "Listeye geri dön" show: - last_seen: "son gorüldu: %{how_long_ago}" + last_seen: "son gorüldü: %{how_long_ago}" friends_since: "Arkadaş süreci: %{how_long_ago}" save: "sakla" are_you_sure: "Eminmisiniz?" @@ -202,7 +202,7 @@ en: error: "Lutfen bir yan seçiniz!" ignore: "Arkadaş isteğini reddettiniz." create: - error: "Diaspora cekirddegi bulunmadı bu email'de!" + error: "Diaspora cekirdeği bulunmadı bu emailde!" already_friends: "Siz zaten arakadaşsınız %{destination_url} ile!" - success: "Arakadaş olma isteği %{destination_url} a gonderilmiştir." + success: "%{destination_url} için arakadaş olma isteği gonderilmiştir." horribly_wrong: "Bir şey muhtemalan yanliş gitti." \ No newline at end of file From 73f06bb61b0d57861f71c2433366821b0d39df74 Mon Sep 17 00:00:00 2001 From: Volkan Unsal Date: Mon, 11 Oct 2010 15:09:43 -0400 Subject: [PATCH 04/28] add devise.tr.yml --- config/locales/devise/devise.tr.yml | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 config/locales/devise/devise.tr.yml diff --git a/config/locales/devise/devise.tr.yml b/config/locales/devise/devise.tr.yml new file mode 100644 index 000000000..bff5e1dd9 --- /dev/null +++ b/config/locales/devise/devise.tr.yml @@ -0,0 +1,40 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3 or later. See +# the COPYRIGHT file. + +en: + errors: + messages: + not_found: "bulunmadi" + already_confirmed: "zaten doğrulandı" + not_locked: "kilitlenmedi" + + devise: + failure: + unauthenticated: "Devam etmeden once bir hesap açtırmalı veya hesabınızla giriş yapmalısınız." + unconfirmed: "Hesabınızı doğrulamalısınız devam etmeden once." + locked: "Hesabınız kilitlenmiştir." + invalid: "Yanlış email veya şifre." + invalid_token: "Yanlış authentikasyon tılsımı." + timeout: "Zamanınız sona erdi, lütfen tekrar giriş yapın devam etmek için." + inactive: "Hesabınız aktive edilmemiştir daha." + sessions: + signed_in: "Başarıyla giriş yaptınız." + signed_out: "Başarıyla çıkıs yaptınız." + passwords: + send_instructions: "Kisa bir süre içersinde şifrenizi nasıl yeniliyceğinizi açıklıyan bir email alıcaksınız." + updated: "Şifreniz değistirilmiştir. Şu anda giriş yapmış oluyorsunuz." + confirmations: + send_instructions: "Kısa bir süre içersinde hesabınızı nasıl dogruluycaginiza dair bir email alicaksiniz." + confirmed: "Hesabınız dogrulanmıstır. Şu anda giriş yapmış oluyorsunuz." + registrations: + signed_up: "Basarıyla kayıt yaptınız. Dogrulama emaili size gonderilmistir." + updated: "Heabinizi başarili olarak yenilediniz." + destroyed: "Hoşçakal! Hesabiniz yok edildi. Umuyoruz sizi tekrar gorüceğiz yakınlarda." + unlocks: + send_instructions: "Kisa bir süre içersinde hesabınızı nasıl kilit altinda çikarabiliceginize dair bir email alıcaksınız." + unlocked: "Heabiniz kilit altindan çıkartılmıstır. Şu anda giriş yapmıs oluyorsunuz" + mailer: + confirmation_instructions: "Doğrulama talimatları" + reset_password_instructions: "Yeni şifre kurma talimatları" + unlock_instructions: "Kilit altından çıkarma talimatları" From eaef6bdf047c02478d3867da9ccffaeabad6618b Mon Sep 17 00:00:00 2001 From: Shawn McGuire Date: Wed, 13 Oct 2010 11:12:27 -0500 Subject: [PATCH 05/28] Issue #272 Fixed color contrast --- public/stylesheets/sass/application.sass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index c70992407..d809011a0 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -114,7 +114,7 @@ header :bottom 1px solid #ccc a - :color #999 + :color #CCC &:hover :background none @@ -768,12 +768,12 @@ h1.big_text :padding 3px 8px :bottom 3px - :color #999 + :color #CCC &:hover :background :color #4e4e4e - :color #ccc + :color #eee &.selected a :-webkit-border-radius 5px 5px 0 0 From 711dcdc5f42769366364ce9d36eb062bb228a705 Mon Sep 17 00:00:00 2001 From: Shawn McGuire Date: Wed, 13 Oct 2010 14:36:03 -0500 Subject: [PATCH 06/28] Issue #280 Fixed trailing whitespace error --- app/controllers/requests_controller.rb | 2 +- app/models/request.rb | 1 + spec/models/request_spec.rb | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/controllers/requests_controller.rb b/app/controllers/requests_controller.rb index 79a29461e..82f31152c 100644 --- a/app/controllers/requests_controller.rb +++ b/app/controllers/requests_controller.rb @@ -33,7 +33,7 @@ class RequestsController < ApplicationController aspect = current_user.aspect_by_id(params[:request][:aspect_id]) begin - rel_hash = relationship_flow(params[:request][:destination_url]) + rel_hash = relationship_flow(params[:request][:destination_url].strip!) rescue Exception => e raise e unless e.message.include? "not found" flash[:error] = I18n.t 'requests.create.error' diff --git a/app/models/request.rb b/app/models/request.rb index d57470745..d910cfaa2 100644 --- a/app/models/request.rb +++ b/app/models/request.rb @@ -48,6 +48,7 @@ class Request protected def clean_link if self.destination_url + self.destination_url = self.destination_url.strip self.destination_url = 'http://' + self.destination_url unless self.destination_url.match('https?://') self.destination_url = self.destination_url + '/' if self.destination_url[-1,1] != '/' end diff --git a/spec/models/request_spec.rb b/spec/models/request_spec.rb index c40d1a25e..83730f10b 100644 --- a/spec/models/request_spec.rb +++ b/spec/models/request_spec.rb @@ -38,4 +38,11 @@ describe Request do Request.for_user(user).all.count.should == 1 end + it 'should strip the destination url' do + person_request = Request.new + person_request.destination_url = " http://google.com/ " + person_request.send(:clean_linl) + person_request.destination_url.should == "http://google.com/" + end + end From 5c26b895f2812ec18b46098649e2b92584e107e4 Mon Sep 17 00:00:00 2001 From: Shawn McGuire Date: Wed, 13 Oct 2010 14:39:04 -0500 Subject: [PATCH 07/28] Fixed trailing whitespace bug --- spec/models/request_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/request_spec.rb b/spec/models/request_spec.rb index 83730f10b..dc5145f2a 100644 --- a/spec/models/request_spec.rb +++ b/spec/models/request_spec.rb @@ -41,7 +41,7 @@ describe Request do it 'should strip the destination url' do person_request = Request.new person_request.destination_url = " http://google.com/ " - person_request.send(:clean_linl) + person_request.send(:clean_link) person_request.destination_url.should == "http://google.com/" end From 241d104bc17711ba0274ff248792188eb6ef5878 Mon Sep 17 00:00:00 2001 From: Volkan Unsal Date: Wed, 13 Oct 2010 21:10:36 -0400 Subject: [PATCH 08/28] change en to tr --- config/locales/devise/devise.tr.yml | 2 +- config/locales/diaspora/tr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/devise/devise.tr.yml b/config/locales/devise/devise.tr.yml index bff5e1dd9..b3623e5d0 100644 --- a/config/locales/devise/devise.tr.yml +++ b/config/locales/devise/devise.tr.yml @@ -2,7 +2,7 @@ # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. -en: +tr: errors: messages: not_found: "bulunmadi" diff --git a/config/locales/diaspora/tr.yml b/config/locales/diaspora/tr.yml index 9ed22c72a..823ff180d 100644 --- a/config/locales/diaspora/tr.yml +++ b/config/locales/diaspora/tr.yml @@ -5,7 +5,7 @@ # 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: +tr: hello: "Merhaba dünya" application: helper: From adbc4dddbcd723d628a378d04864abe67c218ca4 Mon Sep 17 00:00:00 2001 From: maxwell Date: Thu, 14 Oct 2010 00:12:00 -0700 Subject: [PATCH 09/28] added pending spec for aspect removal on account deletion --- spec/models/user_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 8da51bc4a..cf7c4c51a 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -86,6 +86,16 @@ describe User do user.should_receive(:remove_person) user.destroy end + + + it 'should remove all aspects' do + pending "this should use :dependant => :destroy on the many assoc...but that screws this test suite..." + aspects = user.aspects + user.destroy + proc{ aspects.reload }.should raise_error /does not exist/ + + end + describe '#remove_person' do it 'should remove the person object' do From 007b06c8ea2c9b4031e51e2e20ad2b0d9d5b8bbc Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Thu, 14 Oct 2010 00:26:07 -0700 Subject: [PATCH 10/28] Stub ::Devise.mailer for great justice. And/or fewer strange arity errors. --- spec/models/user/invite_spec.rb | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/spec/models/user/invite_spec.rb b/spec/models/user/invite_spec.rb index 117bb5b37..180b2d874 100644 --- a/spec/models/user/invite_spec.rb +++ b/spec/models/user/invite_spec.rb @@ -13,17 +13,27 @@ describe User do let(:invited_user3) { create_user_with_invitation("abc", :email => "email@example.com", :inviter => inviter_with_3_invites)} context "creating invites" do - it 'should invite the user' do - pending "weird wrong number of arguments error (0 for 2), which changes if you put in two args" - #User.should_receive(:invite!).and_return(invited_user) - inviter.invite_user(:email => "email@example.com") + before do + deliverable = Object.new + deliverable.stub!(:deliver) + ::Devise.mailer.stub!(:invitation).and_return(deliverable) end - it 'should add the inviter to the invited_user' do - User.should_receive(:invite!).and_return(invited_user) - invited_user = inviter.invite_user(:email => "email@example.com") + it 'creates a user' do + lambda { + inviter.invite_user(:email => "joe@example.com") + }.should change(User, :count).by(1) + end + + it 'sends email to the invited user' do + ::Devise.mailer.should_receive(:invitation).once + inviter.invite_user(:email => "ian@example.com") + end + + it 'adds the inviter to the invited_user' do + invited_user = inviter.invite_user(:email => "marcy@example.com") invited_user.reload - invited_user.inviters.include?(inviter).should be true + invited_user.inviters.include?(inviter).should be_true end end From 58d5fbfb3e48e07829d0dbd03be749e7f48ae6b5 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 10:26:06 -0700 Subject: [PATCH 11/28] moved invite link to account#edit on settings page. changed text on person partial. --- Gemfile.lock | 8 ++++++++ app/views/users/_account.haml | 13 ++++++++++--- app/views/users/_profile.haml | 2 -- public/stylesheets/application.css | 4 ++-- public/stylesheets/sass/application.sass | 4 ++-- 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 41e008130..01e6f4688 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -122,6 +122,7 @@ GEM selenium-webdriver (>= 0.0.3) childprocess (0.0.7) ffi (~> 0.6.3) + columnize (0.3.1) crack (0.1.8) cucumber (0.9.2) builder (~> 2.1.2) @@ -162,6 +163,7 @@ GEM i18n (0.4.1) json (1.4.6) json_pure (1.4.6) + linecache (0.43) mail (2.2.7) activesupport (>= 2.3.6) mime-types @@ -223,6 +225,11 @@ GEM rspec-expectations (= 2.0.0) rspec-rails (2.0.0) rspec (= 2.0.0) + ruby-debug (0.10.3) + columnize (>= 0.1) + ruby-debug-base (~> 0.10.3.0) + ruby-debug-base (0.10.3) + linecache (>= 0.3) rubyzip (0.9.4) selenium-webdriver (0.0.29) childprocess (>= 0.0.7) @@ -280,6 +287,7 @@ DEPENDENCIES roxml! rspec (>= 2.0.0) rspec-rails (>= 2.0.0) + ruby-debug sprinkle! thin webmock diff --git a/app/views/users/_account.haml b/app/views/users/_account.haml index e6b1a7ff1..e76ae6cc6 100644 --- a/app/views/users/_account.haml +++ b/app/views/users/_account.haml @@ -5,8 +5,13 @@ %h2 Account -%h3 Change Password += link_to "invite friends", new_user_invitation_path(current_user) +%br +%br +%br + +%h3 Change Password = form_for @user do |f| = f.error_messages @@ -23,12 +28,14 @@ = f.submit 'Change password' %h3 Export Data - = link_to "download my xml", users_export_path, :class => "button" = link_to "download my photos", users_export_photos_path, :class => "button" -%h3 Close Account +%br +%br +%br +%h3 Close Account = link_to "Close Account", current_user, :confirm => "Are you sure?", :method => :delete, :class => "button" diff --git a/app/views/users/_profile.haml b/app/views/users/_profile.haml index a9ea4ad4d..cbb2b6d6a 100644 --- a/app/views/users/_profile.haml +++ b/app/views/users/_profile.haml @@ -4,8 +4,6 @@ %h2 Profile -= link_to new_user_invitation_path(current_user) - = form_for @user do |f| = f.error_messages diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 6bacdffbb..0a5e462e8 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -195,8 +195,8 @@ li.message { li.message .content .from a { font-weight: bold; } li.message .content div.info { - color: #444444; - font-size: 13px; } + color: #999999; + font-size: smaller; } li.message .content div.info a { color: #cccccc; } li.message .content div.info .time { diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index c70992407..52ef860d5 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -266,8 +266,8 @@ li.message :size 14px div.info - :color #444 - :font-size 13px + :color #999 + :font-size smaller a :color #ccc .time From 2b97e8751c2f19f5d219883f80a118bc3c4bf5ea Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 10:40:39 -0700 Subject: [PATCH 12/28] include blueprint/print.css in layout --- app/views/layouts/application.html.haml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 961dd9e0b..b4fb5fbac 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -11,6 +11,8 @@ %meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/ = stylesheet_link_tag "blueprint/screen", :media => 'screen' + = stylesheet_link_tag "blueprint/print", :media => 'print' + = stylesheet_link_tag "application", "ui" = stylesheet_link_tag "/../javascripts/fancybox/jquery.fancybox-1.3.1" From fc8dc3f04185a4fe996c36ec6c4f62eae6b458f5 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 14 Oct 2010 13:15:01 -0700 Subject: [PATCH 13/28] Add generated CSS to gitignore --- .gitignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 999b067f4..81ed4083b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,13 @@ config/fb_config.yml config/initializers/secret_token.rb .bundle -# Uploded files and local files +# Generated files log/* +public/stylesheets/application.css +public/stylesheets/sessions.css +public/stylesheets/ui.css + +# Uploded files and local files public/uploads/* public/source.tar tmp/**/* From 1ab34ab07a04a0f2f38e33698993946b9b935b16 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 14 Oct 2010 14:05:51 -0700 Subject: [PATCH 14/28] Removing generated CSS from git --- public/stylesheets/application.css | 744 ----------------------------- public/stylesheets/sessions.css | 123 ----- public/stylesheets/ui.css | 73 --- 3 files changed, 940 deletions(-) delete mode 100644 public/stylesheets/application.css delete mode 100644 public/stylesheets/sessions.css delete mode 100644 public/stylesheets/ui.css diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css deleted file mode 100644 index 0a5e462e8..000000000 --- a/public/stylesheets/application.css +++ /dev/null @@ -1,744 +0,0 @@ -@font-face { - font-family: "BrandonGrotesqueLightRegular"; - src: url("brandongrotesque_light/Brandon_light-webfont.eot"); - src: local("☺"), url("brandongrotesque_light/Brandon_light-webfont.woff") format("woff"), url("brandongrotesque_light/Brandon_light-webfont.ttf") format("truetype"), url("brandongrotesque_light/Brandon_light-webfont.svg#webfont") format("svg"); - font { - weight: normal; - style: normal; } } - -body { - padding: 2em; - margin: 0; } - -a { - color: #107fc9; - text-decoration: none; } - a:hover { - color: #22aae0; } - a:active { - color: #005d9c; } - -h1, h2, h3, h4 { - color: #444444; } - -h3 { - font-size: 18px; } - -.avatar { - width: 50px; - height: 50px; } - -#flash_notice, -#flash_error, -#flash_alert { - z-index: 100; - position: fixed; - color: white; - top: -100px; - left: 0; - width: 100%; - padding: 1em; - box-shadow: 0 1px 2px #333333; - -moz-box-shadow: 0 1px 2px #333333; - -webkit-box-shadow: 0 1px 2px #333333; - font-weight: bold; } - -#flash_notice { - background-color: rgba(127, 255, 36, 0.85); - border-bottom: solid 1px #66cc66; - text-shadow: 0 1px #66cc66; } - -#flash_error, -#flash_alert { - background-color: rgba(208, 49, 43, 0.85); - border-bottom: solid 1px #cc6666; - text-shadow: 0 1px #cc6666; } - -.fieldWithErrors { - display: inline; } - -.error_messages { - width: 400px; - border: 2px solid #cf0000; - padding: 0; - padding-bottom: 12px; - margin-bottom: 20px; - background-color: #f0f0f0; - font-size: 12px; } - .error_messages h2 { - text-align: left; - padding: 5px 5px 5px 15px; - margin: 0; - font-weight: bold; - font-size: 12px; - background-color: #cc0000; } - .error_messages p { - margin: 8px 10px; } - .error_messages ul { - margin: 0; } - -header { - z-index: 4; - position: relative; - margin: -2em; - margin-bottom: 2em; - color: black; - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#666666), to(#222222)); - background: -moz-linear-gradient(19% 75% 90deg, #222222, #666666); - background-color: #666666; - padding: 0; - padding-top: 5px; - border-bottom: 1px solid #cccccc; } - header a { - color: #999999; } - header a:hover { - background: none; - color: #eeeeee; } - header #diaspora_text { - display: inline; - font-family: "BrandonGrotesqueLightRegular"; - font-size: 16px; - border: none; - color: white; } - header #session_action { - position: absolute; - display: inline; - top: 0; - right: 0; } - header #session_action ul { - list-style: none; - padding: 0; - margin: 0; - display: inline; } - header #session_action ul li { - display: inline; - margin-right: 1em; } - header #session_action ul li:last-child { - margin-right: 0; } - header #aspect_header { - -webkit-box-shadow: 0px -4px 6px -2px #777777; - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f7f7f7), to(#eeeeee)); - background: -moz-linear-gradient(19% 75% 90deg, #eeeeee, #f7f7f7); - background-color: #eeeeee; - border-top: 1px solid white; - padding: 20px 0; } - header #aspect_header h1 { - text-shadow: 0 1px 0 white; } - header #aspect_header a { - color: #444444; } - header #aspect_header a:hover { - background: none; - color: #999999; } - header #aspect_header .page_title { - text-transform: uppercase; - text-shadow: 0 1px 0 white; } - -ul#stream { - margin: 0; - padding: 0; } - ul#stream > li { - min-height: 50px; - list-style: none; - padding: 12px 0; - border-bottom: 1px solid #eeeeee; } - ul#stream > li:hover { - background-color: #fafafa; - border-bottom: 1px solid #dddddd; } - ul#stream > li:hover .destroy_link { - display: inline; } - ul#stream .right { - top: 0; } - -li.message { - position: relative; - line-height: 19px; - font-family: "Arial", "Helvetica", sans-serif; - color: #777777; } - li.message .avatar { - float: left; - margin-right: 15px; } - li.message .delete:hover { - background: #eeeeee; } - li.message .content { - max-width: 610px; - margin-top: -4px; - padding-left: 65px; - color: #444444; - font-weight: normal; - font-size: 14px; } - li.message .content .from { - font-family: "Helvetica neue", Arial, Helvetica, sans-serif; - text-shadow: 0 1px white; } - li.message .content .from .aspect { - cursor: default; - display: inline; - color: #bbbbbb; - font-size: 12px; } - li.message .content .from .aspect a { - font-weight: normal; - color: #bbbbbb; } - li.message .content .from .aspect a:hover { - text-decoration: underline; } - li.message .content .from .aspect a:active { - color: #999999; } - li.message .content .from .aspect ul { - display: inline; - margin: 0; - padding: 0; - list-style: none; } - li.message .content .from .aspect ul li { - display: inline; } - li.message .content .from .aspect ul li:after { - content: ","; } - li.message .content .from .aspect ul li:last-child:after { - content: ""; } - li.message .content .from a { - font-weight: bold; } - li.message .content div.info { - color: #999999; - font-size: smaller; } - li.message .content div.info a { - color: #cccccc; } - li.message .content div.info .time { - font-weight: bold; - margin-right: 5px; } - li.message .content div.info .time a { - color: #bbbbbb; } - li.message:hover div.info a, li.message:hover .time a { - color: #107fc9; } - li.message:hover div.info a:hover, li.message:hover .time a:hover { - color: #22aae0; } - li.message:hover div.info a:active, li.message:hover .time a:active { - color: #005d9c; } - -.destroy_link .reshare_pane .reshare_button a.inactive { - color: #cccccc; - cursor: default; } - .destroy_link .reshare_pane .reshare_button a.inactive:hover { - text-decoration: none; } - -.destroy_link .reshare_pane { - margin-left: 5px; - margin-right: 5px; - display: inline; - position: relative; } - .destroy_link .reshare_pane ul.reshare_box { - width: 150px; - display: none; - z-index: 10; - position: absolute; - margin-top: 5px; - padding: 0; - background-color: #fafafa; - list-style: none; - border: 5px solid #666666; - -webkit-box-shadow: 0 0 5px #666666; - -moz-box-shadow: 0 0 5px #666666; - text-shadow: 0 2px white; - color: black; } - .destroy_link .reshare_pane ul.reshare_box > li { - font-weight: bold; - color: #cccccc; - border-top: 1px solid white; - border-bottom: 1px solid #cccccc; } - .destroy_link .reshare_pane ul.reshare_box > li:first-child { - border-top: none; } - .destroy_link .reshare_pane ul.reshare_box > li:last-child { - border-bottom: none; } - .destroy_link .reshare_pane ul.reshare_box > li a { - display: block; - height: 100%; - padding: 2px 5px; } - .destroy_link .reshare_pane ul.reshare_box > li a:hover { - background-color: #eeeeee; - text-decoration: none; } - .destroy_link .reshare_pane ul.reshare_box > li a:active { - background-color: #cccccc; } - -form { - position: relative; - font-size: 120%; - margin: 1em; - margin-left: 0em; } - -#user_name { - margin-bottom: 20px; } - #user_name img { - margin-right: 10px; - display: inline-block; - float: left; - height: 40px; } - #user_name h1 { - margin-bottom: 7px; - line-height: 18px; } - #user_name h1 a { - color: black; } - #user_name span { - size: small; - font-weight: normal; - color: #999999; } - #user_name #latest_message_time { - font-style: italic; } - #user_name ul { - display: inline; - margin: 0; - padding: 0; - list-style: none; } - #user_name ul > li { - display: inline; - margin-right: 1em; } - -#stream div.comments { - display: none; } - #stream div.comments .avatar { - width: 35px; - height: 35px; - margin-right: 10px; } - -input.comment_submit { - display: none; - margin-right: -10px; } - -ul.comment_set { - margin: 0; - margin-top: 1em; - padding: 0; - list-style: none; - max-width: 610px; } - ul.comment_set textarea { - width: 100%; } - ul.comment_set li.comment { - margin-bottom: 0.5em; - background-color: rgba(10, 81, 109, 0.05); - padding: 0.6em; - border-bottom: 1px solid #dddddd; } - ul.comment_set li.comment .content { - color: #777777; - margin-top: -2px; - padding-left: 45px; - font-size: 12px; - line-height: 18px; } - ul.comment_set li.comment .content .from a { - color: #444444; } - ul.comment_set li.comment .content div.time { - color: #bbbbbb; - font-size: 11px; - font-weight: bold; } - ul.comment_set li.comment form { - margin-top: -5px; - margin-bottom: 0; - font-size: 1em; } - ul.comment_set li.comment form textarea { - font-size: 1em; } - -.profile_photo img { - height: 150px; - width: 150px; } - -#profile ul { - list-style-type: none; - margin: 0; - padding: 0; } - -#stream img.person_picture, #profile img.person_picture, -.comments img.person_picture { - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - display: inline block; - height: 30px; - display: absolute; - float: left; - margin-right: 10px; } - -.pagination a { - padding: 3px; } - -li.message .from .destroy_link { - display: none; - position: absolute; - right: 0; - font-size: 12px; } - li.message .from .destroy_link a { - color: #999999; - font-weight: normal; } - li.message .from .destroy_link a:hover { - text-decoration: underline; } - -.request_buttons { - position: absolute; - right: 0; - display: inline; - list-style: none; - margin: 0; - padding: 0; } - .request_buttons > li { - display: inline; } - .request_buttons > li:first-child { - margin-right: 1em; } - -#show_photo { - text-align: center; - min-height: 200px; } - #show_photo img { - max-width: 100%; } - #show_photo .caption { - margin-top: 10px; - margin-bottom: 25px; - font-size: larger; } - -#debug_info { - margin-top: 20px; - color: #cccccc; } - #debug_info h5 { - color: #cccccc; } - -input[type='text'], -input[type='password'], -textarea { - font-family: "Arial", "Helvetica", sans-serif; - font-size: 14px; - padding: 0.3em; - display: block; - width: 66%; - border: 1px solid #cccccc; - height: auto; - border-radius: 5px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; } - -.submit_block { - text-align: right; - font-size: 12px; } - -form p { - position: relative; - padding: 0; - margin: 0; } - -label { - font-family: "Arial", "Helvetica", sans-serif; - font-weight: normal; - color: #999999; - position: absolute; - top: 3px; - left: 0.48em; - text-shadow: 0 1px 1px #eeeeee; } - -#publisher { - color: #999999; - position: relative; } - #publisher .avatar { - float: left; - margin-right: 15px; } - #publisher p { - position: absolute; - left: 0; - top: 0; } - #publisher form { - display: inline; } - #publisher form input[type='submit'] { - display: block; - margin-right: 20px; - width: 100%; } - #publisher textarea { - width: 570px; - height: 42px; - margin-top: 0; - margin-bottom: 0; } - #publisher .buttons { - float: right; } - -#image_picker .small_photo { - height: 100px; - position: relative; - display: inline-block; - margin-right: 1em; - margin-bottom: 1em; } - #image_picker .small_photo img { - border-radius: 3px; } - #image_picker .small_photo input[type='checkbox'] { - position: absolute; } -#image_picker .selected { - -webkit-box-shadow: 0 3px 6px black; - -moz-box-shadow: 0 3px 6px black; - border: 1px solid white; } - -/* cycle it! */ -.album { - position: relative; - height: 200px; - width: 200px; - display: inline-block; } - .album img { - width: 200px; - height: 200px; } - .album .name { - position: absolute; - z-index: 6; - padding: 1em; - background: rgba(0, 0, 0, 0.8); - bottom: 20px; - font-size: 18px; - text-shadow: 0 2px 0 black; } - .album .name .time { - font-size: 12px; } - .album .name .time a { - font-weight: normal; } - .album div.image_cycle img { - display: none; } - -.field_with_submit input[type='text'] { - width: 82%; - display: inline; } - -h1.big_text { - position: relative; - line-height: auto; - border-bottom: 1px solid #666666; } - h1.big_text .right { - top: -6px; } - -#content_bottom .right { - top: -5px; } - -.right { - display: inline; - float: right; } - -.back { - font-size: 12px; - font-weight: normal; } - -#content_bottom { - position: relative; - line-height: 36px; - margin: 0; - margin-top: 25px; - margin-bottom: 25px; - min-height: 36px; - border-top: 1px solid #999999; - border-bottom: 2px solid #eeeeee; } - -.show_post_comments ul.comment_set { - width: 100%; } - -.sub_header { - position: relative; - text-align: center; - font-style: italic; - margin-bottom: 20px; - color: #999999; } - -.image_thumb { - display: inline-block; - width: 100px; - min-width: 100px; - height: 100px; - min-height: 100px; } - .image_thumb img { - display: none; } - -.image_cycle img { - display: none; } - -#aspect_nav { - color: black; - margin-top: 8px; - margin-bottom: 1px; - font-family: "Arial", "Helvetica", sans-serif; } - #aspect_nav #aspect_manage_button { - display: inline; } - #aspect_nav #aspect_manage_button a { - color: #999999; } - #aspect_nav ul { - margin: 0; - padding: 0; - list-style: none; } - #aspect_nav ul > li { - padding: 0; - display: inline; - margin-right: 2px; } - #aspect_nav ul > li a { - text-shadow: 0 1px 0 #444444; - line-height: 22px; - padding: 3px 8px; - padding-bottom: 3px; - color: #999999; } - #aspect_nav ul > li a:hover { - background-color: #4e4e4e; - color: #cccccc; } - #aspect_nav ul > li.selected a { - -webkit-border-radius: 5px 5px 0 0; - -moz-border-radius: 5px 5px 0 0; - -webkit-box-shadow: 0px -4px 6px -2px #777777; - -moz-box-shadow: 0px -4px 6px -2px #777777; - text-shadow: 0 1px 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(#f7f7f7)); - background: -moz-linear-gradient(19% 75% 90deg, #f7f7f7, white); - border: 1px solid white; - border-bottom: 1px solid #f7f7f7; - color: #444444; } - #aspect_nav ul > li.selected a:hover { - background-color: #efefef; } - #aspect_nav ul > li.selected a a { - color: black; } - #aspect_nav .new_requests { - color: red; } - -#global_search { - display: inline; - position: relative; - opacity: 0.5; } - #global_search form { - display: inline; } - #global_search form input { - display: inline; - font-size: 12px; - border: none; } - #global_search form input[type='text'] { - width: 200px; - padding: 2px; } - #global_search form label { - font-size: 12px; - margin-top: -3px; } - -.aspect, -.requests, -.remove { - list-style: none; } - .aspect h3, - .requests h3, - .remove h3 { - 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 { - position: relative; } - .aspect .aspect_name ul.tools, - .requests .aspect_name ul.tools, - .remove .aspect_name ul.tools { - position: absolute; - top: 5px; - right: 0; - display: inline; - padding: 0; - margin: 0; - list-style: none; } - .aspect .aspect_name ul.tools li, - .requests .aspect_name ul.tools li, - .remove .aspect_name ul.tools li { - display: inline; - margin-right: 1em; } - .aspect .aspect_name ul.tools li:last-child, - .requests .aspect_name ul.tools li:last-child, - .remove .aspect_name ul.tools li:last-child { - margin-right: 0; } - .aspect .grey, - .requests .grey, - .remove .grey { - color: #999999; - cursor: default; - text-shadow: 0 1px white; } - .aspect ul.dropzone, - .requests ul.dropzone, - .remove ul.dropzone { - min-height: 20px; - margin: 0; - margin-bottom: 25px; - background-color: #efefef; - border: 1px solid #cccccc; - list-style: none; - padding: 15px; } - .aspect ul.dropzone.active, - .requests ul.dropzone.active, - .remove ul.dropzone.active { - background-color: #fafafa; } - .aspect .person, - .aspect .requested_person, - .requests .person, - .requests .requested_person, - .remove .person, - .remove .requested_person { - display: inline-block; - padding: 5px; - cursor: move; - margin: 5px; - z-index: 10; - text-align: center; - width: 125px; - height: 120px; } - .aspect .person img, - .aspect .requested_person img, - .requests .person img, - .requests .requested_person img, - .remove .person img, - .remove .requested_person img { - height: 100px; - width: 100px; - display: inline-block; } - .aspect .person:active, - .aspect .requested_person:active, - .requests .person:active, - .requests .requested_person:active, - .remove .person:active, - .remove .requested_person:active { - z-index: 20; - color: #666666; } - .aspect .person:active img, - .aspect .requested_person:active img, - .requests .person:active img, - .requests .requested_person:active img, - .remove .person:active img, - .remove .requested_person:active img { - -webkit-box-shadow: 0 1px 3px #333333; - -moz-box-shadow: 0 2px 4px #333333; - opacity: 0.9; } - -ul#settings_nav { - list-style: none; - padding: 0; - marign: 0; - font-size: larger; } - ul#settings_nav > li a { - font-size: smaller; - display: block; - height: 100%; - border-bottom: 1px solid #eeeeee; - padding: 2px; } - -.settings_pane { - display: none; } - -#fancybox-close:hover { - background-color: transparent; } - -#friend_pictures { - margin-top: 12px; - line-height: 1em; } - #friend_pictures img { - margin-right: -1px; - width: 35px; - height: 35px; } - -#thumbnails { - line-height: 14px; } - -#aspect_list { - margin: 0; - padding: 0; } diff --git a/public/stylesheets/sessions.css b/public/stylesheets/sessions.css deleted file mode 100644 index 2b5199d25..000000000 --- a/public/stylesheets/sessions.css +++ /dev/null @@ -1,123 +0,0 @@ -@font-face { - font-family: "BrandonGrotesqueLightRegular"; - src: url("brandongrotesque_light/Brandon_light-webfont.eot"); - src: local("☺"), url("brandongrotesque_light/Brandon_light-webfont.woff") format("woff"), url("brandongrotesque_light/Brandon_light-webfont.ttf") format("truetype"), url("brandongrotesque_light/Brandon_light-webfont.svg#webfont") format("svg"); - font { - weight: normal; - style: normal; } } - -#flash_notice, -#flash_error, -#flash_alert { - z-index: 100; - top: 32px; - position: absolute; - color: black; - width: 400px; - margin: 0 0 0 -200px; - left: 50%; - text-align: center; - font-size: 14px; - padding: 3px 0; } - -#flash_notice { - background-color: #ccffcc; - border: solid 1px #66cc66; } - -#flash_error, -#flash_alert { - background-color: #ffcccc; - border: solid 1px #cc6666; } - -.fieldWithErrors { - display: inline; } - -.error_messages { - width: 400px; - border: 2px solid #cf0000; - padding: 0; - padding-bottom: 12px; - margin-bottom: 20px; - background-color: #f0f0f0; - font-size: 12px; } - .error_messages h2 { - text-align: left; - padding: 5px 5px 5px 15px; - margin: 0; - font-weight: bold; - font-size: 12px; - background-color: #cc0000; } - .error_messages p { - margin: 8px 10px; } - .error_messages ul { - margin: 0; } - -/* via blueprint */ -html { - font-size: 100.01%; } - -/* via blueprint */ -body { - font-size: 75%; - font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; - color: #222222; - background: white; - margin-left: 100px; } - -/* via blueprint */ -input[type=text], -input[type=password], -textarea, select { - background-color: white; - border: 1px solid #bbbbbb; } - -/* via blueprint */ -input[type=text]:focus, -input[type=password]:focus, -input.text:focus, -input.title:focus, -textarea:focus, select:focus { - border-color: #666666; } - -#huge_text { - font-size: 40px; - font-family: "BrandonGrotesqueLightRegular"; - line-height: 120px; - color: #333333; - text-shadow: 0 1px 1px #999999; } - -input { - font-size: 14px; } - -form p { - position: relative; - padding: 0; } - -label { - color: #999999; - position: absolute; - padding-top: 7px; - left: 8px; - font-size: 14px; - font-weight: normal; } - -input[type='text'], -input[type='password'] { - font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; - padding: 0.3em; - width: 395px; - border-top: 1px solid #999999; } - -#user { - display: inline; - width: 500px; } - #user .username { - width: 200px; - display: inline; } - #user .username input { - display: inline; - width: 200px; } - #user .user_network { - width: 200px; - display: inline; - font-size: 18px; } diff --git a/public/stylesheets/ui.css b/public/stylesheets/ui.css deleted file mode 100644 index 6a0dd8850..000000000 --- a/public/stylesheets/ui.css +++ /dev/null @@ -1,73 +0,0 @@ -.button, .button_set { - font-family: "Lucida Grande", sans-serif; - font-style: normal; - display: inline; - padding: 4px; - font-size: 12px; - line-height: 100%; - text-shadow: 0 1px 0 white; - min-height: 10px; - background: -webkit-gradient(linear, 0% 29%, 0% 85%, from(#fcfcfc), to(#f6f6f6)); - background: -moz-linear-gradient(top, #fcfcfc, #f6f6f6); - border: 1px solid #eeeeee; - border-bottom: 1px solid #999999; - border-left: 1px solid #cccccc; - border-right: 1px solid #cccccc; - border-radius: 3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - cursor: pointer; - box-shadow: 0 1px 1px #eeeeee; - -webkit-box-shadow: 0 1px 1px #eeeeee; - -moz-box-shadow: 0 1px 1px #eeeeee; - font-weight: normal; - color: #666666; } - .button:hover, .button_set:hover { - color: #666666; - background: -webkit-gradient(linear, 0% 29%, 0% 85%, from(#fafafa), to(#f0f0f0)); - background: -moz-linear-gradient(top, #fafafa, #f0f0f0); } - .button:active, .button_set:active { - color: #666666; - background: -webkit-gradient(linear, 0% 29%, 0% 85%, from(#f0f0f0), to(#fafafa)); - background: -moz-linear-gradient(top, #f0f0f0, #fafafa); - border-top: 1px solid #cccccc; } - -ul.button_set { - padding-left: 0; - padding-right: 0; } - ul.button_set > li { - padding: 5px; - display: inline; - height: 100%; - border-left: 1px solid #cccccc; - border-right: 1px solid white; - margin-left: -3px; - margin-right: -3px; } - ul.button_set > li:first-child { - margin-left: 0; - border-left: none; } - ul.button_set > li:last-child { - margin-right: 0; - border-right: none; } - -.button .selected, .button_set .selected { - background: -webkit-gradient(linear, 0% 29%, 0% 85%, from(#f0f0f0), to(#fafafa)); - background: -moz-linear-gradient(top, #f0f0f0, #fafafa); - border-top: 1px solid #aaaaaa; } - -.right { - position: absolute; - right: 0; } - -.contextual_pane { - z-index: 20; - position: absolute; - display: none; - background-color: white; - border: 4px solid black; - border-radius: 3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - box-shadow: 0 0 5px black; - -webkit-box-shadow: 0 0 10px black; - padding: 2em; } From 32a0f60a2f0bd4cc1e51b2541fd3bab1c6cfd5b2 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 14:38:19 -0700 Subject: [PATCH 15/28] moved photos link to the side bar for now --- app/views/albums/index.html.haml | 6 --- app/views/aspects/index.html.haml | 3 -- app/views/aspects/show.html.haml | 3 -- app/views/shared/_aspect_friends.haml | 61 ++++++++++++++---------- config/locales/diaspora/en.yml | 5 +- public/stylesheets/application.css | 17 +++++-- public/stylesheets/sass/application.sass | 16 +++++++ 7 files changed, 67 insertions(+), 44 deletions(-) diff --git a/app/views/albums/index.html.haml b/app/views/albums/index.html.haml index 0d68bb1c1..4b76d38e1 100644 --- a/app/views/albums/index.html.haml +++ b/app/views/albums/index.html.haml @@ -8,9 +8,6 @@ $("#add_album_button").fancybox(); }); -= content_for :page_title do - = link_to "◂ #{t('.home')}", aspects_path, :aspect => params[:aspect] - - content_for :left_pane do = render "shared/aspect_friends" @@ -31,6 +28,3 @@ #pagination = will_paginate @albums -#content_bottom - .back - = link_to "⇧ #{t('.home')}", root_path diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index 4935531d6..24860b668 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -2,9 +2,6 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -- content_for :page_title do - = link_to t('.photos'), albums_path(:aspect => @aspect) - - content_for :left_pane do = render "shared/aspect_friends" diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 772a71971..1cd12d0a4 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -2,9 +2,6 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -- content_for :page_title do - = link_to t('.photos'), albums_path(:aspect => @aspect) - - content_for :left_pane do = render "shared/aspect_friends" diff --git a/app/views/shared/_aspect_friends.haml b/app/views/shared/_aspect_friends.haml index a37068577..dc0b991d3 100644 --- a/app/views/shared/_aspect_friends.haml +++ b/app/views/shared/_aspect_friends.haml @@ -2,30 +2,41 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -#friend_pictures - = owner_image_link - - for friend in @friends - = person_image_link(friend) - - if @logged_in && (@aspect == :public) - %h3 Facebook Friends - - @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends") - - @fb_friends[:data].each do |friend| - = image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" ) - -unless (@aspect == :all) || (@aspect == :public) - = link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button' - .yo{:style => 'display:none'} - #add_request_pane - = render "requests/new_request", :aspect => @aspect - -else - .clear - %br - = link_to t('.add_friends'), aspects_manage_path +#left_pane + #friend_pictures + = owner_image_link + - for friend in @friends + = person_image_link(friend) + - if @logged_in && (@aspect == :public) + %h3 Facebook Friends + - @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends") + - @fb_friends[:data].each do |friend| + = image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" ) + -unless (@aspect == :all) || (@aspect == :public) + = link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button' + + .yo{:style => 'display:none'} + #add_request_pane + = render "requests/new_request", :aspect => @aspect + -else + .clear + %br + = link_to t('.add_friends'), aspects_manage_path + + %br + %br + %ul + %li= link_to 'stream', aspect_path(@aspect) + %li= link_to t('.photos'), albums_path(:aspect => @aspect) + + %br + + %h4 Invites + = link_to "Invite a friend!", "#invite_user_pane", :id => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend" + %br + = "You have #{@invites} invites." + .yo{ :style => "display:none;"} + #invite_user_pane + = render "invitations/new" -%br -= link_to "Invite a friend!", "#invite_user_pane", :id => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend" -%br -= "You have #{@invites} invites." -.yo{ :style => "display:none;"} - #invite_user_pane - = render "invitations/new" diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 1dd33bb3f..221c4e034 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -38,6 +38,7 @@ en: share: "Share" aspect_friends: add_friends: "add friends" + photos: "photos" albums: album: you: "you" @@ -69,10 +70,6 @@ en: friends_albums: "Friends Albums" your_albums: "Your Albums" aspects: - index: - photos: "photos" - show: - photos: "photos" manage: add_a_new_aspect: "Add a new aspect" add_a_new_friend: "Add a new friend" diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 0a5e462e8..172c6a68e 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -90,7 +90,7 @@ header { padding-top: 5px; border-bottom: 1px solid #cccccc; } header a { - color: #999999; } + color: #cccccc; } header a:hover { background: none; color: #eeeeee; } @@ -564,10 +564,10 @@ h1.big_text { line-height: 22px; padding: 3px 8px; padding-bottom: 3px; - color: #999999; } + color: #cccccc; } #aspect_nav ul > li a:hover { background-color: #4e4e4e; - color: #cccccc; } + color: #eeeeee; } #aspect_nav ul > li.selected a { -webkit-border-radius: 5px 5px 0 0; -moz-border-radius: 5px 5px 0 0; @@ -742,3 +742,14 @@ ul#settings_nav { #aspect_list { margin: 0; padding: 0; } + +#left_pane ul { + margin: 0; + padding: 0; + list-style: none; } + #left_pane ul li a { + display: block; + padding: 3px; + border-bottom: 1px solid #cccccc; } + #left_pane ul li a:hover:after { + content: " ►"; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 0b8368b6b..dba3e4812 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -964,3 +964,19 @@ ul#settings_nav #aspect_list :margin 0 :padding 0 + +#left_pane + ul + :margin 0 + :padding 0 + :list + :style none + li a + :display block + :padding 3px + :border + :bottom 1px solid #ccc + + &:hover + &:after + :content " ►" From c287e30f07c1e47efc91ef7315c4ffb8c14b4b64 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 14 Oct 2010 14:46:46 -0700 Subject: [PATCH 16/28] fix db seeds --- db/seeds/dev.rb | 2 +- db/seeds/tom.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/seeds/dev.rb b/db/seeds/dev.rb index 873c58ec5..b321124f8 100644 --- a/db/seeds/dev.rb +++ b/db/seeds/dev.rb @@ -40,4 +40,4 @@ user2.person.save! aspect = user.aspect(:name => "other dudes") request = user.send_friend_request_to(user2, aspect) reversed_request = user2.accept_friend_request( request.id, user2.aspect(:name => "presidents").id ) -user.receive reversed_request.to_diaspora_xml +user.receive reversed_request.to_diaspora_xml, user2.person diff --git a/db/seeds/tom.rb b/db/seeds/tom.rb index 947ba0b21..074b37caf 100644 --- a/db/seeds/tom.rb +++ b/db/seeds/tom.rb @@ -41,6 +41,6 @@ user2.person.save! aspect = user.aspect(:name => "other dudes") request = user.send_friend_request_to(user2, aspect) reversed_request = user2.accept_friend_request( request.id, user2.aspect(:name => "presidents").id ) -user.receive reversed_request.to_diaspora_xml +user.receive reversed_request.to_diaspora_xml, user2.person user.aspect(:name => "Presidents") From 5722f85c85afa42a4e7926c13a32059adf69371b Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 15:00:47 -0700 Subject: [PATCH 17/28] message in aspect if stream is empty --- app/views/aspects/show.html.haml | 5 +++++ public/stylesheets/application.css | 16 ++++++++++++++++ public/stylesheets/sass/application.sass | 24 ++++++++++++++++++++++++ 3 files changed, 45 insertions(+) diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 1cd12d0a4..5f8354803 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -11,6 +11,11 @@ %ul#stream - for post in @posts = render type_partial(post), :post => post unless post.class == Album +- if @posts.size == 0 + .empty_message + .null_arrow ⇧ + %h3 Nobody has said anything yet. Get the conversation started! + #pagination = will_paginate @posts diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 172c6a68e..e4c94610a 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -753,3 +753,19 @@ ul#settings_nav { border-bottom: 1px solid #cccccc; } #left_pane ul li a:hover:after { content: " ►"; } + +.empty_message { + margin-top: 12px; + text-align: center; + color: #777777; + margin-left: 70px; + padding: 1em; + padding-top: 0; + width: 80%; + border: 2px dashed #777777; + border-radius: 5px; } + .empty_message h3 { + color: #777777; } + .empty_message .null_arrow { + font-size: 80px; + display: inline-block; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index dba3e4812..072ba8fad 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -980,3 +980,27 @@ ul#settings_nav &:hover &:after :content " ►" + +.empty_message + :margin + :top 12px + :text + :align center + + :color #777 + h3 + :color #777 + + :margin + :left 70px + :padding 1em + :top 0 + :width 80% + :border 2px dashed #777 + :border-radius 5px + + .null_arrow + :font + :size 80px + :display inline-block + From cf2a4c25ae808e6289468a67ec11239bcd9b2186 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 15:19:37 -0700 Subject: [PATCH 18/28] DG RS; remove empty message from stream upon adding something --- app/views/aspects/show.html.haml | 2 +- app/views/js/_websocket_js.haml | 19 ++++++++++++++----- public/stylesheets/application.css | 6 +++--- public/stylesheets/sass/application.sass | 2 +- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 5f8354803..e50c53602 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -12,7 +12,7 @@ - for post in @posts = render type_partial(post), :post => post unless post.class == Album - if @posts.size == 0 - .empty_message + #empty_message .null_arrow ⇧ %h3 Nobody has said anything yet. Get the conversation started! diff --git a/app/views/js/_websocket_js.haml b/app/views/js/_websocket_js.haml index a0663edfc..27f7942e0 100644 --- a/app/views/js/_websocket_js.haml +++ b/app/views/js/_websocket_js.haml @@ -59,14 +59,23 @@ function processPost(className, html, aspectIds){ if(onPageForAspects(aspectIds)){ - $("#stream").prepend( - $(html).fadeIn("fast", function(){ - $("#stream label:first").inFieldLabels(); - }) - ); + var addPostToStream = function (html){ + $("#stream").prepend( + $(html).fadeIn("fast", function(){ + $("#stream label:first").inFieldLabels(); + }) + ) + }; + + if( $("#empty_message").length > 0 ){ + $("#empty_message").fadeOut(400, addPostToStream(html)).remove(); + } else { + addPostToStream(html); + } } } + function processPhotoInAlbum(photoHash){ if (location.href.indexOf(photoHash['album_id']) == -1){ return ; diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index e4c94610a..7bb190bb6 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -754,7 +754,7 @@ ul#settings_nav { #left_pane ul li a:hover:after { content: " ►"; } -.empty_message { +#empty_message { margin-top: 12px; text-align: center; color: #777777; @@ -764,8 +764,8 @@ ul#settings_nav { width: 80%; border: 2px dashed #777777; border-radius: 5px; } - .empty_message h3 { + #empty_message h3 { color: #777777; } - .empty_message .null_arrow { + #empty_message .null_arrow { font-size: 80px; display: inline-block; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 072ba8fad..dfc6662c6 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -981,7 +981,7 @@ ul#settings_nav &:after :content " ►" -.empty_message +#empty_message :margin :top 12px :text From 8daf2d0fd518d6a65f9399646f2916a064399b51 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 15:23:15 -0700 Subject: [PATCH 19/28] add none message to aspect#index --- app/views/aspects/index.html.haml | 6 ++++++ app/views/aspects/show.html.haml | 1 + 2 files changed, 7 insertions(+) diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index 24860b668..25ba89081 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -11,6 +11,12 @@ %ul#stream - for post in @posts = render type_partial(post), :post => post unless post.class == Album + +- if @posts.size == 0 + #empty_message + .null_arrow ⇧ + %h3 Nobody has said anything yet. Get the conversation started! + #pagination = will_paginate @posts diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index e50c53602..441508e8f 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -11,6 +11,7 @@ %ul#stream - for post in @posts = render type_partial(post), :post => post unless post.class == Album + - if @posts.size == 0 #empty_message .null_arrow ⇧ From 750b4b43886d9b818f7b72411e6a054023894410 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 15:40:34 -0700 Subject: [PATCH 20/28] empty message re-appears if all stream posts are deleted --- app/views/aspects/index.html.haml | 7 +++---- app/views/aspects/show.html.haml | 7 +++---- app/views/js/_websocket_js.haml | 11 ++++++----- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index 25ba89081..23b1763e9 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -12,10 +12,9 @@ - for post in @posts = render type_partial(post), :post => post unless post.class == Album -- if @posts.size == 0 - #empty_message - .null_arrow ⇧ - %h3 Nobody has said anything yet. Get the conversation started! +#empty_message{:style => ("display:none" unless @posts.count == 0)} + .null_arrow ⇧ + %h3 Nobody has said anything yet. Get the conversation started! #pagination = will_paginate @posts diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 441508e8f..4e112155c 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -12,10 +12,9 @@ - for post in @posts = render type_partial(post), :post => post unless post.class == Album -- if @posts.size == 0 - #empty_message - .null_arrow ⇧ - %h3 Nobody has said anything yet. Get the conversation started! +#empty_message{:style => ("display:none" unless @posts.count == 0)} + .null_arrow ⇧ + %h3 Nobody has said anything yet. Get the conversation started! #pagination = will_paginate @posts diff --git a/app/views/js/_websocket_js.haml b/app/views/js/_websocket_js.haml index 27f7942e0..addd0b053 100644 --- a/app/views/js/_websocket_js.haml +++ b/app/views/js/_websocket_js.haml @@ -37,9 +37,10 @@ }); function processRetraction(post_id){ - $('#' + post_id ).fadeOut(500, function(){ - $(this).remove; - }); + $('#' + post_id ).fadeOut(500).remove(); + if($("#stream")[0].childElementCount == 0){ + $("#empty_message").fadeIn(200); + } } function processComment(post_id, html){ @@ -67,8 +68,8 @@ ) }; - if( $("#empty_message").length > 0 ){ - $("#empty_message").fadeOut(400, addPostToStream(html)).remove(); + if( $("#empty_message").is(":visible") ){ + $("#empty_message").fadeOut(400, addPostToStream(html)).hide(); } else { addPostToStream(html); } From 65958cf85cdfa0f0e32b7fcb2fcb4e8948fb364b Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 14 Oct 2010 15:53:43 -0700 Subject: [PATCH 21/28] Should close Issue 368 --- app/controllers/requests_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/requests_controller.rb b/app/controllers/requests_controller.rb index 82f31152c..630cb9b32 100644 --- a/app/controllers/requests_controller.rb +++ b/app/controllers/requests_controller.rb @@ -33,7 +33,7 @@ class RequestsController < ApplicationController aspect = current_user.aspect_by_id(params[:request][:aspect_id]) begin - rel_hash = relationship_flow(params[:request][:destination_url].strip!) + rel_hash = relationship_flow(params[:request][:destination_url].strip) rescue Exception => e raise e unless e.message.include? "not found" flash[:error] = I18n.t 'requests.create.error' From 753deedc65fc3cdceb2b1046a1b00082fbb19b6d Mon Sep 17 00:00:00 2001 From: maelsoucaze Date: Fri, 15 Oct 2010 01:17:17 +0200 Subject: [PATCH 22/28] Fixes and updates French (Formal Honorifics) localization. --- config/locales/devise/devise.fr.yml | 30 ++++--- config/locales/diaspora/fr.yml | 127 ++++++++++++++++++++-------- 2 files changed, 109 insertions(+), 48 deletions(-) diff --git a/config/locales/devise/devise.fr.yml b/config/locales/devise/devise.fr.yml index 69518e4a6..d549c2931 100644 --- a/config/locales/devise/devise.fr.yml +++ b/config/locales/devise/devise.fr.yml @@ -1,7 +1,3 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. - fr: errors: messages: @@ -14,7 +10,7 @@ fr: 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: 'Adresse 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é.' @@ -22,19 +18,29 @@ fr: 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.' + send_instructions: 'Vous allez recevoir dans quelques minutes un e-mail contenant les instructions pour 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.' + send_instructions: 'Vous allez recevoir dans quelques minutes un e-mail contenant les instructions pour 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.' + signed_up: 'Vous vous êtes inscrit avec succès. Si cette dernière est 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.' + send_instructions: 'Vous allez recevoir dans quelques minutes un e-mail contenant les instructions pour déverrouiller votre compte.' unlocked: 'Votre compte a été déverrouillé avec succès. Vous êtes à présent connecté.' + invitations: + send_instructions: 'Votre invitation a été envoyée.' + invitation_token_invalid: 'Le jeton d’invitation fourni n’est pas valide !' + updated: 'Votre mot de passe a été réglé 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' + confirmation_instructions: + subject: 'Instructions de confirmation' + reset_password_instructions: + subject: 'Instructions de réinitialisation du mot de passe' + unlock_instructions: + subject: 'Instructions de déverrouillage' + invitation: + subject: 'Un ami souhaite que vous rejoigniez Diaspora !' + diff --git a/config/locales/diaspora/fr.yml b/config/locales/diaspora/fr.yml index 92abcbcfb..c372ee57e 100644 --- a/config/locales/diaspora/fr.yml +++ b/config/locales/diaspora/fr.yml @@ -2,42 +2,42 @@ # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. -# Localization file for French. Add more files in this directory for other locales. +# Localization file for French (Formal Honorifics). Add more files in this directory for other locales. # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. fr: hello: "Bonjour tout le monde" application: helper: - unknown_person: "unknown person" - new_requests: "new requests" + unknown_person: "personne inconnue" + new_requests: "nouvelles requêtes" dashboards: helper: - home: "home" + home: "accueil" error_messages: helper: - invalid_fields: "Invalid Fields" - correct_the_following_errors_and_try_again: "Correct the following errors and try again." + invalid_fields: "Champs invalides" + correct_the_following_errors_and_try_again: "Corrigez les erreurs suivantes, puis réessayez." people: helper: - results_for: " resultados para %{params}" - people_on_pod_are_aware_of: " gente en pod estan al tanto de " + results_for: " résultats concernant %{params}" + people_on_pod_are_aware_of: " personnes agissant comme des automates sont au courant" layouts: application: - edit_profile: "Éditez votre profil" - logout: "Déconnexion" + edit_profile: "éditer le profil" + logout: "déconnexion" shared: aspect_nav: - all_aspects: "Tous les Aspects" - manage: "Gérez" - manage_your_aspects: "Gérez vos Aspects" + 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érez vos Aspects" + all_aspects: "Tous les aspects" + manage_aspects: "Gérer les aspects" publisher: share: "Partager" aspect_friends: - add_friends: "Ajouter des amis" + add_friends: "ajouter des amis" albums: album: you: "vous" @@ -52,22 +52,22 @@ fr: edit: editing: "Édition" updated: "mis à jour" - are_you_sure: "Êtes-vous sûr?" - delete_album: "Supprimer l'album" + are_you_sure: "Êtes-vous sûr(e) ?" + delete_album: "Supprimer l’album" cancel: "Annuler" index: home: "accueil" new_album: "Nouvel album" - helper: - friends_albums: "Friends Albums" - your_albums: "Your Albums" create: - success: "Tu as créé un album nommé %{name}." + success: "Vous avez 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é." + helper: + friends_albums: "Albums d’amis" + your_albums: "Vos albums" aspects: index: photos: "photos" @@ -75,8 +75,8 @@ fr: photos: "photos" manage: add_a_new_aspect: "Ajouter un nouvel aspect" - add_a_new_friend: "Ajouter un nouvel amis" - show: "Voir" + add_a_new_friend: "Ajouter un nouvel ami" + show: "Afficher" update_aspects: "Mettre à jour les aspects" requests: "Requêtes" ignore_remove: "Ignorer/Supprimer" @@ -84,7 +84,21 @@ fr: 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." + success: "Cliquez sur le symbole plus situé sur le côté gauche afin que Diaspora détermine qui peut voir votre nouvel aspect." + failure: "La création de l’aspect a échoué." + destroy: + success: "%{name} a été supprimé avec succès." + update: + success: "Votre aspect, %{name}, a été édité avec succès." + move_friends: + failure: "L’édition de l’aspect concernant votre ami %{real_name} a échoué." + success: "Les aspects ont été édités avec succès." + move_friend: + failure: "ne fonctionne pas %{inspect}" + success: "Vous montrez à présent à votre ami un aspect différent au vôtre." + helper: + remove: "supprimer" + aspect_not_empty: "L’aspect n’est pas vide" users: edit: editing_profile: "Édition du profil" @@ -93,12 +107,14 @@ fr: update_profile: "Mettre à jour le profil" home: "Accueil" diaspora_username: "NOM D’UTILISATEUR DIASPORA" - info: "Information" + info: "Informations" 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." + or: "ou" + destroy: "Compte clôturé avec succès." comments: comment: ago: "il y a" @@ -111,22 +127,41 @@ fr: next: "suivant" edit_photo: "Éditer la photo" delete_photo: "Supprimer la photo" - are_you_sure: "Êtes-vous sûr ?" + are_you_sure: "Êtes-vous sûr(e) ?" comments: "commentaires" edit: editing: "Édition" - are_you_sure: "Êtes-vous sûr ?" + are_you_sure: "Êtes-vous sûr(e) ?" delete_photo: "Supprimer la photo" photo: show_comments: "afficher les commentaires" - posted_a_new_photo_to: "a publié une nouvelle photo sur" + posted_a_new_photo_to: "a publié une nouvelle photo dans" new: new_photo: "Nouvelle photo" back_to_list: "Retourner à la liste" - post_it: "publiez-la !" + post_it: "la publier !" + create: + runtime_error: "Le transfert de la photo a échoué. Êtes-vous sûr(e) que votre ceinture de sécurité est bien attachée ?" + integrity_error: "Le transfert de la photo a échoué. Êtes-vous sûr(e) que c’était bien une image ?" + type_error: "Le transfert de la photo a échoué. Êtes-vous sûr(e) que l’image a bien été ajoutée ?" + update: + notice: "La photo a été mise à jour avec succès." + error: "L’édition de la photo a échoué." + destroy: + notice: "La photo a été supprimée." registrations: new: sign_up: "Inscription" + create: + success: "Vous avez rejoint Diaspora !" + invitations: + create: + sent: 'Votre invitation a été envoyée.' + no_more: 'Vous n’avez plus d’invitation.' + already_sent: 'Vous avez déjà invité cette personne.' + invitation_token_invalid: 'Le jeton d’invitation fourni n’est pas valide !' + updated: 'Votre mot de passe a été réglé avec succès. Vous êtes à présent connecté.' + status_messages: new_status_message: tell_me_something_good: "dites-moi quelque chose de bien" @@ -134,16 +169,21 @@ fr: status_message: show_comments: "afficher les commentaires" delete: "Supprimer" - are_you_sure: "Êtes-vous sûr ?" + are_you_sure: "Êtes-vous sûr(e) ?" show: status_message: "Message d’état" comments: "commentaires" - are_you_sure: "Êtes-vous sûr ?" + are_you_sure: "Êtes-vous sûr(e) ?" destroy: "Détruire" - view_all: "Tout voir" + view_all: "Tout afficher" message: "Message" owner: "Propriétaire" + helper: + no_message_to_display: "Aucun message à afficher." people: + person: + add_friend: "ajouter en ami" + pending_request: "requête en attente" index: add_friend: "ajouter un ami" real_name: "nom réel" @@ -157,6 +197,21 @@ fr: 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" + save: "sauver" + are_you_sure: "Êtes-vous sûr(e) ?" + remove_friend: "supprimer de mes amis" + requests: + new_request: + add_a_new_friend_to: "Ajouter un nouvel ami à" + enter_a_diaspora_username: "Saisissez un nom d’utilisateur Diaspora :" + your_diaspora_username_is: "Votre nom d’utilisateur Diaspora est : %{diaspora_handle}" + friends_username: "Nom d’utilisateur de l’ami" + destroy: + success: "Vous êtes à présent amis." + error: "Veuillez sélectionner un aspect !" + ignore: "Requête d’ami ignorée." + create: + error: "Aucun résultat Diaspora n’a été trouvé avec cette adresse e-mail !" + already_friends: "Vous êtes déjà amis avec %{destination_url}!" + success: "Une requête d’ami a été envoyée à %{destination_url}." + horribly_wrong: "Quelque chose d’horrible s’est produit." From 9134c4545c3cc399765467dd8297eb2953fb8c66 Mon Sep 17 00:00:00 2001 From: maelsoucaze Date: Fri, 15 Oct 2010 01:17:33 +0200 Subject: [PATCH 23/28] Fixes and updates French (Informal Honorifics) localization. --- config/locales/devise/devise.fr-informal.yml | 28 ++++++----- config/locales/diaspora/fr-informal.yml | 49 ++++++++++++-------- 2 files changed, 47 insertions(+), 30 deletions(-) diff --git a/config/locales/devise/devise.fr-informal.yml b/config/locales/devise/devise.fr-informal.yml index 298525ae9..1c97771c0 100644 --- a/config/locales/devise/devise.fr-informal.yml +++ b/config/locales/devise/devise.fr-informal.yml @@ -1,7 +1,3 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. - fr-informal: errors: messages: @@ -22,19 +18,29 @@ fr-informal: signed_in: 'Connecté avec succès.' signed_out: 'Déconnecté avec succès.' passwords: - send_instructions: 'Tu vas recevoir dans quelques minutes un e-mail contenant des instructions t’expliquant comment réinitialiser ton mot de passe.' + send_instructions: 'Tu vas recevoir dans quelques minutes un e-mail contenant les instructions pour réinitialiser ton mot de passe.' updated: 'Ton mot de passe a été modifié avec succès. Tu es à présent connecté.' confirmations: - send_instructions: 'Tu vas recevoir dans quelques minutes un e-mail contenant des instructions t’expliquant comment confirmer ton compte.' + send_instructions: 'Tu vas recevoir dans quelques minutes un e-mail contenant les instructions pour confirmer ton compte.' confirmed: 'Ton compte a été confirmé avec succès. Tu es à présent connecté.' registrations: - signed_up: 'Tu t’es inscrit avec succès. Si activée, une confirmation a été envoyée sur ton adresse e-mail.' + signed_up: 'Tu t’es inscrit avec succès. Si cette dernière est activée, une confirmation a été envoyée sur ton adresse e-mail.' updated: 'Tu as mis à jour ton compte avec succès.' destroyed: 'Au revoir ! Ton compte a été résilié avec succès. Nous espérons te revoir très bientôt.' unlocks: - send_instructions: 'Tu vas recevoir dans quelques minutes un e-mail contenant des instructions t’expliquant comment déverrouiller ton compte.' + send_instructions: 'Tu vas recevoir dans quelques minutes un e-mail contenant les instructions pour déverrouiller ton compte.' unlocked: 'Ton compte a été déverrouillé avec succès. Tu es à présent connecté.' + invitations: + send_instructions: 'Ton invitation a été envoyée.' + invitation_token_invalid: 'Le jeton d’invitation fourni n’est pas valide !' + updated: 'Ton mot de passe a été réglé avec succès. Tu es à 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' + confirmation_instructions: + subject: 'Instructions de confirmation' + reset_password_instructions: + subject: 'Instructions de réinitialisation du mot de passe' + unlock_instructions: + subject: 'Instructions de déverrouillage' + invitation: + subject: 'Un ami souhaite que tu rejoignes Diaspora !' + diff --git a/config/locales/diaspora/fr-informal.yml b/config/locales/diaspora/fr-informal.yml index 8a30d7ad9..d8944f81e 100644 --- a/config/locales/diaspora/fr-informal.yml +++ b/config/locales/diaspora/fr-informal.yml @@ -21,7 +21,7 @@ fr-informal: people: helper: results_for: " résultats concernant %{params}" - people_on_pod_are_aware_of: " personnes agissant comme des automates sont conscients de" + people_on_pod_are_aware_of: " personnes agissant comme des automates sont au courant" layouts: application: edit_profile: "éditer le profil" @@ -52,7 +52,7 @@ fr-informal: edit: editing: "Édition" updated: "mis à jour" - are_you_sure: "Es-tu sûr(e)?" + are_you_sure: "Es-tu sûr(e) ?" delete_album: "Supprimer l’album" cancel: "Annuler" index: @@ -84,17 +84,18 @@ fr-informal: add_a_new_aspect: "Ajouter un nouvel aspect" create: "Créer" create: - success:"Clique sur le symbole plus situé sur le côté gauche afin que Diaspora détermine qui peut voir ton nouvel aspect." + success: "Clique sur le symbole plus situé sur le côté gauche afin que Diaspora détermine qui peut voir ton nouvel aspect." + failure: "La création de l’aspect a échoué." destroy: success: "%{name} a été supprimé avec succès." update: success: "Ton aspect, %{name}, a été édité avec succès." move_friends: - failure: "L’édition de l’aspect concernant l’ami %{real_name} a échoué." + failure: "L’édition de l’aspect concernant ton ami %{real_name} a échoué." success: "Les aspects ont été édités avec succès." move_friend: - error: "ne fonctionne pas %{inspect}" - notice: "Tu montres à présent à ton ami un aspect différent au tien." + failure: "ne fonctionne pas %{inspect}" + success: "Tu montres à présent à ton ami un aspect différent au tiens." helper: remove: "supprimer" aspect_not_empty: "L’aspect n’est pas vide" @@ -106,12 +107,14 @@ fr-informal: update_profile: "Mettre à jour le profil" home: "Accueil" diaspora_username: "NOM D’UTILISATEUR DIASPORA" - info: "Information" + info: "Informations" picture: "Image" editing_profile: "Édition du profil" albums: "Albums" you_dont_have_any_photos: "Tu n’as aucune photo ! Rends-toi sur la page" page_to_upload_some: "afin d’en transférer quelques-unes." + or: "ou" + destroy: "Compte clôturé avec succès." comments: comment: ago: "il y a" @@ -132,25 +135,33 @@ fr-informal: delete_photo: "Supprimer la photo" photo: show_comments: "afficher les commentaires" - posted_a_new_photo_to: "a publié une nouvelle photo sur" + posted_a_new_photo_to: "a publié une nouvelle photo dans" new: new_photo: "Nouvelle photo" back_to_list: "Retourner à la liste" - post_it: "publie-la !" + post_it: "la publier !" create: runtime_error: "Le transfert de la photo a échoué. Es-tu sûr(e) que ta ceinture de sécurité est bien attachée ?" integrity_error: "Le transfert de la photo a échoué. Es-tu sûr(e) que c’était bien une image ?" - type_error: "Le transfert de la photo a échoué. Es-tu sûr(e) que l’image était bien ajoutée ?" + type_error: "Le transfert de la photo a échoué. Es-tu sûr(e) que l’image a bien été ajoutée ?" update: notice: "La photo a été mise à jour avec succès." - error: "Échec de l’édition de la photo." + error: "L’édition de la photo a échoué." destroy: - notice: "Photo supprimée." + notice: "La photo a été supprimée." registrations: new: sign_up: "Inscription" create: success: "Tu as rejoint Diaspora !" + invitations: + create: + sent: 'Ton invitation a été envoyée.' + no_more: 'Tu n’as plus d’invitation.' + already_sent: 'Tu as déjà invité cette personne.' + invitation_token_invalid: 'Le jeton d’invitation fourni n’est pas valide !' + updated: 'Ton mot de passe a été réglé avec succès. Tu es à présent connecté.' + status_messages: new_status_message: tell_me_something_good: "dis-moi quelque chose de bien" @@ -164,14 +175,14 @@ fr-informal: comments: "commentaires" are_you_sure: "Es-tu sûr(e) ?" destroy: "Détruire" - view_all: "Tout voir" + view_all: "Tout afficher" message: "Message" owner: "Propriétaire" helper: no_message_to_display: "Aucun message à afficher." people: person: - add_friend: "ajouter un ami" + add_friend: "ajouter en ami" pending_request: "requête en attente" index: add_friend: "ajouter un ami" @@ -186,13 +197,13 @@ fr-informal: show: last_seen: "dernière connexion : %{how_long_ago}" friends_since: "amis depuis : %{how_long_ago}" - save: "sauvegarder" + save: "sauver" are_you_sure: "Es-tu sûr(e) ?" - remove_friend: "supprimer un ami" + remove_friend: "supprimer de mes amis" requests: new_request: - add_a_new_friend_to: "Ajouter un ami à" - enter_a_diaspora_username: "Saisi un nom d’utilisateur Diaspora :" + add_a_new_friend_to: "Ajouter un nouvel ami à" + enter_a_diaspora_username: "Saisis un nom d’utilisateur Diaspora :" your_diaspora_username_is: "Ton nom d’utilisateur Diaspora est : %{diaspora_handle}" friends_username: "Nom d’utilisateur de l’ami" destroy: @@ -201,6 +212,6 @@ fr-informal: ignore: "Requête d’ami ignorée." create: error: "Aucun résultat Diaspora n’a été trouvé avec cette adresse e-mail !" - already_friends: "Tu es déjà ami avec %{destination_url}!" + already_friends: "Vous êtes déjà amis avec %{destination_url}!" success: "Une requête d’ami a été envoyée à %{destination_url}." horribly_wrong: "Quelque chose d’horrible s’est produit." From 45d7d54c66e502a84dd3865fade341a53a8cc8ce Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 16:23:29 -0700 Subject: [PATCH 24/28] added an empty message for the case of an aspect with no friends --- app/views/aspects/_empty_messages.haml | 18 ++++++++++++++++++ app/views/aspects/index.html.haml | 6 ++---- app/views/aspects/show.html.haml | 6 ++---- app/views/js/_websocket_js.haml | 6 +++--- app/views/shared/_aspect_friends.haml | 2 +- public/javascripts/view.js | 4 ++-- public/stylesheets/application.css | 16 +++++++++------- public/stylesheets/sass/application.sass | 15 ++++++++++----- 8 files changed, 47 insertions(+), 26 deletions(-) create mode 100644 app/views/aspects/_empty_messages.haml diff --git a/app/views/aspects/_empty_messages.haml b/app/views/aspects/_empty_messages.haml new file mode 100644 index 000000000..28b97fab1 --- /dev/null +++ b/app/views/aspects/_empty_messages.haml @@ -0,0 +1,18 @@ +-# Copyright (c) 2010, Diaspora Inc. This file is +-# licensed under the Affero General Public License version 3 or later. See +-# the COPYRIGHT file. + +#no_posts.empty_message{:style => ("display:none" unless @posts.count == 0)} + .null_arrow ⇧ + %h3 Nobody has said anything yet. Get the conversation started! + +#no_friends.empty_message{:style => ("display:none" unless @friends.count == 0)} + %h3 You have no friends in this aspect. + + - unless (@aspect == :all) || (@aspect == :public) + %h4= link_to "Add a friend", "#add_request_pane", :class => "add_request_button" + - else + %h4= link_to "Add a friend", aspects_manage_path + + %h4= link_to "Invite a friend to join Diaspora!", "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend" + diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index 23b1763e9..95c6c2dc4 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -8,14 +8,12 @@ - content_for :publish do = render "shared/publisher", :aspect_ids => :all, :broadcast => true += render 'aspects/empty_messages' + %ul#stream - for post in @posts = render type_partial(post), :post => post unless post.class == Album -#empty_message{:style => ("display:none" unless @posts.count == 0)} - .null_arrow ⇧ - %h3 Nobody has said anything yet. Get the conversation started! - #pagination = will_paginate @posts diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 4e112155c..d2cd9c04c 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -8,14 +8,12 @@ - content_for :publish do = render "shared/publisher", :aspect_ids => :all += render 'aspects/empty_messages' + %ul#stream - for post in @posts = render type_partial(post), :post => post unless post.class == Album -#empty_message{:style => ("display:none" unless @posts.count == 0)} - .null_arrow ⇧ - %h3 Nobody has said anything yet. Get the conversation started! - #pagination = will_paginate @posts diff --git a/app/views/js/_websocket_js.haml b/app/views/js/_websocket_js.haml index addd0b053..9bf801e0a 100644 --- a/app/views/js/_websocket_js.haml +++ b/app/views/js/_websocket_js.haml @@ -39,7 +39,7 @@ function processRetraction(post_id){ $('#' + post_id ).fadeOut(500).remove(); if($("#stream")[0].childElementCount == 0){ - $("#empty_message").fadeIn(200); + $("#no_posts").fadeIn(200); } } @@ -68,8 +68,8 @@ ) }; - if( $("#empty_message").is(":visible") ){ - $("#empty_message").fadeOut(400, addPostToStream(html)).hide(); + if( $("#no_posts").is(":visible") ){ + $("#no_posts").fadeOut(400, addPostToStream(html)).hide(); } else { addPostToStream(html); } diff --git a/app/views/shared/_aspect_friends.haml b/app/views/shared/_aspect_friends.haml index dc0b991d3..508cabbb4 100644 --- a/app/views/shared/_aspect_friends.haml +++ b/app/views/shared/_aspect_friends.haml @@ -33,7 +33,7 @@ %br %h4 Invites - = link_to "Invite a friend!", "#invite_user_pane", :id => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend" + = link_to "Invite a friend!", "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend" %br = "You have #{@invites} invites." .yo{ :style => "display:none;"} diff --git a/public/javascripts/view.js b/public/javascripts/view.js index eec063bcd..f79cace4d 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -27,8 +27,8 @@ $(document).ready(function(){ //buttons////// $("#add_aspect_button").fancybox({ 'titleShow' : false }); - $("#add_request_button").fancybox({ 'titleShow': false }); - $("#invite_user_button").fancybox({ 'titleShow': false }); + $(".add_request_button").fancybox({ 'titleShow': false }); + $(".invite_user_button").fancybox({ 'titleShow': false }); $(".add_request_button").fancybox({ 'titleShow': false }); $("input[type='submit']").addClass("button"); diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 7bb190bb6..2cf862f1a 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -752,20 +752,22 @@ ul#settings_nav { padding: 3px; border-bottom: 1px solid #cccccc; } #left_pane ul li a:hover:after { - content: " ►"; } + content: " ►"; } -#empty_message { +.empty_message { margin-top: 12px; + margin-bottom: 12px; text-align: center; color: #777777; margin-left: 70px; - padding: 1em; - padding-top: 0; - width: 80%; + padding: 2em; + padding-bottom: 0.7em; + width: 520px; border: 2px dashed #777777; border-radius: 5px; } - #empty_message h3 { + .empty_message h3 { color: #777777; } - #empty_message .null_arrow { + .empty_message .null_arrow { + margin-top: -14px; font-size: 80px; display: inline-block; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index dfc6662c6..f1b8bee94 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -979,11 +979,12 @@ ul#settings_nav &:hover &:after - :content " ►" + :content " ►" -#empty_message +.empty_message :margin :top 12px + :bottom 12px :text :align center @@ -993,13 +994,17 @@ ul#settings_nav :margin :left 70px - :padding 1em - :top 0 - :width 80% + :padding 2em + :bottom 0.7em + + :width 520px + :border 2px dashed #777 :border-radius 5px .null_arrow + :margin + :top -14px :font :size 80px :display inline-block From 08e629668dfdf6474b042f7a76a65027047347c4 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 14 Oct 2010 16:55:00 -0700 Subject: [PATCH 25/28] I18ning empty_messages --- app/views/aspects/_empty_messages.haml | 14 ++++++++------ config/locales/diaspora/en.yml | 7 +++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/views/aspects/_empty_messages.haml b/app/views/aspects/_empty_messages.haml index 28b97fab1..734ee5b12 100644 --- a/app/views/aspects/_empty_messages.haml +++ b/app/views/aspects/_empty_messages.haml @@ -4,15 +4,17 @@ #no_posts.empty_message{:style => ("display:none" unless @posts.count == 0)} .null_arrow ⇧ - %h3 Nobody has said anything yet. Get the conversation started! + %h3=t('.start_talking') #no_friends.empty_message{:style => ("display:none" unless @friends.count == 0)} - %h3 You have no friends in this aspect. - - unless (@aspect == :all) || (@aspect == :public) - %h4= link_to "Add a friend", "#add_request_pane", :class => "add_request_button" + - if (@aspect == :all) || (@aspect == :public) + %h3=t('.nobody') + %h4= link_to t('.add_friend'), aspects_manage_path + %h4= link_to t('.invite'), aspects_manage_path - else - %h4= link_to "Add a friend", aspects_manage_path + %h3=t('.nobody_in_aspect', :aspect_name => @aspect.name) + %h4= link_to t('.add_friend_to', :aspect_name => @aspect.name), "#add_request_pane", :class => "add_request_button" + %h4= link_to t('.invite', :aspect_name => @aspect.name), "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => t('.invite') - %h4= link_to "Invite a friend to join Diaspora!", "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend" diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 221c4e034..f80a24733 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -70,6 +70,13 @@ en: friends_albums: "Friends Albums" your_albums: "Your Albums" aspects: + empty_messages: + start_talking: "Nobody has said anything yet. Get the conversation started!" + nobody: "We know you have friends, bring them to Diaspora!" + nobody_in_aspect: "Your aspect '%{aspect_name}' is empty." + add_friend: "Add a friend" + add_friend_to: "Add a someone to %{aspect_name}" + invite: "Invite a someone to join Diaspora!" manage: add_a_new_aspect: "Add a new aspect" add_a_new_friend: "Add a new friend" From 9e90463455de5084b46a090b4a3e0e1ae6b4d01b Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 14 Oct 2010 17:29:26 -0700 Subject: [PATCH 26/28] Fix bug if app_config[url] has no trailing slash. Thanks to binarycleric. --- app/controllers/users_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 0956c28cc..0a2c2b0ad 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -80,7 +80,8 @@ class UsersController < ApplicationController private def prep_image_url(params) - url = APP_CONFIG[:pod_url].chop if APP_CONFIG[:pod_url][-1,1] == '/' + url = APP_CONFIG[:pod_url].dup + url.chop! if APP_CONFIG[:pod_url][-1,1] == '/' if params[:profile][:image_url].empty? params[:profile].delete(:image_url) else From 4a7c4e0848ead659076f4aad7794a9def380f51d Mon Sep 17 00:00:00 2001 From: ilya Date: Thu, 14 Oct 2010 18:12:18 -0700 Subject: [PATCH 27/28] requests are made on invite but perhaps they should be made on signup so that we have a person --- app/models/request.rb | 1 - app/models/user.rb | 21 ++++++++++- app/views/invitations/_new.haml | 1 + spec/models/user/invite_spec.rb | 63 ++++++++++++++++++++++----------- 4 files changed, 63 insertions(+), 23 deletions(-) diff --git a/app/models/request.rb b/app/models/request.rb index d910cfaa2..a6efdc987 100644 --- a/app/models/request.rb +++ b/app/models/request.rb @@ -27,7 +27,6 @@ class Request before_validation :clean_link 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] diff --git a/app/models/user.rb b/app/models/user.rb index 795d610cb..ec7107fc3 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -268,8 +268,24 @@ class User ###Invitations############ def invite_user( opts = {} ) if self.invites > 0 - invited_user = User.invite!(:email => opts[:email], :inviter => self) + + aspect_id = opts.delete(:aspect_id) + if aspect_id == nil + raise "Must invite into aspect" + elsif !(self.aspects.find_by_id(aspect_id)) + raise "Must invite to your aspect" + end + request = Request.instantiate( + :to => "http://local_request.example.com", + :from => self.person, + :into => aspect_id + ) + + invited_user = User.invite!(:email => opts[:email], :request => request, :inviter => self) + self.invites = self.invites - 1 + self.pending_requests << request + request.save self.save! invited_user else @@ -279,11 +295,14 @@ class User def self.invite!(attributes={}) inviter = attributes.delete(:inviter) + request = attributes.delete(:request) + invitable = find_or_initialize_with_error_by(:email, attributes.delete(:email)) invitable.attributes = attributes if invitable.inviters.include?(inviter) raise "You already invited this person" else + invitable.pending_requests << request invitable.inviters << inviter end diff --git a/app/views/invitations/_new.haml b/app/views/invitations/_new.haml index 208e77640..f53882567 100644 --- a/app/views/invitations/_new.haml +++ b/app/views/invitations/_new.haml @@ -4,5 +4,6 @@ %p = f.label :email = f.text_field :email + = f.hidden_field :aspect_id, :value => @aspect.id %p= f.submit "Send an invitation" /= link_to "Home", after_sign_in_path_for(resource_name) diff --git a/spec/models/user/invite_spec.rb b/spec/models/user/invite_spec.rb index 180b2d874..7190c9b23 100644 --- a/spec/models/user/invite_spec.rb +++ b/spec/models/user/invite_spec.rb @@ -6,58 +6,79 @@ require 'spec_helper' describe User do let(:inviter) {Factory.create :user} + let(:aspect) {inviter.aspect(:name => "awesome")} + let(:another_user) {Factory.create :user} + let(:wrong_aspect) {another_user.aspect(:name => "super")} let(:inviter_with_3_invites) {Factory.create :user, :invites => 3} - let!(:invited_user) { create_user_with_invitation("abc", :email => "email@example.com", :inviter => inviter)} - let(:invited_user1) { create_user_with_invitation("abc", :email => "email@example.com", :inviter => inviter_with_3_invites)} - let(:invited_user2) { create_user_with_invitation("abc", :email => "email@example.com", :inviter => inviter_with_3_invites)} - let(:invited_user3) { create_user_with_invitation("abc", :email => "email@example.com", :inviter => inviter_with_3_invites)} + let(:aspect2) {inviter_with_3_invites.aspect(:name => "Jersey Girls")} + let!(:invited_user1) { create_user_with_invitation("abc", :email => "email@example.com", :inviter => inviter)} + + before do + deliverable = Object.new + deliverable.stub!(:deliver) + ::Devise.mailer.stub!(:invitation).and_return(deliverable) + end context "creating invites" do - before do - deliverable = Object.new - deliverable.stub!(:deliver) - ::Devise.mailer.stub!(:invitation).and_return(deliverable) + + it 'requires an apect' do + proc{inviter.invite_user(:email => "maggie@example.com")}.should raise_error /Must invite into aspect/ + end + + it 'requires your aspect' do + proc{inviter.invite_user(:email => "maggie@example.com", :aspect_id => wrong_aspect.id)}.should raise_error /Must invite to your aspect/ end it 'creates a user' do + inviter lambda { - inviter.invite_user(:email => "joe@example.com") + inviter.invite_user(:email => "joe@example.com", :aspect_id => aspect.id ) }.should change(User, :count).by(1) end it 'sends email to the invited user' do ::Devise.mailer.should_receive(:invitation).once - inviter.invite_user(:email => "ian@example.com") + inviter.invite_user(:email => "ian@example.com", :aspect_id => aspect.id) end it 'adds the inviter to the invited_user' do - invited_user = inviter.invite_user(:email => "marcy@example.com") + invited_user = inviter.invite_user(:email => "marcy@example.com", :aspect_id => aspect.id) invited_user.reload invited_user.inviters.include?(inviter).should be_true end + + + it 'adds a pending request to the invited user' do + invited_user = inviter.invite_user(:email => "marcy@example.com", :aspect_id => aspect.id) + invited_user.reload + invited_user.pending_requests.find_by_callback_url(inviter.receive_url).nil?.should == false + end + + it 'adds a pending request to the inviter' do + inviter.invite_user(:email => "marcy@example.com", :aspect_id => aspect.id) + inviter.reload + inviter.pending_requests.find_by_callback_url(inviter.receive_url).nil?.should == false + end end context "limit on invites" do it 'does not invite users after 3 invites' do - User.stub!(:invite!).and_return(invited_user1,invited_user2,invited_user3) - inviter_with_3_invites.invite_user(:email => "email1@example.com") - inviter_with_3_invites.invite_user(:email => "email2@example.com") - inviter_with_3_invites.invite_user(:email => "email3@example.com") - proc{inviter_with_3_invites.invite_user(:email => "email4@example.com")}.should raise_error /You have no invites/ + inviter_with_3_invites.invite_user(:email => "email1@example.com", :aspect_id => aspect2.id) + inviter_with_3_invites.invite_user(:email => "email2@example.com", :aspect_id => aspect2.id) + inviter_with_3_invites.invite_user(:email => "email3@example.com", :aspect_id => aspect2.id) + proc{inviter_with_3_invites.invite_user(:email => "email4@example.com", :aspect_id => aspect2.id)}.should raise_error /You have no invites/ end it 'does not invite people I already invited' do - pending "this is really weird to test without the actual method working" - User.stub!(:invite!).and_return(invited_user1,invited_user1) - inviter_with_3_invites.invite_user(:email => "email1@example.com") - proc{inviter_with_3_invites.invite_user(:email => "email1@example.com")}.should raise_error /You already invited that person/ + inviter_with_3_invites.invite_user(:email => "email1@example.com", :aspect_id => aspect2.id) + proc{inviter_with_3_invites.invite_user(:email => "email1@example.com", :aspect_id => aspect2.id)}.should raise_error /You already invited this person/ end end context "the acceptance of an invitation" do it "should create the person with the passed in params" do person_count = Person.count - u = invited_user.accept_invitation!(:invitation_token => "abc", + u = invited_user1.accept_invitation!(:invitation_token => "abc", :username => "user", :password => "secret", :password_confirmation => "secret", From 5e8d34621a10363787a5d382c7669210ef7b5d15 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Thu, 14 Oct 2010 20:51:54 -0700 Subject: [PATCH 28/28] ohai rails 3.0.1 --- Gemfile | 2 +- Gemfile.lock | 66 +++++++++++++++++++++++++++++----------------------- 2 files changed, 38 insertions(+), 30 deletions(-) diff --git a/Gemfile b/Gemfile index b7a54ebf9..aefce4437 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'http://rubygems.org' -gem 'rails', '3.0.0' +gem 'rails', '>= 3.0.0' gem 'bundler', '>= 1.0.0' #Security diff --git a/Gemfile.lock b/Gemfile.lock index 41e008130..14e3f10ef 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,9 +15,9 @@ GIT GIT remote: git://github.com/dcu/magent.git - revision: fe08cc6e9d4c1772035f84bcfb665d17b00ac625 + revision: 59b8563961b830f491cd6f6592cced67791ce0ef specs: - magent (1.0.0) + magent (0.5.0) em-websocket mongo uuidtools @@ -70,12 +70,12 @@ GEM remote: http://rubygems.org/ specs: abstract (1.0.0) - actionmailer (3.0.0) - actionpack (= 3.0.0) + actionmailer (3.0.1) + actionpack (= 3.0.1) mail (~> 2.2.5) - actionpack (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) + actionpack (3.0.1) + activemodel (= 3.0.1) + activesupport (= 3.0.1) builder (~> 2.1.2) erubis (~> 2.6.6) i18n (~> 0.4.1) @@ -83,19 +83,19 @@ GEM rack-mount (~> 0.6.12) rack-test (~> 0.5.4) tzinfo (~> 0.3.23) - activemodel (3.0.0) - activesupport (= 3.0.0) + activemodel (3.0.1) + activesupport (= 3.0.1) builder (~> 2.1.2) i18n (~> 0.4.1) - activerecord (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) + activerecord (3.0.1) + activemodel (= 3.0.1) + activesupport (= 3.0.1) arel (~> 1.0.0) tzinfo (~> 0.3.23) - activeresource (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) - activesupport (3.0.0) + activeresource (3.0.1) + activemodel (= 3.0.1) + activesupport (= 3.0.1) + activesupport (3.0.1) addressable (2.2.2) arel (1.0.1) activesupport (~> 3.0.0) @@ -122,6 +122,7 @@ GEM selenium-webdriver (>= 0.0.3) childprocess (0.0.7) ffi (~> 0.6.3) + columnize (0.3.1) crack (0.1.8) cucumber (0.9.2) builder (~> 2.1.2) @@ -162,6 +163,7 @@ GEM i18n (0.4.1) json (1.4.6) json_pure (1.4.6) + linecache (0.43) mail (2.2.7) activesupport (>= 2.3.6) mime-types @@ -195,17 +197,17 @@ GEM rack (>= 1.0.0) rack-test (0.5.6) rack (>= 1.0) - rails (3.0.0) - actionmailer (= 3.0.0) - actionpack (= 3.0.0) - activerecord (= 3.0.0) - activeresource (= 3.0.0) - activesupport (= 3.0.0) + rails (3.0.1) + actionmailer (= 3.0.1) + actionpack (= 3.0.1) + activerecord (= 3.0.1) + activeresource (= 3.0.1) + activesupport (= 3.0.1) bundler (~> 1.0.0) - railties (= 3.0.0) - railties (3.0.0) - actionpack (= 3.0.0) - activesupport (= 3.0.0) + railties (= 3.0.1) + railties (3.0.1) + actionpack (= 3.0.1) + activesupport (= 3.0.1) rake (>= 0.8.4) thor (~> 0.14.0) rake (0.8.7) @@ -223,6 +225,11 @@ GEM rspec-expectations (= 2.0.0) rspec-rails (2.0.0) rspec (= 2.0.0) + ruby-debug (0.10.3) + columnize (>= 0.1) + ruby-debug-base (~> 0.10.3.0) + ruby-debug-base (0.10.3) + linecache (>= 0.3) rubyzip (0.9.4) selenium-webdriver (0.0.29) childprocess (>= 0.0.7) @@ -242,8 +249,8 @@ GEM uuidtools (2.1.1) warden (0.10.7) rack (>= 1.0.0) - webmock (1.3.5) - addressable (>= 2.1.1) + webmock (1.4.0) + addressable (>= 2.2.2) crack (>= 0.1.7) will_paginate (3.0.pre2) xml-simple (1.0.12) @@ -275,11 +282,12 @@ DEPENDENCIES mocha mongo_mapper! pubsubhubbub - rails (= 3.0.0) + rails (>= 3.0.0) redfinger! roxml! rspec (>= 2.0.0) rspec-rails (>= 2.0.0) + ruby-debug sprinkle! thin webmock