diff --git a/Gemfile.lock b/Gemfile.lock index 44d386e33a3c076048a74a12a74c2ca74eb21629..5ae63f097b817728c2be20677cf131f2b74956ce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -116,7 +116,6 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) selenium-webdriver (>= 0.0.3) - columnize (0.3.1) crack (0.1.8) cucumber (0.9.0) builder (~> 2.1.2) @@ -152,7 +151,6 @@ GEM i18n (0.4.1) json (1.4.6) json_pure (1.4.6) - linecache (0.43) mail (2.2.6.1) activesupport (>= 2.3.6) mime-types @@ -201,7 +199,6 @@ GEM rake (>= 0.8.4) thor (~> 0.14.0) rake (0.8.7) - redgreen (1.2.2) rest-client (1.6.1) mime-types (>= 1.16) rspec (2.0.0.beta.22) @@ -217,11 +214,6 @@ GEM rspec-rails (2.0.0.beta.17) rspec (>= 2.0.0.beta.14) webrat (>= 0.7.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.28) ffi (>= 0.6.1) @@ -278,11 +270,9 @@ DEPENDENCIES pubsubhubbub rails (= 3.0.0) redfinger! - redgreen roxml! rspec (>= 2.0.0.beta.17) rspec-rails (= 2.0.0.beta.17) - ruby-debug sprinkle! thin webmock diff --git a/app/views/users/_profile.haml b/app/views/users/_profile.haml index 2b26eead0f0f7e841ee10fc24b5483c037e331af..774f3a094d9a75496898efc9f0f779d8269ea97b 100644 --- a/app/views/users/_profile.haml +++ b/app/views/users/_profile.haml @@ -50,7 +50,7 @@ #submit_block = link_to t('.cancel'), root_path - or + = t('.or') = f.submit t('.update_profile') #content_bottom diff --git a/app/views/users/_services.haml b/app/views/users/_services.haml index f2d976a79a2b44584ce6fd8c74ff87f4e2d11a29..fd1894d117d622a3f05dc16f167f222c2feb667a 100644 --- a/app/views/users/_services.haml +++ b/app/views/users/_services.haml @@ -5,19 +5,20 @@ %h2 Services -%h3 Facebook -%p - - if @logged_in - = connected_fb_as(@access_token) - - %p - - @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends") - - @fb_friends[:data].each do |friend| - = image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" ) +- if FACEBOOK + %h3 Facebook + %p + - if @logged_in + = connected_fb_as(@access_token) + + %p + - @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends") + - @fb_friends[:data].each do |friend| + = image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" ) - = link_to "Disconnect from Facebook", services_destroy_path - - else - = link_to "Connect to Facebook (DO NOT USE WITH A REAL ACCOUNT)", @fb_access_url + = link_to "Disconnect from Facebook", services_destroy_path + - else + = link_to "Connect to Facebook (DO NOT USE WITH A REAL ACCOUNT)", @fb_access_url #content_bottom .back diff --git a/config/environment.rb b/config/environment.rb index 6b960209fb198744dd7b32970b6732ffd91a4095..7fff237bdb799023378b213729d5c5fe4dcc07d1 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -7,13 +7,15 @@ require File.expand_path('../application', __FILE__) Haml::Template.options[:format] = :html5 Haml::Template.options[:escape_html] = true -# Load facebook connection application credentials -fb_config = YAML::load(File.open(File.expand_path("./config/fb_config.yml"))) -FB_API_KEY = fb_config['fb_api_key'] -FB_SECRET = fb_config['fb_secret'] -FB_APP_ID = fb_config['fb_app_id'] -HOST = fb_config['host'] - +if File.exists?(File.expand_path("./config/fb_config.yml")) + # Load facebook connection application credentials + fb_config = YAML::load(File.open(File.expand_path("./config/fb_config.yml"))) + FB_API_KEY = fb_config['fb_api_key'] + FB_SECRET = fb_config['fb_secret'] + FB_APP_ID = fb_config['fb_app_id'] + HOST = fb_config['host'] + FACEBOOK = true +end # Initialize the rails application Diaspora::Application.initialize! diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 8383396410d12aa2969239cb31eea482a96dd2c2..5595c4caa94c5db2e18b33fb5a03b1964a0cab83 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -113,6 +113,7 @@ en: albums: "Albums" you_dont_have_any_photos: "You don't have any photos! Go to the" page_to_upload_some: "page to upload some." + or: "or" comments: comment: ago: "ago" diff --git a/config/locales/diaspora/ru.yml b/config/locales/diaspora/ru.yml index daeb35915c01d1f10c4d2d2131b56bdc9790e7d0..f432c82d6bd37fa55477851145243ff3f36598ae 100644 --- a/config/locales/diaspora/ru.yml +++ b/config/locales/diaspora/ru.yml @@ -66,7 +66,10 @@ ru: add_a_new_aspect: "Добавить аÑпект" create: "Создать" create: - success:"Ðажмите на Ð¿Ð»ÑŽÑ Ñлева, Ð´Ð»Ñ Ñ‚Ð¾Ð³Ð¾, что-бы указать Diaspora тех, кто может видеть ваш новый аÑпект." + success:"Ðажмите на Ð¿Ð»ÑŽÑ Ñлева, Ð´Ð»Ñ Ñ‚Ð¾Ð³Ð¾, что-бы указать Diaspora тех, кто может видеть ваш новый аÑпект + helper: + remove: "Удалить" + aspect_not_empty: "ÐÑпект не пуÑÑ‚" users: edit: editing_profile: "Редактирование профилÑ" @@ -79,8 +82,9 @@ ru: picture: "Ðватар" editing_profile: "Редактирование профилÑ" albums: "Ðльбомы" - you_dont_have_any_photos: "У Ð²Ð°Ñ Ð½ÐµÑ‚ ни одной фотографии! Перейдите на " - page_to_upload_some: "Ñтраницу Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸." + you_dont_have_any_photos: "У Ð²Ð°Ñ Ð½ÐµÑ‚ ни одной фотографии! Перейдите в" + page_to_upload_some: "Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸." + or: "или" comments: comment: ago: "ранее" @@ -142,3 +146,18 @@ ru: save: "Ñохранить" are_you_sure: "Ð’Ñ‹ уверены?" remove_friend: "удалить друга" + requests: + new_request: + add_a_new_friend_to: "добавить нового друга к" + enter_a_diaspora_username: "Введите Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Diaspora:" + your_diaspora_username_is: "Ваше Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Diaspora: %{diaspora_handle}" + friends_username: "Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð´Ñ€ÑƒÐ³Ð°" + destroy: + success: "Теперь вы друзьÑ." + error: "Выберите аÑпект!" + ignore: "Игнорированные запроÑÑ‹ дружбы." + create: + error: "Ð”Ð»Ñ Ñтого адреÑа не найдено ÑÐµÐ¼Ñ Diaspora!" + already_friends: "Ð’Ñ‹ уже Ð´Ñ€ÑƒÐ·ÑŒÑ Ñ %{destination_url}!" + success: "Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð½Ð° дружбу выÑлан к %{destination_url}." + horribly_wrong: "Что-то пошло ÑовÑем не так."