From cdf94a0275ed1e4f08977ad984c549c71deced76 Mon Sep 17 00:00:00 2001 From: Arzumy MD Date: Sat, 16 Apr 2011 02:40:06 +0800 Subject: [PATCH 01/61] #1019 comment/post handles multiple youtube links properly --- lib/youtube_titles.rb | 14 ++++++++------ spec/helpers/application_helper_spec.rb | 8 ++++---- spec/models/comment_spec.rb | 16 +++++++++------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/lib/youtube_titles.rb b/lib/youtube_titles.rb index 1ebe240ec..7262da5fe 100644 --- a/lib/youtube_titles.rb +++ b/lib/youtube_titles.rb @@ -9,14 +9,16 @@ module YoutubeTitles end title || I18n.t('application.helper.video_title.unknown') end + def get_youtube_title text + youtube_match = text.enum_for(:scan, YOUTUBE_ID_REGEX).map { Regexp.last_match } + return if youtube_match.empty? + self.youtube_titles ||= {} - youtube_match = text.match(YOUTUBE_ID_REGEX) - return unless youtube_match - video_id = youtube_match[1] - unless self.youtube_titles[video_id] - self.youtube_titles[video_id] = CGI::escape(youtube_title_for(video_id)) + youtube_match.each do |match_data| + self.youtube_titles[match_data[1]] = CGI::escape(youtube_title_for(match_data[1])) end end - YOUTUBE_ID_REGEX = /youtube\.com.*?v=([A-Za-z0-9_\\\-]+)/ unless defined? YOUTUBE_ID_REGEX + + YOUTUBE_ID_REGEX = /(?:youtu\.be\/|(?:[a-z]{2,3}\.)?youtube\.com\/watch(?:\?|#!|.+&|.+&)v=)([\w-]{11})/im unless defined? YOUTUBE_ID_REGEX end diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index e7433a9e9..4a2ac74ce 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -139,13 +139,13 @@ describe ApplicationHelper do end it "recognizes multiple links of different types" do - message = "http:// Hello World, this is for www.joindiaspora.com and not for http://www.google.com though their Youtube service is neat, take http://www.youtube.com/watch?v=foobar or www.youtube.com/watch?foo=bar&v=BARFOO&whatever=related It is a good idea we finally have youtube, so enjoy this video http://www.youtube.com/watch?v=rickrolld" + message = "http:// Hello World, this is for www.joindiaspora.com and not for http://www.google.com though their Youtube service is neat, take http://www.youtube.com/watch?v=foobar----- or www.youtube.com/watch?foo=bar&v=BARFOO-----&whatever=related It is a good idea we finally have youtube, so enjoy this video http://www.youtube.com/watch?v=rickrolld--" res = markdownify(message) res.should =~ /a target=\"_blank\" href=\"http:\/\/www.joindiaspora.com\"/ res.should =~ /a target=\"_blank\" href=\"http:\/\/www.google.com\"/ - res.should =~ /data-video-id="foobar"/ - res.should =~ /data-video-id="BARFOO"/ - res.should =~ /data-video-id="rickrolld"/ + res.should =~ /data-video-id="foobar-----"/ + res.should =~ /data-video-id="BARFOO-----"/ + res.should =~ /data-video-id="rickrolld--"/ end it "should recognize basic ftp links" do diff --git a/spec/models/comment_spec.rb b/spec/models/comment_spec.rb index bf754590a..f844c2ab7 100644 --- a/spec/models/comment_spec.rb +++ b/spec/models/comment_spec.rb @@ -92,20 +92,22 @@ describe Comment do before do @message = alice.post :status_message, :text => "hi", :to => @alices_aspect.id end + it 'should process youtube titles on the way in' do - video_id = "ABYnqp-bxvg" - url="http://www.youtube.com/watch?v=#{video_id}&a=GxdCwVVULXdvEBKmx_f5ywvZ0zZHHHDU&list=ML&playnext=1" - expected_title = "UP & down & UP & down &" + first_video_id = "ABYnqp-1111" + second_video_id = "ABYnqp-2222" + url = "http://www.youtube.com/watch?v=#{first_video_id} http://www.youtube.com/watch?v=#{second_video_id}" + expected_title = "UP & down & UP & down &" mock_http = mock("http") - Net::HTTP.stub!(:new).with('gdata.youtube.com', 80).and_return(mock_http) - mock_http.should_receive(:get).with('/feeds/api/videos/'+video_id+'?v=2', nil).and_return( + Net::HTTP.stub!(:new).with('gdata.youtube.com', 80).twice.and_return(mock_http) + mock_http.should_receive(:get).with(/\/feeds\/api\/videos/, nil).twice.and_return( [nil, 'Foobar '+expected_title+' hallo welt dsd']) comment = alice.build_comment url, :on => @message - comment.save! - Comment.find(comment.id).youtube_titles.should == {video_id => CGI::escape(expected_title)} + + Comment.find(comment.id).youtube_titles.should == { first_video_id => CGI::escape(expected_title), second_video_id => CGI::escape(expected_title) } end end From 5da6305b1009f740c00d271de0247cab8ebb5231 Mon Sep 17 00:00:00 2001 From: Arzumy MD Date: Wed, 4 May 2011 23:54:25 +0800 Subject: [PATCH 02/61] #1019 YoutubeTitles::YOUTUBE_ID_REGEX supports data-anchor --- app/helpers/application_helper.rb | 9 ++++----- lib/youtube_titles.rb | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 76547b8c3..778e43355 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -212,11 +212,10 @@ module ApplicationHelper end def process_youtube(message, youtube_maps) - 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] + processed_message = message.gsub(YoutubeTitles::YOUTUBE_ID_REGEX) do |matched_string| + match_data = matched_string.match(YoutubeTitles::YOUTUBE_ID_REGEX) + video_id = match_data[1] + anchor = match_data[2] anchor ||= '' if youtube_maps && youtube_maps[video_id] title = h(CGI::unescape(youtube_maps[video_id])) diff --git a/lib/youtube_titles.rb b/lib/youtube_titles.rb index 7262da5fe..760cb703b 100644 --- a/lib/youtube_titles.rb +++ b/lib/youtube_titles.rb @@ -20,5 +20,5 @@ module YoutubeTitles end end - YOUTUBE_ID_REGEX = /(?:youtu\.be\/|(?:[a-z]{2,3}\.)?youtube\.com\/watch(?:\?|#!|.+&|.+&)v=)([\w-]{11})/im unless defined? YOUTUBE_ID_REGEX + YOUTUBE_ID_REGEX = /(?:youtu\.be\/|(?:[a-z]{2,3}\.)?youtube\.com\/watch(?:\?|#!|.+&|.+&)v=)([\w-]{11})(?:\S*(#[^ ]+))?/im unless defined? YOUTUBE_ID_REGEX end From f1f2028c8f9e8880badc576bf4857c2482c31039 Mon Sep 17 00:00:00 2001 From: DenSchub Date: Thu, 5 May 2011 00:02:37 +0200 Subject: [PATCH 03/61] added getsatisfaction.com to readme. thanks, dkettler. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 99d111b52..5eb073867 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ Ongoing discussion: - [Diaspora Developer Google Group](http://groups.google.com/group/diaspora-dev) - [Diaspora Discussion Google Group](http://groups.google.com/group/diaspora-discuss) - [Diaspora Q&A site](http://diaspora.shapado.com/) +- [Diasproa on Get Satisfaction](http://getsatisfaction.com/diaspora/) - [#diaspora IRC channel](irc://irc.freenode.net/#diaspora) ([join via the web client](http://webchat.freenode.net?channels=diaspora)) - [#diaspora-dev IRC channel](irc://irc.freenode.net/#diaspora-dev) From 63e334c2f0bb82dbe2cfb8193834dd697a813131 Mon Sep 17 00:00:00 2001 From: Anish A Date: Wed, 4 May 2011 18:14:42 +0530 Subject: [PATCH 04/61] Translations of jerrinphilip --- config/locales/devise/devise.ml.yml | 34 +++++++-------- config/locales/javascript/javascript.ml.yml | 46 +++++++++++---------- 2 files changed, 41 insertions(+), 39 deletions(-) diff --git a/config/locales/devise/devise.ml.yml b/config/locales/devise/devise.ml.yml index 82acd053a..4de9dd3cc 100644 --- a/config/locales/devise/devise.ml.yml +++ b/config/locales/devise/devise.ml.yml @@ -6,7 +6,7 @@ ml: devise: confirmations: - confirmed: "താങ്കളുടെ അക്കൌണ്ട് വിജയകരമായി സ്ഥിതീകരിച്ചിരിക്കുന്നു. നിങ്ങള്‍ ഇപ്പൊള്‍ പ്രവേശിച്ചിരിക്കുന്നു." + confirmed: "താങ്കളുടെ അക്കൌണ്ട് വിജയകരമായി സ്ഥിരീകരിച്ചിരിക്കുന്നു. നിങ്ങള്‍ ഇപ്പോള്‍ പ്രവേശിച്ചിരിക്കുന്നു." new: resend_confirmation: "സ്ഥിരീകരിക്കുവാനുള്ള വിവരങ്ങള്‍ വീണ്ടും അയയ്ക്കുക" send_instructions: "താങ്കളുടെ അക്കൌണ്ട് സ്ഥിരീകരിക്കുന്നതിന് ആവശ്യമായ വിവരങ്ങള്‍ അടങ്ങിയ ഇമെയില്‍ അല്പസമയത്തിനകം ലഭിക്കുന്നതാണ്." @@ -19,7 +19,7 @@ ml: unauthenticated: "തുടരുന്നതിന് മുമ്പ് നിങ്ങള്‍ അകത്ത് പ്രവേശിക്കുകയോ അംഗത്വം എടുക്കുകയോ ചെയ്യണം." unconfirmed: "തുടരുന്നതിന് മുന്‍പ് താങ്കള്‍ താങ്കളുടെ അക്കൌണ്ട് സ്ഥിരീകരിക്കേണ്ടതാണ്." invitations: - invitation_token_invalid: "The invitation token provided is not valid!" + invitation_token_invalid: "താങ്കള്‍ നല്കിയ ക്ഷണം സാധുവല്ല!" send_instructions: "താങ്കളുടെ ക്ഷണം അയച്ചു." updated: "താങ്കളുടെ രഹസ്യവാക്ക് വിജയകരമായി രേഖപ്പെടുത്തിയിരിക്കുന്നു. താങ്കള്‍ ഇപ്പോള്‍ പ്രവേശിച്ചിരിക്കുന്നു." mailer: @@ -31,18 +31,18 @@ ml: invitation: accept: "ക്ഷണം സ്വീകരിക്കു" ignore: "താങ്കള്‍ക്ക് ഈ ക്ഷണം സ്വീകരിക്കേണ്ടെങ്കില്‍ ദയവായി ഈ കത്ത് അവഗണിക്കുക." - no_account_till: "മുകളിലുള്ള കണ്ണി ഉപയോഗിച്ച് ഇതില്‍ ചേരാതെ താങ്കളുടെ അക്കൌണ്ട് നിര്‍മ്മിക്കില്ല." + no_account_till: "മുകളില്‍ കാണുന്ന കണ്ണി ഉപയോഗിച്ച് താകളള്‍ ചേരുന്നതുവരെ താങ്കളുടെ പേരില്‍ അക്കൗണ്ട് സൃഷ്ടിക്കപ്പെടുകയില്ല." subject: "ഡയസ്പോറയില്‍ ചേരാന്‍ താങ്കളെ ക്ഷണിച്ചിരിക്കുന്നു!" inviters: - accept_at: ", at %{url}, you can accept it through the link below." - has_invited_you: "%{name} താങ്കളെ ഡയസ്പോറയില്‍ ചേരുന്നതിനായി ക്ഷണിച്ചിരിക്കുന്നു" - have_invited_you: "%{names} താങ്കളെ ഡയസ്പോറയില്‍ ചേരുന്നതിനായി ക്ഷണിച്ചിരിക്കുന്നു" + accept_at: ", at %{url}, താഴെ കാണുന്ന കണ്ണി ഉപയോഗിച്ച് താങ്കള്‍ക്ക് ക്ഷണം സ്വീകരിക്കാവുന്നതാണ്." + has_invited_you: "%{name} താങ്കളെ ഡയാസ്പോറയില്‍ ചേരാന്‍ ക്ഷണിച്ചിരിക്കുന്നു." + have_invited_you: "%{names} എന്നിവര്‍ താങ്കളെ ഡയാസ്പോറയില്‍ ചേരാന്‍ ക്ഷണിച്ചിരിക്കുന്നു." reset_password_instructions: change: "എന്റെ രഹസ്യവാക്ക് മാറ്റുക" ignore: "താങ്കള്‍ ഇത് ആവശ്യപ്പെട്ടിലെങ്കില്‍ ദയവായി അവഗണിക്കുക." - someone_requested: "താങ്കളുടെ രഹസ്യവാക്ക് മാറ്റുന്നതിന് ആരോ അപേക്ഷ നല്‍കിയിരിക്കുന്നു. മാറ്റുന്നതിനായി താഴെയുള്ള കണ്ണി തിരഞ്ഞെടുക്കാവുന്നതാണ്." - subject: "Reset password instructions" - wont_change: "മുകളിലുള്ള കണ്ണിയിലൂടെ പൂതിയ ഒരു രഹസ്യവാക്ക് നിര്‍മ്മിക്കാതെ അത് മാറ്റപ്പെടില്ല." + someone_requested: "താങ്കളുടെ അക്കൗണ്ടിന്റെ രഹസ്യവാക്ക് മാറ്റൂന്നതിനായി ആരോ അപേക്ഷിച്ചിരിക്കുന്നു. അത് താങ്കളായിരുന്നെങ്കില്‍ താഴെ കാണുന്ന കണ്ണിയുപയോഗിച്ച് താങ്കള്‍ക്ക് രഹസ്യവാക്ക് മാറ്റാവുന്നതാണ്." + subject: "രഹസ്യവാക്ക് മാറ്റാനുള്ള നിര്‍ദ്ദേശങ്ങള്‍" + wont_change: "മുകളില്‍ കൊടുത്തിരിക്കുന്ന കണ്ണിയുപയോഗിച്ച് ഒരു പുതിയ രഹസ്യവാക്ക് നല്‍കുന്നതുവരെ താങ്കളുടെ നിലവിലുള്ള രഹസ്യവാക്ക് മാറുന്നതല്ല." unlock_instructions: account_locked: "Your account has been locked due to an excessive amount of unsuccessful sign in attempts." click_to_unlock: "നിങ്ങളുടെ അക്കൌണ്ട് തുറക്കുന്നതിനായി താഴെയുള്ള കണ്ണി തെരഞ്ഞെടുക്കുക:" @@ -54,25 +54,25 @@ ml: change_password: "എന്റെ രഹസ്യവാക്ക് മാറ്റുക" new: forgot_password: "താങ്കളുടെ രഹസ്യവാക്ക് മറന്നോ?" - no_account: "No account with this email exists. If you are waiting for an invite, we are rolling them out as soon as possible" - send_password_instructions: "Send me reset password instructions" - send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes." - updated: "Your password was changed successfully. You are now signed in." + no_account: "ഈ ഈമെയിലില്‍ ഒരക്കൗണ്ടും നിലവിലില്ല. താങ്കള്‍ ഒരു ക്ഷണം ലഭിക്കാന്‍ കാത്തിരിക്കുകയാണെങ്കില്‍ ഞങ്ങള്‍ അത് എത്രയും പെട്ടന്ന് അയക്കാന്‍ ശ്രമിക്കുന്നതാണ്." + send_password_instructions: "രഹസ്യവാക്ക് മാറ്റാനായുള്ള നിര്‍ദ്ദേശങ്ങള്‍ അയക്കുക" + send_instructions: "രഹസ്യവാക്ക് മാറ്റാനുള്ള നിര്‍ദ്ദേശങ്ങളടങ്ങുന്ന ഒരു ഇ-മെയില്‍ താങ്കള്‍ക്ക് ഏതാനും മിനിട്ടുകള്‍ക്കുള്ളില്‍ ലഭിക്കുന്നതാണ്." + updated: "താങ്കളുടെ രഹസ്യവാക്ക് വിജയകരമായി മാറ്റിയിരിക്കുന്നു. താങ്കള്‍ ഇപ്പോള്‍ ഡയസ്പോറയില്‍ പ്രവേശിച്ചിരിക്കുന്നു." registrations: destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon." - signed_up: "You have signed up successfully. If enabled, a confirmation was sent to your e-mail." + signed_up: "താങ്കള്‍ വിജയകരമായി ഡയസ്പോറയില്‍ ചേര്‍ന്നിരിക്കുന്നു. സജ്ജമാക്കിയിട്ടുണ്ടെങ്കില്‍ ഒരു സ്ഥിരീകരണം താങ്കള്‍ക്ക് ലഭിക്കുന്നതാണ്." updated: "താങ്കള്‍ അക്കൌണ്ട് വിജയകരമായി പുതുക്കി." sessions: new: alpha_software: "You are about to use alpha software." - bugs_and_feedback: "Be advised, you will experience bugs. We encourage you to use the Feedback button on the right hand side of your browser to report any hiccups! We will work as fast as we can to resolve any issues you report." + bugs_and_feedback: "താങ്കള്‍ക്ക് ഡയാസ്പോറ ഉപയോഗിക്കുന്നതില്‍ പ്രശ്നങ്ങള്‍ അനുഭവപ്പെടും അന്നു അറിഞ്ഞിക്കുക. എന്തെങ്കിലും പ്രശ്നം താങ്കളുടെ കണ്ണില്‍പെടുകയാണെങ്കില്‍ ബ്രൗസറിന്റെ വലതുവശത്ത് കാണുന്ന ബട്ടണുപയോഗിച്ച് ഞങ്ങളെ അറിയിക്കുക. പരമാവധി വേഗത്തില്‍ പ്രശ്നങ്ങള്‍ പരിഹരിക്കാന്‍ ഞങ്ങള്‍ ശ്രമിക്കുന്നതാണ്." bugs_and_feedback_mobile: "Be advised, you will experience bugs. We encourage you to report any hiccups! We will work as fast as we can to resolve any issues you report." login: "പ്രവേശിക്കു" modern_browsers: "ആധുനിക ബ്രൌസറുകള്‍ മാത്രം പിന്‍തുണയ്ക്കുന്നു." password: "രഹസ്യവാക്ക്" remember_me: "ഓര്‍മ്മിക്കു" sign_in: "പ്രവേശിക്കു" - username: "Username" + username: "ഉപയോക്തൃനാമം" signed_in: "വിജയകരമായി പ്രവേശിച്ചിരിക്കുന്നു." signed_out: "വിജയകരമായി പുറത്ത് കടന്നു." shared: @@ -82,7 +82,7 @@ ml: receive_unlock: "തുറക്കാനുള്ള വിവരങ്ങള്‍ ലഭിച്ചില്ലേ?" sign_in: "പ്രവേശിക്കു" sign_up: "ചേരു" - sign_up_closed: "Open signups are closed at this time." + sign_up_closed: "ക്ഷമിക്കണം. ക്ഷണം കൂടാതെ ഇപ്പോള്‍ ഡയാസ്പോറയില്‍ ചേരാന്‍ സാധിക്കില്ല." mail_signup_form: sign_up_for_an_invite: "ഒരു ക്ഷണത്തിനായി ചേരു!" unlocks: diff --git a/config/locales/javascript/javascript.ml.yml b/config/locales/javascript/javascript.ml.yml index 645cb8cf7..ec96c1f3f 100644 --- a/config/locales/javascript/javascript.ml.yml +++ b/config/locales/javascript/javascript.ml.yml @@ -5,33 +5,35 @@ ml: javascripts: - confirm_dialog: "Are you sure?" + confirm_dialog: "താങ്കള്‍ക്ക് ഉറപ്പാണോ?" infinite_scroll: - no_more: "No more posts." + no_more: "കൂടുതല്‍ പോസ്റ്റുകളൊന്നുമില്ല." publisher: - at_least_one_aspect: "You must publish to at least one aspect" - search_for: "Search for {{name}}" + at_least_one_aspect: "താങ്കള്‍ ഒരു പരിചയത്തിമെങ്കിലും തിരഞ്ഞെടുക്കേണ്ടതാണ്." + search_for: "{{name}}നായി തിരയുക" shared: contact_list: - cannot_remove: "Cannot remove person from last aspect. (If you want to disconnect from this person you must remove contact.)" + cannot_remove: "ക്ഷമിക്കണം, വ്യക്തിയെ പരിചയത്തില്‍ നിന്ന് നീക്കം ചെയ്യാന്‍ സാധിക്കില്ല. (താങ്കള്‍ക്ക് ഈ വ്യക്തിയുമായുള്ള ബന്ധം വിച്ഛേദിക്കണമെങ്കില്‍ സമ്പര്‍ക്കം നീക്കം ചെയ്യേണ്ടതാണ്" timeago: - day: "a day" - days: "%d days" - hour: "about an hour" - hours: "about %d hours" - minute: "about a minute" - minutes: "%d minutes" - month: "about a month" - months: "%d months" + day: "ഒരു ദിവസം" + days: "%d ദിവസങ്ങള്‍" + hour: "ഉദ്ദേശം ഒരു മണീക്കൂര്‍" + hours: "ഉദ്ദേശം %d മണിക്കൂറുകള്‍" + minute: "ഉദ്ദേശം ഒരു മിനിട്ട്" + minutes: "%d മിനിട്ടുകള്‍" + month: "ഉദ്ദേശം ഒരു മാസം" + months: "%d മാസങ്ങള്‍" prefixAgo: "" - prefixFromNow: "" - seconds: "less than a minute" - suffixAgo: "ago" - suffixFromNow: "from now" - year: "about a year" - years: "%d years" + prefixFromNow: "ഇപ്പോള്‍ മുതല്‍" + seconds: "ഏതാനും നിമിഷങ്ങള്‍" + suffixAgo: "മുന്‍പ്" + suffixFromNow: "വരെ" + year: "ഉദ്ദേശം ഒരു വര്‍ഷം" + years: "%d വര്‍ഷങ്ങള്‍ക്ക്" videos: - unknown: "Unknown video type" - watch: "Watch this video on {{provider}}" + unknown: "അജ്ഞാതമായ തരം വീഡിയോ" + watch: "ഈ വീഡിയോ {{provider}}ല്‍ കാണുക" web_sockets: - disconnected: "The websocket is closed; posts will no longer be streamed live." + disconnected: + body: "പോസ്റ്റൂകള്‍ തത്സമയമായി കാണിക്കുന്നതല്ല." + title: "You have been disconnected." From cb9901d18b3b40e8f9444f88e6144a9139cbf415 Mon Sep 17 00:00:00 2001 From: Anish A Date: Wed, 4 May 2011 18:19:25 +0530 Subject: [PATCH 05/61] Added rest of jerrinphilip's translations --- config/locales/diaspora/ml.yml | 72 +++++++++++++++++----------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/config/locales/diaspora/ml.yml b/config/locales/diaspora/ml.yml index e47920b81..47159d63f 100644 --- a/config/locales/diaspora/ml.yml +++ b/config/locales/diaspora/ml.yml @@ -8,7 +8,7 @@ ml: _home: "പൂമുഖം" _photos: "ചിത്രങ്ങള്‍" _services: "സേവനങ്ങള്‍" - account: "അക്കൌണ്ട്" + account: "അക്കൗണ്ട്" activerecord: errors: models: @@ -23,7 +23,7 @@ ml: request: attributes: from_id: - taken: "is a duplicate of a pre-existing request." + taken: "നിലവിലുള്ള ഒരു അപേക്ഷയുടെ പകര്‍പ്പാണ്." user: attributes: email: @@ -33,7 +33,7 @@ ml: username: taken: "നേരത്തേ എടുത്തിട്ടുണ്ട്." ago: "%{time} മുന്‍പ്" - all_aspects: "All aspects" + all_aspects: "എല്ലാ " application: helper: unknown_person: "അറിയാത്ത വ്യക്തി" @@ -53,10 +53,10 @@ ml: done_editing: "മാറ്റം വരുത്തി കഴിഞ്ഞു" aspect_stream: activity: "activity" - post_time: "post time" + post_time: "കുറിപ്പ് ചേര്‍ത്ത സമയം" sort_by: "sort by:" - contacts_not_visible: "Contacts in this aspect will not be able to see each other." - contacts_visible: "Contacts in this aspect will be able to see each other." + contacts_not_visible: "ഈ പരിചയത്തില്‍പ്പെട്ട സമ്പര്‍ക്കങ്ങള്‍ക്ക് പരസ്പരം കാണാന്‍ സാധിക്കുകയില്ല " + contacts_visible: "ഈ പരിചയത്തിലുള്ള സമ്പര്‍ക്കങ്ങള്‍ക്ക് പരസ്പരം കാണാന്‍ സാധിക്കുന്നതാണ്." create: failure: "പരിചയം സൃഷ്ടിക്കല്‍ പരാജയപ്പെട്ടു." success: "നിങ്ങളുടെ പുതിയ പരിചയം %{name} സൃഷ്ടിക്കപ്പെട്ടു." @@ -69,11 +69,11 @@ ml: aspect_list_is_visible: "aspect list is visible to others in aspect" confirm_remove_aspect: "Are you sure you want to delete this aspect?" done: "Done" - make_aspect_list_visible: "make aspect list visible?" - remove_aspect: "Delete this aspect" + make_aspect_list_visible: "പരിചയം ദൃശ്യമാക്കുക" + remove_aspect: "ഈ പരിചയം നീക്കം ചെയ്യുക" rename: "പേര് മാറ്റുക" update: "പുതുക്കു" - updating: "updating" + updating: "പുതുക്കുന്നു" few: "%{count} പരിചയങ്ങള്‍" helper: are_you_sure: "നിങ്ങള്‍ ഈ പരിചയം നീക്കം ചെയ്യുവാന്‍ ആഗ്രഹിക്കുന്നു, നിങ്ങള്‍ക്ക് തീര്‍ച്ചയാണോ?" @@ -93,8 +93,8 @@ ml: many: "%{count} പരിചയങ്ങള്‍" move_contact: error: "Error moving contact: %{inspect}" - failure: "didn't work %{inspect}" - success: "Person moved to new aspect" + failure: "ശരിയായില്ല. %{inspect}" + success: "വ്യക്തിയെ പുതിയ പരിചയത്തിലേക്ക് മാറ്റിയിരിക്കുന്നു" new_aspect: create: "ഉണ്ടാക്കു" name: "പേര്" @@ -108,25 +108,25 @@ ml: show: edit_aspect: "പരിചയം ചിട്ടപെടുത്തുക" update: - failure: "Your aspect, %{name}, had too long name to be saved." + failure: "താങ്കള്‍ നല്കിയ %{name} എന്ന പരിചയത്തിന്റെ പേര് അനുവദിനീയമായതിലും വലുതാണ്." success: "നിങ്ങളുടെ പരിചയം, %{name}, വിജയകരമായി ചിട്ടപ്പെടുത്തി." zero: "പരിചയങ്ങള്‍ ഇല്ല" back: "പിന്നോട്ട്" bookmarklet: - explanation: "%{link} from anywhere by bookmarking this link." + explanation: "%{link} ഡയാസ്പോറയില്‍ എവിടെനിന്നും കുറിക്കാന്‍ ഈ കണ്ണി ബുക്ക്മാര്‍ക്ക് ചെയ്യുക" explanation_link_text: "Post to Diaspora" post_something: "Post something to Diaspora" post_success: "Posted! Closing!" cancel: "റദ്ദാക്കുക" comments: - few: "%{count} comments" - many: "%{count} comments" + few: "%{count} അഭിപ്രായങ്ങള്‍" + many: "%{count} അഭിപ്രായങ്ങള്‍" new_comment: comment: "അഭിപ്രായം" commenting: "അഭിപ്രായം രേഖപ്പെടുത്തുന്നു..." - one: "1 comment" - other: "%{count} comments" - zero: "no comments" + one: "1 അഭിപ്രായം" + other: "%{count} അഭിപ്രായങ്ങള്‍" + zero: "അഭിപ്രായങ്ങളൊന്നുമില്ല." contacts: create: failure: "സമ്പര്‍ക്കം ഉണ്ടാക്കാനാകുന്നില്ല" @@ -138,15 +138,15 @@ ml: one: "ഒരു സമ്പര്‍ക്കം" other: "%{count} മറ്റു സമ്പര്‍ക്കങ്ങള്‍" share_with_pane: - accepts: "Once %{name} accepts, you'll start seeing each other's posts on Diaspora" + accepts: "%{name} താങ്കളുടെ ക്ഷണം സ്വീകരിച്ചതിനു ശേഷം ഡയാസ്പോറയില്‍ ചേര്‍ക്കുന്ന കുറിപ്പുകള്‍ ദൃശ്യമാവുന്നതാണ്." add_new_aspect: "പുതിയ പരിചയത്തിലേയ്ക്ക് ചേര്‍ക്കുക" share_with: "%{name} നോട് പങ്കിട്ട് തുടങ്ങുക" zero: "സമ്പര്‍ക്കമൊന്നുമില്ല" conversations: create: - sent: "സന്ദേശം അയച്ചിരിക്കുന്നു" + sent: "സന്ദേശം അയച്ചു." destroy: - success: "Conversation successfully removed" + success: "സംഭാഷണം വിജയകരമായി നീക്കം ചെയ്തിരിക്കുന്നു." helper: new_messages: few: "%{count} പുതിയ സന്ദേശങ്ങള്‍" @@ -160,7 +160,7 @@ ml: message_inbox: "Message Inbox" new_message: "പുതിയ സന്ദേശം" no_conversation_selected: "no conversation selected" - no_messages: "സന്ദേശങ്ങളൊന്നും ഇല്ല" + no_messages: "സന്ദേശങ്ങളൊന്നുമില്ല" new: send: "അയക്കു" subject: "വിഷയം" @@ -222,7 +222,7 @@ ml: have_a_problem: "പ്രശ്നമുണ്ടോ?" powered_by: "ഡയസ്പോറയാല്‍* ശക്തമാക്കിയത്" public_feed: "Public Diaspora Feed for %{name}" - toggle: "മൊബൈല്‍ സൈറ്റിലേക്ക് മാറുക" + toggle: "toggle mobile site" whats_new: "പുതിയത്?" your_aspects: "നിങ്ങളുടെ പരിചയങ്ങള്‍" header: @@ -241,10 +241,10 @@ ml: other: "%{count} people disliked this" zero: "no people disliked this" people_like_this: - few: "%{count} ആളുകള്‍ ഇത് ഇഷ്ടപ്പെടുന്നു" - many: "%{count} ആളുകള്‍ ഇത് ഇഷ്ടപ്പെടുന്നു" - one: "ഒരാള്‍ ഇത് ഇഷ്ടപ്പെടുന്നു" - other: "%{count} ആളുകള്‍ ഇത് ഇഷ്ടപ്പെടുന്നു" + few: "%{count} people liked this" + many: "%{count} people liked this" + one: "1 person liked this" + other: "%{count} people liked this" zero: "no people liked this" more: "കൂടുതല്‍" next: "അടുത്തത്" @@ -384,7 +384,7 @@ ml: photo: view_all: "%{name}യുടെ എല്ലാ ചിത്രങ്ങളും കാണുക" show: - collection_permalink: "ശേഖരണത്തിന്റെ സ്ഥിരംകണ്ണി" + collection_permalink: "collection permalink" delete_photo: "ചിത്രം നീക്കുക" edit: "തിരുത്തുക" edit_delete_photo: "ചിത്രത്തിന്റെ വിവരണം തിരുത്തുക / ചിത്രം നീക്കം ചെയ്യുക" @@ -398,7 +398,7 @@ ml: notice: "ചിത്രം വിജയകരമായി പുതുക്കി." post_visibilites: update: - post_hidden: "%{name}ന്റെ പോസ്റ്റ് മറച്ചിരിക്കുന്നു." + post_hidden: "%{name}'s post has been hidden." posts: doesnt_exist: "ഈ കുറിപ്പ് നിലവിലില്ല!" previous: "മുന്‍‌പത്തെ" @@ -537,8 +537,8 @@ ml: reshare: reshare: "വീണ്ടും പങ്കിടുക" stream_element: - dislike: "I dislike this" - like: "I like this" + dislike: "ഞാനിതിഷ്ടപ്പെടുന്നില്ല" + like: "ഞാനിതിഷ്ടപ്പെടുന്നു" status_messages: create: success: "Successfully mentioned: %{names}" @@ -550,21 +550,21 @@ ml: mentioning: "Mentioning: %{person}" show: destroy: "നീക്കം ചെയ്യുക" - not_found: "ക്ഷമിക്കണം, പോസ്റ്റ് കണ്ടെത്താനായില്ല." + not_found: "ക്ഷമിക്കണം, താങ്കള്‍ അന്വേഷിച്ച കുറിപ്പ് കണ്ടെത്താനായില്ല" permalink: "സ്ഥിരം കണ്ണി" stream_helper: hide_comments: "അഭിപ്രായങ്ങള്‍ മറയ്ക്കുക" show_comments: "എല്ലാ അഭിപ്രായവും കാണിക്കുക" tags: show: - nobody_talking: "Nobody is talking about %{tag} yet." - people_tagged_with: "People tagged with %{tag}" - posts_tagged_with: "Posts tagged with #%{tag}" + nobody_talking: "നിലവില്‍ ആരും %{tag}-നെ കുറിച്ച് സംസാരിക്കുന്നില്ല." + people_tagged_with: "%{tag} ചേര്‍ത്തിട്ടുള്ള ആളുകള്‍" + posts_tagged_with: "#%{tag} ചേര്‍ത്തിട്ടുള്ള കുറിപ്പുകള്‍" the_world: "ലോകം മുഴുവന്‍" undo: "Undo?" username: "ഉപയോക്തൃനാമം" users: - destroy: "Account successfully closed." + destroy: "അക്കൌണ്ട് വിജയകരമായി അവസാനിപ്പിച്ചു." edit: also_commented: "...someone also comments on your contact's post?" change: "മാറ്റുക" From 2c4954bac8b2fb438cbc2607bfc7277e0d9be3e2 Mon Sep 17 00:00:00 2001 From: Arzumy MD Date: Fri, 6 May 2011 00:14:18 +0800 Subject: [PATCH 06/61] spec for application_helper#page_title, with default text --- app/helpers/application_helper.rb | 10 +++------ config/locales/diaspora/en.yml | 1 + spec/helpers/application_helper_spec.rb | 29 ++++++++++++++++++++++++- 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 778e43355..de84b804e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -10,13 +10,9 @@ module ApplicationHelper content_tag(:abbr, time.to_s, options.merge(:title => time.iso8601)) if time end - def page_title text=nil - title = "" - if text.blank? - title = "#{current_user.name}" if current_user - else - title = "#{text}" - end + def page_title(text=nil) + return text unless text.blank? + current_user ? current_user.name : t("application.helper.diaspora_alpha") end def aspects_with_post aspects, post diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 0d0d8af8d..af94f78da 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -74,6 +74,7 @@ en: unknown_person: "unknown person" video_title: unknown: "Unknown Video Title" + diaspora_alpha: "DIASPORA* ALPHA" aspects: zero: "no aspects" one: "1 aspect" diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 4a2ac74ce..005b3fd97 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -42,7 +42,7 @@ describe ApplicationHelper do end end - describe "markdownify" do + describe "#markdownify" do describe "autolinks" do it "should not allow basic XSS/HTML" do markdownify("").should == "<script>alert('XSS is evil')</script>" @@ -301,4 +301,31 @@ describe ApplicationHelper do end end end + + describe "#page_title" do + before do + def current_user + @current_user + end + end + + context "passed blank text" do + it "returns current_user.name if logged in" do + @current_user = @user + page_title.should == @user.name + end + + it "returns default title if not logged in" do + @current_user = nil + page_title.should == I18n.t("application.helper.diaspora_alpha") + end + end + + context "passed text" do + it "returns the text" do + text = "This is the title" + page_title(text).should == text + end + end + end end From 6ba2b00fb83c1942852d68e187be34a56cf95173 Mon Sep 17 00:00:00 2001 From: Arzumy MD Date: Fri, 6 May 2011 00:18:58 +0800 Subject: [PATCH 07/61] cleaned up formatting in application_helper, removed unnecessary return --- app/helpers/application_helper.rb | 37 ++++++++++++++++--------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index de84b804e..221c3da15 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -5,7 +5,7 @@ module ApplicationHelper @@youtube_title_cache = Hash.new("no-title") - def timeago(time, options = {}) + def timeago(time, options={}) options[:class] ||= "timeago" content_tag(:abbr, time.to_s, options.merge(:title => time.iso8601)) if time end @@ -15,19 +15,19 @@ module ApplicationHelper current_user ? current_user.name : t("application.helper.diaspora_alpha") end - def aspects_with_post aspects, post + def aspects_with_post(aspects, post) aspects.select do |aspect| AspectVisibility.exists?(:aspect_id => aspect.id, :post_id => post.id) end end - def aspects_without_post aspects, post + def aspects_without_post(aspects, post) aspects.reject do |aspect| AspectVisibility.exists?(:aspect_id => aspect.id, :post_id => post.id) end end - def aspect_badges aspects, opts = {} + def aspect_badges(aspects, opts={}) str = '' aspects.each do |aspect| str << aspect_badge(aspect, opts) @@ -39,7 +39,7 @@ module ApplicationHelper "javascript:(function(){f='#{AppConfig[:pod_url]}bookmarklet?url='+encodeURIComponent(window.location.href)+'&title='+encodeURIComponent(document.title)+'¬es='+encodeURIComponent(''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text))+'&v=1&';a=function(){if(!window.open(f+'noui=1&jump=doclose','diasporav1','location=yes,links=no,scrollbars=no,toolbar=no,width=620,height=250'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()" end - def aspect_badge aspect, opts = {} + def aspect_badge(aspect, opts={}) str = "" link = opts.delete(:link) if !link @@ -50,7 +50,7 @@ module ApplicationHelper str << "" end - def aspect_links aspects, opts={} + def aspect_links(aspects, opts={}) str = "" aspects.each do |aspect| str << '
  • ' @@ -60,7 +60,7 @@ module ApplicationHelper str.html_safe end - def aspect_li aspect, opts= {} + def aspect_li(aspect, opts={}) param_string = "" if opts.size > 0 param_string << '?' @@ -90,7 +90,7 @@ module ApplicationHelper !@aspect.nil? && !@aspect.instance_of?(Symbol) && @aspect.id == aspect.id end - def aspect_or_all_path aspect + def aspect_or_all_path(aspect) if @aspect.is_a? Aspect aspect_path @aspect else @@ -98,7 +98,7 @@ module ApplicationHelper end end - def object_path(object, opts = {}) + def object_path(object, opts={}) return "" if object.nil? object = object.person if object.is_a? User eval("#{object.class.name.underscore}_path(object, opts)") @@ -147,7 +147,7 @@ module ApplicationHelper link_to string, path, :rel => 'external' end - def person_image_link(person, opts = {}) + def person_image_link(person, opts={}) return "" if person.nil? || person.profile.nil? if opts[:to] == :photos link_to person_image_tag(person, opts[:size]), person_photos_path(person) @@ -162,7 +162,7 @@ module ApplicationHelper (':' + post.id.to_s).to_sym end - def markdownify(message, options = {}) + def markdownify(message, options={}) message = h(message).html_safe options[:newlines] = true if !options.has_key?(:newlines) @@ -177,7 +177,7 @@ module ApplicationHelper message.gsub!(/\n+/, '
    ') if options[:newlines] - return message + message end @@ -193,6 +193,7 @@ module ApplicationHelper res = "#{link}" res end + message.gsub!(/\[([^\[]+)\]\(([^ ]+)\)/) do |m| escape = "\\" link = $1 @@ -204,7 +205,7 @@ module ApplicationHelper res end - return message + message end def process_youtube(message, youtube_maps) @@ -220,7 +221,7 @@ module ApplicationHelper end ' Youtube: ' + title + '' end - return processed_message + processed_message end def process_autolinks(message) @@ -237,7 +238,7 @@ module ApplicationHelper res end end - return message + message end def process_emphasis(message) @@ -252,7 +253,7 @@ module ApplicationHelper message.gsub!("-^doublescore^-", "__") message.gsub!("-^star^-", "*") message.gsub!("-^score^-", "_") - return message + message end def process_vimeo(message, vimeo_maps) @@ -267,7 +268,7 @@ module ApplicationHelper end ' Vimeo: ' + title + '' end - return processed_message + processed_message end def process_emoticons(message) @@ -307,7 +308,7 @@ module ApplicationHelper end def direction_for(string) - return (string.cleaned_is_rtl?) ? 'rtl' : '' + string.cleaned_is_rtl? ? 'rtl' : '' end def rtl? From fad96350226c739a27a1c110d272b26f5bf17a56 Mon Sep 17 00:00:00 2001 From: Arzumy MD Date: Fri, 6 May 2011 00:47:40 +0800 Subject: [PATCH 08/61] Added spec for YOUTUBE_ID_REGEX, we can easily add more youtube url sample here later to avoid polluting application_helper spec --- lib/youtube_titles.rb | 2 +- spec/lib/youtube_titles_spec.rb | 32 +++++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/lib/youtube_titles.rb b/lib/youtube_titles.rb index 760cb703b..8530e8ad3 100644 --- a/lib/youtube_titles.rb +++ b/lib/youtube_titles.rb @@ -20,5 +20,5 @@ module YoutubeTitles end end - YOUTUBE_ID_REGEX = /(?:youtu\.be\/|(?:[a-z]{2,3}\.)?youtube\.com\/watch(?:\?|#!|.+&|.+&)v=)([\w-]{11})(?:\S*(#[^ ]+))?/im unless defined? YOUTUBE_ID_REGEX + YOUTUBE_ID_REGEX = /(?:https?:\/\/)(?:youtu\.be\/|(?:[a-z]{2,3}\.)?youtube\.com\/watch(?:\?|#!|.+&|.+&)v=)([\w-]{11})(?:\S*(#[^ ]+)|\S+)?/im unless defined? YOUTUBE_ID_REGEX end diff --git a/spec/lib/youtube_titles_spec.rb b/spec/lib/youtube_titles_spec.rb index d9c82a84f..82e6ec107 100644 --- a/spec/lib/youtube_titles_spec.rb +++ b/spec/lib/youtube_titles_spec.rb @@ -1,29 +1,35 @@ require 'spec_helper' require 'youtube_titles' + describe YoutubeTitles do + include YoutubeTitles + before do @video_id = "ABYnqp-bxvg" @url="http://www.youtube.com/watch?v=#{@video_id}&a=GxdCwVVULXdvEBKmx_f5ywvZ0zZHHHDU&list=ML&playnext=1" @api_path = "/feeds/api/videos/#{@video_id}?v=2" end - include YoutubeTitles + describe '#youtube_title_for' do before do @expected_title = "UP & down & UP & down &" @mock_http = mock("http") Net::HTTP.stub!(:new).with('gdata.youtube.com', 80).and_return(@mock_http) end + it 'gets a youtube title corresponding to an id' do @mock_http.should_receive(:get).with(@api_path, nil).and_return( [nil, "Foobar #{@expected_title} hallo welt dsd"]) youtube_title_for(@video_id).should == @expected_title end + it 'returns a fallback for videos with no title' do @mock_http.should_receive(:get).with(@api_path, nil).and_return( [nil, "Foobar #{@expected_title} hallo welt dsd"]) youtube_title_for(@video_id).should == I18n.t('application.helper.video_title.unknown') end end + describe 'serialization and marshalling' do before do @expected_title = '""Procrastination"" Tales Of Mere Existence' @@ -33,10 +39,34 @@ describe YoutubeTitles do [nil, "Foobar #{@expected_title} hallo welt dsd"]) @post = Factory.create(:status_message, :text => @url) end + it 'can be re-marshalled' do lambda { StatusMessage.find(@post.id).youtube_titles }.should_not raise_error end end + + describe "YOUTUBE_ID_REGEX" do + specify "normal url" do + url = "http://www.youtube.com/watch?v=dQw4w9WgXcQ" + matched_data = url.match(YoutubeTitles::YOUTUBE_ID_REGEX) + matched_data[0].should == url + matched_data[1].should == "dQw4w9WgXcQ" + end + + specify "https url" do + url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ" + matched_data = url.match(YoutubeTitles::YOUTUBE_ID_REGEX) + matched_data[0].should == url + matched_data[1].should == "dQw4w9WgXcQ" + end + + specify "url with extra query params" do + url = "http://www.youtube.com/watch?v=dQw4w9WgXcQ&feature=related" + matched_data = url.match(YoutubeTitles::YOUTUBE_ID_REGEX) + matched_data[0].should == url + matched_data[1].should == "dQw4w9WgXcQ" + end + end end From 3d1c208fc25af78f346a3adf6a45777b338ff4d8 Mon Sep 17 00:00:00 2001 From: MrZYX Date: Thu, 5 May 2011 21:38:43 +0200 Subject: [PATCH 09/61] added a bit space to checkbox labels, thanks 21echoes --- public/stylesheets/sass/application.sass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 789bb78cc..fd887cfe9 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -797,7 +797,7 @@ form p form p.checkbox_select :width 75% label - :left 20px + :left 25px :top 3px img :position relative From d0381b913d414947a9ad5987d88a62fb92cff0ce Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg Date: Fri, 6 May 2011 13:30:43 -0700 Subject: [PATCH 10/61] remove the hidden rule for the status message show page submit button. thx dangoldenberg for debugging --- public/stylesheets/sass/application.sass | 1 - 1 file changed, 1 deletion(-) diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index fd887cfe9..c7d5d335a 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -634,7 +634,6 @@ div.dislikes :size 1em .submit_button - :display none input :margin :right 0 From fa174f8eb29454d1c09c49b77172e7bd0614957f Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Thu, 5 May 2011 14:22:00 -0400 Subject: [PATCH 11/61] Cukes for posting a photo with and without text --- features/posts.feature | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/features/posts.feature b/features/posts.feature index 24f89bec0..bcb3efc4b 100644 --- a/features/posts.feature +++ b/features/posts.feature @@ -24,6 +24,34 @@ Feature: posting And I follow "All Aspects" Then I should see "I am eating a yogurt" within ".stream_element" + Scenario: post a photo without text + Given I expand the publisher + And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload" + And I press "Share" + And I wait for the ajax to finish + And I follow "All Aspects" + Then I should see a "img" within ".stream_element:first div.photo_attachments" + Then I log out + And I sign in as "alice@alice.alice" + And I go to "bob@bob.bob"'s page + Then I should see a "img" within ".stream_element:first div.photo_attachments" + + + Scenario: post a photo with text + Given I expand the publisher + And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload" + And I fill in "status_message_fake_text" with "Look at this dog" + And I press "Share" + And I wait for the ajax to finish + And I follow "All Aspects" + Then I should see a "img" within ".stream_element:first div.photo_attachments" + And I should see "Look at this dog" within ".stream_element:first" + Then I log out + And I sign in as "alice@alice.alice" + And I go to "bob@bob.bob"'s page + Then I should see a "img" within ".stream_element:first div.photo_attachments" + And I should see "Look at this dog" within ".stream_element:first" + Scenario: hide a post Given I expand the publisher When I fill in "status_message_fake_text" with "Here is a post for you to hide" From f1f0d6e2ea8cebdca33d37ad5322e5e2357e6f2f Mon Sep 17 00:00:00 2001 From: Dan Goldenberg Date: Fri, 6 May 2011 15:12:46 -0700 Subject: [PATCH 12/61] added cuc test for commenting on a status message show page --- features/comments.feature | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/features/comments.feature b/features/comments.feature index 55e2ccf9f..cb6e7eb1c 100644 --- a/features/comments.feature +++ b/features/comments.feature @@ -75,3 +75,17 @@ Feature: commenting Then the first comment field should be closed When I focus the comment field Then the first comment field should be open + + Scenario: comment on a status show page + When I sign in as "bob@bob.bob" + And I am on "alice@alice.alice"'s page + Then I should see "Look at this dog" + When I follow "less than a minute ago" + Then I should see "Look at this dog" + And I fill in "text" with "I think thats a cat" + And I press "comment" + And I wait for the ajax to finish + When I am on "alice@alice.alice"'s page + Then I should see "I think thats a cat" + + From 7a2f6dae10214ac0d4c54f79c9b8432ec4ec2406 Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg Date: Fri, 6 May 2011 15:29:33 -0700 Subject: [PATCH 13/61] fixed js error on new comments on statusmessage show page --- app/controllers/comments_controller.rb | 13 +------------ app/views/comments/create.js.erb | 5 +++++ public/javascripts/stream.js | 4 ---- 3 files changed, 6 insertions(+), 16 deletions(-) create mode 100644 app/views/comments/create.js.erb diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 18e0e7277..a8ef1c8b6 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -21,18 +21,7 @@ class CommentsController < ApplicationController Postzord::Dispatch.new(current_user, @comment).post respond_to do |format| - format.js{ - json = { :post_id => @comment.post_id, - :comment_id => @comment.id, - :html => render_to_string( - :partial => 'comments/comment', - :locals => { :comment => @comment, - :person => current_user.person, - } - ) - } - render(:json => json, :status => 201) - } + format.js{ render(:create, :status => 201)} format.html{ render :nothing => true, :status => 201 } format.mobile{ redirect_to @comment.post } end diff --git a/app/views/comments/create.js.erb b/app/views/comments/create.js.erb new file mode 100644 index 000000000..bc4bba110 --- /dev/null +++ b/app/views/comments/create.js.erb @@ -0,0 +1,5 @@ +WebSocketReceiver.processComment(<%= @comment.post_id %>, + <%= @comment.id %>, + "<%= escape_javascript(render(:partial => 'comments/comment', :locals => { :comment => @comment, :person => current_user.person}))%>", + false); + diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index 646365a91..f48f4d198 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -89,10 +89,6 @@ var Stream = { } }); - $(stream_string + " .new_comment").live('ajax:success', function(data, json, xhr) { - json = $.parseJSON(json); - WebSocketReceiver.processComment(json.post_id, json.comment_id, json.html, false); - }); $(stream_string + ".new_comment").live('ajax:failure', function(data, html, xhr) { Diaspora.widgets.alert.alert('Failed to post message!'); }); From 989d178987243ca4003cd87ce69d65ef67f1563b Mon Sep 17 00:00:00 2001 From: MrZYX Date: Sat, 7 May 2011 00:39:24 +0200 Subject: [PATCH 14/61] updated locales --- config/locales/diaspora/ar.yml | 278 +++++++------- config/locales/diaspora/en_shaw.yml | 8 +- config/locales/diaspora/hu.yml | 10 +- config/locales/diaspora/ja.yml | 352 +++++++++--------- .../locales/javascript/javascript.en_shaw.yml | 2 +- config/locales/javascript/javascript.hu.yml | 2 +- config/locales/javascript/javascript.ja.yml | 2 +- config/locales/javascript/javascript.ko.yml | 2 +- 8 files changed, 328 insertions(+), 328 deletions(-) diff --git a/config/locales/diaspora/ar.yml b/config/locales/diaspora/ar.yml index 63936dda4..f071ba7f7 100644 --- a/config/locales/diaspora/ar.yml +++ b/config/locales/diaspora/ar.yml @@ -6,9 +6,9 @@ ar: _comments: "Comments" _home: "Home" - _photos: "fotos" - _services: "Servicios" - account: "Cuenta" + _photos: "صِور" + _services: "الخدمات" + account: "الحساب" activerecord: errors: models: @@ -32,7 +32,7 @@ ar: invalid: "is invalid." username: taken: "is already taken." - ago: "%{time} ago" + ago: "%{time} منذ" all_aspects: "All aspects" application: helper: @@ -47,8 +47,8 @@ ar: success: "Successfully removed person from aspect" aspects: add_to_aspect: - failure: "Failed to add friend to aspect." - success: "Successfully added friend to aspect." + failure: ".فَشل في إضافة متصل الى الجانب" + success: ".تم إضافة المتصل للجانب بنجاح" aspect_contacts: done_editing: "done editing" aspect_stream: @@ -59,7 +59,7 @@ ar: contacts_visible: "Contacts in this aspect will be able to see each other." create: failure: ".فشل إنشاء الجانب" - success: ".من الذي يمكنه مشاهدة مظهرك الجديد Diaspora انقر على علامة الزائد على الجانب الأيسر لتقول ل" + success: ".تم إنشائه %{name}جانبك الجديد" destroy: failure: "%{name} is not empty and could not be removed." success: ".بنجاح %{name} تم إزالة" @@ -78,28 +78,28 @@ ar: helper: are_you_sure: "Are you sure you want to delete this aspect?" aspect_not_empty: "الجانب ليس فارغ" - remove: "حذف" + remove: "إزالة" index: handle_explanation: "This is your diaspora handle. Like an email address, you can give this to people to reach you." no_contacts: "No contacts" post_a_message: "post a message >>" manage: - add_a_new_aspect: "أضف جانبا جديدا" - add_a_new_contact: "Add a new contact" - drag_to_add: "Drag to add people" - manage_aspects: "Manage aspects" - no_requests: "No hay nuevas solicitudes" + add_a_new_aspect: "أضف جانباً جديداً" + add_a_new_contact: "إضافة جهة إتصال جديدة" + drag_to_add: "اسحب لإضافة أشخاص" + manage_aspects: "إدارة الجوانب" + no_requests: "لا يوجد طلبات جديدة" requests: "طلبات" many: "%{count} aspects" move_contact: - error: "Error moving contact: %{inspect}" - failure: "didn't work %{inspect}" - success: "Person moved to new aspect" + error: "%{inspect} :خطأ في نقل الاتصال " + failure: "%{inspect} لم تعمل" + success: "انتقل الشخص الى جانب جديد" new_aspect: - create: "جديد" - name: "Nombre" + create: "إنشيء" + name: "الإسم" no_posts_message: - start_talking: "Nadie ha dicho nada todavía. ¡Empezá la conversación!" + start_talking: "!لم يقل أحداُ شيء بعد. إبدأ المحادثة " one: "1 aspect" other: "%{count} aspects" seed: @@ -109,21 +109,21 @@ ar: edit_aspect: "edit aspect" update: failure: "Your aspect, %{name}, had too long name to be saved." - success: ".بنجاح %{name} تم تعديل" + success: ".بنجاح %{name} تم تعديل جانبك" zero: "no aspects" - back: "Back" + back: "رجوع" bookmarklet: explanation: "%{link} from anywhere by bookmarking this link." explanation_link_text: "Post to Diaspora" post_something: "Post something to Diaspora" post_success: "Posted! Closing!" - cancel: "Cancelar" + cancel: "إلغاء" comments: few: "%{count} comments" many: "%{count} comments" new_comment: comment: "تعليق" - commenting: "Commenting..." + commenting: "...جاري التعليق" one: "1 comment" other: "%{count} comments" zero: "no comments" @@ -173,37 +173,37 @@ ar: birthday: "%B %d" birthday_with_year: "%B %d %Y" fullmonth_day: "%B %d" - delete: "Eliminar" - email: "Email" + delete: "مسح" + email: "البريد الإلكتروني" error_messages: helper: correct_the_following_errors_and_try_again: ".صحح الأخطاء التالية وحاول مرة أخرى" - invalid_fields: "مدخلات غير صحيحة" - fill_me_out: "Fill me out" + invalid_fields: "مُدخلات غير صحيحة" + fill_me_out: "إسمح لي بالخروج" hide: "Hide" home: show: - already_account: "already have an account?" + already_account: "لديه حساب بالفعل؟" choice: "Choice" choice_explanation: "Diaspora allows you to sort your connections into groups called Aspects. Unique to Diaspora, Aspects ensure your photos, stories and jokes are shared with only the people you want them to be." learn_about_host: "Learn about how to host your own Diaspora server" - login_here: "log in here" + login_here: "سجل الدخول هنا" ownership: "Ownership" ownership_explanation: "You own your pictures, and you shouldn’t have to give that up just in order to share them. You maintain ownership of everything you share on Diaspora, giving you full control over how it is distributed." - share_what_you_want: "Share what you want, with whom you want." + share_what_you_want: ".شارك ما تريد, مع من تريد" simplicity: "Simplicity" simplicity_explanation: "Diaspora makes sharing clean and easy – this goes doubly so for privacy. Innherently private, Diaspora doesn’t have pages of settings and options to wade through to keep your profile secure and to your liking." tagline_first_half: "Share what you want," tagline_second_half: "with whom you want." invitations: check_token: - not_found: "Invitation token not found" + not_found: "لا يوجد دعوة" create: already_contacts: "You are already connected with this person" already_sent: "You already invited this person." - no_more: "No tenés más invitaciones." + no_more: ".ليس لديك المزيد من الدعوات" rejected: "The following email addresses had problems: " - sent: "Your invitation has been sent." + sent: ":الدعوة قد تم إرسالها الى" edit: sign_up: "sign_up" new: @@ -211,12 +211,12 @@ ar: aspect: "Aspect" comma_seperated_plz: "You can enter multiple email addresses separated by commas." if_they_accept_info: "if they accept, they will be added to the aspect you invited them." - invite_someone_to_join: "¡Invitá a alguien a unirse a Diaspora!" + invite_someone_to_join: "!Diaspora دعوة شخص للانضمام الى" personal_message: "Personal message" resend: "Resend" - send_an_invitation: "Send an invitation" - send_invitation: "Send invitation" - to: "To" + send_an_invitation: "إرسل دعوة" + send_invitation: "إرسل دعوة" + to: "الى" layouts: application: have_a_problem: "Have a problem? Find an answer here" @@ -226,10 +226,10 @@ ar: whats_new: "what's new?" your_aspects: "your aspects" header: - blog: "blog" + blog: "مدونة" code: "code" - login: "login" - logout: "logout" + login: "دُخول" + logout: "خروج" profile: "profile" settings: "settings" likes: @@ -281,35 +281,35 @@ ar: sign_in: "Sign in to view it." subject: "%{name} has commented on your post." diaspora: "the diaspora email robot" - hello: "Hello %{name}!" - love: "love," + hello: " %{name}!أهلاً" + love: ",حُب" manage_your_email_settings: "manage your email settings" mentioned: mentioned: "mentioned you in a post:" sign_in: "Sign in to view it." subject: "%{name} has mentioned you on Diaspora*" new_request: - just_sent_you: "just sent you a friend request on Diaspora*" - sign_in: "sign in here" - subject: "new Diaspora* friend request from %{from}" - try_it_out: "You should really think about checking it out." + just_sent_you: "Diaspora* أُرسل لك طلب إتصال على" + sign_in: "تسجيل الدخول هنا" + subject: "جديد Diaspora* طلب صداقة من %{from}" + try_it_out: ".يجب عليك التفكير في التحقق من ذلك" private_message: message_subject: "Subject: %{subject}" private_message: "has sent you a private message:" sign_in: "Sign in to view it." subject: "%{name} has sent you a private message yon Diaspora*" request_accepted: - accepted: "has accepted your friend request. They are now in your" + accepted: "!قد تم قبول طلب اتصالك" sign_in: "Sign in here" - subject: "%{name} has accepted your friend request on Diaspora*" + subject: "%{name} تم قبوله كصديق على Diaspora*" single_admin: admin: "Your Diaspora administrator" subject: "A message from your Diaspora administrator:" thanks: "Thanks," - ok: "OK" - or: "or" - password: "Password" - password_confirmation: "Password confirmation" + ok: "حسناً" + or: "أو" + password: "كلمة السر" + password_confirmation: "تأكيد كلمة السر" people: add_contact_small: add_contact_from_tag: "add contact from tag" @@ -317,39 +317,39 @@ ar: edit_membership: "edit aspect membership" few: "%{count} people" helper: - people_on_pod_are_aware_of: " people on pod are aware of" - results_for: " results for %{params}" + people_on_pod_are_aware_of: "على عِلم ب pod الاشخاص على " + results_for: "%{params} النتائج ل" index: couldnt_find_them_send_invite: "Couldn't find them? Send an invite!" no_one_found: "...and no one was found." no_results: "Hey! You need to search for something." - results_for: "buscar resultados para" + results_for: "نتائج البحث ل" many: "%{count} people" one: "1 person" other: "%{count} people" person: - add_contact: "add contact" - already_connected: "Already connected" - pending_request: "طلبات معلقة" - thats_you: "¡Ese sos vos!" + add_contact: "إضافة جهة اتصال" + already_connected: "مُتصل بالفعل" + pending_request: "طلبات مُعلقة" + thats_you: "!شُكراً لك" profile_sidebar: - bio: "bio" - born: "born" + bio: "السيرة الذاتية" + born: "يوم الميلاد" cannot_remove: "Cannot remove %{name} from last aspect." - edit_my_profile: "Editar mi perfil" - gender: "gender" - in_aspects: "in aspects" + edit_my_profile: "حرر ملفي الشخصي" + gender: "النوع" + in_aspects: "في جانب" location: "location" - remove_contact: "remove contact" + remove_contact: "إزالة جهة اتصال" remove_from: "Remove %{name} from %{aspect}?" show: add_some: "add some" - does_not_exist: "¡Esa persona no existe!" + does_not_exist: "!الشخص غير موجود" edit: "edit" incoming_request: "You have an incoming request from this person." mention: "Mention" message: "Message" - no_posts: "¡No hay mensajes que mostrar!" + no_posts: "!لا توجد مشاركات للعرض" not_connected: "You are not connected with this person" recent_posts: "Recent Posts" recent_public_posts: "Recent Public Posts" @@ -367,7 +367,7 @@ ar: runtime_error: "Photo upload failed. Are you sure that your seatbelt is fastened?" type_error: "Photo upload failed. Are you sure an image was added?" destroy: - notice: "تم حذف الصورة" + notice: ".تم حذف الصورة" edit: editing: "تحرير" new: @@ -375,34 +375,34 @@ ar: new_photo: "صورة جديدة" post_it: "!ألصقها" new_photo: - empty: "{file} is empty, please select files again without it." - invalid_ext: "{file} has invalid extension. Only {extensions} are allowed." - size_error: "{file} is too large, maximum file size is {sizeLimit}." + empty: "{file} فارغ, من فضلك أعد اختيار الملفات بدونه." + invalid_ext: "{file} الامتداد غير صالح. فقط {extensions} مسموح به." + size_error: "{file} كبير الحجم, حد الملف الاقصي هو {sizeLimit}." new_profile_photo: or_select_one: "or select one from your already existing" upload: "Upload a new profile photo!" photo: - view_all: "view all of %{name}'s photos" + view_all: "%{name} إعرض كل صور" show: collection_permalink: "collection permalink" delete_photo: "حذف الصورة" - edit: "edit" + edit: "حرر" edit_delete_photo: "Edit photo description / delete photo" - make_profile_photo: "make profile photo" + make_profile_photo: "إنشيء صورة للملف الشخصي" original_post: "Original Post" permalink: "permalink" - update_photo: "Update Photo" - view: "view" + update_photo: "حَدِث الصورة" + view: "عرض" update: - error: "فشل تحرير الصورة." - notice: "تم تحديث الصورة بنجاح" + error: ".فشل في تحرير الصورة" + notice: ".تم تحديث الصورة بنجاح" post_visibilites: update: post_hidden: "%{name}'s post has been hidden." posts: doesnt_exist: "that post does not exist!" previous: "previous" - profile: "Perfil" + profile: "الملف الشخصي" profiles: edit: allow_search: "Allow for people to search for you within Diaspora" @@ -424,30 +424,30 @@ ar: failed: "Failed to update profile" updated: "Profile updated" registrations: - closed: "Signups are closed on this Diaspora pod." + closed: ".Diaspora pod التسجيل مغلق على هذا " create: - success: "!Diaspora سجل في" + success: "!Diaspora لقد إنضممت الى" edit: - cancel_my_account: "Cancel my account" - edit: "Edit %{name}" - leave_blank: "(leave blank if you don't want to change it)" - password_to_confirm: "(we need your current password to confirm your changes)" - unhappy: "Unhappy?" - update: "Update" + cancel_my_account: "إلغاء حسابي" + edit: "%{name} حرر" + leave_blank: "(اترك فراغاً إذا كنت لا تريد تغييره)" + password_to_confirm: "(نحن بحاجة إلى كلمة المرور الحالية لتأكيد التغييرات)" + unhappy: "حزين؟" + update: "تحديث" new: enter_email: "Enter an e-mail" enter_password: "Enter a password" enter_password_again: "Enter the same password as before" enter_username: "Pick a username (only letters, numbers, and underscores)" sign_up: "التسجيل" - sign_up_for_diaspora: "Registrate en Diapora" + sign_up_for_diaspora: "Diaspora قُم بالتسجيل في " requests: create: - sending: "Sending..." + sending: "....إرسال" sent: "You've asked to share with %{name}. They should see it next time they log in to Diaspora." destroy: error: "!الرجاء اختيار جانب" - ignore: ". تجاهل طلب الصداقة" + ignore: ".تجاهل طلب الصداقة" success: ".أنتم الآن أصدقاء" helper: new_requests: @@ -457,16 +457,16 @@ ar: other: "%{count} new requests!" zero: "no new requests" manage_aspect_contacts: - existing: "Existing contacts" - manage_within: "Manage contacts within" + existing: "جهة اتصال موجودة" + manage_within: "إدارة جهات الاتصال بدون" new_request_to_person: sent: "sent!" - search: "Search" + search: "بحث" services: create: - success: "Authentication successful." + success: ".نجاح المُصادقة" destroy: - success: "Successfully destroyed authentication." + success: ".تم إزالة المُصادقة بنجاح" failure: error: "there was an error connecting that service" finder: @@ -479,26 +479,26 @@ ar: invite_your_friends_from: "Invite your friends from %{service}" not_connected: "not connected" index: - connect_to_facebook: "Connect to facebook" - connect_to_twitter: "Connect to twitter" - disconnect: "disconnect" + connect_to_facebook: "facebook الاتصال ب " + connect_to_twitter: "twitter الاتصال ب " + disconnect: "تخفيض" edit_services: "Edit services" - logged_in_as: "logged in as" - really_disconnect: "disconnect %{service}?" + logged_in_as: "سجل الدخول ك" + really_disconnect: " %{service}? تخفيض" inviter: click_link_to_accept_invitation: "Click this link to accept your invitation" join_me_on_diaspora: "Join me on DIASPORA*" remote_friend: invite: "invite" resend: "resend" - settings: "Settings" + settings: "إعدادات" shared: add_contact: create_request: "Find by Diaspora handle" diaspora_handle: "Diaspora handle" - enter_a_diaspora_username: "Enter a Diaspora username:" + enter_a_diaspora_username: ":Diaspora أدخل اسم المستخدم ل " know_email: "Know their email address? You should invite them" - your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}" + your_diaspora_username_is: "اسم Diaspora الخاص بك: %{diaspora_handle}" contact_list: all_contacts: "All contacts" cannot_remove: "Cannot remove person from last aspect." @@ -510,32 +510,32 @@ ar: dont_have_now: "You don't have any right now, but more invites are coming soon!" from_facebook: "From Facebook" invitations_left: "(%{count} left)" - invite_someone: "Invite someone" + invite_someone: "إدعي شخصاً" invite_your_friends: "Invite your friends" invites: "Invites" invites_closed: "Invites are currently closed on this Diaspora seed" notification: - new: "New %{type} from %{from}" + new: "%{from} من %{type} جديد" public_explain: - logged_in: "logged in to %{service}" - manage: "manage connected services" - outside: "Public messages will be available for others outside of Diaspora to see." - title: "You are about to post a public message!" + logged_in: "%{service} تسجيل الدخول إلى" + manage: "إدارة خدمات المتصلين" + outside: "!Diaspora الرسائل العامة سوف يكون متاح رؤيتها من خارج " + title: "إعداد خدمات المُتصلين" publisher: add_photos: "add photos" - all: "all" + all: "كل" all_contacts: "all contacts" click_to_share_with: "Click to share with: " - make_public: "make public" - post_a_message_to: "Post a message to %{aspect}" - posting: "Posting..." + make_public: "إجعلها عامة" + post_a_message_to: "%{aspect}انشر رسالة في" + posting: "...جاري الارسال" public: "Public" publishing_to: "publishing to: " share: "مشاركة" - share_with: "Share with %{aspect}" + share_with: "%{aspect} شارك مع" whats_on_your_mind: "what's on your mind?" reshare: - reshare: "Reshare" + reshare: "اعد المشاركة" stream_element: dislike: "I dislike this" like: "I like this" @@ -545,11 +545,11 @@ ar: destroy: failure: "Failed to delete post" helper: - no_message_to_display: "لا يوجد رسالة لعرضها" + no_message_to_display: ".لا يوجد رسالة لعرضها" new: mentioning: "Mentioning: %{person}" show: - destroy: "إزالة" + destroy: "حذف" not_found: "Sorry, we couldn't find that post." permalink: "permalink" stream_helper: @@ -560,25 +560,25 @@ ar: nobody_talking: "Nobody is talking about %{tag} yet." people_tagged_with: "People tagged with %{tag}" posts_tagged_with: "Posts tagged with #%{tag}" - the_world: "the world" + the_world: "العالم" undo: "Undo?" - username: "Username" + username: "إسم المستخدم" users: - destroy: "Account successfully closed." + destroy: ".تم إغلاق الحساب بنجاح" edit: also_commented: "...someone also comments on your contact's post?" change: "Change" - change_language: "Change Language" - change_password: "Cambiar Contraseña" - close_account: "Cerrar Cuenta" + change_language: "تغيير اللغة" + change_password: "تغيير كلمة السر" + close_account: "أغلق الحساب" comment_on_post: "...someone comments on your post?" current_password: "Current password" - download_photos: "descargar mis fotos" - download_xml: "download my xml" + download_photos: "حَمِل صورتي" + download_xml: "خاصتي xml حَمِل" edit_account: "Edit account" - export_data: "Exportar datos" + export_data: "تصدير البيانات" mentioned: "...you are mentioned in a post?" - new_password: "Nueva Contraseña" + new_password: "كلمة سر جديدة" private_message: "...you receive a private message?" receive_email_notifications: "Receive email notificaions?" request_acceptence: "...your share request is accepted?" @@ -587,28 +587,28 @@ ar: your_handle: "Your diaspora handle" getting_started: connect_on_diaspora: "Connect on Diaspora" - connect_services: "Connect your services" + connect_services: "تواصل مع الخدمات الاخرى الخاصة بك" could_not_find_anyone: "Could not find any friends on Diaspora*. Use the friend finder to invite them." - edit_profile: "Editar tu perfil" - finished: "Finished!" - save_and_continue: "Save and continue" - signup_steps: "Complete your sign-up by doing these things:" - skip: "skip getting started" + edit_profile: "حرر ملفي الشخصي" + finished: "!انتهى" + save_and_continue: "إحفظ وأكمل" + signup_steps: ":أنهي تسجيلك من خلال استكمال هذه الخطوات الثلاث" + skip: "تخطي وإبدأ" step_2: find_your_friends_on_diaspora: "Would you like to find your Facebook friends on Diaspora?" skip: "Skip" step_3: finish: "Finish" people_already_on_diaspora: "People already on Diaspora" - welcome: "Welcome to Diaspora!" + welcome: "Diaspora! مرحباَ بك في" public: - does_not_exist: "¡El usuario %{username} no existe!" + does_not_exist: "!غير موجود %{username} المستخدم" update: email_notifications_changed: "Language Change Failed" - language_changed: "Language Changed" - language_not_changed: "Language Change Failed" - password_changed: "Password Changed" - password_not_changed: "Password Change Failed" + language_changed: "تم تغيير اللغة" + language_not_changed: "فشل في تغيير اللغة" + password_changed: "تم تغيير كلمة السر" + password_not_changed: "فشل في تغيير كلمة السر" webfinger: fetch_failed: "failed to fetch webfinger profile for %{profile_url}" hcard_fetch_failed: "there was a problem fetching the hcard for #{@account}" diff --git a/config/locales/diaspora/en_shaw.yml b/config/locales/diaspora/en_shaw.yml index b2a396ffe..e1cc3d2b6 100644 --- a/config/locales/diaspora/en_shaw.yml +++ b/config/locales/diaspora/en_shaw.yml @@ -228,8 +228,8 @@ en_shaw: header: blog: "𐑚𐑤𐑪𐑜" code: "𐑒𐑴𐑛" - login: "𐑤𐑪𐑜𐑦𐑯" - logout: "𐑤𐑪𐑜𐑬𐑑" + login: "𐑤𐑪𐑜 𐑦𐑯" + logout: "𐑤𐑪𐑜 𐑬𐑑" profile: "𐑐𐑮𐑴𐑓𐑲𐑤" settings: "𐑕𐑧𐑑𐑦𐑙𐑟" likes: @@ -251,7 +251,7 @@ en_shaw: no_results: "𐑯𐑴 𐑮𐑦𐑟𐑫𐑤𐑑𐑕 𐑓𐑬𐑯𐑛" notifications: also_commented: "(e)k iruzkindu du %{post_author}(r)en mezuan ere" - also_commented_deleted: "𐑒𐑪𐑥𐑩𐑯𐑑𐑩𐑛 𐑪𐑯 𐑩 𐑛𐑦𐑤𐑰𐑑𐑩𐑛 𐑐𐑴𐑕𐑑" + also_commented_deleted: "𐑒𐑩𐑥𐑩𐑯𐑑𐑩𐑛 𐑪𐑯 𐑩 𐑛𐑦𐑤𐑰𐑑𐑩𐑛 𐑐𐑴𐑕𐑑" comment_on_post: "𐑒𐑪𐑥𐑩𐑯𐑑𐑩𐑛 𐑪𐑯 𐑿𐑼" deleted: "𐑛𐑦𐑤𐑰𐑑𐑩𐑛" helper: @@ -266,7 +266,7 @@ en_shaw: and_others: "𐑯 %{number} 𐑳𐑞𐑼𐑟" mark_all_as_read: "𐑥𐑸𐑒 𐑷𐑤 𐑨𐑟 𐑮𐑧𐑛" notifications: "𐑯𐑴𐑑𐑦𐑓𐑦𐑒𐑱𐑖𐑩𐑯𐑟" - mentioned: "𐑣𐑨𐑟 𐑥𐑧𐑯𐑖𐑩𐑯𐑛 𐑿 𐑦𐑯 𐑩 𐑐𐑴𐑕𐑑" + mentioned: "𐑣𐑨𐑟 𐑥𐑧𐑯𐑖𐑩𐑯𐑛 𐑿 𐑦𐑯 𐑩" new_request: "𐑪𐑓𐑼𐑛 𐑑 𐑖𐑺 𐑢𐑦𐑞 𐑿." post: "𐑐𐑴𐑕𐑑" private_message: "𐑕𐑧𐑯𐑑 𐑿 𐑩 𐑥𐑧𐑕𐑩𐑡." diff --git a/config/locales/diaspora/hu.yml b/config/locales/diaspora/hu.yml index 7c2c92045..375d89fcd 100644 --- a/config/locales/diaspora/hu.yml +++ b/config/locales/diaspora/hu.yml @@ -228,8 +228,8 @@ hu: header: blog: "blog" code: "kód" - login: "belépés" - logout: "kilépés" + login: "bejelentkezés" + logout: "kijelentkezés" profile: "profil" settings: "beállítások" likes: @@ -251,7 +251,7 @@ hu: no_results: "Nincs eredmény" notifications: also_commented: "hozzászólt még az övéhez is:" - also_commented_deleted: "hozzászólt egy már törölt bejegyzéshez" + also_commented_deleted: "hozzászólt egy már törölt bejegyzéshez." comment_on_post: "hozzászólt a" deleted: "törölve" helper: @@ -266,9 +266,9 @@ hu: and_others: "és %{number} másik" mark_all_as_read: "Mind megjelölése olvasottként" notifications: "Értesítések" - mentioned: "megemlített téged egy bejegyzésben" + mentioned: "megemlített téged egy" new_request: "megosztást ajánlott neked." - post: "bejegyzés" + post: "bejegyzésben." private_message: "üzenetet küldött neked." request_accepted: "elfogadta a megosztási kérésed." notifier: diff --git a/config/locales/diaspora/ja.yml b/config/locales/diaspora/ja.yml index af17b41ab..c3f20fcab 100644 --- a/config/locales/diaspora/ja.yml +++ b/config/locales/diaspora/ja.yml @@ -8,7 +8,7 @@ ja: _home: "Home" _photos: "写真" _services: "Services" - account: "Account" + account: "アカウント" activerecord: errors: models: @@ -33,84 +33,84 @@ ja: username: taken: "既に使われています。" ago: "%{time} ago" - all_aspects: "All Aspects" + all_aspects: "全てのアスペクト" application: helper: - unknown_person: "unknown person" + unknown_person: "不明な連絡先" video_title: - unknown: "Unknown Video Title" + unknown: "不明な動画タイトル" are_you_sure: "本当にいいですか。" aspect_memberships: destroy: - failure: "人をアスペクトから除外するのに失敗しました" - no_membership: "選択した人はそのアスペクト内に見つかりませんでした" - success: "人をアスペクトから除外するのに成功しました" + failure: "連絡先をアスペクトから除外するのに失敗しました" + no_membership: "選択した連絡先はそのアスペクト内に見つかりませんでした" + success: "連絡先をアスペクトから除外するのに成功しました" aspects: add_to_aspect: - failure: "Failed to add contact to aspect." - success: "Successfully added contact to aspect." + failure: "連絡先をアスペクトに追加するのに失敗しました。" + success: "連絡先をアスペクトに追加するのに成功しました。" aspect_contacts: - done_editing: "done editing" + done_editing: "編集完了" aspect_stream: - activity: "activity" - post_time: "post time" - sort_by: "sort by:" + activity: "更新時" + post_time: "投稿時" + sort_by: "並び順" contacts_not_visible: "Contacts in this aspect will not be able to see each other." contacts_visible: "Contacts in this aspect will be able to see each other." create: failure: "Aspect creation failed." - success: "Your new aspect %{name} was created" + success: "新しいアスペクト「%{name}」を作成しました" destroy: - failure: "%{name} is not empty and could not be removed." - success: "%{name} was successfully removed." + failure: "%{name}に連絡先が残っているので削除できません。" + success: "%{name}の削除に成功しました" edit: - add_existing: "Add an existing contact" - aspect_list_is_not_visible: "aspect list is hidden to others in aspect" - aspect_list_is_visible: "aspect list is visible to others in aspect" - confirm_remove_aspect: "Are you sure you want to delete this aspect?" - done: "Done" - make_aspect_list_visible: "make aspect list visible?" - remove_aspect: "Delete this aspect" - rename: "rename" - update: "update" - updating: "updating" - few: "%{count} aspects" + add_existing: "既存の連絡先を追加する" + aspect_list_is_not_visible: "このアスペクトのメンバー一覧はメンバーへ公開されていません" + aspect_list_is_visible: "このアスペクトのメンバー一覧はメンバーに公開されています" + confirm_remove_aspect: "このアスペクトを本当に削除していいですか。" + done: "完了" + make_aspect_list_visible: "アスペクトのメンバー一覧を公開しますか。" + remove_aspect: "このアスペクトを削除する" + rename: "名前の変更" + update: "更新" + updating: "更新中" + few: "%{count}つのアスペクト" helper: are_you_sure: "Are you sure you want to delete this aspect?" aspect_not_empty: "Aspect not empty" remove: "remove" index: - handle_explanation: "This is your diaspora handle. Like an email address, you can give this to people to reach you." - no_contacts: "No contacts" + handle_explanation: "これがあなたのハンドル名です。メールアドレスと同じようにほかの人に教えて、ダイアスポラで連絡を取り合うことができます。" + no_contacts: "連絡先無し" post_a_message: "post a message >>" manage: - add_a_new_aspect: "Add a new aspect" - add_a_new_contact: "Add a new contact" - drag_to_add: "Drag to add people" + add_a_new_aspect: "新しいアスペクトを追加する" + add_a_new_contact: "新しい連絡先を追加する" + drag_to_add: "追加したい連絡先をドラッグしてください" manage_aspects: "Manage aspects" no_requests: "No new requests" - requests: "Requests" - many: "%{count} aspects" + requests: "リクエスト" + many: "%{count}アスペクト" move_contact: - error: "Error moving contact: %{inspect}" - failure: "didn't work %{inspect}" - success: "Person moved to new aspect" + error: "連絡先の移動にエラーが発生しました: %{inspect}" + failure: "連絡先の移動に失敗しました:%{inspect}" + success: "連絡先を新しいアスペクトに移しました" new_aspect: - create: "Create" - name: "Name" + create: "作成する" + name: "アスペクト名" no_posts_message: - start_talking: "Nobody has said anything yet. Get the conversation started!" - one: "1 aspect" - other: "%{count} aspects" + start_talking: "投稿がまだありません。会話を始めましょう!" + one: "1つのアスペクト" + other: "%{count}アスペクト" seed: - family: "Family" - work: "Work" + family: "家族" + work: "仕事" show: - edit_aspect: "edit aspect" + edit_aspect: "アスペクトを編集する" update: failure: "Your aspect, %{name}, had too long name to be saved." - success: "Your aspect, %{name}, has been successfully edited." - zero: "no aspects" + success: "アスペクト「%{name}」の編集に成功しました。" + zero: "アスペクト無し" back: "前へ" bookmarklet: explanation: "%{link} from anywhere by bookmarking this link." @@ -139,12 +139,12 @@ ja: other: "%{count} contacts" share_with_pane: accepts: "Once %{name} accepts, you'll start seeing each other's posts on Diaspora" - add_new_aspect: "add to new aspect" + add_new_aspect: "新しいアスペクトに追加する" share_with: "Start sharing with %{name}" zero: "no contacts" conversations: create: - sent: "Message sent" + sent: "メッセージを送信しました" destroy: success: "Conversation successfully removed" helper: @@ -152,34 +152,34 @@ ja: few: "%{count} new messages" many: "%{count} new messages" one: "1 new messages" - other: "%{count} new messages" - zero: "no new messages" + other: "新着メッセージ %{count}件" + zero: "新着メッセージはありません" index: - create_a_new_message: "create a new message" - inbox: "Inbox" - message_inbox: "Message Inbox" - new_message: "New Message" - no_conversation_selected: "no conversation selected" - no_messages: "no messages" + create_a_new_message: "新しいメッセージを作成する" + inbox: "受信トレイ" + message_inbox: "メッセージ受信トレイ" + new_message: "新しいメッセージ" + no_conversation_selected: "選択中の会話がありません" + no_messages: "メッセージがありません" new: send: "Send" subject: "subject" to: "to" show: - delete: "delete and block conversation" - reply: "reply" + delete: "会話を削除して、ブロックする" + reply: "返信" date: formats: - birthday: "%B %d" - birthday_with_year: "%B %d %Y" - fullmonth_day: "%B %d" + birthday: "%m月%d日" + birthday_with_year: "%Y年%m月%d日" + fullmonth_day: "%m月%d日" delete: "削除" email: "Email" error_messages: helper: - correct_the_following_errors_and_try_again: "Correct the following errors and try again." + correct_the_following_errors_and_try_again: "次の問題を解決してからやり直してください。" invalid_fields: "Invalid Fields" - fill_me_out: "Fill me out" + fill_me_out: "記入して" hide: "隠す" home: show: @@ -208,7 +208,7 @@ ja: sign_up: "sign_up" new: already_invited: "Already invited" - aspect: "Aspect" + aspect: "アスペクト" comma_seperated_plz: "You can enter multiple email addresses separated by commas." if_they_accept_info: "if they accept, they will be added to the aspect you invited them." invite_someone_to_join: "Invite someone to join Diaspora!" @@ -219,15 +219,15 @@ ja: to: "To" layouts: application: - have_a_problem: "Have a problem? Find an answer here" + have_a_problem: "質問がありましたら、ここでアンサーを。" powered_by: "POWERED BY DIASPORA*" public_feed: "%{name}さんの公開ダイアスポラフィード" - toggle: "携帯サイトの切替え" - whats_new: "最新情報" + toggle: "携帯サイトを切替える" + whats_new: "更新履歴" your_aspects: "アスペクト" header: blog: "ブログ" - code: "code" + code: "ソース" login: "ログイン" logout: "ログアウト" profile: "プロフィール" @@ -248,11 +248,11 @@ ja: zero: "no people liked this" more: "More" next: "next" - no_results: "No Results Found" + no_results: "詮索結果はありません" notifications: - also_commented: "also commented on %{post_author}'s" - also_commented_deleted: "commented on a deleted post." - comment_on_post: "commented on your" + also_commented: "さんも%{post_author}さんの投稿にコメントしました:" + also_commented_deleted: "さんは削除された投稿にコメントしました。" + comment_on_post: "さんは次の投稿にコメントしました:" deleted: "deleted" helper: new_notifications: @@ -265,21 +265,21 @@ ja: and: "and" and_others: "and %{number} others" mark_all_as_read: "Mark All as Read" - notifications: "Notifications" + notifications: "お知らせ" mentioned: "has mentioned you in a " - new_request: "offered to share with you." + new_request: "さんは共有の許可を求めました。" post: "post." private_message: "sent you a message." request_accepted: "accepted your share request." notifier: also_commented: - commented: "has also commented on %{post_author}'s post:" - sign_in: "Sign in to view it." - subject: "%{name} has also commented on %{post_author}'s post." + commented: "も%{post_author}さんの投稿にコメントしました:" + sign_in: "コメントを見るにはログインしてください。" + subject: "%{name}も%{post_author}さんの投稿にコメントしました。" comment_on_post: - commented: "has commented on your post:" + commented: "は次の投稿にコメントしました:" sign_in: "Sign in to view it." - subject: "%{name} has commented on your post." + subject: "%{name}は投稿にコメントしました。" diaspora: "the diaspora email robot" hello: "Hello %{name}!" love: "love," @@ -307,60 +307,60 @@ ja: subject: "A message about your Diaspora account:" thanks: "Thanks," ok: "OK" - or: "or" + or: "或いは" password: "Password" - password_confirmation: "Password confirmation" + password_confirmation: "パスワード確認" people: add_contact_small: - add_contact_from_tag: "add contact from tag" + add_contact_from_tag: "タグより連絡先を追加する" aspect_list: - edit_membership: "edit aspect membership" - few: "%{count} people" + edit_membership: "アスペクト所属を編集する" + few: "%{count}人の連絡先" helper: - people_on_pod_are_aware_of: " people on pod are aware of" - results_for: " results for %{params}" + people_on_pod_are_aware_of: "人のポッドメンバーが知っています" + results_for: "%{params}の検索結果" index: - couldnt_find_them_send_invite: "Couldn't find them? Send an invite!" - no_one_found: "...and no one was found." - no_results: "Hey! You need to search for something." - results_for: "search results for" - many: "%{count} people" - one: "1 person" - other: "%{count} people" + couldnt_find_them_send_invite: "見つかりませんでしたか。招待メールを送信しましょう!" + no_one_found: "…1人も見つかりませんでした。" + no_results: "何かを検索しないといけません。" + results_for: "検索結果:" + many: "%{count}人の連絡先" + one: "1人の連絡先" + other: "%{count}人の連絡先" person: - add_contact: "add contact" - already_connected: "Already connected" - pending_request: "Pending request" - thats_you: "That's you!" + add_contact: "連絡先を追加する" + already_connected: "既につながっています" + pending_request: "共有の承認待ち" + thats_you: "あなた自身です!" profile_sidebar: - bio: "bio" - born: "birthday" - cannot_remove: "Cannot remove %{name} from last aspect. (If you want to disconnect from this person you must remove contact.)" - edit_my_profile: "Edit my profile" - gender: "gender" - in_aspects: "in aspects" - location: "location" - remove_contact: "remove contact" - remove_from: "Remove %{name} from %{aspect}?" + bio: "略歴" + born: "誕生日" + cannot_remove: "連絡先を最後のアスペクから除外することができません。(断絶したい場合は連絡先を削除してください。)" + edit_my_profile: "プロフィールを編集する" + gender: "性別" + in_aspects: "アスペクトで" + location: "所在地" + remove_contact: "連絡先を削除する" + remove_from: "%{name}さんを%{aspect}から除外しますか。" show: - add_some: "add some" - does_not_exist: "Person does not exist!" - edit: "edit" - incoming_request: "%{name} wants to share with you" - mention: "Mention" - message: "Message" - no_posts: "no posts to display!" - not_connected: "You are not sharing with this person" - recent_posts: "Recent Posts" - recent_public_posts: "Recent Public Posts" - return_to_aspects: "Return to your aspects page" - see_all: "See all" - start_sharing: "start sharing" - to_accept_or_ignore: "to accept or ignore it." - you_have_no_tags: "you have no tags!" + add_some: "追加する" + does_not_exist: "存在しない連絡先です!" + edit: "編集" + incoming_request: "%{name}さんは共有の許可を求めています" + mention: "参照" + message: "メッセージ" + no_posts: "表示する投稿はありません!" + not_connected: "この連絡先と共有していません" + recent_posts: "最近の投稿" + recent_public_posts: "最近の公開投稿" + return_to_aspects: "アスペクトページに戻る" + see_all: "全て表示" + start_sharing: "共有を開始する" + to_accept_or_ignore: "承諾するか無視するか決めて下さい。" + you_have_no_tags: "タグを設定していません!" webfinger: - fail: "Sorry, we couldn't find %{handle}." - zero: "no people" + fail: "%{handle}が見つかりませんでした。" + zero: "連絡先無し" photos: create: integrity_error: "写真のアップロードに失敗しました。確かに画像ファイルだったのでしょうか。" @@ -375,12 +375,12 @@ ja: new_photo: "新しい写真" post_it: "投稿する!" new_photo: - empty: "{file} is empty, please select files again without it." - invalid_ext: "{file} has invalid extension. Only {extensions} are allowed." - size_error: "{file} is too large, maximum file size is {sizeLimit}." + empty: "{file}は空です。取り除いてファイルを選択しなおしてください。" + invalid_ext: "{file}のファイル名は不正です。{extensions}以外の拡張子は使えません。" + size_error: "{file}は大きすぎます。ファイルサイズの上限は{sizeLimit}です。" new_profile_photo: - or_select_one: "or select one from your already existing" - upload: "Upload a new profile photo!" + or_select_one: "或いは既存のから選択する" + upload: "新しいプロフィール写真をアップロードする!" photo: view_all: "%{name}の写真をすべてみる" show: @@ -394,11 +394,11 @@ ja: update_photo: "写真を更新する" view: "表示" update: - error: "Failed to edit photo." - notice: "Photo successfully updated." + error: "写真の編集に失敗しました。" + notice: "写真の更新に成功しました。" post_visibilites: update: - post_hidden: "%{name}'s post has been hidden." + post_hidden: "%{name}さんの投稿を非表示にしました。" posts: doesnt_exist: "that post does not exist!" previous: "前へ" @@ -406,7 +406,7 @@ ja: profiles: edit: allow_search: "ダイアスポラ内の検索を許可します" - edit_profile: "プロフィールの編集" + edit_profile: "プロフィールを編集する" first_name: "名" last_name: "姓" update_profile: "プロフィール更新" @@ -419,7 +419,7 @@ ja: your_private_profile: "非公開プロフィール" your_public_profile: "公開プロフィール" your_tags: "自分を表す5つの#タグ" - your_tags_placeholder: "例:#ダイアスポラ #家事 #子猫 #音楽" + your_tags_placeholder: "例:#diaspora #kaji #nyanko #ongaku" update: failed: "プロフィール更新に失敗しました" updated: "プロフィールを更新しました" @@ -433,7 +433,7 @@ ja: leave_blank: "(leave blank if you don't want to change it)" password_to_confirm: "(we need your current password to confirm your changes)" unhappy: "Unhappy?" - update: "Update" + update: "更新" new: enter_email: "Enter an e-mail" enter_password: "Enter a password" @@ -457,11 +457,11 @@ ja: other: "%{count} new requests!" zero: "no new requests" manage_aspect_contacts: - existing: "Existing contacts" - manage_within: "Manage contacts within" + existing: "現在の連絡先" + manage_within: "次のアスペクトの連絡先を管理:" new_request_to_person: - sent: "sent!" - search: "Search" + sent: "送信しました!" + search: "検索" services: create: success: "Authentication successful." @@ -471,13 +471,13 @@ ja: error: "there was an error connecting that service" finder: friends: - few: "%{count} friends" - many: "%{count} friends" - one: "1 friend" - other: "%{count} friends" - zero: "no friends" - invite_your_friends_from: "Invite your friends from %{service}" - not_connected: "not connected" + few: "%{count}人の連絡先" + many: "%{count}人の連絡先" + one: "1人の連絡先" + other: "%{count}人の連絡先" + zero: "連絡先無し" + invite_your_friends_from: "%{service}の連絡先を招待する" + not_connected: "未接続" index: connect_to_facebook: "Connect to facebook" connect_to_twitter: "Connect to twitter" @@ -494,17 +494,17 @@ ja: settings: "Settings" shared: add_contact: - create_request: "Find by Diaspora handle" + create_request: "ダイアスポラのハンドル名で検索" diaspora_handle: "diaspora@handle.org" enter_a_diaspora_username: "Enter a Diaspora username:" know_email: "Know their email address? You should invite them" - your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}" + your_diaspora_username_is: "あなたのハンドル名は%{diaspora_handle}です。" contact_list: - all_contacts: "All contacts" - cannot_remove: "Cannot remove person from last aspect. (If you want to disconnect from this person you must remove contact.)" + all_contacts: "全ての連絡先" + cannot_remove: "連絡先を最後のアスペクトから除外することができません。(断絶したい場合は連絡先を削除してください。)" footer: logged_in_as: "logged in as %{name}" - your_aspects: "your aspects" + your_aspects: "アスペクト" invitations: by_email: "by Email" dont_have_now: "You don't have any right now, but more invites are coming soon!" @@ -524,7 +524,7 @@ ja: publisher: add_photos: "add photos" all: "all" - all_contacts: "all contacts" + all_contacts: "全ての連絡先" click_to_share_with: "Click to share with: " make_public: "make public" post_a_message_to: "Post a message to %{aspect}" @@ -553,16 +553,16 @@ ja: not_found: "Sorry, we couldn't find that post." permalink: "permalink" stream_helper: - hide_comments: "コメント非表示" - show_comments: "すべてのコメント表示" + hide_comments: "コメントを非表示にする" + show_comments: "すべてのコメントを表示する" tags: show: - nobody_talking: "Nobody is talking about %{tag} yet." - people_tagged_with: "People tagged with %{tag}" - posts_tagged_with: "Posts tagged with #%{tag}" + nobody_talking: "%{tag}についての投稿はまだありません。" + people_tagged_with: "%{tag}とタグ付けられている人々" + posts_tagged_with: "#%{tag}とタグ付けられている投稿" the_world: "the world" - undo: "Undo?" - username: "Username" + undo: "元に戻す" + username: "ユーザ名" users: destroy: "Account successfully closed." edit: @@ -584,31 +584,31 @@ ja: request_acceptence: "...your share request is accepted?" request_received: "...you receive a new share request?" your_email: "Your email" - your_handle: "Your diaspora handle" + your_handle: "ハンドル名" getting_started: - connect_on_diaspora: "Connect on Diaspora" - connect_services: "Connect your other services" + connect_on_diaspora: "ダイアスポラでつながる" + connect_services: "他のサービスへ接続する" could_not_find_anyone: "Could not find any friends on Diaspora*. Use the friend finder to invite them." - edit_profile: "Edit your profile" - finished: "Finished!" - save_and_continue: "Save and continue" - signup_steps: "Finish your sign up by completing these three steps:" - skip: "skip getting started" + edit_profile: "プロフィールを編集する" + finished: "完了!" + save_and_continue: "保存して次へ" + signup_steps: "次の3ステップで登録を完成しましょう" + skip: "初期設定をスキップする" step_2: find_your_friends_on_diaspora: "Would you like to find your Facebook friends on Diaspora?" - skip: "Skip" + skip: "スキップ" step_3: - finish: "Finish" - people_already_on_diaspora: "People already on Diaspora" - welcome: "Welcome to Diaspora!" + finish: "終了" + people_already_on_diaspora: "ダイアスポラを既に使っている連絡先" + welcome: "ダイアスポラへようこそ!" public: does_not_exist: "User %{username} does not exist!" update: - email_notifications_changed: "Email notifications changed" - language_changed: "Language Changed" - language_not_changed: "Language Change Failed" - password_changed: "Password Changed" - password_not_changed: "Password Change Failed" + email_notifications_changed: "メール配信の設定を変更しました" + language_changed: "言語の設定を変更しました" + language_not_changed: "言語の選択に失敗しました" + password_changed: "パスワードを変更しました" + password_not_changed: "パスワードの変更に失敗しました" webfinger: fetch_failed: "failed to fetch webfinger profile for %{profile_url}" hcard_fetch_failed: "there was a problem fetching the hcard for %{account}" diff --git a/config/locales/javascript/javascript.en_shaw.yml b/config/locales/javascript/javascript.en_shaw.yml index 6ce50d51d..6aaf680ce 100644 --- a/config/locales/javascript/javascript.en_shaw.yml +++ b/config/locales/javascript/javascript.en_shaw.yml @@ -34,4 +34,4 @@ en_shaw: unknown: "𐑩𐑯𐑯𐑴𐑯 𐑝𐑦𐑛𐑦𐑴 𐑑𐑲𐑐" watch: "𐑢𐑷𐑗 𐑞𐑦𐑕 𐑝𐑦𐑛𐑦𐑴 𐑪𐑯 {{provider}}" web_sockets: - disconnected: "The websocket is closed; posts will no longer be streamed live." + disconnected: "𐑞 𐑢𐑧𐑚𐑕𐑪𐑒𐑩𐑑 𐑦𐑟 𐑒𐑤𐑴𐑟𐑛; 𐑐𐑴𐑕𐑑𐑕 𐑢𐑦𐑤 𐑯𐑴 𐑤𐑪𐑙𐑜𐑼 𐑚𐑰 𐑕𐑑𐑮𐑰𐑥𐑛 𐑤𐑲𐑝." diff --git a/config/locales/javascript/javascript.hu.yml b/config/locales/javascript/javascript.hu.yml index a2753e7be..8ebb64e26 100644 --- a/config/locales/javascript/javascript.hu.yml +++ b/config/locales/javascript/javascript.hu.yml @@ -34,4 +34,4 @@ hu: unknown: "Ismeretlen videó tipus" watch: "Videó megtekintése itt: {{provider}}" web_sockets: - disconnected: "The websocket is closed; posts will no longer be streamed live." + disconnected: "A websocket zárolva van. A bejegyzések nem lesznek előben stream-elve." diff --git a/config/locales/javascript/javascript.ja.yml b/config/locales/javascript/javascript.ja.yml index 8cc5332b8..55785cdf6 100644 --- a/config/locales/javascript/javascript.ja.yml +++ b/config/locales/javascript/javascript.ja.yml @@ -13,7 +13,7 @@ ja: search_for: "{{name}}を検索する" shared: contact_list: - cannot_remove: "残り最後のアスペクトから人を除外することができません。(人とのつながりを解除したい場合は連絡先を削除してください。)" + cannot_remove: "人を最後のアスペクトから除外することができません。(つながりを断絶したい場合は連絡先を削除してください。)" timeago: day: "1日" days: "%d日" diff --git a/config/locales/javascript/javascript.ko.yml b/config/locales/javascript/javascript.ko.yml index 26b2c809a..363eaa5b0 100644 --- a/config/locales/javascript/javascript.ko.yml +++ b/config/locales/javascript/javascript.ko.yml @@ -7,7 +7,7 @@ ko: javascripts: confirm_dialog: "확실합니까?" infinite_scroll: - no_more: "메시지가 더 없습디다." + no_more: "공유물이 더 없습니다." publisher: at_least_one_aspect: "공유하려면 적어도 한 애스펙을 골라야 합니다." search_for: "{{name}} 검색" From 160e01f7bd92aa905f8288bdd9d1ff9edab0a5b7 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Sat, 7 May 2011 00:40:07 -0400 Subject: [PATCH 15/61] Fix broken sorting by activity --- app/helpers/application_helper.rb | 5 +++- app/helpers/aspects_helper.rb | 4 +++ app/views/shared/_stream_element.html.haml | 2 +- features/infinite_scroll.feature | 34 +++++++++++++++++++++- features/step_definitions/user_steps.rb | 5 ++-- 5 files changed, 45 insertions(+), 5 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 221c3da15..f0aabb68a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -4,6 +4,9 @@ module ApplicationHelper @@youtube_title_cache = Hash.new("no-title") + def time_for_sort post + post.created_at + end def timeago(time, options={}) options[:class] ||= "timeago" @@ -285,7 +288,7 @@ module ApplicationHelper "(r)" => "®", "(c)" => "©" } - + map.each do |search, replace| message.gsub!(search, replace) end diff --git a/app/helpers/aspects_helper.rb b/app/helpers/aspects_helper.rb index 7d9519287..8cc08efe1 100644 --- a/app/helpers/aspects_helper.rb +++ b/app/helpers/aspects_helper.rb @@ -7,6 +7,10 @@ module AspectsHelper aspects_path(:max_time => @posts.last.send(session[:sort_order].to_sym).to_i, :a_ids => params[:a_ids]) end + def time_for_sort post + post.send(session[:sort_order].to_sym) + end + def remove_link(aspect) if aspect.contacts.size == 0 link_to I18n.t('aspects.helper.remove'), aspect, :method => :delete, :confirm => I18n.t('aspects.helper.are_you_sure') diff --git a/app/views/shared/_stream_element.html.haml b/app/views/shared/_stream_element.html.haml index 44ce12d3a..2b13768c5 100644 --- a/app/views/shared/_stream_element.html.haml +++ b/app/views/shared/_stream_element.html.haml @@ -21,7 +21,7 @@ .content .from = person_link(post.author, :class => 'author') - %time.time.timeago{:datetime => post.created_at, :integer => post.created_at.to_i} + %time.time.timeago{:datetime => post.created_at, :integer => time_for_sort(post).to_i} = render 'status_messages/status_message', :post => post, :photos => post.photos .info diff --git a/features/infinite_scroll.feature b/features/infinite_scroll.feature index 98181bff1..c0afdd52a 100644 --- a/features/infinite_scroll.feature +++ b/features/infinite_scroll.feature @@ -8,7 +8,39 @@ Feature: infinite scroll Given many posts from alice for bob When I sign in as "bob@bob.bob" - Scenario: on the main stream + Scenario: on the main stream by activity + Then I should see 15 posts + And I should see "alice - 26 - #seeded" + + When I scroll down + Then I should see 30 posts + And I should see "alice - 11 - #seeded" + + When I scroll down + Then I should see 40 posts + And I should see "alice - 1 - #seeded" + + When I scroll down + Then I should see "No more" + + When I follow "generic" + And I wait for the ajax to finish + Then I should see 15 posts + And I should see "alice - 26 - #seeded" + + When I scroll down + Then I should see 30 posts + And I should see "alice - 11 - #seeded" + + When I scroll down + Then I should see 40 posts + And I should see "alice - 1 - #seeded" + + When I scroll down + Then I should see "No more" + + Scenario: on the main stream post created time + When I follow "post time" Then I should see 15 posts And I should see "alice - 15 - #seeded" diff --git a/features/step_definitions/user_steps.rb b/features/step_definitions/user_steps.rb index 624682688..2a8e4ac2f 100644 --- a/features/step_definitions/user_steps.rb +++ b/features/step_definitions/user_steps.rb @@ -144,11 +144,12 @@ Given /^many posts from alice for bob$/ do alice = Factory(:user_with_aspect, :username => 'alice', :email => 'alice@alice.alice', :password => 'password', :getting_started => false) bob = Factory(:user_with_aspect, :username => 'bob', :email => 'bob@bob.bob', :password => 'password', :getting_started => false) connect_users_with_aspects(alice, bob) + time_fulcrum = Time.now - 40000 time_interval = 1000 (1..40).each do |n| post = alice.post :status_message, :text => "#{alice.username} - #{n} - #seeded", :to => alice.aspects.first.id - post.created_at = post.created_at - time_interval - post.updated_at = post.updated_at - time_interval + post.created_at = time_fulcrum - time_interval + post.updated_at = time_fulcrum + time_interval post.save time_interval += 1000 end From 3767cce149fe621677ad2da62cc12a1aca477a73 Mon Sep 17 00:00:00 2001 From: Arzumy MD Date: Sat, 7 May 2011 18:38:40 +0800 Subject: [PATCH 16/61] moved render_views out of controller specs to spec_helper. cleaned up indentation and spacing in controller specs. --- spec/controllers/admins_controller_spec.rb | 34 ++++++++++++------ spec/controllers/apis_controller_spec.rb | 6 +++- .../application_controller_spec.rb | 8 +++++ .../aspect_memberships_controller_spec.rb | 2 -- spec/controllers/aspects_controller_spec.rb | 35 ++++++++++++------- spec/controllers/comments_controller_spec.rb | 12 +++++-- spec/controllers/contacts_controller_spec.rb | 9 +++-- ...nversation_visibilities_controller_spec.rb | 4 +-- .../conversations_controller_spec.rb | 9 +++-- spec/controllers/home_controller_spec.rb | 34 +++++++++--------- .../invitations_controller_spec.rb | 10 +++--- spec/controllers/likes_controller_spec.rb | 11 ++++-- spec/controllers/messages_controller_spec.rb | 11 ++++-- .../notifications_controller_spec.rb | 4 +-- spec/controllers/people_controller_spec.rb | 10 ++++-- spec/controllers/photos_controller_spec.rb | 18 ++++++---- .../post_visibilities_controller_spec.rb | 9 +++-- spec/controllers/posts_controller_spec.rb | 3 +- spec/controllers/profiles_controller_spec.rb | 6 ++-- spec/controllers/publics_controller_spec.rb | 4 +-- .../registrations_controller_spec.rb | 17 +++++++-- spec/controllers/requests_controller_spec.rb | 10 ++++-- spec/controllers/services_controller_spec.rb | 8 ++--- spec/controllers/sessions_controller_spec.rb | 4 +-- spec/controllers/sockets_controller_spec.rb | 5 +-- .../status_messages_controller_spec.rb | 24 ++++++------- spec/controllers/tags_controller_spec.rb | 17 ++++++--- spec/controllers/users_controller_spec.rb | 6 ++-- spec/spec_helper.rb | 4 +++ 29 files changed, 207 insertions(+), 127 deletions(-) diff --git a/spec/controllers/admins_controller_spec.rb b/spec/controllers/admins_controller_spec.rb index 7b8d89d8a..c56bc6e33 100644 --- a/spec/controllers/admins_controller_spec.rb +++ b/spec/controllers/admins_controller_spec.rb @@ -1,29 +1,34 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3 or later. See +# the COPYRIGHT file. + require 'spec_helper' describe AdminsController do - render_views before do @user = Factory :user sign_in :user, @user end - it 'is behind redirect_unless_admin' do - get :user_search - response.should redirect_to root_url + describe '#user_search' do + context 'admin not signed in' do + it 'is behind redirect_unless_admin' do + get :user_search + response.should redirect_to root_url + end end - context 'admin signed in' do - before do - AppConfig[:admins] = [@user.username] - end + context 'admin signed in' do + before do + AppConfig[:admins] = [@user.username] + end - describe '#user_search' do it 'succeeds' do get :user_search response.should be_success end - it 'assings users to an empty array if nothing is searched for' do + it 'assigns users to an empty array if nothing is searched for' do get :user_search assigns[:users].should == [] end @@ -52,13 +57,20 @@ describe AdminsController do assigns[:users].should == [@user] end end + end + + describe '#admin_inviter' do + context 'admin signed in' do + before do + AppConfig[:admins] = [@user.username] + end - describe '#admin_inviter' do it 'invites a new user' do Invitation.should_receive(:create_invitee).with(:service => 'email', :identifier => 'bob@moms.com') get :admin_inviter, :identifier => 'bob@moms.com' response.should be_redirect end + it 'passes an existing user to create_invitee' do Factory.create(:user, :email => 'bob@moms.com') bob = User.where(:email => 'bob@moms.com').first diff --git a/spec/controllers/apis_controller_spec.rb b/spec/controllers/apis_controller_spec.rb index 14844608e..3dcb7cd65 100644 --- a/spec/controllers/apis_controller_spec.rb +++ b/spec/controllers/apis_controller_spec.rb @@ -1,7 +1,11 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3 or later. See +# the COPYRIGHT file. + require 'spec_helper' describe ApisController do - before(:all) do + before do @status_message1 = Factory(:status_message, :text => '#bobby #flay #sux', :public => true, :updated_at => Time.now + 20) @status_message2 = Factory(:status_message, :text => '#aobby', :public => true, :created_at => Time.now + 10) diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index b14770247..b142fc7f6 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -1,3 +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. + require 'spec_helper' describe ApplicationController do @@ -5,19 +9,23 @@ describe ApplicationController do def user_signed_in? nil end + def current_user nil end + def index render :nothing => true end end + describe '#set_git_headers' do context 'with git info' do before do AppConfig[:git_update] = 'yesterday' AppConfig[:git_revision] = '02395' end + it 'sets the git header if there is git info' do get :index response.headers['X-Git-Update'].should == 'yesterday' diff --git a/spec/controllers/aspect_memberships_controller_spec.rb b/spec/controllers/aspect_memberships_controller_spec.rb index 828eb9c44..4b3350a5c 100644 --- a/spec/controllers/aspect_memberships_controller_spec.rb +++ b/spec/controllers/aspect_memberships_controller_spec.rb @@ -5,8 +5,6 @@ require 'spec_helper' describe AspectMembershipsController do - render_views - before do @user = alice @user2 = bob diff --git a/spec/controllers/aspects_controller_spec.rb b/spec/controllers/aspects_controller_spec.rb index 684f07869..a3ad7a830 100644 --- a/spec/controllers/aspects_controller_spec.rb +++ b/spec/controllers/aspects_controller_spec.rb @@ -6,8 +6,6 @@ require 'spec_helper' require File.join(Rails.root, "spec", "shared_behaviors", "log_override") describe AspectsController do - render_views - before do @bob = bob @alice = alice @@ -241,27 +239,31 @@ describe AspectsController do get :manage response.should be_success end + it "performs reasonably", :performance => true do - require 'benchmark' - 8.times do |n| - aspect = @alice.aspects.create(:name => "aspect#{n}") - 8.times do |o| - person = Factory(:person) - @alice.activate_contact(person, aspect) - end + require 'benchmark' + 8.times do |n| + aspect = @alice.aspects.create(:name => "aspect#{n}") + 8.times do |o| + person = Factory(:person) + @alice.activate_contact(person, aspect) end - Benchmark.realtime{ - get :manage - }.should < 4.5 + end + Benchmark.realtime{ + get :manage + }.should < 4.5 end + it "assigns aspect to manage" do get :manage assigns(:aspect).should == :manage end + it "assigns remote_requests" do get :manage assigns(:remote_requests).should be_empty end + it "assigns contacts to only non-pending" do contact = @alice.contact_for(bob.person) Contact.unscoped.where(:user_id => @alice.id).count.should == 1 @@ -273,6 +275,7 @@ describe AspectsController do contacts.count.should == 1 contacts.first.should == contact end + context "when the user has pending requests" do before do requestor = Factory.create(:user) @@ -283,18 +286,22 @@ describe AspectsController do requestor_aspect.reload @alice.reload end + it "succeeds" do get :manage response.should be_success end + it "assigns aspect to manage" do get :manage assigns(:aspect).should == :manage end + it "assigns remote_requests" do get :manage assigns(:remote_requests).count.should == 1 end + it "generates a jasmine fixture" do get :manage save_fixture(html_for("body"), "aspects_manage") @@ -306,6 +313,7 @@ describe AspectsController do before do @alices_aspect_1 = @alice.aspects.create(:name => "Bruisers") end + it "doesn't overwrite random attributes" do new_user = Factory.create :user params = {"name" => "Bruisers"} @@ -336,6 +344,7 @@ describe AspectsController do connect_users(@alice, @alices_aspect_2, @zed, @zed.aspects.first) connect_users(@alice, @alices_aspect_1, @katz, @katz.aspects.first) end + it 'renders' do get :edit, :id => @alices_aspect_1.id response.should be_success @@ -371,4 +380,4 @@ describe AspectsController do @alices_aspect_1.reload.contacts_visible.should be_false end end -end +end \ No newline at end of file diff --git a/spec/controllers/comments_controller_spec.rb b/spec/controllers/comments_controller_spec.rb index 6649afd23..bab6710ff 100644 --- a/spec/controllers/comments_controller_spec.rb +++ b/spec/controllers/comments_controller_spec.rb @@ -5,8 +5,6 @@ require 'spec_helper' describe CommentsController do - render_views - before do @aspect1 = alice.aspects.first @aspect2 = bob.aspects.first @@ -20,10 +18,12 @@ describe CommentsController do {:text =>"facebook, is that you?", :post_id =>"#{@post.id}"} } + context "on my own post" do before do @post = alice.post :status_message, :text => 'GIANTS', :to => @aspect1.id end + it 'responds to format js' do post :create, comment_hash.merge(:format => 'js') response.code.should == '201' @@ -35,16 +35,19 @@ describe CommentsController do before do @post = bob.post :status_message, :text => 'GIANTS', :to => @aspect2.id end + it 'comments' do post :create, comment_hash response.code.should == '201' end + it "doesn't overwrite author_id" do new_user = Factory.create(:user) comment_hash[:author_id] = new_user.person.id.to_s post :create, comment_hash Comment.find_by_text(comment_hash[:text]).author_id.should == alice.person.id end + it "doesn't overwrite id" do old_comment = alice.comment("hello", :on => @post) comment_hash[:id] = old_comment.id @@ -52,10 +55,12 @@ describe CommentsController do old_comment.reload.text.should == 'hello' end end + context 'on a post from a stranger' do before do @post = eve.post :status_message, :text => 'GIANTS', :to => eve.aspects.first.id end + it 'posts no comment' do alice.should_not_receive(:comment) post :create, comment_hash @@ -72,6 +77,7 @@ describe CommentsController do @comment2 = bob.comment("hey", :on => @message) @comment3 = eve.comment("hey", :on => @message) end + it 'lets the user delete his comment' do alice.should_receive(:retract).with(@comment) delete :destroy, :format => "js", :id => @comment.id @@ -106,4 +112,4 @@ describe CommentsController do end end end -end +end \ No newline at end of file diff --git a/spec/controllers/contacts_controller_spec.rb b/spec/controllers/contacts_controller_spec.rb index 5116640e2..433ad4bb7 100644 --- a/spec/controllers/contacts_controller_spec.rb +++ b/spec/controllers/contacts_controller_spec.rb @@ -2,12 +2,9 @@ # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. - require 'spec_helper' describe ContactsController do - render_views - before do @user = alice @user2 = bob @@ -37,12 +34,12 @@ describe ContactsController do end describe '#create' do - context 'with an incoming request' do before do @user3 = Factory.create(:user) @user3.send_contact_request_to(@user.person, @user3.aspects.create(:name => "Walruses")) end + it 'deletes the request' do post :create, :format => 'js', @@ -50,6 +47,7 @@ describe ContactsController do :aspect_id => @aspect1.id Request.where(:sender_id => @user3.person.id, :recipient_id => @user.person.id).first.should be_nil end + it 'does not leave the contact pending' do post :create, :format => 'js', @@ -58,6 +56,7 @@ describe ContactsController do @user.contact_for(@user3.person).should_not be_pending end end + context 'with a non-contact' do before do @person = Factory(:person) @@ -125,4 +124,4 @@ describe ContactsController do response.should redirect_to(@contact.person) end end -end +end \ No newline at end of file diff --git a/spec/controllers/conversation_visibilities_controller_spec.rb b/spec/controllers/conversation_visibilities_controller_spec.rb index f2002cdd9..514396903 100644 --- a/spec/controllers/conversation_visibilities_controller_spec.rb +++ b/spec/controllers/conversation_visibilities_controller_spec.rb @@ -5,8 +5,6 @@ require 'spec_helper' describe ConversationVisibilitiesController do - render_views - before do @user1 = alice sign_in :user, @user1 @@ -32,4 +30,4 @@ describe ConversationVisibilitiesController do }.should_not change(ConversationVisibility, :count) end end -end +end \ No newline at end of file diff --git a/spec/controllers/conversations_controller_spec.rb b/spec/controllers/conversations_controller_spec.rb index b4e6e0b7c..5ed0eb786 100644 --- a/spec/controllers/conversations_controller_spec.rb +++ b/spec/controllers/conversations_controller_spec.rb @@ -1,8 +1,10 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3 or later. See +# the COPYRIGHT file. + require 'spec_helper' describe ConversationsController do - render_views - before do sign_in :user, alice end @@ -11,12 +13,15 @@ describe ConversationsController do before do get :new end + it 'succeeds' do response.should be_success end + it "assigns a json list of contacts" do assigns(:contacts_json).should include(alice.contacts.first.person.name) end + it "assigns a contact if passed a contact id" do get :new, :contact_id => alice.contacts.first.id assigns(:contact).should == alice.contacts.first diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb index f8fa12c0e..3c9ca66db 100644 --- a/spec/controllers/home_controller_spec.rb +++ b/spec/controllers/home_controller_spec.rb @@ -6,8 +6,6 @@ require 'spec_helper' require File.join(Rails.root, "spec", "shared_behaviors", "log_override") describe HomeController do - render_views - before do @user = alice sign_in @user @@ -36,22 +34,24 @@ describe HomeController do get :show response.should redirect_to( :controller => 'aspects', :action => 'index', :a_ids => @index_params[:a_ids] ) end - end - describe "custom logging on success" do - before do - @action = :show - @action_params = {"lasers" => "green"} - end - it_should_behave_like "it overrides the logs on success" - end + describe "custom logging on success" do + before do + @action = :show + @action_params = {"lasers" => "green"} + end - describe "custom logging on redirect" do - before do - sign_in :user, bob - @action = :show - @action_params = {"lasers" => "green"} + it_should_behave_like "it overrides the logs on success" + end + + describe "custom logging on redirect" do + before do + sign_in :user, bob + @action = :show + @action_params = {"lasers" => "green"} + end + + it_should_behave_like "it overrides the logs on redirect" end - it_should_behave_like "it overrides the logs on redirect" end -end +end \ No newline at end of file diff --git a/spec/controllers/invitations_controller_spec.rb b/spec/controllers/invitations_controller_spec.rb index c80351ab1..c723f043d 100644 --- a/spec/controllers/invitations_controller_spec.rb +++ b/spec/controllers/invitations_controller_spec.rb @@ -7,8 +7,6 @@ require 'spec_helper' describe InvitationsController do include Devise::TestHelpers - render_views - before do @user = alice @aspect = @user.aspects.first @@ -77,8 +75,10 @@ describe InvitationsController do :invitation_token => @invited_user.invitation_token}} end + context 'success' do let(:invited) {User.find_by_username(@accept_params[:user][:username])} + it 'creates a user' do put :update, @accept_params invited.should_not be_nil @@ -95,15 +95,18 @@ describe InvitationsController do end end + context 'failure' do before do @fail_params = @accept_params @fail_params[:user][:username] = @user.username end + it 'stays on the invitation accept form' do put :update, @fail_params response.location.include?(accept_user_invitation_path).should be_true end + it 'keeps the invitation token' do put :update, @fail_params response.location.include?("invitation_token=#{@invited_user.invitation_token}").should be_true @@ -145,5 +148,4 @@ describe InvitationsController do put :resend, :id => invitation2.id end end -end - +end \ No newline at end of file diff --git a/spec/controllers/likes_controller_spec.rb b/spec/controllers/likes_controller_spec.rb index afa2d8df9..eb7a84407 100644 --- a/spec/controllers/likes_controller_spec.rb +++ b/spec/controllers/likes_controller_spec.rb @@ -5,8 +5,6 @@ require 'spec_helper' describe LikesController do - render_views - before do @user1 = alice @user2 = bob @@ -26,10 +24,12 @@ describe LikesController do {:positive => 0, :post_id => "#{@post.id}"} } + context "on my own post" do before do @post = @user1.post :status_message, :text => "AWESOME", :to => @aspect1.id end + it 'responds to format js' do post :create, like_hash.merge(:format => 'js') response.code.should == '201' @@ -40,24 +40,29 @@ describe LikesController do before do @post = @user2.post :status_message, :text => "AWESOME", :to => @aspect2.id end + it 'likes' do post :create, like_hash response.code.should == '201' end + it 'dislikes' do post :create, dislike_hash response.code.should == '201' end + it "doesn't post multiple times" do @user1.like(1, :on => @post) post :create, dislike_hash response.code.should == '422' end end + context "on a post from a stranger" do before do @post = eve.post :status_message, :text => "AWESOME", :to => eve.aspects.first.id end + it "doesn't post" do @user1.should_not_receive(:like) post :create, like_hash @@ -65,4 +70,4 @@ describe LikesController do end end end -end +end \ No newline at end of file diff --git a/spec/controllers/messages_controller_spec.rb b/spec/controllers/messages_controller_spec.rb index 369f9219b..90ab7259c 100644 --- a/spec/controllers/messages_controller_spec.rb +++ b/spec/controllers/messages_controller_spec.rb @@ -5,8 +5,6 @@ require 'spec_helper' describe MessagesController do - render_views - before do @user1 = alice @user2 = bob @@ -22,11 +20,13 @@ describe MessagesController do @create_hash = { :author => @user1.person, :participant_ids => [@user1.contacts.first.person.id, @user1.person.id], :subject => "cool stuff", :text => "stuff"} end + context "on my own post" do before do @cnv = Conversation.create(@create_hash) @message_hash = {:conversation_id => @cnv.id, :message => {:text => "here is something else"}} end + it 'redirects to conversation' do lambda{ post :create, @message_hash @@ -42,17 +42,20 @@ describe MessagesController do @cnv = Conversation.create(@create_hash) @message_hash = {:conversation_id => @cnv.id, :message => {:text => "here is something else"}} end + it 'comments' do post :create, @message_hash response.code.should == '302' response.should redirect_to(conversations_path(:conversation_id => @cnv)) end + it "doesn't overwrite author_id" do new_user = Factory.create(:user) @message_hash[:author_id] = new_user.person.id.to_s post :create, @message_hash Message.find_by_text(@message_hash[:message][:text]).author_id.should == @user1.person.id end + it "doesn't overwrite id" do old_message = Message.create(:text => "hello", :author_id => @user1.person.id, :conversation_id => @cnv.id) @message_hash[:id] = old_message.id @@ -60,6 +63,7 @@ describe MessagesController do old_message.reload.text.should == 'hello' end end + context 'on a post from a stranger' do before do @create_hash[:author] = eve.person @@ -67,10 +71,11 @@ describe MessagesController do @cnv = Conversation.create(@create_hash) @message_hash = {:conversation_id => @cnv.id, :message => {:text => "here is something else"}} end + it 'posts no comment' do post :create, @message_hash response.code.should == '422' end end end -end +end \ No newline at end of file diff --git a/spec/controllers/notifications_controller_spec.rb b/spec/controllers/notifications_controller_spec.rb index e0a3fc2f8..8c9107c60 100644 --- a/spec/controllers/notifications_controller_spec.rb +++ b/spec/controllers/notifications_controller_spec.rb @@ -5,8 +5,6 @@ require 'spec_helper' describe NotificationsController do - - before do @user = alice @aspect = @user.aspects.first @@ -57,4 +55,4 @@ describe NotificationsController do assigns[:notifications].count.should == 1 end end -end +end \ No newline at end of file diff --git a/spec/controllers/people_controller_spec.rb b/spec/controllers/people_controller_spec.rb index 046094236..31c53c3c5 100644 --- a/spec/controllers/people_controller_spec.rb +++ b/spec/controllers/people_controller_spec.rb @@ -5,8 +5,6 @@ require 'spec_helper' describe PeopleController do - render_views - before do @user = alice @aspect = @user.aspects.first @@ -25,14 +23,17 @@ describe PeopleController do get :index, :q => "Korth", :format => 'json' response.body.should == [@korth].to_json end + it 'does not set @hashes in a json request' do get :index, :q => "Korth", :format => 'json' assigns[:hashes].should be_nil end + it 'sets @hashes in an html request' do get :index, :q => "Korth" assigns[:hashes].should_not be_nil end + it "assigns people" do eugene2 = Factory.create(:person, :profile => Factory.build(:profile, :first_name => "Eugene", @@ -144,6 +145,7 @@ describe PeopleController do sign_out :user @person = bob.person end + it "succeeds" do get :show, :id => @person.id response.status.should == 200 @@ -183,6 +185,7 @@ describe PeopleController do response.status.should == 404 end end + context "when the person is a contact of the current user" do before do @person = bob.person @@ -249,6 +252,7 @@ describe PeopleController do end end end + describe '#contacts' do it 'assigns the contacts of a person' do contact = alice.contact_for(bob.person) @@ -264,4 +268,4 @@ describe PeopleController do get :retrieve_remote, :diaspora_handle => @user.diaspora_handle end end -end +end \ No newline at end of file diff --git a/spec/controllers/photos_controller_spec.rb b/spec/controllers/photos_controller_spec.rb index ce02d64a0..e4069da85 100644 --- a/spec/controllers/photos_controller_spec.rb +++ b/spec/controllers/photos_controller_spec.rb @@ -5,8 +5,6 @@ require 'spec_helper' describe PhotosController do - render_views - before do @alices_photo = alice.post(:photo, :user_file => uploaded_photo, :to => alice.aspects.first.id) @bobs_photo = bob.post(:photo, :user_file => uploaded_photo, :to => bob.aspects.first.id, :public => true) @@ -55,51 +53,62 @@ describe PhotosController do before do get :show, :id => @alices_photo.id end + it "succeeds" do response.should be_success end + it "assigns the photo" do assigns[:photo].should == @alices_photo assigns[:ownership].should be_true end end + context "private photo user can see" do before do get :show, :id => @bobs_photo.id end + it "succeeds" do response.should be_success end + it "assigns the photo" do assigns[:photo].should == @bobs_photo assigns[:ownership].should be_false end end + context "private photo user cannot see" do before do user3 = Factory(:user_with_aspect) @photo = user3.post(:photo, :user_file => uploaded_photo, :to => user3.aspects.first.id) end + it "redirects to the referrer" do request.env["HTTP_REFERER"] = "http://google.com" get :show, :id => @photo.to_param response.should redirect_to("http://google.com") end + it "redirects to the aspects page if there's no referrer" do request.env.delete("HTTP_REFERER") get :show, :id => @photo.to_param response.should redirect_to(aspects_path) end end + context "public photo" do before do user3 = Factory(:user_with_aspect) @photo = user3.post(:photo, :user_file => uploaded_photo, :to => user3.aspects.first.id, :public => true) get :show, :id => @photo.to_param end + it "succeeds" do response.should be_success end + it "assigns the photo" do assigns[:photo].should == @photo assigns[:ownership].should be_false @@ -164,7 +173,6 @@ describe PhotosController do end describe "#make_profile_photo" do - it 'should return a 201 on a js success' do get :make_profile_photo, :photo_id => @alices_photo.id, :format => 'js' response.code.should == "201" @@ -174,7 +182,5 @@ describe PhotosController do get :make_profile_photo, :photo_id => @bobs_photo.id response.code.should == "422" end - end - -end +end \ No newline at end of file diff --git a/spec/controllers/post_visibilities_controller_spec.rb b/spec/controllers/post_visibilities_controller_spec.rb index 4c5e5f0e0..59cc8f99b 100644 --- a/spec/controllers/post_visibilities_controller_spec.rb +++ b/spec/controllers/post_visibilities_controller_spec.rb @@ -5,8 +5,6 @@ require 'spec_helper' describe PostVisibilitiesController do - render_views - before do @user1 = alice @bob = bob @@ -16,7 +14,6 @@ describe PostVisibilitiesController do a2.contacts << bob.contact_for(alice.person) a2.save - @status = bob.post(:status_message, :text => "hello", :public => true, :to => a2) @vis = @status.post_visibilities.first @vis.reload.hidden.should == false @@ -47,15 +44,17 @@ describe PostVisibilitiesController do user2 = eve sign_in :user, user2 end + it 'does not let a user destroy a visibility that is not theirs' do lambda { put :update, :format => :js, :id => 42, :post_id => @status.id }.should_not change(@vis.reload, :hidden).to(true) end - it 'does not succceed' do + + it 'does not succeed' do put :update, :format => :js, :id => 42, :post_id => @status.id response.should_not be_success end end end -end +end \ No newline at end of file diff --git a/spec/controllers/posts_controller_spec.rb b/spec/controllers/posts_controller_spec.rb index 4479070a1..d1fb833de 100644 --- a/spec/controllers/posts_controller_spec.rb +++ b/spec/controllers/posts_controller_spec.rb @@ -5,11 +5,10 @@ require 'spec_helper' describe PostsController do - render_views - before do @user = alice end + describe '#show' do it 'shows a public post' do status = @user.post(:status_message, :text => "hello", :public => true, :to => 'all') diff --git a/spec/controllers/profiles_controller_spec.rb b/spec/controllers/profiles_controller_spec.rb index 21307a615..21340e95d 100644 --- a/spec/controllers/profiles_controller_spec.rb +++ b/spec/controllers/profiles_controller_spec.rb @@ -2,11 +2,9 @@ # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. - require 'spec_helper' describe ProfilesController do - render_views before do @user = eve sign_in :user, @user @@ -63,6 +61,7 @@ describe ProfilesController do @user.person.profile.image_url = "http://tom.joindiaspora.com/images/user/tom.jpg" @user.person.profile.save end + it "doesn't overwrite the profile photo when an empty string is passed in" do image_url = @user.person.profile.image_url put :update, @params @@ -77,6 +76,7 @@ describe ProfilesController do @profile_params = {:profile =>{ :person_id => new_person.id, :diaspora_handle => 'abc@a.com'}} end + it 'person_id' do person = @user.person profile = person.profile @@ -90,4 +90,4 @@ describe ProfilesController do end end end -end +end \ No newline at end of file diff --git a/spec/controllers/publics_controller_spec.rb b/spec/controllers/publics_controller_spec.rb index 01c958e83..53aae6331 100644 --- a/spec/controllers/publics_controller_spec.rb +++ b/spec/controllers/publics_controller_spec.rb @@ -5,7 +5,6 @@ require 'spec_helper' describe PublicsController do - render_views let(:fixture_path) { File.join(Rails.root, 'spec', 'fixtures')} before do @user = alice @@ -20,6 +19,7 @@ describe PublicsController do save_fixture(response.body, "host-meta", fixture_path) end end + describe '#receive' do let(:xml) { "" } @@ -111,4 +111,4 @@ describe PublicsController do response.should be_success end end -end +end \ No newline at end of file diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb index b7a436050..99256d3b1 100644 --- a/spec/controllers/registrations_controller_spec.rb +++ b/spec/controllers/registrations_controller_spec.rb @@ -7,8 +7,6 @@ require 'spec_helper' describe RegistrationsController do include Devise::TestHelpers - render_views - before do request.env["devise.mapping"] = Devise.mappings[:user] @valid_params = {:user => { @@ -24,14 +22,17 @@ describe RegistrationsController do before do AppConfig[:registrations_closed] = true end + after do AppConfig[:registrations_closed] = false end + it 'redirects #new to the login page' do get :new flash[:error].should == I18n.t('registrations.closed') response.should redirect_to new_user_session_path end + it 'redirects #create to the login page' do post :create, @valid_params flash[:error].should == I18n.t('registrations.closed') @@ -45,47 +46,57 @@ describe RegistrationsController do user = Factory.build(:user) User.stub!(:build).and_return(user) end + it "creates a user" do lambda { get :create, @valid_params }.should change(User, :count).by(1) end + it "assigns @user" do get :create, @valid_params assigns(:user).should be_true end + it "sets the flash" do get :create, @valid_params flash[:notice].should_not be_empty end + it "redirects to the root path" do get :create, @valid_params response.should redirect_to root_path end end + context "with invalid parameters" do before do @invalid_params = @valid_params @invalid_params[:user][:password_confirmation] = "baddword" end + it "does not create a user" do lambda { get :create, @invalid_params }.should_not change(User, :count) end + it "does not create a person" do lambda { get :create, @invalid_params }.should_not change(Person, :count) end + it "assigns @user" do get :create, @invalid_params assigns(:user).should_not be_nil end + it "sets the flash error" do get :create, @invalid_params flash[:error].should_not be_blank end + it "re-renders the form" do get :create, @invalid_params response.should render_template("registrations/new") end end end -end +end \ No newline at end of file diff --git a/spec/controllers/requests_controller_spec.rb b/spec/controllers/requests_controller_spec.rb index 81c706860..078992987 100644 --- a/spec/controllers/requests_controller_spec.rb +++ b/spec/controllers/requests_controller_spec.rb @@ -5,7 +5,6 @@ require 'spec_helper' describe RequestsController do - render_views before do @user = alice @other_user = eve @@ -20,6 +19,7 @@ describe RequestsController do @other_user.send_contact_request_to(@user.person, @other_user.aspects.first) @friend_request = Request.where(:recipient_id => @user.person.id).first end + describe 'when accepting a contact request' do it "succeeds" do xhr :delete, :destroy, @@ -28,6 +28,7 @@ describe RequestsController do :id => @friend_request.id.to_s response.should redirect_to(requests_path) end + it "marks the notification as read" do notification = Notification.where(:recipient_id => @user.id, :target_id=> @friend_request.id).first notification.unread = true @@ -39,12 +40,14 @@ describe RequestsController do notification.reload.unread.should == false end end + describe 'when ignoring a contact request' do it "succeeds" do xhr :delete, :destroy, :id => @friend_request.id.to_s response.should be_success end + it "removes the request object" do lambda { xhr :delete, :destroy, @@ -71,6 +74,7 @@ describe RequestsController do :into => @user.aspects[0].id }} end + it 'creates a contact' do @user.contact_for(@other_user).should be_nil lambda { @@ -80,12 +84,14 @@ describe RequestsController do new_contact.should_not be_nil new_contact.should be_pending end + it 'does not persist a Request' do lambda { post :create, @params }.should_not change(Request, :count) end end + it 'autoaccepts and when sending a request to someone who sent me a request' do @other_user.send_contact_request_to(@user.person, @other_user.aspects[0]) @@ -138,4 +144,4 @@ describe RequestsController do response.should redirect_to :back end end -end +end \ No newline at end of file diff --git a/spec/controllers/services_controller_spec.rb b/spec/controllers/services_controller_spec.rb index 1c50558b6..7f051b93e 100644 --- a/spec/controllers/services_controller_spec.rb +++ b/spec/controllers/services_controller_spec.rb @@ -5,7 +5,6 @@ require 'spec_helper' describe ServicesController do - render_views let(:mock_access_token) { Object.new } let(:omniauth_auth) { @@ -60,7 +59,6 @@ describe ServicesController do response.should redirect_to services_url end - it 'creates a twitter service' do Service.delete_all @user.getting_started = false @@ -74,6 +72,7 @@ describe ServicesController do before do @service1 = Factory.create(:service, :user => @user) end + it 'destroys a service selected by id' do lambda{ delete :destroy, :id => @service1.id @@ -97,6 +96,7 @@ describe ServicesController do get :finder, :provider => @service1.provider response.should be_success end + it 'has no translations missing' do get :finder, :provider => @service1.provider response.body.match(/translation/).should be_nil @@ -104,7 +104,6 @@ describe ServicesController do end describe '#invite' do - before do @uid = "abc" @invite_params = {:provider => 'facebook', :uid => @uid, :aspect_id => @user.aspects.first.id} @@ -140,5 +139,4 @@ describe ServicesController do }.should_not change(Invitation, :count) end end -end - +end \ No newline at end of file diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb index cdd4ac02f..2b8467482 100644 --- a/spec/controllers/sessions_controller_spec.rb +++ b/spec/controllers/sessions_controller_spec.rb @@ -12,8 +12,6 @@ end describe SessionsController do include Devise::TestHelpers - - render_views let(:mock_access_token) { Object.new } @@ -34,4 +32,4 @@ describe SessionsController do "password"=>"evankorth"}} end end -end +end \ No newline at end of file diff --git a/spec/controllers/sockets_controller_spec.rb b/spec/controllers/sockets_controller_spec.rb index 85246dcb6..bae64a438 100644 --- a/spec/controllers/sockets_controller_spec.rb +++ b/spec/controllers/sockets_controller_spec.rb @@ -11,7 +11,6 @@ SocketsController.class_eval <<-EOT EOT describe SocketsController do - render_views before do @user = alice @controller = SocketsController.new @@ -33,6 +32,7 @@ describe SocketsController do json.include?("html\":null").should be_true end end + describe '#outgoing' do it 'calls queue_to_user' do Diaspora::WebSocket.should_receive(:is_connected?).with(@user.id).and_return(true) @@ -45,10 +45,11 @@ describe SocketsController do Diaspora::WebSocket.should_not_receive(:queue_to_user) @controller.outgoing(@user.id, @message) end + it 'takes a user or an id' do Diaspora::WebSocket.should_receive(:is_connected?).with(@user.id).and_return(false) Diaspora::WebSocket.should_not_receive(:queue_to_user) @controller.outgoing(@user, @message) end end -end +end \ No newline at end of file diff --git a/spec/controllers/status_messages_controller_spec.rb b/spec/controllers/status_messages_controller_spec.rb index 66642fb98..e39c38ce2 100644 --- a/spec/controllers/status_messages_controller_spec.rb +++ b/spec/controllers/status_messages_controller_spec.rb @@ -5,8 +5,6 @@ require 'spec_helper' describe StatusMessagesController do - render_views - before do @aspect1 = alice.aspects.first @aspect2 = bob.aspects.first @@ -31,14 +29,14 @@ describe StatusMessagesController do response.should be_success end - it 'generates a jasmine fixture' do - contact = alice.contact_for(bob.person) - aspect = alice.aspects.create(:name => 'people') - contact.aspects << aspect - contact.save - get :new, :person_id => bob.person.id, :layout => true - save_fixture(html_for("body"), "status_message_new") - end + it 'generates a jasmine fixture' do + contact = alice.contact_for(bob.person) + aspect = alice.aspects.create(:name => 'people') + contact.aspects << aspect + contact.save + get :new, :person_id => bob.person.id, :layout => true + save_fixture(html_for("body"), "status_message_new") + end end describe '#show' do @@ -65,7 +63,6 @@ describe StatusMessagesController do }.should change(note, :unread).from(true).to(false) end - it 'redirects to back if there is no status message' do get :show, :id => 2345 response.status.should == 302 @@ -80,17 +77,20 @@ describe StatusMessagesController do }, :aspect_ids => [@aspect1.id.to_s] } } + context 'js requests' do it 'responds' do post :create, status_message_hash.merge(:format => 'js') response.status.should == 201 end + it 'responds with json' do post :create, status_message_hash.merge(:format => 'js') json = JSON.parse(response.body) json['post_id'].should_not be_nil json['html'].should_not be_nil end + it 'escapes XSS' do xss = "" post :create, status_message_hash.merge(:format => 'js', :text => xss) @@ -128,12 +128,12 @@ describe StatusMessagesController do } post :create, status_message_hash end + it 'sends the errors in the body on js' do post :create, status_message_hash.merge!(:format => 'js', :status_message => {:text => ''}) response.body.should include('Status message requires a message or at least one photo') end - context 'with photos' do before do fixture_filename = 'button.png' diff --git a/spec/controllers/tags_controller_spec.rb b/spec/controllers/tags_controller_spec.rb index 8af83537b..1ccfe0cd3 100644 --- a/spec/controllers/tags_controller_spec.rb +++ b/spec/controllers/tags_controller_spec.rb @@ -5,8 +5,6 @@ require 'spec_helper' describe TagsController do - render_views - describe '#index (search)' do before do sign_in :user, alice @@ -26,10 +24,12 @@ describe TagsController do get :index, :q => "c", :format => 'json' response.body.should_not include("#cats") end + it 'redirects the aimless to excellent parties' do get :index response.should redirect_to tag_path('partytimeexcellent') end + it 'does not allow json requestors to party' do get :index, :format => :json response.status.should == 422 @@ -37,24 +37,25 @@ describe TagsController do end describe '#show' do - - context 'signed in' do before do sign_in :user, alice end + it 'displays your own post' do my_post = alice.post(:status_message, :text => "#what", :to => 'all') get :show, :name => 'what' assigns(:posts).models.should == [my_post] response.status.should == 200 end + it "displays a friend's post" do other_post = bob.post(:status_message, :text => "#hello", :to => 'all') get :show, :name => 'hello' assigns(:posts).models.should == [other_post] response.status.should == 200 end + it 'displays a public post' do other_post = eve.post(:status_message, :text => "#hello", :public => true, :to => 'all') get :show, :name => 'hello' @@ -71,26 +72,32 @@ describe TagsController do alice.profile.save! get :show, :name => "whatevs" end + it "succeeds" do response.should be_success end + it "assigns the right set of people" do assigns(:people).should == [alice.person] end end + context "when there are posts to display" do before do @post = alice.post(:status_message, :text => "#what", :public => true, :to => 'all') alice.post(:status_message, :text => "#hello", :public => true, :to => 'all') end + it "succeeds" do get :show, :name => 'what' response.should be_success end + it "assigns the right set of posts" do get :show, :name => 'what' assigns[:posts].models.should == [@post] end + it 'succeeds with comments' do alice.comment('what WHAT!', :on => @post) get :show, :name => 'what' @@ -99,4 +106,4 @@ describe TagsController do end end end -end +end \ No newline at end of file diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index 0b2ec3156..eb8a90758 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -5,8 +5,6 @@ require 'spec_helper' describe UsersController do - render_views - before do @user = alice @aspect = @user.aspects.first @@ -48,6 +46,7 @@ describe UsersController do :user => { :diaspora_handle => "notreal@stuff.com" } } end + it "doesn't overwrite random attributes" do lambda { put :update, @params @@ -123,7 +122,6 @@ describe UsersController do proc{ put :update, par }.should change(@user.user_preferences, :count).by(-1) - end end end @@ -140,4 +138,4 @@ describe UsersController do assigns[:email_prefs]['mentioned'].should be_false end end -end +end \ No newline at end of file diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7d093669d..a617782e2 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -40,6 +40,10 @@ RSpec.configure do |config| $process_queue = false end + + config.before(:each, :type => :controller) do + self.class.render_views + end end disable_typhoeus From 535954dcc2e5dce23d0f6aebc9e64d3adf59af8a Mon Sep 17 00:00:00 2001 From: Dan Hansen Date: Sat, 7 May 2011 07:28:52 -0500 Subject: [PATCH 17/61] make incrementing the notification count optional --- public/javascripts/web-socket-receiver.js | 5 +++-- public/javascripts/widgets/notifications.js | 7 +++++-- spec/javascripts/widgets/notifications-spec.js | 12 ++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/public/javascripts/web-socket-receiver.js b/public/javascripts/web-socket-receiver.js index c0bfdc578..505afadfb 100644 --- a/public/javascripts/web-socket-receiver.js +++ b/public/javascripts/web-socket-receiver.js @@ -8,8 +8,9 @@ var WebSocketReceiver = { ws.onclose = function() { Diaspora.widgets.notifications.showNotification({ html: '
    ' + - Diaspora.widgets.i18n.t("web_sockets.disconnected") + - '
    ' + Diaspora.widgets.i18n.t("web_sockets.disconnected") + + '', + incrementCount: false }); WSR.debug("socket closed"); diff --git a/public/javascripts/widgets/notifications.js b/public/javascripts/widgets/notifications.js index 0091720e3..70bf9136b 100644 --- a/public/javascripts/widgets/notifications.js +++ b/public/javascripts/widgets/notifications.js @@ -32,14 +32,17 @@ }; }; - Notifications.prototype.showNotification = function(notification) { $(notification.html).prependTo(this.notificationArea) + Notifications.prototype.showNotification = function(notification) { + $(notification.html).prependTo(this.notificationArea) .fadeIn(200) .delay(8000) .fadeOut(200, function() { $(this).detach(); }); - this.incrementCount(); + if(typeof notification.incrementCount === "undefined" || notification.incrementCount) { + this.incrementCount(); + } }; Notifications.prototype.changeNotificationCount = function(change) { diff --git a/spec/javascripts/widgets/notifications-spec.js b/spec/javascripts/widgets/notifications-spec.js index aeedf1d57..c68854205 100644 --- a/spec/javascripts/widgets/notifications-spec.js +++ b/spec/javascripts/widgets/notifications-spec.js @@ -50,6 +50,18 @@ describe("Diaspora", function() { expect($("#notifications div").length).toEqual(1); }); + + it("only increments the notification count if specified to do so", function() { + var originalCount = Diaspora.widgets.notifications.count; + + Diaspora.widgets.notifications.showNotification({ + html: '
    ', + incrementCount: false + }); + + expect(Diaspora.widgets.notifications.count).toEqual(originalCount); + + }); }); }); }); From 0e23434542ea09f97f1e3d7ce833f038e1d7591b Mon Sep 17 00:00:00 2001 From: Jordi Mallach Date: Sat, 7 May 2011 15:20:35 +0200 Subject: [PATCH 18/61] Updated Catalan translation to 2c4954b. --- config/locales/diaspora/ca.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/config/locales/diaspora/ca.yml b/config/locales/diaspora/ca.yml index 36e3b4080..1fb1d3149 100644 --- a/config/locales/diaspora/ca.yml +++ b/config/locales/diaspora/ca.yml @@ -75,6 +75,7 @@ ca: unknown_person: "persona desconeguda" video_title: unknown: "Títol del vídeo desconegut" + diaspora_alpha: "DIÀSPORA* ALFA" aspects: @@ -300,11 +301,11 @@ ca: new_request: "s'ha oferit a compartir amb vosaltres." private_message: "us ha enviat un missatge." comment_on_post: "ha comentat la vostra" - also_commented: "also commented on your contact's" - mentioned: "us ha mencionat a una publicació" - post: "publicació" + also_commented: "also commented on %{post_author}'s" + mentioned: "us ha mencionat a una " + post: "publicació." deleted: "suprimida" - also_commented_deleted: "ha comentat una publicació suprimida" + also_commented_deleted: "ha comentat una publicació suprimida." index: notifications: "Notificacions" mark_all_as_read: "Marca-les totes com a llegides" From a67b32d0475bbbfa75377519129ec67c14254700 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Sat, 7 May 2011 13:54:55 -0400 Subject: [PATCH 19/61] Add tag to rspec specs that generate jasmine fixtures --- spec/controllers/aspects_controller_spec.rb | 12 ++++++------ spec/controllers/publics_controller_spec.rb | 8 ++++---- spec/controllers/status_messages_controller_spec.rb | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/spec/controllers/aspects_controller_spec.rb b/spec/controllers/aspects_controller_spec.rb index a3ad7a830..3b4577076 100644 --- a/spec/controllers/aspects_controller_spec.rb +++ b/spec/controllers/aspects_controller_spec.rb @@ -48,24 +48,24 @@ describe AspectsController do end describe "#index" do - it "generates a jasmine fixture" do + it "generates a jasmine fixture", :fixture => 'jasmine' do get :index save_fixture(html_for("body"), "aspects_index") end - it "generates a jasmine fixture with a prefill" do + it "generates a jasmine fixture with a prefill", :fixture => 'jasmine' do get :index, :prefill => "reshare things" save_fixture(html_for("body"), "aspects_index_prefill") end - it 'generates a jasmine fixture with services' do + it 'generates a jasmine fixture with services', :fixture => 'jasmine' do @alice.services << Services::Facebook.create(:user_id => @alice.id) @alice.services << Services::Twitter.create(:user_id => @alice.id) get :index, :prefill => "reshare things" save_fixture(html_for("body"), "aspects_index_services") end - it 'generates a jasmine fixture with posts' do + it 'generates a jasmine fixture with posts', :fixture => 'jasmine' do @alice.post(:status_message, :text => "hello", :to => @alices_aspect_2.id) get :index save_fixture(html_for("body"), "aspects_index_with_posts") @@ -302,7 +302,7 @@ describe AspectsController do assigns(:remote_requests).count.should == 1 end - it "generates a jasmine fixture" do + it "generates a jasmine fixture", :fixture => 'jasmine' do get :manage save_fixture(html_for("body"), "aspects_manage") end @@ -380,4 +380,4 @@ describe AspectsController do @alices_aspect_1.reload.contacts_visible.should be_false end end -end \ No newline at end of file +end diff --git a/spec/controllers/publics_controller_spec.rb b/spec/controllers/publics_controller_spec.rb index 53aae6331..004fa2982 100644 --- a/spec/controllers/publics_controller_spec.rb +++ b/spec/controllers/publics_controller_spec.rb @@ -12,7 +12,7 @@ describe PublicsController do end describe '#host_meta' do - it 'succeeds' do + it 'succeeds', :fixture => :rspec do get :host_meta response.should be_success response.body.should =~ /webfinger/ @@ -62,7 +62,7 @@ describe PublicsController do end describe '#hcard' do - it "succeeds" do + it "succeeds", :fixture => :rspec do post :hcard, "guid" => @user.person.guid.to_s response.should be_success save_fixture(response.body, "hcard", fixture_path) @@ -81,7 +81,7 @@ describe PublicsController do end describe '#webfinger' do - it "succeeds when the person and user exist locally" do + it "succeeds when the person and user exist locally", :fixture => :rspec do post :webfinger, 'q' => @user.person.diaspora_handle response.should be_success save_fixture(response.body, "webfinger", fixture_path) @@ -111,4 +111,4 @@ describe PublicsController do response.should be_success end end -end \ No newline at end of file +end diff --git a/spec/controllers/status_messages_controller_spec.rb b/spec/controllers/status_messages_controller_spec.rb index e39c38ce2..ceaafc437 100644 --- a/spec/controllers/status_messages_controller_spec.rb +++ b/spec/controllers/status_messages_controller_spec.rb @@ -29,7 +29,7 @@ describe StatusMessagesController do response.should be_success end - it 'generates a jasmine fixture' do + it 'generates a jasmine fixture', :fixture => 'jasmine' do contact = alice.contact_for(bob.person) aspect = alice.aspects.create(:name => 'people') contact.aspects << aspect From 8edb6ad649148761a92d23aa9ffaca516d9d3446 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Sat, 7 May 2011 16:29:50 -0400 Subject: [PATCH 20/61] Take double memoization out of aspects controller spec --- spec/controllers/aspects_controller_spec.rb | 87 ++++++++++----------- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/spec/controllers/aspects_controller_spec.rb b/spec/controllers/aspects_controller_spec.rb index 3b4577076..9923d99e8 100644 --- a/spec/controllers/aspects_controller_spec.rb +++ b/spec/controllers/aspects_controller_spec.rb @@ -7,15 +7,13 @@ require File.join(Rails.root, "spec", "shared_behaviors", "log_override") describe AspectsController do before do - @bob = bob - @alice = alice - @alice.getting_started = false - @alice.save - sign_in :user, @alice - @alices_aspect_1 = @alice.aspects.first - @alices_aspect_2 = @alice.aspects.create(:name => "another aspect") + alice.getting_started = false + alice.save + sign_in :user, alice + @alices_aspect_1 = alice.aspects.first + @alices_aspect_2 = alice.aspects.create(:name => "another aspect") - @controller.stub(:current_user).and_return(@alice) + @controller.stub(:current_user).and_return(alice) request.env["HTTP_REFERER"] = 'http://' + request.host end @@ -59,22 +57,23 @@ describe AspectsController do end it 'generates a jasmine fixture with services', :fixture => 'jasmine' do - @alice.services << Services::Facebook.create(:user_id => @alice.id) - @alice.services << Services::Twitter.create(:user_id => @alice.id) + alice.services << Services::Facebook.create(:user_id => alice.id) + alice.services << Services::Twitter.create(:user_id => alice.id) get :index, :prefill => "reshare things" save_fixture(html_for("body"), "aspects_index_services") end it 'generates a jasmine fixture with posts', :fixture => 'jasmine' do - @alice.post(:status_message, :text => "hello", :to => @alices_aspect_2.id) + message = alice.post(:status_message, :text => "hello", :to => @alices_aspect_2.id) + bob.comment("what", :on => message) get :index save_fixture(html_for("body"), "aspects_index_with_posts") end context 'with getting_started = true' do before do - @alice.getting_started = true - @alice.save + alice.getting_started = true + alice.save end it 'redirects to getting_started' do get :index @@ -96,19 +95,19 @@ describe AspectsController do 2.times do |n| user = Factory(:user) aspect = user.aspects.create(:name => 'people') - connect_users(@alice, @alices_aspect_1, user, aspect) + connect_users(alice, @alices_aspect_1, user, aspect) target_aspect = n.even? ? @alices_aspect_1 : @alices_aspect_2 - post = @alice.post(:status_message, :text=> "hello#{n}", :to => target_aspect) + post = alice.post(:status_message, :text=> "hello#{n}", :to => target_aspect) post.created_at = Time.now - (2 - n).seconds post.save! @posts << post end - @alice.build_comment('lalala', :on => @posts.first ).save + alice.build_comment('lalala', :on => @posts.first ).save end describe "post visibilities" do before do - @status = @bob.post(:status_message, :text=> "hello", :to => @bob.aspects.first) + @status = bob.post(:status_message, :text=> "hello", :to => bob.aspects.first) @vis = @status.post_visibilities.first end @@ -161,7 +160,7 @@ describe AspectsController do end it "returns all posts by default" do - @alice.aspects.reload + alice.aspects.reload get :index assigns(:posts).models.length.should == 2 end @@ -183,8 +182,8 @@ describe AspectsController do 8.times do |n| user = Factory.create(:user) aspect = user.aspects.create(:name => 'people') - connect_users(@alice, @alices_aspect_1, user, aspect) - post = @alice.post(:status_message, :text => "hello#{n}", :to => @alices_aspect_2.id) + connect_users(alice, @alices_aspect_1, user, aspect) + post = alice.post(:status_message, :text => "hello#{n}", :to => @alices_aspect_2.id) 8.times do |n| user.comment "yo#{post.text}", :on => post end @@ -212,9 +211,9 @@ describe AspectsController do describe "#create" do context "with valid params" do it "creates an aspect" do - @alice.aspects.count.should == 2 + alice.aspects.count.should == 2 post :create, "aspect" => {"name" => "new aspect"} - @alice.reload.aspects.count.should == 3 + alice.reload.aspects.count.should == 3 end it "redirects to the aspect page" do post :create, "aspect" => {"name" => "new aspect"} @@ -223,9 +222,9 @@ describe AspectsController do end context "with invalid params" do it "does not create an aspect" do - @alice.aspects.count.should == 2 + alice.aspects.count.should == 2 post :create, "aspect" => {"name" => ""} - @alice.reload.aspects.count.should == 2 + alice.reload.aspects.count.should == 2 end it "goes back to the page you came from" do post :create, "aspect" => {"name" => ""} @@ -243,10 +242,10 @@ describe AspectsController do it "performs reasonably", :performance => true do require 'benchmark' 8.times do |n| - aspect = @alice.aspects.create(:name => "aspect#{n}") + aspect = alice.aspects.create(:name => "aspect#{n}") 8.times do |o| person = Factory(:person) - @alice.activate_contact(person, aspect) + alice.activate_contact(person, aspect) end end Benchmark.realtime{ @@ -265,10 +264,10 @@ describe AspectsController do end it "assigns contacts to only non-pending" do - contact = @alice.contact_for(bob.person) - Contact.unscoped.where(:user_id => @alice.id).count.should == 1 - @alice.send_contact_request_to(Factory(:user).person, @alices_aspect_1) - Contact.unscoped.where(:user_id => @alice.id).count.should == 2 + contact = alice.contact_for(bob.person) + Contact.unscoped.where(:user_id => alice.id).count.should == 1 + alice.send_contact_request_to(Factory(:user).person, @alices_aspect_1) + Contact.unscoped.where(:user_id => alice.id).count.should == 2 get :manage contacts = assigns(:contacts) @@ -280,11 +279,11 @@ describe AspectsController do before do requestor = Factory.create(:user) requestor_aspect = requestor.aspects.create(:name => "Meh") - requestor.send_contact_request_to(@alice.person, requestor_aspect) + requestor.send_contact_request_to(alice.person, requestor_aspect) requestor.reload requestor_aspect.reload - @alice.reload + alice.reload end it "succeeds" do @@ -311,7 +310,7 @@ describe AspectsController do describe "#update" do before do - @alices_aspect_1 = @alice.aspects.create(:name => "Bruisers") + @alices_aspect_1 = alice.aspects.create(:name => "Bruisers") end it "doesn't overwrite random attributes" do @@ -319,17 +318,15 @@ describe AspectsController do params = {"name" => "Bruisers"} params[:user_id] = new_user.id put('update', :id => @alices_aspect_1.id, "aspect" => params) - Aspect.find(@alices_aspect_1.id).user_id.should == @alice.id + Aspect.find(@alices_aspect_1.id).user_id.should == alice.id end end describe '#edit' do before do - @bob = bob - @eve = eve - @eve.profile.first_name = nil - @eve.profile.save - @eve.save + eve.profile.first_name = nil + eve.profile.save + eve.save @zed = Factory(:user_with_aspect, :username => "zed") @zed.profile.first_name = "zed" @@ -340,9 +337,9 @@ describe AspectsController do @katz.profile.save @katz.save - connect_users(@alice, @alices_aspect_2, @eve, @eve.aspects.first) - connect_users(@alice, @alices_aspect_2, @zed, @zed.aspects.first) - connect_users(@alice, @alices_aspect_1, @katz, @katz.aspects.first) + connect_users(alice, @alices_aspect_2, eve, eve.aspects.first) + connect_users(alice, @alices_aspect_2, @zed, @zed.aspects.first) + connect_users(alice, @alices_aspect_1, @katz, @katz.aspects.first) end it 'renders' do @@ -352,14 +349,14 @@ describe AspectsController do it 'assigns the contacts in alphabetical order with people in aspects first' do get :edit, :id => @alices_aspect_2.id - assigns[:contacts].map(&:id).should == [@alice.contact_for(@eve.person), @alice.contact_for(@zed.person), @alice.contact_for(@bob.person), @alice.contact_for(@katz.person)].map(&:id) + assigns[:contacts].map(&:id).should == [alice.contact_for(eve.person), alice.contact_for(@zed.person), alice.contact_for(bob.person), alice.contact_for(@katz.person)].map(&:id) end it 'assigns all the contacts if noone is there' do - alices_aspect_3 = @alice.aspects.create(:name => "aspect 3") + alices_aspect_3 = alice.aspects.create(:name => "aspect 3") get :edit, :id => alices_aspect_3.id - assigns[:contacts].map(&:id).should == [@alice.contact_for(@bob.person), @alice.contact_for(@eve.person), @alice.contact_for(@katz.person), @alice.contact_for(@zed.person)].map(&:id) + assigns[:contacts].map(&:id).should == [alice.contact_for(bob.person), alice.contact_for(eve.person), alice.contact_for(@katz.person), alice.contact_for(@zed.person)].map(&:id) end end From 3a29bef99f08c2c902cb06c10af663a8e7398412 Mon Sep 17 00:00:00 2001 From: Dennis Schubert Date: Sat, 7 May 2011 23:36:10 +0200 Subject: [PATCH 21/61] This should fix any 500 at notifications-page. Thanks @MrZYX an Chandler --- ...20110507212759_remove_type_null_notifications.rb | 13 +++++++++++++ db/schema.rb | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20110507212759_remove_type_null_notifications.rb diff --git a/db/migrate/20110507212759_remove_type_null_notifications.rb b/db/migrate/20110507212759_remove_type_null_notifications.rb new file mode 100644 index 000000000..e2e023f9f --- /dev/null +++ b/db/migrate/20110507212759_remove_type_null_notifications.rb @@ -0,0 +1,13 @@ +class RemoveTypeNullNotifications < ActiveRecord::Migration + def self.up + execute < 20110421120744) do +ActiveRecord::Schema.define(:version => 20110507212759) do create_table "aspect_memberships", :force => true do |t| t.integer "aspect_id", :null => false From 92089f97e97a2c3b61e0925d8f4b3da401cfb488 Mon Sep 17 00:00:00 2001 From: MrZYX Date: Sun, 8 May 2011 01:00:09 +0200 Subject: [PATCH 22/61] updated locales --- config/locales/devise/devise.ar.yml | 126 +-- config/locales/devise/devise.fi.yml | 2 +- config/locales/diaspora/ar.yml | 858 ++++++++++---------- config/locales/diaspora/eu.yml | 8 +- config/locales/diaspora/fi.yml | 28 +- config/locales/diaspora/ja.yml | 2 +- config/locales/javascript/javascript.eu.yml | 2 +- 7 files changed, 513 insertions(+), 513 deletions(-) diff --git a/config/locales/devise/devise.ar.yml b/config/locales/devise/devise.ar.yml index e7d70d31a..3ed0a31a7 100644 --- a/config/locales/devise/devise.ar.yml +++ b/config/locales/devise/devise.ar.yml @@ -6,92 +6,92 @@ ar: devise: confirmations: - confirmed: ".وأكد حسابك بنجاح. وقعت الآن دخولك" + confirmed: "تم تأكيد حسابك، وتسجيل دخولك" new: - resend_confirmation: "Resend confirmation instructions" - send_instructions: ".سوف تتلقى رسالة بريد إلكتروني مع تعليمات حول كيفية تأكيد الحساب الخاص بك في بضع دقائق" + resend_confirmation: "إعادة إرسال لتعليمات التأكيد" + send_instructions: "ستصلك في بضع دقائق دقائق رسالة إلكترونية تحوي تعليمات تأكيد الحساب الخاص بك" failure: - inactive: ".ولم يتم تفعيل حسابك بعد" - invalid: ".بريد إلكتروني غير صالح أو كلمة المرور" - invalid_token: ".المصادقة غير صالح الرمز المميز" - locked: ".مؤمن حسابك" - timeout: ".انتهت الدورة الخاصة بك ، الرجاء تسجيل الدخول مرة أخرى للمتابعة" - unauthenticated: ".تحتاج إلى تسجيل الدخول أو قم بالتسجيل قبل الشروع في الاستمرار" - unconfirmed: ".لديك لتأكيد الحساب الخاص بك قبل المتابعة" + inactive: ".لم يتم تفعيل حسابك بعد" + invalid: ".المعرف غير صالح أو كلمة المرور غير صحيحة" + invalid_token: ".مفتاح المصادقة غير صالح" + locked: ".تم وصد حسابك" + timeout: ".انقضت مدة جلستك، الرجاء تسجيل الدخول من جديد للمتابعة" + unauthenticated: ".يجب عليك تسجيل الدخول أو التسجيل قبل المتابعة" + unconfirmed: ".يجب عليك تأكيد الحساب الخاص بك قبل المتابعة" invitations: - invitation_token_invalid: "The invitation token provided is not valid!" - send_instructions: "Your invitation has been sent." - updated: "Your password was set successfully. You are now signed in." + invitation_token_invalid: "الدعوة المقدمة غير صالحة" + send_instructions: "تم إرسال دعوتك" + updated: "تم إنشاء كلمة المرور بنجاح، أنت الآن متصل" mailer: confirmation_instructions: - confirm: "Confirm my account" - subject: "Confirmation instructions" - you_can_confirm: "You can confirm your account through the link below:" - hello: "Hello %{email}!" + confirm: "تأكيد حسابي" + subject: "تعليمات التأكيد" + you_can_confirm: "يمكنك تأكيد حسابك عبر الرابط التالي" + hello: "مرحبا %{email}!" invitation: - accept: "Accept invitation" - ignore: "If you don't want to accept the invitation, please ignore this email." - no_account_till: "Your account won't be created until you access the link above and sign up." - subject: "A friend wants you to join Diaspora!" + accept: "قبول الدعوة" + ignore: "إذا كنت لا تريد قبول الدعوة, رجاء تجاهل هذه الرسالة" + no_account_till: "لن يتم إنشاء حسابك حتى تنقر على الرابط أعلاه وتسجل دخولك" + subject: "دعوة من صديق للإنضمام إلى دياسبرا" inviters: - accept_at: ", at %{url}, you can accept it through the link below." - has_invited_you: "%{name} has invited you to join Diaspora" - have_invited_you: "%{names} have invited you to join Diaspora" + accept_at: ", at %{url}, يمكنك قبولها عبر الرابط التالي." + has_invited_you: "%{name} يدعوك للإنضمام إلى دياسبرا" + have_invited_you: "%{names} يدعونك للإنضمام إلى دياسبرا" reset_password_instructions: - change: "Change my password" - ignore: "If you didn't request this, please ignore this email." - someone_requested: "Someone has requested a link to change your password, and you can do this through the link below." - subject: "Reset password instructions" - wont_change: "Your password won't change until you access the link above and create a new one." + change: "تغيير كلمة المرور" + ignore: "إذا لم تكن من طلب هذا، الرجاء تجاهل هذا البريد" + someone_requested: "أحدهم طلب رابطا لتغيير كلمة مرورك, ويمكنك فعل هذا عبر الرابط الآتي" + subject: "تعليمات إعادة إدخال كلمة المرور" + wont_change: "كلمة مرورك لن تتغير قبل أن تنقر الرابط التالي وتدخل كلمة مرور جديدة" unlock_instructions: - account_locked: "لقد تم غلق حسابك وقتيا بسبب الإفراط في محاولات الدخول الفاشلة." - click_to_unlock: "Click the link below to unlock your account:" - subject: "تعليمات إعادت فتح الحساب" - unlock: "إعادت فتح الحساب" - welcome: "Welcome" + account_locked: "لقد تم حظر حسابك ظرفيا بسبب العدد المفرط من محاولات الدخول الفاشلة" + click_to_unlock: "انقر الرابط التالي لإعادة فتح حسابك" + subject: "تعليمات إعادة فتح حسابك" + unlock: "إعادة فتح حسابك" + welcome: "مرحبا %{email} !" passwords: edit: - change_password: "Change my password" + change_password: "تغيير كلمة المرور" new: - forgot_password: "Forgot your password?" - no_account: "No account with this email exsists. If you are waiting for an invite, we are rolling them out as soon as possible" - send_password_instructions: "Send me reset password instructions" - send_instructions: ".سوف تتلقى رسالة بريد إلكتروني مع تعليمات حول كيفية إعادة تعيين كلمة السر الخاصة بك في بضع دقائق" - updated: ".تم تغيير كلمة السر الخاصة بك بنجاح. وقعت الآن دخولك" + forgot_password: "نسيت كلمة المرور؟" + no_account: "هذا البريد الإلكتروني غير مرتبط بأي حساب. إذا كنت تنتظر دعوة, فنحن نقوم بتوزيعها بأسرع وسيلة لتصل الجميع" + send_password_instructions: "إعادة تعيين كلمة مرور" + send_instructions: "ستصلك في بضع دقائق رسالة إلكترونية تحوي تعليمات إعادة تعيين كلمة المرور الخاصة بك" + updated: "تم تغيير كلمة السر خاصتك بنجاح. أنت الآن متصل" registrations: destroyed: ".وداعا! تم إلغاء حسابك بنجاح. ونأمل أن نراكم مرة أخرى قريبا" - signed_up: ".لقد قمت بتسجيل بنجاح. إذا مكن، وجهت رسالة تأكيد إلى البريد الإلكتروني الخاص بك" + signed_up: ".تمت عملية تسجيلك بنجاح. ستصلك رسالة إلكترونية حال تفعيله" updated: ".قمت بتحديث حسابك بنجاح" sessions: new: - alpha_software: "You are about to use alpha software." - bugs_and_feedback: "Be advised, you will experience bugs. We encourage you to use the Feedback button on the right hand side of your browser to report any hiccups! We will work as fast as we can to resolve any issues you report." + alpha_software: "أنت على وشك استخدام برنامج تجريبي ألفا" + bugs_and_feedback: "للتذكير، ستواجه خلال تجربتك بعض المشاكل التقنية. نشجعك على استخدام زر التبليغ -الموجود بالجانب الأيمن من متصفحك- من أجل تنبيه المطورين لأي معضلة واجهتها, وسنعمل بأسرع ما يمكن لحل أي مشكلة تقنية تم الإبلاغ عنها." bugs_and_feedback_mobile: "لا تندهش،سوف تواجهكم مشكلة. نحن نشجعكم على استخدام زر ردود الفعل على الجانب الأيمن من المتصفح الخاص بك إلى تسجيل أي مشكلة! سوف نعمل بأسرع ما يمكن لحل المشاكل الواردةفي التقرير." - login: "Login" - modern_browsers: "only supports modern browsers." - password: "Password" - remember_me: "Remember me" - sign_in: "Sign in" - username: "Username" - signed_in: ".وقعت في بنجاح" - signed_out: ".بتسجيل الخروج بنجاح" + login: "لُج" + modern_browsers: "الدعم حصري للمتصفحات الحديثة، لا أنترنت أكسبلورر" + password: "كلمة المرور" + remember_me: "تذكرني" + sign_in: "لُج" + username: "المعرف" + signed_in: "تم تسجيل الدخول بنجاح" + signed_out: "تم تسجيل الخروج بنجاح" shared: links: - forgot_your_password: "Forgot your password?" - receive_confirmation: "Didn't receive confirmation instructions?" - receive_unlock: "Didn't receive unlock instructions?" - sign_in: "Sign in" - sign_up: "Sign up" - sign_up_closed: "Open signups are closed at this time." + forgot_your_password: "نسيت كلمة المرور؟" + receive_confirmation: "لم تصلك تعليمات تأكيد حسابك؟" + receive_unlock: "لم تصلك تعليمات إعادة فتح حسابك؟" + sign_in: "لُج" + sign_up: "تسجيل" + sign_up_closed: "التسجيلات مغلقة حاليا" mail_signup_form: - sign_up_for_an_invite: "Sign up for an invite!" + sign_up_for_an_invite: "سجل في قائمة انتظار الدعوات" unlocks: new: - resend_unlock: "Resend unlock instructions" - send_instructions: ".سوف تتلقى رسالة بريد إلكتروني مع تعليمات حول كيفية فتح حساب في بضع دقائق" - unlocked: ".كان حسابك مقفلة بنجاح. وقعت الآن دخولك" + resend_unlock: "إعادة إرسال تعليمات إعادة فتح حسابك" + send_instructions: "ستصلك رسالة إلكترونية خلال لحظات تحوي تعليمات إعادة فتح حسابك" + unlocked: "تم إعادة فتح حسابك بنجاح، وتسجيل دخولك" errors: messages: - already_confirmed: "وقد أكد بالفعل" - not_found: "لم يتم العثور على" + already_confirmed: "تم تأكيد إعادة فتح حسابك مسبقا" + not_found: "غير موجود" not_locked: "لم يكن مغلق" diff --git a/config/locales/devise/devise.fi.yml b/config/locales/devise/devise.fi.yml index f940d58c1..08f86c1d8 100644 --- a/config/locales/devise/devise.fi.yml +++ b/config/locales/devise/devise.fi.yml @@ -12,7 +12,7 @@ fi: send_instructions: "Saat hetken päästä sähköpostiisi ohjeet siitä, miten vahvistat käyttäjätilisi." failure: inactive: "Käyttätiliäsi ei ole vielä aktivoitu." - invalid: "Väärä sähköpostiosoite tai salasana." + invalid: "Virheellinen käyttäjätunnus tai salasana." invalid_token: "Virheellinen todennustunnus." locked: "Käyttäjätilisi on lukittu." timeout: "Istunto on vanhentunut, kirjaudu uudelleen jatkaaksesi." diff --git a/config/locales/diaspora/ar.yml b/config/locales/diaspora/ar.yml index f071ba7f7..9e58c2c73 100644 --- a/config/locales/diaspora/ar.yml +++ b/config/locales/diaspora/ar.yml @@ -4,614 +4,614 @@ ar: - _comments: "Comments" - _home: "Home" - _photos: "صِور" - _services: "الخدمات" - account: "الحساب" + _comments: "تعليقات" + _home: "الرئيسية" + _photos: "صور" + _services: "خدمات" + account: "حساب" activerecord: errors: models: contact: attributes: person_id: - taken: "must be unique among this user's contacts." + taken: "يجب أن يكون خاصا من بين أصدقاء هذا العضو" person: attributes: diaspora_handle: - taken: "is already taken." + taken: "غير متاح" request: attributes: from_id: - taken: "is a duplicate of a pre-existing request." + taken: "نسخة من طلب سابق" user: attributes: email: - taken: "is already taken." + taken: "غير متاح" person: - invalid: "is invalid." + invalid: "غير صالح" username: - taken: "is already taken." - ago: "%{time} منذ" - all_aspects: "All aspects" + taken: "غير متاح" + ago: "منذ %{time}" + all_aspects: "كل الفئات" application: helper: unknown_person: "شخص غير معروف" video_title: - unknown: "Unknown Video Title" - are_you_sure: "Are you sure?" + unknown: "عنوان فيديو غير محدد" + are_you_sure: "هل أنت متأكد؟" aspect_memberships: destroy: - failure: "Failed to remove person from aspect" - no_membership: "Could not find the selected person in that aspect" - success: "Successfully removed person from aspect" + failure: "فشل في حذف عضو من الفئة" + no_membership: "لم يتم إيجاد العضو المحدد في هذه الفئة" + success: "حذف العضو من الفئة بنجاح" aspects: add_to_aspect: - failure: ".فَشل في إضافة متصل الى الجانب" - success: ".تم إضافة المتصل للجانب بنجاح" + failure: "فشل في إضافة صديق إلى الفئة" + success: "إضافة صديق إلى الفئة بنجاح" aspect_contacts: - done_editing: "done editing" + done_editing: "اتمام التغييرات" aspect_stream: - activity: "activity" - post_time: "post time" - sort_by: "sort by:" - contacts_not_visible: "Contacts in this aspect will not be able to see each other." - contacts_visible: "Contacts in this aspect will be able to see each other." + activity: "النشاط" + post_time: "زمن النشر" + sort_by: "تصنيف حسب" + contacts_not_visible: "رؤية عضو لآخر في هاته الفئة غير متاحة" + contacts_visible: "رؤية عضو لآخر في هاته الفئة متاحة" create: - failure: ".فشل إنشاء الجانب" - success: ".تم إنشائه %{name}جانبك الجديد" + failure: "فشل إنشاء الفئة" + success: "تم إنشاء الفئة الجديدة %{name}" destroy: - failure: "%{name} is not empty and could not be removed." + failure: "%{name} ليس خاليا ولا يمكن حذفه" success: ".بنجاح %{name} تم إزالة" edit: - add_existing: "Add an existing contact" - aspect_list_is_not_visible: "aspect list is hidden to others in aspect" - aspect_list_is_visible: "aspect list is visible to others in aspect" - confirm_remove_aspect: "Are you sure you want to delete this aspect?" - done: "Done" - make_aspect_list_visible: "make aspect list visible?" - remove_aspect: "Delete this aspect" - rename: "rename" - update: "update" - updating: "updating" - few: "%{count} aspects" + add_existing: "إضافة عضو موجود مسبقا" + aspect_list_is_not_visible: "قائمة الفئة مخفية عن الأعضاء الأخرين في الفئة" + aspect_list_is_visible: "قائمة الفئة مرئية للأعضاء الآخرين في الفئة" + confirm_remove_aspect: "تأكيد حذف هذه الفئة؟" + done: "تم بنجاح" + make_aspect_list_visible: "تريدها فئة مرئية؟" + remove_aspect: "حذف هذه الفئة" + rename: "إعادة تسمية" + update: "تحديث" + updating: "تحديث" + few: "%{count} فئة" helper: - are_you_sure: "Are you sure you want to delete this aspect?" - aspect_not_empty: "الجانب ليس فارغ" - remove: "إزالة" + are_you_sure: "تأكيد حذف هذه الفئة؟" + aspect_not_empty: "الفئة ليست فارغة" + remove: "حذف" index: - handle_explanation: "This is your diaspora handle. Like an email address, you can give this to people to reach you." - no_contacts: "No contacts" - post_a_message: "post a message >>" + handle_explanation: "هذا وسيط دياسبرا. مثل البريد الالكتروني, يمكنك منحه للأصدقاء حتى تستطيع التواصل معهم" + no_contacts: "لا أعضاء" + post_a_message: "انشر رسالة >>" manage: - add_a_new_aspect: "أضف جانباً جديداً" - add_a_new_contact: "إضافة جهة إتصال جديدة" - drag_to_add: "اسحب لإضافة أشخاص" - manage_aspects: "إدارة الجوانب" - no_requests: "لا يوجد طلبات جديدة" + add_a_new_aspect: "أضف فئة جديدة" + add_a_new_contact: "أضف عضوا جديدا" + drag_to_add: "اسحب لإضافة أعضاء" + manage_aspects: "إدارة الفئات" + no_requests: "لا طلبات إضافة جديدة" requests: "طلبات" - many: "%{count} aspects" + many: "%{count} فئات" move_contact: - error: "%{inspect} :خطأ في نقل الاتصال " - failure: "%{inspect} لم تعمل" - success: "انتقل الشخص الى جانب جديد" + error: "خطأ خلال تحريك عضو: %{inspect}" + failure: "لم يعمل %{inspect}" + success: "تم تحريك عضو إلى الفئة الجديدة" new_aspect: - create: "إنشيء" - name: "الإسم" + create: "إنشاء فئة جديدة" + name: "إسم الفئة" no_posts_message: - start_talking: "!لم يقل أحداُ شيء بعد. إبدأ المحادثة " - one: "1 aspect" - other: "%{count} aspects" + start_talking: "لم تنشر أي رسالة بعد، إبدأ المحادثة" + one: "فئة" + other: "%{count} فئات" seed: - family: "Family" - work: "Work" + family: "العائلة" + work: "العمل" show: - edit_aspect: "edit aspect" + edit_aspect: "تحرير الفئة" update: - failure: "Your aspect, %{name}, had too long name to be saved." - success: ".بنجاح %{name} تم تعديل جانبك" - zero: "no aspects" - back: "رجوع" + failure: "فئتك, %{name}, اسمها طويل ولا يمكن حفظها." + success: ".بنجاح %{name} تم تعديل" + zero: "لا فئات" + back: "عودة" bookmarklet: - explanation: "%{link} from anywhere by bookmarking this link." - explanation_link_text: "Post to Diaspora" - post_something: "Post something to Diaspora" - post_success: "Posted! Closing!" + explanation: "%{link} من أي مكان بحفظ هذا الرابط في المفضلة" + explanation_link_text: "انشر على دياسبرا" + post_something: "انشر شيئا على دياسبرا" + post_success: "تم النشر, إغلاق" cancel: "إلغاء" comments: - few: "%{count} comments" - many: "%{count} comments" + few: "%{count} تعليقات" + many: "%{count} تعليقات" new_comment: comment: "تعليق" - commenting: "...جاري التعليق" - one: "1 comment" - other: "%{count} comments" - zero: "no comments" + commenting: "تعليق..." + one: "1 تعليق" + other: "%{count} تعليقات" + zero: "لا تعليقات" contacts: create: - failure: "Failed to create contact" + failure: "فشل في إنشاء الإتصال" destroy: - failure: "Failed to disconnect from %{name}" - success: "Successfully disconnected from %{name}" - few: "%{count} contacts" - many: "%{count} contacts" - one: "1 contact" - other: "%{count} contacts" + failure: "فشل في فصل اتصالك مع %{name}" + success: "تم فصل اتصالك مع %{name} بنجاح" + few: "%{count} أعضاء" + many: "%{count} أعضاء" + one: "1 عضو" + other: "%{count} أعضاء" share_with_pane: - accepts: "Once %{name} accepts, you'll start seeing each other's posts on Diaspora" - add_new_aspect: "add to new aspect" - share_with: "Start sharing with %{name}" - zero: "no contacts" + accepts: "حالما يقبل %{name}, ستتمكنان من رؤية رسائل بعضكما البعض" + add_new_aspect: "إضافة إلى فئة جديدة" + share_with: "ابدأ المشاركة مع %{name}" + zero: "لا يوجد أعضاء" conversations: create: - sent: "Message sent" + sent: "تم الإرسال" destroy: - success: "Conversation successfully removed" + success: "تم حذف المحادثة بنجاح" helper: new_messages: - few: "%{count} new messages" - many: "%{count} new messages" - one: "1 new messages" - other: "%{count} new messages" - zero: "no new messages" + few: "%{count} رسائل جديدة" + many: "%{count} رسائل جديدة" + one: "1 رسالة جديدة" + other: "%{count} رسائل جديدة" + zero: "لايوجد رسائل جديدة" index: - create_a_new_message: "create a new message" - inbox: "Inbox" - message_inbox: "Message Inbox" - new_message: "New Message" - no_conversation_selected: "no conversation selected" - no_messages: "no messages" + create_a_new_message: "إنشاء رسالة جديدة" + inbox: "الوارد" + message_inbox: "البريد الوارد" + new_message: "رسالة جديدة" + no_conversation_selected: "لم تحدد أية محادثة" + no_messages: "لا يوجد رسائل" new: - send: "Send" - subject: "subject" - to: "to" + send: "إرسال" + subject: "العنوان" + to: "إلى" show: - delete: "delete and block conversation" - reply: "reply" + delete: "حذف وحظر المحادثة" + reply: "رد" date: formats: birthday: "%B %d" birthday_with_year: "%B %d %Y" fullmonth_day: "%B %d" - delete: "مسح" - email: "البريد الإلكتروني" + delete: "حذف" + email: "بريد إلكتروني" error_messages: helper: - correct_the_following_errors_and_try_again: ".صحح الأخطاء التالية وحاول مرة أخرى" - invalid_fields: "مُدخلات غير صحيحة" - fill_me_out: "إسمح لي بالخروج" - hide: "Hide" + correct_the_following_errors_and_try_again: ".صحح الأخطاء التالية ثم أعد المحاولة" + invalid_fields: "مدخلات غير صحيحة" + fill_me_out: "إملأ" + hide: "إخفاء" home: show: - already_account: "لديه حساب بالفعل؟" - choice: "Choice" - choice_explanation: "Diaspora allows you to sort your connections into groups called Aspects. Unique to Diaspora, Aspects ensure your photos, stories and jokes are shared with only the people you want them to be." - learn_about_host: "Learn about how to host your own Diaspora server" - login_here: "سجل الدخول هنا" - ownership: "Ownership" - ownership_explanation: "You own your pictures, and you shouldn’t have to give that up just in order to share them. You maintain ownership of everything you share on Diaspora, giving you full control over how it is distributed." - share_what_you_want: ".شارك ما تريد, مع من تريد" - simplicity: "Simplicity" - simplicity_explanation: "Diaspora makes sharing clean and easy – this goes doubly so for privacy. Innherently private, Diaspora doesn’t have pages of settings and options to wade through to keep your profile secure and to your liking." - tagline_first_half: "Share what you want," - tagline_second_half: "with whom you want." + already_account: "لديك حساب؟" + choice: "خيار" + choice_explanation: "دياسبرا تسمح لك بتصنيف مراسليك إلى مجموعات تدعى الفئات. حصريا في دياسبرا، الفئات تضمن أن صورك، قصصك، طرائفك المنشورة لا تصل إلا إلى من تريد أنت أن تصلهم" + learn_about_host: "تعلم كيفية استضافة سيرفر دياسبرا الخاص بك" + login_here: "لُج هنا" + ownership: "ملكية" + ownership_explanation: "صورك هي ملكية خاصة لك، وليس عليك التخلي عن ملكيتها بمجرد مشاركتها. لك الملكية المطلقة لكل ما تشاركه في دياسبرا، نعطيك كل الصلاحيات في كيفية مشاركتها" + share_what_you_want: "شارك ما تريد، مع من تريد" + simplicity: "بساطة" + simplicity_explanation: "مع دياسبرا المشاركة والخصوصية هي ترادف للسهولة والشفافية. دياسبرا صنعت لاحترام الخصوصية، فليس وجوبا عليك الخوص في صفحات عديدة من الإعدادات والخيارات لتبقي حسابك آمنا وكما تريده." + tagline_first_half: "شارك ما تريد،" + tagline_second_half: "مع من تريد." invitations: check_token: - not_found: "لا يوجد دعوة" + not_found: "الدعوة الرمزية غير موجودة" create: - already_contacts: "You are already connected with this person" - already_sent: "You already invited this person." - no_more: ".ليس لديك المزيد من الدعوات" - rejected: "The following email addresses had problems: " - sent: ":الدعوة قد تم إرسالها الى" + already_contacts: "لقد قمت بإنشاء اتصال مع هذا العضو مسبقا" + already_sent: "لقد قمت بدعوة هذا الشخص مسبقا" + no_more: "لم يتبقى لك أية دعوات" + rejected: "واجه هذا البريد الإلكتروني مشاكلا: " + sent: "تم إرسال دعوتك" edit: - sign_up: "sign_up" + sign_up: "تسجيل" new: - already_invited: "Already invited" - aspect: "Aspect" - comma_seperated_plz: "You can enter multiple email addresses separated by commas." - if_they_accept_info: "if they accept, they will be added to the aspect you invited them." - invite_someone_to_join: "!Diaspora دعوة شخص للانضمام الى" - personal_message: "Personal message" - resend: "Resend" - send_an_invitation: "إرسل دعوة" - send_invitation: "إرسل دعوة" - to: "الى" + already_invited: "تم دعوته مسبقا" + aspect: "فئة" + comma_seperated_plz: "يمكن إدخال أكثر من بريد إلكتروني واحد باستعمال علامة التوقف فاصلة, بين كل بريد وآخر" + if_they_accept_info: "إذا قبلوا دعوتك ، سيتم إضافتهم إلى الفئة التي دعوتهم إليها" + invite_someone_to_join: "دعوة صديق للإنضمام إلى دياسبرا" + personal_message: "رسالة شخصية" + resend: "إعادة إرسال" + send_an_invitation: "إرسال دعوة" + send_invitation: "إرسال الدعوة" + to: "إلى" layouts: application: - have_a_problem: "Have a problem? Find an answer here" - powered_by: "POWERED BY DIASPORA*" + have_a_problem: "واجهت مشكلة؟ اعثر على حل هنا" + powered_by: "بدعم DIASPORA*" public_feed: "Public Diaspora Feed for %{name}" - toggle: "toggle mobile site" - whats_new: "what's new?" - your_aspects: "your aspects" + toggle: "التحول إلى الموقع الخاص بالهواتف المحمولة" + whats_new: "ما الجديد؟" + your_aspects: "فئاتك" header: blog: "مدونة" - code: "code" - login: "دُخول" + code: "شيفرة" + login: "لُج" logout: "خروج" - profile: "profile" - settings: "settings" + profile: "الحساب الشخصي" + settings: "إعدادات" likes: likes: people_dislike_this: - few: "%{count} people disliked this" - many: "%{count} people disliked this" - one: "1 person disliked this" - other: "%{count} people disliked this" - zero: "no people disliked this" + few: "%{count} أشخاص لم يعجبهم هذا" + many: "%{count} أشخاص لم يعجبهم هذا" + one: "1 لم يعجبه هذا" + other: "%{count} أشخاص لم يعجبهم هذا" + zero: "لا أحد يكره هذا" people_like_this: - few: "%{count} people liked this" - many: "%{count} people liked this" - one: "1 person liked this" - other: "%{count} people liked this" - zero: "no people liked this" - more: "More" - next: "next" - no_results: "No Results Found" + few: "%{count} أشخاص يعجبهم هذا" + many: "%{count} أشخاص يعجبهم هذا" + one: "1 أعجبه هذا" + other: "%{count} أشخاص أعجبهم هذا" + zero: "لا أحد أحب هذا" + more: "أكثر" + next: "التالي" + no_results: "لا نتائج موجودة" notifications: - also_commented: "also commented on" - also_commented_deleted: "commented on a deleted post" - comment_on_post: "commented on your" - deleted: "deleted" + also_commented: "أيضا علق على" + also_commented_deleted: "علق على منشور محذوف" + comment_on_post: "علق على" + deleted: "تم الحذف" helper: new_notifications: - few: "%{count} new notifications" - many: "%{count} new notifications" - one: "1 new notifications" - other: "%{count} new notifications" - zero: "no new notifications" + few: "%{count} تنبيهات جديدة" + many: "%{count} تنبيهات جديدة" + one: "1 تنبيه جديد" + other: "%{count} تنبيهات جديدة" + zero: "لا تنبيهات جديدة" index: - and: "and" - and_others: "and %{number} others" - mark_all_as_read: "Mark All as Read" - notifications: "Notifications" - mentioned: "has mentioned you in their" - new_request: "offered to share with you." - post: "post" - private_message: "sent you a message." - request_accepted: "accepted your share request." + and: "و" + and_others: "و %{number} آخرين" + mark_all_as_read: "وضع الجميع كمقروء" + notifications: "تنبيهات" + mentioned: "قام بذكرك في" + new_request: "عرض المشاركة معك" + post: "منشور" + private_message: "أرسل لك رسالة" + request_accepted: "وافق على عرضك للمشاركة" notifier: also_commented: - commented: "has also commented on %{post_author}'s post:" - sign_in: "Sign in to view it." - subject: "%{name} has also commented." + commented: "أيضا على مشاركة %{post_author}:" + sign_in: "لُج لمشاهدته" + subject: "%{name} أيضا علق" comment_on_post: - commented: "has commented on your post!" - sign_in: "Sign in to view it." - subject: "%{name} has commented on your post." - diaspora: "the diaspora email robot" - hello: " %{name}!أهلاً" - love: ",حُب" - manage_your_email_settings: "manage your email settings" + commented: "علق على مشاركتك" + sign_in: "لُج لمشاهدته\"" + subject: "%{name} علق على مشاركتك" + diaspora: "البريد الآلي لدياسبرا\"" + hello: "مرحبا %{name}!" + love: "كل الود," + manage_your_email_settings: "إدارة إعدادات بريدك الإلكتروني" mentioned: - mentioned: "mentioned you in a post:" - sign_in: "Sign in to view it." - subject: "%{name} has mentioned you on Diaspora*" + mentioned: "قام بذكرك في مشاركة:" + sign_in: "لُج لمشاهدته" + subject: "%{name} قام بذكرك في دياسبرا" new_request: - just_sent_you: "Diaspora* أُرسل لك طلب إتصال على" - sign_in: "تسجيل الدخول هنا" - subject: "جديد Diaspora* طلب صداقة من %{from}" - try_it_out: ".يجب عليك التفكير في التحقق من ذلك" + just_sent_you: "أرسل لك لتوه طلب مشاركة*" + sign_in: "لُج هنا" + subject: "طلب مشاركة جديد بدياسبرا %{from}" + try_it_out: "ينصح بشدة الإطلاع عليه" private_message: - message_subject: "Subject: %{subject}" - private_message: "has sent you a private message:" - sign_in: "Sign in to view it." - subject: "%{name} has sent you a private message yon Diaspora*" + message_subject: "العنوان: %{subject}" + private_message: "راسلك برسالة خاصة:" + sign_in: "لُج لمشاهدته" + subject: "%{name} راسلك برسالة خاصة في دياسبرا" request_accepted: - accepted: "!قد تم قبول طلب اتصالك" - sign_in: "Sign in here" - subject: "%{name} تم قبوله كصديق على Diaspora*" + accepted: "وافق على عرضك للمشاركة" + sign_in: "لُج لمشاهدته" + subject: "%{name} وافق على عرضك للمشاركة في دياسبرا" single_admin: - admin: "Your Diaspora administrator" - subject: "A message from your Diaspora administrator:" - thanks: "Thanks," - ok: "حسناً" + admin: "إدارة دياسبرا" + subject: "رسالة من إدارة دياسبرا:" + thanks: "شكرا," + ok: "حسنا" or: "أو" - password: "كلمة السر" - password_confirmation: "تأكيد كلمة السر" + password: "كلمة المرور" + password_confirmation: "تأكيد كلمة المرور" people: add_contact_small: - add_contact_from_tag: "add contact from tag" + add_contact_from_tag: "إضافة مراسل من tag" aspect_list: - edit_membership: "edit aspect membership" - few: "%{count} people" + edit_membership: "تعديل العضويات بالفئات" + few: "%{count} أعضاء" helper: - people_on_pod_are_aware_of: "على عِلم ب pod الاشخاص على " - results_for: "%{params} النتائج ل" + people_on_pod_are_aware_of: " الأعضاء بالموقع مقبلون على" + results_for: " نتائج من أجل %{params}" index: - couldnt_find_them_send_invite: "Couldn't find them? Send an invite!" - no_one_found: "...and no one was found." - no_results: "Hey! You need to search for something." - results_for: "نتائج البحث ل" - many: "%{count} people" - one: "1 person" - other: "%{count} people" + couldnt_find_them_send_invite: "لم تجدهم؟ أرسل دعوة" + no_one_found: "...ولم يعثر على أحد" + no_results: "يجب تحديد شيء للبحث عنه" + results_for: "نتائج البحث عن" + many: "%{count} أعضاء" + one: "1 عضو" + other: "%{count} عضو" person: - add_contact: "إضافة جهة اتصال" - already_connected: "مُتصل بالفعل" - pending_request: "طلبات مُعلقة" - thats_you: "!شُكراً لك" + add_contact: "إضافة عضو" + already_connected: "أضيف مسبقا" + pending_request: "طلبات معلقة" + thats_you: "هذا أنت" profile_sidebar: - bio: "السيرة الذاتية" - born: "يوم الميلاد" - cannot_remove: "Cannot remove %{name} from last aspect." - edit_my_profile: "حرر ملفي الشخصي" - gender: "النوع" - in_aspects: "في جانب" - location: "location" - remove_contact: "إزالة جهة اتصال" - remove_from: "Remove %{name} from %{aspect}?" + bio: "سيرة" + born: "ولد" + cannot_remove: "استحالة حذف %{name} من الفئة" + edit_my_profile: "تحرير صفحتي الشخصية" + gender: "جنس" + in_aspects: "في الفئة" + location: "المكان" + remove_contact: "حذف العضو" + remove_from: "حذف %{name} من %{aspect}?" show: - add_some: "add some" - does_not_exist: "!الشخص غير موجود" - edit: "edit" - incoming_request: "You have an incoming request from this person." - mention: "Mention" - message: "Message" - no_posts: "!لا توجد مشاركات للعرض" - not_connected: "You are not connected with this person" - recent_posts: "Recent Posts" - recent_public_posts: "Recent Public Posts" - return_to_aspects: "Return to your aspects page" - see_all: "See all" - start_sharing: "start sharing" - to_accept_or_ignore: "to accept or ignore it." - you_have_no_tags: "you have no tags!" + add_some: "إضافة" + does_not_exist: "هذا العضو غير موجود" + edit: "تعديل" + incoming_request: "%{name} يريد المشاركة معك" + mention: "إشارة" + message: "رسالة" + no_posts: "لا يوجد رسائل لعرضها" + not_connected: "أنت لا تتشارك مع هذا العضو" + recent_posts: "منشورات حديثة" + recent_public_posts: "منشورات عامة حديثة" + return_to_aspects: "العودة إلى صفحة الفئات" + see_all: "مشاهدة الكل" + start_sharing: "بدء المشاركة" + to_accept_or_ignore: "للقبول أو التجاهل" + you_have_no_tags: "لم تستخدم أي tags!" webfinger: - fail: "Sorry, we couldn't find %{handle}." - zero: "no people" + fail: "للأسف، لم نجد %{handle}." + zero: "لا أحد" photos: create: - integrity_error: "Photo upload failed. Are you sure that was an image?" - runtime_error: "Photo upload failed. Are you sure that your seatbelt is fastened?" - type_error: "Photo upload failed. Are you sure an image was added?" + integrity_error: "فشل رفع الصورة، هل أنت متأكد أن نوع الملف صورة؟" + runtime_error: "فشل رفع الصورة، هل قمت بربطها مع نص؟" + type_error: "فشل رفع صورة، أمتأكد أنها صورة؟" destroy: - notice: ".تم حذف الصورة" + notice: "تم حذف الصورة" edit: editing: "تحرير" new: back_to_list: "عودة إلى القائمة" new_photo: "صورة جديدة" - post_it: "!ألصقها" + post_it: "أنشرها" new_photo: - empty: "{file} فارغ, من فضلك أعد اختيار الملفات بدونه." - invalid_ext: "{file} الامتداد غير صالح. فقط {extensions} مسموح به." - size_error: "{file} كبير الحجم, حد الملف الاقصي هو {sizeLimit}." + empty: "{file} فارغ، الرجاء إعادة تحديد الملفات بدون تحديده" + invalid_ext: "{file} له صيغة غير صالحة. {extensions} هي الصيغ الوحيدة المسموح بها" + size_error: "{file} ذو حجم كبير جدا, {sizeLimit} هو الحجم الأقصى المسموح به." new_profile_photo: - or_select_one: "or select one from your already existing" - upload: "Upload a new profile photo!" + or_select_one: "أو اختر واحدة من الموجودات مسبقا" + upload: "رفع صورة شخصية جديدة" photo: - view_all: "%{name} إعرض كل صور" + view_all: "مشاهدة جميع صور %{name}" show: - collection_permalink: "collection permalink" + collection_permalink: "رابط دائم" delete_photo: "حذف الصورة" - edit: "حرر" - edit_delete_photo: "Edit photo description / delete photo" - make_profile_photo: "إنشيء صورة للملف الشخصي" - original_post: "Original Post" - permalink: "permalink" - update_photo: "حَدِث الصورة" - view: "عرض" + edit: "تعديل" + edit_delete_photo: "تعديل وصف الصورة / حذف الصورة" + make_profile_photo: "اجعلها صورة شخصية" + original_post: "منشور أصلي" + permalink: "رابط دائم" + update_photo: "تحديث صورة" + view: "مشاهدة" update: - error: ".فشل في تحرير الصورة" - notice: ".تم تحديث الصورة بنجاح" + error: "فشل تحرير الصورة." + notice: "تم تحديث الصورة بنجاح" post_visibilites: update: - post_hidden: "%{name}'s post has been hidden." + post_hidden: "تم إخفاء مشاركة %{name}" posts: - doesnt_exist: "that post does not exist!" - previous: "previous" - profile: "الملف الشخصي" + doesnt_exist: "هذه المشاركة غير موجودة" + previous: "السابق" + profile: "الصفحة الشخصية" profiles: edit: - allow_search: "Allow for people to search for you within Diaspora" - edit_profile: "Edit profile" - first_name: "First name" - last_name: "Last name" - update_profile: "Update Profile" - your_bio: "Your bio" - your_birthday: "Your birthday" - your_gender: "Your gender" - your_location: "Your location" - your_name: "Your name" - your_photo: "Your photo" - your_private_profile: "Your private profile" - your_public_profile: "Your public profile" - your_tags: "You: in 5 #tags" - your_tags_placeholder: "i.e. #diaspora #ironing #kittens #music" + allow_search: "السماح للجميع بالبحث عنك من خلال دياسبرا" + edit_profile: "تحرير الصفحة الشخصية" + first_name: "الإسم" + last_name: "اللقب" + update_profile: "تحديث الصفحة الشخصية" + your_bio: "سيرتك الشخصية" + your_birthday: "تاريخ الميلاد" + your_gender: "جنسك" + your_location: "مكانك" + your_name: "إسمك" + your_photo: "صورتك" + your_private_profile: "صفحتك الخاصة" + your_public_profile: "صفحتك العامة" + your_tags: "أنت: في 5 #tags" + your_tags_placeholder: "مثال: #diaspora #ironing #kittens #music" update: - failed: "Failed to update profile" - updated: "Profile updated" + failed: "فشل في تحديث حسابك الشخصي" + updated: "تم تحديث حسابك الشخصي" registrations: - closed: ".Diaspora pod التسجيل مغلق على هذا " + closed: "التسجيلات مغلقة على هذه المنصة" create: - success: "!Diaspora لقد إنضممت الى" + success: "!Diaspora سجل في" edit: cancel_my_account: "إلغاء حسابي" - edit: "%{name} حرر" - leave_blank: "(اترك فراغاً إذا كنت لا تريد تغييره)" - password_to_confirm: "(نحن بحاجة إلى كلمة المرور الحالية لتأكيد التغييرات)" - unhappy: "حزين؟" + edit: "تعديل %{name}" + leave_blank: "(اتركها فارغة في حال أردت عدم تغييرها)" + password_to_confirm: "(نحتاج لكلمة مرورك الحالية لتأكيد التغييرات)" + unhappy: "غير راض?" update: "تحديث" new: - enter_email: "Enter an e-mail" - enter_password: "Enter a password" - enter_password_again: "Enter the same password as before" - enter_username: "Pick a username (only letters, numbers, and underscores)" + enter_email: "أدخل بريد إلكتروني" + enter_password: "أدخل كلمة مرور" + enter_password_again: "أعد إدخال كلمة المرور" + enter_username: "اختر معرف (فقط حروف, أرقام, و الإشارات الخطية)" sign_up: "التسجيل" - sign_up_for_diaspora: "Diaspora قُم بالتسجيل في " + sign_up_for_diaspora: "التسجيل في دياسبرا" requests: create: - sending: "....إرسال" - sent: "You've asked to share with %{name}. They should see it next time they log in to Diaspora." + sending: "إرسال..." + sent: "قمت بعرض المشاركة مع %{name}. سيصلهم طلبك فورا حال تسجيل دخولهم في دياسبرا" destroy: - error: "!الرجاء اختيار جانب" - ignore: ".تجاهل طلب الصداقة" + error: "الرجاء تحديد فئة" + ignore: ". تجاهل طلب الصداقة" success: ".أنتم الآن أصدقاء" helper: new_requests: - few: "%{count} new requests!" - many: "%{count} new requests!" - one: "new request!" - other: "%{count} new requests!" - zero: "no new requests" + few: "%{count} عروض مشاركة!" + many: "%{count} عروض مشاركة!" + one: "عرض مشاركة!" + other: "%{count} عروض مشاركة!" + zero: "لا يوجد عروض مشاركة جديدة" manage_aspect_contacts: - existing: "جهة اتصال موجودة" - manage_within: "إدارة جهات الاتصال بدون" + existing: "عضو موجود مسبقا" + manage_within: "إدارة الأعضاء" new_request_to_person: - sent: "sent!" + sent: "إرسال!" search: "بحث" services: create: - success: ".نجاح المُصادقة" + success: "تمت المصادقة بنجاح" destroy: - success: ".تم إزالة المُصادقة بنجاح" + success: "تم مسح المصادقة بنجاح" failure: - error: "there was an error connecting that service" + error: "خطأ خلال محاولة الإتصال بالخدمة" finder: friends: - few: "%{count} friends" - many: "%{count} friends" - one: "1 friend" - other: "%{count} friends" - zero: "no friends" - invite_your_friends_from: "Invite your friends from %{service}" - not_connected: "not connected" + few: "%{count} أصدقاء" + many: "%{count} أصدقاء" + one: "1 أصدقاء" + other: "%{count} أصدقاء" + zero: "لا أصدقاء" + invite_your_friends_from: "دعوة أصدقائك من %{service}" + not_connected: "غير متصل" index: - connect_to_facebook: "facebook الاتصال ب " - connect_to_twitter: "twitter الاتصال ب " - disconnect: "تخفيض" - edit_services: "Edit services" - logged_in_as: "سجل الدخول ك" - really_disconnect: " %{service}? تخفيض" + connect_to_facebook: "إتصل بـ فسبوك" + connect_to_twitter: "إتصل بتويتر" + disconnect: "فصل الإتصال" + edit_services: "تعديل الخدمات" + logged_in_as: "ولوج بـ" + really_disconnect: "فصل إتصال %{service}?" inviter: - click_link_to_accept_invitation: "Click this link to accept your invitation" - join_me_on_diaspora: "Join me on DIASPORA*" + click_link_to_accept_invitation: "إضغط على هذا الرابط لقبول دعوتك" + join_me_on_diaspora: "انضم إلي في DIASPORA*" remote_friend: - invite: "invite" - resend: "resend" + invite: "دعوة" + resend: "إعادة إرسال" settings: "إعدادات" shared: add_contact: - create_request: "Find by Diaspora handle" - diaspora_handle: "Diaspora handle" - enter_a_diaspora_username: ":Diaspora أدخل اسم المستخدم ل " - know_email: "Know their email address? You should invite them" - your_diaspora_username_is: "اسم Diaspora الخاص بك: %{diaspora_handle}" + create_request: "ابحث باستخدام وسيط دياسبرا" + diaspora_handle: "وسيط دياسبرا" + enter_a_diaspora_username: "أدخل معرف دياسبرا:" + know_email: "تعرف بريد الإلكتروني؟ يجدر بك دعوتهم" + your_diaspora_username_is: "معرف دياسبورا خاصتك هو: %{diaspora_handle}" contact_list: - all_contacts: "All contacts" - cannot_remove: "Cannot remove person from last aspect." + all_contacts: "جميع الأعضاء" + cannot_remove: "استحالة حذف هذا الشخص من الفئة" footer: - logged_in_as: "logged in as %{name}" - your_aspects: "your aspects" + logged_in_as: "ولوج بـ %{name}" + your_aspects: "الفئات خاصتك" invitations: - by_email: "by Email" - dont_have_now: "You don't have any right now, but more invites are coming soon!" - from_facebook: "From Facebook" - invitations_left: "(%{count} left)" - invite_someone: "إدعي شخصاً" - invite_your_friends: "Invite your friends" - invites: "Invites" - invites_closed: "Invites are currently closed on this Diaspora seed" + by_email: "عبر البريد الإلكتروني" + dont_have_now: "لا تملك دعوات حاليا، لكنها قادمة قريبا" + from_facebook: "عبر فسبوك" + invitations_left: "(%{count} متبقية)" + invite_someone: "دعوة شخص" + invite_your_friends: "دعوات لأصدقائك" + invites: "دعوات" + invites_closed: "الدعوات غير متاحة على هذه المنصة حاليا" notification: - new: "%{from} من %{type} جديد" + new: "جديد %{type} من %{from}" public_explain: - logged_in: "%{service} تسجيل الدخول إلى" - manage: "إدارة خدمات المتصلين" - outside: "!Diaspora الرسائل العامة سوف يكون متاح رؤيتها من خارج " - title: "إعداد خدمات المُتصلين" + logged_in: "ولوج بـ %{service}" + manage: "إدارة الخدمات المتصلة" + outside: "الرسائل العامة، متاحة للجميع حتى لمن هم خارج دياسبرا" + title: "أنت على وشك نشر رسالة عامة" publisher: - add_photos: "add photos" - all: "كل" - all_contacts: "all contacts" - click_to_share_with: "Click to share with: " - make_public: "إجعلها عامة" - post_a_message_to: "%{aspect}انشر رسالة في" - posting: "...جاري الارسال" - public: "Public" - publishing_to: "publishing to: " + add_photos: "إضافة صورة" + all: "الجميع" + all_contacts: "جميع الفئات" + click_to_share_with: "إضغط للمشاركة مع: " + make_public: "عممها" + post_a_message_to: "انشر رسالة إلى %{aspect}" + posting: "نشر..." + public: "عام" + publishing_to: "نشر إلى: " share: "مشاركة" - share_with: "%{aspect} شارك مع" - whats_on_your_mind: "what's on your mind?" + share_with: "مشاركة مع %{aspect}" + whats_on_your_mind: "ما يجول في خاطرك؟" reshare: - reshare: "اعد المشاركة" + reshare: "إعادة مشاركة" stream_element: - dislike: "I dislike this" - like: "I like this" + dislike: "لم يعجبني هذا" + like: "أعجبني هذا" status_messages: create: - success: "Successfully mentioned: %{names}" + success: "ذكرت بنجاح: %{names}" destroy: - failure: "Failed to delete post" + failure: "فشل في حذف منشور" helper: - no_message_to_display: ".لا يوجد رسالة لعرضها" + no_message_to_display: "لا يوجد رسائل لعرضها" new: - mentioning: "Mentioning: %{person}" + mentioning: "إشارة إلى: %{person}" show: - destroy: "حذف" - not_found: "Sorry, we couldn't find that post." - permalink: "permalink" + destroy: "إزالة" + not_found: "للأسف، لم نجد هذا المنشور" + permalink: "رابط دائم" stream_helper: - hide_comments: "hide comments" - show_comments: "show comments" + hide_comments: "إخفاء التعليقات" + show_comments: "إظهار التعليقات" tags: show: - nobody_talking: "Nobody is talking about %{tag} yet." - people_tagged_with: "People tagged with %{tag}" - posts_tagged_with: "Posts tagged with #%{tag}" + nobody_talking: "لا أحد يتكلم %{tag} بعد" + people_tagged_with: "أشخاص tagged بـ %{tag}" + posts_tagged_with: "رسائل tagged بـ #%{tag}" the_world: "العالم" - undo: "Undo?" - username: "إسم المستخدم" + undo: "تراجع؟" + username: "معرف" users: - destroy: ".تم إغلاق الحساب بنجاح" + destroy: "تم إغلاق الحساب بنجاح" edit: - also_commented: "...someone also comments on your contact's post?" + also_commented: "...علق أحدهم على منشور مراسلك" change: "Change" - change_language: "تغيير اللغة" - change_password: "تغيير كلمة السر" - close_account: "أغلق الحساب" - comment_on_post: "...someone comments on your post?" - current_password: "Current password" - download_photos: "حَمِل صورتي" - download_xml: "خاصتي xml حَمِل" - edit_account: "Edit account" + change_language: "تغيير اللعة" + change_password: "تغيير كلمة المرور" + close_account: "غلق الحساب" + comment_on_post: "...علق أحدهم على رسالتك" + current_password: "كلمة المرور الحالية" + download_photos: "تحميل صوري" + download_xml: "تحميل xml خاصتي" + edit_account: "تعديل الحساب" export_data: "تصدير البيانات" - mentioned: "...you are mentioned in a post?" - new_password: "كلمة سر جديدة" - private_message: "...you receive a private message?" - receive_email_notifications: "Receive email notificaions?" - request_acceptence: "...your share request is accepted?" - request_received: "...you receive a new share request?" - your_email: "Your email" - your_handle: "Your diaspora handle" + mentioned: "...تم ذكرك في رسالة" + new_password: "كلمة مرور جديدة" + private_message: "...وصلتك راسلة خاصة" + receive_email_notifications: "استقبال تنبيهات عبر البريد الإلكتروني؟" + request_acceptence: "...عروض مشاركتك المقبولة" + request_received: "...استقبالك لعروض مشاركة" + your_email: "بريدك الإلكتروني" + your_handle: "وسيط دياسبرا خاصتك" getting_started: - connect_on_diaspora: "Connect on Diaspora" - connect_services: "تواصل مع الخدمات الاخرى الخاصة بك" - could_not_find_anyone: "Could not find any friends on Diaspora*. Use the friend finder to invite them." - edit_profile: "حرر ملفي الشخصي" - finished: "!انتهى" - save_and_continue: "إحفظ وأكمل" - signup_steps: ":أنهي تسجيلك من خلال استكمال هذه الخطوات الثلاث" - skip: "تخطي وإبدأ" + connect_on_diaspora: "الإتصال بدياسبورا" + connect_services: "الإتصال بخدماتك" + could_not_find_anyone: "لم تجد أيا من أصدقاء في دياسبرا، إستخدم بحث الأصدقاء لدعوتهم" + edit_profile: "تعديل صفحتك الشخصية" + finished: "تم" + save_and_continue: "حفظ واستمرار" + signup_steps: "أكمل تسجيلك بالقيام بالتالي:" + skip: "تجاوز هذه المقدمة" step_2: - find_your_friends_on_diaspora: "Would you like to find your Facebook friends on Diaspora?" - skip: "Skip" + find_your_friends_on_diaspora: "هل تريد إيجاد أصدقائك على الفسبوك في دياسبرا" + skip: "تجاوز" step_3: - finish: "Finish" - people_already_on_diaspora: "People already on Diaspora" - welcome: "Diaspora! مرحباَ بك في" + finish: "تم" + people_already_on_diaspora: "أشخاص موجودين مسبقا في دياسبرا" + welcome: "مرحبا بك في دياسبرا!" public: - does_not_exist: "!غير موجود %{username} المستخدم" + does_not_exist: "هذا المستخدم %{username} غير موجود" update: - email_notifications_changed: "Language Change Failed" + email_notifications_changed: "فشل تغيير اللغة" language_changed: "تم تغيير اللغة" - language_not_changed: "فشل في تغيير اللغة" - password_changed: "تم تغيير كلمة السر" - password_not_changed: "فشل في تغيير كلمة السر" + language_not_changed: "فشل تغيير اللغة" + password_changed: "تم تغيير كلمة المرور" + password_not_changed: "فشل تغيير كلمة المرور" webfinger: - fetch_failed: "failed to fetch webfinger profile for %{profile_url}" - hcard_fetch_failed: "there was a problem fetching the hcard for #{@account}" - no_person_constructed: "No person could be constructed from this hcard." - not_enabled: "webfinger does not seem to be enabled for %{account}'s host" - xrd_fetch_failed: "there was an error getting the xrd from account %{account}" + fetch_failed: "فشل تحميل webfinger الحساب لـ %{profile_url}" + hcard_fetch_failed: "خطأ خلال تحميل hcard الخاص بـ #{@account}" + no_person_constructed: "هذا الـ hcard غير صالح." + not_enabled: "webfinger غير مفعل للمضيف %{account}" + xrd_fetch_failed: "خطأ خلال استرجاع xrd من الحساب %{account}" diff --git a/config/locales/diaspora/eu.yml b/config/locales/diaspora/eu.yml index 818350088..bb602c40e 100644 --- a/config/locales/diaspora/eu.yml +++ b/config/locales/diaspora/eu.yml @@ -250,8 +250,8 @@ eu: next: "hurrengoa" no_results: "Ez Da Ezer Aurkitu" notifications: - also_commented: "(e)k iruzkindu du baita zure kontaktuaren" - also_commented_deleted: "mezu ezabatu bat iruzkindu du" + also_commented: "(e)k ere iruzkindu du zure kontaktuaren" + also_commented_deleted: "mezu ezabatu bat iruzkindu du." comment_on_post: "(e)k iruzkindu du zure" deleted: "ezabatuta" helper: @@ -266,9 +266,9 @@ eu: and_others: "eta beste %{number}(e)k" mark_all_as_read: "Guztiak irakurrita" notifications: "Jakinarazpenak" - mentioned: "(e)k zu aipatu zaitu mezu batean" + mentioned: "(e)k zu aipatu zaitu hemen:" new_request: "(e)k zurekin partekatu nahi du." - post: "mezua" + post: "mezua." private_message: "(e)k mezu bat bidali dizu." request_accepted: "(e)k zure partekatze eskaera onartu du." notifier: diff --git a/config/locales/diaspora/fi.yml b/config/locales/diaspora/fi.yml index cdb50c6d9..6d05b2315 100644 --- a/config/locales/diaspora/fi.yml +++ b/config/locales/diaspora/fi.yml @@ -33,7 +33,7 @@ fi: username: taken: "on jo varattu." ago: "%{time} sitten" - all_aspects: "All aspects" + all_aspects: "Kaikki näkymät" application: helper: unknown_person: "tuntematon henkilö" @@ -180,7 +180,7 @@ fi: correct_the_following_errors_and_try_again: "Korjaa seuraavat virheet ja yritä uudelleen." invalid_fields: "Vialliset arvot" fill_me_out: "Täytä tiedot" - hide: "Hide" + hide: "Piilota" home: show: already_account: "joko sinulla on käyttäjätili?" @@ -242,7 +242,7 @@ fi: zero: "no people disliked this" people_like_this: few: "%{count} people liked this" - many: "%{count} people liked this" + many: "%{count} ihmistä tykkää tästä" one: "1 person liked this" other: "%{count} people liked this" zero: "no people liked this" @@ -251,7 +251,7 @@ fi: no_results: "No Results Found" notifications: also_commented: "kommentoi myös %{post_author}:n" - also_commented_deleted: "kommentoi poistettuun viestiin" + also_commented_deleted: "kommentoi poistettuun viestiin." comment_on_post: "kommentoi sinun" deleted: "poistetut" helper: @@ -266,9 +266,9 @@ fi: and_others: "and %{number} others" mark_all_as_read: "Merkitse kaikki luetuiksi" notifications: "Ilmoitukset" - mentioned: "on maininnut sinut heidän" + mentioned: "on maininnut sinut " new_request: "haluaa jakaa kanssasi." - post: "viesti" + post: "viesti." private_message: "sent you a message." request_accepted: "hyväksyi jakopyyntösi." notifier: @@ -398,7 +398,7 @@ fi: notice: "Kuva päivitettiin onnistuneesti." post_visibilites: update: - post_hidden: "%{name}'s post has been hidden." + post_hidden: "Viesti käyttäjältä %{name} on piilotettu." posts: doesnt_exist: "that post does not exist!" previous: "edellinen" @@ -448,7 +448,7 @@ fi: destroy: error: "Ole hyvä, valitse näkymä!" ignore: "Hylätty kontaktipyyntö." - success: "Olette nyt ystäviä." + success: "Olet nyt jakamassa." helper: new_requests: few: "%{count} uutta pyyntöä!" @@ -503,15 +503,15 @@ fi: all_contacts: "Kaikki kontaktit" cannot_remove: "Henkilöä ei voitu poistaa viimeisestä näkymästä. (Jos haluat katkaista yhteyden tähän henkilöön, tulee sinun poistaa kontakti.)" footer: - logged_in_as: "logged in as %{name}" - your_aspects: "your aspects" + logged_in_as: "kirjauduttu sisään käyttäjällä %{name}" + your_aspects: "näkymäsi" invitations: by_email: "Sähköpostilla" dont_have_now: "Sinulla ei ole yhtään kutsua jäljellä, mutta lisää tulee pian!" from_facebook: "Facebookista" invitations_left: "(%{count} jäljellä)" invite_someone: "Kutsu joku" - invite_your_friends: "Kutsu kavereitasi" + invite_your_friends: "Etsi kavereitasi" invites: "Kutsut" invites_closed: "Kutsut on toistaiseksi suljettu tällä Diaspora-palvelimella" notification: @@ -537,8 +537,8 @@ fi: reshare: reshare: "Jaa uudelleen" stream_element: - dislike: "I dislike this" - like: "I like this" + dislike: "En tykkää" + like: "Tykkään" status_messages: create: success: "Successfully mentioned: %{names}" @@ -561,7 +561,7 @@ fi: people_tagged_with: "People tagged with %{tag}" posts_tagged_with: "Posts tagged with #%{tag}" the_world: "maailma" - undo: "Undo?" + undo: "Peruuta?" username: "Käyttäjätunnus" users: destroy: "Käyttäjätilin sulkeminen onnistui." diff --git a/config/locales/diaspora/ja.yml b/config/locales/diaspora/ja.yml index c3f20fcab..0c2707cf2 100644 --- a/config/locales/diaspora/ja.yml +++ b/config/locales/diaspora/ja.yml @@ -219,7 +219,7 @@ ja: to: "To" layouts: application: - have_a_problem: "質問がありましたら、ここでアンサーを。" + have_a_problem: "質問がありましたら、ここからアンサーを" powered_by: "POWERED BY DIASPORA*" public_feed: "%{name}さんの公開ダイアスポラフィード" toggle: "携帯サイトを切替える" diff --git a/config/locales/javascript/javascript.eu.yml b/config/locales/javascript/javascript.eu.yml index 13782b039..6ac6b55f2 100644 --- a/config/locales/javascript/javascript.eu.yml +++ b/config/locales/javascript/javascript.eu.yml @@ -34,4 +34,4 @@ eu: unknown: "Bideo mota ezezaguna" watch: "Ikusi bideo hau {{provider}}(e)n" web_sockets: - disconnected: "The websocket is closed; posts will no longer be streamed live." + disconnected: "Websocketa itxita dago; mezuak ez dira denbora errealean azalduko." From 8261547ed936e92a664e714e21a7fa9082e060e8 Mon Sep 17 00:00:00 2001 From: MrZYX Date: Sun, 8 May 2011 00:54:13 +0200 Subject: [PATCH 23/61] added arabic --- config/locale_settings.yml | 1 + config/locales/cldr/ar_plurals.rb | 1 + 2 files changed, 2 insertions(+) create mode 100644 config/locales/cldr/ar_plurals.rb diff --git a/config/locale_settings.yml b/config/locale_settings.yml index 636fe6e83..c0eff0d96 100644 --- a/config/locale_settings.yml +++ b/config/locale_settings.yml @@ -1,5 +1,6 @@ default: "en" available: + ar: "العربية" bg: "български език" br: "Brezhoneg" ca: "Català" diff --git a/config/locales/cldr/ar_plurals.rb b/config/locales/cldr/ar_plurals.rb new file mode 100644 index 000000000..21ae736b4 --- /dev/null +++ b/config/locales/cldr/ar_plurals.rb @@ -0,0 +1 @@ +{ :ar => { :i18n => {:plural => { :keys => [:zero, :one, :two, :few, :many, :other], :rule => lambda { |n| n == 0 ? :zero : n == 1 ? :one : n == 2 ? :two : [3, 4, 5, 6, 7, 8, 9, 10].include?(n % 100) ? :few : [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99].include?(n % 100) ? :many : :other } } } } } \ No newline at end of file From fc25c9bedbc3977b5a4652aed1559e7fd83f0cc3 Mon Sep 17 00:00:00 2001 From: Dan Hansen Date: Sun, 8 May 2011 10:53:09 -0500 Subject: [PATCH 24/61] Flash message handling is now a widget --- config/assets.yml | 1 + public/javascripts/aspect-edit.js | 2 +- public/javascripts/view.js | 25 +----------------- public/javascripts/widgets/flashes.js | 27 ++++++++++++++++++++ spec/javascripts/support/jasmine.yml | 1 + spec/javascripts/view-spec.js | 27 -------------------- spec/javascripts/widgets/flashes-spec.js | 32 ++++++++++++++++++++++++ 7 files changed, 63 insertions(+), 52 deletions(-) create mode 100644 public/javascripts/widgets/flashes.js create mode 100644 spec/javascripts/widgets/flashes-spec.js diff --git a/config/assets.yml b/config/assets.yml index 6f0b5bed7..427b493a3 100644 --- a/config/assets.yml +++ b/config/assets.yml @@ -32,6 +32,7 @@ javascripts: - public/javascripts/widgets/infinite-scroll.js - public/javascripts/widgets/directionDetector.js - public/javascripts/widgets/notifications.js + - public/javascripts/widgets/flashes.js - public/javascripts/view.js - public/javascripts/stream.js - public/javascripts/search.js diff --git a/public/javascripts/aspect-edit.js b/public/javascripts/aspect-edit.js index 02c3ceb5c..7f78abd3a 100644 --- a/public/javascripts/aspect-edit.js +++ b/public/javascripts/aspect-edit.js @@ -73,7 +73,7 @@ var AspectEdit = { }, success: function(data) { AspectEdit.onMovePersonSuccess(person, dropzone); - View.flashes.render($.parseJSON(data)); + Diaspora.widgets.flashes.render($.parseJSON(data)); } }); } diff --git a/public/javascripts/view.js b/public/javascripts/view.js index dfbfcf6a4..3e9eb2e68 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -10,9 +10,6 @@ var View = { /* Tooltips */ this.tooltips.bindAll(); - /* Animate flashes */ - this.flashes.animate(); - /* In field labels */ $("label").inFieldLabels(); $(document).bind('afterReveal.facebox', function() { @@ -99,26 +96,6 @@ var View = { selector: "#debug_info" }, - flashes: { - animate: function() { - var $this = $(View.flashes.selector); - $this.animate({ - top: 0 - }).delay(2000).animate({ - top: -100 - }, $this.remove) - }, - render: function(result) { - $("
    ") - .attr("id", (result.success) ? "flash_notice" : "flash_error") - .prependTo(document.body) - .html(result.notice); - View.flashes.animate(); - }, - selector: "#flash_notice, #flash_error, #flash_alert" - - }, - gettingStarted: { click: function() { var $this = $(this); @@ -212,7 +189,7 @@ var View = { if(element !== "bindAll") { this[element].bind(); } - }; + } } }, diff --git a/public/javascripts/widgets/flashes.js b/public/javascripts/widgets/flashes.js new file mode 100644 index 000000000..00232cd6a --- /dev/null +++ b/public/javascripts/widgets/flashes.js @@ -0,0 +1,27 @@ +(function() { + var Flashes = function() { + this.start = function() { + this.animateMessages(); + }; + + this.animateMessages = function() { + var $this = $("#flash_notice, #flash_error, #flash_alert"); + $this.animate({ + top: 0 + }).delay(2000).animate({ + top: -100 + }, $this.remove); + }; + + this.render = function(result) { + $("
    ") + .attr("id", (result.success) ? "flash_notice" : "flash_error") + .prependTo(document.body) + .html(result.notice); + + this.animateMessages(); + }; + }; + + Diaspora.widgets.add("flashes", Flashes); +})(); \ No newline at end of file diff --git a/spec/javascripts/support/jasmine.yml b/spec/javascripts/support/jasmine.yml index de698e936..dd353c96f 100644 --- a/spec/javascripts/support/jasmine.yml +++ b/spec/javascripts/support/jasmine.yml @@ -30,6 +30,7 @@ src_files: - public/javascripts/widgets/directionDetector.js - public/javascripts/widgets/infinite-scroll.js - public/javascripts/widgets/notifications.js + - public/javascripts/widgets/flashes.js - public/javascripts/mobile.js - public/javascripts/contact-list.js - public/javascripts/web-socket-receiver.js diff --git a/spec/javascripts/view-spec.js b/spec/javascripts/view-spec.js index ba3a3600f..a2e9eefbe 100644 --- a/spec/javascripts/view-spec.js +++ b/spec/javascripts/view-spec.js @@ -42,33 +42,6 @@ describe("View", function() { }); }); - describe("flashes", function() { - describe("animate", function() { - beforeEach(function() { - $("#jasmine_content").html( - '
    ' + - 'flash! flash! flash!' + - '
    ' - ); - }); - - it("is called when the DOM is ready", function() { - spyOn(View.flashes, "animate").andCallThrough(); - View.initialize(); - expect(View.flashes.animate).toHaveBeenCalled(); - }); - }); - describe("render", function() { - it("creates a new div and calls flashes.animate", function() { - spyOn(View.flashes, "animate"); - View.flashes.render({ - success: true, - message: "success!" - }); - expect(View.flashes.animate).toHaveBeenCalled(); - }); - }); - }); describe("newRequest", function() { beforeEach(function() { diff --git a/spec/javascripts/widgets/flashes-spec.js b/spec/javascripts/widgets/flashes-spec.js new file mode 100644 index 000000000..1ac7061e9 --- /dev/null +++ b/spec/javascripts/widgets/flashes-spec.js @@ -0,0 +1,32 @@ +describe("Diaspora", function() { + describe("widgets", function() { + describe("flashes", function() { + describe("animateMessages", function() { + beforeEach(function() { + $("#jasmine_content").html( + '
    ' + + 'flash message' + + '
    ' + ); + }); + + it("is called when the DOM is ready", function() { + spyOn(Diaspora.widgets.flashes, "animateMessages").andCallThrough(); + Diaspora.widgets.flashes.start(); + expect(Diaspora.widgets.flashes.animateMessages).toHaveBeenCalled(); + }); + }); + + describe("render", function() { + it("creates a new div for the message and calls flashes.animateMessages", function() { + spyOn(Diaspora.widgets.flashes, "animateMessages"); + Diaspora.widgets.flashes.render({ + success: true, + message: "success!" + }); + expect(Diaspora.widgets.flashes.animateMessages).toHaveBeenCalled(); + }); + }); + }); + }); +}); \ No newline at end of file From 3b7dd1906f1b7b48ac5bfe1227ec5c6aa4d50b1e Mon Sep 17 00:00:00 2001 From: MrZYX Date: Sun, 8 May 2011 13:41:55 +0200 Subject: [PATCH 25/61] fixed 500 on /people/:person_id/photos --- app/controllers/photos_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index ba33f6a99..ee21b325d 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -3,7 +3,7 @@ # the COPYRIGHT file. class PhotosController < ApplicationController - helper :comments + helper :comments, :people before_filter :authenticate_user! respond_to :html, :json From 3e3b8e07b20bd829c6a0e5d6cb81d96c37b9538b Mon Sep 17 00:00:00 2001 From: MrZYX Date: Sun, 8 May 2011 14:01:03 +0200 Subject: [PATCH 26/61] add space before adding pid to logline --- lib/splunk_logging.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/splunk_logging.rb b/lib/splunk_logging.rb index 53a79ecea..521631512 100644 --- a/lib/splunk_logging.rb +++ b/lib/splunk_logging.rb @@ -6,7 +6,7 @@ module SplunkLogging end def add_with_splunk(arg1, log_hash = nil, arg3 = nil, &block) string = format_hash(log_hash).dup - string << "pid=#{Process.pid} " + string << " pid=#{Process.pid} " add_without_splunk(arg1, string, arg3, &block) end def format_hash(hash) From 50e67524c1b49f5afa836ee3435f7727a632e8ec Mon Sep 17 00:00:00 2001 From: Dan Hansen Date: Sun, 8 May 2011 15:18:02 -0500 Subject: [PATCH 27/61] content update wip --- public/javascripts/content-updates.js | 26 +++++++++++++++++ public/javascripts/web-socket-receiver.js | 20 +------------ spec/controllers/aspects_controller_spec.rb | 2 ++ spec/javascripts/content-updates-spec.js | 32 +++++++++++++++++++++ spec/javascripts/support/jasmine.yml | 1 + 5 files changed, 62 insertions(+), 19 deletions(-) create mode 100644 public/javascripts/content-updates.js create mode 100644 spec/javascripts/content-updates-spec.js diff --git a/public/javascripts/content-updates.js b/public/javascripts/content-updates.js new file mode 100644 index 000000000..55eca2422 --- /dev/null +++ b/public/javascripts/content-updates.js @@ -0,0 +1,26 @@ +/* Copyright (c) 2010, Diaspora Inc. This file is +* licensed under the Affero General Public License version 3 or later. See +* the COPYRIGHT file. +*/ + +var ContentUpdates = { + addPostToStream: function(postId, html) { + if( $(".stream_element[data-guid='" + postId + "']").length === 0 ) { + var streamElement = $(html); + + if($("#no_posts").length) { + $("#no_posts").detach(); + } + + streamElement.prependTo("#main_stream:not('.show')").fadeIn("fast", function() { + streamElement.find("label").inFieldLabels(); + }); + + + Diaspora.widgets.publish("stream/postAdded", [postId]); + + Diaspora.widgets.timeago.updateTimeAgo(); + Diaspora.widgets.directionDetector.updateBinds(); + } + } +}; \ No newline at end of file diff --git a/public/javascripts/web-socket-receiver.js b/public/javascripts/web-socket-receiver.js index 505afadfb..64e4c6ba8 100644 --- a/public/javascripts/web-socket-receiver.js +++ b/public/javascripts/web-socket-receiver.js @@ -133,25 +133,7 @@ var WebSocketReceiver = { }, addPostToStream: function(postId, html) { - if( $(".stream_element[data-guid='" + postId + "']").length === 0 ) { - var streamElement = $(html); - - var showMessage = function() { - $("#main_stream:not('.show')").prepend( - streamElement.fadeIn("fast", function() { - streamElement.find("label").inFieldLabels(); - }) - ); - }; - - if( $("#no_posts").is(":visible") ) { - $("#no_posts").fadeOut(400, showMessage()).hide(); - } else { - showMessage(); - } - Diaspora.widgets.timeago.updateTimeAgo(); - Diaspora.widgets.directionDetector.updateBinds(); - } + }, onPageForClass: function(className) { diff --git a/spec/controllers/aspects_controller_spec.rb b/spec/controllers/aspects_controller_spec.rb index 9923d99e8..95d65af7a 100644 --- a/spec/controllers/aspects_controller_spec.rb +++ b/spec/controllers/aspects_controller_spec.rb @@ -68,6 +68,8 @@ describe AspectsController do bob.comment("what", :on => message) get :index save_fixture(html_for("body"), "aspects_index_with_posts") + + save_fixture(html_for(".stream_element:first"), "status_message_in_stream") end context 'with getting_started = true' do diff --git a/spec/javascripts/content-updates-spec.js b/spec/javascripts/content-updates-spec.js new file mode 100644 index 000000000..eea6abecf --- /dev/null +++ b/spec/javascripts/content-updates-spec.js @@ -0,0 +1,32 @@ +/* Copyright (c) 2010, Diaspora Inc. This file is +* licensed under the Affero General Public License version 3 or later. See +* the COPYRIGHT file. +*/ +describe("ContentUpdates", function() { + describe("addPostToStream", function() { + beforeEach(function() { + $("#jasmine_content").empty(); + spec.loadFixture("aspects_index_with_posts"); + }); + + it("adds a post to the stream", function() { + var originalPostCount = $(".stream_element").length; + ContentUpdates.addPostToStream("guid", spec.fixtureHtml("status_message_in_stream")); + expect($(".stream_element").length).toBeGreaterThan(originalPostCount); + }); + + it("does not add duplicate posts", function() { + ContentUpdates.addPostToStream("guid", spec.fixtureHtml("status_message_in_stream")); + var originalPostCount = $(".stream_element").length; + ContentUpdates.addPostToStream("guid", spec.fixtureHtml("status_message_in_stream")); + expect($(".stream_element").length).toEqual(originalPostCount); + }); + + it("removes the div that says you have no posts if it exists", function() { + spec.loadFixture("aspects_index"); + expect($("#no_posts").length).toEqual(1); + ContentUpdates.addPostToStream("guid", spec.fixtureHtml("status_message_in_stream")); + expect($("#no_posts").length).toEqual(0); + }); + }); +}); diff --git a/spec/javascripts/support/jasmine.yml b/spec/javascripts/support/jasmine.yml index dd353c96f..9f56fb62b 100644 --- a/spec/javascripts/support/jasmine.yml +++ b/spec/javascripts/support/jasmine.yml @@ -40,6 +40,7 @@ src_files: - public/javascripts/validation.js - public/javascripts/rails.js - public/javascripts/aspect-filters.js + - public/javascripts/content-updates.js # stylesheets # # Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs. From a904204f46df9ab117dfaad92324c322532a16db Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Sun, 8 May 2011 14:22:40 -0700 Subject: [PATCH 28/61] Content updater refactor complete for posts --- ...{content-updates.js => content-updater.js} | 11 +++++----- public/javascripts/web-socket-receiver.js | 6 +----- ...pdates-spec.js => content-updater-spec.js} | 20 ++++++++++--------- spec/javascripts/support/jasmine.yml | 2 +- 4 files changed, 18 insertions(+), 21 deletions(-) rename public/javascripts/{content-updates.js => content-updater.js} (72%) rename spec/javascripts/{content-updates-spec.js => content-updater-spec.js} (59%) diff --git a/public/javascripts/content-updates.js b/public/javascripts/content-updater.js similarity index 72% rename from public/javascripts/content-updates.js rename to public/javascripts/content-updater.js index 55eca2422..7cb24d308 100644 --- a/public/javascripts/content-updates.js +++ b/public/javascripts/content-updater.js @@ -3,11 +3,12 @@ * the COPYRIGHT file. */ -var ContentUpdates = { - addPostToStream: function(postId, html) { - if( $(".stream_element[data-guid='" + postId + "']").length === 0 ) { - var streamElement = $(html); +var ContentUpdater = { + addPostToStream: function(html) { + var streamElement = $(html); + var postId = streamElement.attr("data-guid"); + if($(".stream_element[data-guid='" + postId + "']").length === 0) { if($("#no_posts").length) { $("#no_posts").detach(); } @@ -16,9 +17,7 @@ var ContentUpdates = { streamElement.find("label").inFieldLabels(); }); - Diaspora.widgets.publish("stream/postAdded", [postId]); - Diaspora.widgets.timeago.updateTimeAgo(); Diaspora.widgets.directionDetector.updateBinds(); } diff --git a/public/javascripts/web-socket-receiver.js b/public/javascripts/web-socket-receiver.js index 64e4c6ba8..c244ea05a 100644 --- a/public/javascripts/web-socket-receiver.js +++ b/public/javascripts/web-socket-receiver.js @@ -128,14 +128,10 @@ var WebSocketReceiver = { processPost: function(className, postId, html, aspectIds) { if(WebSocketReceiver.onPageForAspects(aspectIds)) { - WebSocketReceiver.addPostToStream(postId, html); + ContentUpdater.addPostToStream(postId, html); } }, - addPostToStream: function(postId, html) { - - }, - onPageForClass: function(className) { return (location.href.indexOf(className) != -1 ); }, diff --git a/spec/javascripts/content-updates-spec.js b/spec/javascripts/content-updater-spec.js similarity index 59% rename from spec/javascripts/content-updates-spec.js rename to spec/javascripts/content-updater-spec.js index eea6abecf..df0bc5ae0 100644 --- a/spec/javascripts/content-updates-spec.js +++ b/spec/javascripts/content-updater-spec.js @@ -2,30 +2,32 @@ * licensed under the Affero General Public License version 3 or later. See * the COPYRIGHT file. */ -describe("ContentUpdates", function() { + +describe("ContentUpdater", function() { describe("addPostToStream", function() { + beforeEach(function() { $("#jasmine_content").empty(); - spec.loadFixture("aspects_index_with_posts"); + spec.loadFixture("aspects_index"); }); it("adds a post to the stream", function() { var originalPostCount = $(".stream_element").length; - ContentUpdates.addPostToStream("guid", spec.fixtureHtml("status_message_in_stream")); - expect($(".stream_element").length).toBeGreaterThan(originalPostCount); + ContentUpdater.addPostToStream(spec.fixtureHtml("status_message_in_stream")); + expect($(".stream_element").length).toEqual(originalPostCount + 1); }); it("does not add duplicate posts", function() { - ContentUpdates.addPostToStream("guid", spec.fixtureHtml("status_message_in_stream")); var originalPostCount = $(".stream_element").length; - ContentUpdates.addPostToStream("guid", spec.fixtureHtml("status_message_in_stream")); - expect($(".stream_element").length).toEqual(originalPostCount); + ContentUpdater.addPostToStream(spec.fixtureHtml("status_message_in_stream")); + expect($(".stream_element").length).toEqual(originalPostCount + 1); + ContentUpdater.addPostToStream(spec.fixtureHtml("status_message_in_stream")); + expect($(".stream_element").length).toEqual(originalPostCount + 1); }); it("removes the div that says you have no posts if it exists", function() { - spec.loadFixture("aspects_index"); expect($("#no_posts").length).toEqual(1); - ContentUpdates.addPostToStream("guid", spec.fixtureHtml("status_message_in_stream")); + ContentUpdater.addPostToStream(spec.fixtureHtml("status_message_in_stream")); expect($("#no_posts").length).toEqual(0); }); }); diff --git a/spec/javascripts/support/jasmine.yml b/spec/javascripts/support/jasmine.yml index 9f56fb62b..707fb41ad 100644 --- a/spec/javascripts/support/jasmine.yml +++ b/spec/javascripts/support/jasmine.yml @@ -40,7 +40,7 @@ src_files: - public/javascripts/validation.js - public/javascripts/rails.js - public/javascripts/aspect-filters.js - - public/javascripts/content-updates.js + - public/javascripts/content-updater.js # stylesheets # # Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs. From aa4fbfbe1a58155d6096c012aa408fc5ec5271eb Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Sun, 8 May 2011 19:01:26 -0700 Subject: [PATCH 29/61] Use a fixture in stream-spec --- spec/javascripts/stream-spec.js | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/spec/javascripts/stream-spec.js b/spec/javascripts/stream-spec.js index 19b6e71e6..4b0a16275 100644 --- a/spec/javascripts/stream-spec.js +++ b/spec/javascripts/stream-spec.js @@ -6,31 +6,7 @@ describe("Stream", function() { beforeEach(function() { jasmine.Clock.useMock(); - $('#jasmine_content').html( - '
    ' + - '
  • ' + - '
    ' + - '
    ' + - 'show comments (0)' + - '
    ' + - '' + - '
    ' + - '
  • ' + - '' - ); + spec.loadFixture('aspects_index_with_posts'); }); describe("initialize", function() { @@ -48,16 +24,17 @@ describe("Stream", function() { Stream.initialize(); }); it("toggles class hidden on the comment block", function () { - expect(jQuery('ul.comments')).toHaveClass("hidden"); + expect(jQuery('ul.comments')).not.toHaveClass("hidden"); $("a.show_post_comments").click(); jasmine.Clock.tick(200); - expect(jQuery('ul.comments')).not.toHaveClass("hidden"); + expect(jQuery('ul.comments')).toHaveClass("hidden"); }); it("changes the text on the show comments link", function() { + expect($("a.show_post_comments").text()).toEqual("hide comments (1)"); $("a.show_post_comments").click(); jasmine.Clock.tick(200); - expect($("a.show_post_comments").text()).toEqual("hide comments (0)"); + expect($("a.show_post_comments").text()).toEqual("show comments (1)"); }); }); }); From ffd96d989c69919c9241e02ad0d331dacae4a407 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Sun, 8 May 2011 20:31:13 -0700 Subject: [PATCH 30/61] Update publisher callback to use ContentUpdater --- config/assets.yml | 1 + public/javascripts/stream.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/assets.yml b/config/assets.yml index 427b493a3..0b7d8a1d0 100644 --- a/config/assets.yml +++ b/config/assets.yml @@ -35,6 +35,7 @@ javascripts: - public/javascripts/widgets/flashes.js - public/javascripts/view.js - public/javascripts/stream.js + - public/javascripts/content-updater.js - public/javascripts/search.js mobile: - public/javascripts/vendor/jquery152.min.js diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index f48f4d198..b361ed9ee 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -72,7 +72,7 @@ var Stream = { }); $(".new_status_message").live('ajax:success', function(data, json, xhr) { - WebSocketReceiver.addPostToStream(json.post_id, json.html); + ContentUpdater.addPostToStream(json.html); //collapse publisher Publisher.close(); Publisher.clear(); From 9d2849d8518e9aa86e3a5f728321b4c805d57e86 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Sun, 8 May 2011 20:40:35 -0700 Subject: [PATCH 31/61] Move publisher ajax stuff into publisher.js --- public/javascripts/publisher.js | 26 ++++++++++++++++++++++++++ public/javascripts/stream.js | 23 ----------------------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/public/javascripts/publisher.js b/public/javascripts/publisher.js index 621935201..29176218f 100644 --- a/public/javascripts/publisher.js +++ b/public/javascripts/publisher.js @@ -338,6 +338,31 @@ var Publisher = { } }); }, + onSubmit: function(data, json, xhr){ + $("#photodropzone").find('li').remove(); + $("#publisher textarea").removeClass("with_attachments").css('paddingBottom', ''); + }, + onFailure: function(data, json, xhr){ + json = $.parseJSON(html.responseText); + if(json.errors.length !== 0){ + Diaspora.widgets.alert.alert(json.errors); + }else{ + Diaspora.widgets.alert.alert('Failed to post message!'); + } + }, + onSuccess: function(data, json, xhr){ + ContentUpdater.addPostToStream(json.html); + //collapse publisher + Publisher.close(); + Publisher.clear(); + //Stream.setUpImageLinks(); + Stream.setUpAudioLinks(); + }, + bindAjax: function(){ + Publisher.form().bind('ajax:loading', Publisher.onSubmit); + Publisher.form().bind('ajax:failure', Publisher.onFailure); + Publisher.form().bind('ajax:success', Publisher.onSuccess); + }, initialize: function() { Publisher.cachedForm = Publisher.cachedSubmit = Publisher.cachedInput = Publisher.cachedHiddenInput = false; @@ -354,6 +379,7 @@ var Publisher = { Publisher.hiddenInput().val(Publisher.input().val()); Publisher.input().keydown(Publisher.autocompletion.keyDownHandler); Publisher.input().keyup(Publisher.autocompletion.keyUpHandler); + Publisher.bindAjax(); Publisher.form().find("textarea").bind("focus", function(evt) { Publisher.open(); }); diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index b361ed9ee..03d6df209 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -66,29 +66,6 @@ var Stream = { } }); - $(".new_status_message").live('ajax:loading', function(data, json, xhr) { - $("#photodropzone").find('li').remove(); - $("#publisher textarea").removeClass("with_attachments").css('paddingBottom', ''); - }); - - $(".new_status_message").live('ajax:success', function(data, json, xhr) { - ContentUpdater.addPostToStream(json.html); - //collapse publisher - Publisher.close(); - Publisher.clear(); - //Stream.setUpImageLinks(); - Stream.setUpAudioLinks(); - }); - - $(".new_status_message").live('ajax:failure', function(data, html , xhr) { - json = $.parseJSON(html.responseText); - if(json.errors.length !== 0){ - Diaspora.widgets.alert.alert(json.errors); - }else{ - Diaspora.widgets.alert.alert('Failed to post message!'); - } - }); - $(stream_string + ".new_comment").live('ajax:failure', function(data, html, xhr) { Diaspora.widgets.alert.alert('Failed to post message!'); }); From 68601e392ea47f2fa642e2012eb3500f2d102a04 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Sun, 8 May 2011 22:15:26 -0700 Subject: [PATCH 32/61] halfway to a better welcome/getting started page. wip. --- app/views/home/show.html.haml | 8 + public/default.html | 223 ++++++------------------ public/images/icons/cog.png | Bin 0 -> 1019 bytes public/images/icons/pen_write.png | Bin 0 -> 719 bytes public/images/icons/smiley_laughing.png | Bin 0 -> 1230 bytes 5 files changed, 63 insertions(+), 168 deletions(-) create mode 100644 public/images/icons/cog.png create mode 100644 public/images/icons/pen_write.png create mode 100644 public/images/icons/smiley_laughing.png diff --git a/app/views/home/show.html.haml b/app/views/home/show.html.haml index 6cb05994b..37a71fba2 100644 --- a/app/views/home/show.html.haml +++ b/app/views/home/show.html.haml @@ -2,6 +2,14 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. +:css + header{ + display:none; + } + body{ + margin-top: 20px; + } + - content_for :page_title do DIASPORA* ALPHA - begin diff --git a/public/default.html b/public/default.html index 81ae44233..c14aefbeb 100644 --- a/public/default.html +++ b/public/default.html @@ -2,212 +2,99 @@ Diaspora: Getting Started - - +
    -
    -