Added localization to photos views
This commit is contained in:
parent
5078830785
commit
a673257eef
5 changed files with 20 additions and 12 deletions
|
|
@ -21,5 +21,5 @@
|
||||||
.info
|
.info
|
||||||
= link_to(how_long_ago(post), photo_path(post))
|
= link_to(how_long_ago(post), photo_path(post))
|
||||||
\--
|
\--
|
||||||
= link_to "show comments (#{post.comments.count})", '#', :class => "show_post_comments"
|
= link_to "#{t('.show_comments')} (#{post.comments.count})", '#', :class => "show_post_comments"
|
||||||
= render "comments/comments", :post => post
|
= render "comments/comments", :post => post
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
%h1.big_text
|
%h1.big_text
|
||||||
.back
|
.back
|
||||||
= link_to "⇧ #{@album.name}", album_path(@album)
|
= link_to "⇧ #{@album.name}", album_path(@album)
|
||||||
= "Editing #{@photo.image}"
|
= "#{t('.editing')} #{@photo.image}"
|
||||||
|
|
||||||
%div{:id => @photo.id}
|
%div{:id => @photo.id}
|
||||||
|
|
||||||
|
|
@ -22,5 +22,5 @@
|
||||||
= link_to "⇧ #{@album.name}", album_path(@album)
|
= link_to "⇧ #{@album.name}", album_path(@album)
|
||||||
-if current_user.owns? @album
|
-if current_user.owns? @album
|
||||||
.button.right
|
.button.right
|
||||||
= link_to 'Delete Photo', @photo, :confirm => 'Are you sure?', :method => :delete
|
= link_to t('.delete_photo'), @photo, :confirm => t('.are_you_sure'), :method => :delete
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
|
||||||
- title "New Photo"
|
- title t('.new_photo')
|
||||||
|
|
||||||
= form_for( @photo, :html => {:multipart => true}) do |f|
|
= form_for( @photo, :html => {:multipart => true}) do |f|
|
||||||
= f.error_messages
|
= f.error_messages
|
||||||
%p
|
%p
|
||||||
= f.file_field :image
|
= f.file_field :image
|
||||||
= f.submit 'post it!', :class => 'button'
|
= f.submit t('.post_it'), :class => 'button'
|
||||||
|
|
||||||
%p= link_to "Back to List", photos_path
|
%p= link_to t('.back_to_list'), photos_path
|
||||||
|
|
|
||||||
|
|
@ -25,15 +25,15 @@
|
||||||
%h1
|
%h1
|
||||||
= @photo.image
|
= @photo.image
|
||||||
|
|
||||||
= link_to "<< prev", url_to_prev(@photo, @album)
|
= link_to "<< #{t('.prev')}", url_to_prev(@photo, @album)
|
||||||
|
|
|
|
||||||
= link_to "full size", @photo.url
|
= link_to "#{t('.full_size')}", @photo.url
|
||||||
|
|
|
|
||||||
= link_to "next >>", url_to_next(@photo, @album)
|
= link_to "#{t('.next')} >>", url_to_next(@photo, @album)
|
||||||
|
|
||||||
.right
|
.right
|
||||||
-if current_user.owns? @album
|
-if current_user.owns? @album
|
||||||
= link_to 'Edit Photo', edit_photo_path(@photo), :class => "button"
|
= link_to t('.edit_photo'), edit_photo_path(@photo), :class => "button"
|
||||||
|
|
||||||
|
|
||||||
%div{:id => @photo.id}
|
%div{:id => @photo.id}
|
||||||
|
|
@ -48,9 +48,9 @@
|
||||||
|
|
||||||
-if current_user.owns? @album
|
-if current_user.owns? @album
|
||||||
.right
|
.right
|
||||||
= link_to 'Delete Photo', @photo, :confirm => 'Are you sure?', :method => :delete, :class => 'button'
|
= link_to t('.delete_photo'), @photo, :confirm => t('.are_you_sure'), :method => :delete, :class => 'button'
|
||||||
|
|
||||||
%h4{:class => "show_post_comments"}
|
%h4{:class => "show_post_comments"}
|
||||||
= "comments (#{@photo.comments.count})"
|
= "#{t('.comments')} (#{@photo.comments.count})"
|
||||||
= render "comments/comments", :post => @photo
|
= render "comments/comments", :post => @photo
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,5 +80,13 @@ en:
|
||||||
comments: "comments"
|
comments: "comments"
|
||||||
edit:
|
edit:
|
||||||
editing: "Editing"
|
editing: "Editing"
|
||||||
|
are_you_sure: "Are you sure?"
|
||||||
|
delete_photo: "Delete Photo"
|
||||||
|
photo:
|
||||||
|
show_comments: "show comments"
|
||||||
|
new:
|
||||||
|
new_photo: "New Photo"
|
||||||
|
back_to_list: "Back to List"
|
||||||
|
post_it: "post it!"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue