i18n for outfits#show
This commit is contained in:
parent
132a49d30b
commit
fea0b42a17
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
|
query << "&outfit=#{outfit.id}" if user_signed_in? && outfit.user_id == current_user.id
|
||||||
link_to content, wardrobe_path(:anchor => query), options
|
link_to content, wardrobe_path(:anchor => query), options
|
||||||
end
|
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)
|
def outfit_li_for(outfit)
|
||||||
class_name = outfit.starred? ? 'starred' : nil
|
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
|
- content_for :before_title, campaign_progress
|
||||||
|
|
||||||
- open_graph :type => 'openneo-impress:outfit', :title => yield(:title),
|
- open_graph :type => 'openneo-impress:outfit', :title => yield(:title),
|
||||||
|
@ -7,15 +7,14 @@
|
||||||
- open_graph :image => absolute_url(@outfit.image.url)
|
- open_graph :image => absolute_url(@outfit.image.url)
|
||||||
|
|
||||||
= link_to_edit_outfit(@outfit, :class => 'button', :id => 'outfit-wardrobe-link') do
|
= link_to_edit_outfit(@outfit, :class => 'button', :id => 'outfit-wardrobe-link') do
|
||||||
Edit
|
- if user_signed_in? && @outfit.user == current_user
|
||||||
- unless user_signed_in? && @outfit.user == current_user
|
= t '.edit'
|
||||||
a copy
|
- else
|
||||||
|
= t '.clone'
|
||||||
|
|
||||||
- if @outfit.user_id
|
- if @outfit.user_id
|
||||||
#outfit-user
|
#outfit-user
|
||||||
Created by
|
= outfit_creation_summary(@outfit)
|
||||||
== #{link_to @outfit.user.name, user_contributions_path(@outfit.user)},
|
|
||||||
%span{:title => @outfit.created_at}= time_ago_in_words @outfit.created_at
|
|
||||||
ago
|
|
||||||
#preview-wrapper
|
#preview-wrapper
|
||||||
#preview-swf
|
#preview-swf
|
||||||
#outfit-items= render @outfit.worn_items
|
#outfit-items= render @outfit.worn_items
|
||||||
|
|
|
@ -58,6 +58,12 @@ en-meep:
|
||||||
Meep, %{user_link}!"
|
Meep, %{user_link}!"
|
||||||
blog_linkback: OpenNeo Meep
|
blog_linkback: OpenNeo Meep
|
||||||
newest_items_header: New Meeps
|
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:
|
contributions:
|
||||||
contributed_description:
|
contributed_description:
|
||||||
|
|
|
@ -59,6 +59,12 @@ en:
|
||||||
Thanks, %{user_link}!"
|
Thanks, %{user_link}!"
|
||||||
blog_linkback: OpenNeo Blog
|
blog_linkback: OpenNeo Blog
|
||||||
newest_items_header: New Items
|
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:
|
contributions:
|
||||||
contributed_description:
|
contributed_description:
|
||||||
|
|
Loading…
Reference in a new issue