Skip to content
Extraits de code Groupes Projets
Valider e1edef9f rédigé par Jonne Haß's avatar Jonne Haß
Parcourir les fichiers

lets see how all this markdown in the title looks. Attempt to fix #2395

parent aed413b4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
# Copyright (c) 2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module PostsHelper
def post_page_title(post)
if post.is_a?(Photo)
I18n.t "posts.show.photos_by", :count => 1, :author => post.status_message.author.name
elsif post.is_a?(Reshare)
I18n.t "posts.show.reshare_by", :author => post.author.name
else
if post.text.present?
truncate(post.text(:plain_text => true), :length => 20)
elsif post.photos.present?
I18n.t "posts.show.photos_by", :count => post.photos.size, :author => post.author.name
end
end
end
end
......@@ -2,6 +2,9 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :page_title do
= post_page_title @post
.span-20.append-2.prepend-2.last
#main_stream.stream.status_message_show
......
......@@ -614,6 +614,14 @@ en:
destroy: "Delete"
permalink: "permalink"
not_found: "Sorry, we couldn't find that post."
photos_by:
zero: "No photos by %{author}"
one: "One photo by %{author}"
two: "Two photos by %{author}"
few: "%{count} photos by %{author}"
many: "%{count} photos by %{author}"
other: "%{count} photos by %{author}"
reshare_by: "Reshare by %{author}"
share_visibilites:
update:
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter