diff --git a/.gitignore b/.gitignore
index bbd4cefb8..90ed99d1f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@ gpg/*/random_seed
public/uploads/*
.rvmrc
.DS_Store
+config/app_config.yml
diff --git a/COPYRIGHT b/COPYRIGHT
index c1e5ed876..f1bed1a6b 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1 +1,23 @@
-Diaspora is copyright Diaspora Inc., 2010, and files herein are licensed under the Affero General Public License version 3, the text of which can be found in GNU-AGPL-3.0, unless otherwise noted. Components of Diaspora, including Rails, JQuery, and Devise, are licensed under the MIT/X11 license. Blueprint-CSS is licensed under a modified version of the MIT/X11 license. All unmodified files from these and other sources retain their original copyright and license notices: see the relevant individual files. Attribution information for Diaspora is contained in the AUTHORS file.
+Diaspora is copyright Diaspora Inc., 2010, and files herein are licensed
+under the Affero General Public License version 3, the text of which can
+be found in GNU-AGPL-3.0, or any later version of the AGPL, unless otherwise
+noted. Components of Diaspora, including Rails, JQuery, and Devise, are
+licensed under the MIT/X11 license. Blueprint-CSS is licensed under a
+modified version of the MIT/X11 license. All unmodified files from these
+and other sources retain their original copyright and license notices: see
+the relevant individual files. Attribution information for Diaspora is
+contained in the AUTHORS file.
+
+In addition, as a special exception, the copyright holders give
+permission to link the code of portions of this program with the
+OpenSSL library under certain conditions as described in each
+individual source file, and distribute linked combinations
+including the two.
+
+You must obey the GNU Affero General Public License V3 or later in all respects
+for all of the code used other than OpenSSL or the components mentioned
+above. If you modify file(s) with this exception, you may extend this
+exception to your version of the file(s), but you are not obligated to
+do so. If you do not wish to do so, delete this exception statement from your
+version. If you delete this exception statement from all source files in the
+program, then also delete it here.
diff --git a/Gemfile b/Gemfile
index 77627808d..adc4431aa 100644
--- a/Gemfile
+++ b/Gemfile
@@ -28,13 +28,20 @@ gem 'redfinger', :git => 'git://github.com/rsofaer/redfinger.git'
#EventMachine
gem 'em-http-request',:git => 'git://github.com/igrigorik/em-http-request.git', :require => 'em-http'
-gem 'em-websocket'
gem 'thin'
+#Websocket
+gem 'em-websocket'
+gem 'magent', :git => 'http://github.com/dcu/magent.git'
+
#File uploading
gem 'carrierwave', :git => 'git://github.com/rsofaer/carrierwave.git' , :branch => 'master' #Untested mongomapper branch
gem 'mini_magick'
+#sinatra
+gem 'sinatra', '1.0'
+gem 'async_sinatra'
+
group :test, :development do
gem 'factory_girl_rails'
end
diff --git a/Gemfile.lock b/Gemfile.lock
index 007810850..abad54828 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -47,6 +47,14 @@ GIT
bcrypt-ruby (~> 2.1.2)
warden (~> 0.10.7)
+GIT
+ remote: http://github.com/dcu/magent.git
+ revision: 06513f3dac812469a55f2e365c349af4d2abc92a
+ specs:
+ magent (0.4.2)
+ mongo (>= 0.1.0)
+ uuidtools (>= 2.0.0)
+
GIT
remote: http://github.com/jnunemaker/mongomapper.git
revision: 931dab779011aa7acf60c1a4c7ad19e1ba838345
@@ -96,6 +104,8 @@ 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)
@@ -204,6 +214,8 @@ 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)
@@ -213,6 +225,7 @@ GEM
treetop (1.4.8)
polyglot (>= 0.3.1)
tzinfo (0.3.23)
+ uuidtools (2.1.1)
warden (0.10.7)
rack (>= 1.0.0)
webmock (1.3.5)
@@ -229,6 +242,7 @@ PLATFORMS
DEPENDENCIES
addressable
+ async_sinatra
autotest
bson (= 1.0.7)
bson_ext (= 1.0.7)
@@ -242,6 +256,7 @@ DEPENDENCIES
haml
jnunemaker-validatable (= 1.8.4)!
json
+ magent!
mini_magick
mocha
mongo_mapper (= 0.8.4)!
@@ -256,6 +271,7 @@ DEPENDENCIES
ruby-debug
saucelabs-adapter (= 0.8.12)
selenium-rc
+ sinatra (= 1.0)
sprinkle!
thin
webmock
diff --git a/README.md b/README.md
index c12f989bf..d215f5e98 100644
--- a/README.md
+++ b/README.md
@@ -1,39 +1,85 @@
## Commit Guidlines
-You are welcome to contribute, add and extend Diaspora however you see fit. We will do our best to incorporate everything that meets our guidelines.
-We need you to fill out a [contributor agreement form](https://spreadsheets.google.com/a/joindiaspora.com/viewform?formkey=dGI2cHA3ZnNHLTJvbm10LUhXRTJjR0E6MQ&theme=0AX42CRMsmRFbUy1iOGYwN2U2Mi1hNWU0LTRlNjEtYWMyOC1lZmU4ODg1ODc1ODI&ifq) before we can accept your patches. The agreement gives Diaspora joint ownership of the patch so the copyright isn't scattered. You can find it [here](https://spreadsheets.google.com/a/joindiaspora.com/viewform?formkey=dGI2cHA3ZnNHLTJvbm10LUhXRTJjR0E6MQ&theme=0AX42CRMsmRFbUy1iOGYwN2U2Mi1hNWU0LTRlNjEtYWMyOC1lZmU4ODg1ODc1ODI&ifq).
+You are welcome to contribute, add to and extend Diaspora however you see fit. We
+will do our best to incorporate everything that meets our guidelines.
-All commits must be tested, and after each commit, all tests should be green before a pull request is sent. Please write your tests in Rspec or Test-Unit.
+We need you to fill out a
+[contributor agreement form](https://spreadsheets.google.com/a/joindiaspora.com/viewform?formkey=dGI2cHA3ZnNHLTJvbm10LUhXRTJjR0E6MQ&theme=0AX42CRMsmRFbUy1iOGYwN2U2Mi1hNWU0LTRlNjEtYWMyOC1lZmU4ODg1ODc1ODI&ifq)
+before we can accept your patches. The agreement gives Diaspora joint
+ownership of the patch so the copyright isn't scattered. You can find it
+[here](https://spreadsheets.google.com/a/joindiaspora.com/viewform?formkey=dGI2cHA3ZnNHLTJvbm10LUhXRTJjR0E6MQ&theme=0AX42CRMsmRFbUy1iOGYwN2U2Mi1hNWU0LTRlNjEtYWMyOC1lZmU4ODg1ODc1ODI&ifq).
-GEMS: We would like to keep external dependencies unduplicated. We're using Nokogiri, and Mongomapper, and EM::HttpRequest as much as possible. We have a few gems in the project we'd rather not use, but if you can, use dependencies we already have.
+All commits must be tested, and after each commit, all tests should be green
+before a pull request is sent. Please write your tests in Rspec.
+
+GEMS: We would like to keep external dependencies unduplicated. We're using
+Nokogiri, Mongomapper, and EM::HttpRequest as much as possible. We have a few
+gems in the project we'd rather not use, but if you can, use dependencies we
+already have.
# Diaspora
-The privacy aware, personally controlled, do-it-all, open source social network.
+The privacy aware, personally controlled, do-it-all, open source social
+network.
**DISCLAIMER: THIS IS PRE-ALPHA SOFTWARE AND SHOULD BE TREATED ACCORDINGLY.**
-These instructions are for machines running [Ubuntu](http://www.ubuntu.com/), [Fedora](http://www.fedoraproject.org) or Mac OS X. We are developing Diaspora for the latest and greatest browsers, so please update your Firefox, Chrome or Safari to the latest and greatest.
+**PLEASE, DO NOT RUN IN PRODUCTION. IT IS FUN TO GET RUNNING, BUT EXPECT THINGS
+TO BE BROKEN**
+
+We are continuing to build features and improve the code base.
+When we think it is ready for general use, we will post more detailed
+instructions.
+
+## Notice
+
+We currently run Diaspora with the [thin](http://code.macournoyer.com/thin/) as
+our webserver, behind [nginx](http://wiki.nginx.org/Main). Diaspora uses an
+asynchronous [EventMachine](http://rubyeventmachine.com/) queue inside the appserver
+to send messages between seeds. If you use mod_rails, mongrel, or another
+non-eventmachine based application server, federation may not work.
+
+If you don't like thin, you can always try
+[Rainbows!](http://rainbows.rubyforge.org/) We will try to fully support more
+webservers later, but that is what works for now.
+
+These instructions are for machines running [Ubuntu](http://www.ubuntu.com/),
+[Fedora](http://www.fedoraproject.org) or Mac OS X. We are developing Diaspora
+for the latest and greatest browsers, so please update your Firefox, Chrome or
+Safari to the latest and greatest.
## Preparing your system
-In order to run Diaspora, you will need to download the following dependencies (specific instructions follow):
+
+In order to run Diaspora, you will need to download the following dependencies
+(specific instructions follow):
- Build Tools - Packages needed to compile the components that follow.
-- [Ruby](http://www.ruby-lang.org) - The Ruby programming language. (We're using **1.8.7**. It comes preinstalled on Mac OS X.)
+- [Ruby](http://www.ruby-lang.org) - The Ruby programming language.
+ (We're using **1.8.7**. It comes preinstalled on Mac OS X.)
- [MongoDB](http://www.mongodb.org) - A snappy noSQL database.
-- [OpenSSL](http://www.openssl.org/) - An encryption library. (It comes preinstalled on Mac OS X and Ubuntu.)
-- [ImageMagick](http://www.imagemagick.org/) - An Image processing library used to resize uploaded photos.
+- [OpenSSL](http://www.openssl.org/) - An encryption library.
+ (It comes preinstalled on Mac OS X and Ubuntu.)
+- [ImageMagick](http://www.imagemagick.org/) - An Image processing library used
+ to resize uploaded photos.
- [Git](http://git-scm.com/) - The fast version control system.
-After you have Ruby installed on your system, you will need to get RubyGems, then install Bundler:
+After you have Ruby installed on your system, you will need to get RubyGems,
+then install Bundler:
- [RubyGems](http://rubygems.org/) - Source for Ruby gems.
- [Bundler](http://gembundler.com/) - Gem management tool for Ruby projects.
-**We suggest using a package management system to download these dependencies. Trust us, it's going to make your life a lot easier. If you're using Mac OS X, you can use [homebrew](http://mxcl.github.com/homebrew/); if you're using Ubuntu, just use [Synaptic](http://www.nongnu.org/synaptic/) (it comes pre-installed); if you're using Fedora simply use [yum](http://yum.baseurl.org/). The instructions below assume you have these installed.**
+**We suggest using a package management system to download these dependencies.
+Trust us, it's going to make your life a lot easier. If you're using Mac OS X,
+you can use [homebrew](http://mxcl.github.com/homebrew/); if you're using
+Ubuntu, just use [Synaptic](http://www.nongnu.org/synaptic/) (it comes
+pre-installed); if you're using Fedora simply use
+[yum](http://yum.baseurl.org/). The instructions below assume you have these
+installed.**
### Build Tools
-To install build tools on **Ubuntu**, run the following (includes the gcc and xml parsing dependencies):
+To install build tools on **Ubuntu**, run the following (includes the gcc and
+xml parsing dependencies):
sudo apt-get install build-essential libxslt1.1 libxslt1-dev libxml2
@@ -41,7 +87,8 @@ To install build tools on **Fedora**, run the following:
sudo yum install libxslt libxslt-devel libxml2 libxml2-devel
-To install build tools on **Mac OS X**, you need to download and install [Xcode](http://developer.apple.com/technologies/tools/xcode.html).
+To install build tools on **Mac OS X**, you need to download and install
+[Xcode](http://developer.apple.com/technologies/tools/xcode.html).
### Ruby
@@ -49,56 +96,57 @@ To install Ruby 1.8.7 on **Ubuntu**, run the following command:
sudo apt-get install ruby-full
-At this time Fedora does not have Ruby 1.8.7. As a workaround it is possible to use [rvm](http://rvm.beginrescueend.com/) with a locally compiled Ruby installation. A semi automated method for doing this is available. It is highly recommended that you review the script before running it so you understand what will occur. The script can be executed by running the following command:
+Please note that you need to have Universe enabled in your
+/etc/apt/sources.list file to install ruby using apt-get.
+
+At this time Fedora does not have Ruby 1.8.7. As a workaround it is possible to
+use [rvm](http://rvm.beginrescueend.com/) with a locally compiled Ruby
+installation. A semi automated method for doing this is available. It is
+highly recommended that you review the script before running it so you
+understand what will occur. The script can be executed by running the
+following command:
./script/bootstrap-fedora-diaspora.sh
-After reviewing and executing the above script you will need to follow the "MongoDB" section and then you should skip all the way down to "Start Mongo".
-
+After reviewing and executing the above script you will need to follow the
+"MongoDB" section and then you should skip all the way down to "Start Mongo".
If you're on **Mac OS X**, you already have Ruby on your system. Yay!
### MongoDB
-To install MongoDB on **Ubuntu**, add the official MongoDB repository from this link:
+To install MongoDB on **Fedora**, use the official repositories
-http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages
+ sudo yum install mongodb-server
-For Lucid, add the following line to your /etc/apt/sources.list:
+Ensure that the server is started at system reboot:
+
+ sudo chkconfig mongod on
+
+To install MongoDB on **Ubuntu**, add the official MongoDB repository
+[here](http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages).
+
+For Lucid, add the following line to your /etc/apt/sources.list (for other
+distros, see http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages):
deb http://downloads.mongodb.org/distros/ubuntu 10.4 10gen
-And then run:
+Then run:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
sudo apt-get update
sudo apt-get install mongodb-stable
You can also run the binary directly by doing the following:
-If you're running a 32-bit system, run `wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz`. If you're running a 64-bit system, run `wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.6.2.tgz`.
+If you're running a 32-bit system, run:
- # extract
- tar xzf mongodb-linux-i686-1.4.0.tgz
- # create the required data directory
- sudo mkdir -p /data/db
- sudo chmod -Rv 777 /data/
-
+ wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz
-To install MongoDB on a x86_64 **Fedora** system, add the official MongoDB repository from MongoDB (http://www.mongodb.org/display/DOCS/CentOS+and+Fedora+Packages) into /etc/yum.repos.d/10gen.repo:
+If you're running a 64-bit system, run:
- [10gen]
- name=10gen Repository
- baseurl=http://downloads.mongodb.org/distros/fedora/13/os/x86_64/
- gpgcheck=0
- enabled=1
+ wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.6.2.tgz
-
-Then use yum to install the packages:
-
- sudo yum install mongo-stable mongo-stable-server
-
-
-If you're running a 32-bit system, run `wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz`. If you're running a 64-bit system, run `wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.6.2.tgz`.
+Then run:
# extract
tar xzf mongodb-linux-i686-1.4.0.tgz
@@ -110,10 +158,13 @@ If you're running a 32-bit system, run `wget http://fastdl.mongodb.org/linux/mon
To install MongoDB on **Mac OS X**, run the following:
brew install mongo
+ sudo mkdir -p /data/db
+ sudo chmod -Rv 777 /data/
### OpenSSL
-If you're running either **Ubuntu**, **Fedora** or **Mac OS X** you already have OpenSSL installed!
+If you're running either **Ubuntu**, **Fedora** or **Mac OS X** you already
+have OpenSSL installed!
### ImageMagick
@@ -132,11 +183,11 @@ To install ImageMagick on **Mac OS X**, run the following:
### Git
To install Git on **Ubuntu**, run the following:
-
+
sudo apt-get install git-core
To install Git on **Fedora**, run the following:
-
+
sudo yum install git
@@ -147,78 +198,123 @@ To install Git on **Mac OS X**, run the following:
### Rubygems
-On **Ubuntu**, run the following:
+On **Ubuntu** 10.04, run the following:
- wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
- tar -xf rubygems-1.3.7.tgz
- cd rubygems-1.3.7
- sudo ruby setup.rb
- sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
+ sudo add-apt-repository ppa:maco.m/ruby
+ sudo apt-get update
+ sudo apt-get install rubygems
+
+This PPA is maintained by an Ubuntu Developer. For Ubuntu 10.10, this version
+of rubygems is in the repositories.
On **Fedora**, run the following:
sudo yum install rubygems
-On **Mac OS X**, RubyGems comes preinstalled; however, you might need to update it for use with the latest Bundler. To update RubyGems, run `sudo gem update --system`.
+On **Mac OS X**, RubyGems comes preinstalled; however, you might need to update
+it for use with the latest Bundler. To update RubyGems, run `sudo gem update
+--system`.
### Bundler
-After RubyGems is updated, simply run `sudo gem install bundler` to get Bundler.
+After RubyGems is updated, simply run `sudo gem install bundler` to get
+Bundler. If you're using Ubuntu repository .debs, bundler is found at
+/var/lib/gems/1.8/bin/bundle
## Getting Diaspora
git clone http://github.com/diaspora/diaspora.git
-If you have never used github before, their [help desk](http://help.github.com/) has a pretty awesome guide on getting setup.
+If you have never used github before, their
+[help desk](http://help.github.com/) has a pretty awesome guide on getting
+setup.
## Running Diaspora
### Install required gems
-To start the app server for the first time, you need to use Bundler to install Diaspora's gem depencencies. Run `bundle install` from Diaspora's root directory. Bundler will also warn you if there is a new dependency and you need to bundle install again.
+
+To start the app server for the first time, you need to use Bundler to install
+Diaspora's gem depencencies. Run `bundle install` from Diaspora's root
+directory. Bundler will also warn you if there is a new dependency and you
+need to bundle install again.
### Start Mongo
-If you installed the Ubuntu package, MongoDB should already be running (if not, run `service mongodb start`). If you installed the binary manually, run `sudo mongod` from where mongo is installed to start mongo.
-If you installed the Fedora package, MongoDB will need to be started via `service mongodb start`. If you installed the binary manually, run `sudo mongod` from where mongo is installed to start mongo.
+If you installed the Ubuntu package, MongoDB should already be running (if not,
+run `service mongodb start`). If you installed the binary manually, run `sudo
+mongod` from where mongo is installed to start mongo.
-If you installed the OsX package through "brew", MongoDB will need to be started via `sudo launchctl load /Library/LaunchDaemons/org.mongodb.mongod.plist`. (before you have to go to /Library/LaunchDaemons and add a symlink to /usr/local/Cellar/mongodb/1.6.2-x86_64/org.mongodb.mongod.plist)
+If you installed the Fedora package, MongoDB will need to be started via
+`service mongod start`. If you installed the binary manually, run `sudo
+mongod` from where Mongo is installed to start Mongo.
-Diaspora will not run unless mongo is running. Mongo will not run by default, and will need to be started every time you wish to use or run the test suite for Diaspora.
+If you installed the OsX package through "brew", MongoDB will need to be
+started via `sudo launchctl load
+/Library/LaunchDaemons/org.mongodb.mongod.plist`. (before you have to go to
+/Library/LaunchDaemons and add a symlink to
+/usr/local/Cellar/mongodb/1.6.2-x86_64/org.mongodb.mongod.plist)
+
+Diaspora will not run unless Mongo is running. Mongo will not run by default,
+and will need to be started every time you wish to use or run the test suite
+for Diaspora.
+
+### Configure Diaspora
+
+Diaspora needs to know where on the internet it is. Copy config/app_config_example.yml
+to config/app_config.yml, put your url into the url field, and make any other
+needed configuration changes.
+
+### Run the server
+
+`./script/server` will start both thin and the websocket server. If you want
+to run a different app server, you will have to run them separately. See below
+for instructions.
### Run the app server
-Once mongo is running and bundler has finished, run `bundle exec thin start` from the root Diaspora directory. This will start the app server in development mode[.](http://bit.ly/9mwtUw)
-### Logging in
-Run `rake db:seed:tom`, then login with user `tom` and password `evankorth`. More details in db/seeds/tom.rb.
+Once mongo is running and bundler has finished, run `bundle exec thin start`
+from the root Diaspora directory. This will start the app server in
+development mode[.](http://bit.ly/9mwtUw)
+### Run the websocket server
+
+run `bundle exec ruby ./script/websocket_server` to start the websocket server
+on port 8080. Change the port in config/app_config.yml.
+
+### Logging in with a sample user
+
+Run `rake db:seed:tom`, then login with user `tom` and password `evankorth`.
+More details in db/seeds/tom.rb.
### Testing
-Diaspora's test suite uses [rspec](http://rspec.info/), a behavior driven testing framework. In order to run the tests, run `bundle exec rspec spec`.
+
+Diaspora's test suite uses [rspec](http://rspec.info/), a behavior driven
+testing framework. In order to run the tests, run `bundle exec rspec spec`.
## Resources
-We are maintaining a [public tracker project](http://www.pivotaltracker.com/projects/61641) and a [roadmap](https://github.com/diaspora/diaspora/wiki/Roadmap). Also, you can file [bug reports](https://github.com/diaspora/diaspora/issues) right here on github.
+We are maintaining a
+[public tracker project](http://www.pivotaltracker.com/projects/61641)
+and a
+[roadmap](https://github.com/diaspora/diaspora/wiki/Roadmap). Also, you can
+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-dev](irc://irc.freenode.net/#diaspora-dev)
+- [Diaspora Q&A site](http://diaspora.shapado.com/)
+- [#diaspora-dev IRC channel](irc://irc.freenode.net/#diaspora-dev)
+ ([join via the web client](http://webchat.freenode.net?channels=diaspora-dev))
-More general info and updates about the project can be found on our [blog](http://joindiaspora.com), [twitter](http://twitter.com/joindiaspora). Also, be sure to join the official [mailing list](http://http://eepurl.com/Vebk).
-
-If you wish to contact us privately about any exploits in Diaspora you may find, you can email [exploits@joindiaspora.com](mailto:exploits@joindiaspora.com).
-
-
-## License
-Copyright 2010 Diaspora Inc.
-
-Diaspora is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-
-Diaspora is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License along with Diaspora. If not, see .
+More general info and updates about the project can be found on:
+[Our blog](http://joindiaspora.com),
+[and on Twitter](http://twitter.com/joindiaspora).
+Also, be sure to join the official [mailing list](http://http://eepurl.com/Vebk).
+If you wish to contact us privately about any exploits in Diaspora you may
+find, you can email
+[exploits@joindiaspora.com](mailto:exploits@joindiaspora.com).
diff --git a/app/controllers/albums_controller.rb b/app/controllers/albums_controller.rb
index c4bab3d8a..9e4859830 100644
--- a/app/controllers/albums_controller.rb
+++ b/app/controllers/albums_controller.rb
@@ -15,9 +15,12 @@ class AlbumsController < ApplicationController
end
def create
- aspect = params[:album][:to]
- @album = current_user.post(:album, params[:album])
- flash[:notice] = "You've created an album called #{@album.name}."
+ aspect = params[:album][:to]
+
+ data = clean_hash(params[:album])
+
+ @album = current_user.post(:album, data)
+ flash[:notice] = I18n.t 'albums.create.success', :name => @album.name
redirect_to :action => :show, :id => @album.id, :aspect => aspect
end
@@ -26,34 +29,43 @@ class AlbumsController < ApplicationController
end
def destroy
- @album = Album.find_by_id params[:id]
+ @album = current_user.find_visible_post_by_id params[:id]
@album.destroy
- flash[:notice] = "Album #{@album.name} deleted."
+ flash[:notice] = I18n.t 'albums.destroy.success', :name => @album.name
respond_with :location => albums_url
end
def show
@photo = Photo.new
- @album = Album.find_by_id params[:id]
+ @album = current_user.find_visible_post_by_id( params[:id] )
@album_photos = @album.photos
-
respond_with @album
end
def edit
- @album = Album.find_by_id params[:id]
+ @album = current_user.find_visible_post_by_id params[:id]
redirect_to @album unless current_user.owns? @album
end
def update
- @album = Album.find_by_id params[:id]
- if @album.update_attributes params[:album]
- flash[:notice] = "Album #{@album.name} successfully edited."
+ @album = current_user.find_visible_post_by_id params[:id]
+
+ data = clean_hash(params[:album])
+
+ if current_user.update_post( @album, data )
+ flash[:notice] = I18n.t 'albums.update.success', :name => @album.name
respond_with @album
else
- flash[:error] = "Failed to edit album #{@album.name}."
+ flash[:error] = I18n.t 'albums.update.failure', :name => @album.name
render :action => :edit
end
end
+ private
+ def clean_hash(params)
+ return {
+ :name => params[:name],
+ :to => params[:to]
+ }
+ end
end
diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb
index 87c41f097..2bf1edb76 100644
--- a/app/controllers/aspects_controller.rb
+++ b/app/controllers/aspects_controller.rb
@@ -16,7 +16,7 @@ class AspectsController < ApplicationController
def create
@aspect = current_user.aspect params[:aspect]
- flash[:notice] = "Click on the plus on the left side to tell Diaspora who can see your new aspect."
+ flash[:notice] = I18n.t('aspects.create.success')
respond_with :location => aspects_manage_path
end
@@ -25,14 +25,20 @@ class AspectsController < ApplicationController
end
def destroy
- @aspect = Aspect.find_by_id params[:id]
- @aspect.destroy
- flash[:notice] = "You are no longer sharing the aspect called #{@aspect.name}."
- respond_with :location => aspects_url
+ @aspect = current_user.aspect_by_id params[:id]
+
+ begin
+ current_user.drop_aspect @aspect
+ flash[:notice] = i18n.t 'aspects.destroy.success',:name => @aspect.name
+ rescue RuntimeError => e
+ flash[:error] = e.message
+ end
+
+ respond_with :location => aspects_manage_path
end
def show
- @aspect = Aspect.find_by_id params[:id]
+ @aspect = current_user.aspect_by_id params[:id]
@friends = @aspect.people
@posts = current_user.visible_posts( :by_members_of => @aspect ).paginate :per_page => 15, :order => 'created_at DESC'
@@ -41,13 +47,15 @@ class AspectsController < ApplicationController
def manage
@aspect = :manage
- @remote_requests = Request.for_user current_user
+ @remote_requests = Request.for_user(current_user).all
end
def update
- @aspect = Aspect.find_by_id(params[:id])
- @aspect.update_attributes(params[:aspect])
- flash[:notice] = "Your aspect, #{@aspect.name}, has been successfully edited."
+ @aspect = current_user.aspect_by_id(params[:id])
+
+ data = clean_hash(params[:aspect])
+ @aspect.update_attributes( data )
+ flash[:notice] = i18n.t 'aspects.update.success',:name => @aspect.name
respond_with @aspect
end
@@ -55,26 +63,34 @@ class AspectsController < ApplicationController
params[:moves].each{ |move|
move = move[1]
unless current_user.move_friend(move)
- flash[:error] = "Aspect editing failed for friend #{Person.find_by_id( move[:friend_id] ).real_name}."
- redirect_to Aspect.first, :action => "edit"
+ flash[:error] = i18n.t 'aspects.move_friends.failure', :real_name => Person.find_by_id( move[:friend_id] ).real_name
+ redirect_to aspects_manage_path
return
end
}
- flash[:notice] = "Aspects edited successfully."
- redirect_to Aspect.first, :action => "edit"
+ flash[:notice] = i18n.t 'aspects.move_friends.success'
+ redirect_to aspects_manage_path
end
def move_friend
unless current_user.move_friend( :friend_id => params[:friend_id], :from => params[:from], :to => params[:to][:to])
- flash[:error] = "didn't work #{params.inspect}"
+ flash[:error] = I18n.t 'aspects.move_friend.error',:inspect => params.inspect
end
- if aspect = Aspect.first(:id => params[:to][:to])
- flash[:notice] = "You are now showing your friend a different aspect of yourself."
- respond_with aspect
+ if aspect = current_user.aspect_by_id(params[:to][:to])
+ flash[:notice] = I18n.t 'aspects.move_friend.success'
+ render :nothing => true
else
- flash[:notice] = "You are now showing your friend a different aspect of yourself."
- respond_with Person.first(:id => params[:friend_id])
+ flash[:notice] = I18n.t 'aspects.move_friend.failure'
+ render aspects_manage_path
end
end
+
+ private
+ def clean_hash(params)
+ return {
+ :name => params[:name]
+ }
+ end
+
end
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb
index dc115ab5b..fe11cb8ae 100644
--- a/app/controllers/comments_controller.rb
+++ b/app/controllers/comments_controller.rb
@@ -10,16 +10,11 @@ class CommentsController < ApplicationController
respond_to :json, :only => :show
def create
- target = Post.find_by_id params[:comment][:post_id]
+ target = current_user.find_visible_post_by_id params[:comment][:post_id]
text = params[:comment][:text]
@comment = current_user.comment text, :on => target
render :nothing => true
end
- def show
- @comment = Comment.find_by_id params[:id]
- respond_with @comment
- end
-
end
diff --git a/app/controllers/dev_utilities_controller.rb b/app/controllers/dev_utilities_controller.rb
index bcb0dd4f7..30d1a1799 100644
--- a/app/controllers/dev_utilities_controller.rb
+++ b/app/controllers/dev_utilities_controller.rb
@@ -7,24 +7,6 @@ class DevUtilitiesController < ApplicationController
before_filter :authenticate_user!, :except => [:set_backer_number]
include ApplicationHelper
include RequestsHelper
-def warzombie
- render :nothing => true
- if current_user.email == "tom@tom.joindiaspora.com" && StatusMessage.where(:message => "There's a bomb in the lasagna!?").first == nil
- current_user.post(:status_message, :message => "There's a bomb in the lasagna!?")
- current_user.post(:status_message, :message => "xkcd \nhttp://xkcd.com/743/" )
- current_user.post(:status_message, :message => "I switched to Motoroi today, a Motorola Android-based phone, in Korea. Now, I am using Android phones in both the U.S. and Korea", :created_at => Time.now-930)
- current_user.post(:status_message, :message => "I had 5 hours to study for it :-( GREs on Thursday. Wunderbar.", :created_at => Time.now-43990)
- current_user.post(:status_message, :message => "Spotted in toy story 3: google maps, OSX, and windows XP. Two out of three isn't bad.", :created_at => Time.now-4390)
- current_user.post(:status_message, :message => "Reddit\nhttp://reddit.com", :created_at => Time.now-54390)
- current_user.post(:status_message, :message => "Commercials for IE make me SO MAD and my friends just don't get why.", :created_at => Time.now-30900)
- current_user.post(:status_message, :message => "Zombo.com\nhttp://zombo.com", :created_at => Time.now-9090)
- current_user.post(:status_message, :message => "Why do I have \"No More Heroes\" by Westlife on repeat all day?", :created_at => Time.now-590000)
- current_user.post(:status_message, :message => "Mmm. Friday night. Acknowledged.", :created_at => Time.now-503900)
- current_user.post(:status_message, :message => "Getting a universal remote is the epitome of laziness, I do declare.", :created_at => Time.now-4400)
- current_user.post(:status_message, :message => "Does anyone know how to merge two Skype contact entries of the same person? (i.e. one Skype ID and one mobile number)", :created_at => Time.now-400239)
- current_user.post(:status_message, :message => "A cool, cool morning for once.", :created_at => Time.now-150000)
- end
- end
def zombiefriends
render :nothing => true
diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb
index d85c67691..08acdd424 100644
--- a/app/controllers/people_controller.rb
+++ b/app/controllers/people_controller.rb
@@ -22,7 +22,7 @@ class PeopleController < ApplicationController
@profile = @person.profile
@aspects_with_person = current_user.aspects_with_person(@person)
@aspects_dropdown_array = current_user.aspects.collect{|x| [x.to_s, x.id]}
- @posts = current_user.visible_posts_from_others(:from => @person).paginate :page => params[:page], :order => 'created_at DESC'
+ @posts = current_user.visible_posts(:from => @person).paginate :page => params[:page], :order => 'created_at DESC'
@latest_status_message = current_user.raw_visible_posts.find_all_by__type_and_person_id("StatusMessage", params[:id]).last
@post_count = @posts.count
respond_with @person
diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb
index cefc8f5d6..3433c0cf4 100644
--- a/app/controllers/photos_controller.rb
+++ b/app/controllers/photos_controller.rb
@@ -10,9 +10,7 @@ class PhotosController < ApplicationController
respond_to :json, :only => :show
def create
-
album = Album.find_by_id params[:album_id]
-
begin
######################## dealing with local files #############
@@ -33,22 +31,26 @@ class PhotosController < ApplicationController
params[:user_file] = file
- @photo = current_user.post(:photo, params)
+
+ data = clean_hash(params)
+
+
+ @photo = current_user.post(:photo, data)
respond_to do |format|
format.json{render(:layout => false , :json => {"success" => true, "data" => @photo}.to_json )}
end
rescue TypeError
- message = "Photo upload failed. Are you sure an image was added?"
+ message = I18n.t 'photos.create.type_error'
respond_with :location => album, :error => message
rescue CarrierWave::IntegrityError
- message = "Photo upload failed. Are you sure that was an image?"
+ message = I18n.t 'photos.create.integrity_error'
respond_with :location => album, :error => message
rescue RuntimeError => e
- message = "Photo upload failed. Are you sure that your seatbelt is fastened?"
+ message = I18n.t 'photos.create.runtime_error'
respond_with :location => album, :error => message
raise e
end
@@ -61,34 +63,55 @@ class PhotosController < ApplicationController
end
def destroy
- @photo = Photo.find_by_id params[:id]
+ @photo = current_user.find_visible_post_by_id params[:id]
+
@photo.destroy
- flash[:notice] = "Photo deleted."
+ flash[:notice] = I18n.t 'photos.destroy.notice'
respond_with :location => @photo.album
end
def show
- @photo = Photo.find_by_id params[:id]
+ @photo = current_user.find_visible_post_by_id params[:id]
@album = @photo.album
-
respond_with @photo, @album
end
def edit
- @photo = Photo.find_by_id params[:id]
+ @photo = current_user.find_visible_post_by_id params[:id]
@album = @photo.album
redirect_to @photo unless current_user.owns? @album
end
def update
- @photo = Photo.find_by_id params[:id]
- if @photo.update_attributes params[:photo]
- flash[:notice] = "Photo successfully updated."
+ @photo = current_user.find_visible_post_by_id params[:id]
+
+ data = clean_hash(params)
+
+ if current_user.update_post( @photo, data[:photo] )
+ flash[:notice] = I18n.t 'photos.update.notice'
respond_with @photo
else
- flash[:error] = "Failed to edit photo."
+ flash[:error] = I18n.t 'photos.update.error'
render :action => :edit
end
end
+
+
+ private
+ def clean_hash(params)
+ if params[:photo]
+ return {
+ :photo => {
+ :caption => params[:photo][:caption],
+ }
+ }
+ else
+ return{
+ :album_id => params[:album_id],
+ :user_file => params[:user_file]
+ }
+ end
+ end
+
end
diff --git a/app/controllers/publics_controller.rb b/app/controllers/publics_controller.rb
index 6f2b09c43..d7f4825de 100644
--- a/app/controllers/publics_controller.rb
+++ b/app/controllers/publics_controller.rb
@@ -10,7 +10,6 @@ class PublicsController < ApplicationController
def hcard
@person = Person.find_by_id params[:id]
- puts @person
unless @person.nil? || @person.owner.nil?
render 'hcard'
end
@@ -33,9 +32,10 @@ class PublicsController < ApplicationController
render :nothing => true
return unless params[:xml]
begin
- @user = Person.first(:id => params[:id]).owner
+ person = Person.first(:id => params[:id])
+ @user = person.owner
rescue NoMethodError => e
- Rails.logger.error("Received post #{params[:xml]} for nonexistent person #{params[:id]}")
+ Rails.logger.error("Received post for nonexistent person #{params[:id]}")
return
end
@user.receive_salmon params[:xml]
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index 8241aa294..b630c6617 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -15,9 +15,7 @@ class RegistrationsController < Devise::RegistrationsController
flash[:error] = e.message
end
if user
- #set_flash_message :notice, :signed_up
- flash[:notice] = "You've joined Diaspora!"
- #redirect_to root_url
+ flash[:notice] = I18n.t 'registrations.create.success'
sign_in_and_redirect(:user, user)
else
redirect_to new_user_registration_path
diff --git a/app/controllers/requests_controller.rb b/app/controllers/requests_controller.rb
index 6087ebe85..44e1a8016 100644
--- a/app/controllers/requests_controller.rb
+++ b/app/controllers/requests_controller.rb
@@ -13,15 +13,15 @@ class RequestsController < ApplicationController
if params[:accept]
if params[:aspect_id]
@friend = current_user.accept_and_respond( params[:id], params[:aspect_id])
- flash[:notice] = "You are now friends."
+ flash[:notice] = I18n.t 'requests.destroy.success'
respond_with :location => current_user.aspect_by_id(params[:aspect_id])
else
- flash[:error] = "Please select an aspect!"
+ flash[:error] = I18n.t 'requests.destroy.error'
respond_with :location => requests_url
end
else
current_user.ignore_friend_request params[:id]
- flash[:notice] = "Ignored friend request."
+ flash[:notice] = I18n.t 'requests.destroy.ignore'
respond_with :location => requests_url
end
end
@@ -37,27 +37,30 @@ class RequestsController < ApplicationController
rel_hash = relationship_flow(params[:request][:destination_url])
rescue Exception => e
raise e unless e.message.include? "not found"
- flash[:error] = "No diaspora seed found with this email!"
+ flash[:error] = I18n.t 'requests.create.error'
respond_with :location => aspect
return
end
+
+
+ # rel_hash = {:friend => params[:friend_handle]}
Rails.logger.debug("Sending request: #{rel_hash}")
begin
@request = current_user.send_friend_request_to(rel_hash[:friend], aspect)
rescue Exception => e
- raise e unless e.message.include? "already friends"
- flash[:notice] = "You are already friends with #{params[:request][:destination_url]}!"
+ raise e unless e.message.include? "already"
+ flash[:notice] = I18n.t 'requests.create.already_friends', :destination_url => params[:request][:destination_url]
respond_with :location => aspect
return
end
if @request
- flash[:notice] = "A friend request was sent to #{@request.destination_url}."
+ flash[:notice] = I18n.t 'requests.create.success',:destination_url => @request.destination_url
respond_with :location => aspect
else
- flash[:error] = "Something went horribly wrong."
+ flash[:error] = I18n.t 'requests.create.horribly_wrong'
respond_with :location => aspect
end
end
diff --git a/app/controllers/sockets_controller.rb b/app/controllers/sockets_controller.rb
index 2852a7160..9b90ea831 100644
--- a/app/controllers/sockets_controller.rb
+++ b/app/controllers/sockets_controller.rb
@@ -14,7 +14,7 @@ class SocketsController < ApplicationController
def outgoing(uid,object,opts={})
@_request = ActionDispatch::Request.new({})
- Diaspora::WebSocket.push_to_user(uid, action_hash(uid, object, opts))
+ Diaspora::WebSocket.queue_to_user(uid, action_hash(uid, object, opts))
end
end
diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb
index 5a588fb99..5a8efbe06 100644
--- a/app/controllers/status_messages_controller.rb
+++ b/app/controllers/status_messages_controller.rb
@@ -11,18 +11,29 @@ class StatusMessagesController < ApplicationController
def create
params[:status_message][:to] = params[:aspect_ids]
- @status_message = current_user.post(:status_message, params[:status_message])
+
+ data = clean_hash params[:status_message]
+
+ @status_message = current_user.post(:status_message, data)
respond_with @status_message
end
def destroy
- @status_message = StatusMessage.find_by_id params[:id]
+ @status_message = current_user.find_visible_post_by_id params[:id]
@status_message.destroy
respond_with :location => root_url
end
def show
- @status_message = StatusMessage.find_by_id params[:id]
+ @status_message = current_user.find_visible_post_by_id params[:id]
respond_with @status_message
end
+
+ private
+ def clean_hash(params)
+ return {
+ :message => params[:message],
+ :to => params[:to]
+ }
+ end
end
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 4a36672bc..dbb69d1a2 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -7,13 +7,6 @@ class UsersController < ApplicationController
before_filter :authenticate_user!, :except => [:new, :create]
respond_to :html
- respond_to :json, :only => :show
-
- def show
- @user = User.find_by_id params[:id]
- @user_profile = @user.person.profile
- respond_with @user
- end
def edit
@user = current_user
@@ -23,15 +16,16 @@ class UsersController < ApplicationController
end
def update
- @user = User.find_by_id params[:id]
- prep_image_url(params[:user])
+ @user = current_user
- @user.update_profile params[:user]
+ data = clean_hash params[:user]
+ prep_image_url(data)
+
+ @user.update_profile data
respond_with(@user, :location => root_url)
end
private
-
def prep_image_url(params)
if params[:profile][:image_url].empty?
params[:profile].delete(:image_url)
@@ -39,4 +33,16 @@ class UsersController < ApplicationController
params[:profile][:image_url] = "http://" + request.host + ":" + request.port.to_s + params[:profile][:image_url]
end
end
+
+ def clean_hash(params)
+ return {
+ :profile =>
+ {
+ :first_name => params[:profile][:first_name],
+ :last_name => params[:profile][:last_name],
+ :image_url => params[:profile][:image_url]
+ }
+ }
+ end
+
end
diff --git a/app/helpers/albums_helper.rb b/app/helpers/albums_helper.rb
index 50b7fbaf7..9a1e78fd1 100644
--- a/app/helpers/albums_helper.rb
+++ b/app/helpers/albums_helper.rb
@@ -6,17 +6,17 @@
module AlbumsHelper
def friends_albums_link
if params[:friends]
- "Friends Albums"
+ I18n.t('albums.helper.friends_albums')
else
- link_to 'Friends Albums', albums_path({:friends => true})
+ link_to I18n.t('albums.helper.friends_albums'), albums_path({:friends => true})
end
end
def your_albums_link
if params[:friends]
- link_to 'Your Albums', albums_path
+ link_to I18n.t('albums.helper.your_albums'), albums_path
else
- 'Your Albums'
+ I18n.t('albums.helper.your_albums')
end
end
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index f2a0a95fd..b6e4c4389 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -4,7 +4,6 @@
module ApplicationHelper
-
def current_aspect?(aspect)
!@aspect.is_a?(Symbol) && @aspect.id == aspect.id
end
@@ -28,7 +27,7 @@ module ApplicationHelper
end
def how_long_ago(obj)
- "#{time_ago_in_words(obj.created_at)} ago."
+ "#{time_ago_in_words(obj.created_at)} ago"
end
def person_url(person)
@@ -38,16 +37,16 @@ module ApplicationHelper
when "Person"
person_path(person)
else
- "unknown person"
+ I18n.t('application.helper.unknown_person')
end
end
def owner_image_tag
- person_image_tag(current_user)
+ person_image_tag(current_user.person)
end
def owner_image_link
- person_image_link(current_user)
+ person_image_link(current_user.person)
end
def person_image_tag(person)
@@ -58,15 +57,18 @@ module ApplicationHelper
end
def person_image_link(person)
- link_to person_image_tag(person), object_path(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
end
def new_request(request_count)
- "new_requests" if request_count > 0
+ I18n.t('application.helper.new_requests') if request_count > 0
end
def post_yield_tag(post)
(':' + post.id.to_s).to_sym
end
-
end
diff --git a/app/helpers/aspects_helper.rb b/app/helpers/aspects_helper.rb
index adceab8fd..536bb8b0b 100644
--- a/app/helpers/aspects_helper.rb
+++ b/app/helpers/aspects_helper.rb
@@ -7,4 +7,12 @@ module AspectsHelper
def link_for_aspect( aspect )
link_to aspect.name, aspect
end
+
+ def remove_link( aspect )
+ if aspect.people.size == 0
+ link_to I18n.t('aspects.helper.remove'), aspect, :method => :delete
+ else
+ "#{I18n.t('aspects.helper.remove')}"
+ end
+ end
end
diff --git a/app/helpers/dashboards_helper.rb b/app/helpers/dashboards_helper.rb
index 542d938ee..271b68253 100644
--- a/app/helpers/dashboards_helper.rb
+++ b/app/helpers/dashboards_helper.rb
@@ -4,8 +4,7 @@
module DashboardsHelper
-
def title_for_page
- 'home'
+ I18n.t('dashboards.helper.home')
end
end
diff --git a/app/helpers/error_messages_helper.rb b/app/helpers/error_messages_helper.rb
index 699070b70..274d60edf 100644
--- a/app/helpers/error_messages_helper.rb
+++ b/app/helpers/error_messages_helper.rb
@@ -7,8 +7,8 @@ module ErrorMessagesHelper
# Render error messages for the given objects. The :message and :header_message options are allowed.
def error_messages_for(*objects)
options = objects.extract_options!
- options[:header_message] ||= "Invalid Fields"
- options[:message] ||= "Correct the following errors and try again."
+ options[:header_message] ||= I18n.t('error_messages.helper.invalid_fields')
+ options[:message] ||= I18n.t('error_messages.helper.correct_the_following_errors_and_try_again')
messages = objects.compact.map { |o| o.errors.full_messages }.flatten
unless messages.empty?
content_tag(:div, :class => "error_messages") do
diff --git a/app/helpers/people_helper.rb b/app/helpers/people_helper.rb
index 37d18d20f..90ffb517d 100644
--- a/app/helpers/people_helper.rb
+++ b/app/helpers/people_helper.rb
@@ -7,9 +7,9 @@ module PeopleHelper
def search_or_index
if params[:q]
- " results for #{params[:q]}"
+ I18n.t 'people.helper.results_for',:params => params[:q]
else
- " people on pod is aware of"
+ I18n.t "people.helper.people_on_pod_are_aware_of"
end
end
diff --git a/app/helpers/photos_helper.rb b/app/helpers/photos_helper.rb
index 2d0ddad6e..2737d3a2d 100644
--- a/app/helpers/photos_helper.rb
+++ b/app/helpers/photos_helper.rb
@@ -4,7 +4,6 @@
module PhotosHelper
-
def linked_scaled_photo(photo, album)
link_to (image_tag photo.url(:scaled_full)), photo_path(album.next_photo(photo)), :rel => "prefetch"
end
diff --git a/app/helpers/publics_helper.rb b/app/helpers/publics_helper.rb
index 9e76f59f7..46e778e2b 100644
--- a/app/helpers/publics_helper.rb
+++ b/app/helpers/publics_helper.rb
@@ -9,7 +9,6 @@ module PublicsHelper
subscriber ||= Subscriber.new(:url => opts[:callback], :topic => opts[:topic])
if subscriber.save
-
if opts[:verify] == 'sync'
204
elsif opts[:verify] == 'async'
diff --git a/app/helpers/requests_helper.rb b/app/helpers/requests_helper.rb
index 32ce79fd9..fec093aac 100644
--- a/app/helpers/requests_helper.rb
+++ b/app/helpers/requests_helper.rb
@@ -4,7 +4,6 @@
module RequestsHelper
-
def subscription_mode(profile)
if diaspora?(profile)
:friend
@@ -39,5 +38,4 @@ module RequestsHelper
end
{ action => person }
end
-
end
diff --git a/app/helpers/sockets_helper.rb b/app/helpers/sockets_helper.rb
index cbe465e7b..69135092a 100644
--- a/app/helpers/sockets_helper.rb
+++ b/app/helpers/sockets_helper.rb
@@ -33,7 +33,4 @@ module SocketsHelper
action_hash.to_json
end
-
-
-
end
diff --git a/app/helpers/status_messages_helper.rb b/app/helpers/status_messages_helper.rb
index ff6c2674a..7c1322762 100644
--- a/app/helpers/status_messages_helper.rb
+++ b/app/helpers/status_messages_helper.rb
@@ -8,7 +8,7 @@ module StatusMessagesHelper
unless @latest_status_message.nil?
return @latest_status_message.message
else
- return "No message to display."
+ return I18n.t('status_messages.helper.no_message_to_display')
end
end
end
diff --git a/app/models/aspect.rb b/app/models/aspect.rb
index 96f94e8fe..b60142671 100644
--- a/app/models/aspect.rb
+++ b/app/models/aspect.rb
@@ -39,5 +39,6 @@ class Aspect
}
}
end
+
end
diff --git a/app/models/person.rb b/app/models/person.rb
index bed5bb246..f2209f0ce 100644
--- a/app/models/person.rb
+++ b/app/models/person.rb
@@ -34,11 +34,9 @@ class Person
validates_format_of :url, :with =>
/^(https?):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\.[a-z]{2,5})?(:[0-9]{1,5})?(\/.*)?$/ix
-
def self.search(query)
- Person.all('$where' => "function() { return this.diaspora_handle.match(/^#{query}/i) ||
- this.profile.first_name.match(/^#{query}/i) ||
- this.profile.last_name.match(/^#{query}/i); }")
+ query = Regexp.escape( query.to_s.strip )
+ Person.all('profile.first_name' => /^#{query}/i) | Person.all('profile.last_name' => /^#{query}/i)
end
def real_name
@@ -79,15 +77,20 @@ class Person
end
def self.by_webfinger( identifier, opts = {})
- local_person = Person.first(:diaspora_handle => identifier.gsub('acct:', ''))
-
+ #need to check if this is a valid email structure, maybe should do in JS
+ local_person = Person.first(:diaspora_handle => identifier.gsub('acct:', '').to_s.downcase)
+
if local_person
+ Rails.logger.info("Do not need to webfinger, found a local person #{local_person.real_name}")
local_person
elsif !identifier.include?("localhost") && !opts[:local]
begin
+ Rails.logger.info("Webfingering #{identifier}")
f = Redfinger.finger(identifier)
rescue SocketError => e
raise "Diaspora server for #{identifier} not found" if e.message =~ /Name or service not known/
+ rescue Errno::ETIMEDOUT => e
+ raise "Connection timed out to Diaspora server for #{identifier}"
end
raise "No webfinger profile found at #{identifier}" if f.nil? || f.links.empty?
Person.from_webfinger_profile(identifier, f )
@@ -101,8 +104,8 @@ class Person
return nil unless public_key_entry
- public_key = public_key_entry.first.href
- new_person.exported_key = Base64.decode64 public_key
+ pubkey = public_key_entry.first.href
+ new_person.exported_key = Base64.decode64 pubkey
guid = profile.links.select{|x| x.rel == 'http://joindiaspora.com/guid'}.first.href
new_person.id = guid
diff --git a/app/models/post.rb b/app/models/post.rb
index e2dd53d3d..e9e135abb 100644
--- a/app/models/post.rb
+++ b/app/models/post.rb
@@ -4,6 +4,7 @@
class Post
+ require 'lib/diaspora/websocket'
require 'lib/encryptable'
include MongoMapper::Document
include ApplicationHelper
@@ -17,7 +18,7 @@ class Post
key :person_id, ObjectId
key :user_refs, Integer, :default => 0
- many :comments, :class_name => 'Comment', :foreign_key => :post_id
+ many :comments, :class_name => 'Comment', :foreign_key => :post_id, :order => 'created_at ASC'
belongs_to :person, :class_name => 'Person'
timestamps!
diff --git a/app/models/request.rb b/app/models/request.rb
index da62edd93..739500e4e 100644
--- a/app/models/request.rb
+++ b/app/models/request.rb
@@ -26,8 +26,8 @@ class Request
validates_presence_of :destination_url, :callback_url
before_validation :clean_link
- scope :for_user, lambda{ |user| where(:destination_url => user.receive_url) }
- scope :from_user, lambda{ |user| where(:destination_url.ne => user.receive_url) }
+ scope :for_user, lambda{ |user| where(:destination_url => user.person.receive_url) }
+ scope :from_user, lambda{ |user| where(:destination_url.ne => user.person.receive_url) }
def self.instantiate(options = {})
person = options[:from]
diff --git a/app/models/user.rb b/app/models/user.rb
index ddb8036fe..2b74f437b 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -5,12 +5,14 @@
require 'lib/diaspora/user/friending.rb'
require 'lib/diaspora/user/querying.rb'
+require 'lib/diaspora/user/receiving.rb'
require 'lib/salmon/salmon'
class User
include MongoMapper::Document
include Diaspora::UserModules::Friending
include Diaspora::UserModules::Querying
+ include Diaspora::UserModules::Receiving
include Encryptor::Private
QUEUE = MessageHandler.new
@@ -23,8 +25,6 @@ class User
key :visible_post_ids, Array
key :visible_person_ids, Array
- key :url, String
-
one :person, :class_name => 'Person', :foreign_key => :owner_id
many :friends, :in => :friend_ids, :class_name => 'Person'
@@ -34,7 +34,6 @@ class User
many :aspects, :class_name => 'Aspect'
-
after_create :seed_aspects
before_validation_on_create :downcase_username
@@ -65,6 +64,15 @@ class User
Aspect.create(opts)
end
+ def drop_aspect( aspect )
+ if aspect.people.size == 0
+ aspect.destroy
+ else
+ raise "Aspect not empty"
+ end
+ end
+
+
def move_friend( opts = {})
return true if opts[:to] == opts[:from]
friend = Person.first(:_id => opts[:friend_id])
@@ -87,7 +95,6 @@ class User
######## Posting ########
def post(class_name, options = {})
-
if class_name == :photo
raise ArgumentError.new("No album_id given") unless options[:album_id]
aspect_ids = aspects_with_post( options[:album_id] )
@@ -96,17 +103,47 @@ class User
aspect_ids = options.delete(:to)
end
- aspect_ids = [aspect_ids.to_s] if aspect_ids.is_a? BSON::ObjectId
- raise ArgumentError.new("You must post to someone.") if aspect_ids.nil? || aspect_ids.empty?
+ aspect_ids = validate_aspect_permissions(aspect_ids)
+ intitial_post(class_name, aspect_ids, options)
+ end
+
+
+ def intitial_post(class_name, aspect_ids, options = {})
post = build_post(class_name, options)
-
post.socket_to_uid(id, :aspect_ids => aspect_ids) if post.respond_to?(:socket_to_uid)
push_to_aspects(post, aspect_ids)
+ post
+ end
+ def repost( post, options = {} )
+ aspect_ids = validate_aspect_permissions(options[:to])
+ push_to_aspects(post, aspect_ids)
post
end
+ def update_post( post, post_hash = {} )
+ if self.owns? post
+ post.update_attributes(post_hash)
+ end
+ end
+
+ def validate_aspect_permissions(aspect_ids)
+ aspect_ids = [aspect_ids.to_s] if aspect_ids.is_a? BSON::ObjectId
+
+ 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)
+ raise ArgumentError.new("Cannot post to an aspect you do not own.")
+ end
+ end
+
+ aspect_ids
+ end
+
def build_post( class_name, options = {})
options[:person] = self.person
model_class = class_name.to_s.camelize.constantize
@@ -209,88 +246,10 @@ class User
end
end
- ###### Receiving #######
- def receive_salmon ciphertext
- cleartext = decrypt( ciphertext)
- Rails.logger.info("Received a salmon: #{cleartext}")
- salmon = Salmon::SalmonSlap.parse cleartext
- if salmon.verified_for_key?(salmon.author.public_key)
- Rails.logger.info("data in salmon: #{salmon.data}")
- self.receive(salmon.data)
- end
- end
-
- def receive xml
- object = Diaspora::Parser.from_xml(xml)
- Rails.logger.debug("Receiving object for #{self.real_name}:\n#{object.inspect}")
- Rails.logger.debug("From: #{object.person.inspect}") if object.person
-
- if object.is_a? Retraction
- if object.type == 'Person'
-
- Rails.logger.info( "the person id is #{object.post_id} the friend found is #{visible_person_by_id(object.post_id).inspect}")
- unfriended_by visible_person_by_id(object.post_id)
-
- else
- object.perform self.id
- aspects = self.aspects_with_person(object.person)
- aspects.each{ |aspect| aspect.post_ids.delete(object.post_id.to_id)
- aspect.save
- }
- end
- elsif object.is_a? Request
- person = Diaspora::Parser.parse_or_find_person_from_xml( xml )
- person.serialized_key ||= object.exported_key
- object.person = person
- object.person.save
- old_request = Request.first(:id => object.id)
- object.aspect_id = old_request.aspect_id if old_request
- object.save
- receive_friend_request(object)
- elsif object.is_a? Profile
- person = Diaspora::Parser.owner_id_from_xml xml
- person.profile = object
- person.save
-
- elsif object.is_a?(Comment)
- object.person = Diaspora::Parser.parse_or_find_person_from_xml( xml ).save if object.person.nil?
- self.visible_people = self.visible_people | [object.person]
- self.save
- Rails.logger.debug("The person parsed from comment xml is #{object.person.inspect}") unless object.person.nil?
- object.person.save
- Rails.logger.debug("From: #{object.person.inspect}") if object.person
- raise "In receive for #{self.real_name}, signature was not valid on: #{object.inspect}" unless object.post.person == self.person || object.verify_post_creator_signature
- object.save
- unless owns?(object)
- dispatch_comment object
- end
- object.socket_to_uid(id) if (object.respond_to?(:socket_to_uid) && !self.owns?(object))
- else
- Rails.logger.debug("Saving object: #{object}")
- object.user_refs += 1
- object.save
-
- self.raw_visible_posts << object
- self.save
-
- aspects = self.aspects_with_person(object.person)
- aspects.each{ |aspect|
- aspect.posts << object
- aspect.save
- object.socket_to_uid(id, :aspect_ids => [aspect.id]) if (object.respond_to?(:socket_to_uid) && !self.owns?(object))
- }
-
- end
-
- end
-
###Helpers############
def self.instantiate!( opts = {} )
- hostname = opts[:url].gsub(/(https?:|www\.)\/\//, '')
- hostname.chop! if hostname[-1, 1] == '/'
-
- opts[:person][:diaspora_handle] = "#{opts[:username]}@#{hostname}"
- puts opts[:person][:diaspora_handle]
+ opts[:person][:diaspora_handle] = "#{opts[:username]}@#{APP_CONFIG[:terse_pod_url]}"
+ opts[:person][:url] = APP_CONFIG[:pod_url]
opts[:person][:serialized_key] = generate_key
User.create(opts)
end
@@ -300,14 +259,9 @@ class User
aspect(:name => "Work")
end
- def terse_url
- terse = self.url.gsub(/(https?:|www\.)\/\//, '')
- terse = terse.chop! if terse[-1, 1] == '/'
- terse
- end
def diaspora_handle
- "#{self.username}@#{self.terse_url}"
+ "#{self.username}@#{APP_CONFIG[:terse_pod_url]}"
end
def downcase_username
diff --git a/app/views/albums/_album.html.haml b/app/views/albums/_album.html.haml
index f4893ed8f..a2d2eb46b 100644
--- a/app/views/albums/_album.html.haml
+++ b/app/views/albums/_album.html.haml
@@ -8,7 +8,7 @@
%div.time
by
- = link_to ((current_user.person == post.person)? 'you' : post.person.real_name), person_path(post.person)
+ = link_to ((current_user.person == post.person)? t('.you') : post.person.real_name), person_path(post.person)
%br
= link_to(how_long_ago(post), object_path(post, :aspect => @aspect))
diff --git a/app/views/albums/_new_album.haml b/app/views/albums/_new_album.haml
index 8a37cb2c0..daefe15f3 100644
--- a/app/views/albums/_new_album.haml
+++ b/app/views/albums/_new_album.haml
@@ -3,7 +3,7 @@
-# the COPYRIGHT file.
-%h1 Add a new album
+%h1=t('.add_a_new_album')
= form_for Album.new do |f|
= f.error_messages
@@ -11,4 +11,4 @@
= f.label :name
= f.text_field :name
= f.hidden_field :to, :value => aspect
- = f.submit 'create', :class => 'button'
+ = f.submit t('.create'), :class => 'button'
diff --git a/app/views/albums/edit.html.haml b/app/views/albums/edit.html.haml
index a4bf3aef6..4dfb2294c 100644
--- a/app/views/albums/edit.html.haml
+++ b/app/views/albums/edit.html.haml
@@ -6,10 +6,10 @@
.back= link_to "⇧ #{@album.name}", @album
%h1.big_text
- = "Editing #{@album.name}"
+ = "#{t('.editing')} #{@album.name}"
.sub_header
- ="updated #{how_long_ago(@album)}"
+ ="#{t('.updated')} #{how_long_ago(@album)}"
- form_for @album do |a|
= a.error_messages
@@ -21,12 +21,12 @@
.photo_edit_block= image_tag photo.url(:thumb_medium)
#submit_block
- = link_to "Cancel", root_path
+ = link_to t('.cancel'), root_path
or
= a.submit
.button.delete
- = link_to 'Delete Album', @album, :confirm => 'Are you sure?', :method => :delete
+ = link_to t('.delete_album'), @album, :confirm => t('.are_you_sure'), :method => :delete
#content_bottom
.back
diff --git a/app/views/albums/index.html.haml b/app/views/albums/index.html.haml
index fa4098c18..af83b53eb 100644
--- a/app/views/albums/index.html.haml
+++ b/app/views/albums/index.html.haml
@@ -10,7 +10,7 @@
});
= content_for :page_title do
- = link_to "◂ Home", aspects_path, :aspect => params[:aspect]
+ = link_to "◂ #{t('.home')}", aspects_path, :aspect => params[:aspect]
- content_for :left_pane do
= render "shared/aspect_friends"
@@ -19,7 +19,7 @@
%h1
Albums
.right
- = link_to 'New Album', '#new_album_pane', {:class => "button", :id => "add_album_button"}
+ = link_to t('.new_album'), '#new_album_pane', {:class => "button", :id => "add_album_button"}
.yo{:style => "display:none;" }
#new_album_pane
@@ -34,4 +34,4 @@
#content_bottom
.back
- = link_to "⇧ home", root_path
+ = link_to "⇧ #{t('.home')}", root_path
diff --git a/app/views/albums/show.html.haml b/app/views/albums/show.html.haml
index 843523223..7b5e6c8be 100644
--- a/app/views/albums/show.html.haml
+++ b/app/views/albums/show.html.haml
@@ -11,33 +11,32 @@
});
= content_for :page_title do
- = link_to "◂ Albums", albums_path(:aspect => @aspect)
+ = link_to "◂ #{t('.albums')}", albums_path(:aspect => @aspect)
- content_for :left_pane do
= render "shared/aspect_friends"
- content_for :publish do
+ -if current_user.owns? @album
+ .right
+ =render 'photos/new_photo'
+ = link_to t('.edit_album'), edit_album_path(@album), :class => 'button'
%h1
= @album.name
- ="updated #{how_long_ago(@album)}"
+ ="#{t('.updated')} #{how_long_ago(@album)}"
+
.album_id{:id => @album.id, :style => "display:hidden;"}
-unless current_user.owns? @album
- %h4= "by #{@album.person.real_name}"
+ %h4= "#{t('.by')} #{@album.person.real_name}"
#thumbnails
- for photo in @album_photos
.image_thumb
= link_to (image_tag photo.url(:thumb_medium)), object_path(photo)
- -if current_user.owns? @album
- =render 'photos/new_photo'
#content_bottom
.back
- = link_to "⇧ albums", albums_path
-
- -if current_user.owns? @album
- .right
- = link_to 'Edit Album', edit_album_path(@album), :class => 'button'
+ = link_to "⇧ #{t('.albums')}", albums_path
diff --git a/app/views/aspects/_new_aspect.haml b/app/views/aspects/_new_aspect.haml
index b5bc7ace3..9f0b662dd 100644
--- a/app/views/aspects/_new_aspect.haml
+++ b/app/views/aspects/_new_aspect.haml
@@ -3,10 +3,10 @@
-# the COPYRIGHT file.
-%h1 Add a new aspect
+%h1=t('.add_a_new_aspect')
= form_for Aspect.new do |f|
= f.error_messages
%p
= f.label :name
= f.text_field :name
- = f.submit 'create', :class => 'button'
+ = f.submit t('.create'), :class => 'button'
diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml
index 5ea9cadb3..47a68ffeb 100644
--- a/app/views/aspects/index.html.haml
+++ b/app/views/aspects/index.html.haml
@@ -4,7 +4,7 @@
- content_for :page_title do
- = link_to "photos", albums_path(:aspect => @aspect)
+ = link_to t('.photos'), albums_path(:aspect => @aspect)
- content_for :left_pane do
diff --git a/app/views/aspects/manage.html.haml b/app/views/aspects/manage.html.haml
index 8a6ed97ac..af64fcc23 100644
--- a/app/views/aspects/manage.html.haml
+++ b/app/views/aspects/manage.html.haml
@@ -8,24 +8,26 @@
= javascript_include_tag 'aspect-edit.js'
- content_for :left_pane do
- %h1
- Requests
+ %h1=t('.requests')
.requests
- %ul
- - for request in @remote_requests
- %li.requested_person{:id => request.person.id, :request_id => request.id}
- = person_image_tag(request.person)
- .name
- = request.person.real_name
- %h1
- Ignore/Remove
+ %ul.dropzone
+ - if @remote_requests.size < 1
+ %li.grey No new requests
+ - else
+ - for request in @remote_requests
+ %li.requested_person{:id => request.person.id, :request_id => request.id}
+ = person_image_tag(request.person)
+ .name
+ = request.person.real_name
+ %h1=t('.ignore_remove')
%li.remove
- %ul
+ %ul.dropzone
+ %li.grey Drag to ignore/remove
- content_for :publish do
- = link_to("add a new aspect", "#add_aspect_pane", :id => "add_aspect_button", :class => "new_aspect button", :title => "Add a new aspect")
+ = link_to(t('.add_a_new_aspect'), "#add_aspect_pane", :id => "add_aspect_button", :class => "new_aspect button", :title => t('.add_a_new_aspect'))
@@ -34,14 +36,16 @@
%li.aspect
.aspect_name
- %h1{:contenteditable => true}= aspect.name
+ %span.edit_name_field
+ %h1{:contenteditable => true}= aspect.name
+ %span.tip click to edit
- .tools
- = link_to "add a new friend", "#add_request_pane_#{aspect.id}", :class => 'add_request_button'
- |
- = link_to "show", aspect_path(aspect)
+ %ul.tools
+ %li= link_to t('.add_a_new_friend'), "#add_request_pane_#{aspect.id}", :class => 'add_request_button'
+ %li= link_to t('.show'), aspect_path(aspect)
+ %li!= remove_link(aspect)
- %ul{:id => aspect.id}
+ %ul.dropzone{:id => aspect.id}
-if aspect.people.size < 1
%li.grey Drag to add people
@@ -52,13 +56,9 @@
%li.person{:id => person.id, :from_aspect_id => aspect.id}
= person_image_tag(person)
.name
- = person.real_name
+ = link_to person.real_name, person
.yo{:style => 'display:none'}
%div{:id => "add_request_pane_#{aspect.id}"}
= render "requests/new_request", :aspect => aspect
-%p
- %br
- = link_to 'Update Aspects', '#', :class => 'button', :id => "move_friends_link"
-
#content_bottom
diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml
index f10ccee74..d4262f838 100644
--- a/app/views/aspects/show.html.haml
+++ b/app/views/aspects/show.html.haml
@@ -4,7 +4,7 @@
- content_for :page_title do
- = link_to "photos", albums_path(:aspect => @aspect)
+ = link_to t('.photos'), albums_path(:aspect => @aspect)
- content_for :left_pane do
= render "shared/aspect_friends"
diff --git a/app/views/comments/_comment.html.haml b/app/views/comments/_comment.html.haml
index 56252c83d..4fd46eb56 100644
--- a/app/views/comments/_comment.html.haml
+++ b/app/views/comments/_comment.html.haml
@@ -7,6 +7,6 @@
= person_image_tag(post.person)
%span.from
= link_to post.person.real_name, post.person
- = auto_link sanitize post.text
+ = post.text
%div.time
- = "#{time_ago_in_words(post.updated_at)} ago"
+ = "#{time_ago_in_words(post.updated_at)} #{t('.ago')}"
diff --git a/app/views/comments/_new_comment.html.haml b/app/views/comments/_new_comment.html.haml
index e998d98b7..a4268082d 100644
--- a/app/views/comments/_new_comment.html.haml
+++ b/app/views/comments/_new_comment.html.haml
@@ -9,4 +9,4 @@
= f.text_area :text, :rows => 1, :id => "comment_text_on_#{post.id}", :class => "comment_box"
= f.hidden_field :post_id, :value => post.id
%p{:style => "text-align:right;"}
- = f.submit "Comment", :class => "comment_submit button"
+ = f.submit t('.comment'), :class => "comment_submit button"
diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml
index 1840d7acc..a2de719b5 100644
--- a/app/views/devise/sessions/new.html.haml
+++ b/app/views/devise/sessions/new.html.haml
@@ -1,10 +1,16 @@
+%h1
+ This is a technology preview, do not provide any private information.
+%h3
+ your account may be deleted until we move into a more stable development period.
+%h3
+ USE AT YOUR OWN RISK!!
= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
#user
%p.username
= f.label :username
= f.text_field :username
%p.user_network
- ="@#{request.host}"
+ ="@#{APP_CONFIG[:terse_pod_url]}"
%p
= f.label :password
@@ -14,6 +20,7 @@
/ = f.check_box :remember_me
/ = f.label :remember_me
= f.submit "Sign in"
+ = link_to "Have a problem? Find an answer here", 'http://diaspora.shapado.com/'
%p
= render :partial => "devise/shared/links"
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 4a3ec2dbb..7a48d7ed7 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -50,8 +50,8 @@
= text_field_tag 'q'
%li= link_to current_user.real_name, current_user.person
- %li= link_to "edit profile", edit_user_path(current_user)
- %li= link_to "logout", destroy_user_session_path
+ %li= link_to t('.edit_profile'), edit_user_path(current_user)
+ %li= link_to t('.logout.'), destroy_user_session_path
= render "shared/aspect_nav"
= render "shared/sub_header"
diff --git a/app/views/people/_person.html.haml b/app/views/people/_person.html.haml
new file mode 100644
index 000000000..185695db1
--- /dev/null
+++ b/app/views/people/_person.html.haml
@@ -0,0 +1,30 @@
+-# Copyright (c) 2010, Diaspora Inc. This file is
+-# licensed under the Affero General Public License version 3. See
+-# the COPYRIGHT file.
+
+%li.message{:id => person.id}
+
+ = person_image_link(person)
+
+ .content
+ %span.from
+ - if current_user.friends.include?(person) || person.id == current_user.person.id
+ = link_to person.real_name, person_path(person)
+ - else
+ = person.real_name
+
+ .info
+ = person.diaspora_handle
+
+ .right{ :style => "display:inline;top:0;" }
+ - if person.id == current_user.person.id
+ thats you!
+ - elsif current_user.friends.include?(person)
+ Already friends
+ - elsif current_user.pending_requests.find_by_person_id(person.id)
+ = link_to =t('.pending_request'), aspects_manage_path
+ - else
+ = form_for Request.new do |f|
+ = f.select(:aspect_id, @aspects_dropdown_array)
+ = f.hidden_field :destination_url, :value => person.diaspora_handle
+ = f.submit t('.add_friend')
diff --git a/app/views/people/index.html.haml b/app/views/people/index.html.haml
index c18ec5d0a..2cd1dc4a7 100644
--- a/app/views/people/index.html.haml
+++ b/app/views/people/index.html.haml
@@ -8,44 +8,18 @@
Search
=form_tag '/people', :method => "get" do
- = text_field_tag :q
+ = text_field_tag :q, params[:q]
= submit_tag "search"
- content_for :left_pane do
\.
-= (@people.count).to_s + search_or_index
-%table
- %tr
- %th real name
- %th diaspora handle
- %th url
- - for person in @people
- %tr
- - if current_user.friends.include? person
- %td= link_to person.real_name, person
- - else
- %td= person.real_name
+%h1
+ search results for
+ %u= params[:q]
- %td= person.diaspora_handle
- %td= person.url
-
- -if current_user.friends.include? person
-
- - elsif person.id == current_user.person.id
- %td
- %td that's you!
- -elsif current_user.pending_requests.find_by_person_id(person.id)
- %td
- %td ^-you have a friend request from this person
- -elsif current_user.pending_requests.find_by_url(person.receive_url)
- %td
- %td friend request pending
- -else
- %td
- %td
- = form_for Request.new do |f|
- = f.select(:aspect_id, @aspects_dropdown_array)
- = f.hidden_field :destination_url, :value => person.diaspora_handle
- = f.submit "add friend"
- = will_paginate @people
+%ul#stream
+ - for person in @people
+ = render 'people/person', :person => person
+
+= will_paginate @people
diff --git a/app/views/people/new.html.haml b/app/views/people/new.html.haml
index b2203eb3f..25821ed37 100644
--- a/app/views/people/new.html.haml
+++ b/app/views/people/new.html.haml
@@ -3,7 +3,7 @@
-# the COPYRIGHT file.
-- title "New Person"
+- title=t('.new_person')
= form_for @person do |f|
= f.error_messages
@@ -29,4 +29,4 @@
= f.submit
-%p= link_to "Back to List", people_path
+%p= link_to t('.back_to_list'), people_path
diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml
index 4f76f18cf..23e6ea64d 100644
--- a/app/views/people/show.html.haml
+++ b/app/views/people/show.html.haml
@@ -4,7 +4,7 @@
- content_for :page_title do
- = @person.real_name
+ profile
- content_for :left_pane do
#profile
@@ -13,19 +13,19 @@
%ul
-unless @posts.first.nil?
%li
- %i= "last seen: #{how_long_ago(@posts.first)}"
+ %i= t(".last_seen",:how_long_ago => how_long_ago(@posts.first))
- if @person != current_user.person && current_user.friends.include?(@person)
%li
- %i= "friends since: #{how_long_ago(@person)}"
+ %i= t(".friends_since",:how_long_ago => how_long_ago(@person))
%li
= form_tag move_friend_path
= select :to, :to, @aspects_dropdown_array, :selected => @aspects_with_person.first.id
= hidden_field_tag :from, :from, :value => @aspects_with_person.first.id
= hidden_field_tag :friend_id, :friend_id, :value => @person.id
- = submit_tag "save"
+ = submit_tag t('.save')
- if @person != current_user.person && current_user.friends.include?(@person)
- = link_to 'remove friend', @person, :confirm => 'Are you sure?', :method => :delete, :class => "button"
+ = link_to t('.remove_friend'), @person, :confirm => t('.are_you_sure'), :method => :delete, :class => "button"
.span-20.last
@@ -36,4 +36,4 @@
= render type_partial(post), :post => post unless post.class == Album
= will_paginate @posts
- else
- %h3 no posts to display!
+ %h3=t('no posts to display!')
diff --git a/app/views/photos/_new_photo.haml b/app/views/photos/_new_photo.haml
index f6777fa4a..abb8cf528 100644
--- a/app/views/photos/_new_photo.haml
+++ b/app/views/photos/_new_photo.haml
@@ -8,8 +8,8 @@
var uploader = new qq.FileUploader({
element: document.getElementById('file-upload'),
params: {'album_id' : "#{@album.id}"},
- allowedExtensions: ['jpg', 'jpeg', 'png'],
- action: "/photos"
+ allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'],
+ action: "#{photos_path}"
});
}
window.onload = createUploader;
diff --git a/app/views/photos/_photo.haml b/app/views/photos/_photo.haml
index f0a3f2c83..ae8829c61 100644
--- a/app/views/photos/_photo.haml
+++ b/app/views/photos/_photo.haml
@@ -11,7 +11,7 @@
%span.from
= link_to post.person.real_name, post.person
%b
- posted a new photo to
+ =t('.posted_a_new_photo_to')
= link_to post.album.name, object_path(post.album)
%br
@@ -21,5 +21,5 @@
.info
= link_to(how_long_ago(post), photo_path(post))
\--
- = link_to "show comments (#{post.comments.count})", '#', :class => "show_post_comments"
+ = link_to "#{t('.show_comments')} (#{post.comments.count})", '#', :class => "show_post_comments"
= render "comments/comments", :post => post
diff --git a/app/views/photos/edit.html.haml b/app/views/photos/edit.html.haml
index f695f850d..1f36ae99f 100644
--- a/app/views/photos/edit.html.haml
+++ b/app/views/photos/edit.html.haml
@@ -6,7 +6,7 @@
%h1.big_text
.back
= link_to "⇧ #{@album.name}", album_path(@album)
- = "Editing #{@photo.image}"
+ = "#{t('.editing')} #{@photo.image}"
%div{:id => @photo.id}
@@ -22,5 +22,5 @@
= link_to "⇧ #{@album.name}", album_path(@album)
-if current_user.owns? @album
.button.right
- = link_to 'Delete Photo', @photo, :confirm => 'Are you sure?', :method => :delete
+ = link_to t('.delete_photo'), @photo, :confirm => t('.are_you_sure'), :method => :delete
diff --git a/app/views/photos/new.html.haml b/app/views/photos/new.html.haml
index a8814d770..1fdf71a84 100644
--- a/app/views/photos/new.html.haml
+++ b/app/views/photos/new.html.haml
@@ -3,12 +3,12 @@
-# the COPYRIGHT file.
-- title "New Photo"
+- title t('.new_photo')
= form_for( @photo, :html => {:multipart => true}) do |f|
= f.error_messages
%p
= f.file_field :image
- = f.submit 'post it!', :class => 'button'
+ = f.submit t('.post_it'), :class => 'button'
-%p= link_to "Back to List", photos_path
+%p= link_to t('.back_to_list'), photos_path
diff --git a/app/views/photos/show.html.haml b/app/views/photos/show.html.haml
index 654bea892..21ce72181 100644
--- a/app/views/photos/show.html.haml
+++ b/app/views/photos/show.html.haml
@@ -25,15 +25,15 @@
%h1
= @photo.image
- = link_to "<< prev", url_to_prev(@photo, @album)
+ = link_to "<< #{t('.prev')}", url_to_prev(@photo, @album)
|
- = link_to "full size", @photo.url
+ = link_to "#{t('.full_size')}", @photo.url
|
- = link_to "next >>", url_to_next(@photo, @album)
+ = link_to "#{t('.next')} >>", url_to_next(@photo, @album)
.right
-if current_user.owns? @album
- = link_to 'Edit Photo', edit_photo_path(@photo), :class => "button"
+ = link_to t('.edit_photo'), edit_photo_path(@photo), :class => "button"
%div{:id => @photo.id}
@@ -48,9 +48,9 @@
-if current_user.owns? @album
.right
- = link_to 'Delete Photo', @photo, :confirm => 'Are you sure?', :method => :delete, :class => 'button'
+ = link_to t('.delete_photo'), @photo, :confirm => t('.are_you_sure'), :method => :delete, :class => 'button'
%h4{:class => "show_post_comments"}
- = "comments (#{@photo.comments.count})"
+ = "#{t('.comments')} (#{@photo.comments.count})"
= render "comments/comments", :post => @photo
diff --git a/app/views/posts/_debug.haml b/app/views/posts/_debug.haml
index 27d508cf2..17d7baad8 100644
--- a/app/views/posts/_debug.haml
+++ b/app/views/posts/_debug.haml
@@ -7,6 +7,9 @@
%h5 DEBUG INFO
#debug_more{ :style => "display:none;" }
%ul
+ %li
+ %b
+ = GIT_INFO
%li
%b params
= params.inspect
@@ -14,3 +17,4 @@
%b websocket status
#debug
.msg
+
diff --git a/app/views/registrations/new.html.haml b/app/views/registrations/new.html.haml
index eefa94519..f837c92de 100644
--- a/app/views/registrations/new.html.haml
+++ b/app/views/registrations/new.html.haml
@@ -2,7 +2,6 @@
= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
- = f.hidden_field :url, :value => request.host
%p
= f.label :username
= f.text_field :username
@@ -17,8 +16,6 @@
= f.password_field :password_confirmation
= f.fields_for :person do |p|
- = p.hidden_field :url, :value => request.host
-
= p.fields_for :profile do |pr|
%p
= pr.label :first_name
@@ -27,5 +24,5 @@
= pr.label :last_name
= pr.text_field :last_name
- = f.submit "Sign up"
+ = f.submit t('.sign_up')
= render :partial => "devise/shared/links"
diff --git a/app/views/requests/_new_request.haml b/app/views/requests/_new_request.haml
index b7e5819f6..70c204e7c 100644
--- a/app/views/requests/_new_request.haml
+++ b/app/views/requests/_new_request.haml
@@ -4,18 +4,18 @@
%h1
- Add a new friend to
+ =t('.add_a_new_friend_to')
%i= aspect.name
= form_for Request.new do |f|
= f.error_messages
- Enter a Diaspora username:
+ =t('.enter_a_diaspora_username')
%br
- %i= "Your Diaspora username is: #{current_user.diaspora_handle}"
+ %i= t '.your_diaspora_username_is', :diaspora_handle => current_user.diaspora_handle
%p
- = f.label :destination_url, "Friend's username"
+ = f.label :destination_url, t(".friends_username")
= f.text_field :destination_url
= f.hidden_field :aspect_id, :value => aspect.id
= f.submit
diff --git a/app/views/shared/_aspect_friends.haml b/app/views/shared/_aspect_friends.haml
index 6ab286a81..5e1dfe213 100644
--- a/app/views/shared/_aspect_friends.haml
+++ b/app/views/shared/_aspect_friends.haml
@@ -16,5 +16,5 @@
= render "requests/new_request", :aspect => @aspect
-else
.clear
- = link_to "add friends", aspects_manage_path
+ = link_to t('.add_friends'), aspects_manage_path
diff --git a/app/views/shared/_aspect_nav.haml b/app/views/shared/_aspect_nav.haml
index b61def9f5..8e900e42d 100644
--- a/app/views/shared/_aspect_nav.haml
+++ b/app/views/shared/_aspect_nav.haml
@@ -6,15 +6,15 @@
#aspect_nav
%ul
- for aspect in @aspects
- %li{:id => aspect.id, :class => ("selected" if current_aspect?(aspect))}
+ %li{:class => ("selected" if current_aspect?(aspect))}
= link_for_aspect aspect
%ul{ :style => "position:absolute;right:0;bottom:0.01em;"}
%li{:class => ("selected" if @aspect == :all)}
- = link_to "All Aspects", root_url
+ = link_to t('.all_aspects'), root_url
%li{ :style => "margin-right:0;", :class => ("selected" if @aspect == :manage)}
- = link_to ( (@request_count == 0)? "manage" : "manage (#{@request_count})"), {:controller => :aspects, :action => :manage}, :class => "edit_aspect_button", :class => new_request(@request_count), :title => "Manage your Aspects"
+ = link_to ( (@request_count == 0)? t('.manage') : "#{t('.manage')} (#{@request_count})"), {:controller => :aspects, :action => :manage}, :class => "edit_aspect_button", :class => new_request(@request_count), :title => t('.manage_your_aspects')
.yo{ :style => "display:none;"}
#add_aspect_pane
diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml
index 4645ec65c..040d3e3c2 100644
--- a/app/views/shared/_publisher.haml
+++ b/app/views/shared/_publisher.haml
@@ -10,7 +10,7 @@
= f.error_messages
%p
%label{:for => "status_message_message"} Message
- = f.text_area :message, :rows => 2
+ = f.text_area :message, :rows => 2, :value => params[:prefill]
%ul.aspect_selector{ :style => "display:none;"}
going to...
@@ -19,4 +19,4 @@
= check_box_tag("aspect_ids[]", aspect.id, @aspect == :all || current_aspect?(aspect) )
= aspect.name
- = f.submit "Share"
+ = f.submit t('.share')
diff --git a/app/views/shared/_reshare.haml b/app/views/shared/_reshare.haml
new file mode 100644
index 000000000..0b4120d52
--- /dev/null
+++ b/app/views/shared/_reshare.haml
@@ -0,0 +1,27 @@
+-# Copyright (c) 2010, Diaspora Inc. This file is
+-# licensed under the Affero General Public License version 3. See
+-# the COPYRIGHT file.
+
+
+
+:javascript
+ $(".reshare_button").toggle(function(e){
+ e.preventDefault();
+ $(this).parent(".reshare_pane").children(".reshare_box").fadeIn(200);
+ }, function(e) {
+ e.preventDefault();
+ $(this).parent(".reshare_pane").children(".reshare_box").fadeOut(200);
+ });
+
+.reshare_pane
+ %span.reshare_button
+ = link_to "Reshare", "#"
+
+ %ul.reshare_box
+ - for aspect in current_user.aspects_with_post( post.id )
+
+ %li.currently_sharing= aspect.name
+
+ - for aspect in current_user.aspects
+ - unless aspect.posts.include? post
+ %li.aspect_to_share= link_to aspect, :controller => "aspects", :action => "show", :id => aspect.id, :prefill => post.message
diff --git a/app/views/shared/_sub_header.haml b/app/views/shared/_sub_header.haml
index badf8783d..d8ad6c603 100644
--- a/app/views/shared/_sub_header.haml
+++ b/app/views/shared/_sub_header.haml
@@ -7,9 +7,9 @@
- else
%h1
- if @aspect == :all
- = link_to "All Aspects", root_path
+ = link_to t('.all_aspects'), root_path
- elsif @aspect == :manage
- = link_to "Manage Aspects", root_path
+ = link_to t('.manage_aspects'), root_path
- else
= link_to @aspect.name, @aspect
diff --git a/app/views/status_messages/_new_status_message.haml b/app/views/status_messages/_new_status_message.haml
index 329e72d66..b515dadff 100644
--- a/app/views/status_messages/_new_status_message.haml
+++ b/app/views/status_messages/_new_status_message.haml
@@ -6,5 +6,5 @@
= form_for StatusMessage.new, :remote => true do |f|
= f.error_messages
%p
- = f.text_field :message, :value => "tell me something good"
- = f.submit 'oh yeah!', :class => 'button'
+ = f.text_field :message, :value => t('.tell_me_something_good')
+ = f.submit t('.oh_yeah'), :class => 'button'
diff --git a/app/views/status_messages/_status_message.html.haml b/app/views/status_messages/_status_message.html.haml
index a22098afa..4d73f4251 100644
--- a/app/views/status_messages/_status_message.html.haml
+++ b/app/views/status_messages/_status_message.html.haml
@@ -10,16 +10,16 @@
.content
%span.from
= link_to post.person.real_name, post.person
- = auto_link sanitize post.message
+ = post.message
.info
- = link_to(how_long_ago(post), object_path(post))
+ %span.time= link_to(how_long_ago(post), object_path(post))
\--
- = link_to "show comments (#{post.comments.count})", '#', :class => "show_post_comments"
-
- = render "comments/comments", :post => post
+ = link_to "#{t('.show_comments')} (#{post.comments.count})", '#', :class => "show_post_comments"
+ = render "comments/comments", :post => post
- if current_user.owns?(post)
.destroy_link
- = link_to 'Delete', status_message_path(post), :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "delete"
+ = link_to t('.delete'), status_message_path(post), :confirm => t('.are_you_sure'), :method => :delete, :remote => true, :class => "delete"
+ = render "shared/reshare", :post => post, :current_user => current_user
diff --git a/app/views/status_messages/show.html.haml b/app/views/status_messages/show.html.haml
index 358c2244b..ae4ece073 100644
--- a/app/views/status_messages/show.html.haml
+++ b/app/views/status_messages/show.html.haml
@@ -2,21 +2,13 @@
-# licensed under the Affero General Public License version 3. See
-# the COPYRIGHT file.
-
-- title "Status Message"
-
-%p
- %strong Message:
+%h1
+ = link_to @status_message.person.real_name, @status_message.person
= @status_message.message
-
-%p
- %strong Owner:
- = @status_message.person.real_name
-%h4= "comments (#{@status_message.comments.count})"
+%h4= "#{t('.comments')} (#{@status_message.comments.count})"
= render "comments/comments", :post => @status_message
%p
- = link_to "Destroy", @status_message, :confirm => 'Are you sure?', :method => :delete
- |
- = link_to "View All", status_messages_path
+ - if current_user.owns? @status_message
+ = link_to t('.destroy'), @status_message, :confirm => t('are_you_sure?'), :method => :delete
diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml
index cddec8d77..25668776f 100644
--- a/app/views/users/edit.html.haml
+++ b/app/views/users/edit.html.haml
@@ -4,8 +4,7 @@
- content_for :publish do
- %h1
- Editing profile
+ %h1="#{t('.editing_profile')}"
- content_for :left_pane do
\.
@@ -15,13 +14,13 @@
= f.fields_for :profile do |p|
- %h3 Picture
+ %h3="#{t('.picture')}"
%div#image_picker
- = p.hidden_field :image_url, :value => (@profile.image_url.sub(@user.url,'/') if @profile.image_url), :id => 'image_url_field'
+ = p.hidden_field :image_url, :value => (@profile.image_url if @profile.image_url), :id => 'image_url_field'
- unless @photos.nil? || @photos.empty?
- for photo in @photos
- - if @profile.image_url && (photo.url(:thumb_medium) == @profile.image_url.sub(@user.url,'/'))
+ - if @profile.image_url && @profile.image_url.include?(photo.url(:thumb_medium))
%div.small_photo{:id => photo.url(:thumb_medium), :class=>'selected'}
= check_box_tag 'checked_photo', true, true
= link_to image_tag(photo.url(:thumb_medium)), "#"
@@ -31,19 +30,19 @@
= link_to image_tag(photo.url(:thumb_medium)), "#"
- else
- You don't have any photos! Go to the
- = link_to "albums", albums_path(:aspect => 'all')
- page to upload some.
+ =t('.you_dont_have_any_photos')
+ = link_to t('.albums'), albums_path(:aspect => 'all')
+ =t('.page_to_upload_some')
=will_paginate @photos
%br
- %h3 Info
+ %h3="#{t('.info')}"
%p
%b
- DIASPORA USERNAME:
+ ="#{t('.diaspora_username')}:"
= @user.diaspora_handle
%p
@@ -53,15 +52,11 @@
= p.label :last_name
= p.text_field :last_name, :value => @profile.last_name
- %p
- = f.label :email
- = f.text_field :email
-
#submit_block
- = link_to "Cancel", root_path
+ = link_to t('.cancel'), root_path
or
- = f.submit "Update Profile"
+ = f.submit t('.update_profile')
#content_bottom
.back
- = link_to "⇧ home", root_path
+ = link_to "⇧ #{t('.home')}", root_path
diff --git a/config/app_config.yml b/config/app_config.yml.example
similarity index 60%
rename from config/app_config.yml
rename to config/app_config.yml.example
index 0a206c366..75568dd11 100644
--- a/config/app_config.yml
+++ b/config/app_config.yml.example
@@ -3,21 +3,21 @@
# the COPYRIGHT file.
-
-development:
+default:
+ pod_url: "http://example.org/"
debug: false
socket_debug : false
+ socket_host: 0.0.0.0
socket_port: 8080
+ socket_collection_name: 'websocket'
pubsub_server: 'https://pubsubhubbub.appspot.com/'
+ mongo_host: 'localhost'
+ mongo_port: 27017
+
+development:
test:
- debug: false
- socket_debug : false
+ pod_url: "http://example.org/"
socket_port: 8081
- pubsub_server: 'https://pubsubhubbub.appspot.com/'
production:
- debug: false
- socket_debug : false
- socket_port: 8080
- pubsub_server: 'https://pubsubhubbub.appspot.com/'
diff --git a/config/application.rb b/config/application.rb
index ef8a567a5..bf3b5699a 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -6,9 +6,9 @@
require File.expand_path('../boot', __FILE__)
-require "action_controller/railtie"
-require "action_mailer/railtie"
-require "active_resource/railtie"
+require 'action_controller/railtie'
+require 'action_mailer/railtie'
+require 'active_resource/railtie'
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
@@ -51,5 +51,6 @@ module Diaspora
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
+ config.filter_parameters += [:xml]
end
end
diff --git a/config/deploy.rb b/config/deploy.rb
index b4870f94d..2f8065134 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -39,8 +39,6 @@ backers.each{ |backer|
# Start Nginx
after "deploy:cold" do
- run("nginx stop")
- run("killall nginx")
#run("nginx")
end
@@ -55,9 +53,19 @@ namespace :deploy do
run "ln -s -f #{shared_path}/bundle #{current_path}/vendor/bundle"
end
+ task :symlink_config do
+ run "touch #{shared_path}/app_config.yml"
+ run "ln -s -f #{shared_path}/app_config.yml #{current_path}/config/app_config.yml"
+ end
+
task :start do
start_mongo
start_thin
+ start_websocket
+ end
+
+ task :start_websocket do
+ run("cd #{current_path} && bundle exec ruby ./script/websocket_server.rb > /dev/null&")
end
task :start_mongo do
@@ -147,4 +155,4 @@ namespace :db do
end
-after "deploy:symlink", "deploy:symlink_images", "deploy:symlink_bundle"
+after "deploy:symlink", "deploy:symlink_images", "deploy:symlink_bundle", 'deploy:symlink_config'
diff --git a/config/environment.rb b/config/environment.rb
index dc11087dd..385a96651 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -7,6 +7,7 @@
# Load the rails application
require File.expand_path('../application', __FILE__)
Haml::Template.options[:format] = :html5
+Haml::Template.options[:escape_html] = true
# Initialize the rails application
Diaspora::Application.initialize!
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 66a0ef31a..e73a3e9d1 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -21,8 +21,19 @@ Diaspora::Application.configure do
config.action_controller.perform_caching = false
# Don't care if the mailer can't send
- config.action_mailer.raise_delivery_errors = false
+ config.action_mailer.raise_delivery_errors = true
config.active_support.deprecation = :log
config.middleware.use MongoMapper::ClearDevMemory
#config.threadsafe!
+ config.action_mailer.delivery_method = :smtp
+ config.action_mailer.default_url_options = {:host => 'localhost:3000'}
+ config.action_mailer.smtp_settings = {
+ :address => 'smtp.gmail.com',
+ :port => 587,
+ :domain => 'mail.joindiaspora.com',
+ :authentication => 'plain',
+ :user_name => 'diaspora-pivots@joindiaspora.com',
+ :password => "xy289|]G+R*-kA",
+ :enable_starttls_auto => true
+ }
end
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 1267a96a3..3207c627d 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -15,12 +15,12 @@ Diaspora::Application.configure do
config.action_controller.perform_caching = true
# Specifies the header that your server uses for sending files
- config.action_dispatch.x_sendfile_header = "X-Sendfile"
+ #config.action_dispatch.x_sendfile_header = "X-Sendfile"
config.active_support.deprecation = :notify
# For nginx:
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
+ config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
# If you have no front-end server that supports something like X-Sendfile,
# just comment this out and Rails will serve the files
@@ -36,7 +36,7 @@ Diaspora::Application.configure do
# Disable Rails's static asset server
# In production, Apache or nginx will already do this
- config.serve_static_assets = true
+ #config.serve_static_assets = true
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
@@ -44,12 +44,20 @@ Diaspora::Application.configure do
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
- # Enable threaded mode
- # config.threadsafe!
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true
config.threadsafe!
+ config.action_mailer.delivery_method = :smtp
+ config.action_mailer.default_url_options = {:host => 'pivots.joindiaspora.com'}
+ config.action_mailer.smtp_settings = {
+ :address => 'smtp.gmail.com',
+ :port => 587,
+ :domain => 'mail.joindiaspora.com',
+ :authentication => 'plain',
+ :user_name => 'diaspora-pivots@joindiaspora.com',
+ :password => "xy289|]G+R*-kA",
+ :enable_starttls_auto => true
+ }
end
diff --git a/config/initializers/_load_app_config.rb b/config/initializers/_load_app_config.rb
new file mode 100644
index 000000000..e739941e9
--- /dev/null
+++ b/config/initializers/_load_app_config.rb
@@ -0,0 +1,26 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+def load_config_yaml filename
+ YAML.load(File.read(filename))
+end
+
+if File.exist? "#{Rails.root}/config/app_config.yml"
+ all_envs = load_config_yaml "#{Rails.root}/config/app_config.yml"
+ all_envs = load_config_yaml "#{Rails.root}/config/app_config.yml.example" unless all_envs
+else
+ puts "WARNING: No config/app_config.yml found! Look at config/app_config.yml.example for help."
+ all_envs = load_config_yaml "#{Rails.root}/config/app_config.yml.example"
+end
+
+if all_envs[Rails.env.to_s]
+ APP_CONFIG = all_envs['default'].merge(all_envs[Rails.env.to_s]).symbolize_keys
+else
+ APP_CONFIG = all_envs['default'].symbolize_keys
+end
+
+APP_CONFIG[:terse_pod_url] = APP_CONFIG[:pod_url].gsub(/(https?:|www\.)\/\//, '')
+APP_CONFIG[:terse_pod_url].chop! if APP_CONFIG[:terse_pod_url][-1, 1] == '/'
+
+puts "WARNING: Please modify your app_config.yml to have a proper pod_url!" if APP_CONFIG[:terse_pod_url] == "example.org" && Rails.env != :test
diff --git a/config/initializers/_mongo.rb b/config/initializers/_mongo.rb
index 0409d6d71..8948a0c59 100644
--- a/config/initializers/_mongo.rb
+++ b/config/initializers/_mongo.rb
@@ -5,7 +5,7 @@
if ENV['MONGOHQ_URL']
MongoMapper.config = {RAILS_ENV => {'uri' => ENV['MONGOHQ_URL']}}
else
- MongoMapper.connection = Mongo::Connection.new('localhost', 27017)
+ MongoMapper.connection = Mongo::Connection.new(APP_CONFIG['mongo_host'], APP_CONFIG['mongo_port'])
end
MongoMapper.database = "diaspora-#{Rails.env}"
@@ -16,3 +16,4 @@ if defined?(PhusionPassenger)
end
end
+Magent.connection = Mongo::Connection.new(APP_CONFIG['mongo_host'], APP_CONFIG['mongo_port'])
diff --git a/config/initializers/load_app_config.rb b/config/initializers/git_info.rb
similarity index 54%
rename from config/initializers/load_app_config.rb
rename to config/initializers/git_info.rb
index 1a5094d9b..a6d767aa4 100644
--- a/config/initializers/load_app_config.rb
+++ b/config/initializers/git_info.rb
@@ -3,5 +3,4 @@
# the COPYRIGHT file.
-raw_config = File.read("#{Rails.root}/config/app_config.yml")
-APP_CONFIG = YAML.load(raw_config)[Rails.env].symbolize_keys
+GIT_INFO = `git show`
diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb
new file mode 100644
index 000000000..dd607a273
--- /dev/null
+++ b/config/initializers/locale.rb
@@ -0,0 +1,8 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+I18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
+I18n.default_locale = :en
\ No newline at end of file
diff --git a/config/initializers/socket.rb b/config/initializers/socket.rb
deleted file mode 100644
index 1fd09fd93..000000000
--- a/config/initializers/socket.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3. See
-# the COPYRIGHT file.
-
-
-require 'em-websocket'
-require 'eventmachine'
-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 {
-
- sid = Diaspora::WebSocket.subscribe(ws.request['Path'].gsub('/',''), ws)
-
- ws.onmessage { |msg| SocketsController.new.incoming(msg) }
-
- ws.onclose { Diaspora::WebSocket.unsubscribe(ws.request['Path'].gsub('/',''), sid) }
- }
- end
- }
-
diff --git a/config/locales/cs.yml b/config/locales/cs.yml
new file mode 100644
index 000000000..91c904dc1
--- /dev/null
+++ b/config/locales/cs.yml
@@ -0,0 +1,10 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+# Sample localization file for Lithuanian. Add more files in this directory for other locales.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+cs:
+ hello: "Dobrý Den"
diff --git a/config/locales/cy.yml b/config/locales/cy.yml
new file mode 100644
index 000000000..b7d9c9af4
--- /dev/null
+++ b/config/locales/cy.yml
@@ -0,0 +1,143 @@
+# 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.
+
+cy:
+ hello: "Helo byd"
+ layouts:
+ application:
+ edit_profile: "golygu proffil"
+ logout: "arwyddo allan"
+ shared:
+ aspect_nav:
+ all_aspects: "Pob agwedd"
+ manage: "Rheoli"
+ manage_your_aspects: "Rheoli eich agweddau"
+ sub_header:
+ all_aspects: "Pob agwedd"
+ manage_aspects: "Rheloi agweddau"
+ publisher:
+ share: "Rhannu"
+ aspect_friends:
+ add_friends: "ychwanegu ffrindiau"
+ albums:
+ album:
+ you: "chi"
+ new_album:
+ create: "creu"
+ add_a_new_album: "Ychwanegu albwm newydd"
+ show:
+ edit_album: "Golygu Albwm"
+ albums: "albymau"
+ updated: "diweddarwyd"
+ by: "gan"
+ edit:
+ editing: "Wrthi'n golygu"
+ updated: "diweddarwyd"
+ are_you_sure: "Ydych chi'n sicr?"
+ delete_album: "Dileu Albwm"
+ cancel: "Cancel"
+ index:
+ home: "adref"
+ new_album: "Albwm Newydd"
+ create:
+ success: "Chi wedi creu albwm a'i enwi'n %{name}."
+ update:
+ success: "Mae albwm %{name} wedi'i olygu yn llwyddiannus."
+ failure: "Wedi methu golygu albwm %{name}."
+ destroy:
+ success: "Wedi dileu albwm %{name}."
+ aspects:
+ index:
+ photos: "lluniau"
+ show:
+ photos: "lluniau"
+ manage:
+ add_a_new_aspect: "Ychwanegwch agwedd"
+ add_a_new_friend: "Ychwanegwch ffrind newydd"
+ show: "Dangos"
+ update_aspects: "Diweddaru Agweddau"
+ requests: "Ceisiadau"
+ ignore_remove: "Anwybyddu/Tynnu"
+ new_aspect:
+ add_a_new_aspect: "Ychwanegwch agwedd newydd"
+ create: "Creu"
+ create:
+ success:"Cliciwch ar y plus ar y chwith i ddweud wrth Diaspora pwy all weld eich agwedd newydd."
+ users:
+ edit:
+ cancel: "Cancel"
+ update_profile: "Diweddaru Proffil"
+ home: "Adref"
+ diaspora_username: "FFUGENW DIASPORA"
+ info: "Gwybodaeth"
+ picture: "Llun"
+ editing_profile: "Golygu proffil"
+ albums: "Albymau"
+ you_dont_have_any_photos: "Does gennych chi ddim lluniau! Ewch i'r"
+ page_to_upload_some: "dudalen i uwchlwytho rhai."
+ comments:
+ comment:
+ ago: "yn ol"
+ new_comment:
+ comment: "Sylw"
+ photos:
+ show:
+ prev: "blaenorol"
+ full_size: "maint llawn"
+ next: "neasf"
+ edit_photo: "Golygu Llun"
+ delete_photo: "Dileu Llun"
+ are_you_sure: "Ydych chi'n sicr?"
+ comments: "sylwadau"
+ edit:
+ editing: "Golygu"
+ are_you_sure: "Ydych chi'n sicr?"
+ delete_photo: "Dileu Llun"
+ photo:
+ show_comments: "dangos sylwadau"
+ posted_a_new_photo_to: "postiwyd llun newydd i"
+ new:
+ new_photo: "Llun Newydd"
+ back_to_list: "Nol i'r Rhestr"
+ post_it: "postiwch e!"
+ registrations:
+ new:
+ sign_up: "Cofrestrwch"
+ status_messages:
+ new_status_message:
+ tell_me_something_good: "Dwi eisiau clywed rhwbeth da"
+ oh_yeah: "oh yeah!"
+ status_message:
+ show_comments: "dangos sylwadau"
+ delete: "Dileu"
+ are_you_sure: "Ydych chi'n sicr?"
+ show:
+ status_message: "Neges Statws"
+ comments: "sylwadau"
+ are_you_sure: "Ydych chi'n sicr?"
+ destroy: "Dinistrio"
+ view_all: "Gweld Pob Un"
+ message: "Neges"
+ owner: "Perchennog"
+ people:
+ index:
+ add_friend: "ychwanegu ffrind"
+ real_name: "enw llawn"
+ diaspora_handle: "bachyn diaspora"
+ thats_you: "dyna chi!"
+ friend_request_pending: "cais ffrind dan ystyriaeth"
+ you_have_a_friend_request_from_this_person: "mae'r person yma eisiau bod yn ffrind i chi"
+ new:
+ new_person: "Person Newydd"
+ back_to_list: "Nol i'r Rhestr"
+ show:
+ last_seen: "gwelwyd diwethaf: %{how_long_ago}"
+ friends_since: "yn ffrindiau ers: %{how_long_ago}"
+ save: "arbed"
+ are_you_sure: "Ydych chi'n sicr?"
+ remove_friend: "dileu ffrind"
\ No newline at end of file
diff --git a/config/locales/de.yml b/config/locales/de.yml
new file mode 100644
index 000000000..1c4dfb4ad
--- /dev/null
+++ b/config/locales/de.yml
@@ -0,0 +1,197 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+# Localization file for German. Add more files in this directory for other locales.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+de:
+ hello: "Hallo Welt"
+ application:
+ helper:
+ unknown_person: "unbekannte Person"
+ new_requests: "neue Anfrage"
+ dashboards:
+ helper:
+ home: "home"
+ error_messages:
+ helper:
+ invalid_fields: "Ungültige Felder"
+ correct_the_following_errors_and_try_again: "Korrigiere die folgenden Fehler und probier es erneut."
+ people:
+ helper:
+ results_for: " resultados para %{params}"
+ people_on_pod_are_aware_of: " gente en pod estan al tanto de "
+ layouts:
+ application:
+ edit_profile: "Profil bearbeiten"
+ logout: "Abmelden"
+ shared:
+ aspect_nav:
+ all_aspects: "Alle Aspekte"
+ manage: "Verwalten"
+ manage_your_aspects: "Aspekte verwalten"
+ sub_header:
+ all_aspects: "Alle Aspekte"
+ manage_aspects: "Aspekte verwalten"
+ publisher:
+ share: "Teilen"
+ aspect_friends:
+ add_friends: "Freunde hinzufügen"
+ albums:
+ album:
+ you: "dir"
+ new_album:
+ create: "erstellen"
+ add_a_new_album: "Album hinzufügen"
+ show:
+ edit_album: "Album bearbeiten"
+ albums: "Alben"
+ updated: "aktualisiert"
+ by: "von"
+ edit:
+ editing: "Bearbeite"
+ updated: "geändert"
+ are_you_sure: "Bist du sicher?"
+ delete_album: "Album löschen"
+ cancel: "Abbrechen"
+ index:
+ home: "Startseite"
+ new_album: "Neues Album"
+ create:
+ success: "Du hast das Album %{name} erstellt."
+ update:
+ success: "Album %{name} erfolgreich geändert."
+ failure: "%{name} wurde nicht geändert."
+ destroy:
+ success: "Album %{name} gelöscht."
+ helper:
+ friends_albums: "Alben von Freunden"
+ your_albums: "Deine Alben"
+ aspects:
+ index:
+ photos: "Fotos"
+ show:
+ photos: "Fotos"
+ manage:
+ add_a_new_aspect: "Neuen Aspekt erstellen"
+ add_a_new_friend: "Freund hinzufügen"
+ show: "Anzeigen"
+ update_aspects: "Aspekte aktualisieren"
+ requests: "Anfragen"
+ ignore_remove: "Ignorieren/Entfernen"
+ new_aspect:
+ add_a_new_aspect: "Neuen Aspekt erstellen"
+ create: "Erstellen"
+ create:
+ success: "Klicke auf das Plus auf der rechten Seite um Diaspora mitzuteilen wer deinen neuen Aspekt sehen kann."
+ destroy:
+ success: "%{name} wurde erfolgreich gelöscht."
+ update:
+ success: "Dein Aspekt, %{name}, wurde erfolgreich geändert."
+ move_friends:
+ failure: "Aspect editing failed for friend %{real_name}."
+ success: "Aspekt erfolgreich geändert."
+ move_friend:
+ error: "didn't work %{inspect}"
+ notice: "You are now showing your friend a different aspect of yourself."
+ helper:
+ remove: "remove"
+ aspect_not_empty: "Aspekt ist nicht leer"
+ users:
+ edit:
+ cancel: "Abbrechen"
+ update_profile: "Profil aktualisieren"
+ home: "Startseite"
+ diaspora_username: "Diaspora Benutzername"
+ info: "Info"
+ picture: "Bild"
+ editing_profile: "Profil bearbeiten"
+ albums: "Alben"
+ you_dont_have_any_photos: "#TODO"
+ page_to_upload_some: "#TODO"
+ comments:
+ comment:
+ # this won't work in german at all. Needs more thorough I18n
+ ago: "ago"
+ new_comment:
+ comment: "Kommentar"
+ photos:
+ show:
+ prev: "zurück"
+ full_size: "volle Größe"
+ next: "vor"
+ edit_photo: "Foto bearbeiten"
+ delete_photo: "Foto löschen"
+ are_you_sure: "Bist du sicher?"
+ comments: "Kommentare"
+ edit:
+ editing: "Bearbeite"
+ are_you_sure: "Bist du sicher?"
+ delete_photo: "Foto löschen"
+ photo:
+ show_comments: "Kommentare anzeigen"
+ posted_a_new_photo_to: "posted a new photo to"
+ new:
+ new_photo: "Foto erstellen"
+ back_to_list: "Zurück zur Liste"
+ post_it: "Hochladen"
+ 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: "Foto erfolgreich aktualisiert."
+ error: "Failed to edit photo."
+ destroy:
+ notice: "Foto gelöscht."
+ registrations:
+ new:
+ sign_up: "Anmelden"
+ create:
+ success: "Du bist Diaspora beigetreten!"
+ status_messages:
+ new_status_message:
+ tell_me_something_good: "Erzähl' mir was schönes!"
+ oh_yeah: "Hey, super!"
+ status_message:
+ show_comments: "Kommentare anzeigen"
+ delete: "Löschen"
+ are_you_sure: "Bist du sicher?"
+ show:
+ status_message: "Statusmeldung"
+ comments: "Kommentare"
+ are_you_sure: "Bist du sicher?"
+ destroy: "Löschen"
+ view_all: "Alle anzeigen"
+ message: "Nachricht"
+ owner: "Besitzer"
+ helper:
+ no_message_to_display: "No message to display."
+ people:
+ index:
+ add_friend: "Freund hinzufügen"
+ real_name: "real name"
+ diaspora_handle: "diaspora handle"
+ thats_you: "das bist du!"
+ friend_request_pending: "Freundschaftsanfrage ausstehend"
+ you_have_a_friend_request_from_this_person: "du hast eine Freundschaftsanfrage von dieser Person"
+ new:
+ new_person: "Neue Person"
+ back_to_list: "Zurück zur Liste"
+ show:
+ last_seen: "zuletzt gesehen: %{how_long_ago}"
+ friends_since: "Freunde seit: %{how_long_ago}"
+ save: "save"
+ are_you_sure: "Bist du sicher?"
+ remove_friend: "remove friend"
+ destroy:
+ success: "Ihr seid jetzt Freunde."
+ error: "Bitte wähle einen Aspekt aus!"
+ ignore: "Freundschaftsanfrage ignorieren."
+ create:
+ error: "No diaspora seed found with this email!"
+ already_friends: "Du bist bereits mit %{destination_url} befreundet!"
+ success: "Eine Freundschaftsanfrage wurde an %{destination_url} gesendet."
+ horribly_wrong: "Etwas ging tierisch schief."
diff --git a/config/locales/defaults/es.yml b/config/locales/defaults/es.yml
new file mode 100644
index 000000000..ad1db8794
--- /dev/null
+++ b/config/locales/defaults/es.yml
@@ -0,0 +1,264 @@
+# Spanish translations for Rails
+# by Francisco Fernando García Nieto (ffgarcianieto@gmail.com)
+
+"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
+
+ # 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
diff --git a/config/locales/devise.cs.yml b/config/locales/devise.cs.yml
new file mode 100644
index 000000000..34d9eb7c1
--- /dev/null
+++ b/config/locales/devise.cs.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+cs:
+ errors:
+ messages:
+ not_found: "nenalezeno"
+ already_confirmed: "již bylo potvrzeno"
+ not_locked: "nebylo zamčeno"
+
+ devise:
+ failure:
+ unauthenticated: 'Pro pokračování se musíte přihlásit nebo si vytvořit účet.'
+ unconfirmed: 'Před pokračováním musíte potvrdit svůj účet.'
+ locked: 'Váš účet je uzamčen.'
+ invalid: 'Neplatný email nebo heslo.'
+ invalid_token: 'Neplatný autentizační token.'
+ timeout: 'Vaše sezení vypršelo, pro pokračování se prosím přihlašte znovu.'
+ inactive: 'Váš účet ještě nebyl aktivován.'
+ sessions:
+ signed_in: 'Přihlášení proběhlo úspěšně.'
+ signed_out: 'Odhlášení proběhlo úspěšně.'
+ passwords:
+ send_instructions: 'Běhěm několika minut obdržíte email s instrukcemi k resetnutí hesla.'
+ updated: 'Vaše heslo bylo úspěšně změněno. Nyní jste přihlášeni'
+ confirmations:
+ send_instructions: 'Během několika minut obdržíte email s instrukcemi k potvrzení vašeho účtu.'
+ confirmed: 'Váš účet byl uspěšně potvrzen. Nyní jste přihlášeni.'
+ registrations:
+ signed_up: 'Úspěšně jste vytvořili účet. Pokud je tak server nastaven, byl vám zaslán potvrzovací email.'
+ updated: 'Úspěšně jste upravili svůj účet.'
+ destroyed: 'Sbohem! Váš účet byl úspěšně zrušen. Brzy naviděnou.'
+ unlocks:
+ send_instructions: 'Během několika minut obdržíte email s instrukcemi k odemknutí vašeho účtu.'
+ unlocked: 'Váš účet byl úspěšně odemknut. Nyní jste přihlášeni.'
+ mailer:
+ confirmation_instructions: 'Instrukce k potvrzení'
+ reset_password_instructions: 'Instrukce k resetnutí hesla'
+ unlock_instructions: 'Instrukce k odemčení'
diff --git a/config/locales/devise.cy.yml b/config/locales/devise.cy.yml
new file mode 100644
index 000000000..5d6d6049a
--- /dev/null
+++ b/config/locales/devise.cy.yml
@@ -0,0 +1,42 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+cy:
+ errors:
+ messages:
+ not_found: "ni chanfuwyd"
+ already_confirmed: "cadarnhawyd eisioes"
+ not_locked: "heb ei gloi"
+
+ devise:
+ failure:
+ unauthenticated: "Mae angen i chi arwyddo i mewn neu ymuno cyn parhau."
+ unconfirmed: "Rhaid i chi gadarnhau eich cyfrif cyn parhau."
+ locked: "Mae eich cyfrif wedi'i gloi."
+ invalid: "E-bost neu gyfrinair annilys."
+ invalid_token: "Tocyn dilysu annilys."
+ timeout: "Mae eich sesiwn wedi dod i ben, arwyddwch i mewn eto i barhau."
+ inactive: "Nid yw eich cyfrif wedi'i actifadu."
+ sessions:
+ signed_in: "Arwyddwyd i fewn yn llwyddiannus."
+ signed_out: "Arwyddwyd allan yn llwyddiannus."
+ passwords:
+ send_instructions: "Byddwch yn derbyn e-bost â chyfarwyddiadau ar sut i gadarnhau eich cyfrif mewn ychydig funudau."
+ updated: "Newidiwyd eich cyfrinair yn llwyddiannus. Rydych chi wedi arwyddo i fewn."
+ confirmations:
+ send_instructions: "Byddwch yn derbyn e-bost â chyfarwyddiadau ar sut i gadarnhau eich cyfrif mewn ychydig funudau."
+ confirmed: "Cadarnhawyd eich cyfrif yn llwyddiannus. Rydych chi wedi arwyddo i fewn."
+ registrations:
+ signed_up: "Rydych chi wedi arwyddo i fyny yn llwyddiannus. Anfonwyd cadarnhad at eich e-bost os yw wedi'i alluogi."
+ updated: "Diweddarwyd eich cyfrif yn llwyddiannus."
+ destroyed: "Hwyl fawr! Canslwyd eich cyfrif yn llwyddiannus. Rydym yn gobeithio gweld chi eto yn fuan."
+ unlocks:
+ send_instructions: "Byddwch yn derbyn e-bost gyda cyfarwyddiadau ar sut i agor eich cyfrif mewn ychydig funudau."
+ unlocked: "Datglowyd eich cyfrif yn llwyddiannus. Rydych chi wedi arwyddo i fewn."
+ mailer:
+ confirmation_instructions: "Cyfarwyddiadau cadarnhad."
+ reset_password_instructions: "Ailosod cyfarwyddiadau cyfrinair"
+ unlock_instructions: "Cyfarwyddiadau Datgloi"
+
diff --git a/config/locales/devise.de.yml b/config/locales/devise.de.yml
new file mode 100644
index 000000000..7c0e0e758
--- /dev/null
+++ b/config/locales/devise.de.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+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
new file mode 100644
index 000000000..06002aa63
--- /dev/null
+++ b/config/locales/devise.es.yml
@@ -0,0 +1,42 @@
+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.fi.yml b/config/locales/devise.fi.yml
new file mode 100644
index 000000000..9109b40a8
--- /dev/null
+++ b/config/locales/devise.fi.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+# Translator: jarkko moilanen, jm60697@gmail.com
+
+fi:
+ errors:
+ messages:
+ not_found: "ei löytynyt"
+ already_confirmed: "oli jo varmistettu"
+ not_locked: "ei ollut lukittu"
+
+ devise:
+ failure:
+ unauthenticated: 'Kirjaudu tai rekisteröidy ennen kuin voit jatkaa.'
+ unconfirmed: 'Sinun täytyy vahvistaa käyttäjätilisi ennen kuin voit jatkaa'
+ locked: 'Käyttäjätilisi on lukittu.'
+ invalid: 'Väärä sähköpostiosoite tai salasana.'
+ invalid_token: 'Viallinen todennus.'
+ timeout: 'Istunto on vanhentunut, kirjaudu uudelleen.'
+ inactive: 'Käyttätiliäsi ei ole vielä vahvistettu.'
+ sessions:
+ signed_in: 'Sisäänkirjautuminen onnistui.'
+ signed_out: 'Uloskirjautuminen onnistui.'
+ passwords:
+ send_instructions: 'Saat hetken päästä sähköpostiisi ohjeet siitä miten määrität salasanasi uudelleen.'
+ updated: 'Salasanasi on vaihdettu. Olet nyt kirjautunut sisään.'
+ confirmations:
+ send_instructions: 'Saat hetken päästä sähköpostiisi ohjeet siitä miten vahvistat käyttäjätilisi luonnin.'
+ confirmed: 'Käyttäjätilisi luonti on vahvistettu. Olet nyt kirjautunut sisään.'
+ registrations:
+ signed_up: 'Käyttäjätilin luominen onnistui. Mahdollinen vahvistuspyyntö on lähetetty sähköpostiisi.'
+ updated: 'Käyttäjätilisi on päivitetty.'
+ destroyed: 'Näkemiin! Käyttäjätilisi on poistettu. Toivottavasti näemme sinut pian uudelleen.'
+ unlocks:
+ send_instructions: 'Saat muutaman minuutin kuluttua sähköpostiisi ohjeet siitä miten avaat lukituksen.'
+ unlocked: 'Käyttäjätilisi lukitus on avattu. Olet nyt kirjautunut sisään.'
+ mailer:
+ confirmation_instructions: 'Ohjeet vahvistamiseen/todentamiseen'
+ reset_password_instructions: 'Ohjeet salananan uudelleenmäärittämiseksi'
+ unlock_instructions: 'Ohjeet lukituksen poistamiseksi'
diff --git a/config/locales/devise.fr.yml b/config/locales/devise.fr.yml
new file mode 100644
index 000000000..b8691eb3a
--- /dev/null
+++ b/config/locales/devise.fr.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+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
index d1105b15a..76f761e37 100644
--- a/config/locales/devise.it.yml
+++ b/config/locales/devise.it.yml
@@ -1,43 +1,41 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
-#
-# 1st DRAFT of the italian translation
-# 09/2010 Guido Serra aka Zeph
+
it:
errors:
messages:
not_found: "non trovato"
- already_confirmed: "era già stato confermato"
- not_locked: "non era protetto"
+ already_confirmed: "è già stato confermato"
+ not_locked: "non era bloccato"
devise:
failure:
- unauthenticated: 'Devi identificarti o registrarti prima di poter continuare.'
- unconfirmed: 'Devi confermare il tuo account prima di continuare.'
- locked: 'Il tuo account è protetto.'
- invalid: 'Email o password errata.'
- invalid_token: 'Token identificativo non valido.'
- timeout: 'Sessione scaduta, riautenticati per poter continuare.'
- inactive: 'Il tuo account non è stato ancora 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: 'Autenticato correttamente.'
- signed_out: 'Uscito correttamente.'
+ signed_in: "Accesso effettuato con successo."
+ signed_out: "Disconnessione effettuata con successo."
passwords:
- send_instructions: 'Riceverai, a breve, una mail con le istruzioni per proseguire.'
- updated: 'La tua parola chiave è stata cambiata correttamente, sei autenticato.'
+ 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: 'Riceverai una email con le istruzioni, per confermare la tua utenza, in pochi minuti.'
- confirmed: 'Accesso confermato correttamente, sei ora 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: 'Registrazione andata a buon fine. Se abilitata, riceverai un email di conferma.'
- updated: 'Dati aggiornati correttamente.'
- destroyed: 'Utenza rimossa, 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: 'Riceverai una email con le istruzioni per sbloccare la tua utenza.'
- unlocked: 'Utenza sbloccata, 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 di conferma di un utenza'
- reset_password_instructions: 'Istruzioni per reinizializzare la parola chiave'
- unlock_instructions: 'Istruzioni per sbloccare un utenza'
+ 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.lt.yml
new file mode 100644
index 000000000..d6e33c1cb
--- /dev/null
+++ b/config/locales/devise.lt.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+lt:
+ errors:
+ messages:
+ not_found: "nerasta"
+ already_confirmed: "jau patvirtinta"
+ not_locked: "nebuvo užrakinta"
+
+ devise:
+ failure:
+ unauthenticated: 'Norint tęsti, reikia prisijungti arba susikurti paskyrą.'
+ unconfirmed: 'Norint prisijungti, reikia patvirtinti savo paskyrą.'
+ locked: 'Jūsų paskyra yra užrakinta.'
+ invalid: 'Neteisingas el. pašto adresas arba slaptažodis.'
+ invalid_token: 'Neteisingas prisijungimo raktas.'
+ timeout: 'Sesija baigėsi. Norint tęsti, reikia prisijungti iš naujo.'
+ inactive: 'Paskyra dar neaktyvuota.'
+ sessions:
+ signed_in: 'Sėkmingai prisijungta.'
+ signed_out: 'Sėkmingai atsijungta.'
+ passwords:
+ send_instructions: 'Netrukus gausite el. laišką su nurodymais slaptažodžiui atstatyti.'
+ updated: 'Slaptažodis pakeistas sėkmingai. Jūs esate prisijungęs.'
+ confirmations:
+ send_instructions: 'Netrukus gausite el. laišką su nurodymais paskyros patvirtinimui.'
+ confirmed: 'Paskyra patvirtinta. Prisijungėte.'
+ registrations:
+ signed_up: 'Prisijungta sėkmingai. Jei nustatyta, patvirtinimas išsiųstas į jūsų el. paštą.'
+ updated: 'Paskyra atnaujinta sėkmingai.'
+ destroyed: 'Paskyra sėkmingai atšaukta. Iki pasimatymo!'
+ unlocks:
+ send_instructions: 'Netrukus gausite el. laišką su nurodymais paskyros atrakinimui.'
+ unlocked: 'Paskyra atrakinta. Prisijungėte.'
+ mailer:
+ confirmation_instructions: 'Nurodymai patvirtinimui'
+ reset_password_instructions: 'Nurodymai slaptažodžio atstatymui'
+ unlock_instructions: 'Nurodymai paskyros atrakinimui'
diff --git a/config/locales/devise.pl.yml b/config/locales/devise.pl.yml
new file mode 100644
index 000000000..a490a1a39
--- /dev/null
+++ b/config/locales/devise.pl.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+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.pt-BR.yml b/config/locales/devise.pt-BR.yml
new file mode 100644
index 000000000..ba2b3b5de
--- /dev/null
+++ b/config/locales/devise.pt-BR.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+pt-BR:
+ errors:
+ messages:
+ not_found: "não encontrado"
+ already_confirmed: "já foi confirmado"
+ not_locked: "não foi bloqueado"
+
+ devise:
+ failure:
+ unauthenticated: 'Você precisa fazer login ou se cadastrar antes de continuar.'
+ unconfirmed: 'Você tem que confirmar a sua conta antes de continuar.'
+ locked: 'Sua conta está bloqueada.'
+ invalid: 'E-mail ou senha inválida.'
+ invalid_token: 'Token de autenticação inválida.'
+ timeout: 'Sua sessão expirou, por favor logue-se novamente para continuar.'
+ inactive: 'Sua conta ainda não foi ativada.'
+ sessions:
+ signed_in: 'Você entrou com sucesso.'
+ signed_out: 'Você saiu com sucesso.'
+ passwords:
+ send_instructions: 'Você receberá um email com instruções sobre como redefinir sua senha em alguns minutos.'
+ updated: 'Sua senha foi alterada com sucesso.'
+ confirmations:
+ send_instructions: 'Você receberá um email em alguns minutos com as instruções sobre como confirmar a sua conta.'
+ confirmed: 'Sua conta foi confirmada com sucesso. Você já pode continuar navegando.'
+ registrations:
+ signed_up: 'Você se inscreveu com êxito. Se habilitado, a confirmação foi enviada para seu e-mail.'
+ updated: 'Você atualizou a sua conta com sucesso.'
+ destroyed: 'Sua conta foi cancelada com sucesso. Esperamos vê-lo novamente em breve.'
+ unlocks:
+ send_instructions: 'Você receberá um email em alguns minutos com as instruções sobre como desbloquear a sua conta.'
+ unlocked: 'Sua conta foi desbloqueada com sucesso. Você já pode continuar navegando.'
+ mailer:
+ confirmation_instructions: 'Instruções para confirmarção'
+ reset_password_instructions: 'Instruções para redefinir a senha'
+ unlock_instructions: 'Instruções para o desbloqueio'
diff --git a/config/locales/devise.pt-PT.yml b/config/locales/devise.pt-PT.yml
new file mode 100644
index 000000000..cf16fd20d
--- /dev/null
+++ b/config/locales/devise.pt-PT.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+pt-PT:
+ errors:
+ messages:
+ not_found: "não foi encontrado"
+ already_confirmed: "já foi confirmado"
+ not_locked: "não foi bloqueado"
+
+ devise:
+ failure:
+ unauthenticated: 'Faça login ou registre-se antes de continuar.'
+ unconfirmed: 'Confirme a sua conta antes de continuar.'
+ locked: 'A sua conta foi bloqueada.'
+ invalid: 'Endereço de correio ou senha inválida.'
+ invalid_token: 'Token de autenticação inválido.'
+ timeout: 'A sua sessão expirou, por favor faça login novamente para continuar.'
+ inactive: 'A sua conta ainda não foi activada.'
+ sessions:
+ signed_in: 'Login com sucesso.'
+ signed_out: 'Logout com sucesso.'
+ passwords:
+ send_instructions: 'Vai receber um email com instruções sobre como alterar a sua senha dentro de alguns minutos.'
+ updated: 'A sua senha foi alterada com sucesso. Está on-line.'
+ confirmations:
+ send_instructions: 'Vai receber um email com instruções sobre como confirmar a sua conta dentro de alguns minutos.'
+ confirmed: 'A sua conta foi confirmada com sucesso. Está on-line.'
+ registrations:
+ signed_up: 'Registou-se com sucesso. Se ligado, a confirmação foi enviada para o seu email.'
+ updated: 'Actualizou a sua conta com sucesso.'
+ destroyed: 'Adeus! A sua conta foi cancelada com sucesso. Esperamos vê-lo de novo brevemente.'
+ unlocks:
+ send_instructions: 'Vai receber uma mensagem sobre como desbloquear a sua conta dentro de alguns minutos.'
+ unlocked: 'A sua conta foi desbloqueada com sucesso. Está on-line.'
+ mailer:
+ confirmation_instructions: 'Instruções de confirmação'
+ reset_password_instructions: 'Instruções para alterar a sua senha'
+ unlock_instructions: 'Instruções para desbloquear'
diff --git a/config/locales/devise.ro.yml b/config/locales/devise.ro.yml
new file mode 100644
index 000000000..63501ea7b
--- /dev/null
+++ b/config/locales/devise.ro.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+ro:
+ errors:
+ messages:
+ not_found: "inexistent"
+ already_confirmed: "a fost deja confirmat"
+ not_locked: "nu a fost blocat"
+
+ devise:
+ failure:
+ unauthenticated: 'Pentru a continuna, înregistrați-vă.'
+ unconfirmed: 'Pentru a continua, confirmați contul dvs.'
+ locked: 'Contul dvs. este blocat.'
+ invalid: 'Email sau parolă incorectă.'
+ invalid_token: 'Cheie de autentificare invalidă.'
+ timeout: 'Sesiunea dvs. a expirat, autentificați-vă din nou pentru a continua.'
+ inactive: 'Contul dvs. încă nu a fost activat.'
+ sessions:
+ signed_in: 'Autentificare cu succes.'
+ signed_out: 'Deconectare cu succes.'
+ passwords:
+ send_instructions: 'În scurt timp veți primi un email cu instrucțiuni pentru resetarea parolei.'
+ updated: 'Parolă schimbată cu success. Sunteți acum autentificat(ă).'
+ confirmations:
+ send_instructions: 'În scurt timp veți primi un email cu instrucțiuni pentru confirmarea contului.'
+ confirmed: 'Contul dvs. a fost confirmat cu succes. Sunteți acum autentificat(ă).'
+ registrations:
+ signed_up: 'Sunteți autentificat(ă). Dacă este cazul, un mesaj de confirmare a fost trimis pe email-ul dvs.'
+ updated: 'Cont actualizat cu succes.'
+ destroyed: 'Pa! Contul dvs. a fost dezactivat cu succes. Sperăm să vă revedem în curând.'
+ unlocks:
+ send_instructions: 'În scurt timp veți primi un email cu instrucțiuni pentru deblocarea contului.'
+ unlocked: 'Cont deblocat cu succes. Sunteți acum autentificat(ă).'
+ mailer:
+ confirmation_instructions: 'Instrucțiuni pentru confirmarea contului.'
+ reset_password_instructions: 'Instrucțiuni pentru resetarea parolei.'
+ unlock_instructions: 'Instrucțiuni pentru deblocare contului.'
diff --git a/config/locales/devise.ru.yml b/config/locales/devise.ru.yml
new file mode 100644
index 000000000..670d57026
--- /dev/null
+++ b/config/locales/devise.ru.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+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.sv.yml b/config/locales/devise.sv.yml
new file mode 100644
index 000000000..b434666ce
--- /dev/null
+++ b/config/locales/devise.sv.yml
@@ -0,0 +1,40 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+sv:
+ errors:
+ messages:
+ not_found: "kan ej hitta"
+ not_locked: "var ej låst"
+
+ devise:
+ failure:
+ unauthenticated: 'Du måste logga in innan du kan fortsätta.'
+ unconfirmed: 'Du måste verifiera ditt konto innan du kan fortsätta.'
+ locked: 'Ditt konto är låst.'
+ invalid: 'Felaktig användare eller lösenord.'
+ invalid_token: 'Ogiltig identifiering.'
+ timeout: 'Din session är avslutad, var vänlig logga in igen.'
+ inactive: 'Ditt konto är inte aktiverat.'
+ sessions:
+ signed_in: 'Inloggning ok.'
+ signed_out: 'Utloggning ok.'
+ passwords:
+ send_instructions: 'Du kommer att få ett ebrev med instruktioner för att återställa lösenordet inom några minuter.'
+ updated: 'Ditt lösenord har ändrats och du är inloggad.'
+ confirmations:
+ send_instructions: 'Du kommer att få ett ebrev med instruktioner för att verifiera ditt konto inom några minuter.'
+ confirmed: 'Ditt konto har verifierats och du är inloggad.'
+ registrations:
+ signed_up: 'Du har skapat ett konto. Beroende på inställningar kan ett ebrev ha skickats till dig.'
+ updated: 'Ditt konto har uppdateras.'
+ destroyed: 'Ditt konto är avslutat. Välkommen åter!'
+ unlocks:
+ send_instructions: 'Du kommer att få ett ebrev med instruktioner för att låsa upp ditt konto inom några minuter.'
+ unlocked: 'Ditt konto har är nu upplåst och du är inloggad'
+ mailer:
+ confirmation_instructions: 'Instruktioner för att verifiera ditt konto.'
+ reset_password_instructions: 'Instruktioner för att terställa ditt lösenord.'
+ unlock_instructions: 'Instruktioner för att låsa upp ditt konto.'
diff --git a/config/locales/devise/devise.de.yml b/config/locales/devise/devise.de.yml
new file mode 100644
index 000000000..7c0e0e758
--- /dev/null
+++ b/config/locales/devise/devise.de.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+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.en.yml b/config/locales/devise/devise.en.yml
similarity index 100%
rename from config/locales/devise.en.yml
rename to config/locales/devise/devise.en.yml
diff --git a/config/locales/devise/devise.es.yml b/config/locales/devise/devise.es.yml
new file mode 100644
index 000000000..70209ff79
--- /dev/null
+++ b/config/locales/devise/devise.es.yml
@@ -0,0 +1,42 @@
+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 poco 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.'
+ 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/devise.fr.yml b/config/locales/devise/devise.fr.yml
new file mode 100644
index 000000000..b8691eb3a
--- /dev/null
+++ b/config/locales/devise/devise.fr.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+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/devise.it.yml b/config/locales/devise/devise.it.yml
new file mode 100644
index 000000000..9b0fb0957
--- /dev/null
+++ b/config/locales/devise/devise.it.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+it:
+ errors:
+ messages:
+ not_found: "non trovato"
+ already_confirmed: "già confermato"
+ not_locked: "non 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.'
+ sessions:
+ signed_in: 'Collegamento avvenuto con successo.'
+ signed_out: 'Uscita avvenuta 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.'
+ 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.'
+ 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.'
+ 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.'
+ mailer:
+ confirmation_instructions: 'Istruzioni per la conferma'
+ reset_password_instructions: 'Istruzioni per il reset della password'
+ unlock_instructions: 'Istruzioni per lo sblocco'
diff --git a/config/locales/devise/devise.pl.yml b/config/locales/devise/devise.pl.yml
new file mode 100644
index 000000000..a490a1a39
--- /dev/null
+++ b/config/locales/devise/devise.pl.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+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/devise.ru.yml b/config/locales/devise/devise.ru.yml
new file mode 100644
index 000000000..670d57026
--- /dev/null
+++ b/config/locales/devise/devise.ru.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+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/en.yml b/config/locales/en.yml
index 1de275cf9..8e6542639 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -8,3 +8,198 @@
en:
hello: "Hello world"
+ application:
+ helper:
+ unknown_person: "unknown person"
+ new_requests: "new requests"
+ dashboards:
+ helper:
+ home: "home"
+ error_messages:
+ helper:
+ invalid_fields: "Invalid Fields"
+ correct_the_following_errors_and_try_again: "Correct the following errors and try again."
+ people:
+ helper:
+ results_for: " results for %{params}"
+ people_on_pod_are_aware_of: " people on pod are aware of"
+ layouts:
+ application:
+ edit_profile: "edit profile"
+ logout: "logout"
+ shared:
+ aspect_nav:
+ all_aspects: "All Aspects"
+ manage: "Manage"
+ manage_your_aspects: "Manage your Aspects"
+ sub_header:
+ all_aspects: "All Aspects"
+ manage_aspects: "Manage Aspects"
+ publisher:
+ share: "Share"
+ aspect_friends:
+ add_friends: "add friends"
+ albums:
+ album:
+ you: "you"
+ new_album:
+ create: "create"
+ add_a_new_album: "Add a new album"
+ show:
+ edit_album: "Edit Album"
+ albums: "albums"
+ updated: "updated"
+ by: "by"
+ edit:
+ editing: "Editing"
+ updated: "updated"
+ are_you_sure: "Are you sure?"
+ delete_album: "Delete Album"
+ cancel: "Cancel"
+ index:
+ home: "home"
+ new_album: "New Album"
+ create:
+ success: "You've created an album called %{name}."
+ update:
+ success: "Album %{name} successfully edited."
+ failure: "Failed to edit album %{name}."
+ destroy:
+ success: "Album %{name} deleted."
+ helper:
+ friends_albums: "Friends Albums"
+ your_albums: "Your Albums"
+ aspects:
+ index:
+ photos: "photos"
+ show:
+ photos: "photos"
+ manage:
+ add_a_new_aspect: "Add a new aspect"
+ add_a_new_friend: "Add a new friend"
+ show: "Show"
+ update_aspects: "Update Aspects"
+ requests: "Requests"
+ ignore_remove: "Ignore/Remove"
+ new_aspect:
+ add_a_new_aspect: "Add a new aspect"
+ create: "Create"
+ create:
+ success: "Click on the plus on the left side to tell Diaspora who can see your new aspect."
+ destroy:
+ success: "%{name} was successfully removed."
+ update:
+ success: "Your aspect, %{name}, has been successfully edited."
+ move_friends:
+ failure: "Aspect editing failed for friend %{real_name}."
+ success: "Aspects edited successfully."
+ move_friend:
+ failure: "didn't work %{inspect}"
+ success: "You are now showing your friend a different aspect of yourself."
+ helper:
+ remove: "remove"
+ aspect_not_empty: "Aspect not empty"
+ users:
+ edit:
+ cancel: "Cancel"
+ update_profile: "Update Profile"
+ home: "Home"
+ diaspora_username: "DIASPORA USERNAME"
+ info: "Info"
+ picture: "Picture"
+ editing_profile: "Editing profile"
+ albums: "Albums"
+ you_dont_have_any_photos: "You don't have any photos! Go to the"
+ page_to_upload_some: "page to upload some."
+ comments:
+ comment:
+ ago: "ago"
+ new_comment:
+ comment: "Comment"
+ photos:
+ show:
+ prev: "prev"
+ full_size: "full size"
+ next: "next"
+ edit_photo: "Edit Photo"
+ delete_photo: "Delete Photo"
+ are_you_sure: "Are you sure?"
+ comments: "comments"
+ edit:
+ editing: "Editing"
+ are_you_sure: "Are you sure?"
+ delete_photo: "Delete Photo"
+ photo:
+ show_comments: "show comments"
+ posted_a_new_photo_to: "posted a new photo to"
+ new:
+ new_photo: "New Photo"
+ back_to_list: "Back to List"
+ post_it: "post it!"
+ 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: "Sign up"
+ create:
+ success: "You've joined Diaspora!"
+ status_messages:
+ new_status_message:
+ tell_me_something_good: "tell me something good"
+ oh_yeah: "oh yeah!"
+ status_message:
+ show_comments: "show comments"
+ delete: "Delete"
+ are_you_sure: "Are you sure?"
+ show:
+ status_message: "Status Message"
+ comments: "comments"
+ are_you_sure: "Are you sure?"
+ destroy: "Destroy"
+ view_all: "View All"
+ message: "Message"
+ owner: "Owner"
+ helper:
+ no_message_to_display: "No message to display."
+ people:
+ person:
+ add_friend: "add friend"
+ pending_request: "pending request"
+ index:
+ add_friend: "add friend"
+ real_name: "real name"
+ diaspora_handle: "diaspora handle"
+ thats_you: "that's you!"
+ friend_request_pending: "friend request pending"
+ you_have_a_friend_request_from_this_person: "you have a friend request from this person"
+ new:
+ new_person: "New Person"
+ back_to_list: "Back to List"
+ show:
+ last_seen: "last seen: %{how_long_ago}"
+ friends_since: "friends since: %{how_long_ago}"
+ save: "save"
+ are_you_sure: "Are you sure?"
+ remove_friend: "remove friend"
+ requests:
+ new_request:
+ add_a_new_friend_to: "Add a new friend to"
+ enter_a_diaspora_username: "Enter a Diaspora username:"
+ your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}"
+ friends_username: "Friend's username"
+ destroy:
+ success: "You are now friends."
+ error: "Please select an aspect!"
+ ignore: "Ignored friend request."
+ create:
+ error: "No diaspora seed found with this email!"
+ already_friends: "You are already friends with %{destination_url}!"
+ success: "A friend request was sent to %{destination_url}."
+ horribly_wrong: "Something went horribly wrong."
diff --git a/config/locales/es.yml b/config/locales/es.yml
new file mode 100644
index 000000000..5af6c70aa
--- /dev/null
+++ b/config/locales/es.yml
@@ -0,0 +1,202 @@
+# 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"
diff --git a/config/locales/fi.yml b/config/locales/fi.yml
new file mode 100644
index 000000000..5e1a6da32
--- /dev/null
+++ b/config/locales/fi.yml
@@ -0,0 +1,10 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+# Translator jarkko moilanen, jm60697@gmail.com
+
+# Sample localization file for English. Add more files in this directory for other locales.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+fi:
+ hello: "Terve, maailma"
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
new file mode 100644
index 000000000..9754f52a0
--- /dev/null
+++ b/config/locales/fr.yml
@@ -0,0 +1,160 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+# Localization file for French. Add more files in this directory for other locales.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+fr:
+ hello: "Bonjour tout le monde"
+ application:
+ helper:
+ unknown_person: "unknown person"
+ new_requests: "new requests"
+ dashboards:
+ helper:
+ home: "home"
+ error_messages:
+ helper:
+ invalid_fields: "Invalid Fields"
+ correct_the_following_errors_and_try_again: "Correct the following errors and try again."
+ people:
+ helper:
+ results_for: " resultados para %{params}"
+ people_on_pod_are_aware_of: " gente en pod estan al tanto de "
+ layouts:
+ application:
+ edit_profile: "Éditez votre profil"
+ logout: "Déconnexion"
+ shared:
+ aspect_nav:
+ all_aspects: "Tous les Aspects"
+ manage: "Gérez"
+ manage_your_aspects: "Gérez vos Aspects"
+ sub_header:
+ all_aspects: "Tous les Aspects"
+ manage_aspects: "Gérez vos Aspects"
+ publisher:
+ share: "Partager"
+ aspect_friends:
+ add_friends: "Ajouter des amis"
+ albums:
+ album:
+ you: "vous"
+ new_album:
+ create: "créer"
+ add_a_new_album: "Ajouter un nouvel album"
+ show:
+ edit_album: "Éditer l’album"
+ albums: "albums"
+ updated: "mis à jour"
+ by: "par"
+ edit:
+ editing: "Édition"
+ updated: "mis à jour"
+ are_you_sure: "Êtes-vous sûr?"
+ delete_album: "Supprimer l'album"
+ cancel: "Annuler"
+ index:
+ home: "accueil"
+ new_album: "Nouvel album"
+ helper:
+ friends_albums: "Friends Albums"
+ your_albums: "Your Albums"
+ create:
+ success: "Tu as créé un album nommé %{name}."
+ update:
+ success: "L’album %{name} a été édité avec succès."
+ failure: "L’édition de l’album %{name} a échoué."
+ destroy:
+ success: "L’album %{name} a été supprimé."
+ aspects:
+ index:
+ photos: "photos"
+ show:
+ photos: "photos"
+ manage:
+ add_a_new_aspect: "Ajouter un nouvel aspect"
+ add_a_new_friend: "Ajouter un nouvel amis"
+ show: "Voir"
+ update_aspects: "Mettre à jour les aspects"
+ requests: "Requêtes"
+ ignore_remove: "Ignorer/Supprimer"
+ new_aspect:
+ add_a_new_aspect: "Ajouter un nouvel aspect"
+ create: "Créer"
+ create:
+ success:"Cliquez sur plus situé sur le côté gauche afin d’en informer Diaspora qui peut voir votre nouvel aspect."
+ users:
+ edit:
+ cancel: "Annuler"
+ update_profile: "Mettre à jour le profil"
+ home: "Accueil"
+ diaspora_username: "NOM D’UTILISATEUR DIASPORA"
+ info: "Information"
+ picture: "Image"
+ editing_profile: "Édition du profil"
+ albums: "Albums"
+ you_dont_have_any_photos: "Vous n’avez aucune photo ! Rendez-vous sur la page"
+ page_to_upload_some: "afin d’en transférer quelques-unes."
+ comments:
+ comment:
+ ago: "il y a"
+ new_comment:
+ comment: "Commentaire"
+ photos:
+ show:
+ prev: "précédent"
+ full_size: "taille réelle"
+ next: "suivant"
+ edit_photo: "Éditer la photo"
+ delete_photo: "Supprimer la photo"
+ are_you_sure: "Êtes-vous sûr ?"
+ comments: "commentaires"
+ edit:
+ editing: "Édition"
+ are_you_sure: "Êtes-vous sûr ?"
+ delete_photo: "Supprimer la photo"
+ photo:
+ show_comments: "afficher les commentaires"
+ posted_a_new_photo_to: "a publié une nouvelle photo sur"
+ new:
+ new_photo: "Nouvelle photo"
+ back_to_list: "Retourner à la liste"
+ post_it: "publiez-la !"
+ registrations:
+ new:
+ sign_up: "Inscription"
+ status_messages:
+ new_status_message:
+ tell_me_something_good: "dites-moi quelque chose de bien"
+ oh_yeah: "oh ouais !"
+ status_message:
+ show_comments: "afficher les commentaires"
+ delete: "Supprimer"
+ are_you_sure: "Êtes-vous sûr ?"
+ show:
+ status_message: "Message d’état"
+ comments: "commentaires"
+ are_you_sure: "Êtes-vous sûr ?"
+ destroy: "Détruire"
+ view_all: "Tout voir"
+ message: "Message"
+ owner: "Propriétaire"
+ people:
+ index:
+ add_friend: "ajouter un ami"
+ real_name: "nom réel"
+ diaspora_handle: "maniement de diaspora"
+ thats_you: "c’est vous !"
+ friend_request_pending: "Requête d’ami en attente"
+ you_have_a_friend_request_from_this_person: "vous avez une requête d’ami de la part de cette personne"
+ new:
+ new_person: "Nouvelle personne"
+ back_to_list: "Retourner à la liste"
+ show:
+ last_seen: "dernière connexion : %{how_long_ago}"
+ friends_since: "amis depuis : %{how_long_ago}"
+ save: "sauvegarder"
+ are_you_sure: "Êtes-vous sûr ?"
+ remove_friend: "supprimer un ami"
diff --git a/config/locales/it.yml b/config/locales/it.yml
index cf5f023d2..44f8a8033 100644
--- a/config/locales/it.yml
+++ b/config/locales/it.yml
@@ -3,6 +3,7 @@
# the COPYRIGHT file.
+<<<<<<< HEAD
# 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.
@@ -12,3 +13,10 @@
it:
hello: "Ciao Mondo!"
+=======
+# Sample localization file for Italian. Add more files in this directory for other locales.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+it:
+ hello: "Ciao Mondo"
+>>>>>>> af91eb51b4ff8d001bbdceba4b4e9e45db498190
diff --git a/config/locales/lt.yml b/config/locales/lt.yml
new file mode 100644
index 000000000..e1a529431
--- /dev/null
+++ b/config/locales/lt.yml
@@ -0,0 +1,10 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+# Sample localization file for Lithuanian. Add more files in this directory for other locales.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+lt:
+ hello: "Sveikas pasauli"
diff --git a/config/locales/pl.yml b/config/locales/pl.yml
new file mode 100644
index 000000000..2052779bd
--- /dev/null
+++ b/config/locales/pl.yml
@@ -0,0 +1,10 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+# Sample localization file for English. Add more files in this directory for other locales.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+pl:
+ hello: "Witaj świecie"
diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml
new file mode 100644
index 000000000..10425864b
--- /dev/null
+++ b/config/locales/pt-BR.yml
@@ -0,0 +1,143 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+# Sample localization file for Portuguese Brazilian. Add more files in this directory for other locales.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+pt-BR:
+ hello: "Olá mundo"
+ layouts:
+ application:
+ edit_profile: "editar perfil"
+ logout: "sair"
+ shared:
+ aspect_nav:
+ all_aspects: "Todos Aspectos"
+ manage: "Gerenciar"
+ manage_your_aspects: "Gerencie seus Aspectos"
+ sub_header:
+ all_aspects: "Todos Aspectos"
+ manage_aspects: "Gerenciar Aspectos"
+ publisher:
+ share: "Compartilhar"
+ aspect_friends:
+ add_friends: "adicionar amigos"
+ albums:
+ album:
+ you: "você"
+ new_album:
+ create: "criar"
+ add_a_new_album: "Adicionar novo álbum"
+ show:
+ edit_album: "Editar Álbum"
+ albums: "álbuns"
+ updated: "atualizado"
+ by: "por"
+ edit:
+ editing: "Editando"
+ updated: "atualizado"
+ are_you_sure: "Tem certeza?"
+ delete_album: "Excluir Álbum"
+ cancel: "Cancelar"
+ index:
+ home: "home"
+ new_album: "Novo Álbum"
+ create:
+ success: "Você criou com sucesso um álbum chamado %{name}."
+ update:
+ success: "O álbum %{name} foi editado com sucesso."
+ failure: "Erro ao editar o álbum %{name}."
+ destroy:
+ success: "O álbum %{name} foi excluído com sucesso."
+ aspects:
+ index:
+ photos: "photos"
+ show:
+ photos: "photos"
+ manage:
+ add_a_new_aspect: "Adicionar um novo aspecto"
+ add_a_new_friend: "Adicionar um novo amigo"
+ show: "Exibir"
+ update_aspects: "Atualizar Aspectos"
+ requests: "Solicitações"
+ ignore_remove: "Ignorar/Excluir"
+ new_aspect:
+ add_a_new_aspect: "Adicionar um novo aspecto"
+ create: "Criar"
+ create:
+ success:"Clique no mais(+) do lado esquerdo para dizer ao Diaspora quem pode ver seu novo aspecto."
+ users:
+ edit:
+ cancel: "Cancelar"
+ update_profile: "Atualizar Perfil"
+ home: "Home"
+ diaspora_username: "USUÁRIO DIASPORA"
+ info: "Informações"
+ picture: "Imagem"
+ editing_profile: "Editando perfil"
+ albums: "Álbuns"
+ you_dont_have_any_photos: "Você não possui nenhuma photo! Vá para"
+ page_to_upload_some: "para fazer o upload de alguma."
+ comments:
+ comment:
+ ago: "atrás"
+ new_comment:
+ comment: "Comentário"
+ photos:
+ show:
+ prev: "anterior"
+ full_size: "tamanho máximo"
+ next: "próxima"
+ edit_photo: "Editar Foto"
+ delete_photo: "Excluir Foto"
+ are_you_sure: "Tem certeza?"
+ comments: "comentários"
+ edit:
+ editing: "Editando"
+ are_you_sure: "Tem certeza?"
+ delete_photo: "Excluir Foto"
+ photo:
+ show_comments: "exibir comentários"
+ posted_a_new_photo_to: "enviada um nova foto para"
+ new:
+ new_photo: "Nova Foto"
+ back_to_list: "Voltar para a Lista"
+ post_it: "enviar!"
+ registrations:
+ new:
+ sign_up: "Cadastro"
+ status_messages:
+ new_status_message:
+ tell_me_something_good: "diga-me qualquer coisa legal"
+ oh_yeah: "É isso aí!"
+ status_message:
+ show_comments: "exibir comentários"
+ delete: "Excluir"
+ are_you_sure: "Tem certeza?"
+ show:
+ status_message: "Mensagem de Status"
+ comments: "comentários"
+ are_you_sure: "Tem certeza?"
+ destroy: "Excluir"
+ view_all: "Exibir Todas"
+ message: "Mensagem"
+ owner: "Pertence a"
+ people:
+ index:
+ add_friend: "adicionar amigo(a)"
+ real_name: "nome real"
+ diaspora_handle: "diaspora handle"
+ thats_you: "esse é você!"
+ friend_request_pending: "pedido de amizade pendente"
+ you_have_a_friend_request_from_this_person: "você possui um pedido de amizade dessa pessoa"
+ new:
+ new_person: "Nova Pessoa"
+ back_to_list: "Voltar para a Lista"
+ show:
+ last_seen: "visto pela última vez a: %{how_long_ago}"
+ friends_since: "amigos desde: %{how_long_ago}"
+ save: "salvar"
+ are_you_sure: "Tem certeza?"
+ remove_friend: "excluir amigo"
diff --git a/config/locales/pt-PT.yml b/config/locales/pt-PT.yml
new file mode 100644
index 000000000..ce3d9abbc
--- /dev/null
+++ b/config/locales/pt-PT.yml
@@ -0,0 +1,10 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+# Sample localization file for Portuguese Portugal. Add more files in this directory for other locales.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+pt-PT:
+ hello: "Olá mundo"
diff --git a/config/locales/ro.yml b/config/locales/ro.yml
new file mode 100644
index 000000000..c99bd2a85
--- /dev/null
+++ b/config/locales/ro.yml
@@ -0,0 +1,139 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+ro:
+ hello: "Bună, lume!"
+ layouts:
+ application:
+ edit_profile: "editare profil"
+ logout: "deconectare"
+ shared:
+ aspect_nav:
+ all_aspects: "Toate Aspectele"
+ manage: "Administrare"
+ manage_your_aspects: "Administrare Aspecte"
+ sub_header:
+ all_aspects: "Toate Aspectele"
+ manage_aspects: "Administrare Aspecte"
+ publisher:
+ share: "Distribuie"
+ aspect_friends:
+ add_friends: "adăugare prieteni"
+ albums:
+ album:
+ you: "tu"
+ new_album:
+ create: "crează"
+ add_a_new_album: "Album nou"
+ show:
+ edit_album: "Editare Album"
+ albums: "albume"
+ updated: "actualizat"
+ by: "de"
+ edit:
+ editing: "Editare"
+ updated: "actualizat"
+ are_you_sure: "Sunteți sigur(ă)?"
+ delete_album: "Șterge Album"
+ cancel: "Renuță"
+ index:
+ home: "acasă"
+ new_album: "Album Nou"
+ create:
+ success: "Ați creat un album numit %{name}."
+ update:
+ success: "Albumul %{name} a fost modificat cu succes."
+ failure: "Eroare la editarea albumului %{name}."
+ destroy:
+ success: "Albumul %{name} a fost șters."
+ aspects:
+ index:
+ photos: "poze"
+ show:
+ photos: "poze"
+ manage:
+ add_a_new_aspect: "Adaugă aspect"
+ add_a_new_friend: "Adadugă prieten"
+ show: "Arată"
+ update_aspects: "Actualizează Aspecte"
+ requests: "Cereri"
+ ignore_remove: "Ignoră/Șterge"
+ new_aspect:
+ add_a_new_aspect: "Adaugă aspect"
+ create: "Crează"
+ create:
+ success:"Click pe semnul plus în partea stângă pentru a indica cine poate accesa noul aspect."
+ users:
+ edit:
+ cancel: "Renunță"
+ update_profile: "Actualizează Profil"
+ home: "Home"
+ diaspora_username: "DIASPORA USERNAME"
+ info: "Info"
+ picture: "Poză"
+ editing_profile: "Editare profil"
+ albums: "Albume"
+ you_dont_have_any_photos: "Nu ai nici o fotografie! Mergi la"
+ page_to_upload_some: "pentru a încărca câteva."
+ comments:
+ comment:
+ ago: "în urmă"
+ new_comment:
+ comment: "Comentariu"
+ photos:
+ show:
+ prev: "precedent"
+ full_size: "mărime deplină"
+ next: "următor"
+ edit_photo: "Modifică Poză"
+ delete_photo: "Șterge Poză"
+ are_you_sure: "Sunteți sigur(ă)?"
+ comments: "comments"
+ edit:
+ editing: "Modificare"
+ are_you_sure: "Sunteți sigur(ă)?"
+ delete_photo: "Șterge poză"
+ photo:
+ show_comments: "arată comentarii"
+ posted_a_new_photo_to: "a postat o nouă poză în"
+ new:
+ new_photo: "Poză nouă"
+ back_to_list: "Înapoi la Listă"
+ post_it: "postează!"
+ registrations:
+ new:
+ sign_up: "Înregistrare"
+ status_messages:
+ new_status_message:
+ tell_me_something_good: "spune-mi ceva bun"
+ oh_yeah: "o, da!"
+ status_message:
+ show_comments: "arată comentarii"
+ delete: "Șterge"
+ are_you_sure: "Sunteți sigur(ă)?"
+ show:
+ status_message: "Mesaj Stare"
+ comments: "comentarii"
+ are_you_sure: "Sunteți sigur(ă)?"
+ destroy: "Distruge"
+ view_all: "Vezi Toate"
+ message: "Mesaj"
+ owner: "Proprietar"
+ people:
+ index:
+ add_friend: "adaugă prieten"
+ real_name: "nume real"
+ diaspora_handle: "diaspora id"
+ thats_you: "acesta ești tu!"
+ friend_request_pending: "cerere de prietenie nerezolvată"
+ you_have_a_friend_request_from_this_person: "aveți o cerere de prietenie din partea acestei persoane"
+ new:
+ new_person: "Persoană Nouă"
+ back_to_list: "Înapoi la Listă"
+ show:
+ last_seen: "văzut: %{how_long_ago}"
+ friends_since: "prieteni: %{how_long_ago}"
+ save: "salvează"
+ are_you_sure: "Sunteți sigur(ă)?"
+ remove_friend: "șterge prieten"
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
new file mode 100644
index 000000000..fe944aa59
--- /dev/null
+++ b/config/locales/ru.yml
@@ -0,0 +1,10 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+# Sample localization file for English. Add more files in this directory for other locales.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+ru:
+ hello: "Привет, мир"
diff --git a/config/locales/sv.yml b/config/locales/sv.yml
new file mode 100644
index 000000000..1caf878b8
--- /dev/null
+++ b/config/locales/sv.yml
@@ -0,0 +1,10 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3. See
+# the COPYRIGHT file.
+
+
+# Swedish localization file.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+sv:
+ hello: "Hej"
diff --git a/config/routes.rb b/config/routes.rb
index 12dd20ba7..f4f49b01d 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -6,17 +6,18 @@
Diaspora::Application.routes.draw do
resources :people, :only => [:index, :show, :destroy]
- resources :users, :except => [:create, :new]
- resources :status_messages, :only => [:create, :destroy, :show]
+ resources :users, :except => [:create, :new, :show]
+ resources :status_messages
resources :comments, :except => [:index]
resources :requests, :except => [:edit, :update]
resources :photos, :except => [:index]
resources :albums
- match 'aspects/manage', :to => 'aspects#manage'
- resources :aspects, :except => [:edit]
match 'aspects/move_friends', :to => 'aspects#move_friends', :as => 'move_friends'
match 'aspects/move_friend', :to => 'aspects#move_friend', :as => 'move_friend'
+ match 'aspects/manage', :to => 'aspects#manage'
+ resources :aspects, :except => [:edit]
+
match 'warzombie', :to => "dev_utilities#warzombie"
match 'zombiefriends', :to => "dev_utilities#zombiefriends"
@@ -32,6 +33,7 @@ Diaspora::Application.routes.draw do
match 'signup', :to => 'registrations#new', :as => "new_user_registration"
match 'get_to_the_choppa', :to => redirect("/signup")
+ match "/finger", :to => AsyncController
#public routes
#
match 'webfinger', :to => 'publics#webfinger'
diff --git a/config/sprinkle/conf/nginx.conf b/config/sprinkle/conf/nginx.conf
index 2b3aa8a40..eba9fa45b 100644
--- a/config/sprinkle/conf/nginx.conf
+++ b/config/sprinkle/conf/nginx.conf
@@ -33,12 +33,14 @@ http {
# gzip_disable "MSIE [1-6]\.(?!.*SV1)";
upstream thin_cluster {
server unix:/tmp/thin.0.sock;
+ server unix:/tmp/thin.1.sock;
+ server unix:/tmp/thin.2.sock;
}
server {
listen 80;
- server_name babycakes.sofaer.net www.babycakes.sofaer.net;
+ server_name pivots.joindiaspora.com www.pivots.joindiaspora.com;
root /usr/local/app/diaspora/current;
location / {
diff --git a/config/sprinkle/deploy_key/id_rsa b/config/sprinkle/deploy_key/id_rsa
deleted file mode 100644
index 133715158..000000000
--- a/config/sprinkle/deploy_key/id_rsa
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEAvCyAkyAMbn+flqwLIEnPL08iY8dWpkel1wtXXjUtaINjuvZ7
-2XwK7ntnVHVRm49t+QFMWh8SpxDHnJDgb3X6uYem2DzB6L8HtuFVFN5lOUi+TeiI
-LJsBmiGHc1tQwGB0jqmCG0J2QBDpDiw//ktOJNlZJfnPGY+4viSXwWpYhhh1v3ij
-Inmp0+lw7z0+TyklNGVEsr6emwkgo5t20ClAQDmwy1BeYBcmtAehF55V3aSPQt1d
-+hCmwl11PR6BLuGYgRirr4Xyc/GmyZVKkz8dLv40X+/Bk2D7owO+N5hf74EB1e3r
-7Vu7LAfUOdtOFQJV5SWr3HTPo5vvU1oqR4VViQIBIwKCAQEApqsSy3QoRJzsb4Jw
-QStuXRo0ZwEDmpc7HY2zyHg+KV5uRoKK89REMlALEEqnXeVwCG7dOeEB5G3yoJ2T
-lewnNpy4WR/e8rfTofrHs2XkoHOhPbCzIDGFE3zIbXzD3ZdCqj5dS1gfl9R2picx
-XZMn9MCCKPMzxi7W1ExL5dM4dsOuPRvie+nYGWvvv/LXvFTLFXDVwGXOhfDkLocv
-r6STaUMj7RzLJneawOg1YS1Ivsj+Db4Q+abB4mRRhOe6igYu9Zd0ve8XAjJAHbx2
-Kzl5XKj8fhOSwXyLBh+enqHv0yLR7GaZn0odjNdUeWdD0kF9DnsL3VMa12wmNXtu
-48bX3wKBgQDzPRDyYmBIKp/eStzAEmkVz98JmQQoX3tF0VrVdLK0j0nLB19jbHl8
-poHaPG8qIgGfFMwdhLOJmJ6CXa4eHffLJ0c32Ow+jQ+Is70Ssn6WSq0962WuuoWA
-ARUwhyO9BaWvzTnMCYDI+dSydM26cvDmTTuvCJDbifmAkArgWGqM4wKBgQDGC9za
-VTqnfBHGBXebLk/PRA8YOD9CvRrIrjylUxeSrbScK9i6v+1WK3dZCl8j7H3yYJ3B
-8CT38FXxrHtGIn+5XU++fAeiLrnmNlYFCsn1nLt2SUqvODYYefxm/Vq1LQaWknHV
-itnZF1CIltLLMI2w2iVCA0xRqots6gX+SMarowKBgQC7pCMEIAEhuntTthgB4lEQ
-047M48Fg+TM13AQ+RBTUboliG6FbU64s9XodYdIZMC0i8slYmZHQi616gsgl3JqV
-Z3F0OaBNgsLXK5HbOT0U2oWky4j0gUJqD3a/CSoyuzasMJpM8WNZNcFWd1zgSgpL
-QuTmHI0BIUtxzjRGqptWvQKBgGAxpckiFSzHO9U12wI7ENJi4sKe+ie678CPJMVU
-PqZUXwoGqxjg4P332uIa+wLR9AgDCsvpq45eyqiVmvYuA4XrfoEXq++wS6pU5/PS
-ClK512VWzID+C6V9FDIGB3ySNmZkYy000DY+hjO2+KvVwSoDjnCFQlONWanuAuk5
-So3hAoGBALfkYFRtSilhvtjOnnil0hdyUbCcRmKeUYl2Yb/cb3JmUfi9xRur7K46
-Okwba+mnOJQT0kefFEUwsP9UPVLgppVh+llyAal1aJ5OnXn1o996TGTfNmy1aThr
-aaGeAU2u8GFBiBrz9tRwzZo8ixUEZZrGFFN/n53bDHpBsbhRvHGX
------END RSA PRIVATE KEY-----
diff --git a/config/sprinkle/deploy_key/id_rsa.pub b/config/sprinkle/deploy_key/id_rsa.pub
deleted file mode 100644
index e0b8e3715..000000000
--- a/config/sprinkle/deploy_key/id_rsa.pub
+++ /dev/null
@@ -1 +0,0 @@
-ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvCyAkyAMbn+flqwLIEnPL08iY8dWpkel1wtXXjUtaINjuvZ72XwK7ntnVHVRm49t+QFMWh8SpxDHnJDgb3X6uYem2DzB6L8HtuFVFN5lOUi+TeiILJsBmiGHc1tQwGB0jqmCG0J2QBDpDiw//ktOJNlZJfnPGY+4viSXwWpYhhh1v3ijInmp0+lw7z0+TyklNGVEsr6emwkgo5t20ClAQDmwy1BeYBcmtAehF55V3aSPQt1d+hCmwl11PR6BLuGYgRirr4Xyc/GmyZVKkz8dLv40X+/Bk2D7owO+N5hf74EB1e3r7Vu7LAfUOdtOFQJV5SWr3HTPo5vvU1oqR4VViQ== Diaspora deploy key
diff --git a/config/sprinkle/deploy_key/known_hosts b/config/sprinkle/deploy_key/known_hosts
deleted file mode 100644
index 6b07b19ca..000000000
--- a/config/sprinkle/deploy_key/known_hosts
+++ /dev/null
@@ -1,2 +0,0 @@
-|1|1DLdTjtEIabpLiLzhVOp7colQSQ=|/Nw4MuJAYIztcexQDWF3NQoEljs= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
-|1|j1rKwLcrA2MgHhcpdVf04ig02Hs=|Y4Jl+8HpsTyFlhSwoVxSVeRsf3k= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
diff --git a/config/sprinkle/provision.rb b/config/sprinkle/provision.rb
index 9f983399e..fc81b1ca3 100644
--- a/config/sprinkle/provision.rb
+++ b/config/sprinkle/provision.rb
@@ -7,13 +7,13 @@
-require "#{File.dirname(__FILE__)}/packages/essential"
-require "#{File.dirname(__FILE__)}/packages/database"
-require "#{File.dirname(__FILE__)}/packages/server"
-require "#{File.dirname(__FILE__)}/packages/scm"
-require "#{File.dirname(__FILE__)}/packages/ruby"
+require '#{File.dirname(__FILE__)}/packages/essential'
+require '#{File.dirname(__FILE__)}/packages/database'
+require '#{File.dirname(__FILE__)}/packages/server'
+require '#{File.dirname(__FILE__)}/packages/scm'
+require '#{File.dirname(__FILE__)}/packages/ruby'
-policy :diaspora, :roles => [:tom,:backer] do
+policy :diaspora, :roles => [:pivots] do
# requires :clean_dreamhost
requires :tools
requires :rubygems
diff --git a/config/thin.yml b/config/thin.yml
index cc071975d..ad91436c1 100644
--- a/config/thin.yml
+++ b/config/thin.yml
@@ -13,7 +13,7 @@ max_conns: 1024
require: []
max_persistent_conns: 512
-environment: development
+environment: development
servers: 1
daemonize: true
#chdir: /usr/applications/localhash/current
diff --git a/db/seeds/backer.rb b/db/seeds/backer.rb
index b32b62377..20fe90fdf 100644
--- a/db/seeds/backer.rb
+++ b/db/seeds/backer.rb
@@ -15,25 +15,38 @@
require 'config/environment'
def create
+
+
config = YAML.load_file(File.dirname(__FILE__) + '/../../config/deploy_config.yml')
backer_info = config['servers']['backer']
backer_number = YAML.load_file(Rails.root.join('config','backer_number.yml'))[:seed_number].to_i
- # Create seed user
+
+ #set pod url
username = backer_info[backer_number]['username'].gsub(/ /,'').downcase
+ set_app_config username
+ require 'config/initializers/_load_app_config.rb'
+
+ # Create seed user
user = User.instantiate!(:email => "#{username}@#{username}.joindiaspora.com",
:username => username,
:password => "#{username+backer_info[backer_number]['pin'].to_s}",
:password_confirmation => "#{username+backer_info[backer_number]['pin'].to_s}",
- :url=> "http://#{username}.joindiaspora.com/",
:person => Person.new(
- :diaspora_handle => "#{username}@#{username}.joindiaspora.com",
:profile => Profile.new( :first_name => backer_info[backer_number]['given_name'], :last_name => backer_info[backer_number]['family_name'],
- :image_url => "http://#{username}.joindiaspora.com/images/user/#{username}.jpg"),
- :url=> "http://#{username}.joindiaspora.com/")
- )
+ :image_url => "http://#{username}.joindiaspora.com/images/user/#{username}.jpg")
+ ))
user.person.save!
user.aspect(:name => "Presidents")
end
+def set_app_config username
+ current_config = YAML.load(File.read(Rails.root.join('config', 'app_config.yml.example')))
+ current_config[Rails.env.to_s] ||= {}
+ current_config[Rails.env.to_s]['pod_url'] = "#{username}.joindiaspora.com"
+ current_config['default']['pod_url'] = "#{username}.joindiaspora.com"
+ file = File.new(Rails.root.join('..','..','shared','app_config.yml'),'w')
+ file.write(current_config.to_yaml)
+ file.close
+end
diff --git a/db/seeds/dev.rb b/db/seeds/dev.rb
index 12c728ddf..e2d8a5495 100644
--- a/db/seeds/dev.rb
+++ b/db/seeds/dev.rb
@@ -6,31 +6,35 @@
require 'config/environment'
-host = "localhost:3000"
-url = "http://#{host}/"
+def set_app_config username
+ current_config = YAML.load(File.read(Rails.root.join('config', 'app_config.yml.example')))
+ current_config[Rails.env.to_s] ||= {}
+ current_config[Rails.env.to_s]['pod_url'] = "#{username}.joindiaspora.com"
+ current_config['default']['pod_url'] = "#{username}.joindiaspora.com"
+ file = File.new(Rails.root.join('config','app_config.yml'),'w')
+ file.write(current_config.to_yaml)
+ file.close
+end
+
username = "tom"
+set_app_config username
+
# Create seed user
user = User.instantiate!( :email => "tom@tom.joindiaspora.com",
:username => "tom",
:password => "evankorth",
:password_confirmation => "evankorth",
- :url=> "http://#{username}.joindiaspora.com/"
:person => Person.new(
- :diaspora_handle => "tom@tom.joindiaspora.com",
- :url => url,
:profile => Profile.new( :first_name => "Alexander", :last_name => "Hamiltom" ))
)
user.person.save!
user2 = User.instantiate!( :email => "korth@tom.joindiaspora.com",
:username => "korth",
- :url=> "http://#{username}.joindiaspora.com/"
:password => "evankorth",
:password_confirmation => "evankorth",
- :person => Person.new( :diaspora_handle => "korth@tom.joindiaspora.com",
- :url => url,
- :profile => Profile.new( :first_name => "Evan",
- :last_name => "Korth")))
+ :person => Person.new(
+ :profile => Profile.new( :first_name => "Evan", :last_name => "Korth")))
user2.person.save!
diff --git a/db/seeds/tom.rb b/db/seeds/tom.rb
index af6f737a9..cc3000d0b 100644
--- a/db/seeds/tom.rb
+++ b/db/seeds/tom.rb
@@ -6,16 +6,26 @@
require 'config/environment'
-remote_url = "http://tom.joindiaspora.com/"
+def set_app_config username
+ current_config = YAML.load(File.read(Rails.root.join('config', 'app_config.yml.example')))
+ current_config[Rails.env.to_s] ||= {}
+ current_config[Rails.env.to_s]['pod_url'] = "#{username}.joindiaspora.com"
+ current_config['default']['pod_url'] = "#{username}.joindiaspora.com"
+ file = File.new(Rails.root.join('..','..','shared','app_config.yml'),'w')
+ file.write(current_config.to_yaml)
+ file.close
+end
+
+set_app_config "tom"
+require 'config/initializers/_load_app_config.rb'
+
+
# Create seed user
user = User.instantiate!( :email => "tom@tom.joindiaspora.com",
:username => "tom",
:password => "evankorth",
:password_confirmation => "evankorth",
- :url => remote_url,
:person => {
- :diaspora_handle => "tom@tom.joindiaspora.com",
- :url => remote_url,
:profile => { :first_name => "Alexander", :last_name => "Hamiltom",
:image_url => "http://tom.joindiaspora.com/images/user/tom.jpg"}}
)
@@ -25,11 +35,7 @@ user2 = User.instantiate!( :email => "korth@tom.joindiaspora.com",
:password => "evankorth",
:password_confirmation => "evankorth",
:username => "korth",
- :url => remote_url,
- :person => { :diaspora_handle => "korth@tom.joindiaspora.com",
- :url => remote_url,
- :profile => { :first_name => "Evan",
- :last_name => "Korth",
+ :person => {:profile => { :first_name => "Evan", :last_name => "Korth",
:image_url => "http://tom.joindiaspora.com/images/user/korth.jpg"}})
user2.person.save!
@@ -40,3 +46,5 @@ request = user.send_friend_request_to(user2, aspect)
reversed_request = user2.accept_friend_request( request.id, user2.aspect(:name => "presidents").id )
user.receive reversed_request.to_diaspora_xml
user.aspect(:name => "Presidents")
+
+
diff --git a/lib/diaspora/user/friending.rb b/lib/diaspora/user/friending.rb
index cf55a2bf0..f3b30f9b3 100644
--- a/lib/diaspora/user/friending.rb
+++ b/lib/diaspora/user/friending.rb
@@ -8,6 +8,9 @@ module Diaspora
module UserModules
module Friending
def send_friend_request_to(desired_friend, aspect)
+ # should have different exception types for these?
+ raise "You have already sent a friend request to that person!" if self.pending_requests.detect{
+ |x| x.destination_url == desired_friend.receive_url }
raise "You are already friends with that person!" if self.friends.detect{
|x| x.receive_url == desired_friend.receive_url}
request = Request.instantiate(
@@ -62,7 +65,7 @@ module Diaspora
def receive_friend_request(friend_request)
Rails.logger.info("receiving friend request #{friend_request.to_json}")
- if request_from_me?(friend_request)
+ if request_from_me?(friend_request) && self.aspect_by_id(friend_request.aspect_id)
aspect = self.aspect_by_id(friend_request.aspect_id)
activate_friend(friend_request.person, aspect)
@@ -86,7 +89,8 @@ module Diaspora
def remove_friend(bad_friend)
raise "Friend not deleted" unless self.friend_ids.delete( bad_friend.id )
- aspects.each{|g| g.person_ids.delete( bad_friend.id )}
+ aspects.each{|aspect|
+ aspect.person_ids.delete( bad_friend.id )}
self.save
self.raw_visible_posts.find_all_by_person_id( bad_friend.id ).each{|post|
diff --git a/lib/diaspora/user/querying.rb b/lib/diaspora/user/querying.rb
index ad023f2fb..bd4174c76 100644
--- a/lib/diaspora/user/querying.rb
+++ b/lib/diaspora/user/querying.rb
@@ -7,14 +7,9 @@
module Diaspora
module UserModules
module Querying
- def visible_posts_from_others(opts ={})
- if opts[:from].class == Person
- Post.where(:person_id => opts[:from].id, :_id.in => self.visible_post_ids)
- elsif opts[:from].class == Aspect
- Post.where(:_id.in => opts[:from].post_ids) unless opts[:from].user != self
- else
- Post.where(:_id.in => self.visible_post_ids)
- end
+
+ def find_visible_post_by_id( id )
+ self.raw_visible_posts.find id
end
def visible_posts( opts = {} )
@@ -22,6 +17,8 @@ module Diaspora
return raw_visible_posts if opts[:by_members_of] == :all
aspect = self.aspects.find_by_id( opts[:by_members_of].id )
aspect.posts
+ elsif opts[:from]
+ self.raw_visible_posts.find_all_by_person_id(opts[:from].id, :order => 'created_at DESC')
end
end
@@ -38,11 +35,6 @@ module Diaspora
aspects.detect{|x| x.id == id }
end
- def album_by_id( id )
- id = id.to_id
- albums.detect{|x| x.id == id }
- end
-
def aspects_with_post( id )
self.aspects.find_all_by_post_ids( id.to_id )
end
diff --git a/lib/diaspora/user/receiving.rb b/lib/diaspora/user/receiving.rb
new file mode 100644
index 000000000..39b1af5d2
--- /dev/null
+++ b/lib/diaspora/user/receiving.rb
@@ -0,0 +1,93 @@
+module Diaspora
+ module UserModules
+ module Receiving
+ def receive_salmon ciphertext
+ cleartext = decrypt( ciphertext)
+ salmon = Salmon::SalmonSlap.parse cleartext
+ if salmon.verified_for_key?(salmon.author.public_key)
+ Rails.logger.info("data in salmon: #{salmon.data}")
+ self.receive(salmon.data)
+ end
+ end
+
+ def receive xml
+ object = Diaspora::Parser.from_xml(xml)
+ Rails.logger.debug("Receiving object for #{self.real_name}:\n#{object.inspect}")
+ Rails.logger.debug("From: #{object.person.inspect}") if object.person
+
+ if object.is_a? Retraction
+ receive_retraction object, xml
+ elsif object.is_a? Request
+ receive_request object, xml
+ elsif object.is_a? Profile
+ receive_profile object, xml
+ elsif object.is_a?(Comment)
+ receive_comment object, xml
+ else
+ receive_post object, xml
+ end
+ end
+
+ def receive_retraction retraction, xml
+ if retraction.type == 'Person'
+ Rails.logger.info( "the person id is #{retraction.post_id} the friend found is #{visible_person_by_id(retraction.post_id).inspect}")
+ unfriended_by visible_person_by_id(retraction.post_id)
+ else
+ retraction.perform self.id
+ aspects = self.aspects_with_person(retraction.person)
+ aspects.each{ |aspect| aspect.post_ids.delete(retraction.post_id.to_id)
+ aspect.save
+ }
+ end
+ end
+
+ def receive_request request, xml
+ person = Diaspora::Parser.parse_or_find_person_from_xml( xml )
+ person.serialized_key ||= request.exported_key
+ request.person = person
+ request.person.save
+ old_request = Request.first(:id => request.id)
+ request.aspect_id = old_request.aspect_id if old_request
+ request.save
+ receive_friend_request(request)
+ end
+
+ def receive_profile profile, xml
+ person = Diaspora::Parser.owner_id_from_xml xml
+ person.profile = profile
+ person.save
+ end
+
+ def receive_comment comment, xml
+ comment.person = Diaspora::Parser.parse_or_find_person_from_xml( xml ).save if comment.person.nil?
+ self.visible_people = self.visible_people | [comment.person]
+ self.save
+ Rails.logger.debug("The person parsed from comment xml is #{comment.person.inspect}") unless comment.person.nil?
+ comment.person.save
+ Rails.logger.debug("From: #{comment.person.inspect}") if comment.person
+ raise "In receive for #{self.real_name}, signature was not valid on: #{comment.inspect}" unless comment.post.person == self.person || comment.verify_post_creator_signature
+ comment.save
+ unless owns?(comment)
+ dispatch_comment comment
+ end
+ comment.socket_to_uid(id) if (comment.respond_to?(:socket_to_uid) && !self.owns?(comment))
+ end
+
+ def receive_post post, xml
+ Rails.logger.debug("Saving post: #{post}")
+ post.user_refs += 1
+ post.save
+
+ self.raw_visible_posts << post
+ self.save
+
+ aspects = self.aspects_with_person(post.person)
+ aspects.each{ |aspect|
+ aspect.posts << post
+ aspect.save
+ post.socket_to_uid(id, :aspect_ids => [aspect.id]) if (post.respond_to?(:socket_to_uid) && !self.owns?(post))
+ }
+ end
+ end
+ end
+end
diff --git a/lib/diaspora/websocket.rb b/lib/diaspora/websocket.rb
index fc79559f6..687bd2b7c 100644
--- a/lib/diaspora/websocket.rb
+++ b/lib/diaspora/websocket.rb
@@ -6,6 +6,11 @@
module Diaspora
module WebSocket
+ def self.queue_to_user(uid, data)
+ channel = Magent::GenericChannel.new('websocket')
+ channel.enqueue({:uid => uid, :data => data})
+ end
+
def self.initialize_channels
@channels = {}
end
@@ -44,6 +49,5 @@ module Diaspora
def unsocket_from_uid(id, opts={})
SocketsController.new.outgoing(id, Retraction.for(self), opts)
end
-
end
end
diff --git a/lib/message_handler.rb b/lib/message_handler.rb
index 7149ee65e..0b55ee0f7 100644
--- a/lib/message_handler.rb
+++ b/lib/message_handler.rb
@@ -31,7 +31,7 @@ class MessageHandler
http.callback { process; process}
when :get
http = EventMachine::HttpRequest.new(query.destination).get :timeout => TIMEOUT
- http.callback {send_to_seed(query, http.response); process}
+ http.callback {process}
else
raise "message is not a type I know!"
end
@@ -47,10 +47,6 @@ class MessageHandler
} unless @queue.size == 0
end
- def send_to_seed(message, http_response)
- #DO SOMETHING!
- end
-
def size
@queue.size
end
diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake
index e1c0aac31..c0d289cda 100644
--- a/lib/tasks/db.rake
+++ b/lib/tasks/db.rake
@@ -22,6 +22,7 @@ namespace :db do
require 'db/seeds/backer'
create
end
+
end
desc 'Delete the collections in the current RAILS_ENV database'
@@ -53,4 +54,17 @@ namespace :db do
Rake::Task['db:seed:dev'].invoke
puts "you did it!"
end
+
+ task :fix_diaspora_handle do
+ puts "fixing the people in this seed"
+ require 'config/environment'
+ Person.where(:url => 'example.org').all.each{|person|
+ if person.owner
+ person.url = APP_CONFIG[:pod_url]
+ person.diaspora_handle = person.owner.diaspora_handle
+ person.save
+ end
+ }
+ puts "everything should be peachy"
+ end
end
diff --git a/public/javascripts/aspect-edit.js b/public/javascripts/aspect-edit.js
index e1d9b6c6c..9f9e5803e 100644
--- a/public/javascripts/aspect-edit.js
+++ b/public/javascripts/aspect-edit.js
@@ -3,42 +3,34 @@
* the COPYRIGHT file.
*/
-
-$('#move_friends_link').live( 'click', function(){
- $.post('/aspects/move_friends',
- { 'moves' : $('#aspect_list').data() },
- function(){ $('#aspect_title').html("Groups edited successfully!");});
-
- $(".person").css('background-color','none');
- $('#aspect_list').removeData();
- $(".person").attr('from_aspect_id', function(){return $(this).parent().attr('id')})
-
-});
-
-function decrementRequestsCounter(){
- var old_request_count = $(".new_requests").html().match(/\d+/);
+function decrementRequestsCounter() {
+ var $new_requests = $(".new_requests"),
+ request_html = $new_requests.html(),
+ old_request_count = request_html.match(/\d+/);
if( old_request_count == 1 ) {
- $(".new_requests").html(
- $(".new_requests").html().replace(/ \(\d+\)/,''));
-
+ $new_requests.html(
+ request_html.replace(/ \(\d+\)/,'')
+ );
} else {
- $(".new_requests").html(
- $(".new_requests").html().replace(/\d+/,old_request_count-1));
+ $new_requests.html(
+ request_html.replace(/\d+/,old_request_count-1)
+ );
}
-
}
$(function() {
+ // Multiple classes here won't work
$("ul .person").draggable({
revert: true
});
-
+
$("ul .requested_person").draggable({
revert: true
});
$(".aspect ul").droppable({
+ hoverClass: 'active',
drop: function(event, ui) {
if ($(ui.draggable[0]).hasClass('requested_person')){
@@ -51,67 +43,80 @@ $(function() {
}
});
- }else {
- var move = {};
- move[ 'friend_id' ] = ui.draggable[0].id
- move[ 'to' ] = $(this)[0].id;
- move[ 'from' ] = ui.draggable[0].getAttribute('from_aspect_id');
- if (move['to'] == move['from']){
- $('#aspect_list').data( ui.draggable[0].id, []);
- ui.draggable.css('background-color','#eee');
+ };
+ var dropzone = $(this)[0];
+
+ if ($(this)[0].id == ui.draggable[0].getAttribute('from_aspect_id')){
+ ui.draggable.css('background','none');
} else {
- $('#aspect_list').data( ui.draggable[0].id, move);
ui.draggable.css('background-color','orange');
+ $.ajax({
+ url: "/aspects/move_friend/",
+ data: {"friend_id" : ui.draggable[0].id,
+ "from" : ui.draggable[0].getAttribute('from_aspect_id'),
+ "to" : { "to" : dropzone.id }},
+ success: function(data){
+ ui.draggable.attr('from_aspect_id', dropzone.id);
+ ui.draggable.css('background','none');
+ }});
+
}
- }
$(this).closest("ul").append(ui.draggable);
}
});
$(".remove ul").droppable({
+ hoverClass: 'active',
drop: function(event, ui) {
if ($(ui.draggable[0]).hasClass('requested_person')){
$.ajax({
type: "DELETE",
- url: "/requests/" + ui.draggable[0].getAttribute('request_id')
+ url: "/requests/" + ui.draggable.attr('request_id'),
+ success: function () {
+ decrementRequestsCounter();
+ }
});
- decrementRequestsCounter();
- $(ui.draggable[0]).fadeOut('slow')
- }else{
+
+ } else {
$.ajax({
type: "DELETE",
- url: "/people/" + ui.draggable[0].id
+ url: "/people/" + ui.draggable.attr('id'),
+ success: function () {
+ alert("Removed Friend, proably want an undo countdown.")
+ }
});
- alert("Removed Friend, proably want an undo countdown.")
- $(ui.draggable[0]).fadeOut('slow')
-
+
}
+
+ $(ui.draggable[0]).fadeOut('slow'); // ui.draggable.fadeOut('slow')
}
});
-});
-$(".aspect h1").live( 'click', function() {
- var $this = $(this);
- var id = $this.closest("li").children("ul").attr("id");
- var link = "/aspects/"+ id;
+ $(".aspect h1").live( 'focus', function() {
- $this.keypress(function(e) {
- if (e.which == 13) {
- e.preventDefault();
- $this.blur();
+ var $this = $(this),
+ id = $this.closest("li").children("ul").attr("id"),
+ link = "/aspects/"+ id;
- //save changes
- $.ajax({
- type: "PUT",
- url: link,
- data: {"aspect" : {"name" : $this.text() }}
+ $this.keypress(function(e) {
+ if (e.which == 13) {
+ e.preventDefault();
+ $this.blur();
+
+ //save changes
+ $.ajax({
+ type: "PUT",
+ url: link,
+ data: {"aspect" : {"name" : $this.text() }}
+ });
+ }
+ //update all other aspect links
+ $this.keyup(function(e) {
+ $("#aspect_nav a[href='"+link+"']").text($this.text());
});
- }
- //update all other aspect links
- $this.keyup(function(e) {
- $("#aspect_nav a[href='"+link+"']").text($this.text());
});
});
+
});
diff --git a/public/javascripts/fancybox/jquery.fancybox-1.3.1.js b/public/javascripts/fancybox/jquery.fancybox-1.3.1.js
index 688f93aa3..e9b4f404b 100755
--- a/public/javascripts/fancybox/jquery.fancybox-1.3.1.js
+++ b/public/javascripts/fancybox/jquery.fancybox-1.3.1.js
@@ -262,6 +262,11 @@
close.show();
}
+ $("#fancybox-inner input[type='text'], #fancybox-inner textarea").focus(function() {
+ $(document).unbind('keydown.fb');
+ });
+
+
fancybox_set_navigation();
$(window).bind("resize.fb", $.fancybox.center);
@@ -1074,4 +1079,4 @@
fancybox_init();
});
-})(jQuery);
\ No newline at end of file
+})(jQuery);
diff --git a/public/javascripts/fancybox/jquery.fancybox-1.3.1.pack.js b/public/javascripts/fancybox/jquery.fancybox-1.3.1.pack.js
index 8421d53a6..8efd14070 100755
--- a/public/javascripts/fancybox/jquery.fancybox-1.3.1.pack.js
+++ b/public/javascripts/fancybox/jquery.fancybox-1.3.1.pack.js
@@ -14,31 +14,6 @@
* http://www.gnu.org/licenses/gpl.html
*/
-(function(b){var m,u,x,g,D,i,z,A,B,p=0,e={},q=[],n=0,c={},j=[],E=null,s=new Image,G=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,S=/[^\.]\.(swf)\s*$/i,H,I=1,k,l,h=false,y=b.extend(b("")[0],{prop:0}),v=0,O=!b.support.opacity&&!window.XMLHttpRequest,J=function(){u.hide();s.onerror=s.onload=null;E&&E.abort();m.empty()},P=function(){b.fancybox('
The requested content cannot be loaded. Please try again later.