i18n for outfits#show
This commit is contained in:
parent
744c10495d
commit
abca8eb29a
4 changed files with 29 additions and 8 deletions
|
@ -25,6 +25,16 @@ module OutfitsHelper
|
||||||
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
|
||||||
content_tag :li, :class => class_name, &Proc.new
|
content_tag :li, :class => class_name, &Proc.new
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -59,6 +59,12 @@ en-meep:
|
||||||
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:
|
||||||
item_suffix: "for the first meep"
|
item_suffix: "for the first meep"
|
||||||
|
|
|
@ -60,6 +60,12 @@ en:
|
||||||
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:
|
||||||
item_suffix: "for the first time"
|
item_suffix: "for the first time"
|
||||||
|
|
Loading…
Reference in a new issue