Added localization to photos views

This commit is contained in:
Ariel Zavala 2010-09-16 15:11:21 -04:00
parent 5078830785
commit a673257eef
5 changed files with 20 additions and 12 deletions

View file

@ -21,5 +21,5 @@
.info
= 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

View file

@ -6,7 +6,7 @@
%h1.big_text
.back
= link_to "⇧ #{@album.name}", album_path(@album)
= "Editing #{@photo.image}"
= "#{t('.editing')} #{@photo.image}"
%div{:id => @photo.id}
@ -22,5 +22,5 @@
= link_to "⇧ #{@album.name}", album_path(@album)
-if current_user.owns? @album
.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

View file

@ -3,12 +3,12 @@
-# the COPYRIGHT file.
- title "New Photo"
- title t('.new_photo')
= form_for( @photo, :html => {:multipart => true}) do |f|
= f.error_messages
%p
= 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

View file

@ -25,15 +25,15 @@
%h1
= @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
-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}
@ -48,9 +48,9 @@
-if current_user.owns? @album
.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"}
= "comments (#{@photo.comments.count})"
= "#{t('.comments')} (#{@photo.comments.count})"
= render "comments/comments", :post => @photo

View file

@ -80,5 +80,13 @@ en:
comments: "comments"
edit:
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!"