From ab5e7319eef995619ef1b2896ab25bf0cd67cfca Mon Sep 17 00:00:00 2001 From: Ariel Zavala Date: Thu, 16 Sep 2010 11:46:34 -0400 Subject: [PATCH 1/9] Added I18n initializer --- config/initializers/locale.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 config/initializers/locale.rb diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb new file mode 100644 index 000000000..42f34a3a7 --- /dev/null +++ b/config/initializers/locale.rb @@ -0,0 +1,8 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. +I18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] +I18n.default_locale = :en \ No newline at end of file From 53b05e7fb3eb9735ba243bac1b6b550838fd00f7 Mon Sep 17 00:00:00 2001 From: Ariel Zavala Date: Thu, 16 Sep 2010 11:47:54 -0400 Subject: [PATCH 2/9] Added devise spanish locale --- config/locales/devise.es.yml | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 config/locales/devise.es.yml diff --git a/config/locales/devise.es.yml b/config/locales/devise.es.yml new file mode 100644 index 000000000..70209ff79 --- /dev/null +++ b/config/locales/devise.es.yml @@ -0,0 +1,42 @@ +es: + errors: + messages: + not_found: 'no encontrado' + already_confirmed: 'ya ha sido confirmada' + not_locked: 'no está bloqueada' + + devise: + failure: + unauthenticated: 'Necesitas acceder a tu cuenta o registrarte antes de continuar.' + unconfirmed: 'Necesitas confirmar tu cuenta antes de continuar.' + locked: 'Tu cuenta esta bloqueada.' + invalid: 'Contraseña o Email incorrecto.' + invalid_token: 'Token de autenticación incorrecto.' + timeout: 'Tu sesión ha expirado, por favor accede de nuevo para continuar.' + inactive: 'Tu cuenta no ha sido activada.' + sessions: + signed_in: 'Has ingresado correctamente.' + signed_out: 'Has salido correctamente.' + passwords: + send_instructions: 'Recibirás un email con instrucciones para cambiar tu contraseña en poco minutos.' + updated: 'Tu contraseña ha sido modificada. Ya has accedido a tu cuenta.' + confirmations: + send_instructions: 'Recibirás un email con instrucciones para confirmar tu cuenta en poco minutos.' + confirmed: 'Tu cuenta ha sido confirmada. Ya has accedido a tu cuenta.' + registrations: + signed_up: 'Te has registrado correctamente. Si está disponible, te habremos enviado un email de confirmación.' + updated: 'Has actualizado tu cuenta correctamente.' + destroyed: '!Adiós! Tu cuenta ha sido cancelada. Esperamos verte pronto.' + unlocks: + send_instructions: 'Recibirás un email con instrucciones para desbloquear tu cuenta en pocos minutos.' + unlocked: 'Tu cuenta ha sido desbloqueada. Ya has accedido a tu cuenta.' + oauth_callbacks: + success: 'Has sido autorizado satisfactoriamente de la cuenta %{kind}.' + failure: 'No has sido autorizado en la cuenta %{kind} porque "%{reason}".' + mailer: + confirmation_instructions: + subject: 'Instrucciones de confirmación' + reset_password_instructions: + subject: 'Instrucciones para cambiar tu contraseña' + unlock_instructions: + subject: 'Instrucciones para desbloquear tu cuenta' \ No newline at end of file From 443b5af4ce60b402c5cb9504137a5f7ac26a2ec6 Mon Sep 17 00:00:00 2001 From: Ariel Zavala Date: Thu, 16 Sep 2010 14:57:56 -0400 Subject: [PATCH 3/9] Added localization to aspect views --- app/views/aspects/_new_aspect.haml | 2 +- app/views/aspects/index.html.haml | 2 +- app/views/aspects/manage.html.haml | 8 ++-- app/views/aspects/show.html.haml | 2 +- config/locales/en.yml | 74 ++++++++++++++++++++++++++++++ 5 files changed, 81 insertions(+), 7 deletions(-) diff --git a/app/views/aspects/_new_aspect.haml b/app/views/aspects/_new_aspect.haml index b5bc7ace3..68ce56806 100644 --- a/app/views/aspects/_new_aspect.haml +++ b/app/views/aspects/_new_aspect.haml @@ -9,4 +9,4 @@ %p = f.label :name = f.text_field :name - = f.submit 'create', :class => 'button' + = f.submit t('.create'), :class => 'button' diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index 5ea9cadb3..47a68ffeb 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -4,7 +4,7 @@ - content_for :page_title do - = link_to "photos", albums_path(:aspect => @aspect) + = link_to t('.photos'), albums_path(:aspect => @aspect) - content_for :left_pane do diff --git a/app/views/aspects/manage.html.haml b/app/views/aspects/manage.html.haml index 8a6ed97ac..0e667a8e6 100644 --- a/app/views/aspects/manage.html.haml +++ b/app/views/aspects/manage.html.haml @@ -25,7 +25,7 @@ %ul - content_for :publish do - = link_to("add a new aspect", "#add_aspect_pane", :id => "add_aspect_button", :class => "new_aspect button", :title => "Add a new aspect") + = link_to(t('.add_a_new_aspect'), "#add_aspect_pane", :id => "add_aspect_button", :class => "new_aspect button", :title => t('.add_a_new_aspect')) @@ -37,9 +37,9 @@ %h1{:contenteditable => true}= aspect.name .tools - = link_to "add a new friend", "#add_request_pane_#{aspect.id}", :class => 'add_request_button' + = link_to t('.add_a_new_friend'), "#add_request_pane_#{aspect.id}", :class => 'add_request_button' | - = link_to "show", aspect_path(aspect) + = link_to t('.show'), aspect_path(aspect) %ul{:id => aspect.id} @@ -59,6 +59,6 @@ %p %br - = link_to 'Update Aspects', '#', :class => 'button', :id => "move_friends_link" + = link_to t('.update_aspects'), '#', :class => 'button', :id => "move_friends_link" #content_bottom diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index f10ccee74..d4262f838 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -4,7 +4,7 @@ - content_for :page_title do - = link_to "photos", albums_path(:aspect => @aspect) + = link_to t('.photos'), albums_path(:aspect => @aspect) - content_for :left_pane do = render "shared/aspect_friends" diff --git a/config/locales/en.yml b/config/locales/en.yml index 1de275cf9..975e40eef 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -8,3 +8,77 @@ en: hello: "Hello world" + layouts: + application: + edit_profile: "edit profile" + logout: "logout" + shared: + aspect_nav: + all_aspects: "All Aspects" + manage: "Manage" + manage_your_aspects: "Manage your Aspects" + sub_header: + all_aspects: "All Aspects" + manage_aspects: "Manage Aspects" + publisher: + share: "Share" + albums: + album: + you: "you" + new_album: + create: "create" + add_a_new_album: "Add a new album" + show: + edit_album: "Edit Album" + albums: "albums" + updated: "updated" + by: "by" + edit: + editing: "Editing" + updated: "updated" + are_you_sure: "Are you sure?" + delete_album: "Delete Album" + cancel: "Cancel" + index: + home: "home" + new_album: "New Album" + aspects: + index: + photos: "photos" + show: + photos: "photos" + manage: + add_a_new_aspect: "Add a new aspect" + add_a_new_friend: "Add a new friend" + show: "Show" + update_aspects: "Update Aspects" + new_aspect: + create: "Create" + users: + edit: + cancel: "Cancel" + update_profile: "Update Profile" + home: "Home" + diaspora_username: "DIASPORA USERNAME" + info: "Info" + picture: "Picture" + editing_profile: "Editing profile" + albums: "Albums" + comments: + comment: + ago: "ago" + new_comment: + comment: "Comment" + photos: + show: + prev: "prev" + full_size: "full size" + next: "next" + edit_photo: "Edit Photo" + delete_photo: "Delete Photo" + are_you_sure: "Are you sure?" + comments: "comments" + edit: + editing: "Editing" + + From 9bdd11b383bd50e4648d445cfd1e916c3a6288a6 Mon Sep 17 00:00:00 2001 From: Ariel Zavala Date: Thu, 16 Sep 2010 14:58:42 -0400 Subject: [PATCH 4/9] 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' From 5078830785926eaa8b368c10224a7b4fa68920ca Mon Sep 17 00:00:00 2001 From: Ariel Zavala Date: Thu, 16 Sep 2010 15:00:21 -0400 Subject: [PATCH 5/9] Added localization to comments views --- app/views/comments/_comment.html.haml | 2 +- app/views/comments/_new_comment.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/comments/_comment.html.haml b/app/views/comments/_comment.html.haml index 56252c83d..4252d9762 100644 --- a/app/views/comments/_comment.html.haml +++ b/app/views/comments/_comment.html.haml @@ -9,4 +9,4 @@ = link_to post.person.real_name, post.person = auto_link sanitize post.text %div.time - = "#{time_ago_in_words(post.updated_at)} ago" + = "#{time_ago_in_words(post.updated_at)} #{t('.ago')}" diff --git a/app/views/comments/_new_comment.html.haml b/app/views/comments/_new_comment.html.haml index e998d98b7..a4268082d 100644 --- a/app/views/comments/_new_comment.html.haml +++ b/app/views/comments/_new_comment.html.haml @@ -9,4 +9,4 @@ = f.text_area :text, :rows => 1, :id => "comment_text_on_#{post.id}", :class => "comment_box" = f.hidden_field :post_id, :value => post.id %p{:style => "text-align:right;"} - = f.submit "Comment", :class => "comment_submit button" + = f.submit t('.comment'), :class => "comment_submit button" From a673257eefda08d93d77c8c1e438376e8c0eaa83 Mon Sep 17 00:00:00 2001 From: Ariel Zavala Date: Thu, 16 Sep 2010 15:11:21 -0400 Subject: [PATCH 6/9] Added localization to photos views --- app/views/photos/_photo.haml | 2 +- app/views/photos/edit.html.haml | 4 ++-- app/views/photos/new.html.haml | 6 +++--- app/views/photos/show.html.haml | 12 ++++++------ config/locales/en.yml | 8 ++++++++ 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/app/views/photos/_photo.haml b/app/views/photos/_photo.haml index f0a3f2c83..47ddfef3e 100644 --- a/app/views/photos/_photo.haml +++ b/app/views/photos/_photo.haml @@ -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 diff --git a/app/views/photos/edit.html.haml b/app/views/photos/edit.html.haml index f695f850d..1f36ae99f 100644 --- a/app/views/photos/edit.html.haml +++ b/app/views/photos/edit.html.haml @@ -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 diff --git a/app/views/photos/new.html.haml b/app/views/photos/new.html.haml index a8814d770..1fdf71a84 100644 --- a/app/views/photos/new.html.haml +++ b/app/views/photos/new.html.haml @@ -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 diff --git a/app/views/photos/show.html.haml b/app/views/photos/show.html.haml index 654bea892..21ce72181 100644 --- a/app/views/photos/show.html.haml +++ b/app/views/photos/show.html.haml @@ -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 diff --git a/config/locales/en.yml b/config/locales/en.yml index 975e40eef..bfcf69939 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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!" From 51b6ce9dfbdd6017278704c14420dff657d2eb7b Mon Sep 17 00:00:00 2001 From: Ariel Zavala Date: Thu, 16 Sep 2010 15:11:58 -0400 Subject: [PATCH 7/9] Added localization to layouts and shared views --- app/views/layouts/application.html.haml | 4 ++-- app/views/shared/_aspect_nav.haml | 4 ++-- app/views/shared/_publisher.haml | 2 +- app/views/shared/_sub_header.haml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 4a3ec2dbb..7a48d7ed7 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -50,8 +50,8 @@ = text_field_tag 'q' %li= link_to current_user.real_name, current_user.person - %li= link_to "edit profile", edit_user_path(current_user) - %li= link_to "logout", destroy_user_session_path + %li= link_to t('.edit_profile'), edit_user_path(current_user) + %li= link_to t('.logout.'), destroy_user_session_path = render "shared/aspect_nav" = render "shared/sub_header" diff --git a/app/views/shared/_aspect_nav.haml b/app/views/shared/_aspect_nav.haml index b61def9f5..9ba5a5ee4 100644 --- a/app/views/shared/_aspect_nav.haml +++ b/app/views/shared/_aspect_nav.haml @@ -11,10 +11,10 @@ %ul{ :style => "position:absolute;right:0;bottom:0.01em;"} %li{:class => ("selected" if @aspect == :all)} - = link_to "All Aspects", root_url + = link_to t('.all_aspects'), root_url %li{ :style => "margin-right:0;", :class => ("selected" if @aspect == :manage)} - = link_to ( (@request_count == 0)? "manage" : "manage (#{@request_count})"), {:controller => :aspects, :action => :manage}, :class => "edit_aspect_button", :class => new_request(@request_count), :title => "Manage your Aspects" + = link_to ( (@request_count == 0)? t('.manage') : "#{t('.manage')} (#{@request_count})"), {:controller => :aspects, :action => :manage}, :class => "edit_aspect_button", :class => new_request(@request_count), :title => t('.manage_your_aspects') .yo{ :style => "display:none;"} #add_aspect_pane diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml index 4645ec65c..9dadf4905 100644 --- a/app/views/shared/_publisher.haml +++ b/app/views/shared/_publisher.haml @@ -19,4 +19,4 @@ = check_box_tag("aspect_ids[]", aspect.id, @aspect == :all || current_aspect?(aspect) ) = aspect.name - = f.submit "Share" + = f.submit t('.share') diff --git a/app/views/shared/_sub_header.haml b/app/views/shared/_sub_header.haml index badf8783d..d8ad6c603 100644 --- a/app/views/shared/_sub_header.haml +++ b/app/views/shared/_sub_header.haml @@ -7,9 +7,9 @@ - else %h1 - if @aspect == :all - = link_to "All Aspects", root_path + = link_to t('.all_aspects'), root_path - elsif @aspect == :manage - = link_to "Manage Aspects", root_path + = link_to t('.manage_aspects'), root_path - else = link_to @aspect.name, @aspect From 6a967e7fe9914dbc35ebc76c9350781187a63426 Mon Sep 17 00:00:00 2001 From: Ariel Zavala Date: Thu, 16 Sep 2010 15:47:12 -0400 Subject: [PATCH 8/9] Added localization to status message views --- app/views/status_messages/_new_status_message.haml | 4 ++-- app/views/status_messages/_status_message.html.haml | 4 ++-- app/views/status_messages/show.html.haml | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/views/status_messages/_new_status_message.haml b/app/views/status_messages/_new_status_message.haml index 329e72d66..b515dadff 100644 --- a/app/views/status_messages/_new_status_message.haml +++ b/app/views/status_messages/_new_status_message.haml @@ -6,5 +6,5 @@ = form_for StatusMessage.new, :remote => true do |f| = f.error_messages %p - = f.text_field :message, :value => "tell me something good" - = f.submit 'oh yeah!', :class => 'button' + = f.text_field :message, :value => t('.tell_me_something_good') + = f.submit t('.oh_yeah'), :class => 'button' diff --git a/app/views/status_messages/_status_message.html.haml b/app/views/status_messages/_status_message.html.haml index a22098afa..f6cac9155 100644 --- a/app/views/status_messages/_status_message.html.haml +++ b/app/views/status_messages/_status_message.html.haml @@ -15,11 +15,11 @@ .info = link_to(how_long_ago(post), object_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 - if current_user.owns?(post) .destroy_link - = link_to 'Delete', status_message_path(post), :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "delete" + = link_to t('.delete'), status_message_path(post), :confirm => t('.are_you_sure'), :method => :delete, :remote => true, :class => "delete" diff --git a/app/views/status_messages/show.html.haml b/app/views/status_messages/show.html.haml index 358c2244b..b27208d2b 100644 --- a/app/views/status_messages/show.html.haml +++ b/app/views/status_messages/show.html.haml @@ -3,20 +3,20 @@ -# the COPYRIGHT file. -- title "Status Message" +- title t('.status_message') %p - %strong Message: + %strong="#{t('.message')}:" = @status_message.message %p - %strong Owner: + %strong="#{t('.owner')}:" = @status_message.person.real_name -%h4= "comments (#{@status_message.comments.count})" +%h4= "#{t('.comments')} (#{@status_message.comments.count})" = render "comments/comments", :post => @status_message %p - = link_to "Destroy", @status_message, :confirm => 'Are you sure?', :method => :delete + = link_to t('.destroy'), @status_message, :confirm => t('.are_you_sure'), :method => :delete | - = link_to "View All", status_messages_path + = link_to t('.view_all'), status_messages_path From be9ae343cc49e3124a6082c17fa8c95960607e37 Mon Sep 17 00:00:00 2001 From: Ariel Zavala Date: Thu, 16 Sep 2010 15:55:54 -0400 Subject: [PATCH 9/9] Added localizations that I had missed --- app/views/aspects/manage.html.haml | 6 ++---- app/views/registrations/new.html.haml | 2 +- app/views/shared/_aspect_friends.haml | 2 +- app/views/users/edit.html.haml | 17 ++++++++--------- config/locales/en.yml | 23 +++++++++++++++++++++++ 5 files changed, 35 insertions(+), 15 deletions(-) diff --git a/app/views/aspects/manage.html.haml b/app/views/aspects/manage.html.haml index 0e667a8e6..c8537d638 100644 --- a/app/views/aspects/manage.html.haml +++ b/app/views/aspects/manage.html.haml @@ -8,8 +8,7 @@ = javascript_include_tag 'aspect-edit.js' - content_for :left_pane do - %h1 - Requests + %h1=t('.requests') .requests %ul @@ -18,8 +17,7 @@ = person_image_tag(request.person) .name = request.person.real_name - %h1 - Ignore/Remove + %h1=t('.ignore_remove') %li.remove %ul diff --git a/app/views/registrations/new.html.haml b/app/views/registrations/new.html.haml index eefa94519..065a9aa49 100644 --- a/app/views/registrations/new.html.haml +++ b/app/views/registrations/new.html.haml @@ -27,5 +27,5 @@ = pr.label :last_name = pr.text_field :last_name - = f.submit "Sign up" + = f.submit t('.sign_up') = render :partial => "devise/shared/links" diff --git a/app/views/shared/_aspect_friends.haml b/app/views/shared/_aspect_friends.haml index 6ab286a81..5e1dfe213 100644 --- a/app/views/shared/_aspect_friends.haml +++ b/app/views/shared/_aspect_friends.haml @@ -16,5 +16,5 @@ = render "requests/new_request", :aspect => @aspect -else .clear - = link_to "add friends", aspects_manage_path + = link_to t('.add_friends'), aspects_manage_path diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index cddec8d77..406f95499 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -4,8 +4,7 @@ - content_for :publish do - %h1 - Editing profile + %h1="#{t('.editing_profile')}" - content_for :left_pane do \. @@ -15,7 +14,7 @@ = f.fields_for :profile do |p| - %h3 Picture + %h3="#{t('.picture')}" %div#image_picker = p.hidden_field :image_url, :value => (@profile.image_url.sub(@user.url,'/') if @profile.image_url), :id => 'image_url_field' @@ -32,18 +31,18 @@ - else You don't have any photos! Go to the - = link_to "albums", albums_path(:aspect => 'all') + = link_to t('.albums'), albums_path(:aspect => 'all') page to upload some. =will_paginate @photos %br - %h3 Info + %h3="#{t('.info')}" %p %b - DIASPORA USERNAME: + ="#{t('.diaspora_username')}:" = @user.diaspora_handle %p @@ -58,10 +57,10 @@ = f.text_field :email #submit_block - = link_to "Cancel", root_path + = link_to t('.cancel'), root_path or - = f.submit "Update Profile" + = f.submit t('.update_profile') #content_bottom .back - = link_to "⇧ home", root_path + = link_to "⇧ #{t('.home')}", root_path diff --git a/config/locales/en.yml b/config/locales/en.yml index bfcf69939..d9046c00b 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -22,6 +22,8 @@ en: manage_aspects: "Manage Aspects" publisher: share: "Share" + aspect_friends: + add_friends: "add friends" albums: album: you: "you" @@ -52,6 +54,8 @@ en: add_a_new_friend: "Add a new friend" show: "Show" update_aspects: "Update Aspects" + requests: "Requests" + ignore_remove: "Ignore/Remove" new_aspect: create: "Create" users: @@ -88,5 +92,24 @@ en: new_photo: "New Photo" back_to_list: "Back to List" post_it: "post it!" + registrations: + new: + sign_up: "Sign up" + status_messages: + new_status_message: + tell_me_something_good: "tell me something good" + oh_yeah: "oh yeah!" + status_message: + show_comments: "show comments" + delete: "Delete" + are_you_sure: "Are you sure?" + show: + status_message: "Status Message" + comments: "comments" + are_you_sure: "Are you sure?" + destroy: "Destroy" + view_all: "View All" + message: "Message" + owner: "Owner"