social_stream-base 0.24.0 → 0.24.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,7 +34,7 @@ SocialStream.Wall = (function(SS, $, undefined){
34
34
  $('.activity_form_selector').removeClass('selected');
35
35
  $(this).addClass('selected');
36
36
  $('#wrapper_activities_header form').hide();
37
- $('#new_'+this.id.split("_")[1]).show();
37
+ $('#' + this.id.replace(/^select/, 'new')).show();
38
38
  });
39
39
  }
40
40
 
@@ -18,7 +18,13 @@ module ContactsHelper
18
18
  if user_signed_in?
19
19
  contact_link current_subject.contact_to!(a)
20
20
  else
21
- link_to t("contact.new.link"), new_user_session_path
21
+ if SocialStream.relation_model == :follow
22
+ form_tag new_user_session_path do |f|
23
+ submit_tag t('contact.follow')
24
+ end
25
+ else
26
+ link_to t("contact.new.link"), new_user_session_path
27
+ end
22
28
  end
23
29
  end
24
30
  end
@@ -197,8 +197,8 @@ class Activity < ActiveRecord::Base
197
197
  case verb
198
198
  when "follow", "make-friend", "like"
199
199
  I18n.t "activity.verb.#{ verb }.#{ receiver.subject_type }.title",
200
- :subject => view.link_name(sender_subject),
201
- :contact => view.link_name(receiver_subject)
200
+ :subject => view.link_name(sender_subject),
201
+ :contact => view.link_name(receiver_subject)
202
202
  when "post", "update"
203
203
  if sender == receiver
204
204
  view.link_name sender_subject
@@ -207,6 +207,11 @@ class Activity < ActiveRecord::Base
207
207
  :sender => view.link_name(sender_subject),
208
208
  :receiver => view.link_name(receiver_subject)
209
209
  end
210
+ when 'join'
211
+ I18n.t('notification.join.one',
212
+ :sender => view.link_name(sender_subject),
213
+ :thing => I18n.t(direct_object.class.to_s.underscore+'.one'),
214
+ :title => title_of(direct_object))
210
215
  else
211
216
  "Must define activity title"
212
217
  end.html_safe
@@ -230,20 +235,20 @@ class Activity < ActiveRecord::Base
230
235
  def stream_content
231
236
  stream_title
232
237
  end
233
-
238
+
234
239
  def notificable?
235
240
  is_root? or ['post','update'].include?(root.verb)
236
241
  end
237
242
 
238
243
  def notify
239
244
  return true unless notificable?
240
- #Avaible verbs: follow, like, make-friend, post, update
245
+ #Avaible verbs: follow, like, make-friend, post, update, join
241
246
 
242
247
  if direct_object.is_a? Comment
243
248
  participants.each do |p|
244
249
  p.notify(notification_subject, "Youre not supposed to see this", self) unless p == sender
245
250
  end
246
- elsif ['like','follow','make-friend','post','update'].include? verb and !reflexive?
251
+ elsif ['like','follow','make-friend','post','update', 'join'].include? verb and !reflexive?
247
252
  receiver.notify(notification_subject, "Youre not supposed to see this", self)
248
253
  end
249
254
  true
@@ -346,6 +351,12 @@ class Activity < ActiveRecord::Base
346
351
  :whose => I18n.t('notification.whose.'+ receiver.subject.class.to_s.underscore,
347
352
  :receiver => receiver_name),
348
353
  :thing => I18n.t(direct_object.class.to_s.underscore+'.one'))
354
+ when 'join'
355
+ I18n.t('notification.join.one' ,
356
+ :sender => sender_name,
357
+ :thing => I18n.t(direct_object.class.to_s.underscore+'.title.one'),
358
+ :title => title_of(direct_object))
359
+
349
360
  else
350
361
  t('notification.default')
351
362
  end
@@ -1,6 +1,6 @@
1
1
  class ActivityVerb < ActiveRecord::Base
2
2
  # Activity Strems verbs
3
- Available = %w(follow like make-friend post update)
3
+ Available = %w(follow like make-friend post update join)
4
4
 
5
5
  validates_uniqueness_of :name
6
6
 
@@ -37,7 +37,7 @@ class Comment < ActiveRecord::Base
37
37
  def decrement_comment_count
38
38
  return if self.post_activity.blank? || self.post_activity.parent.blank?
39
39
 
40
- self.post_activity.parent.direct_activity_object.decrement!(:comment_count)
40
+ self.post_activity.parent.direct_activity_object.try(:decrement!, :comment_count)
41
41
  end
42
42
 
43
43
  end
@@ -0,0 +1,16 @@
1
+ # Site is used to store the global configuration. Example:
2
+ #
3
+ # Site.config[:host] = 'example.com'
4
+ # Site.save!
5
+ class Site < ActiveRecord::Base
6
+ attr_accessible :config
7
+
8
+ serialize :config, Hash
9
+
10
+ class << self
11
+ def current
12
+ @current ||=
13
+ first || create!
14
+ end
15
+ end
16
+ end
@@ -2,9 +2,13 @@
2
2
  <% locale_as @receiver.subject %>
3
3
  <%= t('notification.hello', :receiver => @receiver.name)%>
4
4
 
5
- <%= render :partial => "notifications/activities/#{ @notification.notified_object.verb }",
5
+ <% if @notification.notified_object.verb == 'join' %>
6
+ <%= render :partial => "notifications/activities/join_#{ @notification.notified_object.direct_object.class.to_s.underscore }",
7
+ :locals =>{:activity => @notification.notified_object} %>
8
+ <% else %>
9
+ <%= render :partial => "notifications/activities/#{ @notification.notified_object.verb }",
6
10
  :locals =>{:activity => @notification.notified_object}%>
7
-
11
+ <% end %>
8
12
 
9
13
  -----------------------------------------------
10
14
  <%= raw t('notification.visit', :url=> notifications_url)%>
@@ -15,10 +15,19 @@
15
15
  <%= t('time.ago', :time => time_ago_in_words(notification.created_at)) %>
16
16
  </div>
17
17
  </div>
18
+
19
+
20
+
18
21
  <div class="content_right">
19
22
  <div class="briefing">
20
- <%= render :partial => "notifications/activities/#{ notification.notified_object.verb }",
23
+ <% if notification.notified_object.verb == 'join' %>
24
+ <%= render :partial => "notifications/activities/join_#{ notification.notified_object.direct_object.class.to_s.underscore }",
25
+ :locals =>{:activity => notification.notified_object} %>
26
+ <% else %>
27
+
28
+ <%= render :partial => "notifications/activities/#{ notification.notified_object.verb }",
21
29
  :locals =>{:activity => notification.notified_object} %>
30
+ <% end %>
22
31
  </div>
23
32
  <div class="clearfloat">
24
33
  </div>
@@ -0,0 +1,15 @@
1
+ <div class="subject">
2
+ <%= raw t('notification.join.one' ,
3
+ :sender => link_to(truncate_name(activity.sender.name), polymorphic_url(activity.sender.subject)),
4
+ :thing => I18n.t(activity.direct_object.class.to_s.underscore+'.one'),
5
+ :title => title_of(activity.direct_object)) %>
6
+ </div>
7
+ <div class="briefing">
8
+ <% if activity.direct_object.respond_to? :text %>
9
+ "<%= link_to(sanitize(activity.direct_object.text.truncate(100, :separator =>' ')),
10
+ notification_url_of(activity.direct_object, @notification))%>"
11
+ <% else%>
12
+ <%= link_to(t('notification.watch_it'),
13
+ notification_url_of( activity.direct_object, @notification))%>
14
+ <%end%>
15
+ </div>
@@ -0,0 +1,8 @@
1
+ <%= raw t('notification.join.one' ,
2
+ :sender => link_to(truncate_name(activity.sender.name), polymorphic_url(activity.sender.subject)),
3
+ :thing => I18n.t(activity.direct_object.class.to_s.underscore+'.one'),
4
+ :title => title_of(activity.direct_object)) %>
5
+
6
+ <%= raw t('notification.look', :sender => truncate_name(activity.sender.name))%>: <%=polymorphic_url(activity.sender.subject)%>
7
+ <%= raw t('notification.confirm', :sender => truncate_name(activity.sender.name)) %> <%= edit_contact_url(activity.receiver.contact_to!(activity.sender),
8
+ :s => activity.receiver.slug)%>
@@ -66,7 +66,6 @@ en:
66
66
  atom_title: "Activity Stream from %{subject}"
67
67
  title:
68
68
  follow: "%{author} added %{activity_object} as contact"
69
- unfollow: "%{author} removed %{activity_object} as contact"
70
69
  like: "%{author} likes %{activity_object}"
71
70
  make-friend: "%{author} also added %{activity_object} as contact"
72
71
  post: "%{author} posted %{activity_object}"
@@ -89,6 +88,8 @@ en:
89
88
  Group:
90
89
  title: "%{subject} is a fan of %{contact}."
91
90
  message: "%{name} is now your fan."
91
+ join:
92
+ one: "%{sender} joined the %{title} %{thing}."
92
93
  make-friend:
93
94
  User:
94
95
  title: "%{subject} and %{contact} are now connected."
@@ -0,0 +1,552 @@
1
+ zh:
2
+ language_name: "中文"
3
+ actor:
4
+ name: "姓名"
5
+ action:
6
+ send: "送出"
7
+ accept: "接收"
8
+ account:
9
+ cancel: "取消帐号"
10
+ edit: "编辑帐号"
11
+ email:
12
+ change: "更改邮箱地址"
13
+ lang:
14
+ change: "切换语言"
15
+ one: "帐号"
16
+ password:
17
+ change: "修改密码"
18
+ new: "新密码"
19
+ retype: "再次输入新密码"
20
+ privacy: "私隐"
21
+ activerecord:
22
+ attributes:
23
+ contact:
24
+ relation_ids: "联系方式"
25
+ relation/custom:
26
+ name: "姓名"
27
+ user:
28
+ email: "邮箱"
29
+ name: "姓名"
30
+ password: "密码"
31
+ password_confirmation: "确定密码"
32
+ remember_me: "记住我"
33
+ activity:
34
+ audience:
35
+ hidden:
36
+ summary: "禁止"
37
+ full: "连接分享 %{audience}"
38
+ public:
39
+ summary: "公开"
40
+ full: "分享给网络"
41
+ show: "展示"
42
+ visible:
43
+ summary: "禁止"
44
+ full: "分享 %{audience}"
45
+ confirm_delete: "刪除活动?"
46
+ delete: "删除"
47
+ last: "次前活动"
48
+ like: "我喜爱"
49
+ like_sentence:
50
+ one: "%{likers} 喜欢这个"
51
+ other: "%{likers} 喜欢这个"
52
+ more:
53
+ one: "一个活动"
54
+ other: "很多活动"
55
+ privacy:
56
+ myself:
57
+ contacts:
58
+ group: "所有会员"
59
+ user: "发送给"
60
+ outside:
61
+ contacts:
62
+ group: "会员的 %{receiver}"
63
+ user: "联系的 %{receiver}"
64
+ sending: "传送中"
65
+ stream:
66
+ atom_title: "%{subject}的活动流"
67
+ title:
68
+ follow: "%{author}已加了%{activity_object}為关连"
69
+ like: "%{author}喜欢%{activity_object}"
70
+ make-friend: "%{author}还加了%{activity_object}为关连"
71
+ post: "%{author}发布了%{activity_object}"
72
+ updated: "%{author}更新了%{activity_object}"
73
+ title: "活动"
74
+ to_comment: "评论"
75
+ unlike: "我不再喜欢了"
76
+ verb:
77
+ follow:
78
+ User:
79
+ title: "%{subject} 已加 %{contact} 作为联络."
80
+ message: "%{name} 已加您作为联系人."
81
+ Group:
82
+ title: "%{subject} 已加 %{contact} 作为联络."
83
+ message: "%{name} 已加您作为联络."
84
+ like:
85
+ User:
86
+ title: "%{subject} 已成为粉丝 %{contact}."
87
+ message: "%{name} 已成为你的粉丝."
88
+ Group:
89
+ title: "%{subject} 已成为粉丝 %{contact}."
90
+ message: "%{name} 已成为你的粉丝."
91
+ make-friend:
92
+ User:
93
+ title: "%{subject} 和 %{contact} 现已連结."
94
+ message: "%{姓名} 已加您作为联系人."
95
+ Group:
96
+ title: "%{subject} 已加 %{contact} 联络."
97
+ message: "%{name} 已加您作为联系人."
98
+ post:
99
+ title:
100
+ other_wall: "%{sender} → %{receiver}"
101
+ activity_action:
102
+ follow: "关注"
103
+ sentence:
104
+ follow:
105
+ one: "%{followers} 关注这个"
106
+ other: "%{followers} 关注这个"
107
+ more:
108
+ one: "%{count} 一个人"
109
+ other: "%{count} 再多些人"
110
+ unfollow: "不再关注"
111
+ browse: "浏览"
112
+ button:
113
+ cancel: "取消"
114
+ create: "创建"
115
+ save: "保存"
116
+ update: "更新"
117
+ cheesecake:
118
+ changes:
119
+ details: "更改详情"
120
+ none: "沒有更改"
121
+ save: "保存更改"
122
+ saving: "保存中..."
123
+ form:
124
+ editing: "编辑中..."
125
+ fields:
126
+ color: "颜色"
127
+ name: "姓名"
128
+ permissions: "权限"
129
+ subsector: "界别分组"
130
+ select:
131
+ hint: "点击图片以便选择"
132
+ comment:
133
+ input: "请填写评论..."
134
+ confirm_delete: "删除评论?"
135
+ name: "评论"
136
+ one: "一篇评论"
137
+ title:
138
+ one: "评论"
139
+ other: "所有评论"
140
+ view_all: "查看所有评论 "
141
+ contact:
142
+ addressbook: "我的通讯录"
143
+ all_n: "所有联系(%{count})"
144
+ confirm_delete: "刪除联系?"
145
+ current: "近期"
146
+ delete: "刪除"
147
+ edit:
148
+ title: "编辑联络 %{name}"
149
+ submit: "编辑联络"
150
+ error_count:
151
+ one: "一个错误导致不能保存这个联络 :"
152
+ other: "%{count} 有一些错误导致不能保存这个联络:"
153
+ follow: "关注"
154
+ following: "关注中"
155
+ graph:
156
+ one: "图片"
157
+ empty: "对不起, 您沒有任何联系人. 您可以通过查找功能去查找可能认识的朋友!"
158
+ in_common:
159
+ one: "一个共同联系人"
160
+ other: "%{count} 共同联系人"
161
+ new:
162
+ link: "+ 加入联络"
163
+ title: "加入 %{name} 到您的联系人列表"
164
+ menu: "加入联络"
165
+ submit: "加入联络"
166
+ one: "联络"
167
+ other: "联系"
168
+ pending:
169
+ other: "暂缓"
170
+ all: "所有"
171
+ all_n: "查看所有暂缓申请 (%{count})"
172
+ relation:
173
+ one: "联络类别"
174
+ new: "新类别"
175
+ reply:
176
+ link: "+ 回复联系人"
177
+ title: "回复联络申请至 %{name}"
178
+ submit: "回复"
179
+ link: "+ 回复联系人"
180
+ suggestion:
181
+ one: "建议"
182
+ other: "建议"
183
+ all: "所有"
184
+ type:
185
+ new: "+ 新类别"
186
+ unfollow: "不再关注"
187
+ copyright: "2010 版权 - 版权所有"
188
+ delete:
189
+ confirm: 刪除 %{element}}?
190
+ devise:
191
+ links:
192
+ sign_in: "登录"
193
+ sign_up: "注册"
194
+ forgot_password: "忘了您的密码?"
195
+ confirmation_instructions: "还没收到激活指引吗?"
196
+ unlock_instructions: "还没收到解锁指引吗?"
197
+ sign_in_with: "以 %{provider} 登录"
198
+ passwords:
199
+ confirm: "确认密码"
200
+ forgot: "忘了?"
201
+ instructions: "请输入你的帐号关联的邮箱, 以便我们给您发送更改指示:"
202
+ update: "更改您的密码"
203
+ follower:
204
+ follower:
205
+ title: "粉丝"
206
+ following:
207
+ title: "关注"
208
+ n:
209
+ one: "一个粉丝"
210
+ other: "%{count} 粉丝"
211
+ forgot_password: "忘了您的密码吗?"
212
+ frontpage:
213
+ collaborate:
214
+ default: "合作"
215
+ sentence1: "组织您的习作和活动"
216
+ sentence2: "参与会议和活动"
217
+ sentence3: "创建您的群组和会议"
218
+ elements:
219
+ comments: "评论"
220
+ conferences: "发布会"
221
+ networks: "社交网络"
222
+ organizers: "主办单位"
223
+ participants: "参加者"
224
+ groups: "群组"
225
+ tags: "标记"
226
+ main_title: "社交视频互动是我们建立社交网的核心."
227
+ meet:
228
+ default: "认识"
229
+ sentence1: "认识有趣的人和群组"
230
+ sentence2: " 寻找于你相关的最新活动"
231
+ register: "请注册!"
232
+ share:
233
+ default: "分享"
234
+ sentence1: " 您的习作和活动"
235
+ sentence2: "近况, 照片, 音频 和 视频"
236
+ stats: "%{users} 用户 和 %{groups} 已注册的群组"
237
+ group:
238
+ one: "群组"
239
+ other: "群组"
240
+ all: "所有群组"
241
+ all_n: "所有群组 (%{count})"
242
+ by: "被群组"
243
+ destroy:
244
+ one: "删除群组"
245
+ explanation: "所有和这个群组相关的活动的资料和联系会被删除!"
246
+ go_ahead: "是, 我肯定. 删除所有東西!"
247
+ last_confirm: "这是您最后机会. 您肯定吗?"
248
+ form:
249
+ title: "群组"
250
+ input: "这个群组叫什么名称?"
251
+ last: "最後的群组"
252
+ my: "我的群组"
253
+ new:
254
+ action: "新群组"
255
+ name: "名称"
256
+ description: "描述"
257
+ participants: "参与者"
258
+ cloud: "群组标记云"
259
+ most:
260
+ followed: "最多人关注"
261
+ liked: "最受欢迎"
262
+ tags: "标记"
263
+ title:
264
+ one: "群组"
265
+ other: "群组们"
266
+ help: "帮助"
267
+ helpers:
268
+ submit:
269
+ relation_custom:
270
+ create: "保存"
271
+ update: "更新"
272
+ home: "主页"
273
+ inbox:
274
+ one: "收件箱"
275
+ invitation:
276
+ e-mails: "电子邮箱"
277
+ error: "您的申请未能被处理. 请确定您的邮箱地址是否正确无误."
278
+ invited: "%{sender} 已邀请您到 %{site}!"
279
+ join: "邀请其他人加入 %{site}!"
280
+ join_me: "跟我一起在 %{site}!"
281
+ one: "邀请"
282
+ other: "邀请"
283
+ toolbar: "邀请"
284
+ success: "您的邀请已成功发送"
285
+ text: "写上您的讯息"
286
+ like:
287
+ n:
288
+ one: "一个粉丝"
289
+ other: "%{count} 粉丝们"
290
+ location:
291
+ message: "您在此 > %{location}"
292
+ base: "您在此"
293
+ separator: " > "
294
+ mailboxer:
295
+ delete: "刪除"
296
+ delete_confirm: "您要把 '%{object}' 移除到垃圾桶?"
297
+ form:
298
+ body: "主体"
299
+ recipients: "收件人"
300
+ subject: "主题"
301
+ mark_as_read: "标记已读"
302
+ message_mailer:
303
+ has_sent_new:
304
+ event: "己发送新讯息 %{receiver}"
305
+ group: "己发送新讯息 %{receiver}"
306
+ user: "己给您发送新讯息"
307
+ has_sent_reply:
308
+ event: "已给您回复 %{receiver}"
309
+ group: "已给您回复 %{receiver}"
310
+ user: "已给您回复"
311
+ subject_new: "%{subject}"
312
+ subject_reply: "%{subject}"
313
+ notification_mailer:
314
+ subject: "%{subject}"
315
+ reply: "回复"
316
+ send: "发送讯息"
317
+ sent: "您的讯息已发送"
318
+ menu:
319
+ options: "菜單选择"
320
+ information: "个人资料"
321
+ wall: "最新發佈"
322
+ message:
323
+ answer: "写上答案"
324
+ inbox: "收件箱"
325
+ look: "请留意这个对话"
326
+ new: "新讯息"
327
+ one: "讯息"
328
+ other: "讯息"
329
+ participants: "参与者"
330
+ send: "发送讯息"
331
+ sentbox: "寄件备份"
332
+ trash: "垃圾桶"
333
+ notification:
334
+ all_text: "在 %{url} 阅读所有內容"
335
+ confirm: "确定 %{sender} 作为联络?"
336
+ default: "您有新通知"
337
+ destroy_sure: "您是否想删除这个通知?"
338
+ fan: "%{sender} 现在是 %{whose} 粉丝."
339
+ follow:
340
+ chamber: "%{sender} 已加入 %{name}."
341
+ group: "%{sender} 已加到 %{who} 作为联络."
342
+ user: "%{sender} 已加到 %{who} 作为联络."
343
+ hello: "您好 %{receiver},"
344
+ join:
345
+ one: "%{sender}參加了%{thing}%{title}."
346
+ like:
347
+ group: "%{sender} 喜欢 %{whose} %{thing}."
348
+ user: "%{sender} 喜欢 %{whose} %{thing}."
349
+ look: "请看看这个 %{sender} 的最新发布"
350
+ makefriend:
351
+ group: "%{sender} 另加至 %{who} 作为联络."
352
+ user: "%{sender} 另加至 %{who} 作为联络."
353
+ one: "通知"
354
+ other: "通知"
355
+ post:
356
+ group: "%{title} -- %{sender} 發佈給 %{whose} "
357
+ user: "%{title} -- %{sender} 發佈給 %{whose} "
358
+ read: "标记已读"
359
+ read_all: "标记全部已读"
360
+ unread: "标记未读"
361
+ update:
362
+ group: "%{sender} 在 %{whose} 的最新发布已更新 %{thing} "
363
+ user: "%{sender} 在 %{whose} 的最新发布已更新 %{thing}"
364
+ visit: "浏览 %{url} 和检查您的所有通知."
365
+ watch: "在这里 %{url}查看这里"
366
+ watch_it: "查看这里!"
367
+ who:
368
+ group: "%{name}"
369
+ user: "您"
370
+ whose:
371
+ group: "%{receiver} 的"
372
+ user: "您的"
373
+ post:
374
+ confirm_delete: "删除近況吗?"
375
+ form:
376
+ title: "近況"
377
+ input: "您有什么近況?"
378
+ name: "近況"
379
+ one: "一条近況"
380
+ title:
381
+ one: "近況"
382
+ other: "近況"
383
+ preposition:
384
+ and: "和"
385
+ on: "在上"
386
+ profile:
387
+ one: "个人背景资料"
388
+ age: "年齡"
389
+ is_on: "有效"
390
+ must_be_signed_id: "您必须持有有效证件"
391
+ group:
392
+ about: "关于我们"
393
+ birthday: "周年"
394
+ experience: "经验范畴"
395
+ info: "群组资料"
396
+ tags: "群组标记"
397
+ user:
398
+ about: "关于我"
399
+ birthday: "生日"
400
+ experience: "经验"
401
+ info: "个人资料"
402
+ tags: "标记"
403
+ actualcity: "上课城市"
404
+ address: "地址"
405
+ contact: "联络资料"
406
+ country: "国家"
407
+ email: "邮箱"
408
+ empty: "这些空格未填上. 请更新."
409
+ fax: "传真"
410
+ mobile: "手机"
411
+ organization: "组织"
412
+ phone: "电话"
413
+ profile: "编辑个人背景资料"
414
+ tags:
415
+ default: "社交, 视频,"
416
+ other: "标记"
417
+ website: "网站"
418
+ update:
419
+ error: "请重组您的个人背景资料:"
420
+ success: "您的个人背景资料已更新"
421
+ public:
422
+ other: "大家"
423
+ permission:
424
+ description:
425
+ default:
426
+ brief:
427
+ create:
428
+ activity: "贴到您的最新发布"
429
+ follow:
430
+ nil: "关注他们的活动"
431
+ read:
432
+ activity: "阅读您的最新发布"
433
+ represent:
434
+ nil: "管理"
435
+ notify:
436
+ nil: "通知"
437
+ detailed:
438
+ create:
439
+ activity:
440
+ positive: "他们将会在您的最新发布标贴新的活动"
441
+ negative: "他们不能在您的最新发布标贴新的活动"
442
+ follow:
443
+ nil:
444
+ positive: "已有联系的活动 %{relation} 将出现在您主页的最新发布上"
445
+ negative: "已有联系的活动 %{relation} 将不会出现在您主页的最新发布上"
446
+ read:
447
+ activity:
448
+ positive: "他们能夠阅读在您的最新发布的內容, 除了那些有特別联系的分享"
449
+ negative: "他们能夠阅读在您的最新发布的內容, 除了那些被标识为公开"
450
+ represent:
451
+ nil:
452
+ positive: "他们将更改环节及作为 %{subject}"
453
+ negative: "他们不能更改环节及作为 %{subject}"
454
+ notify:
455
+ nil:
456
+ positive: "活动将会通知 %{name} 的联系"
457
+ negative: "活动将不会通知 %{name} 的联系"
458
+ of_relation:
459
+ choose: "2. <strong>%{name}</strong>圈內的权限"
460
+ privacy:
461
+ intro: "拥有 <strong>%{relation}</strong>级别的联系只容许作出以下行为:"
462
+ rule:
463
+ add: "加上"
464
+ title: "私隐规则"
465
+ saved: "私隐规则己保存"
466
+ relation_custom:
467
+ choose: "1. 选择圈子"
468
+ confirm_delete: "删除这个圈子?"
469
+ delete: "刪除"
470
+ edit: "更改名称"
471
+ new: "+ 新圈子"
472
+ title: "私隐和內容"
473
+ relation_public:
474
+ name: "公众"
475
+ representation:
476
+ notice: "您的环节已更改. 现在您以%{subject}的身份行动. 请使用右上角菜单回到您的环节"
477
+ switch: "转换环节"
478
+ required: "(*) 以上空格必須填写"
479
+ search:
480
+ all_results: "查找所有 %{subject} (%{count})"
481
+ at_least: "写下最少两个字符"
482
+ global:
483
+ name: "全球搜查"
484
+ first_result:
485
+ more: "展示首回 %{count} 结果."
486
+ one: "首回结果展示中."
487
+ query: "查看更多结果 %{query} >"
488
+ name: "搜索"
489
+ no_subject_found: "沒有搜索到关于 %{subject} 的结果."
490
+ nothing: "沒有查询到任何结果"
491
+ searching: "查找中: %{query}"
492
+ show_all: "所有"
493
+ write: "写下您的问题 ..."
494
+ wrong: "搜查器发生了问题"
495
+ settings:
496
+ api_key:
497
+ briefing: "管理您的API钥匙"
498
+ confirm: "您肯定吗?"
499
+ empty: "沒有"
500
+ explanation: "这是您的的 API 钥匙"
501
+ name: "API 钥匙"
502
+ regenerate: "重新获取 API 钥匙"
503
+ cancel_account:
504
+ briefing: "让您注销帐号"
505
+ email_change:
506
+ briefing: "更改您的邮箱"
507
+ lang_change:
508
+ briefing: "更改您的语言"
509
+ name: "更改您的语言"
510
+ error: "当您保存更改时, 出现一些错误"
511
+ for: "为....设定"
512
+ main: "设定"
513
+ manage:
514
+ name: "行政联络"
515
+ briefing: "联系设定"
516
+ explanation: "更改联系允许"
517
+ notifications:
518
+ briefing: "关于通知行为和邮件提示的设定"
519
+ name: "通知"
520
+ by_email:
521
+ name: "当我收到通知时发邮件给我"
522
+ always: "经常"
523
+ never: "永不"
524
+ one: "设定"
525
+ password_change:
526
+ briefing: "更改密码"
527
+ success: "您的设定已成功更改"
528
+ share: "Share"
529
+ sign_in: "登录"
530
+ sign_out: "退出"
531
+ sign_up: "注册"
532
+ site:
533
+ name: "Gocess.com"
534
+ subject:
535
+ this_is_you: "这是您!"
536
+ sure: "您肯定吗?"
537
+ time:
538
+ ago: "%{time} 之前"
539
+ unknown: "不明"
540
+ user:
541
+ all: "所有用户"
542
+ all_n: "所有用户 (%{count})"
543
+ by: "被用户"
544
+ one: "用户"
545
+ other: "用户们"
546
+ title:
547
+ one: "用户"
548
+ other: "用户们"
549
+ welcome: "欢迎来到 %{site}!"
550
+ lang:
551
+ browser: "自动搜查浏览器语言"
552
+ none: "语言自主內容"
@@ -0,0 +1,9 @@
1
+ class CreateSites < ActiveRecord::Migration
2
+ def change
3
+ create_table :sites do |t|
4
+ t.text :config
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Base
3
- VERSION = "0.24.0".freeze
3
+ VERSION = "0.24.1".freeze
4
4
  end
5
5
  end
@@ -77,6 +77,7 @@ module SocialStream
77
77
  def set_author_ids
78
78
  resource_params.first[:author_id] = current_subject.try(:actor_id)
79
79
  resource_params.first[:user_author_id] = current_user.try(:actor_id)
80
+ resource_params.first[:owner_id] ||= current_subject.try(:actor_id)
80
81
  end
81
82
 
82
83
  def collection_variable_get
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ describe Site do
4
+ it "should access configuration" do
5
+ Site.current.config[:test] = "test"
6
+
7
+ Site.current.config[:test].should eq("test")
8
+ end
9
+
10
+ it "should save configuration" do
11
+ Site.current.config[:test] = "test"
12
+
13
+ Site.current.save!
14
+
15
+ Site.instance_variable_defined?("@current").should be_true
16
+
17
+ Site.instance_variable_set "@current", nil
18
+
19
+ Site.current.config[:test].should eq("test")
20
+ end
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.24.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-23 00:00:00.000000000 Z
13
+ date: 2012-12-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: deep_merge
@@ -850,6 +850,7 @@ files:
850
850
  - app/models/relation/reject.rb
851
851
  - app/models/relation/single.rb
852
852
  - app/models/relation_permission.rb
853
+ - app/models/site.rb
853
854
  - app/models/tie.rb
854
855
  - app/models/user.rb
855
856
  - app/views/activities/_activity.html.erb
@@ -983,6 +984,8 @@ files:
983
984
  - app/views/notifications/_notification.html.erb
984
985
  - app/views/notifications/activities/_follow.html.erb
985
986
  - app/views/notifications/activities/_follow.text.erb
987
+ - app/views/notifications/activities/_join.html.erb
988
+ - app/views/notifications/activities/_join.text.erb
986
989
  - app/views/notifications/activities/_like.html.erb
987
990
  - app/views/notifications/activities/_like.text.erb
988
991
  - app/views/notifications/activities/_make-friend.html.erb
@@ -1060,6 +1063,7 @@ files:
1060
1063
  - config/locales/pt.yml
1061
1064
  - config/locales/rails.es.yml
1062
1065
  - config/locales/rails.pt.yml
1066
+ - config/locales/zh.yml
1063
1067
  - config/routes.rb
1064
1068
  - db/migrate/20120326083509_create_social_stream.rb
1065
1069
  - db/migrate/20120403175913_create_activity_object_audiences.rb
@@ -1068,6 +1072,7 @@ files:
1068
1072
  - db/migrate/20120526171311_remove_activity_channels.rb
1069
1073
  - db/migrate/20120621135650_add_comment_count_to_activity_object.rb
1070
1074
  - db/migrate/20120627115244_fix_activity_object_follower_count.rb
1075
+ - db/migrate/20121031111857_create_sites.rb
1071
1076
  - lib/acts_as_taggable_on/acts_as_taggable_on/dirty.rb
1072
1077
  - lib/acts_as_taggable_on/social_stream.rb
1073
1078
  - lib/generators/social_stream/base/install_generator.rb
@@ -1224,6 +1229,7 @@ files:
1224
1229
  - spec/models/profile_spec.rb
1225
1230
  - spec/models/relation_follow_spec.rb
1226
1231
  - spec/models/relation_spec.rb
1232
+ - spec/models/site_spec.rb
1227
1233
  - spec/models/tie_spec.rb
1228
1234
  - spec/models/user_spec.rb
1229
1235
  - spec/social_stream_activity_streams_spec.rb