From 7e7de439f8e4bf16f2edaec26d3b7c491d3f8785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Sat, 17 Mar 2012 13:52:46 +0100 Subject: [PATCH] fix untranslatable stuff from the invite refactor --- app/helpers/notifier_helper.rb | 4 ++-- app/views/invitations/new.html.haml | 4 ++-- app/views/notifier/invite.text.erb | 13 +---------- app/views/people/_add_contact.html.haml | 2 +- config/locales/diaspora/en.yml | 30 ++++++++++++++++++++++++- 5 files changed, 35 insertions(+), 18 deletions(-) diff --git a/app/helpers/notifier_helper.rb b/app/helpers/notifier_helper.rb index 21019cd24..8d17fa342 100644 --- a/app/helpers/notifier_helper.rb +++ b/app/helpers/notifier_helper.rb @@ -26,9 +26,9 @@ module NotifierHelper def invite_email_title if @inviter.present? - "#{@inviter.person.name} invited you to Diaspora*" + I18n.t 'notifier.invited_you', :name => @inviter.person.name else - "Accept Your Diaspora* invite!" + I18n.t 'notifier.accept_invite' end end end diff --git a/app/views/invitations/new.html.haml b/app/views/invitations/new.html.haml index 448876030..3c7b181dd 100644 --- a/app/views/invitations/new.html.haml +++ b/app/views/invitations/new.html.haml @@ -34,9 +34,9 @@ .clearfix .span-7.prepend-3.last - or paste them this link! + = t('.paste_link') = invite_link(@invite_code) - = "#{@invite_code.count} invites left on this code" + = t('.codes_left', :count => @invite_code.count) %br %br diff --git a/app/views/notifier/invite.text.erb b/app/views/notifier/invite.text.erb index 947541336..8d39da1c6 100644 --- a/app/views/notifier/invite.text.erb +++ b/app/views/notifier/invite.text.erb @@ -1,12 +1 @@ -Hello! - -You have been invited to join Diaspora*! - -Click this link to get started - -<%= invite_code_url(@invitation_code)%> - - -Love, - -The Diaspora* email robot! \ No newline at end of file +<%= t('.message', :invite_url => invite_code_url(@invitation_code)) %> diff --git a/app/views/people/_add_contact.html.haml b/app/views/people/_add_contact.html.haml index 7026e5d47..8b4c4af39 100644 --- a/app/views/people/_add_contact.html.haml +++ b/app/views/people/_add_contact.html.haml @@ -1,5 +1,5 @@ .alert-message.block-message.success - you were invited by + = t('.invited_by') = person_image_link inviter = person_link inviter = aspect_membership_dropdown(contact, inviter, false) diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index f2db7e70e..15c12ac63 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -339,6 +339,14 @@ en: personal_message: "Personal message" send_an_invitation: "Send an invitation" send_invitation: "Send invitation" + paste_link: "or paste them this link!" + codes_left: + zero: "No invites left on this code" + one: "One invite left on this code" + two: "%{count} invites left on this code" + few: "%{count} invites left on this code" + many: "%{count} invites left on this code" + other: "%{count} invites left on this code" aspect: "Aspect" already_invited: "The following people have not accepted your invitation:" resend: "Resend" @@ -522,6 +530,24 @@ en: confirm_email: subject: "Please activate your new email address %{unconfirmed_email}" click_link: "To activate your new email address %{unconfirmed_email}, please follow this link:" + accept_invite: "Accept Your Diaspora* invite!" + invited_you: "%{name} invited you to Diaspora*" + invite: + message: |- + Hello! + + You have been invited to join Diaspora*! + + Click this link to get started + + %{invite_url} + <%= invite_code_url(@invitation_code)%> + + + Love, + + The Diaspora* email robot! + people: zero: "no people" one: "1 person" @@ -578,8 +604,10 @@ en: edit_membership: "edit aspect membership" add_contact_small: add_contact_from_tag: "add contact from tag" - last_post: "Last Post" + add_contact: + invited_by: "you were invited by" + photos: show: delete_photo: "Delete Photo"