Merge branch 'master' into follow

Conflicts:
	app/controllers/requests_controller.rb
	app/controllers/tags_controller.rb
	app/helpers/aspects_helper.rb
	app/views/notifications/index.html.haml
	config/routes.rb
	public/javascripts/aspect-edit.js
	public/javascripts/contact-list.js
	spec/integration/receiving_spec.rb
	spec/models/user/connecting_spec.rb
	spec/models/user/posting_spec.rb
This commit is contained in:
danielgrippi 2011-05-04 11:35:35 -07:00
commit 648a10e6d3
315 changed files with 6052 additions and 2476 deletions

2
.gitignore vendored
View file

@ -22,7 +22,7 @@ spec/fixtures/*.y*ml
spec/fixtures/*.fixture.*
coverage/*
# Uploded files and local files
# Uploaded files and local files
public/uploads/*
public/assets/*
public/source.tar*

View file

@ -6,6 +6,7 @@ gem 'foreigner', '0.9.1'
gem 'bundler', '>= 1.0.0'
gem 'chef', '0.9.12', :require => false
gem 'ohai', '0.5.8', :require => false #Chef dependency
gem 'nokogiri', '1.4.3.1'
@ -33,7 +34,7 @@ gem 'addressable', '2.2.2', :require => 'addressable/uri'
gem 'json', '1.4.6'
gem 'http_accept_language', :git => 'git://github.com/iain/http_accept_language.git', :ref => '0b78aa7849fc90cf9e12'
gem 'thin', '1.2.8', :require => false
gem 'thin', '1.2.11', :require => false
#Websocket
gem 'em-websocket', :git => 'git://github.com/igrigorik/em-websocket', :ref => 'e278f5a1c4db60be7485'
@ -60,6 +61,7 @@ gem 'SystemTimer', '1.2.1' unless RUBY_VERSION.include? '1.9' || RUBY_PLATFORM =
group :development do
gem 'capistrano', '2.5.19', :require => false
gem 'capistrano-ext', '1.2.1', :require => false
gem 'sod', :git => "git://github.com/MikeSofaer/sod.git"
end
group :test, :development do

View file

@ -7,6 +7,13 @@ GIT
activesupport (>= 2.3.0)
nokogiri (>= 1.3.3)
GIT
remote: git://github.com/MikeSofaer/sod.git
revision: 08e990601bfa6ffd3224a2e4c792df9eae712693
specs:
sod (0.0.1)
net-scp
GIT
remote: git://github.com/diaspora/acts-as-taggable-on.git
revision: c3592fe1a906f6ff1cd12766c5cf1152c51eec40
@ -65,6 +72,10 @@ PATH
GEM
remote: http://rubygems.org/
specs:
POpen4 (0.1.4)
Platform (>= 0.4.0)
open4
Platform (0.4.0)
SystemTimer (1.2.1)
abstract (1.0.0)
actionmailer (3.0.3)
@ -138,7 +149,7 @@ GEM
uuidtools
childprocess (0.1.7)
ffi (~> 0.6.3)
closure-compiler (1.0.0)
closure-compiler (1.1.1)
cloudfiles (1.4.10)
mime-types (>= 1.16)
columnize (0.3.2)
@ -153,7 +164,7 @@ GEM
cucumber-rails (0.3.2)
cucumber (>= 0.8.0)
culerity (0.2.15)
daemons (1.1.0)
daemons (1.1.2)
database_cleaner (0.6.0)
devise (1.1.3)
bcrypt-ruby (~> 2.1.2)
@ -189,13 +200,13 @@ GEM
nokogiri (~> 1.4.3.1)
ruby-hmac
foreigner (0.9.1)
formatador (0.1.2)
formatador (0.1.3)
fuubar (0.0.4)
chalofa_ruby-progressbar (~> 0.0.9)
rspec (~> 2.0)
rspec-instafail (~> 0.1.4)
gem_plugin (0.2.3)
gherkin (2.3.5)
gherkin (2.3.6)
json (>= 1.4.6)
haml (3.0.25)
hashie (0.4.0)
@ -229,7 +240,7 @@ GEM
mixlib-log
mixlib-cli (1.2.0)
mixlib-config (1.1.2)
mixlib-log (1.2.0)
mixlib-log (1.3.0)
moneta (0.6.0)
mongrel (1.1.5)
cgi_multipart_eof_fix (>= 2.4)
@ -289,10 +300,11 @@ GEM
oa-enterprise (= 0.1.6)
oa-oauth (= 0.1.6)
oa-openid (= 0.1.6)
open4 (1.0.1)
polyglot (0.3.1)
pyu-ruby-sasl (0.0.3.2)
rack (1.2.2)
rack-mount (0.6.13)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-openid (1.2.0)
rack (>= 1.1.0)
@ -314,7 +326,7 @@ GEM
thor (~> 0.14.4)
rake (0.8.7)
rcov (0.9.9)
redis (2.1.1)
redis (2.2.0)
redis-namespace (0.8.0)
redis (< 3.0.0)
resque (1.10.0)
@ -358,13 +370,13 @@ GEM
json_pure
rubyzip
simple_oauth (0.1.4)
sinatra (1.2.1)
sinatra (1.2.3)
rack (~> 1.1)
tilt (< 2.0, >= 1.2.2)
subexec (0.0.4)
systemu (1.2.0)
systemu (2.2.0)
term-ansicolor (1.0.5)
thin (1.2.8)
thin (1.2.11)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
@ -375,7 +387,7 @@ GEM
typhoeus (0.2.4)
mime-types
mime-types
tzinfo (0.3.25)
tzinfo (0.3.26)
uuidtools (2.1.2)
vegas (0.1.8)
rack (>= 1.0.0)
@ -385,8 +397,9 @@ GEM
addressable (>= 2.2.2)
crack (>= 0.1.7)
will_paginate (3.0.pre2)
xml-simple (1.0.14)
yui-compressor (0.9.4)
xml-simple (1.0.15)
yui-compressor (0.9.6)
POpen4 (>= 0.1.4)
PLATFORMS
ruby
@ -426,6 +439,7 @@ DEPENDENCIES
mongrel
mysql2 (= 0.2.6)
nokogiri (= 1.4.3.1)
ohai (= 0.5.8)
omniauth (= 0.1.6)
rails (= 3.0.3)
rcov
@ -437,7 +451,8 @@ DEPENDENCIES
rspec-rails (>= 2.0.0)
ruby-debug
selenium-webdriver (= 0.1.3)
thin (= 1.2.8)
sod!
thin (= 1.2.11)
twitter!
typhoeus
webmock

6
Sodfile Normal file
View file

@ -0,0 +1,6 @@
production:
user: root
repo: git@github.com:diaspora/diaspora.git
app_dir: /usr/local/app
cookbook: centos
ruby_version: ree-1.8.7-2011.03

View file

@ -1,7 +1,7 @@
class ApisController < ApplicationController #We should start with this versioned, V0ApisController BEES
before_filter :authenticate_user!, :only => [:home_timeline]
respond_to :json
#posts
def public_timeline
set_defaults
@ -30,9 +30,9 @@ class ApisController < ApplicationController #We should start with this versione
def home_timeline
set_defaults
timeline = current_user.raw_visible_posts.includes(:comments, :photos, :likes, :dislikes).paginate(
:page => params[:page], :per_page => params[:per_page], :order => "#{params[:order]} DESC")
timeline = current_user.visible_posts(:max_time => params[:max_time],
:limit => params[:per_page],
:order => "#{params[:order]} DESC").includes(:comments, :photos, :likes, :dislikes)
respond_with timeline do |format|
format.json{ render :json => timeline.to_json(:format => :twitter) }
end
@ -45,7 +45,7 @@ class ApisController < ApplicationController #We should start with this versione
format.json{ render :json => status.to_json(:format => :twitter) }
end
else
render(:nothing => true, :status => 404)
render(:nothing => true, :status => 404)
end
end
@ -62,7 +62,7 @@ class ApisController < ApplicationController #We should start with this versione
format.json{ render :json => person.to_json(:format => :twitter) }
end
else
render(:nothing => true, :status => 404)
render(:nothing => true, :status => 404)
end
end
@ -78,7 +78,7 @@ class ApisController < ApplicationController #We should start with this versione
format.json{ render :json => people.to_json(:format => :twitter) }
end
else
render(:nothing => true, :status => 404)
render(:nothing => true, :status => 404)
end
end

View file

@ -3,6 +3,8 @@
# the COPYRIGHT file.
class ApplicationController < ActionController::Base
clear_helpers
helper :layout, :error_messages
has_mobile_fu
protect_from_forgery :except => :receive

View file

@ -4,6 +4,7 @@
#
class AspectMembershipsController < ApplicationController
helper :aspects
before_filter :authenticate_user!
def destroy

View file

@ -3,6 +3,7 @@
# the COPYRIGHT file.
class AspectsController < ApplicationController
helper :comments
before_filter :authenticate_user!
before_filter :save_sort_order, :only => :index
before_filter :ensure_page, :only => :index
@ -30,10 +31,10 @@ class AspectsController < ApplicationController
@selected_contacts = @aspects.map { |aspect| aspect.contacts }.flatten.uniq unless params[:only_posts]
@aspect_ids = @aspects.map { |a| a.id }
posts = current_user.raw_visible_posts(:by_members_of => @aspect_ids,
posts = current_user.visible_posts(:by_members_of => @aspect_ids,
:type => 'StatusMessage',
:order => session[:sort_order] + ' DESC',
:page => params[:page]
:max_time => params[:max_time].to_i
).includes(:comments, :mentions, :likes, :dislikes)
@posts = PostsFake.new(posts)
@ -150,6 +151,10 @@ class AspectsController < ApplicationController
@aspect.save
end
def ensure_page
params[:max_time] ||= Time.now + 1
end
protected
def save_sort_order

View file

@ -3,6 +3,7 @@
# the COPYRIGHT file.
class ContactsController < ApplicationController
helper :aspects
before_filter :authenticate_user!
def new

View file

@ -56,10 +56,12 @@ class ConversationsController < ApplicationController
end
def new
@all_contacts_and_ids = Contact.connection.execute(current_user.contacts.joins(:person => :profile).select("contacts.id, profiles.first_name, profiles.last_name, profiles.diaspora_handle").to_sql).map do |r|
{:value => r[0], :name => Person.name_from_attrs(r[1], r[2], r[3])}
all_contacts_and_ids = Contact.connection.execute(current_user.contacts.joins(:person => :profile
).select("contacts.id, profiles.first_name, profiles.last_name, people.diaspora_handle").to_sql).map do |r|
{:value => r[0],
:name => Person.name_from_attrs(r[1], r[2], r[3]).gsub(/(")/, "'")}
end
@contacts_json = all_contacts_and_ids.to_json.gsub!(/(")/, '\\"')
@contact = current_user.contacts.find(params[:contact_id]) if params[:contact_id]
render :layout => false
end

View file

@ -19,7 +19,7 @@ class NotificationsController < ApplicationController
def index
@notifications = Notification.find(:all, :conditions => {:recipient_id => current_user.id},
:order => 'created_at desc', :include => [:target, {:actors => :profile}]).paginate :page => params[:page], :per_page => 25
:order => 'updated_at desc', :include => [:target, {:actors => :profile}]).paginate :page => params[:page], :per_page => 25
@group_days = @notifications.group_by{|note| I18n.l(note.updated_at, :format => I18n.t('date.formats.fullmonth_day')) }
respond_with @notifications
end

View file

@ -3,8 +3,8 @@
# the COPYRIGHT file.
class PeopleController < ApplicationController
helper :comments
before_filter :authenticate_user!, :except => [:show]
before_filter :ensure_page, :only => :show
respond_to :html
respond_to :json, :only => [:index, :show]
@ -63,6 +63,7 @@ class PeopleController < ApplicationController
@aspect = :profile
@share_with = (params[:share_with] == 'true')
max_time = params[:max_time] ? Time.at(params[:max_time].to_i) : Time.now
if @person
@profile = @person.profile
@ -72,10 +73,12 @@ class PeopleController < ApplicationController
if @contact && !params[:only_posts]
@aspects_with_person = @contact.aspects
@aspect_ids = @aspects_with_person.map(&:id)
@contacts_of_contact = @contact.contacts
@contacts_of_contact_count = @contact.contacts.count
@contacts_of_contact = @contact.contacts.limit(36)
else
@contact ||= Contact.new
@contacts_of_contact_count = 0
@contacts_of_contact = []
end
@ -84,13 +87,14 @@ class PeopleController < ApplicationController
else
@commenting_disabled = false
end
@posts = current_user.posts_from(@person).where(:type => "StatusMessage").includes(:comments).limit(15).offset(15*(params[:page]-1))
@posts = current_user.posts_from(@person).where(:type => "StatusMessage").includes(:comments).limit(15).where(StatusMessage.arel_table[:created_at].lt(max_time))
else
@commenting_disabled = true
@posts = @person.posts.where(:type => "StatusMessage", :public => true).includes(:comments).limit(15).offset(15*(params[:page]-1))
@posts = @person.posts.where(:type => "StatusMessage", :public => true).includes(:comments).limit(15).where(StatusMessage.arel_table[:created_at].lt(max_time)).order('posts.created_at DESC')
end
@posts = PostsFake.new(@posts)
if params[:only_posts]
render :partial => 'shared/stream', :locals => {:posts => @posts}
else
@ -112,6 +116,21 @@ class PeopleController < ApplicationController
end
end
def contacts
@person = Person.find(params[:person_id])
if @person
@contact = current_user.contact_for(@person)
@aspect = :profile
@contacts_of_contact = @contact.contacts.paginate(:page => params[:page], :per_page => (params[:limit] || 15))
@hashes = hashes_for_people @contacts_of_contact, @aspects
@contact = current_user.contact_for(@person)
@aspects_with_person = @contact.aspects
@aspect_ids = @aspects_with_person.map(&:id)
else
flash[:error] = I18n.t 'people.show.does_not_exist'
redirect_to people_path
end
end
private
def webfinger(account, opts = {})
Resque.enqueue(Job::SocketWebfinger, current_user.id, account, opts)

View file

@ -3,6 +3,7 @@
# the COPYRIGHT file.
class PhotosController < ApplicationController
helper :comments
before_filter :authenticate_user!
respond_to :html, :json

View file

@ -3,6 +3,7 @@
# the COPYRIGHT file.
class SocketsController < ApplicationController
helper :comments
include ApplicationHelper
include SocketsHelper
include Rails.application.routes.url_helpers

View file

@ -3,6 +3,7 @@
# the COPYRIGHT file.
class StatusMessagesController < ApplicationController
helper :comments
before_filter :authenticate_user!
respond_to :html
@ -25,7 +26,7 @@ class StatusMessagesController < ApplicationController
end
end
def bookmarklet
def bookmarklet
@aspects = current_user.aspects
@selected_contacts = @aspects.map { |aspect| aspect.contacts }.flatten.uniq
@aspect_ids = @aspects.map{|x| x.id}

View file

@ -3,6 +3,7 @@
# the COPYRIGHT file.
class TagsController < ApplicationController
helper :comments
skip_before_filter :set_invites
skip_before_filter :which_action_and_user
skip_before_filter :set_grammatical_gender
@ -51,7 +52,11 @@ class TagsController < ApplicationController
end
@posts = @posts.tagged_with(params[:name])
@posts = @posts.includes(:comments, :photos).order('created_at DESC').limit(15).offset(15*(params[:page]-1))
max_time = params[:max_time] ? Time.at(params[:max_time].to_i) : Time.now
@posts = @posts.where(StatusMessage.arel_table[:created_at].lt(max_time))
@posts = @posts.includes(:comments, :photos).order('posts.created_at DESC').limit(15)
@posts = PostsFake.new(@posts)
@commenting_disabled = true

View file

@ -2,6 +2,7 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class UsersController < ApplicationController
helper :language
require File.join(Rails.root, 'lib/diaspora/ostatus_builder')
require File.join(Rails.root, 'lib/diaspora/exporter')
require File.join(Rails.root, 'lib/collect_user_photos')

View file

@ -5,9 +5,6 @@
module ApplicationHelper
@@youtube_title_cache = Hash.new("no-title")
def next_page
params[:page] ? (params[:page].to_i + 1) : 2
end
def timeago(time, options = {})
options[:class] ||= "timeago"
content_tag(:abbr, time.to_s, options.merge(:title => time.iso8601)) if time
@ -82,8 +79,19 @@ module ApplicationHelper
</li>".html_safe
end
def link_for_aspect(aspect, opts={})
opts[:params] ||= {}
params ||= {}
opts[:params] = opts[:params].merge("a_ids[]" => aspect.id, :created_at => params[:created_at])
opts[:class] ||= ""
opts[:class] << " hard_aspect_link"
opts['data-guid'] = aspect.id
link_to aspect.name, aspects_path( opts[:params] ), opts
end
def current_aspect?(aspect)
!@aspect.nil? && !@aspect.is_a?(Symbol) && @aspect.id == aspect.id
!@aspect.nil? && !@aspect.instance_of?(Symbol) && @aspect.id == aspect.id
end
def aspect_or_all_path aspect
@ -161,21 +169,17 @@ module ApplicationHelper
def markdownify(message, options = {})
message = h(message).html_safe
if !options.has_key?(:newlines)
options[:newlines] = true
end
options[:newlines] = true if !options.has_key?(:newlines)
options[:emoticons] = true if !options.has_key?(:emoticons)
message = process_links(message)
message = process_autolinks(message)
message = process_emphasis(message)
message = process_youtube(message, options[:youtube_maps])
message = process_vimeo(message, options[:vimeo_maps])
message = process_emoticons(message) if options[:emoticons]
message.gsub!(/&lt;3/, "&hearts;")
if options[:newlines]
message.gsub!(/\n+/, '<br />')
end
message.gsub!(/\n+/, '<br />') if options[:newlines]
return message
end
@ -208,16 +212,18 @@ module ApplicationHelper
end
def process_youtube(message, youtube_maps)
regex = /( |^)(https?:\/\/)?www\.youtube\.com\/watch[^ ]*v=([A-Za-z0-9_\-]+)(&[^ ]*|)/
regex = /( |^)(https?:\/\/)?www\.youtube\.com\/watch[^ ]*v=([A-Za-z0-9_\-]+)(&[^ ]*)?(#[^ ]+)?/
processed_message = message.gsub(regex) do |matched_string|
match_data = matched_string.match(regex)
video_id = match_data[3]
anchor = match_data[5]
anchor ||= ''
if youtube_maps && youtube_maps[video_id]
title = h(CGI::unescape(youtube_maps[video_id]))
else
title = I18n.t 'application.helper.video_title.unknown'
end
' <a class="video-link" data-host="youtube.com" data-video-id="' + video_id + '" href="'+ match_data[0].strip + '" target="_blank">Youtube: ' + title + '</a>'
' <a class="video-link" data-host="youtube.com" data-video-id="' + video_id + '" data-anchor="' + anchor + '" href="'+ match_data[0].strip + '" target="_blank">Youtube: ' + title + '</a>'
end
return processed_message
end
@ -269,6 +275,27 @@ module ApplicationHelper
return processed_message
end
def process_emoticons(message)
map = {
"&lt;3" => "&hearts;",
":(" => "&#9785;",
":-(" => "&#9785;",
":)" => "&#9786;",
":-)" => "&#9786;",
"-&gt;" => "&rarr;",
"&lt;-" => "&larr;",
"..." => "&hellip;",
"(tm)" => "&trade;",
"(r)" => "&reg;",
"(c)" => "&copy;"
}
map.each do |search, replace|
message.gsub!(search, replace)
end
message
end
def info_text(text)
image_tag 'icons/monotone_question.png', :class => 'what_is_this', :title => text
end

View file

@ -1,17 +1,10 @@
#/ Copyright (c) 2010, Diaspora Inc. This file is
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module AspectsHelper
def link_for_aspect(aspect, opts={})
opts[:params] ||= {}
params ||= {}
opts[:params] = opts[:params].merge("a_ids[]" => aspect.id, :created_at => params[:created_at])
opts[:class] ||= ""
opts[:class] << " hard_aspect_link"
opts['data-guid'] = aspect.id
link_to aspect.name, aspects_path( opts[:params] ), opts
def next_page_path
aspects_path(:max_time => @posts.last.send(session[:sort_order].to_sym).to_i, :a_ids => params[:a_ids])
end
def remove_link(aspect)

View file

@ -2,7 +2,7 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module StreamHelper
module CommentsHelper
GSUB_THIS = "FIUSDHVIUSHDVIUBAIUHAPOIUXJM"
def comment_toggle(count, commenting_disabled=false)
if count <= 3

View file

@ -1,5 +0,0 @@
module ConversationsHelper
def new_message_text(count)
t('conversations.helper.new_messages', :count => count)
end
end

View file

@ -23,4 +23,12 @@ module LayoutHelper
def javascript(*args)
content_for(:head) { javascript_include_tag(*args) }
end
def new_notification_text(count)
t('notifications.helper.new_notifications', :count => count)
end
def new_message_text(count)
t('conversations.helper.new_messages', :count => count)
end
end

View file

@ -31,9 +31,6 @@ module NotificationsHelper
t("notifications.#{target_type}", :post_author => post_author)
end
def new_notification_text(count)
t('notifications.helper.new_notifications', :count => count)
end
def new_notification_link(count)
if count > 0
@ -56,4 +53,12 @@ module NotificationsHelper
def peoples_names(note)
note.actors.map{|p| p.name}.join(", ")
end
def the_day(i18n)
i18n[0].match(/\d/) ? i18n[0].gsub('.', '') : i18n[1].gsub('.', '')
end
def the_month(i18n)
i18n[0].match(/\d/) ? i18n[1] : i18n[0]
end
end

View file

@ -27,4 +27,8 @@ module PeopleHelper
I18n.l bday, :format => I18n.t('date.formats.birthday_with_year')
end
end
def next_page_path
person_path(@person, :max_time => @posts.last.created_at.to_i)
end
end

View file

@ -1,16 +0,0 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module RequestsHelper
def new_request?(request_count)
'new_requests' if request_count > 0
end
def new_request_link(request_count)
if request_count > 0
link_to t('requests.helper.new_requests', :count => @request_count), manage_aspects_path
end
end
end

View file

@ -0,0 +1,9 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module TagsHelper
def next_page_path
tag_path(@tag, :max_time => @posts.last.created_at.to_i)
end
end

View file

@ -41,7 +41,8 @@ private
def self.concatenate_or_create(recipient, target, actor, notification_type)
if n = notification_type.where(:target_id => target.id,
:target_type => target.class.base_class,
:recipient_id => recipient.id).first
:recipient_id => recipient.id,
:unread => true).first
unless n.actors.include?(actor)
n.actors << actor
end

View file

@ -81,7 +81,7 @@ class Post < ActiveRecord::Base
local_post = Post.where(:guid => self.guid).first
if local_post && local_post.author_id == self.author_id
known_post = user.raw_visible_posts.where(:guid => self.guid).first
known_post = user.visible_posts.where(:guid => self.guid).first
if known_post
if known_post.mutable?
known_post.update_attributes(self.attributes)

View file

@ -96,7 +96,7 @@ class User < ActiveRecord::Base
contact = contact_for(person)
add_contact_to_aspect(contact, to_aspect)
membership = contact ? AspectMembership.where(:contact_id => contact.id, :aspect_id => from_aspect.id).first : nil
return(membership && membership.destroy)
end
@ -344,5 +344,4 @@ class User < ActiveRecord::Base
mentioned_person.delete
end
end
end

View file

@ -13,6 +13,6 @@
- if posts.length > 0
= render 'shared/stream', :posts => posts
#pagination
=link_to(t('more'), aspects_path(:page => next_page, :a_ids => params[:a_ids]), :class => 'paginate')
=link_to(t('more'), next_page_path, :class => 'paginate')
- else
= render 'aspects/no_posts_message', :post_count => posts.length

View file

@ -12,8 +12,9 @@
= link_to t('.post_a_message'), '#publisher_page', :id => 'publisher_button'
#main_stream.stream
= render 'shared/stream', :posts => @posts
#pagination
%a.more-link.paginate{:href => aspects_path(:a_ids => params[:a_ids], :page => params[:page] + 1)}
%h2= t("more")
-if @posts.length > 0
#pagination
%a.more-link.paginate{:href => next_page_path}
%h2= t("more")
- content_for :subpages do
= render 'shared/publisher', :aspect_ids => @aspect_ids

View file

@ -4,7 +4,7 @@
:javascript
$(document).ready(function () {
var data = $.parseJSON( '#{@all_contacts_and_ids.to_json.gsub("'", "\\\\'")}' ),
var data = $.parseJSON( "#{@contacts_json}" ),
autocompleteInput = $("#contact_autocomplete");
autocompleteInput.autoSuggest(data, {

View file

@ -79,7 +79,7 @@
%body{:class => "#{yield(:body_class)}"}
- unless @landing_page
#notification
#notifications
- flash.each do |name, msg|
= content_tag :div, msg, :id => "flash_#{name}"

View file

@ -1,7 +1,7 @@
-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
= person_image_tag(person)
= link_to "#{person.name.titleize}", person_path(person.id)
= object_link(note)
.notification
= person_image_tag(person)
= link_to "#{person.name.titleize}", person_path(person.id)
= object_link(note)

View file

@ -1,52 +1,28 @@
:javascript
$('.stream_element').live('mousedown', function(evt){
var note = $(this).closest('.stream_element'),
note_id = note.attr('data-guid'),
nBadge = $("#notification_badge_number");
if(note.hasClass('unread') ){
note.removeClass('unread');
$.ajax({
url: 'notifications/' + note_id,
type: 'PUT'
});
}
if(nBadge.html() != null) {
nBadge.html().replace(/\d+/, function(num){
num = parseInt(num);
nBadge.html(parseInt(num)-1);
if(num == 1) {
nBadge.addClass("hidden");
}
});
}
});
$('a.more').live('click', function(){
$(this).hide();
$(this).next('span').removeClass('hidden');
});
.span-1
= image_tag 'icons/mail_big.png', :height => 30, :width => 30, :style=>"margin-top:3px;"
.span-10
.span-13
%h2
%span.notification_count{:class => ('unread' if @notification_count > 0)}
= @notification_count
= t('.notifications')
.span-13.last.left
.span-8.last.left
= link_to t('.mark_all_as_read'), read_all_notifications_path, :class => 'button'
.span-24.last
%ul.stream.notifications
.stream.notifications
- @group_days.each do |day, notes|
%li
%h4= day
%ul.notifications_for_day
.day_group.span-24.last
.span-3
.date
.day= the_day(day.split(' '))
.month= the_month(day.split(' '))
.span-8.notifications_for_day
- notes.each do |note|
.stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : ''}"}
%span.from
= notification_people_link(note)
= object_link(note)
.time= timeago(note.created_at)
%br
%time= timeago(note.created_at)
.span-13.last
= will_paginate @notifications

View file

@ -5,7 +5,8 @@
.stream_element{:id => person.id}
.right
= render :partial => 'people/relationship_action',
:locals => { :person => person, :contact => contact, :request => request}
:locals => { :person => person, :contact => contact,
:request => request, :current_user => current_user }
= person_image_link(person)

View file

@ -0,0 +1,60 @@
-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :head do
= include_javascripts :people
- content_for :page_title do
= @person.name
.span-8.append-1.last
= render :partial => 'people/profile_sidebar', :locals => {:person => @person, :contact => @contact }
.span-15.last
#author_info
- if user_signed_in? && !(@contact.persisted? || current_user.person == @person)
.right
- if @incoming_request
= link_to t('people.show.incoming_request', :name => truncate(@person.name, :length => 20, :separator => ' ', :omission => '')),
{:controller => "contacts",
:action => "new",
:person_id => @person.id},
:class => 'share_with button',
:rel => 'facebox'
-else
= link_to t('people.show.start_sharing'),
{:controller => "contacts",
:action => "new",
:person_id => @person.id},
:class => 'share_with button',
:rel => 'facebox'
- if @share_with
= javascript_tag "$(document).ready(function() {jQuery.facebox({ ajax: '#{new_contact_path(:person_id => @person.id)}' });});"
- else
- if user_signed_in? && @contact.person && @contact.receiving?
.right
= link_to t('.mention'), new_status_message_path(:person_id => @person.id), :class => 'button', :rel => 'facebox'
- if @contact.mutual?
= link_to t('.message'), new_conversation_path(:contact_id => @contact.id, :name => @contact.person.name, :contact_id => @contact.id), :class => 'button', :rel => 'facebox'
%h3
= @person.name
%span.diaspora_handle
= @person.diaspora_handle
.description
- if !@person.profile.tag_string.blank?
= @person.profile.format_tags(@person.profile.tag_string)
- if user_signed_in? && @person == current_user.person
%span.hover_edit
= link_to t('people.show.edit'), edit_profile_path
%hr
#people_stream.stream
- for hash in @hashes
= render :partial => 'people/person', :locals => hash
= will_paginate @contacts_of_contact

View file

@ -7,6 +7,7 @@
- content_for :head do
= include_javascripts :people
= javascript_include_tag 'contact-list'
.span-24.last
- if params[:q].blank?

View file

@ -13,14 +13,15 @@
= render :partial => 'people/profile_sidebar', :locals => {:person => @person, :contact => @contact }
- if user_signed_in? && @contact.persisted? && @contacts_of_contact.count > 0
.span-8.last
.span-8.last#contacts_of_contact
%hr{:style=>"width:300px;"}
.section.contact_pictures
%h4
= @contacts_of_contact.length
= t('.similar_contacts')
= t('contacts', :count => @contacts_of_contact_count)
- for person in @contacts_of_contact
= person_image_link person
- if @contacts_of_contact.count > 25
%p.see_all= link_to t('.see_all'), person_contacts_path(@person)
.span-15.last
#author_info
@ -73,7 +74,7 @@
#main_stream.stream
= render 'shared/stream', :posts => @posts, :commenting_disabled => @commenting_disabled
#pagination
=link_to(t('more'), person_path(@person, :page => next_page), :class => 'paginate')
=link_to(t('more'), next_page_path, :class => 'paginate')
- else
#stream

View file

@ -31,7 +31,7 @@
#main_stream.stream
= render 'shared/stream', :posts => @posts
#pagination
=link_to(t('more'), person_path(@person, :page => next_page), :class => 'paginate')
=link_to(t('more'), next_page_path, :class => 'paginate')
- else
#stream
%li{:style=>"text-align:center;"}

9
app/views/photos/show.mobile.haml Normal file → Executable file
View file

@ -6,3 +6,12 @@
#show_content.photo
= image_tag @photo.url(:scaled_full)
-if @additional_photos && @additional_photos.length > 1
#photo_controls
%table
%tr
%td
=link_to "←", @prev_photo, :rel => 'prefetch', :class => 'arrow'
%td{:width => '100%'}
%td
=link_to "→", @next_photo, :rel => 'prefetch', :class => 'arrow'

View file

@ -21,7 +21,7 @@
.content
.from
= person_link(post.author, :class => 'author')
%time.timeago{:datetime => post.created_at}
%time.time.timeago{:datetime => post.created_at, :integer => post.created_at.to_i}
= render 'status_messages/status_message', :post => post, :photos => post.photos
.info

View file

@ -12,6 +12,6 @@
= render 'status_messages/status_message', :post => post, :photos => post.photos
.info
%span.time
%span.time{:integer => post.created_at.to_i}
= t('ago', :time => time_ago_in_words(post.created_at))
= link_to "#{t('comments', :count => post.comments.length)} →", status_message_path(post), :class => 'comment_link right'

View file

@ -12,7 +12,7 @@
= markdownify(@status_message.text, :youtube_maps => @status_message[:youtube_titles])
- for photo in @status_message.photos
.thumb_small= link_to (image_tag photo.url(:thumb_small)), photo_path(photo)
= link_to (image_tag photo.url(:thumb_small), :class => 'thumb_small'), photo_path(photo)
%p.time
= how_long_ago(@status_message)

View file

@ -23,7 +23,7 @@
- if @posts.length > 0
= render 'shared/stream', :posts => @posts
#pagination
=link_to(t('more'), tag_path(params[:name], :page => next_page), :class => 'paginate')
=link_to(t('more'), next_page_path, :class => 'paginate')
- else
= t('.nobody_talking', :tag => "##{params[:name]}")

View file

@ -0,0 +1 @@
{"recipes": ["debian::bootstrap" ] }

View file

@ -0,0 +1,312 @@
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specifiy
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
# 1gb => 1024*1024*1024 bytes
#
# units are case insensitive so 1GB 1Gb 1gB are all the same.
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /usr/local/var/run/redis.pid when daemonized.
daemonize no
# When running daemonized, Redis writes a pid file in /usr/local/var/run/redis.pid by
# default. You can specify a custom pid file location here.
pidfile /usr/local/var/run/redis.pid
# Accept connections on the specified port, default is 6379
port 6379
# If you want you can bind a single interface, if the bind option is not
# specified all the interfaces will listen for incoming connections.
#
# bind 127.0.0.1
# Close the connection after a client is idle for N seconds (0 to disable)
timeout 300
# Set server verbosity to 'debug'
# it can be one of:
# debug (a lot of information, useful for development/testing)
# verbose (many rarely useful info, but not a mess like the debug level)
# notice (moderately verbose, what you want in production probably)
# warning (only very important / critical messages are logged)
loglevel verbose
# Specify the log file name. Also 'stdout' can be used to force
# Redis to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
logfile stdout
# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1
databases 16
################################ SNAPSHOTTING #################################
#
# Save the DB on disk:
#
# save <seconds> <changes>
#
# Will save the DB if both the given number of seconds and the given
# number of write operations against the DB occurred.
#
# In the example below the behaviour will be to save:
# after 900 sec (15 min) if at least 1 key changed
# after 300 sec (5 min) if at least 10 keys changed
# after 60 sec if at least 10000 keys changed
#
# Note: you can disable saving at all commenting all the "save" lines.
save 900 1
save 300 10
save 60 10000
# Compress string objects using LZF when dump .rdb databases?
# For default that's set to 'yes' as it's almost always a win.
# If you want to save some CPU in the saving child set it to 'no' but
# the dataset will likely be bigger if you have compressible values or keys.
rdbcompression yes
# The filename where to dump the DB
dbfilename dump.rdb
# The working directory.
#
# The DB will be written inside this directory, with the filename specified
# above using the 'dbfilename' configuration directive.
#
# Also the Append Only File will be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
dir /usr/local/var/db/redis/
################################# REPLICATION #################################
# Master-Slave replication. Use slaveof to make a Redis instance a copy of
# another Redis server. Note that the configuration is local to the slave
# so for example it is possible to configure the slave to save the DB with a
# different interval, or to listen to another port, and so on.
#
# slaveof <masterip> <masterport>
# If the master is password protected (using the "requirepass" configuration
# directive below) it is possible to tell the slave to authenticate before
# starting the replication synchronization process, otherwise the master will
# refuse the slave request.
#
# masterauth <master-password>
################################## SECURITY ###################################
# Require clients to issue AUTH <PASSWORD> before processing any other
# commands. This might be useful in environments in which you do not trust
# others with access to the host running redis-server.
#
# This should stay commented out for backward compatibility and because most
# people do not need auth (e.g. they run their own servers).
#
# Warning: since Redis is pretty fast an outside user can try up to
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
# requirepass foobared
################################### LIMITS ####################################
# Set the max number of connected clients at the same time. By default there
# is no limit, and it's up to the number of file descriptors the Redis process
# is able to open. The special value '0' means no limits.
# Once the limit is reached Redis will close all the new connections sending
# an error 'max number of clients reached'.
#
# maxclients 128
# Don't use more memory than the specified amount of bytes.
# When the memory limit is reached Redis will try to remove keys with an
# EXPIRE set. It will try to start freeing keys that are going to expire
# in little time and preserve keys with a longer time to live.
# Redis will also try to remove objects from free lists if possible.
#
# If all this fails, Redis will start to reply with errors to commands
# that will use more memory, like SET, LPUSH, and so on, and will continue
# to reply to most read-only commands like GET.
#
# WARNING: maxmemory can be a good idea mainly if you want to use Redis as a
# 'state' server or cache, not as a real DB. When Redis is used as a real
# database the memory usage will grow over the weeks, it will be obvious if
# it is going to use too much memory in the long run, and you'll have the time
# to upgrade. With maxmemory after the limit is reached you'll start to get
# errors for write operations, and this may even lead to DB inconsistency.
#
# maxmemory <bytes>
############################## APPEND ONLY MODE ###############################
# By default Redis asynchronously dumps the dataset on disk. If you can live
# with the idea that the latest records will be lost if something like a crash
# happens this is the preferred way to run Redis. If instead you care a lot
# about your data and don't want to that a single record can get lost you should
# enable the append only mode: when this mode is enabled Redis will append
# every write operation received in the file appendonly.aof. This file will
# be read on startup in order to rebuild the full dataset in memory.
#
# Note that you can have both the async dumps and the append only file if you
# like (you have to comment the "save" statements above to disable the dumps).
# Still if append only mode is enabled Redis will load the data from the
# log file at startup ignoring the dump.rdb file.
#
# IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append
# log file in background when it gets too big.
appendonly no
# The name of the append only file (default: "appendonly.aof")
# appendfilename appendonly.aof
# The fsync() call tells the Operating System to actually write data on disk
# instead to wait for more data in the output buffer. Some OS will really flush
# data on disk, some other OS will just try to do it ASAP.
#
# Redis supports three different modes:
#
# no: don't fsync, just let the OS flush the data when it wants. Faster.
# always: fsync after every write to the append only log . Slow, Safest.
# everysec: fsync only if one second passed since the last fsync. Compromise.
#
# The default is "everysec" that's usually the right compromise between
# speed and data safety. It's up to you to understand if you can relax this to
# "no" that will will let the operating system flush the output buffer when
# it wants, for better performances (but if you can live with the idea of
# some data loss consider the default persistence mode that's snapshotting),
# or on the contrary, use "always" that's very slow but a bit safer than
# everysec.
#
# If unsure, use "everysec".
# appendfsync always
appendfsync everysec
# appendfsync no
################################ VIRTUAL MEMORY ###############################
# Virtual Memory allows Redis to work with datasets bigger than the actual
# amount of RAM needed to hold the whole dataset in memory.
# In order to do so very used keys are taken in memory while the other keys
# are swapped into a swap file, similarly to what operating systems do
# with memory pages.
#
# To enable VM just set 'vm-enabled' to yes, and set the following three
# VM parameters accordingly to your needs.
vm-enabled no
# vm-enabled yes
# This is the path of the Redis swap file. As you can guess, swap files
# can't be shared by different Redis instances, so make sure to use a swap
# file for every redis process you are running. Redis will complain if the
# swap file is already in use.
#
# The best kind of storage for the Redis swap file (that's accessed at random)
# is a Solid State Disk (SSD).
#
# *** WARNING *** if you are using a shared hosting the default of putting
# the swap file under /tmp is not secure. Create a dir with access granted
# only to Redis user and configure Redis to create the swap file there.
vm-swap-file /tmp/redis.swap
# vm-max-memory configures the VM to use at max the specified amount of
# RAM. Everything that deos not fit will be swapped on disk *if* possible, that
# is, if there is still enough contiguous space in the swap file.
#
# With vm-max-memory 0 the system will swap everything it can. Not a good
# default, just specify the max amount of RAM you can in bytes, but it's
# better to leave some margin. For instance specify an amount of RAM
# that's more or less between 60 and 80% of your free RAM.
vm-max-memory 0
# Redis swap files is split into pages. An object can be saved using multiple
# contiguous pages, but pages can't be shared between different objects.
# So if your page is too big, small objects swapped out on disk will waste
# a lot of space. If you page is too small, there is less space in the swap
# file (assuming you configured the same number of total swap file pages).
#
# If you use a lot of small objects, use a page size of 64 or 32 bytes.
# If you use a lot of big objects, use a bigger page size.
# If unsure, use the default :)
vm-page-size 32
# Number of total memory pages in the swap file.
# Given that the page table (a bitmap of free/used pages) is taken in memory,
# every 8 pages on disk will consume 1 byte of RAM.
#
# The total swap size is vm-page-size * vm-pages
#
# With the default of 32-bytes memory pages and 134217728 pages Redis will
# use a 4 GB swap file, that will use 16 MB of RAM for the page table.
#
# It's better to use the smallest acceptable value for your application,
# but the default is large in order to work in most conditions.
vm-pages 134217728
# Max number of VM I/O threads running at the same time.
# This threads are used to read/write data from/to swap file, since they
# also encode and decode objects from disk to memory or the reverse, a bigger
# number of threads can help with big objects even if they can't help with
# I/O itself as the physical device may not be able to couple with many
# reads/writes operations at the same time.
#
# The special value of 0 turn off threaded I/O and enables the blocking
# Virtual Memory implementation.
vm-max-threads 4
############################### ADVANCED CONFIG ###############################
# Glue small output buffers together in order to send small replies in a
# single TCP packet. Uses a bit more CPU but most of the times it is a win
# in terms of number of queries per second. Use 'yes' if unsure.
glueoutputbuf yes
# Hashes are encoded in a special way (much more memory efficient) when they
# have at max a given numer of elements, and the biggest element does not
# exceed a given threshold. You can configure this limits with the following
# configuration directives.
hash-max-zipmap-entries 64
hash-max-zipmap-value 512
# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
# order to help rehashing the main Redis hash table (the one mapping top-level
# keys to values). The hash table implementation redis uses (see dict.c)
# performs a lazy rehashing: the more operation you run into an hash table
# that is rhashing, the more rehashing "steps" are performed, so if the
# server is idle the rehashing is never complete and some more memory is used
# by the hash table.
#
# The default is to use this millisecond 10 times every second in order to
# active rehashing the main dictionaries, freeing memory when possible.
#
# If unsure:
# use "activerehashing no" if you have hard latency requirements and it is
# not a good thing in your environment that Redis can reply form time to time
# to queries with 2 milliseconds delay.
#
# use "activerehashing yes" if you don't have such hard requirements but
# want to free memory asap when possible.
activerehashing yes
################################## INCLUDES ###################################
# Include one or more other config files here. This is useful if you
# have a standard template that goes to all redis server but also need
# to customize a few per-server settings. Include files can include
# other files, so use this wisely.
#
# include /path/to/local.conf
# include /path/to/other.conf

View file

@ -0,0 +1 @@
{"recipes": ["debian::main" ] }

View file

@ -0,0 +1,49 @@
execute "bundler deps" do
command "apt-get install -y cpio"
end
execute "nokogiri deps" do
command "apt-get install -y libxml2-dev libxslt-dev"
end
execute "eventmachine deps" do
command "apt-get install -y gcc-c++"
end
execute "ssl lib" do
command "apt-get install -y libssl-dev libopenssl-ruby"
end
execute "curl" do
command "apt-get install -y libcurl4-openssl-dev"
end
execute "ffi" do
command "apt-get install -y libffi-ruby"
end
execute "htop" do
command "apt-get install -y htop psmisc screen"
end
execute "rvm deps" do
command "apt-get install -y bzip2"
end
def harden_ruby(ruby_string)
Dir.glob("/usr/local/rvm/wrappers/#{ruby_string}/*").each do |file|
link "/usr/local/bin/#{file.split('/').last}" do
to file
end
end
Dir.glob("/usr/local/rvm/gems/#{ruby_string}/bin/*").each do |file|
link "/usr/local/bin/#{file.split('/').last}" do
to file
end
end
end
harden_ruby("ree-1.8.7-2010.02")
include_recipe "debian::post_bootstrap"

View file

@ -0,0 +1,3 @@
execute "install ImageMagick" do
command "apt-get install -y imagemagick libmagick9-dev"
end

View file

@ -0,0 +1,3 @@
execute "JAVA!! for Jammit" do
command "apt-get install -y java"
end

View file

@ -0,0 +1,5 @@
include_recipe "debian::image_magick"
include_recipe "debian::mysql"
include_recipe "common::main"
include_recipe "debian::nginx"
include_recipe "debian::redis"

View file

@ -0,0 +1,3 @@
execute "install mysql" do
command "apt-get install -y mysql-server libmysqlclient-dev libmysql-ruby"
end

View file

@ -0,0 +1,4 @@
execute "pcre dependency" do
command "apt-get install -y libpcre3 libpcre3-dev"
end
include_recipe "common::nginx"

View file

@ -0,0 +1 @@
include_recipe "debian::java"

View file

@ -0,0 +1,19 @@
execute "download redis" do
command "wget http://ftp.us.debian.org/debian/pool/main/r/redis/redis-server_2.2.2-1_amd64.deb"
end
execute "install redis" do
command "dpkg -i redis-server_2.2.2-1_amd64.deb"
end
cookbook_file "/usr/local/etc/redis.conf" do
source "redis.conf"
end
execute "change redis.conf permissions" do
command "chmod 755 /usr/local/etc/redis.conf"
end
execute "make the redis db directory" do
command "mkdir -p /usr/local/var/db/redis"
end

View file

@ -31,8 +31,8 @@ default:
# Secure websocket confguration (wss://)
# requires SSL cert and key
socket_secure: false
socket_private_key_location: '/full/path/to/file.key'
socket_cert_chain_location: '/full/path/to/cert_chain.crt'
socket_private_key_location: '/full/path/to/file.key'
# Diaspora is only tested against this default pubsub server.
pubsub_server: 'https://pubsubhubbub.appspot.com/'

View file

@ -22,18 +22,19 @@ javascripts:
- public/javascripts/vendor/charCount.js
- public/javascripts/jquery.autocomplete-custom.js
- public/javascripts/jquery.infieldlabel-custom.js
- public/javascripts/fileuploader-custom.js
- public/javascripts/keycodes.js
- public/javascripts/fileuploader-custom.js
- public/javascripts/diaspora.js
- public/javascripts/widgets/i18n.js
- public/javascripts/widgets/alert.js
- public/javascripts/widgets/embedder.js
- public/javascripts/widgets/timeago.js
- public/javascripts/widgets/infinite-scroll.js
- public/javascripts/widgets/directionDetector.js
- public/javascripts/widgets/notifications.js
- public/javascripts/view.js
- public/javascripts/stream.js
- public/javascripts/search.js
- public/javascripts/infinite-scroll.js
mobile:
- public/javascripts/vendor/jquery152.min.js
- public/javascripts/custom-mobile-scripting.js
@ -41,7 +42,7 @@ javascripts:
- public/javascripts/vendor/jquery.infinitescroll.min.js
- public/javascripts/diaspora.js
- public/javascripts/widgets/i18n.js
- public/javascripts/infinite-scroll.js
- public/javascripts/widgets/infinite-scroll.js
- public/javascripts/rails.js
mailchimp:
- public/javascripts/vendor/mailchimp/jquery.form.js

View file

@ -1,21 +1,22 @@
test:
common: &common
adapter: mysql2
database: diaspora_test
username: root
password: password
host: "localhost"
port: 3306
# socket: /tmp/mysql.sock
username: "root"
password: "password"
charset: utf8
collation: utf8_bin
development:
adapter: mysql2
<<: *common
database: diaspora_development
username: root
password: password
charset: utf8
collation: utf8_bin
production:
adapter: mysql2
<<: *common
database: diaspora_production
username: root
password: password
charset: utf8
collation: utf8_bin
test:
<<: *common
database: "diaspora_test"

View file

@ -1,5 +1,6 @@
default: "en"
available:
bg: "български език"
br: "Brezhoneg"
ca: "Català"
cs: "Čeština"
@ -21,6 +22,8 @@ available:
id: "Bahasa Indonesia"
is: "íslenska"
it: "Italiano"
ja: "日本語"
ko: "한국어"
lt: "Lietuviškai"
mk: "македонски"
ml: "മലയാളം"
@ -35,7 +38,7 @@ available:
sk: "Slovenčina"
sv: "Svenska"
tr: "Türk"
zh: "中文"
zh-CN: "中文"
zh-TW: "台灣中文"
fallbacks:
en-GB:

View file

@ -0,0 +1 @@
DO NOT EDIT THIS FILES. Thanks!

View file

@ -0,0 +1 @@
{ :bg => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :ca => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :cs => { :i18n => {:plural => { :keys => [:one, :few, :other], :rule => lambda { |n| n == 1 ? :one : [2, 3, 4].include?(n) ? :few : :other } } } } }

View file

@ -0,0 +1 @@
{ :cy => { :i18n => {:plural => { :keys => [:one, :two, :many, :other], :rule => lambda { |n| n == 1 ? :one : n == 2 ? :two : n == 8 || n == 11 ? :many : :other } } } } }

View file

@ -0,0 +1 @@
{ :da => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :de => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :el => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :en => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :es => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :eu => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :fi => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :fr => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n && n != 2 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :ga => { :i18n => {:plural => { :keys => [:one, :two, :other], :rule => lambda { |n| n == 1 ? :one : n == 2 ? :two : :other } } } } }

View file

@ -0,0 +1 @@
{ :gl => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :he => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :hu => { :i18n => {:plural => { :keys => [:other], :rule => lambda { |n| :other } } } } }

View file

@ -0,0 +1 @@
{ :id => { :i18n => {:plural => { :keys => [:other], :rule => lambda { |n| :other } } } } }

View file

@ -0,0 +1 @@
{ :is => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :it => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :ja => { :i18n => {:plural => { :keys => [:other], :rule => lambda { |n| :other } } } } }

View file

@ -0,0 +1 @@
{ :ko => { :i18n => {:plural => { :keys => [:other], :rule => lambda { |n| :other } } } } }

View file

@ -0,0 +1 @@
{ :lt => { :i18n => {:plural => { :keys => [:one, :few, :other], :rule => lambda { |n| n % 10 == 1 && ![11, 12, 13, 14, 15, 16, 17, 18, 19].include?(n % 100) ? :one : [2, 3, 4, 5, 6, 7, 8, 9].include?(n % 10) && ![11, 12, 13, 14, 15, 16, 17, 18, 19].include?(n % 100) ? :few : :other } } } } }

View file

@ -0,0 +1 @@
{ :mk => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n % 10 == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :ml => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :nb => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :nl => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :pa => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :pl => { :i18n => {:plural => { :keys => [:one, :few, :other], :rule => lambda { |n| n == 1 ? :one : [2, 3, 4].include?(n % 10) && ![12, 13, 14].include?(n % 100) && ![22, 23, 24].include?(n % 100) ? :few : :other } } } } }

View file

@ -0,0 +1 @@
{ :ro => { :i18n => {:plural => { :keys => [:one, :few, :other], :rule => lambda { |n| n == 1 ? :one : n == 0 ? :few : :other } } } } }

View file

@ -0,0 +1 @@
{ :ru => { :i18n => {:plural => { :keys => [:one, :few, :many, :other], :rule => lambda { |n| n % 10 == 1 && n % 100 != 11 ? :one : [2, 3, 4].include?(n % 10) && ![12, 13, 14].include?(n % 100) ? :few : n % 10 == 0 || [5, 6, 7, 8, 9].include?(n % 10) || [11, 12, 13, 14].include?(n % 100) ? :many : :other } } } } }

View file

@ -0,0 +1 @@
{ :sk => { :i18n => {:plural => { :keys => [:one, :few, :other], :rule => lambda { |n| n == 1 ? :one : [2, 3, 4].include?(n) ? :few : :other } } } } }

View file

@ -0,0 +1 @@
{ :sl => { :i18n => {:plural => { :keys => [:one, :two, :few, :other], :rule => lambda { |n| n % 100 == 1 ? :one : n % 100 == 2 ? :two : [3, 4].include?(n % 100) ? :few : :other } } } } }

View file

@ -0,0 +1 @@
{ :sv => { :i18n => {:plural => { :keys => [:one, :other], :rule => lambda { |n| n == 1 ? :one : :other } } } } }

View file

@ -0,0 +1 @@
{ :tr => { :i18n => {:plural => { :keys => [:other], :rule => lambda { |n| :other } } } } }

View file

@ -0,0 +1,97 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
bg:
devise:
confirmations:
confirmed: "Акаунтът е потвърден. Сега сте вписани."
new:
resend_confirmation: "Повторно изпращане на инструкциите за отключване"
send_instructions: "След няколко минути ще получите ел. писмо съдържащо инструкции как да потвърдите акаунта си."
failure:
inactive: "Акаунтът все още не е активиран."
invalid: "Невалидно потребителско име или парола."
invalid_token: "Данните за удостоверяване не са валидни."
locked: "Акаунтът ви е заключен."
timeout: "Сесията ви изтече, моля впишете се отново, за да продължите."
unauthenticated: "Впишете се или се регистрирайте, за да продължите."
unconfirmed: "Потвърдете акаунта, за да продължите."
invitations:
invitation_token_invalid: "Предоставените данни за поканата не са валидни!"
send_instructions: "Поканата ви е изпратена."
updated: "Паролата е зададена. Сега сте вписани."
mailer:
confirmation_instructions:
confirm: "Потвърждаване на акаунта"
subject: "Инструкции за потвърждаване"
you_can_confirm: "Можете да потвърдите акаунта си чрез линка по-долу:"
hello: "Здравейте %{email}!"
invitation:
accept: "Приеман поканата"
ignore: "Ако не желаете да приемете поканата, моля игнорирайте писмото."
no_account_till: "Акаунтът няма да бъде създаден докато не посетите връзката по-горе и не се регистрирате."
subject: "Поканени сте да се присъедините към Diaspora!"
inviters:
accept_at: ", на адрес %{url}. Можете да приемете поканата чрез линка по-долу."
has_invited_you: "%{name} ви кани да се присъедините към Diaspora"
have_invited_you: "%{names} ви кани да се присъедините към Diaspora"
reset_password_instructions:
change: "Промяна на паролата"
ignore: "Ако не сте заявили промяната, моля игнорирайте писмото."
someone_requested: "Някой е заявил връзка за промяна на паролата. Можете да я промените чрез връзката по-долу."
subject: "Инструкции за възстановяване на паролата"
wont_change: "Паролата ви няма да бъде променена докато не посетите връзката по-горе и не зададете нова."
unlock_instructions:
account_locked: "Акаунтът ви е заключен поради голям брой неуспешни опити за вписване."
click_to_unlock: "За отключване на акаунта кликнете върху връзката по-долу:"
subject: "Инструкции за отключване"
unlock: "Отключване на акаунта"
welcome: "Добре дошли %{email}!"
passwords:
edit:
change_password: "Промяна на паролата"
new:
forgot_password: "Забравена парола?"
no_account: "Не съществува акаунт с въведената ел. поща. Ако очаквате покана, знайте че ние ги раздаваме възможно най-бързо"
send_password_instructions: "Изпращане на инструкции за възстановяване на паролата"
send_instructions: "Ще получите ел. писмо с инструкции за промяна на паролата."
updated: "Паролата е променена успешно. Сега сте вписани."
registrations:
destroyed: "Довиждане! Акаунтът ви е изтрит успешно. Надяваме се да се видим отново."
signed_up: "Регистрирахте се успешно. Ако е включена опцията за потвърждаване ще получите ел. писмо с инструкции."
updated: "Обновихте успешно акаунта си."
sessions:
new:
alpha_software: "Ще ползвате софтуерен продукт в ранен етап на развитие."
bugs_and_feedback: "Имайте предвид, че ще се сблъскате със софтуерни грешки. Препоръчваме ви да ползвате бутона Feedback (в десния край на страницата) за да съобщавате за всеки проблем! Ще се потрудим да отстраним всеки проблем, за който ни съобщите, възможно най-бързо."
bugs_and_feedback_mobile: "Имайте предвид, че ще се сблъскате със софтуерни грешки. Препоръчваме ви да съобщавате за всеки проблем! Ще се потрудим да отстраним всеки проблем, за който ни съобщите, възможно най-бързо."
login: "Вписване"
modern_browsers: "поддържа само съвременни браузъри."
password: "Парола"
remember_me: "Запомни ме"
sign_in: "Вписване"
username: "Потребителско име"
signed_in: "Вписахте се успешно."
signed_out: "Отписахте се успешно."
shared:
links:
forgot_your_password: "Забравена парола?"
receive_confirmation: "Не сте получили инструкциите за отключване?"
receive_unlock: "Не сте получили инструкциите за отключване?"
sign_in: "Вписване"
sign_up: "Регистриране"
sign_up_closed: "За сега регистрациите не са възможни."
mail_signup_form:
sign_up_for_an_invite: "Запишете се за покана!"
unlocks:
new:
resend_unlock: "Повторно изпращане на инструкциите за отключване"
send_instructions: "След няколко минути ще получите ел. писмо съдържащо инструкции как да отключите акаунта си."
unlocked: "Акаунтът е отключен. Сега сте вписани."
errors:
messages:
already_confirmed: "вече е потвърдено"
not_found: "не е открито"
not_locked: "не е заключена"

View file

@ -12,7 +12,7 @@ da:
send_instructions: "Du vil modtage en e-mail med instruktioner om hvordan du bekræfter din konto om et par minutter."
failure:
inactive: "Din konto er endnu ikke aktiveret."
invalid: "Forkert e-mail eller adgangskode."
invalid: "Forkert brugernavn eller adgangskode."
invalid_token: "Ugyldig token."
locked: "Din konto er låst."
timeout: "Du har været inaktiv for længe. Log ind for at fortsætte."

View file

@ -12,7 +12,7 @@ es:
send_instructions: "Recibirás un correo con instrucciones para confirmar tu cuenta en pocos minutos."
failure:
inactive: "Tu cuenta aún no ha sido activada."
invalid: "Contraseña o correo incorrecto."
invalid: "Nombre de usuario o contraseña incorrectos."
invalid_token: "Identificador de autenticación incorrecto."
locked: "Tu cuenta está bloqueada."
timeout: "Tu sesión ha expirado, por favor accede de nuevo para continuar."

View file

@ -12,7 +12,7 @@ eu:
send_instructions: "Minutu batzuetan kontua baieztatzeko argibideak jasoko dituzu e-postan."
failure:
inactive: "Zure kontua ez da aktibatu oraindik."
invalid: "E-posta edo pasahitza okerra."
invalid: "Erabiltzaile edo pasahitz okerra."
invalid_token: "Autentikazio datu akasduna."
locked: "Zure kontua ez dago erabilgarri."
timeout: "Zure sesioa bukatu da, autentikatu berriz jarraitzeko."

View file

@ -6,32 +6,32 @@
gl:
devise:
confirmations:
confirmed: "A túa conta foi confirmada. Xa estás en Diaspora"
confirmed: "Confirmouse a súa conta. Xa está en Diaspora."
new:
resend_confirmation: "Volver a enviar instruccións de confirmación."
send_instructions: "Recibiraás un correo con instrucción para confirmar a túa conta nuns minutos."
resend_confirmation: "Volver enviar as instrucións de confirmación."
send_instructions: "En cuestión de minutos recibirá un correo electrónico con instrucións para confirmar a súa conta."
failure:
inactive: "A túa conta aínda non foi activada."
invalid: "Correo ou contrasinal incorrecta."
invalid_token: "Invitación inválida."
locked: "A túa conta está bloqueada."
timeout: "A túa sesión rematou, entra de novo para continuar."
unauthenticated: "Tes que entrar ou rexistrarte antes de seguir."
unconfirmed: "Tes que confirmar a túa conta antes de seguir."
inactive: "Aínda non se activou a súa conta."
invalid: "O correo electrónico ou contrasinal son incorrectos."
invalid_token: "A invitación non é válida."
locked: "A súa conta está bloqueada."
timeout: "A súa sesión rematou, volva identificarse para continuar."
unauthenticated: "Ten que identificarse ou rexistrarte para continuar."
unconfirmed: "Ten que confirmar a súa conta para continuar."
invitations:
invitation_token_invalid: "Está invitación non é valida!"
send_instructions: "A túa invitación foi enviada."
updated: "O teu contrasinal estableceuse correctamente."
invitation_token_invalid: "A invitación non é valida!"
send_instructions: "Enviouse a invitación."
updated: "O novo contrasinal gardouse correctamente."
mailer:
confirmation_instructions:
confirm: "Confirmar conta"
subject: "Instruccións de confirmación"
you_can_confirm: "Podes confirmar a túa conta a través do enlace de abaixo:"
confirm: "Confirmar a conta"
subject: "Instrucións de confirmación"
you_can_confirm: "Pode confirmar a súa conta mediante a ligazón que hai máis abaixo:"
hello: "Ola %{email}!"
invitation:
accept: "Aceptar convite"
ignore: "Se non queres aceptar a invitación, por favor ignora este correo."
no_account_till: "A túa conta non se creará ata que premas o link de arriba e te rexistres."
accept: "Aceptar a invitación"
ignore: "Se non quere aceptar a invitación, non ten máis que ignorar esta mensaxe."
no_account_till: "A súa conta non se creará ata que premas a ligazón que hai máis arriba e se rexistre."
subject: "Fuches invitado a formar parte de Diaspora!"
inviters:
accept_at: ", %{url}, podes aceptar mediante o link de abaixo."
@ -70,7 +70,7 @@ gl:
login: "Nome de usuario"
modern_browsers: "só acepta navegadores actuais."
password: "Contrasinal"
remember_me: "Lémbrame"
remember_me: "Lembrar os datos."
sign_in: "Entrar"
username: "Nome de usuario"
signed_in: "Entrou satisfactoriamente."

Some files were not shown because too many files have changed in this diff Show more