]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
* Made "Account not active" and "Couldn't log in with those details" translatable
[rails.git] / app / controllers / user_controller.rb
index 2659232cd4bf75d49f16669a3ad4c70c4f79c714..b58a6a71c08b86927b2309a90839f08ea29ba11c 100644 (file)
@@ -154,9 +154,9 @@ class UserController < ApplicationController
         end
         return
       elsif User.authenticate(:username => email_or_display_name, :password => pass, :inactive => true)
-        @notice = "Sorry, your account is not active yet.<br>Please click on the link in the account confirmation email to activate your account."
+        @notice = I18n.t('user.login.account not active')
       else
-        @notice = "Sorry, couldn't log in with those details."
+        @notice = I18n.t('user.login.auth failure')
       end
     end
   end
@@ -186,11 +186,11 @@ class UserController < ApplicationController
         @user.email_valid = true
         @user.save!
         token.destroy
-        flash[:notice] = 'Confirmed your account, thanks for signing up!'
+        flash[:notice] = I18n.t('user.confirm.success')
         session[:user] = @user.id
         redirect_to :action => 'account', :display_name => @user.display_name
       else
-        @notice = 'Something went wrong confirming that user.'
+        @notice = I18n.t('user.confirm.failure')
       end
     end
   end
@@ -206,11 +206,11 @@ class UserController < ApplicationController
         @user.email_valid = true
         @user.save!
         token.destroy
-        flash[:notice] = 'Confirmed your email address, thanks for signing up!'
+        flash[:notice] = I18n.t('user.confirm email.success')
         session[:user] = @user.id
         redirect_to :action => 'account', :display_name => @user.display_name
       else
-        @notice = 'Something went wrong confirming that email address.'
+        @notice = I18n.t('user.confirm email.failure')
       end
     end
   end