Ticket #493: user_text_updates.patch

File user_text_updates.patch, 3.0 KB (added by Dan Karran, 13 years ago)
  • user_controller.rb

     
    2828      @user.home_lat = home_lat.to_f
    2929      @user.home_lon = home_lon.to_f
    3030      if @user.save
    31         flash[:notice] = "User edited OK."
     31        flash[:notice] = "User information updated successfully."
    3232        redirect_to :controller => 'user', :action => 'account'
    3333      end
    3434    end
     
    3939      @user.home_lat = params[:user][:home_lat].to_f
    4040      @user.home_lon = params[:user][:home_lon].to_f
    4141      if @user.save
    42         flash[:notice] = "User home saved."
     42        flash[:notice] = "Home location saved successfully."
    4343        redirect_to :controller => 'user', :action => 'account'
    4444      end
    4545    end
     
    4848  def go_public
    4949    @user.data_public = true
    5050    @user.save
    51     flash[:notice] = 'All your edits are now public'
     51    flash[:notice] = 'All your edits are now public.'
    5252    redirect_to :controller => 'user', :action => 'account', :display_name => @user.display_name
    5353  end
    5454
     
    5959        user.token = User.make_token
    6060        user.save
    6161        Notifier::deliver_lost_password(user)
    62         flash[:notice] = "Sorry you lost it :-( but an email is on it's way so you can reset it soon."
     62        flash[:notice] = "Sorry you lost it :-( but an email is on its way so you can reset it soon."
    6363      else
    6464        flash[:notice] = "Couldn't find that email address, sorry."
    6565      end
     
    7676        user.pass_crypt = pass
    7777        user.save
    7878        Notifier::deliver_reset_password(user, pass)
    79         flash[:notice] = "You're password has been changed and is on the way to your mailbox :-)"
     79        flash[:notice] = "Your password has been changed and is on its way to your mailbox :-)"
    8080      else
    8181        flash[:notice] = "Didn't find that token, check the URL maybe?"
    8282      end
     
    104104        end
    105105        return
    106106      else
    107         flash[:notice] = "Couldn't log in with those details"
     107        flash[:notice] = "Sorry, couldn't log in with those details."
    108108      end
    109109    end
    110110  end
     
    137137
    138138      redirect_to :action => 'login'
    139139    else
    140       flash[:notice] = 'Something went wrong confirming that user'
     140      flash[:notice] = 'Something went wrong confirming that user.'
    141141    end
    142142  end
    143143
     
    182182      friend.friend_user_id = User.find_by_display_name(name).id
    183183      unless @user.is_friends_with?(friend)
    184184        if friend.save
    185           flash[:notice] = "#{name} is now your friend"
     185          flash[:notice] = "#{name} is now your friend."
    186186        else
    187           friend.add_error("adding a friend failed")
     187          friend.add_error("Sorry, failed to add #{name} as a friend.")
    188188        end
    189189      else
    190         flash[:notice] = "Your are already friends
     190        flash[:notice] = "You are already friends with #{name}.
    191191      end
    192192        redirect_to :controller => 'user', :action => 'view'
    193193    end