diff --git a/Changelog.md b/Changelog.md index 65fb5df26..bb6c65421 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,7 @@ * Internationalize controller rescue\_from text [#6554](https://github.com/diaspora/diaspora/pull/6554) * Make mention parsing a bit more robust [#6658](https://github.com/diaspora/diaspora/pull/6658) * Remove unlicensed images [#6673](https://github.com/diaspora/diaspora/pull/6673) +* Removed unused contacts\_title [#6687](https://github.com/diaspora/diaspora/pull/6687) ## Bug fixes * Fix plural rules handling more than wanted as "one" [#6630](https://github.com/diaspora/diaspora/pull/6630) diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 86bb6197d..a74e956fb 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -1271,33 +1271,26 @@ en: mentions: title: "@Mentions" - contacts_title: "People who mentioned you" comment_stream: title: "Commented posts" - contacts_title: "People whose posts you commented on" like_stream: title: "Like stream" - contacts_title: "People whose posts you like" followed_tag: title: "#Followed tags" - contacts_title: "People who dig these tags" add_a_tag: "Add a tag" follow: "Follow" tags: title: "Posts tagged: %{tags}" - contacts_title: "People who dig this tag" public: title: "Public activity" - contacts_title: "Recent posters" multi: title: "Stream" - contacts_title: "People in your stream" aspects: title: "My aspects" diff --git a/config/locales/javascript/javascript.en.yml b/config/locales/javascript/javascript.en.yml index 9104fff90..47d8404d1 100644 --- a/config/locales/javascript/javascript.en.yml +++ b/config/locales/javascript/javascript.en.yml @@ -200,7 +200,6 @@ en: followed_tag: title: "#Followed tags" - contacts_title: "People who dig these tags" add_a_tag: "Add a tag" follow: "Follow" diff --git a/lib/stream/aspect.rb b/lib/stream/aspect.rb index 349fdc809..bdfe6c084 100644 --- a/lib/stream/aspect.rb +++ b/lib/stream/aspect.rb @@ -85,17 +85,6 @@ class Stream::Aspect < Stream::Base @all_aspects ||= aspect_ids.length == user.aspects.size end - # Provides a translated title for contacts box on the right pane. - # - # @return [String] - def contacts_title - if self.for_all_aspects? || self.aspect_ids.size > 1 - I18n.t('_contacts') - else - "#{self.aspect.name} (#{self.people.size})" - end - end - # Provides a link to the user to the contacts page that corresponds with # the stream's active aspects. # diff --git a/lib/stream/base.rb b/lib/stream/base.rb index ceb835fd8..f593169f2 100644 --- a/lib/stream/base.rb +++ b/lib/stream/base.rb @@ -49,11 +49,6 @@ class Stream::Base includes(:profile) end - # @return [String] def contacts_title 'change me in lib/base_stream.rb!' - def contacts_title - 'change me in lib/base_stream.rb!' - end - # @return [String] def contacts_link Rails.application.routes.url_helpers.contacts_path diff --git a/lib/stream/comments.rb b/lib/stream/comments.rb index 6eac7e961..e4c8ee45b 100644 --- a/lib/stream/comments.rb +++ b/lib/stream/comments.rb @@ -15,8 +15,4 @@ class Stream::Comments < Stream::Base def posts @posts ||= EvilQuery::CommentedPosts.new(user).posts end - - def contacts_title - I18n.translate('streams.comment_stream.contacts_title') - end end diff --git a/lib/stream/followed_tag.rb b/lib/stream/followed_tag.rb index 5137153a5..ab1513bfb 100644 --- a/lib/stream/followed_tag.rb +++ b/lib/stream/followed_tag.rb @@ -17,10 +17,6 @@ class Stream::FollowedTag < Stream::Base @posts ||= StatusMessage.user_tag_stream(user, tag_ids) end - def contacts_title - I18n.translate('streams.followed_tag.contacts_title') - end - private def tag_string diff --git a/lib/stream/likes.rb b/lib/stream/likes.rb index 42b72e5cb..f534d1cd9 100644 --- a/lib/stream/likes.rb +++ b/lib/stream/likes.rb @@ -15,8 +15,4 @@ class Stream::Likes < Stream::Base def posts @posts ||= EvilQuery::LikedPosts.new(user).posts end - - def contacts_title - I18n.translate('streams.like_stream.contacts_title') - end end diff --git a/lib/stream/mention.rb b/lib/stream/mention.rb index 83ad8b773..a1afe8ff4 100644 --- a/lib/stream/mention.rb +++ b/lib/stream/mention.rb @@ -15,8 +15,4 @@ class Stream::Mention < Stream::Base def posts @posts ||= StatusMessage.where_person_is_mentioned(self.user.person) end - - def contacts_title - I18n.translate('streams.mentions.contacts_title') - end end diff --git a/lib/stream/multi.rb b/lib/stream/multi.rb index 19a8ec391..e92ee93d0 100644 --- a/lib/stream/multi.rb +++ b/lib/stream/multi.rb @@ -10,11 +10,6 @@ class Stream::Multi < Stream::Base I18n.t('streams.multi.title') end - # @return [String] - def contacts_title - I18n.t('streams.multi.contacts_title') - end - def posts @posts ||= ::EvilQuery::MultiStream.new(user, order, max_time, include_community_spotlight?).make_relation! end diff --git a/lib/stream/public.rb b/lib/stream/public.rb index 92efc42fd..0c6987233 100644 --- a/lib/stream/public.rb +++ b/lib/stream/public.rb @@ -16,10 +16,6 @@ class Stream::Public < Stream::Base @posts ||= Post.all_public end - def contacts_title - I18n.translate("streams.public.contacts_title") - end - def can_comment?(post) post.author.local? end diff --git a/spec/shared_behaviors/stream.rb b/spec/shared_behaviors/stream.rb index d49233588..fa1c0d2de 100644 --- a/spec/shared_behaviors/stream.rb +++ b/spec/shared_behaviors/stream.rb @@ -18,10 +18,6 @@ shared_examples_for 'it is a stream' do expect(@stream.send(:publisher_opts)).not_to be_nil end - it 'has a #contacts title' do - expect(@stream.contacts_title).not_to be_nil - end - it 'has a contacts link' do expect(@stream.contacts_link).not_to be_nil end