]> git.openstreetmap.org Git - rails.git/commitdiff
* Made the "Confirmed your account/email" messages translatable
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 3 Jun 2009 01:31:35 +0000 (01:31 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 3 Jun 2009 01:31:35 +0000 (01:31 +0000)
 * Changed "Something went wrong" error to "you've already used that token". From reading the code that's the only time it's displayed

app/controllers/user_controller.rb
config/locales/en.yml

index 2659232cd4bf75d49f16669a3ad4c70c4f79c714..cd38dd9406592f0ee957bd0334dc22c4d8d201d1 100644 (file)
@@ -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
index 14f97f5fefb3579d0a1f82ae67a15a498850d3f0..f6f48d62e680d200a5b77954149899f7d2d7f3e5 100644 (file)
@@ -599,10 +599,14 @@ en:
       heading: Confirm a user account
       press confirm button: "Press the confirm button below to activate your account."
       button: Confirm
+      success: "Confirmed your account, thanks for signing up!"
+      failure: "A user account with this token has already been confirmed."
     confirm email:
       heading: Confirm a change of email address
       press confirm button: "Press the confirm button below to confirm your new email address."
       button: Confirm
+      success: "Confirmed your email address, thanks for signing up!"
+      failure: "An email address has already been confirmed with this token."
     set_home:
       flash success: "Home location saved successfully"
     go_public: