From ed3dc10f79169327d9d31d8f090accd536b0f512 Mon Sep 17 00:00:00 2001 From: MrZYX Date: Tue, 23 Nov 2010 13:10:51 +0100 Subject: [PATCH] various fixes to translations - i like downcased keys only :P - made stuff translatable - cleaned up en.yml a bit --- app/controllers/invitations_controller.rb | 2 +- app/views/invitations/_new.haml | 2 +- app/views/layouts/_header.html.haml | 2 +- app/views/layouts/application.html.haml | 2 +- .../_new_request_with_aspect_to_person.haml | 2 +- app/views/shared/_aspect_contacts.haml | 4 +-- app/views/shared/_invitations.haml | 2 +- app/views/shared/_publisher.haml | 2 +- app/views/users/edit.html.haml | 4 +-- config/locales/diaspora/en.yml | 27 +++++++------------ 10 files changed, 21 insertions(+), 28 deletions(-) diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb index 041e530f5..30d9ca15c 100644 --- a/app/controllers/invitations_controller.rb +++ b/app/controllers/invitations_controller.rb @@ -23,7 +23,7 @@ class InvitationsController < Devise::InvitationsController good_users, rejected_users = invited_users.partition {|u| u.persisted? } flash[:notice] = I18n.t('invitations.create.sent') + good_users.map{|x| x.email}.join(', ') - flash[:error] = I18n.t('invitations.create.REJECTED') + rejected_users.map{|x| x.email}.join(', ') + flash[:error] = I18n.t('invitations.create.rejected') + rejected_users.map{|x| x.email}.join(', ') rescue RuntimeError => e if e.message == "You have no invites" flash[:error] = I18n.t 'invitations.create.no_more' diff --git a/app/views/invitations/_new.haml b/app/views/invitations/_new.haml index 742512d32..cc4c1ca49 100644 --- a/app/views/invitations/_new.haml +++ b/app/views/invitations/_new.haml @@ -5,7 +5,7 @@ %i = t('.if_they_accept_info') %br - = t('.comma_seperated_PLZ') + = t('.comma_seperated_plz') = form_for User.new, :url => invitation_path(User) do |invite| %p = invite.label :email , t('email') diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index 0eabddf39..23eff99fe 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -13,7 +13,7 @@ %ul#landing_nav %li= link_to '@joindiaspora', "http://twitter.com/joindiaspora" %li= link_to 'github', "https://github.com/diaspora/diaspora" - %li= link_to 'blog', 'http://blog.joindiaspora.com/' + %li= link_to t('.blog'), 'http://blog.joindiaspora.com/' %li= link_to t('.login'), new_user_session_path, :class => 'login' - else diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index e742947cd..2ed5dd16c 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -79,7 +79,7 @@ %ul#footer_nav %li= link_to '@joindiaspora', "http://twitter.com/joindiaspora" %li= link_to 'github', "https://github.com/diaspora/diaspora" - %li= link_to 'blog', "http://blog.joindiaspora.com" + %li= link_to t('layouts.header.blog'), "http://blog.joindiaspora.com" :javascript var is_ssl = ("https:" == document.location.protocol); diff --git a/app/views/requests/_new_request_with_aspect_to_person.haml b/app/views/requests/_new_request_with_aspect_to_person.haml index fee4a7812..631ae5a7f 100644 --- a/app/views/requests/_new_request_with_aspect_to_person.haml +++ b/app/views/requests/_new_request_with_aspect_to_person.haml @@ -6,6 +6,6 @@ = form_for Request.new, :remote => true do |request| = request.hidden_field :into, :value => "changeme" = request.hidden_field :to, :value => destination_handle - = request.submit '+', :class => 'add', :disable_with => "Sending" + = request.submit '+', :class => 'add', :disable_with => t('requests.create.sending') .message.hidden %i= t('requests.new_request_to_person.sent') diff --git a/app/views/shared/_aspect_contacts.haml b/app/views/shared/_aspect_contacts.haml index 02be8b752..0de9d5e9f 100644 --- a/app/views/shared/_aspect_contacts.haml +++ b/app/views/shared/_aspect_contacts.haml @@ -31,7 +31,7 @@ fadeOut: function(){ var trigger = $("#edit_aspect_trigger"); - trigger.html("#{t('.edit_aspect')}"); + trigger.html("#{t('aspects.show.edit_aspect')}"); $("#edit_aspect_pane").removeClass("active"); $("#edit_aspect_pane").fadeOut(200, function(){ @@ -57,7 +57,7 @@ #left_pane{:class => ("everyone" if aspect == :all)} - if aspect == :all - %h2 All contacts + %h2= t('.all_contacts') - unless aspect == :all #edit_aspect_pane diff --git a/app/views/shared/_invitations.haml b/app/views/shared/_invitations.haml index f3ebf1dce..fec37c4a0 100644 --- a/app/views/shared/_invitations.haml +++ b/app/views/shared/_invitations.haml @@ -6,4 +6,4 @@ #invite_user_pane = render "invitations/new" - else - You don't have any right now, but more invites are coming soon! + = t('.dont_have_now') diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml index 18dfe753f..f9a453bb2 100644 --- a/app/views/shared/_publisher.haml +++ b/app/views/shared/_publisher.haml @@ -32,7 +32,7 @@ - if aspect == :all #content_creation_button = image_tag 'icons/monotone_chat_talk.png', :id => 'share_bubble' - %h4 share across all of your aspects + %h4= t('.share_with_all') .content_creation = form_for(StatusMessage.new, :remote => true) do |status| diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index d5dea15a0..9ecf06be0 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -26,12 +26,12 @@ .span-8.append-1.last %h3 - Your diaspora handle + = t('.your_handle') %p %b= current_user.diaspora_handle .span-8.prepend-2.last %h3 - Your email + = t('.your_email') %p = current_user.email diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 798f5ed10..206d32e27 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -60,7 +60,6 @@ en: account_settings: "account settings" logout: "logout" blog: "blog" - developers: "developers" login: "login" application: powered_by: "POWERED BY DIASPORA*" @@ -77,6 +76,7 @@ en: all: "all" add_photos: "add photos" all_contacts: "all contacts" + share_with_all: "share across all of your aspects" aspect_contacts: add_to: "add to %{aspect}" done_editing: "done editing" @@ -84,8 +84,6 @@ en: new_request: "%{count} new request!" add_existing: "Add an existing contact" aspect_settings: "Aspect settings" - edit_aspect: "edit aspect" - contact: "contact" contacts: "contacts" remove_aspect: "Remove Aspect" confirm_remove_aspect: "Remove aspect?" @@ -93,16 +91,17 @@ en: aspects: "Aspects" add_aspect: "add aspect" invites: "Invites" - invite_people: "invite people to join Diaspora." + all_contacts: "All contacts" add_contact: enter_a_diaspora_username: "Enter a Diaspora username:" your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}" - contact_username: "Contact's username" create_request: "Find by Diaspora handle" diaspora_handle: "Diaspora Handle" + know_email: "Know their email address? You should invite them" invitations: invite_someone: "Invite someone" invitations_left: "(%{count} left)" + dont_have_now: "You don't have any right now, but more invites are coming soon!" reshare: reshare: "Reshare" public_explain: @@ -163,10 +162,9 @@ en: family: "Family" work: "Work" index: - handle_explanation: "This is your diaspora handle. Like an email address, you can give this to people to reach you." + handle_explanation: "This is your diaspora handle. Like an email address, you can give this to people to reach you." users: edit: - invite_contacts: "Invite contacts" export_data: "Export Data" close_account: "Close Account" change_language: "Change Language" @@ -174,6 +172,8 @@ en: new_password: "New Password" download_xml: "download my xml" download_photos: "download my photos" + your_handle: "Your diaspora handle" + your_email: "Your email" destroy: "Account successfully closed." getting_started: welcome: "Welcome to Diaspora!" @@ -198,7 +198,6 @@ en: continue: "Continue on to your Home page, an overview of all of your aspects." change_profile: "You can edit your profile and manage your connected services at any time through " user_menu: "the user menu located at the top right." - connect_disconnect: "You can connect/disconnect your services any time by clicking" manage_aspects: "You can also add contacts while on any aspect page." finish: "Finish" update: @@ -259,14 +258,14 @@ en: invitations: create: sent: "Invitations have been sent to: " - REJECTED: "The following email addresses had problems: " + rejected: "The following email addresses had problems: " no_more: "You have no more invitations." already_sent: "You already invited this person." already_contacts: "You are already connected with this person" new: invite_someone_to_join: "Invite someone to join Diaspora!" if_they_accept_info: "if they accept, they will be added to the aspect you invited them." - comma_seperated_PLZ: "You can enter multiple email addresses separated by commas." + comma_seperated_plz: "You can enter multiple email addresses separated by commas." to: "To" message: "Message:" send_an_invitation: "Send an invitation" @@ -328,19 +327,14 @@ en: people_on_pod_are_aware_of: " people on pod are aware of" requests: manage_aspect_contacts: - enter_a_diaspora_username: "Enter a Diaspora username:" - 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" - know_email: "Know their email address? You should invite them" destroy: success: "You are now friends." error: "Please select an aspect!" ignore: "Ignored contact request." create: - sending: "Sending..." + sending: "Sending" sent: "You've asked to share with %{name}. They should see it next time they log in to Diaspora." new_request_to_person: sent: "sent!" @@ -380,4 +374,3 @@ en: simplicity: "Simplicity" simplicity_explanation: "Diaspora makes sharing clean and easy – and this goes for privacy too. Inherently private, Diaspora doesn’t make you wade through pages of settings and options just to keep your profile secure." learn_about_host: "Learn about how to host your own Diaspora server." - learn_about_open_source: "Learn more about Diaspora as an open source project."