forked from OpenNeo/impress
i18n for outfits#show
This commit is contained in:
parent
744c10495d
commit
abca8eb29a
4 changed files with 29 additions and 8 deletions
|
@ -24,6 +24,16 @@ module OutfitsHelper
|
|||
query << "&outfit=#{outfit.id}" if user_signed_in? && outfit.user_id == current_user.id
|
||||
link_to content, wardrobe_path(:anchor => query), options
|
||||
end
|
||||
|
||||
def outfit_creation_summary(outfit)
|
||||
user = outfit.user
|
||||
user_link = link_to(user.name, user_contributions_path(user))
|
||||
created_at_ago = content_tag(:abbr, time_ago_in_words(@outfit.created_at),
|
||||
:title => @outfit.created_at)
|
||||
translate 'outfits.show.creation_summary_html',
|
||||
:user_link => user_link,
|
||||
:created_at_ago => created_at_ago
|
||||
end
|
||||
|
||||
def outfit_li_for(outfit)
|
||||
class_name = outfit.starred? ? 'starred' : nil
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
- title(@outfit.name || "Shared outfit")
|
||||
- title(@outfit.name || t('.default_outfit_name'))
|
||||
- content_for :before_title, campaign_progress
|
||||
|
||||
- open_graph :type => 'openneo-impress:outfit', :title => yield(:title),
|
||||
|
@ -7,15 +7,14 @@
|
|||
- open_graph :image => absolute_url(@outfit.image.url)
|
||||
|
||||
= link_to_edit_outfit(@outfit, :class => 'button', :id => 'outfit-wardrobe-link') do
|
||||
Edit
|
||||
- unless user_signed_in? && @outfit.user == current_user
|
||||
a copy
|
||||
- if user_signed_in? && @outfit.user == current_user
|
||||
= t '.edit'
|
||||
- else
|
||||
= t '.clone'
|
||||
|
||||
- if @outfit.user_id
|
||||
#outfit-user
|
||||
Created by
|
||||
== #{link_to @outfit.user.name, user_contributions_path(@outfit.user)},
|
||||
%span{:title => @outfit.created_at}= time_ago_in_words @outfit.created_at
|
||||
ago
|
||||
= outfit_creation_summary(@outfit)
|
||||
#preview-wrapper
|
||||
#preview-swf
|
||||
#outfit-items= render @outfit.worn_items
|
||||
|
|
|
@ -58,6 +58,12 @@ en-meep:
|
|||
Meep, %{user_link}!"
|
||||
blog_linkback: OpenNeo Meep
|
||||
newest_items_header: New Meeps
|
||||
|
||||
show:
|
||||
default_outfit_name: Meeped outfit
|
||||
edit: Meep
|
||||
clone: Meep a copy
|
||||
creation_summary_html: Meeped by %{user_link}, %{created_at_ago} ago
|
||||
|
||||
contributions:
|
||||
contributed_description:
|
||||
|
|
|
@ -59,6 +59,12 @@ en:
|
|||
Thanks, %{user_link}!"
|
||||
blog_linkback: OpenNeo Blog
|
||||
newest_items_header: New Items
|
||||
|
||||
show:
|
||||
default_outfit_name: Shared outfit
|
||||
edit: Edit
|
||||
clone: Edit a copy
|
||||
creation_summary_html: Created by %{user_link}, %{created_at_ago} ago
|
||||
|
||||
contributions:
|
||||
contributed_description:
|
||||
|
|
Loading…
Reference in a new issue