From f426c08dcc802095d0d981b58481e5ac85ebea7f Mon Sep 17 00:00:00 2001 From: Jonne Hass Date: Sun, 14 Nov 2010 16:06:32 +0100 Subject: [PATCH] made shared/_contatct_list.html.haml and the type after "viewing:" in shared/_author_info.html.haml translatable --- app/views/home/show.html.haml | 6 +++--- app/views/invitations/_new.haml | 2 +- app/views/layouts/_header.html.haml | 6 +++--- app/views/layouts/application.html.haml | 6 +++--- .../requests/_manage_aspect_contacts.haml | 8 ++++---- app/views/shared/_aspect_contacts.haml | 2 +- app/views/shared/_author_info.html.haml | 9 ++++++++- app/views/shared/_contact_list.html.haml | 6 +++--- config/locales/diaspora/en.yml | 20 +++++++++++++++++++ 9 files changed, 46 insertions(+), 19 deletions(-) diff --git a/app/views/home/show.html.haml b/app/views/home/show.html.haml index b3e78945c..5bf9790e9 100644 --- a/app/views/home/show.html.haml +++ b/app/views/home/show.html.haml @@ -8,14 +8,14 @@ #diaspora_description.section %p - Share what you want, with who you want. + = t('.share_what_you_want') #signup_field.section = render 'shared/mail_signup_form' #login_field.section - already have an account? - = link_to "log in here", new_user_session_path + = t('.already_account') + = link_to t('.login_here'), new_user_session_path .span-24.last{:style=>"text-align:center;"} %ul#press_logos diff --git a/app/views/invitations/_new.haml b/app/views/invitations/_new.haml index b63184327..783fbb56a 100644 --- a/app/views/invitations/_new.haml +++ b/app/views/invitations/_new.haml @@ -14,7 +14,7 @@ = invite.select(:aspects, @aspects_dropdown_array) - else = invite.select(:aspects, @aspects_dropdown_array, :selected => @aspect.id) - + %br = t('.message') = invite.text_area :invite_messages, :value => "" diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index 6696e331e..fd226d76a 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -11,9 +11,9 @@ - unless current_user .right %ul#landing_nav - %li= link_to "blog", "http://blog.joindiaspora.com" - %li= link_to "developers", "https://github.com/diaspora/diaspora" - %li= link_to "login", new_user_session_path + %li= link_to t('.blog'), "http://blog.joindiaspora.com" + %li= link_to t('.developers'), "https://github.com/diaspora/diaspora" + %li= link_to t('.login'), new_user_session_path - else #global_search = form_tag(people_path, :method => 'get') do diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index efa152a89..cc36a7b92 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -76,10 +76,10 @@ %footer .container - .brandon POWERED BY DIASPORA* + .brandon = t('.powered by') %ul#footer_nav - %li= link_to "blog", "http://blog.joindiaspora.com" - %li= link_to "developers", "https://github.com/diaspora/diaspora" + %li= link_to t('layouts.header.blog'), "http://blog.joindiaspora.com" + %li= link_to t('layouts.header.developers'), "https://github.com/diaspora/diaspora" :javascript var is_ssl = ("https:" == document.location.protocol); diff --git a/app/views/requests/_manage_aspect_contacts.haml b/app/views/requests/_manage_aspect_contacts.haml index 824156922..6c608f62f 100644 --- a/app/views/requests/_manage_aspect_contacts.haml +++ b/app/views/requests/_manage_aspect_contacts.haml @@ -5,14 +5,14 @@ .span-15.last .modal_title_bar %h4 - Manage contacts within + = t('.manage_within') %i= aspect.name .span-6.append-1.last - %h3 Existing contacts + %h3= t('.existing') = render 'shared/contact_list', :aspect => aspect, :contacts => @contacts, :manage => defined?(manage) .span-7.last - %h3 Add a new contact + %h3= t('.add_new') = form_tag(person_by_handle_path, :id => "new_request_to_#{aspect.id}", :class => "webfinger_form", :remote => true) do =t('.enter_a_diaspora_username') %br @@ -34,7 +34,7 @@ %ul#request_result{:aspect_id => aspect.id} %li.error.hidden #message - = link_to "Know their email address? You should invite them", "#invite_user_pane", :class => "invite_user_button" + = link_to t('.know_email'), "#invite_user_pane", :class => "invite_user_button" %br .yo{ :style => "display:none;"} #invite_user_pane diff --git a/app/views/shared/_aspect_contacts.haml b/app/views/shared/_aspect_contacts.haml index 68658e487..eedabf538 100644 --- a/app/views/shared/_aspect_contacts.haml +++ b/app/views/shared/_aspect_contacts.haml @@ -13,7 +13,7 @@ = person_image_link(contact.person) -unless (aspect == :all) - = link_to (image_tag('add_contact_button.png', :title => "manage #{@aspect}")), "#manage_aspect_contacts_pane", :class => 'manage_aspect_contacts_button' + = link_to (image_tag('add_contact_button.png', :title => t('.manage', :aspect => @aspect))), "#manage_aspect_contacts_pane", :class => 'manage_aspect_contacts_button' .fancybox_content #manage_aspect_contacts_pane diff --git a/app/views/shared/_author_info.html.haml b/app/views/shared/_author_info.html.haml index cafd24a43..ff41039d0 100644 --- a/app/views/shared/_author_info.html.haml +++ b/app/views/shared/_author_info.html.haml @@ -16,4 +16,11 @@ = link_to t('.view_profile'), person_path(person) = link_to t('_photos'), person_photos_path(person) = link_to t('.status_messages'), person_status_messages_path(person) - = "#{t('.viewing')}: #{@post_type.to_s.titleize}" if defined?(@post_type) + - if defined?(@post_type) + - case @post_type + - when :all + = "#{t('.viewing')}: #{t('.all')}" + - when :photos + = "#{t('.viewing')}: #{t('_photos')}" + - when :status_messages + = "#{t('.viewing')}: #{t('.status_messages')}" diff --git a/app/views/shared/_contact_list.html.haml b/app/views/shared/_contact_list.html.haml index 600112938..c7fc065f0 100644 --- a/app/views/shared/_contact_list.html.haml +++ b/app/views/shared/_contact_list.html.haml @@ -23,7 +23,7 @@ .contact_list - = search_field_tag :contact_search, "", :class => 'contact_list_search', :results => 5, :placeholder => "Search contacts" + = search_field_tag :contact_search, "", :class => 'contact_list_search', :results => 5, :placeholder => t('.search_contacts') %ul - for contact in contacts @@ -38,7 +38,7 @@ = hidden_field_tag :person_id, contact.person.id - if defined?(manage) && manage = hidden_field_tag :manage, true - = submit_tag '+', :class => 'add', :title => "Add #{contact.person.real_name} to #{aspect}" + = submit_tag '+', :class => 'add', :title => t('.add_to', :name => contact.person.real_name, :aspect => aspect) - else = form_tag '/aspects/remove_from_aspect' do = person_image_tag contact.person @@ -49,5 +49,5 @@ = hidden_field_tag :person_id, contact.person.id - if defined?(manage) && manage = hidden_field_tag :manage, true - = submit_tag 'x', :class => 'remove', :title => "Remove #{contact.person.real_name} from #{aspect}" + = submit_tag 'x', :class => 'remove', :title => t('.remove_from', :name => contact.person.real_name, :aspect => aspect) diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 8812eaff7..e65a5749c 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -57,6 +57,11 @@ en: edit_profile: "edit profile" account_settings: "account settings" logout: "logout" + blog: "blog" + developers: "developers" + login: "login" + application: + powered_by: "POWERED BY DIASPORA*" shared: stream_element: show_comments: "show comments" @@ -77,6 +82,7 @@ en: add_contacts: "add contacts" everyone: "Everyone" add_to: "add to %{aspect}" + manage: "manage %{aspect}" invitations: invites: "Invites" invite_someone: "Invite someone" @@ -87,6 +93,7 @@ en: view_profile: "View profile" status_messages: "status messages" viewing: "viewing" + all: "all" public_explain: title: "You are about to post a public message!" outside: "Public messages will be available for others outside of Diaspora to see." @@ -94,6 +101,10 @@ en: manage: "manage connected services" notification: new: "New %{type} from %{from}" + contact_list: + search_contacts: "Search contacts" + add_to: "Add %{name} to %{aspect}" + remove_from: "Remove %{name} from %{aspect}" aspects: no_contacts_message: nobody: "We know you know people — bring them to Diaspora!" @@ -307,6 +318,10 @@ en: your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}" contact_username: "Contact's username" create_request: "Create request" + manage_within: "Manage contacts within" + existing: "Existing contacts" + add_new: "Add a new contact" + know_email: "Know their email address? You should invite them" destroy: success: "You are now friends." error: "Please select an aspect!" @@ -342,3 +357,8 @@ en: subject: "%{name} has accepted your contact request on Diaspora*" accepted: "has accepted your contact request. They are now in your" aspect: "aspect." + home: + show: + share_what_you_want: "Share what you want, with who you want." + already_account: "already have an account?" + login_here: "log in here"