added more translations; welcome text switch
This commit is contained in:
parent
b8b4ad3d84
commit
120cf9835b
4 changed files with 54 additions and 34 deletions
|
|
@ -3,7 +3,6 @@
|
|||
# the COPYRIGHT file.
|
||||
|
||||
module UsersHelper
|
||||
|
||||
# @return [Boolean] The user has filled out all profile fields
|
||||
def has_completed_profile?
|
||||
profile = current_user.person.profile
|
||||
|
|
@ -39,4 +38,13 @@ module UsersHelper
|
|||
def has_completed_getting_started?
|
||||
current_user.getting_started == false
|
||||
end
|
||||
|
||||
# @return [String] Welcome text with or without the current_user's first_name
|
||||
def welcome_text
|
||||
if current_user.person.profile.first_name.present?
|
||||
t('users.getting_started.welcome_with_name', :name => current_user.first_name)
|
||||
else
|
||||
t('users.getting_started.welcome')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
.span-13.append-1
|
||||
.stream_container
|
||||
%h2
|
||||
= "Welcome, #{current_user.first_name}!"
|
||||
= welcome_text
|
||||
|
||||
%ul#getting_started
|
||||
%li.profile{:class => ("completed" if has_completed_profile?)}
|
||||
|
|
@ -64,10 +64,10 @@
|
|||
= @step += 1
|
||||
.content
|
||||
%h3
|
||||
= t(".connect_with_people")
|
||||
= t('.connect_with_people')
|
||||
|
||||
%p
|
||||
Connect with people by placing them into one or more of your aspects. Aspects are an intuative way to group new and familar faces, allowing you to filter down or share with subsets of your contacts easily.
|
||||
= t('.connect_with_people_explanation')
|
||||
|
||||
#diaspora_hq_pane
|
||||
- person = Person.find_by_diaspora_handle("diasporahq@joindiaspora.com")
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
|
||||
#featured_users_pane
|
||||
%h4
|
||||
Featured users
|
||||
= t('.featured_users')
|
||||
|
||||
%div
|
||||
- Person.featured_users[0..5].each do |person|
|
||||
|
|
@ -97,12 +97,12 @@
|
|||
- person.profile.tags[0..2].each do |tg|
|
||||
= "##{tg}"
|
||||
|
||||
= link_to "See all featured users ->", "#"
|
||||
= link_to "#{t('.see_all_featured_users')} ->", featured_users_path
|
||||
|
||||
%br
|
||||
#find_friends_pane
|
||||
%h4
|
||||
Find friends
|
||||
= t('.find_friends')
|
||||
.span-5.append-1
|
||||
#global_search
|
||||
= form_tag(people_path, :method => 'get', :id => "global_search_form") do
|
||||
|
|
@ -119,10 +119,10 @@
|
|||
= @step += 1
|
||||
.content
|
||||
%h3
|
||||
= t(".follow_your_interests")
|
||||
= t('.follow_your_interests')
|
||||
|
||||
%p
|
||||
Hashtags allow you to talk about and follow your interests. They're also a great way to find new people on Diaspora.
|
||||
= t('.hashtag_explanation')
|
||||
|
||||
.span-5.append-1
|
||||
#global_search
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
= text_field_tag 'q', nil, :placeholder => "Search for #hashtags", :type => 'search', :results => 5
|
||||
.span-5.last
|
||||
%h4
|
||||
Featured tags
|
||||
= t('.featured_tags')
|
||||
%p
|
||||
= link_to "#diaspora", tag_path('diaspora')
|
||||
%br
|
||||
|
|
@ -158,6 +158,6 @@
|
|||
= image_tag '/images/cubbies_collage.png', :width => 422, :height => 159, :class => "cubbies_collage_small"
|
||||
= image_tag '/images/cubbies_screenshot2.png', :height => 151, :width => 200, :class => "cubbies_user_page_small"
|
||||
|
||||
.span-5.rightBar.last
|
||||
/= render 'selected_contacts', :people => @selected_people.sample(20), :count => @contact_count
|
||||
/= render 'shared/right_sections'
|
||||
/.span-5.rightBar.last
|
||||
/ = render 'selected_contacts', :people => @selected_people.sample(20), :count => @contact_count
|
||||
/ = render 'shared/right_sections'
|
||||
|
|
|
|||
|
|
@ -777,25 +777,13 @@ en:
|
|||
email_awaiting_confirmation: "We have sent you an activation link to %{unconfirmed_email}. Until you follow this link and activate the new address, we will continue to use your original address %{email}."
|
||||
destroy: "Your account has been locked. It may take 20 minutes for us to finish closing your account. Thank you for trying Diaspora."
|
||||
getting_started:
|
||||
welcome: "Welcome to Diaspora!"
|
||||
signup_steps: "Finish your sign up by completing these three steps:"
|
||||
edit_profile: "Edit your profile"
|
||||
connect_on_diaspora: "Connect on Diaspora"
|
||||
connect_services: "Connect your other services"
|
||||
finished: "Finished!"
|
||||
welcome: "Welcome!"
|
||||
welcome_with_name: "Welcome, %{name}!"
|
||||
|
||||
skip: "skip getting started"
|
||||
save_and_continue: "Save and continue"
|
||||
could_not_find_anyone: "Could not find any friends on Diaspora*. Use the friend finder to invite them."
|
||||
|
||||
fill_out_your_profile: "Fill out your profile"
|
||||
profile_description: "Description of why you'd want to do this"
|
||||
connect_to_your_other_social_networks: "Connect to your other social networks"
|
||||
connect_with_people: "Connect with cool people"
|
||||
follow_your_interests: "Follow your interests"
|
||||
connect_to: "Connect to"
|
||||
|
||||
find_friends_from_facebook: "find friends from Facebook"
|
||||
|
||||
profile_fields:
|
||||
name: "Name"
|
||||
birthday: "Birthday"
|
||||
|
|
@ -805,12 +793,21 @@ en:
|
|||
gender: "Gender"
|
||||
location: "Location"
|
||||
|
||||
step_3:
|
||||
finish: "Finish"
|
||||
people_already_on_diaspora: "People already on Diaspora"
|
||||
step_2:
|
||||
find_your_friends_on_diaspora: "Would you like to find your Facebook friends on Diaspora?"
|
||||
skip: "Skip"
|
||||
connect_to_your_other_social_networks: "Connect to your other social networks"
|
||||
connect_with_people: "Connect with cool people"
|
||||
connect_with_people_explanation: "Connect with people by placing them into one or more of your aspects. Aspects are an intuative way to group new and familar faces, allowing you to filter down or share with subsets of your contacts easily."
|
||||
featured_users: "Featured users"
|
||||
|
||||
follow_your_interests: "Follow your interests"
|
||||
connect_to: "Connect to"
|
||||
|
||||
find_friends_from_facebook: "find friends from Facebook"
|
||||
featured_tags: "Featured tags"
|
||||
find_friends: "Find friends"
|
||||
see_all_featured_users: "See all featured users"
|
||||
|
||||
hashtag_explanation: "Hashtags allow you to talk about and follow your interests. They're also a great way to find new people on Diaspora."
|
||||
|
||||
update:
|
||||
password_changed: "Password changed. You can now log in with your new password."
|
||||
password_not_changed: "Password change failed"
|
||||
|
|
|
|||
|
|
@ -105,4 +105,19 @@ describe UsersHelper do
|
|||
has_completed_getting_started?.should be_false
|
||||
end
|
||||
end
|
||||
|
||||
describe "#welcome_text" do
|
||||
it 'returns "Welcome" without a name if first_name is not set' do
|
||||
profile = @current_user.person.profile
|
||||
profile.first_name = ""
|
||||
profile.save
|
||||
@current_user.person.instance_variable_set(:@first_name, nil)
|
||||
|
||||
welcome_text.should == "Welcome!"
|
||||
end
|
||||
|
||||
it 'returns "Welcome, {first_name}" if first_name is set' do
|
||||
welcome_text.should == "Welcome, #{current_user.first_name}!"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue