@@ -20,7 +20,7 @@
- Finally - it's here.
+ <%= t('.finally') %>
|
@@ -30,10 +30,10 @@
- The social network you have been waiting for has arrived. Revamped, more secure, and more fun, DIASPORA* is ready to help you share and explore the web in a whole new way.
+ <%= t('.arrived', :strong_diaspora => content_tag(:strong, "DIASPORA*")).html_safe %>
- Sign up now →
+ <%= link_to(t('.sign_up_now').html_safe, accept_invitation_url(@resource, :invitation_token => @resource.invitation_token), :style => "color: #3F8FBA; text-decoration: underline; font-weight: bold; font-size: 20px;", :target => "_blank").html_safe %>
|
@@ -43,7 +43,7 @@
- What your friends are saying...
+ <%= t('.friends_saying') %>
|
@@ -59,7 +59,7 @@
- Even more people are excited to see you!
+ <%= t('.more_people') %>
|
@@ -77,7 +77,7 @@
|
- 1. Get Connected |
+ 1. <%= t('.get_connected') %>
@@ -85,7 +85,7 @@
- An international movement with a shared vision for a better web, DIASPORA*'s #1 feature is its community. Meet new people, connect with friends, and join the fun.
+ <%= t('.get_connected_paragraph', :strong_diaspora => content_tag(:strong, "DIASPORA*")).html_safe %>
|
@@ -94,14 +94,14 @@
|
- 2. Be Yourself |
+ 2. <%= t('.be_yourself') %>
- The Internet has created unique new ways for us to express ourselves.
- DIASPORA* lets you be yourself and share however you want, with or without your real name.
+ <%= t('.be_yourself_paragraph', :strong_diaspora => content_tag(:strong, "DIASPORA*")).html_safe %>
+
|
@@ -115,7 +115,7 @@
|
- 3. Have Fun |
+ 3. <%= t('.have_fun') %>
@@ -123,11 +123,8 @@
- DIASPORA* is all about discovering amazing new content and people online.
-
- Cubbi.es,
- the world's first DIASPORA* application is just the begining.
- Collect and share the web in all of its glory.
+
+ <%= t('.have_fun_paragraph', :strong_diaspora => content_tag(:strong, "DIASPORA*"), :link => link_to(t('.cubbies'), "https://cubbi.es", :style => "color: #3F8FBA; text-decoration: underline; font-weight: bold; font-size: 20px;", :target => "_blank")).html_safe %>
|
@@ -139,7 +136,7 @@
|
- Sign up now →
+ <%= link_to(t('.sign_up_now').html_safe, accept_invitation_url(@resource, :invitation_token => @resource.invitation_token), :style => "color: #3F8FBA; text-decoration: underline; font-weight: bold; font-size: 20px;", :target => "_blank").html_safe %>
|
@@ -151,9 +148,8 @@
|
- DIASPORA* is made by people who love the Internet as much as you do.
- Join our team, or
- help fund Diaspora!
+ <%= t('.made_by_people', :strong_diaspora => content_tag(:strong, "DIASPORA*"), :jointeam => link_to(t('.join_team'), "https://github.com/diaspora/diaspora/wiki/Become-a-Contributor", :style =>"color: #3F8FBA; text-decoration: underline; font-weight: bold; font-size: 18px;", :target => "_blank"), :helpfund => link_to(t('.help_fund'), "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QG4L6VYD8YGPU", :style =>"color: #3F8FBA; text-decoration: underline; font-weight: bold; font-size: 18px;", :target => "_blank")).html_safe %>
+
|
@@ -161,12 +157,14 @@
- Love,
- Team Diaspora
+ <%= t('.love') %>
+ <%= t('.team_diaspora') %>
|
|
- To unsubscribe please click here.
- For general inquiries or support with your Diaspora account, please email us at questions@joindiaspora.com.
+ <% if AppConfig[:pod_uri].host.match(/joindiaspora.com/) %>
+ <%= t('.unsubscribe', :link => link_to(t('.here'), "http://joindiaspora.us1.list-manage.com/unsubscribe?u=d759919b94f9cdcf39d204f3f&id=7b5ceb2f8b", :style => "color: #3F8FBA; text-decoration: none;")).html_safe %>
+ <% end %>
+ <%= t('.email_us', :email => link_to(t('.email_address'), "mailto:questions@joindiaspora.com", :style => "color: #3F8FBA; text-decoration: none;")).html_safe %>
|
diff --git a/app/views/invitations/new.html.haml b/app/views/invitations/new.html.haml
index 82abcf855..2a55bf40c 100644
--- a/app/views/invitations/new.html.haml
+++ b/app/views/invitations/new.html.haml
@@ -23,6 +23,13 @@
%br
%br
+ %h4
+ = t('.language')
+ = invite.select(:language, available_language_options, :selected => current_user.language)
+
+ %br
+ %br
+
%h4
= t('.personal_message')
= invite.text_area :invite_messages, :rows => 3, :value => ""
diff --git a/config/locales/devise/devise.en.yml b/config/locales/devise/devise.en.yml
index fcca12c35..83ad2a20a 100644
--- a/config/locales/devise/devise.en.yml
+++ b/config/locales/devise/devise.en.yml
@@ -73,6 +73,30 @@ en:
click_to_unlock: "Click the link below to unlock your account:"
unlock: "Unlock my account"
invitation_instructions:
+ displaying_correctly: "Email not displaying correctly? %{link} in your browser"
+ view_in: "View in"
+ finally: "Finally - it's here"
+ arrived: "The social network you have been waiting for has arrived. Revamped, more secure, and more fun, %{strong_diaspora} is ready to help you share and explore the web in a whole new way."
+ sign_up_now: "Sign up now →"
+ friends_saying: "What your friends are saying..."
+ more_people: "Even more people are excited to see you!"
+ get_connected: "Get Connected"
+ get_connected_paragraph: "An international movement with a shared vision for a better web, %{strong_diaspora}'s #1 feature is its community. Meet new people, connect with friends, and join the fun."
+ be_yourself: "Be Yourself"
+ be_yourself_paragraph: "The Internet has created unique new ways for us to express ourselves. %{strong_diaspora} lets you be yourself and share however you want, with or without your real name."
+ have_fun: "Have Fun"
+ cubbies: "Cubbi.es"
+ have_fun_paragraph: "%{strong_diaspora} is all about discovering amazing new content and people online. %{link}, the world's first %{strong_diaspora} application is just the begining. Collect and share the web in all of its glory."
+ made_by_people: "%{strong_diaspora} is made by people who love the Internet as much as you do. %{jointeam}, or %{helpfund}!"
+ join_team: "Join our Team"
+ or: "or"
+ help_fund: "help fund Diaspora"
+ unsubscribe: "To unsubscribe please click %{link}."
+ here: "here"
+ love: "Love,"
+ team_diaspora: "Team Diaspora"
+ email_us: "For general inquiries or support with your Diaspora account, please email us at %{email}."
+ email_address: "questions@joindiaspora.com"
subject: "You've been invited to join Diaspora!"
accept: "Accept invitation"
ignore: "If you don't want to accept the invitation, please ignore this email."
diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml
index 3d3728fef..bd915ca2f 100644
--- a/config/locales/diaspora/en.yml
+++ b/config/locales/diaspora/en.yml
@@ -318,6 +318,7 @@ en:
already_contacts: "You are already connected with this person"
own_address: "You can't send an invitation to your own address."
new:
+ language: "Language"
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."
diff --git a/db/migrate/20111016145626_add_language_to_invitations.rb b/db/migrate/20111016145626_add_language_to_invitations.rb
new file mode 100644
index 000000000..4f9129f40
--- /dev/null
+++ b/db/migrate/20111016145626_add_language_to_invitations.rb
@@ -0,0 +1,9 @@
+class AddLanguageToInvitations < ActiveRecord::Migration
+ def self.up
+ add_column :invitations, :language, :string, :default => "en"
+ end
+
+ def self.down
+ remove_column :invitations, :language
+ end
+end
diff --git a/spec/models/invitation_spec.rb b/spec/models/invitation_spec.rb
index 11c2cc82d..8837700f7 100644
--- a/spec/models/invitation_spec.rb
+++ b/spec/models/invitation_spec.rb
@@ -13,13 +13,14 @@ describe Invitation do
end
describe 'validations' do
before do
- @invitation = Factory.build(:invitation, :sender => user, :recipient => nil, :aspect => user.aspects.first)
+ @invitation = Factory.build(:invitation, :sender => user, :recipient => nil, :aspect => user.aspects.first, :language => "de")
end
it 'is valid' do
@invitation.sender.should == user
@invitation.recipient.should == nil
@invitation.aspect.should == user.aspects.first
+ @invitation.language.should == "de"
@invitation.should be_valid
end
@@ -29,20 +30,30 @@ describe Invitation do
end
end
+ describe '#language' do
+ it 'returns the correct language if the language is set' do
+ @invitation = Factory.build(:invitation, :sender => user, :recipient => eve, :aspect => user.aspects.first, :language => "de")
+ @invitation.language.should == "de"
+ end
+
+ it 'returns en if no language is set' do
+ @invitation = Factory.build(:invitation, :sender => user, :recipient => eve, :aspect => user.aspects.first)
+ @invitation.language.should == "en"
+ end
+ end
+
it 'has a message' do
- @invitation = Factory.build(:invitation, :sender => user, :recipient => eve, :aspect => user.aspects.first)
+ @invitation = Factory.build(:invitation, :sender => user, :recipient => eve, :aspect => user.aspects.first, :language => user.language)
@invitation.message = "!"
@invitation.message.should == "!"
end
-
-
describe 'the invite process' do
before do
end
it 'works for a new user' do
- invite = Invitation.new(:sender => alice, :aspect => alice.aspects.first, :service => 'email', :identifier => 'foo@bar.com')
+ invite = Invitation.new(:sender => alice, :aspect => alice.aspects.first, :service => 'email', :identifier => 'foo@bar.com', :language => alice.language)
lambda {
invite.save
invite.send!
@@ -50,7 +61,7 @@ describe Invitation do
end
it 'works for a current user(with the right email)' do
- invite = Invitation.create(:sender => alice, :aspect => alice.aspects.first, :service => 'email', :identifier => bob.email)
+ invite = Invitation.create(:sender => alice, :aspect => alice.aspects.first, :service => 'email', :identifier => bob.email, :language => alice.language)
lambda {
invite.send!
}.should_not change(User, :count)
@@ -80,7 +91,7 @@ describe Invitation do
describe '.batch_invite' do
before do
@emails = ['max@foo.com', 'bob@mom.com']
- @opts = {:aspect => eve.aspects.first, :sender => eve, :service => 'email'}
+ @opts = {:aspect => eve.aspects.first, :sender => eve, :service => 'email', :language => eve.language}
end
it 'returns an array of invites based on the emails passed in' do
@@ -102,7 +113,7 @@ describe Invitation do
describe 'send' do
before do
- @invitation = Factory(:invitation, :sender => alice, :aspect => alice.aspects.first, :service => 'email', :identifier => 'a@a.com')
+ @invitation = Factory(:invitation, :sender => alice, :aspect => alice.aspects.first, :service => 'email', :identifier => 'a@a.com' , :language => alice.language)
end
it 'sends an email' do
@@ -133,7 +144,7 @@ describe Invitation do
describe '#recipient_identifier' do
it 'calls email if the invitation_service is email' do
email = 'abc@abc.com'
- invitation = Factory(:invitation, :sender => alice, :service => 'email', :identifier => email, :aspect => alice.aspects.first)
+ invitation = Factory(:invitation, :sender => alice, :service => 'email', :identifier => email, :aspect => alice.aspects.first, :language => alice.language)
invitation.recipient_identifier.should == email
end
| | | |