From c6f5b4ed161e5b6feb9acdc907dc287fc807f0cb Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Thu, 16 Sep 2010 14:41:33 +0900 Subject: [PATCH 01/24] Basic 1.9.2 port --- Gemfile | 1 - app/models/profile.rb | 2 +- app/models/user.rb | 10 +++++----- config/application.rb | 2 +- config/environment.rb | 2 +- config/environments/development.rb | 2 +- config/initializers/socket.rb | 2 +- script/rails | 2 +- 8 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 77627808d..193cc0eb7 100644 --- a/Gemfile +++ b/Gemfile @@ -54,7 +54,6 @@ end group :development do gem 'nifty-generators' - gem 'ruby-debug' end group :deployment do diff --git a/app/models/profile.rb b/app/models/profile.rb index f03843226..23744711d 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -5,7 +5,7 @@ class Profile include MongoMapper::EmbeddedDocument - require 'lib/diaspora/webhooks' + require_relative '../../lib/diaspora/webhooks' include Diaspora::Webhooks include ROXML diff --git a/app/models/user.rb b/app/models/user.rb index d09f55ea2..d35dfb3df 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -3,9 +3,9 @@ # the COPYRIGHT file. -require 'lib/diaspora/user/friending.rb' -require 'lib/diaspora/user/querying.rb' -require 'lib/salmon/salmon' +require_relative '../../lib/diaspora/user/friending.rb' +require_relative '../../lib/diaspora/user/querying.rb' +require_relative '../../lib/salmon/salmon' class User include MongoMapper::Document @@ -295,11 +295,11 @@ class User aspect(:name => "Family") aspect(:name => "Work") end - + def self.create(opts ={}) puts opts.inspect end - + def terse_url terse = self.url.gsub(/(https?:|www\.)\/\//, '') terse = terse.chop! if terse[-1, 1] == '/' diff --git a/config/application.rb b/config/application.rb index ef8a567a5..441afd82d 100644 --- a/config/application.rb +++ b/config/application.rb @@ -13,7 +13,7 @@ require "active_resource/railtie" # you've limited to :test, :development, or :production. Bundler.require(:default, Rails.env) if defined?(Bundler) -require 'lib/mongo_mapper/bson_id' +require_relative '../lib/mongo_mapper/bson_id' module Diaspora class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. diff --git a/config/environment.rb b/config/environment.rb index dc11087dd..2548cdb9b 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -5,7 +5,7 @@ # Load the rails application -require File.expand_path('../application', __FILE__) +require_relative 'application' Haml::Template.options[:format] = :html5 # Initialize the rails application Diaspora::Application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index 66a0ef31a..e3987d6df 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -3,7 +3,7 @@ # the COPYRIGHT file. -require 'lib/mongo_mapper/clear_dev_memory' +require_relative '../../lib/mongo_mapper/clear_dev_memory' Diaspora::Application.configure do # Settings specified here will take precedence over those in config/environment.rb diff --git a/config/initializers/socket.rb b/config/initializers/socket.rb index 1fd09fd93..f4b6d2e4a 100644 --- a/config/initializers/socket.rb +++ b/config/initializers/socket.rb @@ -5,7 +5,7 @@ require 'em-websocket' require 'eventmachine' -require "lib/diaspora/websocket" +require_relative "../../lib/diaspora/websocket" EM.next_tick { Diaspora::WebSocket.initialize_channels diff --git a/script/rails b/script/rails index f138a34a4..f8da2cffd 100755 --- a/script/rails +++ b/script/rails @@ -1,4 +1,4 @@ -#!/usr/bin/env ruby1.8 +#!/usr/bin/env ruby # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. APP_PATH = File.expand_path('../../config/application', __FILE__) From ba058a39a8c857f9a7496cfc6fd6f17865e40e02 Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Thu, 16 Sep 2010 14:50:30 +0900 Subject: [PATCH 02/24] Replace require_relative with compatible version --- Gemfile.lock | 8 -------- app/models/profile.rb | 2 +- app/models/user.rb | 6 +++--- config/application.rb | 2 +- config/environment.rb | 2 +- config/environments/development.rb | 2 +- config/initializers/socket.rb | 2 +- 7 files changed, 8 insertions(+), 16 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 007810850..4002245ca 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -107,7 +107,6 @@ GEM net-sftp (>= 2.0.0) net-ssh (>= 2.0.14) net-ssh-gateway (>= 1.0.0) - columnize (0.3.1) crack (0.1.8) daemons (1.1.0) database_cleaner (0.5.2) @@ -127,7 +126,6 @@ GEM highline (1.6.1) i18n (0.4.1) json (1.4.6) - linecache (0.43) lsof (0.3.0) mail (2.2.6.1) activesupport (>= 2.3.6) @@ -190,11 +188,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) saucelabs-adapter (0.8.12) lsof (>= 0.3.0) net-ssh (>= 2.0.12) @@ -253,7 +246,6 @@ DEPENDENCIES roxml! rspec (>= 2.0.0.beta.17) rspec-rails (= 2.0.0.beta.17) - ruby-debug saucelabs-adapter (= 0.8.12) selenium-rc sprinkle! diff --git a/app/models/profile.rb b/app/models/profile.rb index 23744711d..2bb54028a 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -5,7 +5,7 @@ class Profile include MongoMapper::EmbeddedDocument - require_relative '../../lib/diaspora/webhooks' + require File.expand_path('../../../lib/diaspora/webhooks', __FILE__) include Diaspora::Webhooks include ROXML diff --git a/app/models/user.rb b/app/models/user.rb index d35dfb3df..8e7fb1373 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -3,9 +3,9 @@ # the COPYRIGHT file. -require_relative '../../lib/diaspora/user/friending.rb' -require_relative '../../lib/diaspora/user/querying.rb' -require_relative '../../lib/salmon/salmon' +require File.expand_path('../../../lib/diaspora/user/friending', __FILE__) +require File.expand_path('../../../lib/diaspora/user/querying', __FILE__) +require File.expand_path('../../../lib/salmon/salmon', __FILE__) class User include MongoMapper::Document diff --git a/config/application.rb b/config/application.rb index 441afd82d..7cfa694b2 100644 --- a/config/application.rb +++ b/config/application.rb @@ -13,7 +13,7 @@ require "active_resource/railtie" # you've limited to :test, :development, or :production. Bundler.require(:default, Rails.env) if defined?(Bundler) -require_relative '../lib/mongo_mapper/bson_id' +require File.expand_path('../../lib/mongo_mapper/bson_id', __FILE__) module Diaspora class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. diff --git a/config/environment.rb b/config/environment.rb index 2548cdb9b..dc11087dd 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -5,7 +5,7 @@ # Load the rails application -require_relative 'application' +require File.expand_path('../application', __FILE__) Haml::Template.options[:format] = :html5 # Initialize the rails application Diaspora::Application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index e3987d6df..713cba8c8 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -3,7 +3,7 @@ # the COPYRIGHT file. -require_relative '../../lib/mongo_mapper/clear_dev_memory' +require File.expand_path('../../../lib/mongo_mapper/clear_dev_memory', __FILE__) Diaspora::Application.configure do # Settings specified here will take precedence over those in config/environment.rb diff --git a/config/initializers/socket.rb b/config/initializers/socket.rb index f4b6d2e4a..bbeee1443 100644 --- a/config/initializers/socket.rb +++ b/config/initializers/socket.rb @@ -5,7 +5,7 @@ require 'em-websocket' require 'eventmachine' -require_relative "../../lib/diaspora/websocket" +require File.expand_path("../../../lib/diaspora/websocket", __FILE__) EM.next_tick { Diaspora::WebSocket.initialize_channels From 35c9922c612c03191b7906c5a06610faea88c3f9 Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Thu, 16 Sep 2010 15:24:26 +0900 Subject: [PATCH 03/24] And fix some more requires --- app/controllers/publics_controller.rb | 2 +- app/models/person.rb | 2 +- app/models/post.rb | 2 +- app/models/request.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/publics_controller.rb b/app/controllers/publics_controller.rb index 07cf63dc8..cd3812fe7 100644 --- a/app/controllers/publics_controller.rb +++ b/app/controllers/publics_controller.rb @@ -4,7 +4,7 @@ class PublicsController < ApplicationController - require 'lib/diaspora/parser' + require File.expand_path('../../../lib/diaspora/parser', __FILE__) include Diaspora::Parser layout false diff --git a/app/models/person.rb b/app/models/person.rb index 121fdde56..daf182832 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -3,7 +3,7 @@ # the COPYRIGHT file. -require 'lib/hcard' +require File.expand_path('../../../lib/hcard', __FILE__) class Person include MongoMapper::Document diff --git a/app/models/post.rb b/app/models/post.rb index e2dd53d3d..7e20354af 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -4,7 +4,7 @@ class Post - require 'lib/encryptable' + require File.expand_path('../../../lib/encryptable', __FILE__) include MongoMapper::Document include ApplicationHelper include ROXML diff --git a/app/models/request.rb b/app/models/request.rb index da62edd93..7082515cf 100644 --- a/app/models/request.rb +++ b/app/models/request.rb @@ -4,7 +4,7 @@ class Request - require 'lib/diaspora/webhooks' + require File.expand_path('../../../lib/diaspora/webhooks', __FILE__) include MongoMapper::Document include Diaspora::Webhooks include ROXML From ef2e393ac8a898610b80c0fba4842bc1f7bee5fc Mon Sep 17 00:00:00 2001 From: Michael Nutt Date: Thu, 16 Sep 2010 02:32:16 -0400 Subject: [PATCH 04/24] Add bin directory to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 89b33da60..bf8a0e240 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ gpg/diaspora-production/*.gpg gpg/*/random_seed public/uploads/* .rvmrc +/bin From 46a83324ab63b67fa3f85fcefa705aef9ab1b77b Mon Sep 17 00:00:00 2001 From: Michael Nutt Date: Thu, 16 Sep 2010 02:34:11 -0400 Subject: [PATCH 05/24] Warn if can't attach to websocket port --- config/initializers/socket.rb | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/config/initializers/socket.rb b/config/initializers/socket.rb index 1fd09fd93..a806e2553 100644 --- a/config/initializers/socket.rb +++ b/config/initializers/socket.rb @@ -9,18 +9,26 @@ require "lib/diaspora/websocket" EM.next_tick { Diaspora::WebSocket.initialize_channels - EventMachine::WebSocket.start( - :host => "0.0.0.0", - :port => APP_CONFIG[:socket_port], - :debug =>APP_CONFIG[:socket_debug]) do |ws| - ws.onopen { + begin + EventMachine::WebSocket.start( + :host => "0.0.0.0", + :port => APP_CONFIG[:socket_port], + :debug =>APP_CONFIG[:socket_debug]) do |ws| + ws.onopen { - sid = Diaspora::WebSocket.subscribe(ws.request['Path'].gsub('/',''), ws) + sid = Diaspora::WebSocket.subscribe(ws.request['Path'].gsub('/',''), ws) - ws.onmessage { |msg| SocketsController.new.incoming(msg) } + ws.onmessage { |msg| SocketsController.new.incoming(msg) } - ws.onclose { Diaspora::WebSocket.unsubscribe(ws.request['Path'].gsub('/',''), sid) } - } + ws.onclose { Diaspora::WebSocket.unsubscribe(ws.request['Path'].gsub('/',''), sid) } + } + end + rescue RuntimeError => e + if e.message =~ /no acceptor/ + raise RuntimeError, "Could not listen on port #{APP_CONFIG[:socket_port]}, perhaps another process is already using it?" + else + raise + end end } From aa6b2425638ccbf2884df53f2674b69833d73d0a Mon Sep 17 00:00:00 2001 From: Michael Nutt Date: Thu, 16 Sep 2010 03:07:39 -0400 Subject: [PATCH 06/24] websocket js should honor app socket port configuration --- app/views/js/_websocket_js.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/js/_websocket_js.haml b/app/views/js/_websocket_js.haml index 483621625..33af68cce 100644 --- a/app/views/js/_websocket_js.haml +++ b/app/views/js/_websocket_js.haml @@ -9,7 +9,7 @@ $(document).ready(function(){ function debug(str){ $("#debug").append("

" + str); }; - ws = new WebSocket("ws://#{request.host}:8080/#{CGI::escape(current_user.id.to_s)}"); + ws = new WebSocket("ws://#{request.host}:#{APP_CONFIG[:socket_port]}/#{CGI::escape(current_user.id.to_s)}"); //Attach onmessage to websocket ws.onmessage = function(evt) { From 45b6ff53f176f46f8d768773cbe93fc2f6c93dca Mon Sep 17 00:00:00 2001 From: Aria Stewart Date: Sat, 18 Sep 2010 16:35:48 -0600 Subject: [PATCH 07/24] Ruby 1.9 fixes --- app/controllers/photos_controller.rb | 4 ++-- app/models/photo.rb | 2 +- config.ru | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index cefc8f5d6..4065ff34c 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -21,9 +21,9 @@ class PhotosController < ApplicationController # get file content type att_content_type = (request.content_type.to_s == "") ? "application/octet-stream" : request.content_type.to_s # create temporal file - file = Tempfile.new(file_name) + file = Tempfile.new(file_name, {encoding: 'BINARY'}) # put data into this file from raw post request - file.print request.raw_post + file.print request.raw_post.force_encoding('BINARY') # create several required methods for this temporal file Tempfile.send(:define_method, "content_type") {return att_content_type} diff --git a/app/models/photo.rb b/app/models/photo.rb index 8792911f3..92b02d36d 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -22,7 +22,7 @@ class Photo < Post timestamps! validates_presence_of :album - validates_true_for :album_id, :logic => lambda {self.validate_album_person} + validates_true_for(:album_id, :logic => Proc.new { self.validate_album_person }) before_destroy :ensure_user_picture diff --git a/config.ru b/config.ru index cb12bcfa2..ed9da1085 100644 --- a/config.ru +++ b/config.ru @@ -6,6 +6,7 @@ # This file is used by Rack-based servers to start the application. +$LOAD_PATH << '.' require ::File.expand_path('../config/environment', __FILE__) #use Rack::FiberPool #require 'lib/chrome_frame' From 82bc5b097deef50c05e12f26484753713d8553fb Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 23 Sep 2010 14:43:38 -0700 Subject: [PATCH 08/24] Use double quotes in locale files --- config/locales/devise/devise.en.yml | 42 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/config/locales/devise/devise.en.yml b/config/locales/devise/devise.en.yml index 09d3ac62c..8876bc5bf 100644 --- a/config/locales/devise/devise.en.yml +++ b/config/locales/devise/devise.en.yml @@ -12,30 +12,30 @@ en: devise: failure: - unauthenticated: 'You need to sign in or sign up before continuing.' - unconfirmed: 'You have to confirm your account before continuing.' - locked: 'Your account is locked.' - invalid: 'Invalid email or password.' - invalid_token: 'Invalid authentication token.' - timeout: 'Your session expired, please sign in again to continue.' - inactive: 'Your account was not activated yet.' + unauthenticated: "You need to sign in or sign up before continuing." + unconfirmed: "You have to confirm your account before continuing." + locked: "Your account is locked." + invalid: "Invalid email or password." + invalid_token: "Invalid authentication token." + timeout: "Your session expired, please sign in again to continue." + inactive: "Your account was not activated yet." sessions: - signed_in: 'Signed in successfully.' - signed_out: 'Signed out successfully.' + signed_in: "Signed in successfully." + signed_out: "Signed out successfully." passwords: - send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.' - updated: 'Your password was changed successfully. You are now signed in.' + send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes." + updated: "Your password was changed successfully. You are now signed in." confirmations: - send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.' - confirmed: 'Your account was successfully confirmed. You are now signed in.' + send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes." + confirmed: "Your account was successfully confirmed. You are now signed in." registrations: - signed_up: 'You have signed up successfully. If enabled, a confirmation was sent to your e-mail.' - updated: 'You updated your account successfully.' - destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.' + signed_up: "You have signed up successfully. If enabled, a confirmation was sent to your e-mail." + updated: "You updated your account successfully." + destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon." unlocks: - send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.' - unlocked: 'Your account was successfully unlocked. You are now signed in.' + send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes." + unlocked: "Your account was successfully unlocked. You are now signed in." mailer: - confirmation_instructions: 'Confirmation instructions' - reset_password_instructions: 'Reset password instructions' - unlock_instructions: 'Unlock Instructions' + confirmation_instructions: "Confirmation instructions" + reset_password_instructions: "Reset password instructions" + unlock_instructions: "Unlock Instructions" From 972cb54828386980f81d252f5f9a65a57557c81d Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 23 Sep 2010 14:52:06 -0700 Subject: [PATCH 09/24] Move locale files, fix syntax error in fr-informal --- Gemfile.lock | 6 - config/locales/{ => defaults}/cs.yml | 0 config/locales/{ => defaults}/cy.yml | 0 config/locales/{ => defaults}/de.yml | 0 config/locales/{ => defaults}/en.yml | 0 config/locales/defaults/es.yml | 460 ++++++++---------- config/locales/{ => defaults}/fi.yml | 0 config/locales/{ => defaults}/fr-informal.yml | 6 +- config/locales/{ => defaults}/fr.yml | 0 config/locales/{ => defaults}/it.yml | 0 config/locales/{ => defaults}/lt.yml | 0 config/locales/{ => defaults}/pl.yml | 0 config/locales/{ => defaults}/pt-BR.yml | 0 config/locales/{ => defaults}/pt-PT.yml | 0 config/locales/{ => defaults}/ro.yml | 0 config/locales/{ => defaults}/ru.yml | 0 config/locales/{ => defaults}/sv.yml | 0 config/locales/devise.de.yml | 41 -- config/locales/devise.es.yml | 42 -- config/locales/devise.fr.yml | 41 -- config/locales/devise.it.yml | 41 -- config/locales/devise.pl.yml | 41 -- config/locales/devise.ru.yml | 41 -- config/locales/{ => devise}/devise.cs.yml | 0 config/locales/{ => devise}/devise.cy.yml | 0 config/locales/devise/devise.es.yml | 4 +- config/locales/{ => devise}/devise.fi.yml | 0 .../{ => devise}/devise.fr-informal.yml | 0 config/locales/devise/devise.it.yml | 46 +- config/locales/{ => devise}/devise.lt.yml | 0 config/locales/{ => devise}/devise.pt-BR.yml | 0 config/locales/{ => devise}/devise.pt-PT.yml | 0 config/locales/{ => devise}/devise.ro.yml | 0 config/locales/{ => devise}/devise.sv.yml | 0 config/locales/es.yml | 202 -------- 35 files changed, 227 insertions(+), 744 deletions(-) rename config/locales/{ => defaults}/cs.yml (100%) rename config/locales/{ => defaults}/cy.yml (100%) rename config/locales/{ => defaults}/de.yml (100%) rename config/locales/{ => defaults}/en.yml (100%) rename config/locales/{ => defaults}/fi.yml (100%) rename config/locales/{ => defaults}/fr-informal.yml (99%) rename config/locales/{ => defaults}/fr.yml (100%) rename config/locales/{ => defaults}/it.yml (100%) rename config/locales/{ => defaults}/lt.yml (100%) rename config/locales/{ => defaults}/pl.yml (100%) rename config/locales/{ => defaults}/pt-BR.yml (100%) rename config/locales/{ => defaults}/pt-PT.yml (100%) rename config/locales/{ => defaults}/ro.yml (100%) rename config/locales/{ => defaults}/ru.yml (100%) rename config/locales/{ => defaults}/sv.yml (100%) delete mode 100644 config/locales/devise.de.yml delete mode 100644 config/locales/devise.es.yml delete mode 100644 config/locales/devise.fr.yml delete mode 100644 config/locales/devise.it.yml delete mode 100644 config/locales/devise.pl.yml delete mode 100644 config/locales/devise.ru.yml rename config/locales/{ => devise}/devise.cs.yml (100%) rename config/locales/{ => devise}/devise.cy.yml (100%) rename config/locales/{ => devise}/devise.fi.yml (100%) rename config/locales/{ => devise}/devise.fr-informal.yml (100%) rename config/locales/{ => devise}/devise.lt.yml (100%) rename config/locales/{ => devise}/devise.pt-BR.yml (100%) rename config/locales/{ => devise}/devise.pt-PT.yml (100%) rename config/locales/{ => devise}/devise.ro.yml (100%) rename config/locales/{ => devise}/devise.sv.yml (100%) delete mode 100644 config/locales/es.yml diff --git a/Gemfile.lock b/Gemfile.lock index abad54828..dd181b320 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -104,8 +104,6 @@ GEM addressable (2.2.1) arel (1.0.1) activesupport (~> 3.0.0) - async_sinatra (0.2.3) - sinatra (>= 1.0) autotest (4.3.2) bcrypt-ruby (2.1.2) bson (1.0.7) @@ -214,8 +212,6 @@ GEM selenium-client (1.2.18) selenium-rc (2.2.4) selenium-client (>= 1.2.18) - sinatra (1.0) - rack (>= 1.0) subexec (0.0.4) thin (1.2.7) daemons (>= 1.0.9) @@ -242,7 +238,6 @@ PLATFORMS DEPENDENCIES addressable - async_sinatra autotest bson (= 1.0.7) bson_ext (= 1.0.7) @@ -271,7 +266,6 @@ DEPENDENCIES ruby-debug saucelabs-adapter (= 0.8.12) selenium-rc - sinatra (= 1.0) sprinkle! thin webmock diff --git a/config/locales/cs.yml b/config/locales/defaults/cs.yml similarity index 100% rename from config/locales/cs.yml rename to config/locales/defaults/cs.yml diff --git a/config/locales/cy.yml b/config/locales/defaults/cy.yml similarity index 100% rename from config/locales/cy.yml rename to config/locales/defaults/cy.yml diff --git a/config/locales/de.yml b/config/locales/defaults/de.yml similarity index 100% rename from config/locales/de.yml rename to config/locales/defaults/de.yml diff --git a/config/locales/en.yml b/config/locales/defaults/en.yml similarity index 100% rename from config/locales/en.yml rename to config/locales/defaults/en.yml diff --git a/config/locales/defaults/es.yml b/config/locales/defaults/es.yml index ad1db8794..5af6c70aa 100644 --- a/config/locales/defaults/es.yml +++ b/config/locales/defaults/es.yml @@ -1,264 +1,202 @@ -# Spanish translations for Rails -# by Francisco Fernando García Nieto (ffgarcianieto@gmail.com) +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. -"es": - # Action View - number: - # Used in number_with_delimiter() - # These are also the defaults for 'currency', 'percentage', 'precision', and 'human' - format: - # Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5) - separator: "," - # Delimets thousands (e.g. 1,000,000 is a million) (always in groups of three) - delimiter: "." - # Number of decimals, behind the separator (1 with a precision of 2 gives: 1.00) - precision: 3 - # If set to true, precision will mean the number of significant digits instead - # of the number of decimal digits (1234 with precision 2 becomes 1200, 1.23543 becomes 1.2) - significant: false - # If set, the zeros after the decimal separator will always be stripped (eg.: 1.200 will be 1.2) - strip_insignificant_zeros: false - # Used in number_to_currency() - currency: - format: - # Where is the currency sign? %u is the currency unit, %n the number (default: $5.00) - format: "%n %u" - unit: "€" - # These three are to override number.format and are optional - separator: "," - delimiter: "." - precision: 2 - significant: false - strip_insignificant_zeros: false +# 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. - # Used in number_to_percentage() - percentage: - format: - # These three are to override number.format and are optional - # separator: - delimiter: "" - # precision: - - # Used in number_to_precision() - precision: - format: - # These three are to override number.format and are optional - # separator: - delimiter: "" - # precision: - # significant: false - # strip_insignificant_zeros: false - - # Used in number_to_human_size() - human: - format: - # These three are to override number.format and are optional - # separator: - delimiter: "" - precision: 1 - significant: true - strip_insignificant_zeros: true - # Used in number_to_human_size() - storage_units: - format: "%n %u" - units: - byte: - one: "Byte" - other: "Bytes" - kb: "KB" - mb: "MB" - gb: "GB" - tb: "TB" - # Used in number_to_human() - decimal_units: - format: "%n %u" - # Decimal units output formatting - # By default we will only quantify some of the exponents - # but the commented ones might be defined or overridden - # by the user. - units: - # femto: Quadrillionth - # pico: Trillionth - # nano: Billionth - # micro: Millionth - # mili: Thousandth - # centi: Hundredth - # deci: Tenth - unit: "" - # ten: - # one: Ten - # other: Tens - # hundred: Hundred - thousand: "Mil" - million: "Millón" - billion: "Mil millones" - trillion: "Trillón" - quadrillion: "Cuatrillón" - - # Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words() - datetime: - distance_in_words: - half_a_minute: "medio minuto" - less_than_x_seconds: - one: "menos de 1 segundo" - other: "menos de %{count} segundos" - x_seconds: - one: "1 segundo" - other: "%{count} segundos" - less_than_x_minutes: - one: "menos de 1 minuto" - other: "menos de %{count} minutos" - x_minutes: - one: "1 minuto" - other: "%{count} minutos" - about_x_hours: - one: "alrededor de 1 hora" - other: "alrededor de %{count} horas" - x_days: - one: "1 día" - other: "%{count} días" - about_x_months: - one: "alrededor de 1 mes" - other: "alrededor de %{count} meses" - x_months: - one: "1 mes" - other: "%{count} meses" - about_x_years: - one: "alrededor de 1 año" - other: "alrededor de %{count} años" - over_x_years: - one: "más de 1 año" - other: "más de %{count} años" - almost_x_years: - one: "casi 1 año" - other: "casi %{count} años" - prompts: - year: "Año" - month: "Mes" - day: "Día" - hour: "Hora" - minute: "Minutos" - second: "Segundos" - - helpers: - select: - # Default value for :prompt => true in FormOptionsHelper - prompt: "Por favor seleccione" - - # Default translation keys for submit FormHelper - submit: - create: 'Guardar %{model}' - update: 'Actualizar %{model}' - submit: 'Guardar %{model}' - - # Attributes names common to most models - #attributes: - #created_at: "Created at" - #updated_at: "Updated at" - - # Active Record models configuration - activerecord: - errors: - messages: - taken: "ya está en uso" - record_invalid: "La validación falló: %{errors}" - # Append your own errors here or at the model/attributes scope. - - # You can define own errors for models or model attributes. - # The values :model, :attribute and :value are always available for interpolation. - # - # For example, - # models: - # user: - # blank: "This is a custom blank message for %{model}: %{attribute}" - # attributes: - # login: - # blank: "This is a custom blank message for User login" - # Will define custom blank validation message for User model and - # custom blank validation message for login attribute of User model. - #models: - - # Translate model names. Used in Model.human_name(). - #models: - # For example, - # user: "Dude" - # will translate User model name to "Dude" - - # Translate model attribute names. Used in Model.human_attribute_name(attribute). - #attributes: - # For example, - # user: - # login: "Handle" - # will translate User attribute "login" as "Handle" - - # Active Model - errors: - # The default format to use in full error messages. - format: "%{attribute} %{message}" - - template: - header: - one: "No se pudo guardar este/a %{model} porque se encontró 1 error" - other: "No se pudo guardar este/a %{model} porque se encontraron %{count} errores" - # The variable :count is also available - body: "Se encontraron problemas con los siguientes campos:" - - # The values :model, :attribute and :value are always available for interpolation - # The value :count is available when applicable. Can be used for pluralization. - messages: - inclusion: "no está incluido en la lista" - exclusion: "está reservado" - invalid: "no es válido" - confirmation: "no coincide con la confirmación" - accepted: "debe ser aceptado" - empty: "no puede estar vacío" - blank: "no puede estar en blanco" - too_long: "es demasiado largo (%{count} caracteres máximo)" - too_short: "es demasiado corto (%{count} caracteres mínimo)" - wrong_length: "no tiene la longitud correcta (%{count} caracteres exactos)" - not_a_number: "no es un número" - greater_than: "debe ser mayor que %{count}" - greater_than_or_equal_to: "debe ser mayor que o igual a %{count}" - equal_to: "debe ser igual a %{count}" - less_than: "debe ser menor que %{count}" - less_than_or_equal_to: "debe ser menor que o igual a %{count}" - odd: "debe ser impar" - even: "debe ser par" - - # Active Support - date: - formats: - # Use the strftime parameters for formats. - # When no format has been given, it uses default. - # You can provide other formats here if you like! - default: "%e/%m/%Y" - short: "%e de %b" - long: "%e de %B de %Y" - - day_names: [Domingo, Lunes, Martes, Miércoles, Jueves, Viernes, Sábado] - abbr_day_names: [Dom, Lun, Mar, Mie, Jue, Vie, Sab] - - # Don't forget the nil at the beginning; there's no such thing as a 0th month - month_names: [~, Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre] - abbr_month_names: [~, Ene, Feb, Mar, Abr, May, Jun, Jul, Ago, Sep, Oct, Nov, Dic] - # Used in date_select and datime_select. - order: - - :day - - :month - - :year - - time: - formats: - default: "%A, %e de %B de %Y %H:%M:%S %z" - short: "%e de %b %H:%M" - long: "%e de %B de %Y %H:%M" - am: "am" - pm: "pm" - - # Used in array.to_sentence. - support: - array: - words_connector: ", " - two_words_connector: " y " - last_word_connector: ", y " \ No newline at end of file +es: + hello: "Hola Mundo" + application: + helper: + unknown_person: "persona desconocida" + new_requests: "nuevas peticiones" + dashboards: + helper: + home: "home" + error_messages: + helper: + invalid_fields: "Campos Invalidos" + correct_the_following_errors_and_try_again: "Corrija los siguentes errores y trate de nuevo." + people: + helper: + results_for: " resultados para %{params}" + people_on_pod_are_aware_of: " gente en pod estan al tanto de " + layouts: + application: + edit_profile: "editar perfil" + logout: "desloguear" + shared: + aspect_nav: + all_aspects: "Todos los Aspectos" + manage: "Manejar" + manage_your_aspects: "Maneja tus Aspectos" + sub_header: + all_aspects: "Todos los Aspectos" + manage_aspects: "Manejar Aspectos" + publisher: + share: "Compartir" + aspect_friends: + add_friends: "Añade amigos" + albums: + album: + you: "usted" + new_album: + create: "Crear" + add_a_new_album: "Añade un nuevo álbum" + show: + edit_album: "Editar Álbum" + albums: "álbumes" + updated: "actualizar" + by: "por" + edit: + editing: "Editando" + updated: "actualizado" + are_you_sure: "Esta seguro?" + delete_album: "Eliminar Álbum" + cancel: "Cancelar" + index: + home: "home" + new_album: "Nuevo Álbum" + create: + success: "Creo el álbum llamado %{name}." + update: + success: "Álbum %{name} fue editado exitosamente." + failure: "Fallo el editar el álbum %{name}." + destroy: + success: "Álbum %{name} fue eliminado." + helper: + friends_albums: "Álbumes de amigos" + your_albums: "Tus Álbumes" + aspects: + index: + photos: "fotos" + show: + photos: "fotos" + manage: + add_a_new_aspect: "Añadir nuevo aspecto" + add_a_new_friend: "Añadir nuevo amigo" + show: "Mostrar" + update_aspects: "Actualizar Aspectos" + requests: "Requests" + ignore_remove: "Ignorar/Remover" + new_aspect: + add_a_new_aspect: "Añadir nuevo aspecto" + create: "Crear" + create: + success:"Pulsa en el signo de mas a la izquierda para escojer quien puede ver su nuevo aspecto." + destroy: + success: "%{name} fue removido exitosamente." + update: + success: "Su aspecto, %{name}, fue editado exitosamente." + move_friends: + failure: "Fallo el editar aspecto para el amigo %{real_name}." + success: "Los aspectos fueron editados exitosamente." + move_friend: + error: "no funciono %{inspect}" + notice: "Ahora estas mostrando a tu amigo un aspecto diferente de ti." + helper: + remove: "remover" + aspect_not_empty: "Aspecto no esta vacio" + users: + edit: + cancel: "Cancelar" + update_profile: "Actualizar Perfil" + home: "Home" + diaspora_username: "USUARIO DE DIASPORA" + info: "Info" + picture: "Picture" + editing_profile: "Editando perfil" + albums: "Álbums" + you_dont_have_any_photos: "No tienes ninguna foto! ve a la pagina" + page_to_upload_some: "para subir algunas" + comments: + comment: + ago: "atras" + new_comment: + comment: "Commentario" + photos: + show: + prev: "prev" + full_size: "tamaño actual" + next: "prox" + edit_photo: "Editar Foto" + delete_photo: "Eliminar Foto" + are_you_sure: "Esta seguro?" + comments: "comentarios" + edit: + editing: "Editando" + are_you_sure: "Esta seguro?" + delete_photo: "Eliminar Foto" + photo: + show_comments: "mostrar comentarios" + posted_a_new_photo_to: "a puesto una nueva foto en" + new: + new_photo: "Nueva Foto" + back_to_list: "Devuelta a la lista" + post_it: "post it!" + create: + runtime_error: "Photo upload failed. Are you sure that your seatbelt is fastened?" + integrity_error: "Photo upload failed. Are you sure that was an image?" + type_error: "Photo upload failed. Are you sure an image was added?" + update: + notice: "Photo successfully updated." + error: "Failed to edit photo." + destroy: + notice: "Photo deleted." + registrations: + new: + sign_up: "Registrate" + create: + success: "Esta registrado en Diaspora!" + status_messages: + new_status_message: + tell_me_something_good: "dime algo bueno" + oh_yeah: "oh yeah!" + status_message: + show_comments: "mostrar comentarios" + delete: "Eliminar" + are_you_sure: "Esta seguro?" + show: + status_message: "Mensaje de status" + comments: "comentarios" + are_you_sure: "Esta seguro?" + destroy: "Destruir" + view_all: "Ver Todos" + message: "Mensaje" + owner: "Dueño" + helper: + no_message_to_display: "No hay mensajes que mostrar." + people: + person: + add_friend: "añadir amigo" + pending_request: "petición pendiente" + index: + add_friend: "añadir amigo" + real_name: "nombre real" + diaspora_handle: "usuario en diaspora" + thats_you: "ese eres tu!" + friend_request_pending: "friend request pending" + you_have_a_friend_request_from_this_person: "you have a friend request from this person" + show: + last_seen: "ultima vez visto: %{how_long_ago}" + friends_since: "amigos desde: %{how_long_ago}" + save: "guardar" + are_you_sure: "Esta seguro?" + remove_friend: "remover amigo" + requests: + new_request: + add_a_new_friend_to: "Añade un nuevo amigo a " + enter_a_diaspora_username: "Escribe el usuario de Diaspora:" + your_diaspora_username_is: "Tu usuario de Diaspora es: %{diaspora_handle}" + friends_username: "Usuario de amigo" + destroy: + success: "Ahora son amigos." + error: "Seleccione un aspecto!" + ignore: "Ignorar peticion de amistad" + create: + error: "No diaspora seed found with this email!" + already_friends: "Ya eres amigo de %{destination_url}!" + success: "Una peticion de amistad se envio a %{destination_url}." + horribly_wrong: "Algo horriblemente mal sucedio" diff --git a/config/locales/fi.yml b/config/locales/defaults/fi.yml similarity index 100% rename from config/locales/fi.yml rename to config/locales/defaults/fi.yml diff --git a/config/locales/fr-informal.yml b/config/locales/defaults/fr-informal.yml similarity index 99% rename from config/locales/fr-informal.yml rename to config/locales/defaults/fr-informal.yml index 627674ca5..f70812fdf 100644 --- a/config/locales/fr-informal.yml +++ b/config/locales/defaults/fr-informal.yml @@ -53,7 +53,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: @@ -66,7 +66,7 @@ fr-informal: failure: "L’édition de l’album %{name} a échoué." destroy: success: "L’album %{name} a été supprimé." - helper: + helper: friends_albums: "Albums d’amis" your_albums: "Tes albums" aspects: @@ -202,4 +202,4 @@ fr-informal: error: "Aucun résultat Diaspora n’a été trouvé avec cette adresse e-mail !" already_friends: "Tu es déjà ami avec %{destination_url}!" success: "Une requête d’ami a été envoyée à %{destination_url}." - horribly_wrong: "Quelque chose d’horrible s’est produit." \ No newline at end of file + horribly_wrong: "Quelque chose d’horrible s’est produit." diff --git a/config/locales/fr.yml b/config/locales/defaults/fr.yml similarity index 100% rename from config/locales/fr.yml rename to config/locales/defaults/fr.yml diff --git a/config/locales/it.yml b/config/locales/defaults/it.yml similarity index 100% rename from config/locales/it.yml rename to config/locales/defaults/it.yml diff --git a/config/locales/lt.yml b/config/locales/defaults/lt.yml similarity index 100% rename from config/locales/lt.yml rename to config/locales/defaults/lt.yml diff --git a/config/locales/pl.yml b/config/locales/defaults/pl.yml similarity index 100% rename from config/locales/pl.yml rename to config/locales/defaults/pl.yml diff --git a/config/locales/pt-BR.yml b/config/locales/defaults/pt-BR.yml similarity index 100% rename from config/locales/pt-BR.yml rename to config/locales/defaults/pt-BR.yml diff --git a/config/locales/pt-PT.yml b/config/locales/defaults/pt-PT.yml similarity index 100% rename from config/locales/pt-PT.yml rename to config/locales/defaults/pt-PT.yml diff --git a/config/locales/ro.yml b/config/locales/defaults/ro.yml similarity index 100% rename from config/locales/ro.yml rename to config/locales/defaults/ro.yml diff --git a/config/locales/ru.yml b/config/locales/defaults/ru.yml similarity index 100% rename from config/locales/ru.yml rename to config/locales/defaults/ru.yml diff --git a/config/locales/sv.yml b/config/locales/defaults/sv.yml similarity index 100% rename from config/locales/sv.yml rename to config/locales/defaults/sv.yml diff --git a/config/locales/devise.de.yml b/config/locales/devise.de.yml deleted file mode 100644 index 7c0e0e758..000000000 --- a/config/locales/devise.de.yml +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3. See -# the COPYRIGHT file. - - -de: - errors: - messages: - not_found: "nicht gefunden" - already_confirmed: "wurde bereits bestätigt" - not_locked: "war nicht gesperrt" - - devise: - failure: - unauthenticated: 'Du musst dich anmelden oder registrieren um fortzufahren.' - unconfirmed: 'Du musst dein Konto bestätigen um fortzufahren.' - locked: 'Dein Konto ist gesperrt.' - invalid: 'Ungültige E-Mail-Adresse oder Passwort.' - invalid_token: 'Ungültiger Authentifizierungstoken.' - timeout: 'Deine Sitzung ist abgelaufen, bitte melde dich erneut an um fortzufahren.' - inactive: 'Dein Konto wurde noch nicht aktiviert.' - sessions: - signed_in: 'Erfolgreich angemeldet.' - signed_out: 'Erfolgreich abgemeldet.' - passwords: - send_instructions: 'Du wirst in ein paar Minuten eine E-Mail erhalten, die beschreibt, wie du dein Passwort zurücksetzt.' - updated: 'Dein Passwort wurde erfolgreich geändert. Du bist nun angemeldet.' - confirmations: - send_instructions: 'Du wirst in ein paar Minuten eine E-Mail erhalten, die beschreibt, wie du dein Konto bestätigst.' - confirmed: 'Dein Konto wurde erfolgreich bestätigt. Du bist nun angemeldet.' - registrations: - signed_up: 'Du hast dich erfolgreich registriert. Sofern aktiviert, wurde dir eine Bestätigung per E-Mail gesendet.' - updated: 'Dein Konto wurde aktualisiert.' - destroyed: 'Tschüss! Dein Konto wurde erfolgreich gekündigt. Wir hoffen dich bald wiederzusehen.' - unlocks: - send_instructions: 'Du wirst in ein paar Minuten eine E-Mail erhalten, die beschreibt, wie du dein Konto entsperren kannst.' - unlocked: 'Dein Konto wurde erfolgreich entsperrt. Du bist nun angemeldet.' - mailer: - confirmation_instructions: 'Instruktionen zur Bestätigung' - reset_password_instructions: 'Instruktionen zum Zurücksetzen des Passworts' - unlock_instructions: 'Instruktionen zum Entsperren' diff --git a/config/locales/devise.es.yml b/config/locales/devise.es.yml deleted file mode 100644 index 06002aa63..000000000 --- a/config/locales/devise.es.yml +++ /dev/null @@ -1,42 +0,0 @@ -es: - errors: - messages: - not_found: 'no encontrado' - already_confirmed: 'ya ha sido confirmada' - not_locked: 'no está bloqueada' - - devise: - failure: - unauthenticated: 'Necesitas acceder a tu cuenta o registrarte antes de continuar.' - unconfirmed: 'Necesitas confirmar tu cuenta antes de continuar.' - locked: 'Tu cuenta esta bloqueada.' - invalid: 'Contraseña o Email incorrecto.' - invalid_token: 'Token de autenticación incorrecto.' - timeout: 'Tu sesión ha expirado, por favor accede de nuevo para continuar.' - inactive: 'Tu cuenta no ha sido activada.' - sessions: - signed_in: 'Has ingresado correctamente.' - signed_out: 'Has salido correctamente.' - passwords: - send_instructions: 'Recibirás un email con instrucciones para cambiar tu contraseña en pocos minutos.' - updated: 'Tu contraseña ha sido modificada. Ya has accedido a tu cuenta.' - confirmations: - send_instructions: 'Recibirás un email con instrucciones para confirmar tu cuenta en pocos minutos.' - confirmed: 'Tu cuenta ha sido confirmada. Ya has accedido a tu cuenta.' - registrations: - signed_up: 'Te has registrado correctamente. Si está disponible, te habremos enviado un email de confirmación.' - updated: 'Has actualizado tu cuenta correctamente.' - destroyed: '!Adiós! Tu cuenta ha sido cancelada. Esperamos verte pronto.' - unlocks: - send_instructions: 'Recibirás un email con instrucciones para desbloquear tu cuenta en pocos minutos.' - unlocked: 'Tu cuenta ha sido desbloqueada. Ya has accedido a tu cuenta.' - oauth_callbacks: - success: 'Has sido autorizado satisfactoriamente de la cuenta %{kind}.' - failure: 'No has sido autorizado en la cuenta %{kind} porque "%{reason}".' - mailer: - confirmation_instructions: - subject: 'Instrucciones de confirmación' - reset_password_instructions: - subject: 'Instrucciones para cambiar tu contraseña' - unlock_instructions: - subject: 'Instrucciones para desbloquear tu cuenta' \ No newline at end of file diff --git a/config/locales/devise.fr.yml b/config/locales/devise.fr.yml deleted file mode 100644 index b8691eb3a..000000000 --- a/config/locales/devise.fr.yml +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3. See -# the COPYRIGHT file. - - -fr: - errors: - messages: - not_found: "introuvable" - already_confirmed: "a déjà été confirmé" - not_locked: "n’a pas été verrouillé" - - devise: - failure: - unauthenticated: 'Vous devez vous connecter ou vous inscrire avant de continuer.' - unconfirmed: 'Vous devez confirmer votre compte avant de continuer.' - locked: 'Votre compte est verrouillé.' - invalid: 'E-mail ou mot de passe invalide.' - invalid_token: 'Jeton d’authentification invalide.' - timeout: 'Votre session a expiré, veuillez vous connecter de nouveau afin de continuer.' - inactive: 'Votre compte n’a pas encore été activé.' - sessions: - signed_in: 'Connecté avec succès.' - signed_out: 'Déconnecté avec succès.' - passwords: - send_instructions: 'Vous allez recevoir dans quelques minutes un e-mail contenant des instructions vous expliquant comment réinitialiser votre mot de passe.' - updated: 'Votre mot de passe a été modifié avec succès. Vous êtes à présent connecté.' - confirmations: - send_instructions: 'Vous allez recevoir dans quelques minutes un e-mail contenant des instructions vous expliquant comment confirmer votre compte.' - confirmed: 'Votre compte a été confirmé avec succès. Vous êtes à présent connecté.' - registrations: - signed_up: 'Vous vous êtes inscrit avec succès. Si activée, une confirmation a été envoyée sur votre adresse e-mail.' - updated: 'Vous avez mis à jour votre compte avec succès.' - destroyed: 'Au revoir ! Votre compte a été résilié avec succès. Nous espérons vous revoir très bientôt.' - unlocks: - send_instructions: 'Vous allez recevoir dans quelques minutes un e-mail contenant des instructions vous expliquant comment déverrouiller votre compte.' - unlocked: 'Votre compte a été déverrouillé avec succès. Vous êtes à présent connecté.' - mailer: - confirmation_instructions: 'Instructions de confirmation' - reset_password_instructions: 'Réinitialiser les instructions du mot de passe' - unlock_instructions: 'Instructions de déverrouillage' diff --git a/config/locales/devise.it.yml b/config/locales/devise.it.yml deleted file mode 100644 index 76f761e37..000000000 --- a/config/locales/devise.it.yml +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3. See -# the COPYRIGHT file. - - -it: - errors: - messages: - not_found: "non trovato" - already_confirmed: "è già stato confermato" - not_locked: "non era bloccato" - - devise: - failure: - unauthenticated: "Devi effettuare l'accesso o registrarti prima di continuare." - unconfirmed: "Devi confermare il tuo account prima di continuare." - locked: "Il tuo account è bloccato." - invalid: "Email o password errati." - invalid_token: "Token di autenticazione errato." - timeout: "La tua sessione è scaduta, effettua di nuovo l'accesso per continuare." - inactive: "Il tuo account non è ancora stato attivato." - sessions: - signed_in: "Accesso effettuato con successo." - signed_out: "Disconnessione effettuata con successo." - passwords: - send_instructions: "Tra pochi minuti riceverai una email con le istruzioni su come cambiare la tua password." - updated: "La tua password è stata modificata. Hai appena effettuato l'accesso." - confirmations: - send_instructions: "Tra pochi minuti riceverai una email per confermare il tuo account." - confirmed: "Il tuo account è stato confermato con successo. Hai appena effettuato l'accesso." - registrations: - signed_up: "Ti sei iscritto. Se il servizio è disponibile, riceverai una conferma via email." - updated: "Hai aggiornato il tuo account." - destroyed: "Ciao! Il tuo account è stato rimosso. Speriamo che tu torni a trovarci presto." - unlocks: - send_instructions: "Tra pochi minuti riceverai una mail con le istruzioni su come sbloccare il tuo account." - unlocked: "Il tuo account è stato sbloccato. Hai appena effettuato l'accesso." - mailer: - confirmation_instructions: "Istruzioni sulla conferma" - reset_password_instructions: "Istruzioni su come cambiare la password" - unlock_instructions: "Istruzioni su come sbloccare l'account" diff --git a/config/locales/devise.pl.yml b/config/locales/devise.pl.yml deleted file mode 100644 index a490a1a39..000000000 --- a/config/locales/devise.pl.yml +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3. See -# the COPYRIGHT file. - - -pl: - errors: - messages: - not_found: "nie znaleziono" - already_confirmed: "potwierdzono wcześniej" - not_locked: "nie był zablokowany" - - devise: - failure: - unauthenticated: 'By kontynuować musisz się zalogować lub zarejestrować.' - unconfirmed: 'Musisz aktywować swoje konto.' - locked: 'Twoje konto jest zablokowane.' - invalid: 'Nieprawidłowy adres email lub hasło.' - invalid_token: 'Nieprawidłowy kod identyfikacyjny.' - timeout: 'Twoja sesja wygasła, zaloguj się ponownie by kontynuować.' - inactive: 'Twoje konto nie zostało jeszcze aktywowane.' - sessions: - signed_in: 'Zalogowano pomyślnie.' - signed_out: 'Wylogowano.' - passwords: - send_instructions: 'W ciągu kilku minut otrzymasz maila zawierającego instrukcjie dotyczące zresetowania hasła.' - updated: 'Twoje hasło zostało zmienione, zostałeś zalogowany.' - confirmations: - send_instructions: 'W ciągu kilku minut otrzymasz maila zawierającego instrukcje dotyczące aktywacji konta.' - confirmed: 'Twoje konto zostało aktywowane, zostałeś zalogowany.' - registrations: - signed_up: 'Zostałeś zarejestrowany. Jeśli aktywowano odpowiednią opcję, wyślemy do Ciebie email potwierdzający rejestrację.' - updated: 'Pomyślnie zaktualizowano informacje o Twoim koncie.' - destroyed: 'Żegnaj! Twoje konto zostało usunięte.' - unlocks: - send_instructions: 'W ciągu kilku minut otrzymasz email z instrukcjami odblokowania konta.' - unlocked: 'Twoje konto zostało odblokowane, jesteś zalogowany.' - mailer: - confirmation_instructions: 'Instrukcje aktywacji' - reset_password_instructions: 'Instrukcje zmiany hasła' - unlock_instructions: 'Instrukcje odblokowania' diff --git a/config/locales/devise.ru.yml b/config/locales/devise.ru.yml deleted file mode 100644 index 670d57026..000000000 --- a/config/locales/devise.ru.yml +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3. See -# the COPYRIGHT file. - - -ru: - errors: - messages: - not_found: "не найден(о)" - already_confirmed: "уже подтвержден(о)" - not_locked: "не заблокирован(о)" - - devise: - failure: - unauthenticated: 'Вам нужно войти либо зарегистрироваться, чтобы продолжить.' - unconfirmed: 'Вам нужно подтвердить вашу учётную запись, чтобы продолжить.' - locked: 'Ваша учётная запись заблокирована.' - invalid: 'Неверный e-mail или пароль.' - invalid_token: 'Неверный ключ аутентификации.' - timeout: 'Срок вашего сеанса истёк, пожалуйста, войдите в систему снова.' - inactive: 'Ваша учётная запись ещё не активирована.' - sessions: - signed_in: 'Вход в систему выполнен успешно.' - signed_out: 'Выход из системы выполнен успешно.' - passwords: - send_instructions: 'Вы получите e-mail с указаниями по сбросу пароля в течение нескольких минут.' - updated: 'Ваш пароль был изменён. Вы вошли в систему.' - confirmations: - send_instructions: 'Вы получите e-mail с указаниями по подтверждению учётной записи в течение нескольких минут.' - confirmed: 'Ваша учётная запись была подтверждена. Вы вошли в систему.' - registrations: - signed_up: 'Регистрация выполнена успешно. В зависимости от настроек, вам может прийти e-mail с подтверждением.' - updated: 'Обновление вашей учётной записи выполнено успешно.' - destroyed: 'До свидания! Ваша учётная запись была удалена. Надеемся, что вскоре вас увидим снова.' - unlocks: - send_instructions: 'Вы получите e-mail с указаниями по разблокированию учётной записи в течение нескольких минут.' - unlocked: 'Ваша учётная запись была разблокирована. Вы вошли в систему.' - mailer: - confirmation_instructions: 'Подтверждение учётной записи' - reset_password_instructions: 'Сброс пароля' - unlock_instructions: 'Разблокирование учётной записи' diff --git a/config/locales/devise.cs.yml b/config/locales/devise/devise.cs.yml similarity index 100% rename from config/locales/devise.cs.yml rename to config/locales/devise/devise.cs.yml diff --git a/config/locales/devise.cy.yml b/config/locales/devise/devise.cy.yml similarity index 100% rename from config/locales/devise.cy.yml rename to config/locales/devise/devise.cy.yml diff --git a/config/locales/devise/devise.es.yml b/config/locales/devise/devise.es.yml index 70209ff79..06002aa63 100644 --- a/config/locales/devise/devise.es.yml +++ b/config/locales/devise/devise.es.yml @@ -18,10 +18,10 @@ es: signed_in: 'Has ingresado correctamente.' signed_out: 'Has salido correctamente.' passwords: - send_instructions: 'Recibirás un email con instrucciones para cambiar tu contraseña en poco minutos.' + send_instructions: 'Recibirás un email con instrucciones para cambiar tu contraseña en pocos minutos.' updated: 'Tu contraseña ha sido modificada. Ya has accedido a tu cuenta.' confirmations: - send_instructions: 'Recibirás un email con instrucciones para confirmar tu cuenta en poco minutos.' + send_instructions: 'Recibirás un email con instrucciones para confirmar tu cuenta en pocos minutos.' confirmed: 'Tu cuenta ha sido confirmada. Ya has accedido a tu cuenta.' registrations: signed_up: 'Te has registrado correctamente. Si está disponible, te habremos enviado un email de confirmación.' diff --git a/config/locales/devise.fi.yml b/config/locales/devise/devise.fi.yml similarity index 100% rename from config/locales/devise.fi.yml rename to config/locales/devise/devise.fi.yml diff --git a/config/locales/devise.fr-informal.yml b/config/locales/devise/devise.fr-informal.yml similarity index 100% rename from config/locales/devise.fr-informal.yml rename to config/locales/devise/devise.fr-informal.yml diff --git a/config/locales/devise/devise.it.yml b/config/locales/devise/devise.it.yml index 9b0fb0957..76f761e37 100644 --- a/config/locales/devise/devise.it.yml +++ b/config/locales/devise/devise.it.yml @@ -7,35 +7,35 @@ it: errors: messages: not_found: "non trovato" - already_confirmed: "già confermato" - not_locked: "non bloccato" + already_confirmed: "è già stato confermato" + not_locked: "non era bloccato" devise: failure: - unauthenticated: 'È necessario che tu acceda o ti registri prima di continuare.' - unconfirmed: 'Devi confermare il tuo account prima di continuare.' - locked: 'Il tuo account è bloccato.' - invalid: 'Email o password invalida.' - invalid_token: 'Invalido token di autenticazione.' - timeout: 'La tua sessione è scaduta, per favore accedi nuovamente per continuare.' - inactive: 'Il tuo account non è ancora stato attivato.' + unauthenticated: "Devi effettuare l'accesso o registrarti prima di continuare." + unconfirmed: "Devi confermare il tuo account prima di continuare." + locked: "Il tuo account è bloccato." + invalid: "Email o password errati." + invalid_token: "Token di autenticazione errato." + timeout: "La tua sessione è scaduta, effettua di nuovo l'accesso per continuare." + inactive: "Il tuo account non è ancora stato attivato." sessions: - signed_in: 'Collegamento avvenuto con successo.' - signed_out: 'Uscita avvenuta con successo.' + signed_in: "Accesso effettuato con successo." + signed_out: "Disconnessione effettuata con successo." passwords: - send_instructions: 'Tra quale minuto riceverai una email con le istruzioni per ripristinare la password.' - updated: 'La tua password è stata cambiata con successo. Ora sei collegato.' + send_instructions: "Tra pochi minuti riceverai una email con le istruzioni su come cambiare la tua password." + updated: "La tua password è stata modificata. Hai appena effettuato l'accesso." confirmations: - send_instructions: 'Tra qualche minuti riceverai una email con le istruzioni per confermare il tuo account.' - confirmed: 'Il tuo account è stato confermato con successo. Ora sei collegato.' + send_instructions: "Tra pochi minuti riceverai una email per confermare il tuo account." + confirmed: "Il tuo account è stato confermato con successo. Hai appena effettuato l'accesso." registrations: - signed_up: 'Ti sei registrato con successo. Se abilitato, ti verrà inviata una email di conferma.' - updated: 'Hai aggiornato il tuo account.' - destroyed: 'Addio! Il tuo account è stato cancellato. Speriamo di rivederti presto.' + signed_up: "Ti sei iscritto. Se il servizio è disponibile, riceverai una conferma via email." + updated: "Hai aggiornato il tuo account." + destroyed: "Ciao! Il tuo account è stato rimosso. Speriamo che tu torni a trovarci presto." unlocks: - send_instructions: 'Tra qualche minuti riceverai una email con le istruzioni per sbloccare il tuo account.' - unlocked: 'Il tuo account è stato sbloccato. Ora sei collegato.' + send_instructions: "Tra pochi minuti riceverai una mail con le istruzioni su come sbloccare il tuo account." + unlocked: "Il tuo account è stato sbloccato. Hai appena effettuato l'accesso." mailer: - confirmation_instructions: 'Istruzioni per la conferma' - reset_password_instructions: 'Istruzioni per il reset della password' - unlock_instructions: 'Istruzioni per lo sblocco' + confirmation_instructions: "Istruzioni sulla conferma" + reset_password_instructions: "Istruzioni su come cambiare la password" + unlock_instructions: "Istruzioni su come sbloccare l'account" diff --git a/config/locales/devise.lt.yml b/config/locales/devise/devise.lt.yml similarity index 100% rename from config/locales/devise.lt.yml rename to config/locales/devise/devise.lt.yml diff --git a/config/locales/devise.pt-BR.yml b/config/locales/devise/devise.pt-BR.yml similarity index 100% rename from config/locales/devise.pt-BR.yml rename to config/locales/devise/devise.pt-BR.yml diff --git a/config/locales/devise.pt-PT.yml b/config/locales/devise/devise.pt-PT.yml similarity index 100% rename from config/locales/devise.pt-PT.yml rename to config/locales/devise/devise.pt-PT.yml diff --git a/config/locales/devise.ro.yml b/config/locales/devise/devise.ro.yml similarity index 100% rename from config/locales/devise.ro.yml rename to config/locales/devise/devise.ro.yml diff --git a/config/locales/devise.sv.yml b/config/locales/devise/devise.sv.yml similarity index 100% rename from config/locales/devise.sv.yml rename to config/locales/devise/devise.sv.yml diff --git a/config/locales/es.yml b/config/locales/es.yml deleted file mode 100644 index 5af6c70aa..000000000 --- a/config/locales/es.yml +++ /dev/null @@ -1,202 +0,0 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3. See -# the COPYRIGHT file. - - -# Sample localization file for English. Add more files in this directory for other locales. -# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -es: - hello: "Hola Mundo" - application: - helper: - unknown_person: "persona desconocida" - new_requests: "nuevas peticiones" - dashboards: - helper: - home: "home" - error_messages: - helper: - invalid_fields: "Campos Invalidos" - correct_the_following_errors_and_try_again: "Corrija los siguentes errores y trate de nuevo." - people: - helper: - results_for: " resultados para %{params}" - people_on_pod_are_aware_of: " gente en pod estan al tanto de " - layouts: - application: - edit_profile: "editar perfil" - logout: "desloguear" - shared: - aspect_nav: - all_aspects: "Todos los Aspectos" - manage: "Manejar" - manage_your_aspects: "Maneja tus Aspectos" - sub_header: - all_aspects: "Todos los Aspectos" - manage_aspects: "Manejar Aspectos" - publisher: - share: "Compartir" - aspect_friends: - add_friends: "Añade amigos" - albums: - album: - you: "usted" - new_album: - create: "Crear" - add_a_new_album: "Añade un nuevo álbum" - show: - edit_album: "Editar Álbum" - albums: "álbumes" - updated: "actualizar" - by: "por" - edit: - editing: "Editando" - updated: "actualizado" - are_you_sure: "Esta seguro?" - delete_album: "Eliminar Álbum" - cancel: "Cancelar" - index: - home: "home" - new_album: "Nuevo Álbum" - create: - success: "Creo el álbum llamado %{name}." - update: - success: "Álbum %{name} fue editado exitosamente." - failure: "Fallo el editar el álbum %{name}." - destroy: - success: "Álbum %{name} fue eliminado." - helper: - friends_albums: "Álbumes de amigos" - your_albums: "Tus Álbumes" - aspects: - index: - photos: "fotos" - show: - photos: "fotos" - manage: - add_a_new_aspect: "Añadir nuevo aspecto" - add_a_new_friend: "Añadir nuevo amigo" - show: "Mostrar" - update_aspects: "Actualizar Aspectos" - requests: "Requests" - ignore_remove: "Ignorar/Remover" - new_aspect: - add_a_new_aspect: "Añadir nuevo aspecto" - create: "Crear" - create: - success:"Pulsa en el signo de mas a la izquierda para escojer quien puede ver su nuevo aspecto." - destroy: - success: "%{name} fue removido exitosamente." - update: - success: "Su aspecto, %{name}, fue editado exitosamente." - move_friends: - failure: "Fallo el editar aspecto para el amigo %{real_name}." - success: "Los aspectos fueron editados exitosamente." - move_friend: - error: "no funciono %{inspect}" - notice: "Ahora estas mostrando a tu amigo un aspecto diferente de ti." - helper: - remove: "remover" - aspect_not_empty: "Aspecto no esta vacio" - users: - edit: - cancel: "Cancelar" - update_profile: "Actualizar Perfil" - home: "Home" - diaspora_username: "USUARIO DE DIASPORA" - info: "Info" - picture: "Picture" - editing_profile: "Editando perfil" - albums: "Álbums" - you_dont_have_any_photos: "No tienes ninguna foto! ve a la pagina" - page_to_upload_some: "para subir algunas" - comments: - comment: - ago: "atras" - new_comment: - comment: "Commentario" - photos: - show: - prev: "prev" - full_size: "tamaño actual" - next: "prox" - edit_photo: "Editar Foto" - delete_photo: "Eliminar Foto" - are_you_sure: "Esta seguro?" - comments: "comentarios" - edit: - editing: "Editando" - are_you_sure: "Esta seguro?" - delete_photo: "Eliminar Foto" - photo: - show_comments: "mostrar comentarios" - posted_a_new_photo_to: "a puesto una nueva foto en" - new: - new_photo: "Nueva Foto" - back_to_list: "Devuelta a la lista" - post_it: "post it!" - create: - runtime_error: "Photo upload failed. Are you sure that your seatbelt is fastened?" - integrity_error: "Photo upload failed. Are you sure that was an image?" - type_error: "Photo upload failed. Are you sure an image was added?" - update: - notice: "Photo successfully updated." - error: "Failed to edit photo." - destroy: - notice: "Photo deleted." - registrations: - new: - sign_up: "Registrate" - create: - success: "Esta registrado en Diaspora!" - status_messages: - new_status_message: - tell_me_something_good: "dime algo bueno" - oh_yeah: "oh yeah!" - status_message: - show_comments: "mostrar comentarios" - delete: "Eliminar" - are_you_sure: "Esta seguro?" - show: - status_message: "Mensaje de status" - comments: "comentarios" - are_you_sure: "Esta seguro?" - destroy: "Destruir" - view_all: "Ver Todos" - message: "Mensaje" - owner: "Dueño" - helper: - no_message_to_display: "No hay mensajes que mostrar." - people: - person: - add_friend: "añadir amigo" - pending_request: "petición pendiente" - index: - add_friend: "añadir amigo" - real_name: "nombre real" - diaspora_handle: "usuario en diaspora" - thats_you: "ese eres tu!" - friend_request_pending: "friend request pending" - you_have_a_friend_request_from_this_person: "you have a friend request from this person" - show: - last_seen: "ultima vez visto: %{how_long_ago}" - friends_since: "amigos desde: %{how_long_ago}" - save: "guardar" - are_you_sure: "Esta seguro?" - remove_friend: "remover amigo" - requests: - new_request: - add_a_new_friend_to: "Añade un nuevo amigo a " - enter_a_diaspora_username: "Escribe el usuario de Diaspora:" - your_diaspora_username_is: "Tu usuario de Diaspora es: %{diaspora_handle}" - friends_username: "Usuario de amigo" - destroy: - success: "Ahora son amigos." - error: "Seleccione un aspecto!" - ignore: "Ignorar peticion de amistad" - create: - error: "No diaspora seed found with this email!" - already_friends: "Ya eres amigo de %{destination_url}!" - success: "Una peticion de amistad se envio a %{destination_url}." - horribly_wrong: "Algo horriblemente mal sucedio" From 86909675093b42230526b6959b6fc6c7e6000646 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 23 Sep 2010 14:58:17 -0700 Subject: [PATCH 10/24] defaults doesn't really make sense when there's nothing else --- config/locales/{defaults => diaspora}/cs.yml | 0 config/locales/{defaults => diaspora}/cy.yml | 0 config/locales/{defaults => diaspora}/de.yml | 0 config/locales/{defaults => diaspora}/en.yml | 0 config/locales/{defaults => diaspora}/es.yml | 0 config/locales/{defaults => diaspora}/fi.yml | 0 config/locales/{defaults => diaspora}/fr-informal.yml | 0 config/locales/{defaults => diaspora}/fr.yml | 0 config/locales/{defaults => diaspora}/it.yml | 0 config/locales/{defaults => diaspora}/lt.yml | 0 config/locales/{defaults => diaspora}/pl.yml | 0 config/locales/{defaults => diaspora}/pt-BR.yml | 0 config/locales/{defaults => diaspora}/pt-PT.yml | 0 config/locales/{defaults => diaspora}/ro.yml | 0 config/locales/{defaults => diaspora}/ru.yml | 0 config/locales/{defaults => diaspora}/sv.yml | 0 16 files changed, 0 insertions(+), 0 deletions(-) rename config/locales/{defaults => diaspora}/cs.yml (100%) rename config/locales/{defaults => diaspora}/cy.yml (100%) rename config/locales/{defaults => diaspora}/de.yml (100%) rename config/locales/{defaults => diaspora}/en.yml (100%) rename config/locales/{defaults => diaspora}/es.yml (100%) rename config/locales/{defaults => diaspora}/fi.yml (100%) rename config/locales/{defaults => diaspora}/fr-informal.yml (100%) rename config/locales/{defaults => diaspora}/fr.yml (100%) rename config/locales/{defaults => diaspora}/it.yml (100%) rename config/locales/{defaults => diaspora}/lt.yml (100%) rename config/locales/{defaults => diaspora}/pl.yml (100%) rename config/locales/{defaults => diaspora}/pt-BR.yml (100%) rename config/locales/{defaults => diaspora}/pt-PT.yml (100%) rename config/locales/{defaults => diaspora}/ro.yml (100%) rename config/locales/{defaults => diaspora}/ru.yml (100%) rename config/locales/{defaults => diaspora}/sv.yml (100%) diff --git a/config/locales/defaults/cs.yml b/config/locales/diaspora/cs.yml similarity index 100% rename from config/locales/defaults/cs.yml rename to config/locales/diaspora/cs.yml diff --git a/config/locales/defaults/cy.yml b/config/locales/diaspora/cy.yml similarity index 100% rename from config/locales/defaults/cy.yml rename to config/locales/diaspora/cy.yml diff --git a/config/locales/defaults/de.yml b/config/locales/diaspora/de.yml similarity index 100% rename from config/locales/defaults/de.yml rename to config/locales/diaspora/de.yml diff --git a/config/locales/defaults/en.yml b/config/locales/diaspora/en.yml similarity index 100% rename from config/locales/defaults/en.yml rename to config/locales/diaspora/en.yml diff --git a/config/locales/defaults/es.yml b/config/locales/diaspora/es.yml similarity index 100% rename from config/locales/defaults/es.yml rename to config/locales/diaspora/es.yml diff --git a/config/locales/defaults/fi.yml b/config/locales/diaspora/fi.yml similarity index 100% rename from config/locales/defaults/fi.yml rename to config/locales/diaspora/fi.yml diff --git a/config/locales/defaults/fr-informal.yml b/config/locales/diaspora/fr-informal.yml similarity index 100% rename from config/locales/defaults/fr-informal.yml rename to config/locales/diaspora/fr-informal.yml diff --git a/config/locales/defaults/fr.yml b/config/locales/diaspora/fr.yml similarity index 100% rename from config/locales/defaults/fr.yml rename to config/locales/diaspora/fr.yml diff --git a/config/locales/defaults/it.yml b/config/locales/diaspora/it.yml similarity index 100% rename from config/locales/defaults/it.yml rename to config/locales/diaspora/it.yml diff --git a/config/locales/defaults/lt.yml b/config/locales/diaspora/lt.yml similarity index 100% rename from config/locales/defaults/lt.yml rename to config/locales/diaspora/lt.yml diff --git a/config/locales/defaults/pl.yml b/config/locales/diaspora/pl.yml similarity index 100% rename from config/locales/defaults/pl.yml rename to config/locales/diaspora/pl.yml diff --git a/config/locales/defaults/pt-BR.yml b/config/locales/diaspora/pt-BR.yml similarity index 100% rename from config/locales/defaults/pt-BR.yml rename to config/locales/diaspora/pt-BR.yml diff --git a/config/locales/defaults/pt-PT.yml b/config/locales/diaspora/pt-PT.yml similarity index 100% rename from config/locales/defaults/pt-PT.yml rename to config/locales/diaspora/pt-PT.yml diff --git a/config/locales/defaults/ro.yml b/config/locales/diaspora/ro.yml similarity index 100% rename from config/locales/defaults/ro.yml rename to config/locales/diaspora/ro.yml diff --git a/config/locales/defaults/ru.yml b/config/locales/diaspora/ru.yml similarity index 100% rename from config/locales/defaults/ru.yml rename to config/locales/diaspora/ru.yml diff --git a/config/locales/defaults/sv.yml b/config/locales/diaspora/sv.yml similarity index 100% rename from config/locales/defaults/sv.yml rename to config/locales/diaspora/sv.yml From c6c361b5e6ce26e3383ddbdc5fd1ee85ccbdd0b6 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 23 Sep 2010 15:14:44 -0700 Subject: [PATCH 11/24] Add lucida sans, thanks danieleds --- public/stylesheets/sass/application.sass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 7c77a0b79..1291313de 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -458,7 +458,7 @@ ul.comment_set input[type='text'], textarea :font - :family 'lucida grande', 'sans-serif' + :family 'lucida grande', 'lucida sans', 'sans-serif' :size 14px :padding 0.3em :display block From 264555e63bd905ad2bd04a88e278aa445e12046e Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 23 Sep 2010 15:15:19 -0700 Subject: [PATCH 12/24] Update css --- public/stylesheets/application.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 82bbd8b6d..1ef65078a 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -342,7 +342,7 @@ ul.comment_set { color: #cccccc; } input[type='text'], textarea { - font-family: "lucida grande", "sans-serif"; + font-family: "lucida grande", "lucida sans", "sans-serif"; font-size: 14px; padding: 0.3em; display: block; From d748d456b5fc0a885fe93a45fa761f845767ab23 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 23 Sep 2010 16:21:08 -0700 Subject: [PATCH 13/24] Revert "fix in person partial" This reverts commit 8c0bc4b9e60e0e94fd515ba7f595e6d08fba34af. --- app/helpers/application_helper.rb | 6 +----- app/views/people/_person.html.haml | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b6e4c4389..89df26155 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -57,11 +57,7 @@ module ApplicationHelper end def person_image_link(person) - if current_user.friends.include?(person) || current_user.person == person - link_to person_image_tag(person), object_path(person) - else - person_image_tag person - end + link_to person_image_tag(person), object_path(person) end def new_request(request_count) diff --git a/app/views/people/_person.html.haml b/app/views/people/_person.html.haml index 185695db1..7e22a5570 100644 --- a/app/views/people/_person.html.haml +++ b/app/views/people/_person.html.haml @@ -8,10 +8,7 @@ .content %span.from - - if current_user.friends.include?(person) || person.id == current_user.person.id - = link_to person.real_name, person_path(person) - - else - = person.real_name + = link_to person.real_name, person_path(person) .info = person.diaspora_handle From 16b6fc6cdc613de614ed6fc8fe1a284abf1b3d1d Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 23 Sep 2010 17:18:34 -0700 Subject: [PATCH 14/24] Don't give exception on webfinger with no query --- app/controllers/publics_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/publics_controller.rb b/app/controllers/publics_controller.rb index d7f4825de..5046aa900 100644 --- a/app/controllers/publics_controller.rb +++ b/app/controllers/publics_controller.rb @@ -20,7 +20,7 @@ class PublicsController < ApplicationController end def webfinger - @person = Person.by_webfinger(params[:q], :local => true) + @person = Person.by_webfinger(params[:q], :local => true) if params[:q] unless @person.nil? || @person.owner.nil? render 'webfinger', :content_type => 'application/xrd+xml' else From 86f462cc42d3f49273cd9773aa76837fa95f0492 Mon Sep 17 00:00:00 2001 From: Pistos Date: Fri, 24 Sep 2010 11:23:54 +0800 Subject: [PATCH 15/24] Strip trailing whitespace. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ded281e4a..fb988df1c 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Ongoing discussion: More general info and updates about the project can be found on: [Our blog](http://joindiaspora.com), -[and on Twitter](http://twitter.com/joindiaspora). +[and on Twitter](http://twitter.com/joindiaspora). Also, be sure to join the official [mailing list](http://http://eepurl.com/Vebk). If you wish to contact us privately about any exploits in Diaspora you may From 7dc813a15aa711811e4e0fadc5f0e7524b8223de Mon Sep 17 00:00:00 2001 From: Pistos Date: Fri, 24 Sep 2010 11:24:01 +0800 Subject: [PATCH 16/24] Added a newline before a list, so that the list can be properly interpreted as a list (Markdown syntax). --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fb988df1c..97ec66834 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ file [bug reports](https://github.com/diaspora/diaspora/issues) right here on github. Ongoing discussion: + - [Diaspora Developer Google Group](http://groups.google.com/group/diaspora-dev) - [Diaspora Discussion Google Group](http://groups.google.com/group/diaspora-discuss) - [Diaspora Q&A site](http://diaspora.shapado.com/) From b9bff760542328dc0fd3dfb9ebee529abfdcbb53 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 24 Sep 2010 09:49:42 -0700 Subject: [PATCH 17/24] Initial 1.9.2, specs fail (possibly validatable), need to pull in aredridel photo fixes --- Gemfile | 1 - Gemfile.lock | 2 -- app/models/user.rb | 15 --------------- 3 files changed, 18 deletions(-) diff --git a/Gemfile b/Gemfile index 2b3cd008c..2155262cb 100644 --- a/Gemfile +++ b/Gemfile @@ -47,7 +47,6 @@ group :test do gem 'rspec-rails', '2.0.0.beta.17' gem 'mocha' gem 'webrat', '0.7.2.beta.1' - gem 'redgreen' gem 'autotest' gem 'database_cleaner' gem 'saucelabs-adapter', '= 0.8.12' diff --git a/Gemfile.lock b/Gemfile.lock index ecee78c77..4a0be2e30 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -180,7 +180,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) @@ -252,7 +251,6 @@ DEPENDENCIES pubsubhubbub rails (= 3.0.0) redfinger! - redgreen roxml! rspec (>= 2.0.0.beta.17) rspec-rails (= 2.0.0.beta.17) diff --git a/app/models/user.rb b/app/models/user.rb index c1aebfd53..c6957ff6d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - require File.expand_path('../../../lib/diaspora/user/friending', __FILE__) require File.expand_path('../../../lib/diaspora/user/querying', __FILE__) require File.expand_path('../../../lib/diaspora/user/receiving', __FILE__) @@ -258,20 +257,6 @@ class User aspect(:name => "Family") aspect(:name => "Work") end -<<<<<<< HEAD - - def self.create(opts ={}) - puts opts.inspect - end - - def terse_url - terse = self.url.gsub(/(https?:|www\.)\/\//, '') - terse = terse.chop! if terse[-1, 1] == '/' - terse - end -======= - ->>>>>>> master def diaspora_handle "#{self.username}@#{APP_CONFIG[:terse_pod_url]}" From 40120bb441a733d566e83fb35d5bc76a61e25c6d Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 24 Sep 2010 11:15:39 -0700 Subject: [PATCH 18/24] Moving to activemodel validations --- Gemfile | 3 +-- Gemfile.lock | 17 +++++------------ app/models/photo.rb | 16 ++++++++++------ 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/Gemfile b/Gemfile index 2155262cb..cf863eb43 100644 --- a/Gemfile +++ b/Gemfile @@ -8,8 +8,7 @@ gem 'bundler', '1.0.0' gem 'devise', :git => 'http://github.com/BadMinus/devise.git' #Mongo -gem 'mongo_mapper', '0.8.4', :git => 'http://github.com/jnunemaker/mongomapper.git' -gem 'jnunemaker-validatable', '1.8.4', :git => 'http://github.com/jnunemaker/validatable.git' +gem 'mongo_mapper', :branch => 'rails3', :git => 'http://github.com/jnunemaker/mongomapper.git' gem 'bson_ext', '1.0.7' gem 'bson', '1.0.7' diff --git a/Gemfile.lock b/Gemfile.lock index 4a0be2e30..ac66e59c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,20 +57,14 @@ GIT GIT remote: http://github.com/jnunemaker/mongomapper.git - revision: 931dab779011aa7acf60c1a4c7ad19e1ba838345 + revision: b0eac421ef5b3bee782e15d391eca372a189d414 + branch: rails3 specs: mongo_mapper (0.8.4) - activesupport (>= 2.3.4) - jnunemaker-validatable (~> 1.8.4) + activemodel (~> 3.0.0) + activesupport (~> 3.0.0) plucky (~> 0.3.5) -GIT - remote: http://github.com/jnunemaker/validatable.git - revision: 8d7c3ce14133760e748a0e34b99dfe6ec4d69153 - specs: - jnunemaker-validatable (1.8.4) - activesupport (>= 2.3.4) - GEM remote: http://rubygems.org/ specs: @@ -241,12 +235,11 @@ DEPENDENCIES em-websocket factory_girl_rails haml - jnunemaker-validatable (= 1.8.4)! json magent! mini_magick mocha - mongo_mapper (= 0.8.4)! + mongo_mapper! nifty-generators pubsubhubbub rails (= 3.0.0) diff --git a/app/models/photo.rb b/app/models/photo.rb index 8792911f3..fbab51ea5 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -2,7 +2,13 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - +class PhotoAlbumValidator < ActiveModel::Validator + def validate(document) + unless document.album.person_id == document.person_id + document.errors[:base] << "You post photos to that album" + end + end +end class Photo < Post require 'carrierwave/orm/mongomapper' include MongoMapper::Document @@ -22,7 +28,7 @@ class Photo < Post timestamps! validates_presence_of :album - validates_true_for :album_id, :logic => lambda {self.validate_album_person} + validates_with PhotoAlbumValidator before_destroy :ensure_user_picture @@ -36,10 +42,6 @@ class Photo < Post photo end - def validate_album_person - album.person_id == person_id - end - def remote_photo image.url.nil? ? (remote_photo_path + '/' + remote_photo_name) : image.url end @@ -70,3 +72,5 @@ class Photo < Post {:thumb_url => url(:thumb_medium), :id => id, :album_id => album_id} end end + + From 19199dabfe2a21a5f4e8a6a02624febd02d74d8c Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 24 Sep 2010 11:49:30 -0700 Subject: [PATCH 19/24] fix spec_helper for 1.9.2 --- spec/lib/diaspora_parser_spec.rb | 3 ++- spec/misc_spec.rb | 21 +++++++++++++++++++++ spec/models/aspect_spec.rb | 10 +++++----- spec/spec_helper.rb | 5 +++++ 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/spec/lib/diaspora_parser_spec.rb b/spec/lib/diaspora_parser_spec.rb index cdd1063ab..3f4e20b1e 100644 --- a/spec/lib/diaspora_parser_spec.rb +++ b/spec/lib/diaspora_parser_spec.rb @@ -103,7 +103,7 @@ describe Diaspora::Parser do it "should activate the Person if I initiated a request to that url" do request = @user.send_friend_request_to( @user2.person, @aspect) - + @user.reload request.reverse_for @user2 xml = request.to_diaspora_xml @@ -125,6 +125,7 @@ describe Diaspora::Parser do it 'should process retraction for a person' do person_count = Person.all.count request = @user.send_friend_request_to( @user2.person, @aspect) + @user.reload request.reverse_for @user2 xml = request.to_diaspora_xml diff --git a/spec/misc_spec.rb b/spec/misc_spec.rb index 14f1d4c3e..d03300211 100644 --- a/spec/misc_spec.rb +++ b/spec/misc_spec.rb @@ -34,4 +34,25 @@ describe 'making sure the spec runner works' do end end + describe '#friend_users' do + before do + @user1 = Factory.create(:user) + @aspect1 = @user1.aspect(:name => "losers") + @user2 = Factory.create(:user) + @aspect2 = @user2.aspect(:name => "bruisers") + friend_users(@user1, @aspect1, @user2, @aspect2) + @user1.reload + @aspect1.reload + @user2.reload + @aspect2.reload + end + + it 'makes the first user friends with the second' do + @aspect1.people.include?(@user2.person).should be_true + end + + it 'makes the second user friends with the first' do + @aspect2.people.include?(@user1.person).should be_true + end + end end diff --git a/spec/models/aspect_spec.rb b/spec/models/aspect_spec.rb index 5931970cf..ea5afc7cf 100644 --- a/spec/models/aspect_spec.rb +++ b/spec/models/aspect_spec.rb @@ -20,7 +20,7 @@ describe Aspect do aspect.name.should == "losers" end - it 'should be able to have people' do + it 'should be creatable with people' do aspect = @user.aspect(:name => 'losers', :people => [@friend, @friend_2]) aspect.people.size.should == 2 end @@ -156,16 +156,16 @@ describe Aspect do @user.receive message.to_diaspora_xml @aspect.reload - @aspect.posts.count.should be 1 - @aspect3.posts.count.should be 0 + @aspect.posts.count.should == 1 + @aspect3.posts.count.should == 0 @user.reload @user.move_friend(:friend_id => @user2.person.id, :from => @aspect.id, :to => @aspect3.id) @aspect.reload @aspect3.reload - @aspect3.posts.count.should be 1 - @aspect.posts.count.should be 0 + @aspect3.posts.count.should == 1 + @aspect.posts.count.should == 0 end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3fdac9810..ef5db93c2 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -82,7 +82,12 @@ end def friend_users(user1, aspect1, user2, aspect2) request = user1.send_friend_request_to(user2.person, aspect1) reversed_request = user2.accept_friend_request( request.id, aspect2.id) + user1.reload user1.receive reversed_request.to_diaspora_xml + user1.reload + aspect1.reload + user2.reload + aspect2.reload end def stub_success(address = 'abc@example.com') From 5c32cbaee8583ae9d651c7c72c58d4c426bac44e Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 24 Sep 2010 14:40:30 -0700 Subject: [PATCH 20/24] Fix requires in rake task --- lib/tasks/db.rake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index c0d289cda..9c438ddb1 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -9,17 +9,17 @@ namespace :db do namespace :seed do task :tom do puts "Seeding the database for #{Rails.env}..." - require 'db/seeds/tom' + require File.dirname(__FILE__) + '/../../db/seeds/tom' end task :dev do puts "Seeding the database for #{Rails.env}..." - require 'db/seeds/dev' + require File.dirname(__FILE__) + '/../../db/seeds/dev' end task :backer do puts "Seeding the database for #{Rails.env}..." - require 'db/seeds/backer' + require File.dirname(__FILE__) + '/../../db/seeds/backer' create end @@ -27,7 +27,7 @@ namespace :db do desc 'Delete the collections in the current RAILS_ENV database' task :purge do - require 'config/environment' + require File.dirname(__FILE__) + '/../../config/environment' puts "Purging the database for #{Rails.env}..." @@ -57,7 +57,7 @@ namespace :db do task :fix_diaspora_handle do puts "fixing the people in this seed" - require 'config/environment' + require File.dirname(__FILE__) + '/../../config/environment' Person.where(:url => 'example.org').all.each{|person| if person.owner person.url = APP_CONFIG[:pod_url] From 1f62f910e34b5a9e0e036ba13213c5dae39724b6 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 24 Sep 2010 14:43:23 -0700 Subject: [PATCH 21/24] fix requires in db seeds --- db/seeds.rb | 2 +- db/seeds/backer.rb | 4 ++-- db/seeds/dev.rb | 2 +- db/seeds/tom.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index 29a5191f4..a21966266 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -12,5 +12,5 @@ # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) # Mayor.create(:name => 'Daley', :city => citie -require 'config/environment' +require File.dirname(__FILE__) + '/../../config/environment' diff --git a/db/seeds/backer.rb b/db/seeds/backer.rb index 20fe90fdf..b80fd794b 100644 --- a/db/seeds/backer.rb +++ b/db/seeds/backer.rb @@ -12,7 +12,7 @@ # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) # Mayor.create(:name => 'Daley', :city => citie -require 'config/environment' +require File.dirname(__FILE__) + '/../../config/environment' def create @@ -25,7 +25,7 @@ def create #set pod url username = backer_info[backer_number]['username'].gsub(/ /,'').downcase set_app_config username - require 'config/initializers/_load_app_config.rb' + require File.dirname(__FILE__) + '/../../config/initializers/_load_app_config.rb' # Create seed user user = User.instantiate!(:email => "#{username}@#{username}.joindiaspora.com", diff --git a/db/seeds/dev.rb b/db/seeds/dev.rb index e2d8a5495..dcbca72aa 100644 --- a/db/seeds/dev.rb +++ b/db/seeds/dev.rb @@ -4,7 +4,7 @@ -require 'config/environment' +require File.dirname(__FILE__) + '/../../config/environment' def set_app_config username current_config = YAML.load(File.read(Rails.root.join('config', 'app_config.yml.example'))) diff --git a/db/seeds/tom.rb b/db/seeds/tom.rb index cc3000d0b..468667485 100644 --- a/db/seeds/tom.rb +++ b/db/seeds/tom.rb @@ -4,7 +4,7 @@ -require 'config/environment' +require File.dirname(__FILE__) + '/../../config/environment' def set_app_config username current_config = YAML.load(File.read(Rails.root.join('config', 'app_config.yml.example'))) From ae7c869bc35893e60bbb236442343252dde70173 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 24 Sep 2010 15:01:36 -0700 Subject: [PATCH 22/24] Add specs for album controller failure --- spec/controllers/albums_controller_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/controllers/albums_controller_spec.rb b/spec/controllers/albums_controller_spec.rb index 67b7d9a78..e8ea44479 100644 --- a/spec/controllers/albums_controller_spec.rb +++ b/spec/controllers/albums_controller_spec.rb @@ -20,4 +20,14 @@ describe AlbumsController do @album.reload.name.should eql("new_name") end + describe '#create' do + it 'all aspects' do + params = {"album" => {"name" => "Sunsets","to" => "all"}} + post :create, params + end + it 'one aspect' do + params = {"album" => {"name" => "Sunsets","to" => @aspect.id.to_s}} + post :create, params + end + end end From 004e659ee1d9a814ffeb5f05186da2592e4189ea Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 24 Sep 2010 15:10:49 -0700 Subject: [PATCH 23/24] fix album posting --- app/models/user.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index c6957ff6d..272f404bc 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -128,14 +128,18 @@ class User end def validate_aspect_permissions(aspect_ids) - aspect_ids = [aspect_ids.to_s] if aspect_ids.is_a? BSON::ObjectId + if aspect_ids == "all" + return aspect_ids + end + + aspect_ids = [aspect_ids.to_s] unless aspect_ids.is_a? Array if aspect_ids.nil? || aspect_ids.empty? raise ArgumentError.new("You must post to someone.") end aspect_ids.each do |aspect_id| - unless aspect_id == "all" || self.aspects.find(aspect_id) + unless self.aspects.find(aspect_id) raise ArgumentError.new("Cannot post to an aspect you do not own.") end end From 999d2292257e323aa478be78a2bdd57c5d8d9f75 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 24 Sep 2010 15:18:30 -0700 Subject: [PATCH 24/24] Post photos in either 1.8.7 or 1.9.2 --- app/controllers/photos_controller.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index d66706626..0866751d0 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -19,9 +19,15 @@ class PhotosController < ApplicationController # get file content type att_content_type = (request.content_type.to_s == "") ? "application/octet-stream" : request.content_type.to_s # create temporal file - file = Tempfile.new(file_name, {:encoding => 'BINARY'}) + begin + file = Tempfile.new(file_name, {:encoding => 'BINARY'}) + file.print request.raw_post.force_encoding('BINARY') + rescue RuntimeError => e + raise e unless e.message.include?('cannot generate tempfile') + file = Tempfile.new(file_name) # Ruby 1.8 compatibility + file.print request.raw_post + end # put data into this file from raw post request - file.print request.raw_post.force_encoding('BINARY') # create several required methods for this temporal file Tempfile.send(:define_method, "content_type") {return att_content_type}