From 9bdd11b383bd50e4648d445cfd1e916c3a6288a6 Mon Sep 17 00:00:00 2001 From: Ariel Zavala Date: Thu, 16 Sep 2010 14:58:42 -0400 Subject: [PATCH] Added localization to album views --- app/views/albums/_album.html.haml | 2 +- app/views/albums/_new_album.haml | 4 ++-- app/views/albums/edit.html.haml | 8 ++++---- app/views/albums/index.html.haml | 6 +++--- app/views/albums/show.html.haml | 10 +++++----- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/views/albums/_album.html.haml b/app/views/albums/_album.html.haml index f4893ed8f..a2d2eb46b 100644 --- a/app/views/albums/_album.html.haml +++ b/app/views/albums/_album.html.haml @@ -8,7 +8,7 @@ %div.time by - = link_to ((current_user.person == post.person)? 'you' : post.person.real_name), person_path(post.person) + = link_to ((current_user.person == post.person)? t('.you') : post.person.real_name), person_path(post.person) %br = link_to(how_long_ago(post), object_path(post, :aspect => @aspect)) diff --git a/app/views/albums/_new_album.haml b/app/views/albums/_new_album.haml index 8a37cb2c0..daefe15f3 100644 --- a/app/views/albums/_new_album.haml +++ b/app/views/albums/_new_album.haml @@ -3,7 +3,7 @@ -# the COPYRIGHT file. -%h1 Add a new album +%h1=t('.add_a_new_album') = form_for Album.new do |f| = f.error_messages @@ -11,4 +11,4 @@ = f.label :name = f.text_field :name = f.hidden_field :to, :value => aspect - = f.submit 'create', :class => 'button' + = f.submit t('.create'), :class => 'button' diff --git a/app/views/albums/edit.html.haml b/app/views/albums/edit.html.haml index a4bf3aef6..4dfb2294c 100644 --- a/app/views/albums/edit.html.haml +++ b/app/views/albums/edit.html.haml @@ -6,10 +6,10 @@ .back= link_to "⇧ #{@album.name}", @album %h1.big_text - = "Editing #{@album.name}" + = "#{t('.editing')} #{@album.name}" .sub_header - ="updated #{how_long_ago(@album)}" + ="#{t('.updated')} #{how_long_ago(@album)}" - form_for @album do |a| = a.error_messages @@ -21,12 +21,12 @@ .photo_edit_block= image_tag photo.url(:thumb_medium) #submit_block - = link_to "Cancel", root_path + = link_to t('.cancel'), root_path or = a.submit .button.delete - = link_to 'Delete Album', @album, :confirm => 'Are you sure?', :method => :delete + = link_to t('.delete_album'), @album, :confirm => t('.are_you_sure'), :method => :delete #content_bottom .back diff --git a/app/views/albums/index.html.haml b/app/views/albums/index.html.haml index fa4098c18..af83b53eb 100644 --- a/app/views/albums/index.html.haml +++ b/app/views/albums/index.html.haml @@ -10,7 +10,7 @@ }); = content_for :page_title do - = link_to "◂ Home", aspects_path, :aspect => params[:aspect] + = link_to "◂ #{t('.home')}", aspects_path, :aspect => params[:aspect] - content_for :left_pane do = render "shared/aspect_friends" @@ -19,7 +19,7 @@ %h1 Albums .right - = link_to 'New Album', '#new_album_pane', {:class => "button", :id => "add_album_button"} + = link_to t('.new_album'), '#new_album_pane', {:class => "button", :id => "add_album_button"} .yo{:style => "display:none;" } #new_album_pane @@ -34,4 +34,4 @@ #content_bottom .back - = link_to "⇧ home", root_path + = link_to "⇧ #{t('.home')}", root_path diff --git a/app/views/albums/show.html.haml b/app/views/albums/show.html.haml index 843523223..56e5c617b 100644 --- a/app/views/albums/show.html.haml +++ b/app/views/albums/show.html.haml @@ -11,7 +11,7 @@ }); = content_for :page_title do - = link_to "◂ Albums", albums_path(:aspect => @aspect) + = link_to "◂ #{t('.albums')}", albums_path(:aspect => @aspect) - content_for :left_pane do = render "shared/aspect_friends" @@ -19,13 +19,13 @@ - content_for :publish do %h1 = @album.name - ="updated #{how_long_ago(@album)}" + ="#{t('.updated')} #{how_long_ago(@album)}" .album_id{:id => @album.id, :style => "display:hidden;"} -unless current_user.owns? @album - %h4= "by #{@album.person.real_name}" + %h4= "#{t('.by')} #{@album.person.real_name}" #thumbnails - for photo in @album_photos @@ -36,8 +36,8 @@ #content_bottom .back - = link_to "⇧ albums", albums_path + = link_to "⇧ #{t('.albums')}", albums_path -if current_user.owns? @album .right - = link_to 'Edit Album', edit_album_path(@album), :class => 'button' + = link_to t('.edit_album'), edit_album_path(@album), :class => 'button'